From 49a1bd44a6389af171ebb83c1f6b895401c9e985 Mon Sep 17 00:00:00 2001 From: thradams Date: Sat, 14 Dec 2024 23:22:09 -0300 Subject: [PATCH] c89 backend --- manual.md | 21 +- out/src/console.c | 45 + out/src/error.c | 317 + out/src/expressions.c | 6073 +++++++++++++++++++ out/src/fs.c | 426 ++ out/src/hashmap.c | 361 ++ out/src/object.c | 3043 ++++++++++ out/src/object_flow.c | 3876 ++++++++++++ out/src/options.c | 481 ++ out/src/osstream.c | 130 + out/src/parser.c | 11456 ++++++++++++++++++++++++++++++++++++ out/src/pre_expressions.c | 1104 ++++ out/src/token.c | 1484 +++++ out/src/tokenizer.c | 5374 +++++++++++++++++ out/src/type.c | 3611 ++++++++++++ out/src/visit_defer.c | 1689 ++++++ out/src/visit_flow.c | 3891 ++++++++++++ out/src/visit_il.c | 2700 +++++++++ src/file.c | 13 +- src/lib.c | 1184 +++- src/object.c | 16 +- src/object.h | 2 +- src/parser.c | 26 +- src/version.h | 2 +- src/visit_il.c | 289 +- src/visit_il.h | 4 +- src/web/cake.js | 2990 +++++----- src/web/manual.html | 19 +- src/web/samples.js | 105 +- 29 files changed, 49122 insertions(+), 1610 deletions(-) create mode 100644 out/src/console.c create mode 100644 out/src/error.c create mode 100644 out/src/expressions.c create mode 100644 out/src/fs.c create mode 100644 out/src/hashmap.c create mode 100644 out/src/object.c create mode 100644 out/src/object_flow.c create mode 100644 out/src/options.c create mode 100644 out/src/osstream.c create mode 100644 out/src/parser.c create mode 100644 out/src/pre_expressions.c create mode 100644 out/src/token.c create mode 100644 out/src/tokenizer.c create mode 100644 out/src/type.c create mode 100644 out/src/visit_defer.c create mode 100644 out/src/visit_flow.c create mode 100644 out/src/visit_il.c diff --git a/manual.md b/manual.md index b2f7ff5..cafa495 100644 --- a/manual.md +++ b/manual.md @@ -474,7 +474,6 @@ C89 not implemented yet. TODO! #include #define debug(...) fprintf(stderr, __VA_ARGS__) -#pragma expand debug int main() { @@ -584,7 +583,6 @@ https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1441.htm default: cbrtl \ )(X) -#pragma expand cbrt int main(void) { @@ -910,7 +908,6 @@ https://open-std.org/JTC1/SC22/WG14/www/docs/n3007.htm typeof(a) temp = a; a = b; b = temp; \ } while (0) -#pragma expand SWAP int main() { @@ -1287,11 +1284,6 @@ Implemented. #define SDEF(sname, ...) S sname __VA_OPT__(= { __VA_ARGS__ }) #define EMP -/*maybe this could be automatic if head; + struct argument_expression * p_current_argument = p_argument_expression_list->head; + while (p_current_argument && p_current_parameter_type) + { + check_assigment(ctx, &p_current_parameter_type->type, p_current_argument->expression, 1); + p_current_argument = p_current_argument->next; + p_current_parameter_type = p_current_parameter_type->next; + } + if (p_current_argument != ((void *)0) && !p_param_list->is_var_args) + { + compiler_diagnostic_message(660, ctx, p_current_argument->expression->first_token, ((void *)0), "too many arguments"); + goto _catch_label_1; + } + if (p_current_parameter_type != ((void *)0) && !p_param_list->is_void) + { + if (p_argument_expression_list->tail) + { + compiler_diagnostic_message(670, ctx, p_argument_expression_list->tail->expression->first_token, ((void *)0), "too few arguments"); + } + else + { + compiler_diagnostic_message(670, ctx, ctx->current, ((void *)0), "too few arguments"); + } + goto _catch_label_1; + } + } + else _catch_label_1: + { + return 1; + } + return 0; +} + +struct enumerator *find_enumerator(struct parser_ctx * ctx, char * lexeme, struct scope ** ppscope_opt); + +unsigned char is_enumeration_constant(struct parser_ctx * ctx) +{ + if (ctx->current == ((void *)0)) + { + return 0; + } + if (ctx->current->type != 8996) + { + return 0; + } + if (ctx->current->flags & 128) + { + return 1; + } + if (ctx->current->flags & 256) + { + return 0; + } + unsigned char is_enumerator = find_enumerator(ctx, ctx->current->lexeme, ((void *)0)) != ((void *)0); + if (is_enumerator) + { + ctx->current->flags = 128; + } + else + { + ctx->current->flags = 256; + } + return is_enumerator; +} + +unsigned char is_first_of_floating_constant(struct parser_ctx * ctx) +{ + if (ctx->current == ((void *)0)) + { + return 0; + } + return ctx->current->type == 140 || ctx->current->type == 141; +} + +unsigned char is_first_of_integer_constant(struct parser_ctx * ctx) +{ + if (ctx->current == ((void *)0)) + { + return 0; + } + return ctx->current->type == 136 || ctx->current->type == 137 || ctx->current->type == 138 || ctx->current->type == 139; +} + +unsigned char is_predefined_constant(struct parser_ctx * ctx) +{ + if (ctx->current == ((void *)0)) + { + return 0; + } + return ctx->current->type == 9059 || ctx->current->type == 9060 || ctx->current->type == 9061; +} + +unsigned char is_first_of_constant(struct parser_ctx * ctx) +{ + if (ctx->current == ((void *)0)) + { + return 0; + } + return is_first_of_integer_constant(ctx) || is_first_of_floating_constant(ctx) || is_enumeration_constant(ctx) || (ctx->current->type == 131) || is_predefined_constant(ctx); +} + +unsigned char is_first_of_primary_expression(struct parser_ctx * ctx) +{ + if (ctx->current == ((void *)0)) + { + return 0; + } + return ctx->current->type == 8996 || is_first_of_constant(ctx) || ctx->current->type == 130 || ctx->current->type == 40 || ctx->current->type == 9052; +} + +void unexpected_end_of_file(struct parser_ctx * ctx); +void *calloc(int nmemb, unsigned int size); +void parser_match(struct parser_ctx * ctx); +unsigned char first_of_type_name(struct parser_ctx * ctx); +struct type_name *type_name(struct parser_ctx * ctx); +struct type make_type_using_declarator(struct parser_ctx * ctx, struct declarator * pdeclarator); +int parser_match_tk(struct parser_ctx * ctx, int type); +struct expression *assignment_expression(struct parser_ctx * ctx); +void generic_association_delete(struct generic_association * p); + +struct generic_association *generic_association(struct parser_ctx * ctx) +{ + struct generic_association * p_generic_association = ((void *)0); + if (1) + { + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + p_generic_association = calloc(1, sizeof *p_generic_association); + if (p_generic_association == ((void *)0)) + { + goto _catch_label_1; + } + p_generic_association->first_token = ctx->current; + if (ctx->current->type == 9007) + { + parser_match(ctx); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + } + else + { + if (first_of_type_name(ctx)) + { + unsigned char old = ctx->inside_generic_association; + ctx->inside_generic_association = 1; + p_generic_association->p_type_name = type_name(ctx); + if (p_generic_association->p_type_name == ((void *)0)) + { + goto _catch_label_1; + } + ; + ctx->inside_generic_association = old; + p_generic_association->type = make_type_using_declarator(ctx, p_generic_association->p_type_name->abstract_declarator); + } + else + { + compiler_diagnostic_message(650, ctx, ctx->current, ((void *)0), "unexpected"); + } + } + if (parser_match_tk(ctx, 58) != 0) + { + goto _catch_label_1; + } + struct expression * p_expression_temp = assignment_expression(ctx); + if (p_expression_temp == ((void *)0)) + { + goto _catch_label_1; + } + p_generic_association->expression = p_expression_temp; + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + p_generic_association->last_token = ctx->current; + } + else _catch_label_1: + { + generic_association_delete(p_generic_association); + p_generic_association = ((void *)0); + } + return p_generic_association; +} + +void generic_assoc_list_add(struct generic_assoc_list * p, struct generic_association * item); + +struct generic_assoc_list generic_association_list(struct parser_ctx * ctx) +{ + struct generic_assoc_list list = {0}; + if (1) + { + struct generic_association * p_generic_association = generic_association(ctx); + if (p_generic_association == ((void *)0)) + { + goto _catch_label_1; + } + generic_assoc_list_add(&list, p_generic_association); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + while (ctx->current->type == 44) + { + parser_match(ctx); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + struct generic_association * p_generic_association2 = generic_association(ctx); + if (p_generic_association2 == ((void *)0)) + { + goto _catch_label_1; + } + generic_assoc_list_add(&list, p_generic_association2); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + } + } + else _catch_label_1: + { + } + return list; +} + +void type_name_delete(struct type_name * p); +void expression_delete(struct expression * p); +void type_destroy(struct type * p_type); +void free(void * ptr); + +void generic_association_delete(struct generic_association * p) +{ + if (p) + { + ; + type_name_delete(p->p_type_name); + expression_delete(p->expression); + type_destroy(&p->type); + free(p); + } +} + +void generic_assoc_list_add(struct generic_assoc_list * list, struct generic_association * pitem) +{ + if (list->head == ((void *)0)) + { + list->head = pitem; + } + else + { + ; + ; + list->tail->next = pitem; + } + list->tail = pitem; +} + +void generic_assoc_list_destroy(struct generic_assoc_list * p) +{ + struct generic_association * item = p->head; + while (item) + { + struct generic_association * next = item->next; + item->next = ((void *)0); + generic_association_delete(item); + item = next; + } +} + +void generic_selection_delete(struct generic_selection * p) +{ + if (p) + { + expression_delete(p->expression); + type_name_delete(p->type_name); + generic_assoc_list_destroy(&p->generic_assoc_list); + free(p); + } +} + +unsigned char expression_is_subjected_to_lvalue_conversion(struct expression *); +struct type type_lvalue_conversion(struct type * p_type, unsigned char nullchecks_enabled); +unsigned char type_is_same(struct type * a, struct type * b, unsigned char compare_qualifiers); + +struct generic_selection *generic_selection(struct parser_ctx * ctx) +{ + struct generic_selection * p_generic_selection = ((void *)0); + if (1) + { + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + p_generic_selection = calloc(1, sizeof *p_generic_selection); + if (p_generic_selection == ((void *)0)) + { + goto _catch_label_1; + } + p_generic_selection->first_token = ctx->current; + if (parser_match_tk(ctx, 9052) != 0) + { + goto _catch_label_1; + } + if (parser_match_tk(ctx, 40) != 0) + { + goto _catch_label_1; + } + if (first_of_type_name(ctx)) + { + p_generic_selection->type_name = type_name(ctx); + if (p_generic_selection->type_name == ((void *)0)) + { + goto _catch_label_1; + } + } + else + { + p_generic_selection->expression = assignment_expression(ctx); + if (p_generic_selection->expression == ((void *)0)) + { + goto _catch_label_1; + } + } + if (parser_match_tk(ctx, 44) != 0) + { + goto _catch_label_1; + } + p_generic_selection->generic_assoc_list = generic_association_list(ctx); + if (p_generic_selection->generic_assoc_list.head == ((void *)0)) + { + goto _catch_label_1; + } + struct type lvalue_type = {0}; + struct type * p_type = ((void *)0); + if (p_generic_selection->expression) + { + p_type = &p_generic_selection->expression->type; + if (expression_is_subjected_to_lvalue_conversion(p_generic_selection->expression)) + { + lvalue_type = type_lvalue_conversion(&p_generic_selection->expression->type, ctx->options.null_checks_enabled); + p_type = &lvalue_type; + } + } + else + { + if (p_generic_selection->type_name) + { + p_type = &p_generic_selection->type_name->abstract_declarator->type; + } + else + { + goto _catch_label_1; + } + } + struct generic_association * current = p_generic_selection->generic_assoc_list.head; + while (current) + { + if (current->p_type_name) + { + if (type_is_same(p_type, ¤t->type, 1)) + { + p_generic_selection->p_view_selected_expression = current->expression; + break; + } + } + else + { + p_generic_selection->p_view_selected_expression = current->expression; + } + current = current->next; + } + type_destroy(&lvalue_type); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + p_generic_selection->last_token = ctx->current; + if (parser_match_tk(ctx, 41) != 0) + { + goto _catch_label_1; + } + } + else _catch_label_1: + { + generic_selection_delete(p_generic_selection); + p_generic_selection = ((void *)0); + } + return p_generic_selection; +} + +unsigned char *utf8_decode(unsigned char * s, unsigned int * c); +unsigned char *escape_sequences_decode_opt(unsigned char * p, unsigned int * out_value); +struct object object_make_unsigned_char(unsigned char value); +struct object object_make_wchar_t(unsigned short value); + +struct expression *character_constant_expression(struct parser_ctx * ctx) +{ + struct expression * p_expression_node = ((void *)0); + if (1) + { + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + p_expression_node = calloc(1, sizeof *p_expression_node); + if (p_expression_node == ((void *)0)) + { + goto _catch_label_1; + } + p_expression_node->expression_type = 5; + p_expression_node->first_token = ctx->current; + p_expression_node->last_token = p_expression_node->first_token; + p_expression_node->type.attributes_flags = 67108864; + p_expression_node->type.category = 0; + unsigned char * p = (unsigned char *)ctx->current->lexeme; + if (p[0] == 117 && p[1] == 56) + { + p++; + p++; + p++; + p_expression_node->type.type_specifier_flags = 256 | 2; + unsigned int c = 0; + p = utf8_decode(p, &c); + if (p == ((void *)0)) + { + goto _catch_label_1; + } + if (c == 92) + { + p = escape_sequences_decode_opt(p, &c); + if (p == ((void *)0)) + { + goto _catch_label_1; + } + } + if ( *p != 39) + { + compiler_diagnostic_message(1370, ctx, ctx->current, ((void *)0), "Unicode character literals may not contain multiple characters."); + } + if (c > 128) + { + compiler_diagnostic_message(1360, ctx, ctx->current, ((void *)0), "character not encodable in a single code unit."); + } + p_expression_node->object = object_make_unsigned_char((unsigned char)c); + } + else + { + if (p[0] == 117) + { + p++; + p++; + p_expression_node->type.type_specifier_flags = 256 | 4; + unsigned int c = 0; + p = utf8_decode(p, &c); + if (p == ((void *)0)) + { + goto _catch_label_1; + } + if (c == 92) + { + p = escape_sequences_decode_opt(p, &c); + if (p == ((void *)0)) + { + goto _catch_label_1; + } + } + if ( *p != 39) + { + compiler_diagnostic_message(40, ctx, ctx->current, ((void *)0), "Unicode character literals may not contain multiple characters."); + } + if (c > 65535) + { + compiler_diagnostic_message(40, ctx, ctx->current, ((void *)0), "Character too large for enclosing character literal type."); + } + p_expression_node->object = object_make_wchar_t((unsigned short)c); + } + else + { + if (p[0] == 85) + { + p++; + p++; + p_expression_node->type.type_specifier_flags = 256 | 8; + unsigned int c = 0; + p = utf8_decode(p, &c); + if (p == ((void *)0)) + { + goto _catch_label_1; + } + if (c == 92) + { + p = escape_sequences_decode_opt(p, &c); + if (p == ((void *)0)) + { + goto _catch_label_1; + } + } + if ( *p != 39) + { + compiler_diagnostic_message(40, ctx, ctx->current, ((void *)0), "Unicode character literals may not contain multiple characters."); + } + if (c > 4294967295LL) + { + compiler_diagnostic_message(40, ctx, ctx->current, ((void *)0), "Character too large for enclosing character literal type."); + } + p_expression_node->object = object_make_wchar_t((unsigned short)c); + } + else + { + if (p[0] == 76) + { + p++; + p++; + p_expression_node->type.type_specifier_flags = (256 | 4); + long long value = 0; + while ( *p != 39) + { + unsigned int c = 0; + p = utf8_decode(p, &c); + if (p == ((void *)0)) + { + goto _catch_label_1; + } + if (c == 92) + { + p = escape_sequences_decode_opt(p, &c); + if (p == ((void *)0)) + { + goto _catch_label_1; + } + } + if (c < 128) + { + value = value * 256 + c; + } + else + { + value = c; + } + if (value > 65535) + { + compiler_diagnostic_message(41, ctx, ctx->current, ((void *)0), "character constant too long for its type", ctx->current->lexeme); + break; + } + } + p_expression_node->object = object_make_wchar_t((unsigned short)value); + } + else + { + p++; + p_expression_node->type.type_specifier_flags = 8; + long long value = 0; + while ( *p != 39) + { + unsigned int c = 0; + p = utf8_decode(p, &c); + if (p == ((void *)0)) + { + goto _catch_label_1; + } + if (c == 92) + { + p = escape_sequences_decode_opt(p, &c); + if (p == ((void *)0)) + { + goto _catch_label_1; + } + } + value = value * 256 + c; + if (value > 2147483647) + { + compiler_diagnostic_message(41, ctx, ctx->current, ((void *)0), "character constant too long for its type", ctx->current->lexeme); + break; + } + } + p_expression_node->object = object_make_wchar_t((unsigned short)value); + } + } + } + } + parser_match(ctx); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + } + else _catch_label_1: + { + expression_delete(p_expression_node); + p_expression_node = ((void *)0); + } + return p_expression_node; +} + +int parse_number(char * lexeme, char suffix[4], char erromsg[100]); +unsigned long long strtoull(char * _String, char ** _EndPtr, int _Radix); +int *_errno(void); +struct object object_make_unsigned_int(unsigned int value); +struct object object_make_unsigned_long(unsigned long value); +struct object object_make_unsigned_long_long(unsigned long long value); +struct object object_make_signed_int(signed int value); +struct object object_make_signed_long(signed long value); +struct object object_make_signed_long_long(signed long long value); +float strtof(char * _String, char ** _EndPtr); +struct object object_make_float(float value); +long double strtold(char * _String, char ** _EndPtr); +struct object object_make_long_double(long double value); +double strtod(char * _String, char ** _EndPtr); +struct object object_make_double(double value); + +int convert_to_number(struct parser_ctx * ctx, struct expression * p_expression_node, unsigned char disabled) +{ + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + return 1; + } + struct token * token = ctx->current; + int c = 0; + char buffer[260] = {0}; + char * s = token->lexeme; + while ( *s) + { + if ( *s != 39) + { + buffer[c] = *s; + c++; + } + s++; + } + char errormsg[100] = {0}; + char suffix[4] = {0}; + int r = parse_number(buffer, suffix, errormsg); + if (r == 0) + { + compiler_diagnostic_message(1380, ctx, token, ((void *)0), errormsg); + return 0; + } + switch (token->type) + { + case 136 : + case 137 : + case 138 : + case 139 : + { + unsigned long long value = 0; + switch (token->type) + { + case 136 : + value = strtoull(buffer, ((void *)0), 10); + break; + case 137 : + if (buffer[1] == 111 || buffer[1] == 79) + { + value = strtoull(buffer + 2, ((void *)0), 8); + } + else + { + value = strtoull(buffer + 1, ((void *)0), 8); + } + break; + case 138 : + value = strtoull(buffer + 2, ((void *)0), 16); + break; + case 139 : + value = strtoull(buffer + 2, ((void *)0), 2); + break; + default: + break; + } + if (value == 18446744073709551615ULL && ( *_errno()) == 34) + { + compiler_diagnostic_message(1350, ctx, token, ((void *)0), "integer literal is too large to be represented in any integer type"); + } + if (suffix[0] == 85) + { + if (value <= 4294967295LL && suffix[1] != 76) + { + p_expression_node->object = object_make_unsigned_int((unsigned int)value); + p_expression_node->type.type_specifier_flags = (8 | 256); + } + else + { + if (value <= 4294967295UL && suffix[2] != 76) + { + p_expression_node->object = object_make_unsigned_long((unsigned long)value); + p_expression_node->type.type_specifier_flags = 16 | 256; + } + else + { + p_expression_node->object = object_make_unsigned_long_long((unsigned long long)value); + p_expression_node->type.type_specifier_flags = 4194304 | 256; + } + } + } + else + { + if (value <= 2147483647 && suffix[0] != 76) + { + p_expression_node->object = object_make_signed_int((int)value); + p_expression_node->type.type_specifier_flags = 8; + } + else + { + if (value <= 2147483647L && suffix[1] != 76) + { + p_expression_node->object = object_make_signed_long((long)value); + p_expression_node->type.type_specifier_flags = 16; + } + else + { + if (value <= 9223372036854775807LL) + { + p_expression_node->object = object_make_signed_long_long((long long)value); + p_expression_node->type.type_specifier_flags = 4194304; + } + else + { + compiler_diagnostic_message(49, ctx, token, ((void *)0), "integer literal is too large to be represented in a signed integer type, interpreting as unsigned"); + p_expression_node->object = object_make_signed_long_long(value); + p_expression_node->type.type_specifier_flags = 4194304 | 256; + } + } + } + } + } + break; + case 140 : + case 141 : + { + if (suffix[0] == 70) + { + float value = strtof(buffer, ((void *)0)); + if (value == ((float)((float)(1 * 1))) && ( *_errno()) == 34) + { + } + p_expression_node->type.type_specifier_flags = 32; + p_expression_node->object = object_make_float(value); + } + else + { + if (suffix[0] == 76) + { + long double value = strtold(buffer, ((void *)0)); + if (value == ((long double)((float)(1 * 1))) && ( *_errno()) == 34) + { + } + p_expression_node->type.type_specifier_flags = 64 | 16; + p_expression_node->object = object_make_long_double(value); + } + else + { + double value = strtod(buffer, ((void *)0)); + if (value == ((double)((float)(1 * 1))) && ( *_errno()) == 34) + { + } + p_expression_node->object = object_make_double(value); + p_expression_node->type.type_specifier_flags = 64; + } + } + } + break; + default: + ; + } + return 0; +} + +static unsigned char is_integer_or_floating_constant(int type) +{ + return type == 136 || type == 137 || type == 138 || type == 139 || type == 140 || type == 141; +} + +struct map_entry *find_variables(struct parser_ctx * ctx, char * lexeme, struct scope ** ppscope_opt); +struct type type_make_enumerator(struct enum_specifier * enum_specifier); +unsigned char type_is_deprecated(struct type * p_type); +struct type type_dup(struct type * p_type); +struct object object_make_reference(struct object * object); +int strcmp(char * _Str1, char * _Str2); +struct type type_make_literal_string(int size, int chartype); +unsigned int strlen(char * _Str); +int get_char_type(char * s); +int string_literal_char_byte_size(char * s); +int string_literal_byte_size_not_zero_included(char * s); +struct object object_make_bool(unsigned char value); +struct object object_make_nullptr(); +struct expression *expression(struct parser_ctx * ctx); + +struct expression *primary_expression(struct parser_ctx * ctx) +{ + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + return ((void *)0); + } + struct expression * p_expression_node = ((void *)0); + if (1) + { + if (ctx->current->type == 8996) + { + p_expression_node = calloc(1, sizeof *p_expression_node); + if (p_expression_node == ((void *)0)) + { + goto _catch_label_1; + } + p_expression_node->first_token = ctx->current; + p_expression_node->last_token = ctx->current; + struct map_entry * p_entry = find_variables(ctx, ctx->current->lexeme, ((void *)0)); + if (p_entry && p_entry->type == 3) + { + ; + struct enumerator * p_enumerator = p_entry->data.p_enumerator; + p_expression_node->expression_type = 1; + p_expression_node->object = p_enumerator->value; + p_expression_node->type = type_make_enumerator(p_enumerator->enum_specifier); + } + else + { + if (p_entry && (p_entry->type == 4 || p_entry->type == 5)) + { + struct declarator * p_declarator = ((void *)0); + struct init_declarator * p_init_declarator = ((void *)0); + if (p_entry->type == 5) + { + ; + p_init_declarator = p_entry->data.p_init_declarator; + p_declarator = p_init_declarator->p_declarator; + } + else + { + p_declarator = p_entry->data.p_declarator; + } + ; + if (type_is_deprecated(&p_declarator->type)) + { + compiler_diagnostic_message(2, ctx, ctx->current, ((void *)0), "'%s' is deprecated", ctx->current->lexeme); + } + p_declarator->num_uses++; + p_expression_node->declarator = p_declarator; + p_expression_node->expression_type = 2; + p_expression_node->type = type_dup(&p_declarator->type); + p_expression_node->object = object_make_reference(&p_declarator->object); + } + else + { + if (ctx->p_current_function_opt && strcmp(ctx->current->lexeme, "__func__") == 0) + { + char * func_str = "?"; + if (ctx->p_current_function_opt->init_declarator_list.head != ((void *)0) && ctx->p_current_function_opt->init_declarator_list.head->p_declarator->name_opt) + { + func_str = ctx->p_current_function_opt->init_declarator_list.head->p_declarator->name_opt->lexeme; + } + p_expression_node->expression_type = 4; + p_expression_node->first_token = ctx->current; + p_expression_node->last_token = ctx->current; + p_expression_node->type = type_make_literal_string(strlen(func_str) + 1, 2); + } + else + { + compiler_diagnostic_message(680, ctx, ctx->current, ((void *)0), "not found '%s'", ctx->current->lexeme); + goto _catch_label_1; + } + } + } + parser_match(ctx); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + } + else + { + if (ctx->current->type == 130) + { + p_expression_node = calloc(1, sizeof *p_expression_node); + if (p_expression_node == ((void *)0)) + { + goto _catch_label_1; + } + p_expression_node->expression_type = 3; + p_expression_node->first_token = ctx->current; + p_expression_node->last_token = ctx->current; + int char_type = 2; + if (get_char_type(ctx->current->lexeme) == 2) + { + char_type = (256 | 4); + } + int char_byte_size = string_literal_char_byte_size(ctx->current->lexeme); + int number_of_bytes = 0; + struct object * last = ((void *)0); + while (ctx->current->type == 130) + { + unsigned char * it = ctx->current->lexeme + 1; + unsigned int value = 0; + while (it && *it != 34) + { + if ( *it == 92) + { + it = escape_sequences_decode_opt(it, &value); + } + else + { + value = *it; + it++; + } + struct object * p_new = calloc(1, sizeof *p_new); + if (p_new == ((void *)0)) + { + goto _catch_label_1; + } + p_new->state = 3; + p_new->value_type = 3; + p_new->value.signed_char_value = value; + if (p_expression_node->object.members == ((void *)0)) + { + p_expression_node->object.members = p_new; + } + else + { + last->next = p_new; + } + last = p_new; + } + struct object * p_new = calloc(1, sizeof *p_new); + if (p_new == ((void *)0)) + { + goto _catch_label_1; + } + p_new->state = 3; + p_new->value_type = 3; + p_new->value.signed_char_value = 0; + if (last == ((void *)0)) + { + p_expression_node->object.members = p_new; + } + else + { + last->next = p_new; + } + number_of_bytes = string_literal_byte_size_not_zero_included(ctx->current->lexeme); + parser_match(ctx); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + } + p_expression_node->type = type_make_literal_string(number_of_bytes + (1 * char_byte_size), char_type); + } + else + { + if (ctx->current->type == 131) + { + p_expression_node = character_constant_expression(ctx); + } + else + { + if (ctx->current->type == 9059 || ctx->current->type == 9060) + { + p_expression_node = calloc(1, sizeof *p_expression_node); + if (p_expression_node == ((void *)0)) + { + goto _catch_label_1; + } + p_expression_node->expression_type = 6; + p_expression_node->first_token = ctx->current; + p_expression_node->last_token = ctx->current; + p_expression_node->object = object_make_bool(ctx->current->type == 9059); + p_expression_node->type.type_specifier_flags = 512; + p_expression_node->type.type_qualifier_flags = 0; + parser_match(ctx); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + } + else + { + if (ctx->current->type == 9061) + { + p_expression_node = calloc(1, sizeof *p_expression_node); + if (p_expression_node == ((void *)0)) + { + goto _catch_label_1; + } + p_expression_node->expression_type = 6; + p_expression_node->first_token = ctx->current; + p_expression_node->last_token = ctx->current; + p_expression_node->object = object_make_nullptr(); + p_expression_node->type.type_specifier_flags = 16777216; + p_expression_node->type.type_qualifier_flags = 0; + parser_match(ctx); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + } + else + { + if (is_integer_or_floating_constant(ctx->current->type)) + { + p_expression_node = calloc(1, sizeof *p_expression_node); + if (p_expression_node == ((void *)0)) + { + goto _catch_label_1; + } + p_expression_node->first_token = ctx->current; + p_expression_node->last_token = ctx->current; + p_expression_node->expression_type = 8; + convert_to_number(ctx, p_expression_node, 0); + parser_match(ctx); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + } + else + { + if (ctx->current->type == 9052) + { + p_expression_node = calloc(1, sizeof *p_expression_node); + if (p_expression_node == ((void *)0)) + { + goto _catch_label_1; + } + p_expression_node->first_token = ctx->current; + p_expression_node->expression_type = 7; + p_expression_node->generic_selection = generic_selection(ctx); + if (p_expression_node->generic_selection == ((void *)0)) + { + goto _catch_label_1; + } + p_expression_node->last_token = p_expression_node->generic_selection->last_token; + if (p_expression_node->generic_selection->p_view_selected_expression) + { + p_expression_node->type = type_dup(&p_expression_node->generic_selection->p_view_selected_expression->type); + p_expression_node->object = p_expression_node->generic_selection->p_view_selected_expression->object; + } + else + { + compiler_diagnostic_message(690, ctx, ctx->current, ((void *)0), "no match for generic"); + } + } + else + { + if (ctx->current->type == 40) + { + p_expression_node = calloc(1, sizeof *p_expression_node); + if (p_expression_node == ((void *)0)) + { + goto _catch_label_1; + } + p_expression_node->expression_type = 9; + p_expression_node->first_token = ctx->current; + parser_match(ctx); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + p_expression_node->right = expression(ctx); + if (p_expression_node->right == ((void *)0)) + { + goto _catch_label_1; + } + p_expression_node->type = type_dup(&p_expression_node->right->type); + p_expression_node->object = p_expression_node->right->object; + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + p_expression_node->last_token = ctx->current; + if (parser_match_tk(ctx, 41) != 0) + { + goto _catch_label_1; + } + } + else + { + compiler_diagnostic_message(650, ctx, ctx->current, ((void *)0), "unexpected"); + goto _catch_label_1; + } + } + } + } + } + } + } + } + } + else _catch_label_1: + { + expression_delete(p_expression_node); + p_expression_node = ((void *)0); + } + ; + return p_expression_node; +} + +void argument_expression_delete(struct argument_expression * p) +{ + if (p) + { + expression_delete(p->expression); + ; + free(p); + } +} + +void argument_expression_list_push(struct argument_expression_list * list, struct argument_expression * p); + +struct argument_expression_list argument_expression_list(struct parser_ctx * ctx) +{ + struct argument_expression_list list = {0}; + struct argument_expression * p_argument_expression = ((void *)0); + if (1) + { + p_argument_expression = calloc(1, sizeof (struct argument_expression)); + if (p_argument_expression == ((void *)0)) + { + goto _catch_label_1; + } + struct expression * p_assignment_expression = assignment_expression(ctx); + if (p_assignment_expression == ((void *)0)) + { + argument_expression_delete(p_argument_expression); + goto _catch_label_1; + } + p_argument_expression->expression = p_assignment_expression; + argument_expression_list_push(&list, p_argument_expression); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + while (ctx->current->type == 44) + { + parser_match(ctx); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + struct argument_expression * p_argument_expression_2 = calloc(1, sizeof *p_argument_expression_2); + if (p_argument_expression_2 == ((void *)0)) + { + goto _catch_label_1; + } + struct expression * p_assignment_expression_2 = assignment_expression(ctx); + if (p_assignment_expression_2 == ((void *)0)) + { + argument_expression_delete(p_argument_expression_2); + goto _catch_label_1; + } + p_argument_expression_2->expression = p_assignment_expression_2; + argument_expression_list_push(&list, p_argument_expression_2); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + } + } + else _catch_label_1: + { + } + return list; +} + +unsigned char first_of_type_name_ahead(struct parser_ctx * ctx); + +unsigned char first_of_postfix_expression(struct parser_ctx * ctx) +{ + if (first_of_type_name_ahead(ctx)) + { + return 1; + } + return is_first_of_primary_expression(ctx); +} + +static void fix_member_type(struct type * p_type, struct type * struct_type, struct type * member_type) +{ + if (struct_type->type_qualifier_flags & 1) + { + p_type->type_qualifier_flags = 1; + } + p_type->storage_class_specifier_flags = struct_type->storage_class_specifier_flags; + if (struct_type->type_qualifier_flags & 64) + { + p_type->type_qualifier_flags = ~16; + } + if (struct_type->type_qualifier_flags & 128) + { + p_type->type_qualifier_flags = 128; + } +} + +struct type type_remove_pointer(struct type * p_type); + +static void fix_arrow_member_type(struct type * p_type, struct type * left, struct type * member_type) +{ + struct type t = type_remove_pointer(left); + if (t.type_qualifier_flags & 1) + { + p_type->type_qualifier_flags = 1; + } + if (t.type_qualifier_flags & 128) + { + p_type->type_qualifier_flags = 128; + } + if (t.type_qualifier_flags & 64) + { + p_type->type_qualifier_flags = ~16; + } + type_destroy(&t); +} + +unsigned char type_is_pointer_or_array(struct type * p_type); +unsigned char type_is_pointer(struct type * p_type); +unsigned char type_is_array(struct type * p_type); +struct type get_array_item_type(struct type * p_type); +unsigned char object_has_constant_value(struct object * a); +unsigned long long object_to_unsigned_long_long(struct object * a); +struct object *object_get_member(struct object * p_object, int index); +unsigned char type_is_function_or_function_pointer(struct type * p_type); +struct type get_function_return_type(struct type * p_type); +int make_object(struct type * p_type, struct object * obj); +struct struct_or_union_specifier *find_struct_or_union_specifier(struct parser_ctx * ctx, char * lexeme); +struct struct_or_union_specifier *get_complete_struct_or_union_specifier(struct struct_or_union_specifier * p_struct_or_union_specifier); +struct member_declarator *find_member_declarator(struct member_declaration_list * list, char * name, int * p_member_index); +unsigned char type_is_struct_or_union(struct type * p_type); +unsigned char type_is_owner(struct type * p_type); +unsigned char expression_is_lvalue(struct expression * expr); +struct token *previous_parser_token(struct token * token); + +struct expression *postfix_expression_tail(struct parser_ctx * ctx, struct expression * p_expression_node_param) +{ + struct expression * p_expression_node = p_expression_node_param; + if (1) + { + while (ctx->current != ((void *)0)) + { + if (ctx->current->type == 91) + { + struct expression * p_expression_node_new = calloc(1, sizeof *p_expression_node_new); + if (p_expression_node_new == ((void *)0)) + { + goto _catch_label_1; + } + p_expression_node->last_token = ctx->current; + p_expression_node_new->first_token = ctx->current; + p_expression_node_new->expression_type = 13; + if ( !type_is_pointer_or_array(&p_expression_node->type)) + { + compiler_diagnostic_message(700, ctx, ctx->current, ((void *)0), "subscripted value is neither array nor pointer"); + } + if (type_is_pointer(&p_expression_node->type)) + { + p_expression_node_new->type = type_remove_pointer(&p_expression_node->type); + } + else + { + if (type_is_array(&p_expression_node->type)) + { + p_expression_node_new->type = get_array_item_type(&p_expression_node->type); + } + } + parser_match(ctx); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + expression_delete(p_expression_node_new); + goto _catch_label_1; + } + p_expression_node_new->right = expression(ctx); + if (p_expression_node_new->right == ((void *)0)) + { + expression_delete(p_expression_node_new); + goto _catch_label_1; + } + if (object_has_constant_value(&p_expression_node_new->right->object)) + { + unsigned long long index = object_to_unsigned_long_long(&p_expression_node_new->right->object); + if (type_is_array(&p_expression_node->type)) + { + if (p_expression_node->type.num_of_elements > 0) + { + if (index >= (unsigned long long)p_expression_node->type.num_of_elements) + { + compiler_diagnostic_message(41, ctx, ctx->current, ((void *)0), "index %d is past the end of the array", index); + } + struct object * it = object_get_member(&p_expression_node->object, index); + if (it != ((void *)0)) + { + p_expression_node_new->object = object_make_reference(it); + } + } + } + } + if (parser_match_tk(ctx, 93) != 0) + { + expression_delete(p_expression_node_new); + p_expression_node_new = ((void *)0); + goto _catch_label_1; + } + p_expression_node_new->left = p_expression_node; + p_expression_node = p_expression_node_new; + } + else + { + if (ctx->current->type == 40) + { + struct expression * p_expression_node_new = calloc(1, sizeof *p_expression_node_new); + if (p_expression_node_new == ((void *)0)) + { + goto _catch_label_1; + } + p_expression_node->last_token = ctx->current; + p_expression_node_new->first_token = p_expression_node->first_token; + p_expression_node_new->expression_type = 12; + if ( !type_is_function_or_function_pointer(&p_expression_node->type)) + { + compiler_diagnostic_message(710, ctx, ctx->current, ((void *)0), "called object is not attr function or function pointer"); + } + p_expression_node_new->type = get_function_return_type(&p_expression_node->type); + parser_match(ctx); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + expression_delete(p_expression_node_new); + p_expression_node_new = ((void *)0); + goto _catch_label_1; + } + if (ctx->current->type != 41) + { + p_expression_node_new->argument_expression_list = argument_expression_list(ctx); + } + if (parser_match_tk(ctx, 41) != 0) + { + expression_delete(p_expression_node_new); + p_expression_node_new = ((void *)0); + goto _catch_label_1; + } + compare_function_arguments(ctx, &p_expression_node->type, &p_expression_node_new->argument_expression_list); + if (ctx->previous == ((void *)0)) + { + expression_delete(p_expression_node_new); + p_expression_node_new = ((void *)0); + goto _catch_label_1; + } + make_object(&p_expression_node_new->type, &p_expression_node_new->object); + p_expression_node_new->last_token = ctx->previous; + p_expression_node_new->left = p_expression_node; + p_expression_node = p_expression_node_new; + } + else + { + if (ctx->current->type == 46) + { + struct expression * p_expression_node_new = calloc(1, sizeof *p_expression_node_new); + if (p_expression_node_new == ((void *)0)) + { + goto _catch_label_1; + } + p_expression_node->last_token = ctx->current; + p_expression_node_new->first_token = ctx->current; + p_expression_node_new->expression_type = 14; + p_expression_node_new->left = p_expression_node; + p_expression_node = ((void *)0); + p_expression_node_new->declarator = p_expression_node_new->left->declarator; + parser_match(ctx); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + expression_delete(p_expression_node_new); + p_expression_node_new = ((void *)0); + goto _catch_label_1; + } + if (p_expression_node_new->left->type.type_specifier_flags & 32768) + { + ; + struct struct_or_union_specifier * p_complete = find_struct_or_union_specifier(ctx, p_expression_node_new->left->type.struct_or_union_specifier->tag_name); + if (p_complete) + { + p_complete = get_complete_struct_or_union_specifier(p_complete); + } + if (p_complete) + { + ; + int member_index = 0; + struct member_declarator * p_member_declarator = find_member_declarator(&p_complete->member_declaration_list, ctx->current->lexeme, &member_index); + if (p_member_declarator) + { + p_expression_node_new->member_index = member_index; + if (p_member_declarator->declarator) + { + p_expression_node_new->type = make_type_using_declarator(ctx, p_member_declarator->declarator); + } + else + { + } + if (p_member_declarator->declarator != ((void *)0)) + { + fix_member_type(&p_expression_node_new->type, &p_expression_node_new->left->type, &p_member_declarator->declarator->type); + } + struct object * object = object_get_member(&p_expression_node_new->left->object, member_index); + if (object) + { + p_expression_node_new->object = object_make_reference(object); + } + else + { + } + } + else + { + compiler_diagnostic_message(720, ctx, ctx->current, ((void *)0), "member '%s' not found in 'struct %s'", ctx->current->lexeme, p_complete->tag_name); + } + } + else + { + compiler_diagnostic_message(720, ctx, ctx->current, ((void *)0), "incomplete struct type '%s'", p_expression_node_new->left->type.struct_or_union_specifier->tag_name); + } + if (parser_match_tk(ctx, 8996) != 0) + { + expression_delete(p_expression_node_new); + p_expression_node_new = ((void *)0); + goto _catch_label_1; + } + } + else + { + compiler_diagnostic_message(730, ctx, ctx->current, ((void *)0), "structure or union required"); + } + p_expression_node = p_expression_node_new; + } + else + { + if (ctx->current->type == 11582) + { + struct expression * p_expression_node_new = calloc(1, sizeof *p_expression_node_new); + if (p_expression_node_new == ((void *)0)) + { + goto _catch_label_1; + } + p_expression_node->last_token = ctx->current; + p_expression_node_new->first_token = p_expression_node->first_token; + p_expression_node_new->last_token = ctx->current; + p_expression_node_new->expression_type = 15; + parser_match(ctx); + if (ctx->current == ((void *)0)) + { + expression_delete(p_expression_node_new); + p_expression_node_new = ((void *)0); + goto _catch_label_1; + } + if (type_is_pointer_or_array(&p_expression_node->type)) + { + struct type item_type = {0}; + if (type_is_array(&p_expression_node->type)) + { + compiler_diagnostic_message(19, ctx, ctx->current, ((void *)0), "using indirection '->' in array"); + item_type = get_array_item_type(&p_expression_node->type); + } + else + { + item_type = type_remove_pointer(&p_expression_node->type); + } + if (type_is_struct_or_union(&item_type)) + { + ; + ; + struct struct_or_union_specifier * p_complete = get_complete_struct_or_union_specifier(p_expression_node->type.next->struct_or_union_specifier); + if (p_complete) + { + int member_index = 0; + struct member_declarator * p_member_declarator = find_member_declarator(&p_complete->member_declaration_list, ctx->current->lexeme, &member_index); + if (p_member_declarator) + { + if (p_member_declarator->declarator) + { + p_expression_node_new->member_index = member_index; + p_expression_node_new->type = make_type_using_declarator(ctx, p_member_declarator->declarator); + fix_arrow_member_type(&p_expression_node_new->type, &p_expression_node->type, &p_expression_node_new->type); + } + else + { + ; + } + } + else + { + compiler_diagnostic_message(720, ctx, ctx->current, ((void *)0), "member '%s' not found in struct '%s'", ctx->current->lexeme, p_expression_node->type.next->struct_or_union_specifier->tag_name); + } + } + else + { + compiler_diagnostic_message(740, ctx, ctx->current, ((void *)0), "struct '%s' is incomplete.", ctx->current->lexeme); + } + if (parser_match_tk(ctx, 8996) != 0) + { + type_destroy(&item_type); + expression_delete(p_expression_node_new); + p_expression_node_new = ((void *)0); + goto _catch_label_1; + } + } + else + { + compiler_diagnostic_message(730, ctx, ctx->current, ((void *)0), "structure or union required"); + } + type_destroy(&item_type); + } + else + { + compiler_diagnostic_message(730, ctx, ctx->current, ((void *)0), "structure or union required"); + } + p_expression_node_new->left = p_expression_node; + p_expression_node = p_expression_node_new; + } + else + { + if (ctx->current->type == 11051) + { + p_expression_node->last_token = ctx->current; + if (type_is_owner(&p_expression_node->type)) + { + compiler_diagnostic_message(1310, ctx, p_expression_node->first_token, ((void *)0), "operator ++ cannot be used in _Owner pointers"); + } + if ( !expression_is_lvalue(p_expression_node)) + { + compiler_diagnostic_message(1230, ctx, p_expression_node->first_token, ((void *)0), "lvalue required as increment operand"); + } + struct expression * p_expression_node_new = calloc(1, sizeof *p_expression_node_new); + if (p_expression_node_new == ((void *)0)) + { + goto _catch_label_1; + } + p_expression_node->last_token = ctx->current; + p_expression_node_new->first_token = ctx->current; + p_expression_node_new->expression_type = 16; + p_expression_node_new->type = type_dup(&p_expression_node->type); + parser_match(ctx); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + expression_delete(p_expression_node_new); + p_expression_node_new = ((void *)0); + goto _catch_label_1; + } + p_expression_node_new->left = p_expression_node; + p_expression_node = p_expression_node_new; + } + else + { + if (ctx->current->type == 11565) + { + p_expression_node->last_token = ctx->current; + if (type_is_owner(&p_expression_node->type)) + { + compiler_diagnostic_message(1320, ctx, p_expression_node->first_token, ((void *)0), "operator -- cannot be used in owner pointers"); + } + if ( !expression_is_lvalue(p_expression_node)) + { + compiler_diagnostic_message(1230, ctx, p_expression_node->first_token, ((void *)0), "lvalue required as decrement operand"); + } + struct expression * p_expression_node_new = calloc(1, sizeof *p_expression_node_new); + if (p_expression_node_new == ((void *)0)) + { + goto _catch_label_1; + } + p_expression_node_new->first_token = ctx->current; + p_expression_node_new->expression_type = 17; + p_expression_node_new->type = type_dup(&p_expression_node->type); + parser_match(ctx); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + expression_delete(p_expression_node_new); + p_expression_node_new = ((void *)0); + goto _catch_label_1; + } + p_expression_node_new->left = p_expression_node; + p_expression_node = p_expression_node_new; + } + else + { + struct token * p_last = previous_parser_token(ctx->current); + if (p_last == ((void *)0)) + { + goto _catch_label_1; + } + p_expression_node->last_token = p_last; + break; + } + } + } + } + } + } + } + } + else _catch_label_1: + { + } + return p_expression_node; +} + +unsigned char type_is_function(struct type * p_type); +void scope_list_push(struct scope_list * list, struct scope * s); +struct compound_statement *function_body(struct parser_ctx * ctx); +void scope_list_pop(struct scope_list * list); +struct braced_initializer *braced_initializer(struct parser_ctx * ctx); +unsigned char type_is_const(struct type * p_type); +void object_default_initialization(struct object * p_object, unsigned char is_constant); +int initializer_init_new(struct parser_ctx * ctx, struct type * p_current_object_type, struct object * p_current_object, struct initializer * braced_initializer, unsigned char is_constant); + +struct expression *postfix_expression_type_name(struct parser_ctx * ctx, struct type_name * p_type_name_par) +{ + struct type_name * p_type_name = p_type_name_par; + struct expression * p_expression_node = ((void *)0); + if (1) + { + p_expression_node = calloc(1, sizeof *p_expression_node); + if (p_expression_node == ((void *)0)) + { + goto _catch_label_1; + } + ; + struct token * p_previous = previous_parser_token(p_type_name->first_token); + if (p_previous == ((void *)0)) + { + goto _catch_label_1; + } + p_expression_node->first_token = p_previous; + ; + p_expression_node->type_name = p_type_name; + p_type_name = ((void *)0); + p_expression_node->type = make_type_using_declarator(ctx, p_expression_node->type_name->abstract_declarator); + if (type_is_function(&p_expression_node->type_name->abstract_declarator->type)) + { + p_expression_node->expression_type = 10; + struct scope * parameters_scope = &p_expression_node->type_name->abstract_declarator->direct_declarator->function_declarator->parameters_scope; + scope_list_push(&ctx->scopes, parameters_scope); + p_expression_node->compound_statement = function_body(ctx); + scope_list_pop(&ctx->scopes); + } + else + { + p_expression_node->expression_type = 11; + p_expression_node->braced_initializer = braced_initializer(ctx); + p_expression_node->type = type_dup(&p_expression_node->type_name->type); + int er = make_object(&p_expression_node->type, &p_expression_node->object); + if (er != 0) + { + compiler_diagnostic_message(740, ctx, p_expression_node->first_token, ((void *)0), "incomplete struct/union type"); + goto _catch_label_1; + } + unsigned char is_constant = type_is_const(&p_expression_node->type) || p_expression_node->type.storage_class_specifier_flags & 64; + object_default_initialization(&p_expression_node->object, is_constant); + struct initializer initializer = {0}; + initializer.braced_initializer = p_expression_node->braced_initializer; + initializer.first_token = p_expression_node->first_token; + initializer_init_new(ctx, &p_expression_node->type, &p_expression_node->object, &initializer, is_constant); + } + if (ctx->previous == ((void *)0)) + { + goto _catch_label_1; + } + p_expression_node->last_token = ctx->previous; + p_expression_node = postfix_expression_tail(ctx, p_expression_node); + if (p_expression_node == ((void *)0)) + { + goto _catch_label_1; + } + } + else _catch_label_1: + { + expression_delete(p_expression_node); + p_expression_node = ((void *)0); + } + type_name_delete(p_type_name); + return p_expression_node; +} + +struct compound_statement *compound_statement(struct parser_ctx * ctx); + +struct expression *postfix_expression(struct parser_ctx * ctx) +{ + struct expression * p_expression_node = ((void *)0); + if (1) + { + if (first_of_type_name_ahead(ctx)) + { + ; + p_expression_node = calloc(1, sizeof *p_expression_node); + if (p_expression_node == ((void *)0)) + { + goto _catch_label_1; + } + ; + p_expression_node->first_token = ctx->current; + if (parser_match_tk(ctx, 40) != 0) + { + goto _catch_label_1; + } + p_expression_node->type_name = type_name(ctx); + if (p_expression_node->type_name == ((void *)0)) + { + goto _catch_label_1; + } + p_expression_node->type = make_type_using_declarator(ctx, p_expression_node->type_name->abstract_declarator); + if (parser_match_tk(ctx, 41) != 0) + { + goto _catch_label_1; + } + unsigned char is_function_type = type_is_function(&p_expression_node->type); + if (is_function_type) + { + p_expression_node->expression_type = 10; + p_expression_node->compound_statement = compound_statement(ctx); + if (p_expression_node->compound_statement == ((void *)0)) + { + goto _catch_label_1; + } + p_expression_node->last_token = p_expression_node->compound_statement->last_token; + } + else + { + p_expression_node->expression_type = 11; + p_expression_node->braced_initializer = braced_initializer(ctx); + if (p_expression_node->braced_initializer == ((void *)0)) + { + goto _catch_label_1; + } + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + p_expression_node->last_token = ctx->current; + } + } + else + { + p_expression_node = primary_expression(ctx); + if (p_expression_node == ((void *)0)) + { + goto _catch_label_1; + } + } + p_expression_node = postfix_expression_tail(ctx, p_expression_node); + if (p_expression_node == ((void *)0)) + { + goto _catch_label_1; + } + } + else _catch_label_1: + { + expression_delete(p_expression_node); + p_expression_node = ((void *)0); + } + return p_expression_node; +} + +unsigned char is_first_of_compiler_function(struct parser_ctx * ctx) +{ + if (ctx->current == ((void *)0)) + { + return 0; + } + return ctx->current->type == 9074 || ctx->current->type == 9076 || ctx->current->type == 9075 || ctx->current->type == 9073 || ctx->current->type == 9077 || ctx->current->type == 9078 || ctx->current->type == 9056 || ctx->current->type == 9079 || ctx->current->type == 9080 || ctx->current->type == 9081 || ctx->current->type == 9082; +} + +unsigned char is_first_of_unary_expression(struct parser_ctx * ctx) +{ + if (ctx->current == ((void *)0)) + { + return 0; + } + return first_of_postfix_expression(ctx) || ctx->current->type == 11051 || ctx->current->type == 11565 || ctx->current->type == 38 || ctx->current->type == 42 || ctx->current->type == 43 || ctx->current->type == 45 || ctx->current->type == 126 || ctx->current->type == 33 || ctx->current->type == 9030 || ctx->current->type == 9031 || ctx->current->type == 9044 || is_first_of_compiler_function(ctx); +} + +int type_get_category(struct type * p_type); +unsigned char type_is_vla(struct type * p_type); + +static int check_sizeof_argument(struct parser_ctx * ctx, struct expression * p_expression, struct type * p_type) +{ + int category = type_get_category(p_type); + if (category == 1) + { + } + else + { + if (category == 0 && p_type->type_specifier_flags & 32768) + { + ; + struct struct_or_union_specifier * p_complete = get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); + if (p_complete == ((void *)0)) + { + compiler_diagnostic_message(740, ctx, p_expression->first_token, ((void *)0), "struct is incomplete type"); + return -1; + } + } + else + { + if (category == 2) + { + if (type_is_vla(p_type)) + { + return 0; + } + if (p_type->storage_class_specifier_flags & 2048) + { + compiler_diagnostic_message(46, ctx, p_expression->first_token, ((void *)0), "sizeof applied to array function parameter"); + } + } + } + } + return 0; +} + +struct expression *cast_expression(struct parser_ctx * ctx); +unsigned char object_to_bool(struct object * a); +struct type type_make_int_bool_like(); +unsigned char type_is_integer(struct type * p_type); +void type_integer_promotion(struct type * a); +int type_to_object_type(struct type * type); +signed int object_to_signed_int(struct object * a); +unsigned int object_to_unsigned_int(struct object * a); +signed long object_to_signed_long(struct object * a); +unsigned long object_to_unsigned_long(struct object * a); +signed long long object_to_signed_long_long(struct object * a); +struct type type_common(struct type * p_type1, struct type * p_type2); +float object_to_float(struct object * a); +double object_to_double(struct object * a); +long double object_to_long_double(struct object * a); +struct type type_add_pointer(struct type * p_type, unsigned char null_checks_enabled); +struct type make_size_t_type(); +struct object object_make_size_t(unsigned int value); +unsigned int type_get_sizeof(struct type * p_type); +struct type type_make_size_t(); +unsigned int type_get_alignof(struct type * p_type); +struct type type_make_int(); +unsigned char type_is_arithmetic(struct type * p_type); +unsigned char type_is_scalar(struct type * p_type); +unsigned char type_is_floating_point(struct type * p_type); + +struct expression *unary_expression(struct parser_ctx * ctx) +{ + struct expression * p_expression_node = ((void *)0); + if (1) + { + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + if (ctx->current->type == 11051 || ctx->current->type == 11565) + { + struct expression * new_expression = calloc(1, sizeof *new_expression); + if (new_expression == ((void *)0)) + { + goto _catch_label_1; + } + new_expression->first_token = ctx->current; + if (ctx->current->type == 11051) + { + new_expression->expression_type = 26; + } + else + { + new_expression->expression_type = 27; + } + parser_match(ctx); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + expression_delete(new_expression); + goto _catch_label_1; + } + new_expression->right = unary_expression(ctx); + if (new_expression->right == ((void *)0)) + { + expression_delete(new_expression); + goto _catch_label_1; + } + new_expression->type = type_dup(&new_expression->right->type); + p_expression_node = new_expression; + } + else + { + if (ctx->current->type == 38 || ctx->current->type == 42 || ctx->current->type == 43 || ctx->current->type == 45 || ctx->current->type == 126 || ctx->current->type == 33) + { + struct expression * new_expression = calloc(1, sizeof *new_expression); + if (new_expression == ((void *)0)) + { + goto _catch_label_1; + } + new_expression->first_token = ctx->current; + struct token * op_position = ctx->current; + int op = ctx->current->type; + parser_match(ctx); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + expression_delete(new_expression); + goto _catch_label_1; + } + new_expression->right = cast_expression(ctx); + if (new_expression->right == ((void *)0)) + { + expression_delete(new_expression); + goto _catch_label_1; + } + new_expression->last_token = new_expression->right->last_token; + if (op == 33) + { + new_expression->expression_type = 28; + if ( !ctx->evaluation_is_disabled && object_has_constant_value(&new_expression->right->object)) + { + unsigned char v = object_to_bool(&new_expression->right->object); + new_expression->object = object_make_signed_int( !v); + } + new_expression->type = type_make_int_bool_like(); + } + else + { + if (op == 126) + { + if ( !type_is_integer(&new_expression->right->type)) + { + compiler_diagnostic_message(850, ctx, op_position, ((void *)0), "requires integer type"); + expression_delete(new_expression); + goto _catch_label_1; + } + new_expression->expression_type = 29; + struct type promoted = type_dup(&new_expression->right->type); + type_integer_promotion(&promoted); + new_expression->type = promoted; + if ( !ctx->evaluation_is_disabled && object_has_constant_value(&new_expression->right->object)) + { + int vt = type_to_object_type(&new_expression->type); + switch (vt) + { + case 0 : + { + signed int r = object_to_signed_int(&new_expression->right->object); + new_expression->object = object_make_signed_int( ~r); + } + break; + case 1 : + { + unsigned int r = object_to_unsigned_int(&new_expression->right->object); + new_expression->object = object_make_unsigned_int( ~r); + } + break; + case 7 : + { + signed long r = object_to_signed_long(&new_expression->right->object); + new_expression->object = object_make_signed_long( ~r); + } + break; + case 8 : + { + unsigned long r = object_to_unsigned_long(&new_expression->right->object); + new_expression->object = object_make_unsigned_long( ~r); + } + break; + case 9 : + { + signed long long r = object_to_signed_long_long(&new_expression->right->object); + new_expression->object = object_make_signed_long_long( ~r); + } + break; + case 10 : + { + unsigned long long r = object_to_unsigned_long_long(&new_expression->right->object); + new_expression->object = object_make_unsigned_long_long( ~r); + } + break; + case 5 : + case 6 : + case 3 : + case 4 : + case 2 : + case 11 : + case 12 : + case 13 : + break; + } + ; + } + } + else + { + if (op == 45 || op == 43) + { + if (op == 45) + { + new_expression->expression_type = 30; + } + else + { + new_expression->expression_type = 31; + } + new_expression->type = type_common(&new_expression->right->type, &new_expression->right->type); + if ( !ctx->evaluation_is_disabled && object_has_constant_value(&new_expression->right->object)) + { + int vt = type_to_object_type(&new_expression->type); + switch (vt) + { + case 0 : + case 7 : + { + int a = object_to_signed_int(&new_expression->right->object); + if (op == 45) + { + new_expression->object = object_make_signed_int( -a); + } + else + { + new_expression->object = object_make_signed_int( +a); + } + } + break; + case 1 : + case 8 : + { + unsigned int a = object_to_unsigned_int(&new_expression->right->object); + if (op == 45) + { + new_expression->object = object_make_unsigned_int( -a); + } + else + { + new_expression->object = object_make_unsigned_int( +a); + } + } + break; + case 9 : + { + long long a = object_to_signed_long_long(&new_expression->right->object); + if (op == 45) + { + new_expression->object = object_make_signed_long_long( -a); + } + else + { + new_expression->object = object_make_signed_long_long( +a); + } + } + break; + case 10 : + { + unsigned long long a = object_to_unsigned_long_long(&new_expression->right->object); + if (op == 45) + { + new_expression->object = object_make_unsigned_long_long( -a); + } + else + { + new_expression->object = object_make_unsigned_long_long( +a); + } + } + break; + case 2 : + case 3 : + case 4 : + case 5 : + case 6 : + ; + expression_delete(new_expression); + goto _catch_label_1; + break; + case 11 : + { + float a = object_to_float(&new_expression->right->object); + if (op == 45) + { + new_expression->object = object_make_float( -a); + } + else + { + new_expression->object = object_make_float( +a); + } + } + break; + case 12 : + { + double a = object_to_double(&new_expression->right->object); + if (op == 45) + { + new_expression->object = object_make_double( -a); + } + else + { + new_expression->object = object_make_double( +a); + } + } + break; + case 13 : + { + long double a = object_to_long_double(&new_expression->right->object); + if (op == 45) + { + new_expression->object = object_make_long_double( -a); + } + else + { + new_expression->object = object_make_long_double( +a); + } + } + break; + } + ; + } + } + else + { + if (op == 42) + { + new_expression->expression_type = 32; + if ( !type_is_pointer_or_array(&new_expression->right->type)) + { + compiler_diagnostic_message(780, ctx, op_position, ((void *)0), "indirection requires pointer operand"); + } + if (type_is_pointer(&new_expression->right->type)) + { + new_expression->type = type_remove_pointer(&new_expression->right->type); + } + else + { + compiler_diagnostic_message(19, ctx, op_position, ((void *)0), "array indirection"); + new_expression->type = get_array_item_type(&new_expression->right->type); + } + } + else + { + if (op == 38) + { + new_expression->expression_type = 33; + if ( !expression_is_lvalue(new_expression->right)) + { + compiler_diagnostic_message(1220, ctx, new_expression->right->first_token, ((void *)0), "lvalue required as unary '&' operand"); + } + if (new_expression->right->type.storage_class_specifier_flags & 32) + { + char * variable_name = "?"; + if (new_expression->right->declarator && new_expression->right->declarator->name_opt) + { + variable_name = new_expression->right->declarator->name_opt->lexeme; + } + compiler_diagnostic_message(1220, ctx, new_expression->right->first_token, ((void *)0), "address of register variable 'x' requested", variable_name); + } + new_expression->type = type_add_pointer(&new_expression->right->type, ctx->options.null_checks_enabled); + new_expression->type.address_of = 1; + } + else + { + expression_delete(new_expression); + compiler_diagnostic_message(790, ctx, ctx->current, ((void *)0), "invalid token"); + goto _catch_label_1; + } + } + } + } + } + p_expression_node = new_expression; + } + else + { + if (ctx->current->type == 9030) + { + unsigned char disable_evaluation_copy = ctx->evaluation_is_disabled; + ctx->evaluation_is_disabled = 1; + parser_match(ctx); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + struct expression * new_expression = calloc(1, sizeof *new_expression); + if (new_expression == ((void *)0)) + { + goto _catch_label_1; + } + new_expression->first_token = ctx->current; + if (first_of_type_name_ahead(ctx)) + { + new_expression->expression_type = 19; + if (parser_match_tk(ctx, 40) != 0) + { + expression_delete(new_expression); + new_expression = ((void *)0); + goto _catch_label_1; + } + new_expression->type_name = type_name(ctx); + if (new_expression->type_name == ((void *)0)) + { + expression_delete(new_expression); + new_expression = ((void *)0); + goto _catch_label_1; + } + new_expression->type = make_size_t_type(); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + expression_delete(new_expression); + goto _catch_label_1; + } + new_expression->last_token = ctx->current; + if (parser_match_tk(ctx, 41) != 0) + { + expression_delete(new_expression); + goto _catch_label_1; + } + if (check_sizeof_argument(ctx, new_expression, &new_expression->type_name->type) != 0) + { + } + else + { + if (type_is_vla(&new_expression->type_name->abstract_declarator->type)) + { + } + else + { + new_expression->object = object_make_size_t(type_get_sizeof(&new_expression->type_name->abstract_declarator->type)); + } + } + } + else + { + new_expression->right = unary_expression(ctx); + if (new_expression->right == ((void *)0)) + { + ctx->evaluation_is_disabled = disable_evaluation_copy; + expression_delete(new_expression); + goto _catch_label_1; + } + new_expression->expression_type = 18; + if (check_sizeof_argument(ctx, new_expression->right, &new_expression->right->type) != 0) + { + expression_delete(new_expression); + goto _catch_label_1; + } + if (type_is_vla(&new_expression->right->type)) + { + } + else + { + new_expression->object = object_make_size_t(type_get_sizeof(&new_expression->right->type)); + } + } + type_destroy(&new_expression->type); + new_expression->type = type_make_size_t(); + p_expression_node = new_expression; + ctx->evaluation_is_disabled = disable_evaluation_copy; + } + else + { + if (ctx->current->type == 9031) + { + struct expression * new_expression = calloc(1, sizeof *new_expression); + if (new_expression == ((void *)0)) + { + goto _catch_label_1; + } + new_expression->first_token = ctx->current; + parser_match(ctx); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + expression_delete(new_expression); + goto _catch_label_1; + } + new_expression->expression_type = 20; + if (first_of_type_name_ahead(ctx)) + { + if (parser_match_tk(ctx, 40) != 0) + { + expression_delete(new_expression); + goto _catch_label_1; + } + new_expression->type_name = type_name(ctx); + if (new_expression->type_name == ((void *)0)) + { + expression_delete(new_expression); + goto _catch_label_1; + } + new_expression->type = make_size_t_type(); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + expression_delete(new_expression); + goto _catch_label_1; + } + new_expression->last_token = ctx->current; + if (parser_match_tk(ctx, 41) != 0) + { + expression_delete(new_expression); + goto _catch_label_1; + } + if ( !type_is_array(&new_expression->type_name->abstract_declarator->type)) + { + compiler_diagnostic_message(1390, ctx, new_expression->type_name->first_token, ((void *)0), "argument of _Lengthof must be an array"); + expression_delete(new_expression); + goto _catch_label_1; + } + int nelements = new_expression->type_name->abstract_declarator->type.num_of_elements; + if (nelements > 0) + { + new_expression->object = object_make_size_t(nelements); + } + } + else + { + if (parser_match_tk(ctx, 40) != 0) + { + expression_delete(new_expression); + new_expression = ((void *)0); + goto _catch_label_1; + } + unsigned char disable_evaluation_copy = ctx->evaluation_is_disabled; + ctx->evaluation_is_disabled = 1; + new_expression->right = unary_expression(ctx); + ctx->evaluation_is_disabled = disable_evaluation_copy; + if (new_expression->right == ((void *)0)) + { + expression_delete(new_expression); + goto _catch_label_1; + } + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + expression_delete(new_expression); + goto _catch_label_1; + } + new_expression->last_token = ctx->current; + if (parser_match_tk(ctx, 41) != 0) + { + expression_delete(new_expression); + goto _catch_label_1; + } + if ( !type_is_array(&new_expression->right->type)) + { + compiler_diagnostic_message(1390, ctx, new_expression->right->first_token, ((void *)0), "argument of _Lengthof must be an array"); + expression_delete(new_expression); + goto _catch_label_1; + } + int nelements = new_expression->right->type.num_of_elements; + if (nelements > 0) + { + new_expression->object = object_make_size_t(nelements); + } + else + { + } + } + type_destroy(&new_expression->type); + new_expression->type = type_make_size_t(); + p_expression_node = new_expression; + } + else + { + if (ctx->current->type == 9056) + { + struct expression * new_expression = calloc(1, sizeof *new_expression); + if (new_expression == ((void *)0)) + { + goto _catch_label_1; + } + new_expression->expression_type = 25; + new_expression->first_token = ctx->current; + parser_match(ctx); + if (ctx->current == ((void *)0) || parser_match_tk(ctx, 40) != 0) + { + expression_delete(new_expression); + new_expression = ((void *)0); + goto _catch_label_1; + } + new_expression->right = expression(ctx); + if (parser_match_tk(ctx, 41) != 0) + { + expression_delete(new_expression); + new_expression = ((void *)0); + goto _catch_label_1; + } + return new_expression; + } + else + { + if (ctx->current->type == 9044) + { + struct expression * new_expression = calloc(1, sizeof *new_expression); + if (new_expression == ((void *)0)) + { + goto _catch_label_1; + } + new_expression->expression_type = 24; + new_expression->first_token = ctx->current; + parser_match(ctx); + if (ctx->current == ((void *)0) || parser_match_tk(ctx, 40) != 0) + { + expression_delete(new_expression); + new_expression = ((void *)0); + goto _catch_label_1; + } + new_expression->type_name = type_name(ctx); + if (parser_match_tk(ctx, 41) != 0) + { + expression_delete(new_expression); + new_expression = ((void *)0); + goto _catch_label_1; + } + if ( !ctx->evaluation_is_disabled) + { + new_expression->object = object_make_size_t(type_get_alignof(&new_expression->type_name->type)); + } + new_expression->type = type_make_int(); + ; + new_expression->last_token = ctx->previous; + p_expression_node = new_expression; + } + else + { + if (ctx->current->type == 9074 || ctx->current->type == 9076 || ctx->current->type == 9075 || ctx->current->type == 9073 || ctx->current->type == 9077 || ctx->current->type == 9078 || ctx->current->type == 9080 || ctx->current->type == 9079 || ctx->current->type == 9081 || ctx->current->type == 9082) + { + unsigned char disable_evaluation_copy = ctx->evaluation_is_disabled; + ctx->evaluation_is_disabled = 1; + struct token * traits_token = ctx->current; + struct expression * new_expression = calloc(1, sizeof *new_expression); + if (new_expression == ((void *)0)) + { + goto _catch_label_1; + } + new_expression->first_token = ctx->current; + new_expression->expression_type = 21; + parser_match(ctx); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + expression_delete(new_expression); + new_expression = ((void *)0); + goto _catch_label_1; + } + struct type * p_type = ((void *)0); + if (first_of_type_name_ahead(ctx)) + { + if (parser_match_tk(ctx, 40) != 0) + { + expression_delete(new_expression); + new_expression = ((void *)0); + goto _catch_label_1; + } + new_expression->type_name = type_name(ctx); + if (new_expression->type_name == ((void *)0)) + { + expression_delete(new_expression); + new_expression = ((void *)0); + goto _catch_label_1; + } + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + expression_delete(new_expression); + new_expression = ((void *)0); + goto _catch_label_1; + } + new_expression->last_token = ctx->current; + if (parser_match_tk(ctx, 41) != 0) + { + expression_delete(new_expression); + new_expression = ((void *)0); + goto _catch_label_1; + } + p_type = &new_expression->type_name->abstract_declarator->type; + } + else + { + new_expression->right = unary_expression(ctx); + if (new_expression->right == ((void *)0)) + { + ctx->evaluation_is_disabled = disable_evaluation_copy; + expression_delete(new_expression); + goto _catch_label_1; + } + p_type = &new_expression->right->type; + if (ctx->previous == ((void *)0)) + { + expression_delete(new_expression); + new_expression = ((void *)0); + goto _catch_label_1; + } + new_expression->last_token = ctx->previous; + } + switch (traits_token->type) + { + case 9074 : + ; + new_expression->object = object_make_signed_int(expression_is_lvalue(new_expression->right)); + break; + case 9075 : + new_expression->object = object_make_signed_int(type_is_const(p_type)); + break; + case 9076 : + new_expression->object = object_make_signed_int(type_is_owner(p_type)); + break; + case 9073 : + new_expression->object = object_make_signed_int(type_is_pointer(p_type)); + break; + case 9078 : + new_expression->object = object_make_signed_int(type_is_function(p_type)); + break; + case 9077 : + new_expression->object = object_make_signed_int(type_is_array(p_type)); + break; + case 9080 : + new_expression->object = object_make_signed_int(type_is_arithmetic(p_type)); + break; + case 9079 : + new_expression->object = object_make_signed_int(type_is_scalar(p_type)); + break; + case 9081 : + new_expression->object = object_make_signed_int(type_is_floating_point(p_type)); + break; + case 9082 : + new_expression->object = object_make_signed_int(type_is_integer(p_type)); + break; + default: + ; + } + new_expression->type = type_make_int_bool_like(); + p_expression_node = new_expression; + ctx->evaluation_is_disabled = disable_evaluation_copy; + } + else + { + p_expression_node = postfix_expression(ctx); + if (p_expression_node == ((void *)0)) + { + goto _catch_label_1; + } + } + } + } + } + } + } + } + } + else _catch_label_1: + { + expression_delete(p_expression_node); + p_expression_node = ((void *)0); + } + return p_expression_node; +} + +struct object object_cast(int e, struct object * a); + +struct expression *cast_expression(struct parser_ctx * ctx) +{ + struct expression * p_expression_node = ((void *)0); + if (1) + { + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + if (first_of_type_name_ahead(ctx)) + { + p_expression_node = calloc(1, sizeof *p_expression_node); + if (p_expression_node == ((void *)0)) + { + goto _catch_label_1; + } + p_expression_node->first_token = ctx->current; + p_expression_node->expression_type = 34; + if (parser_match_tk(ctx, 40) != 0) + { + goto _catch_label_1; + } + p_expression_node->type_name = type_name(ctx); + if (p_expression_node->type_name == ((void *)0)) + { + expression_delete(p_expression_node); + p_expression_node = ((void *)0); + goto _catch_label_1; + } + p_expression_node->type = type_dup(&p_expression_node->type_name->type); + if (parser_match_tk(ctx, 41) != 0) + { + goto _catch_label_1; + } + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + if (ctx->current->type == 123) + { + struct expression * new_expression = postfix_expression_type_name(ctx, p_expression_node->type_name); + if (new_expression == ((void *)0)) + { + goto _catch_label_1; + } + p_expression_node->type_name = ((void *)0); + expression_delete(p_expression_node); + p_expression_node = new_expression; + } + else + { + if (is_first_of_unary_expression(ctx)) + { + p_expression_node->left = cast_expression(ctx); + if (p_expression_node->left == ((void *)0)) + { + expression_delete(p_expression_node); + p_expression_node = ((void *)0); + goto _catch_label_1; + } + if (p_expression_node->left->type.storage_class_specifier_flags & 8192 && type_is_owner(&p_expression_node->left->type)) + { + if ( !type_is_owner(&p_expression_node->type)) + { + if (type_is_pointer(&p_expression_node->left->type)) + { + compiler_diagnostic_message(25, ctx, p_expression_node->first_token, ((void *)0), "discarding _Owner pointer"); + } + else + { + compiler_diagnostic_message(25, ctx, p_expression_node->first_token, ((void *)0), "discarding _Owner"); + } + } + } + type_destroy(&p_expression_node->type); + p_expression_node->type = make_type_using_declarator(ctx, p_expression_node->type_name->abstract_declarator); + if ( !ctx->evaluation_is_disabled && object_has_constant_value(&p_expression_node->left->object)) + { + int vt = type_to_object_type(&p_expression_node->type); + p_expression_node->object = object_cast(vt, &p_expression_node->left->object); + } + p_expression_node->type.storage_class_specifier_flags = p_expression_node->left->type.storage_class_specifier_flags; + } + else + { + compiler_diagnostic_message(650, ctx, ctx->current, ((void *)0), "expected expression"); + } + } + } + else + { + if (is_first_of_unary_expression(ctx)) + { + p_expression_node = unary_expression(ctx); + if (p_expression_node == ((void *)0)) + { + goto _catch_label_1; + } + } + else + { + compiler_diagnostic_message(650, ctx, ctx->current, ((void *)0), "expected expression"); + ; + goto _catch_label_1; + } + } + if (ctx->current == ((void *)0) || ctx->previous == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + p_expression_node->last_token = ctx->previous; + } + else _catch_label_1: + { + expression_delete(p_expression_node); + p_expression_node = ((void *)0); + } + return p_expression_node; +} + +unsigned char signed_long_long_add(signed long long * result, signed long long a, signed long long b); +unsigned char signed_long_long_sub(signed long long * result, signed long long a, signed long long b); +unsigned char signed_long_long_mul(signed long long * result, signed long long a, signed long long b); +unsigned char unsigned_long_long_add(unsigned long long * result, unsigned long long a, unsigned long long b); +unsigned char unsigned_long_long_sub(unsigned long long * result, unsigned long long a, unsigned long long b); +unsigned char unsigned_long_long_mul(unsigned long long * result, unsigned long long a, unsigned long long b); + +int execute_arithmetic(struct parser_ctx * ctx, struct expression * new_expression, int op, struct object * result) +{ + struct type common_type = {0}; + if (1) + { + if (new_expression->left == ((void *)0) || new_expression->right == ((void *)0)) + { + ; + goto _catch_label_1; + } + struct object value = {0}; + switch (op) + { + case 43 : + case 45 : + case 42 : + case 47 : + case 37 : + case 62 : + case 60 : + case 15933 : + case 15421 : + case 15677 : + case 8509 : + break; + default: + ; + goto _catch_label_1; + } + if ( !type_is_arithmetic(&new_expression->left->type)) + { + compiler_diagnostic_message(840, ctx, ctx->current, ((void *)0), "left type must be an arithmetic type"); + goto _catch_label_1; + } + if ( !type_is_arithmetic(&new_expression->right->type)) + { + compiler_diagnostic_message(840, ctx, ctx->current, ((void *)0), "right type must be an arithmetic type"); + goto _catch_label_1; + } + if ( !ctx->evaluation_is_disabled && object_has_constant_value(&new_expression->left->object) && object_has_constant_value(&new_expression->right->object)) + { + struct marker m = {0, 0, 0, 0, 0, 0, 0}; + m.p_token_begin = new_expression->left->first_token; + m.p_token_end = new_expression->right->last_token; + common_type = type_common(&new_expression->left->type, &new_expression->right->type); + int vt = type_to_object_type(&common_type); + switch (vt) + { + case 0 : + case 7 : + { + int a = object_to_signed_int(&new_expression->left->object); + int b = object_to_signed_int(&new_expression->right->object); + if (op == 43) + { + int computed_result = a + b; + signed long long exact_result; + if (signed_long_long_add(&exact_result, a, b)) + { + if (computed_result != exact_result) + { + compiler_diagnostic_message(50, ctx, ((void *)0), &m, "integer overflow results in '%d'. Exactly result is '%lld'.", computed_result, exact_result); + } + } + else + { + ; + } + value = object_make_signed_int(computed_result); + } + else + { + if (op == 45) + { + int computed_result = a - b; + signed long long exact_result; + if (signed_long_long_sub(&exact_result, a, b)) + { + if (computed_result != exact_result) + { + compiler_diagnostic_message(50, ctx, ((void *)0), &m, "integer overflow results in '%d'. Exactly result is '%lld'.", computed_result, exact_result); + } + } + else + { + ; + } + value = object_make_signed_int(computed_result); + } + else + { + if (op == 42) + { + int computed_result = a * b; + signed long long exact_result; + if (signed_long_long_mul(&exact_result, a, b)) + { + if (computed_result != exact_result) + { + compiler_diagnostic_message(50, ctx, ((void *)0), &m, "integer overflow results in '%d'. Exactly result is '%lld'.", computed_result, exact_result); + } + } + else + { + ; + } + value = object_make_signed_int(computed_result); + } + else + { + if (op == 47) + { + if (b == 0) + { + compiler_diagnostic_message(36, ctx, new_expression->right->first_token, ((void *)0), "division by zero"); + } + else + { + value = object_make_signed_int(a / b); + } + } + else + { + if (op == 37) + { + if (b == 0) + { + compiler_diagnostic_message(36, ctx, new_expression->right->first_token, ((void *)0), "division by zero"); + } + else + { + value = object_make_signed_int(a % b); + } + } + else + { + if (op == 62) + { + value = object_make_signed_int(a > b); + } + else + { + if (op == 60) + { + value = object_make_signed_int(a < b); + } + else + { + if (op == 15933) + { + value = object_make_signed_int(a >= b); + } + else + { + if (op == 15421) + { + value = object_make_signed_int(a <= b); + } + else + { + if (op == 15677) + { + value = object_make_signed_int(a == b); + } + else + { + if (op == 8509) + { + value = object_make_signed_int(a != b); + } + } + } + } + } + } + } + } + } + } + } + } + break; + case 1 : + case 8 : + { + unsigned int a = object_to_unsigned_int(&new_expression->left->object); + unsigned int b = object_to_unsigned_int(&new_expression->right->object); + if (op == 43) + { + unsigned int computed_result = a + b; + unsigned long long exact_result; + if (unsigned_long_long_add(&exact_result, a, b)) + { + if (computed_result != exact_result) + { + compiler_diagnostic_message(50, ctx, ((void *)0), &m, "integer overflow results in '%d'. Exactly result is '%lld'.", computed_result, exact_result); + } + } + else + { + ; + } + value = object_make_signed_int(computed_result); + } + else + { + if (op == 45) + { + unsigned int computed_result = a - b; + unsigned long long exact_result; + if (unsigned_long_long_sub(&exact_result, a, b)) + { + if (computed_result != exact_result) + { + compiler_diagnostic_message(50, ctx, ((void *)0), &m, "integer overflow results in '%d'. Exactly result is '%lld'.", computed_result, exact_result); + } + } + else + { + ; + } + value = object_make_signed_int(computed_result); + } + else + { + if (op == 42) + { + unsigned int computed_result = a * b; + unsigned long long exact_result; + if (unsigned_long_long_mul(&exact_result, a, b)) + { + if (computed_result != exact_result) + { + compiler_diagnostic_message(50, ctx, ((void *)0), &m, "integer overflow results in '%d'. Exactly result is '%lld'.", computed_result, exact_result); + } + } + else + { + ; + } + value = object_make_signed_int(computed_result); + } + else + { + if (op == 47) + { + if (b == 0) + { + compiler_diagnostic_message(36, ctx, new_expression->right->first_token, ((void *)0), "division by zero"); + } + else + { + value = object_make_unsigned_int(a / b); + } + } + else + { + if (op == 37) + { + if (b == 0) + { + compiler_diagnostic_message(36, ctx, new_expression->right->first_token, ((void *)0), "division by zero"); + goto _catch_label_1; + } + value = object_make_unsigned_int(a % b); + } + else + { + if (op == 62) + { + value = object_make_signed_int(a > b); + } + else + { + if (op == 60) + { + value = object_make_signed_int(a < b); + } + else + { + if (op == 15933) + { + value = object_make_signed_int(a >= b); + } + else + { + if (op == 15421) + { + value = object_make_signed_int(a <= b); + } + else + { + if (op == 15677) + { + value = object_make_signed_int(a == b); + } + else + { + if (op == 8509) + { + value = object_make_signed_int(a != b); + } + } + } + } + } + } + } + } + } + } + } + } + break; + case 9 : + { + long long a = object_to_signed_long_long(&new_expression->left->object); + long long b = object_to_signed_long_long(&new_expression->right->object); + if (op == 43) + { + long long computed_result = a + b; + signed long long exact_result; + if ( !signed_long_long_add(&exact_result, a, b)) + { + compiler_diagnostic_message(50, ctx, ((void *)0), &m, "integer overflow results in '%dll'. ", computed_result); + } + value = object_make_signed_long_long(computed_result); + } + else + { + if (op == 45) + { + long long computed_result = a - b; + signed long long exact_result; + if ( !signed_long_long_sub(&exact_result, a, b)) + { + compiler_diagnostic_message(50, ctx, ((void *)0), &m, "integer overflow results in '%dll'.", computed_result); + } + value = object_make_signed_long_long(computed_result); + } + else + { + if (op == 42) + { + long long computed_result = a * b; + signed long long exact_result; + if ( !signed_long_long_mul(&exact_result, a, b)) + { + compiler_diagnostic_message(50, ctx, ((void *)0), &m, "integer overflow results in '%dll", computed_result); + } + value = object_make_signed_long_long(computed_result); + } + else + { + if (op == 47) + { + if (b == 0) + { + compiler_diagnostic_message(36, ctx, new_expression->right->first_token, ((void *)0), "division by zero"); + goto _catch_label_1; + } + value = object_make_signed_long_long(a / b); + } + else + { + if (op == 37) + { + if (b == 0) + { + compiler_diagnostic_message(36, ctx, new_expression->right->first_token, ((void *)0), "division by zero"); + goto _catch_label_1; + } + value = object_make_signed_long_long(a % b); + } + else + { + if (op == 62) + { + value = object_make_signed_int(a > b); + } + else + { + if (op == 60) + { + value = object_make_signed_int(a < b); + } + else + { + if (op == 15933) + { + value = object_make_signed_int(a >= b); + } + else + { + if (op == 15421) + { + value = object_make_signed_int(a <= b); + } + else + { + if (op == 15677) + { + value = object_make_signed_int(a == b); + } + else + { + if (op == 8509) + { + value = object_make_signed_int(a != b); + } + } + } + } + } + } + } + } + } + } + } + } + break; + case 10 : + { + unsigned long long a = object_to_unsigned_long(&new_expression->left->object); + unsigned long long b = object_to_unsigned_long(&new_expression->right->object); + if (op == 43) + { + value = object_make_unsigned_long_long(a + b); + } + else + { + if (op == 45) + { + value = object_make_unsigned_long_long(a - b); + } + else + { + if (op == 42) + { + value = object_make_unsigned_long_long(a * b); + } + else + { + if (op == 47) + { + if (b == 0) + { + compiler_diagnostic_message(36, ctx, new_expression->right->first_token, ((void *)0), "division by zero"); + goto _catch_label_1; + } + value = object_make_unsigned_long_long(a / b); + } + else + { + if (op == 37) + { + if (b == 0) + { + compiler_diagnostic_message(36, ctx, new_expression->right->first_token, ((void *)0), "division by zero"); + goto _catch_label_1; + } + value = object_make_unsigned_long_long(a % b); + } + else + { + if (op == 62) + { + value = object_make_signed_int(a > b); + } + else + { + if (op == 60) + { + value = object_make_signed_int(a < b); + } + else + { + if (op == 15933) + { + value = object_make_signed_int(a >= b); + } + else + { + if (op == 15421) + { + value = object_make_signed_int(a <= b); + } + else + { + if (op == 15677) + { + value = object_make_signed_int(a == b); + } + else + { + if (op == 8509) + { + value = object_make_signed_int(a != b); + } + } + } + } + } + } + } + } + } + } + } + } + break; + case 2 : + case 3 : + case 4 : + case 5 : + case 6 : + ; + goto _catch_label_1; + break; + case 11 : + { + float a = object_to_float(&new_expression->left->object); + float b = object_to_float(&new_expression->right->object); + if (op == 43) + { + value = object_make_float(a + b); + } + else + { + if (op == 45) + { + value = object_make_float(a - b); + } + else + { + if (op == 42) + { + value = object_make_float(a * b); + } + else + { + if (op == 47) + { + if (b == 0) + { + compiler_diagnostic_message(36, ctx, new_expression->right->first_token, ((void *)0), "division by zero"); + goto _catch_label_1; + } + value = object_make_float(a / b); + } + else + { + if (op == 37) + { + compiler_diagnostic_message(36, ctx, new_expression->right->first_token, ((void *)0), "'%': not valid as left operand has type 'float'"); + goto _catch_label_1; + } + else + { + if (op == 62) + { + value = object_make_signed_int(a > b); + } + else + { + if (op == 60) + { + value = object_make_signed_int(a < b); + } + else + { + if (op == 15933) + { + value = object_make_signed_int(a >= b); + } + else + { + if (op == 15421) + { + value = object_make_signed_int(a <= b); + } + else + { + if (op == 15677) + { + value = object_make_signed_int(a == b); + } + else + { + if (op == 8509) + { + value = object_make_signed_int(a != b); + } + } + } + } + } + } + } + } + } + } + } + } + break; + case 12 : + { + double a = object_to_double(&new_expression->left->object); + double b = object_to_double(&new_expression->right->object); + if (op == 43) + { + value = object_make_double(a + b); + } + else + { + if (op == 45) + { + value = object_make_double(a - b); + } + else + { + if (op == 42) + { + value = object_make_double(a * b); + } + else + { + if (op == 47) + { + if (b == 0) + { + compiler_diagnostic_message(36, ctx, new_expression->right->first_token, ((void *)0), "division by zero"); + } + else + { + value = object_make_double(a / b); + } + } + else + { + if (op == 37) + { + compiler_diagnostic_message(36, ctx, new_expression->right->first_token, ((void *)0), "'%': not valid as left operand has type 'float'"); + goto _catch_label_1; + } + else + { + if (op == 62) + { + value = object_make_signed_int(a > b); + } + else + { + if (op == 60) + { + value = object_make_signed_int(a < b); + } + else + { + if (op == 15933) + { + value = object_make_signed_int(a >= b); + } + else + { + if (op == 15421) + { + value = object_make_signed_int(a <= b); + } + else + { + if (op == 15677) + { + value = object_make_signed_int(a == b); + } + else + { + if (op == 8509) + { + value = object_make_signed_int(a != b); + } + } + } + } + } + } + } + } + } + } + } + } + break; + case 13 : + { + long double a = object_to_long_double(&new_expression->left->object); + long double b = object_to_long_double(&new_expression->right->object); + if (op == 43) + { + value = object_make_long_double(a + b); + } + else + { + if (op == 45) + { + value = object_make_long_double(a - b); + } + else + { + if (op == 42) + { + value = object_make_long_double(a * b); + } + else + { + if (op == 47) + { + if (b == 0) + { + compiler_diagnostic_message(36, ctx, new_expression->right->first_token, ((void *)0), "division by zero"); + } + else + { + value = object_make_long_double(a / b); + } + } + else + { + if (op == 37) + { + compiler_diagnostic_message(36, ctx, new_expression->right->first_token, ((void *)0), "'%': not valid as left operand has type 'float'"); + goto _catch_label_1; + } + else + { + if (op == 62) + { + value = object_make_signed_int(a > b); + } + else + { + if (op == 60) + { + value = object_make_signed_int(a < b); + } + else + { + if (op == 15933) + { + value = object_make_signed_int(a >= b); + } + else + { + if (op == 15421) + { + value = object_make_signed_int(a <= b); + } + else + { + if (op == 15677) + { + value = object_make_signed_int(a == b); + } + else + { + if (op == 8509) + { + value = object_make_signed_int(a != b); + } + } + } + } + } + } + } + } + } + } + } + } + break; + } + ; + } + type_destroy(&common_type); + *result = value; + return 0; + } + else _catch_label_1: + { + } + type_destroy(&common_type); + struct object empty = {0}; + *result = empty; + return 1; +} + +struct expression *multiplicative_expression(struct parser_ctx * ctx) +{ + struct expression * p_expression_node = ((void *)0); + if (1) + { + p_expression_node = cast_expression(ctx); + if (p_expression_node == ((void *)0)) + { + goto _catch_label_1; + } + while (ctx->current != ((void *)0) && (ctx->current->type == 42 || ctx->current->type == 47 || ctx->current->type == 37)) + { + struct expression * new_expression = calloc(1, sizeof *new_expression); + if (new_expression == ((void *)0)) + { + expression_delete(p_expression_node); + p_expression_node = ((void *)0); + goto _catch_label_1; + } + new_expression->first_token = ctx->current; + int op = ctx->current->type; + parser_match(ctx); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + expression_delete(new_expression); + goto _catch_label_1; + } + switch (op) + { + case 42 : + new_expression->expression_type = 35; + break; + case 47 : + new_expression->expression_type = 36; + break; + case 37 : + new_expression->expression_type = 37; + break; + default: + ; + break; + } + new_expression->left = p_expression_node; + p_expression_node = ((void *)0); + new_expression->right = cast_expression(ctx); + if (new_expression->right == ((void *)0)) + { + expression_delete(new_expression); + goto _catch_label_1; + } + new_expression->last_token = new_expression->right->last_token; + new_expression->type = type_common(&new_expression->left->type, &new_expression->right->type); + if (execute_arithmetic(ctx, new_expression, op, &new_expression->object) != 0) + { + expression_delete(new_expression); + goto _catch_label_1; + } + p_expression_node = new_expression; + } + } + else _catch_label_1: + { + expression_delete(p_expression_node); + p_expression_node = ((void *)0); + } + return p_expression_node; +} + +struct expression *additive_expression(struct parser_ctx * ctx) +{ + struct expression * p_expression_node = ((void *)0); + if (1) + { + p_expression_node = multiplicative_expression(ctx); + if (p_expression_node == ((void *)0)) + { + goto _catch_label_1; + } + while (ctx->current != ((void *)0) && (ctx->current->type == 43 || ctx->current->type == 45)) + { + struct token * operator_position = ctx->current; + struct expression * new_expression = calloc(1, sizeof *new_expression); + if (new_expression == ((void *)0)) + { + compiler_diagnostic_message(1260, ctx, ctx->current, ((void *)0), "_Out of mem"); + goto _catch_label_1; + } + new_expression->first_token = ctx->current; + int op = ctx->current->type; + parser_match(ctx); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + expression_delete(new_expression); + new_expression = ((void *)0); + goto _catch_label_1; + } + new_expression->left = p_expression_node; + p_expression_node = ((void *)0); + new_expression->right = multiplicative_expression(ctx); + if (new_expression->right == ((void *)0)) + { + expression_delete(new_expression); + new_expression = ((void *)0); + goto _catch_label_1; + } + new_expression->last_token = new_expression->right->last_token; + if ( !type_is_scalar(&new_expression->left->type) && !type_is_array(&new_expression->left->type)) + { + compiler_diagnostic_message(870, ctx, operator_position, ((void *)0), "left operator is not scalar"); + } + if ( !type_is_scalar(&new_expression->right->type) && !type_is_array(&new_expression->right->type)) + { + compiler_diagnostic_message(880, ctx, operator_position, ((void *)0), "right operator is not scalar"); + } + unsigned char b_left_is_arithmetic = type_is_arithmetic(&new_expression->left->type); + unsigned char b_right_is_arithmetic = type_is_arithmetic(&new_expression->right->type); + int left_category = type_get_category(&new_expression->left->type); + int right_category = type_get_category(&new_expression->right->type); + if (op == 43) + { + new_expression->expression_type = 38; + if (b_left_is_arithmetic && b_right_is_arithmetic) + { + new_expression->type = type_common(&new_expression->left->type, &new_expression->right->type); + if (execute_arithmetic(ctx, new_expression, op, &new_expression->object) != 0) + { + expression_delete(new_expression); + goto _catch_label_1; + } + } + else + { + if (left_category == 3 || left_category == 2) + { + if (type_is_integer(&new_expression->right->type)) + { + if (left_category == 2) + { + struct type t = get_array_item_type(&new_expression->left->type); + new_expression->type = type_add_pointer(&t, ctx->options.null_checks_enabled); + type_destroy(&t); + } + else + { + new_expression->type = type_dup(&new_expression->left->type); + } + } + else + { + compiler_diagnostic_message(850, ctx, ctx->current, ((void *)0), "expected integer type on right"); + } + } + else + { + if (right_category == 3 || right_category == 2) + { + if (type_is_integer(&new_expression->left->type)) + { + if (right_category == 2) + { + new_expression->type = get_array_item_type(&new_expression->right->type); + } + else + { + new_expression->type = type_dup(&new_expression->right->type); + } + } + else + { + compiler_diagnostic_message(840, ctx, ctx->current, ((void *)0), "expected integer type on left"); + } + } + else + { + compiler_diagnostic_message(860, ctx, ctx->current, ((void *)0), "invalid types additive expression"); + } + } + } + } + else + { + if (op == 45) + { + new_expression->expression_type = 39; + if (b_left_is_arithmetic && b_right_is_arithmetic) + { + new_expression->type = type_common(&new_expression->left->type, &new_expression->right->type); + if (execute_arithmetic(ctx, new_expression, op, &new_expression->object) != 0) + { + expression_delete(new_expression); + goto _catch_label_1; + } + } + else + { + if (left_category == 3 || left_category == 2) + { + if (right_category == 3 || right_category == 2) + { + struct type t1 = type_lvalue_conversion(&new_expression->left->type, ctx->options.null_checks_enabled); + struct type t2 = type_lvalue_conversion(&new_expression->right->type, ctx->options.null_checks_enabled); + if ( !type_is_same(&t1, &t2, 0)) + { + compiler_diagnostic_message(890, ctx, ctx->current, ((void *)0), "incompatible pointer types"); + } + new_expression->type = type_make_int(); + type_destroy(&t1); + type_destroy(&t2); + } + else + { + if (type_is_integer(&new_expression->right->type)) + { + new_expression->type = type_dup(&new_expression->left->type); + } + else + { + compiler_diagnostic_message(850, ctx, ctx->current, ((void *)0), "right must be integer type"); + } + } + } + else + { + compiler_diagnostic_message(860, ctx, ctx->current, ((void *)0), "invalid types for operator -"); + } + } + } + } + p_expression_node = new_expression; + new_expression = ((void *)0); + } + } + else _catch_label_1: + { + expression_delete(p_expression_node); + p_expression_node = ((void *)0); + } + return p_expression_node; +} + +static int execute_bitwise_operator(struct parser_ctx * ctx, struct expression * new_expression, int op); + +struct expression *shift_expression(struct parser_ctx * ctx) +{ + struct expression * p_expression_node = ((void *)0); + if (1) + { + p_expression_node = additive_expression(ctx); + if (p_expression_node == ((void *)0)) + { + goto _catch_label_1; + } + while (ctx->current != ((void *)0) && (ctx->current->type == 15934 || ctx->current->type == 15420)) + { + struct expression * new_expression = calloc(1, sizeof *new_expression); + if (new_expression == ((void *)0)) + { + goto _catch_label_1; + } + new_expression->first_token = ctx->current; + int op = ctx->current->type; + parser_match(ctx); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + expression_delete(new_expression); + new_expression = ((void *)0); + goto _catch_label_1; + } + new_expression->left = p_expression_node; + p_expression_node = ((void *)0); + new_expression->right = multiplicative_expression(ctx); + if (new_expression->right == ((void *)0)) + { + expression_delete(new_expression); + goto _catch_label_1; + } + new_expression->last_token = new_expression->right->last_token; + if (op == 15934) + { + new_expression->expression_type = 40; + } + else + { + if (op == 15420) + { + new_expression->expression_type = 41; + } + } + if (execute_bitwise_operator(ctx, new_expression, op) != 0) + { + expression_delete(new_expression); + goto _catch_label_1; + } + p_expression_node = new_expression; + } + } + else _catch_label_1: + { + expression_delete(p_expression_node); + p_expression_node = ((void *)0); + } + return p_expression_node; +} + +void check_comparison(struct parser_ctx * ctx, struct expression * p_a_expression, struct expression * p_b_expression, struct token * op_token); + +struct expression *relational_expression(struct parser_ctx * ctx) +{ + struct expression * p_expression_node = ((void *)0); + struct expression * new_expression = ((void *)0); + if (1) + { + p_expression_node = shift_expression(ctx); + if (p_expression_node == ((void *)0)) + { + goto _catch_label_1; + } + while (ctx->current != ((void *)0) && (ctx->current->type == 62 || ctx->current->type == 60 || ctx->current->type == 15933 || ctx->current->type == 15421)) + { + ; + new_expression = calloc(1, sizeof *new_expression); + if (new_expression == ((void *)0)) + { + goto _catch_label_1; + } + new_expression->first_token = ctx->current; + int op = ctx->current->type; + parser_match(ctx); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + new_expression->left = p_expression_node; + p_expression_node = ((void *)0); + new_expression->right = shift_expression(ctx); + if (new_expression->right == ((void *)0)) + { + expression_delete(new_expression); + new_expression = ((void *)0); + goto _catch_label_1; + } + new_expression->last_token = new_expression->right->last_token; + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + expression_delete(new_expression); + new_expression = ((void *)0); + goto _catch_label_1; + } + check_comparison(ctx, new_expression->left, new_expression->right, ctx->current); + if (op == 62) + { + new_expression->expression_type = 42; + } + else + { + if (op == 60) + { + new_expression->expression_type = 43; + } + else + { + if (op == 15933) + { + new_expression->expression_type = 44; + } + else + { + if (op == 15421) + { + new_expression->expression_type = 45; + } + } + } + } + if (type_is_arithmetic(&new_expression->left->type) && type_is_arithmetic(&new_expression->right->type)) + { + new_expression->type = type_common(&new_expression->left->type, &new_expression->right->type); + if (execute_arithmetic(ctx, new_expression, op, &new_expression->object) != 0) + { + expression_delete(new_expression); + new_expression = ((void *)0); + goto _catch_label_1; + } + } + type_destroy(&new_expression->type); + new_expression->type = type_make_int_bool_like(); + p_expression_node = new_expression; + new_expression = ((void *)0); + } + } + else _catch_label_1: + { + expression_delete(new_expression); + expression_delete(p_expression_node); + p_expression_node = ((void *)0); + } + return p_expression_node; +} + +struct enum_specifier *get_complete_enum_specifier(struct enum_specifier * p_enum_specifier); +int snprintf(char * _Buffer, unsigned int _BufferCount, char * _Format, ...); + +void check_diferent_enuns(struct parser_ctx * ctx, struct token * operator_token, struct expression * left, struct expression * right, char * message) +{ + if (left->type.type_specifier_flags & 65536 && right->type.type_specifier_flags & 65536) + { + ; + ; + if (get_complete_enum_specifier(left->type.enum_specifier) != get_complete_enum_specifier(right->type.enum_specifier)) + { + ; + ; + char * lefttag = ""; + if (left->type.enum_specifier->tag_token) + { + lefttag = left->type.enum_specifier->tag_token->lexeme; + } + char * righttag = ""; + if (right->type.enum_specifier->tag_token) + { + righttag = right->type.enum_specifier->tag_token->lexeme; + } + char finalmessage[200] = {0}; + snprintf(finalmessage, sizeof finalmessage, "%s (enum %s, enum %s)", message, lefttag, righttag); + compiler_diagnostic_message(3, ctx, operator_token, ((void *)0), finalmessage, lefttag, righttag); + } + } +} + +void expression_evaluate_equal_not_equal(struct expression * left, struct expression * right, struct expression * result, int op, unsigned char disabled) +{ + ; +} + +struct expression *equality_expression(struct parser_ctx * ctx) +{ + struct expression * p_expression_node = ((void *)0); + struct expression * new_expression = ((void *)0); + if (1) + { + p_expression_node = relational_expression(ctx); + if (p_expression_node == ((void *)0)) + { + goto _catch_label_1; + } + while (ctx->current != ((void *)0) && (ctx->current->type == 15677 || ctx->current->type == 8509)) + { + ; + new_expression = calloc(1, sizeof *new_expression); + if (new_expression == ((void *)0)) + { + goto _catch_label_1; + } + new_expression->first_token = ctx->current; + struct token * operator_token = ctx->current; + parser_match(ctx); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + if (operator_token->type == 15677) + { + new_expression->expression_type = 46; + } + else + { + new_expression->expression_type = 47; + } + new_expression->left = p_expression_node; + p_expression_node = ((void *)0); + new_expression->right = relational_expression(ctx); + if (new_expression->right == ((void *)0)) + { + goto _catch_label_1; + } + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + check_comparison(ctx, new_expression->left, new_expression->right, ctx->current); + new_expression->last_token = new_expression->right->last_token; + new_expression->first_token = operator_token; + if (type_is_arithmetic(&new_expression->left->type) && type_is_arithmetic(&new_expression->right->type)) + { + if (execute_arithmetic(ctx, new_expression, operator_token->type, &new_expression->object) != 0) + { + goto _catch_label_1; + } + } + new_expression->type = type_make_int_bool_like(); + p_expression_node = new_expression; + new_expression = ((void *)0); + } + } + else _catch_label_1: + { + expression_delete(p_expression_node); + p_expression_node = ((void *)0); + } + expression_delete(new_expression); + return p_expression_node; +} + +struct expression *and_expression(struct parser_ctx * ctx) +{ + struct expression * p_expression_node = ((void *)0); + struct expression * new_expression = ((void *)0); + if (1) + { + p_expression_node = equality_expression(ctx); + if (p_expression_node == ((void *)0)) + { + goto _catch_label_1; + } + while (ctx->current != ((void *)0) && ctx->current->type == 38) + { + parser_match(ctx); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + ; + new_expression = calloc(1, sizeof *new_expression); + if (new_expression == ((void *)0)) + { + goto _catch_label_1; + } + new_expression->first_token = ctx->current; + new_expression->expression_type = 48; + new_expression->left = p_expression_node; + p_expression_node = ((void *)0); + new_expression->right = equality_expression(ctx); + if (new_expression->right == ((void *)0)) + { + goto _catch_label_1; + } + new_expression->last_token = new_expression->right->last_token; + if (execute_bitwise_operator(ctx, new_expression, 38) != 0) + { + goto _catch_label_1; + } + p_expression_node = new_expression; + new_expression = ((void *)0); + } + } + else _catch_label_1: + { + expression_delete(p_expression_node); + p_expression_node = ((void *)0); + } + expression_delete(new_expression); + return p_expression_node; +} + +struct expression *exclusive_or_expression(struct parser_ctx * ctx) +{ + struct expression * p_expression_node = ((void *)0); + struct expression * new_expression = ((void *)0); + if (1) + { + p_expression_node = and_expression(ctx); + if (p_expression_node == ((void *)0)) + { + goto _catch_label_1; + } + while (ctx->current != ((void *)0) && (ctx->current->type == 94)) + { + parser_match(ctx); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + ; + new_expression = calloc(1, sizeof *new_expression); + if (new_expression == ((void *)0)) + { + goto _catch_label_1; + } + new_expression->first_token = ctx->current; + new_expression->expression_type = 49; + new_expression->left = p_expression_node; + p_expression_node = ((void *)0); + new_expression->right = and_expression(ctx); + if (new_expression->right == ((void *)0)) + { + goto _catch_label_1; + } + new_expression->last_token = new_expression->right->last_token; + if (execute_bitwise_operator(ctx, new_expression, 94) != 0) + { + goto _catch_label_1; + } + p_expression_node = new_expression; + new_expression = ((void *)0); + } + } + else _catch_label_1: + { + expression_delete(p_expression_node); + p_expression_node = ((void *)0); + } + expression_delete(new_expression); + return p_expression_node; +} + +static int execute_bitwise_operator(struct parser_ctx * ctx, struct expression * new_expression, int op) +{ + if (1) + { + switch (op) + { + case 38 : + case 94 : + case 124 : + case 15934 : + case 15420 : + break; + default: + ; + goto _catch_label_1; + } + if ( !type_is_integer(&new_expression->left->type)) + { + compiler_diagnostic_message(840, ctx, ctx->current, ((void *)0), "left type must be an integer type"); + goto _catch_label_1; + } + if ( !type_is_integer(&new_expression->right->type)) + { + compiler_diagnostic_message(840, ctx, ctx->current, ((void *)0), "right type must be an integer type"); + goto _catch_label_1; + } + type_destroy(&new_expression->type); + new_expression->type = type_common(&new_expression->left->type, &new_expression->right->type); + if ( !ctx->evaluation_is_disabled && object_has_constant_value(&new_expression->left->object) && object_has_constant_value(&new_expression->right->object)) + { + int vt = type_to_object_type(&new_expression->type); + switch (vt) + { + case 0 : + case 7 : + { + int a = object_to_signed_int(&new_expression->left->object); + int b = object_to_signed_int(&new_expression->right->object); + int r = 0; + if (op == 124) + { + r = a | b; + } + else + { + if (op == 94) + { + r = a ^ b; + } + else + { + if (op == 38) + { + r = a & b; + } + else + { + if (op == 15934) + { + r = a >> b; + } + else + { + if (op == 15420) + { + r = a << b; + } + } + } + } + } + new_expression->object = object_make_signed_int(r); + } + break; + case 1 : + case 8 : + { + unsigned int a = object_to_unsigned_int(&new_expression->left->object); + unsigned int b = object_to_unsigned_int(&new_expression->right->object); + int r = 0; + if (op == 124) + { + r = a | b; + } + else + { + if (op == 94) + { + r = a ^ b; + } + else + { + if (op == 38) + { + r = a & b; + } + else + { + if (op == 15934) + { + r = a >> b; + } + else + { + if (op == 15420) + { + r = a << b; + } + } + } + } + } + new_expression->object = object_make_unsigned_int(r); + } + break; + case 9 : + { + long long a = object_to_signed_long(&new_expression->left->object); + long long b = object_to_signed_long(&new_expression->right->object); + long long r = 0; + if (op == 124) + { + r = a | b; + } + else + { + if (op == 94) + { + r = a ^ b; + } + else + { + if (op == 38) + { + r = a & b; + } + else + { + if (op == 15934) + { + r = a >> b; + } + else + { + if (op == 15420) + { + r = a << b; + } + } + } + } + } + new_expression->object = object_make_signed_long_long(r); + } + break; + case 10 : + { + unsigned long long a = object_to_unsigned_long(&new_expression->left->object); + unsigned long long b = object_to_unsigned_long(&new_expression->right->object); + unsigned long long r = 0; + if (op == 124) + { + r = a | b; + } + else + { + if (op == 94) + { + r = a ^ b; + } + else + { + if (op == 38) + { + r = a & b; + } + else + { + if (op == 15934) + { + r = a >> b; + } + else + { + if (op == 15420) + { + r = a << b; + } + } + } + } + } + new_expression->object = object_make_unsigned_long_long(r); + } + break; + case 2 : + case 3 : + case 4 : + case 5 : + case 6 : + ; + goto _catch_label_1; + break; + case 11 : + case 12 : + case 13 : + ; + goto _catch_label_1; + break; + } + ; + } + return 0; + } + else _catch_label_1: + { + } + return 1; +} + +struct expression *inclusive_or_expression(struct parser_ctx * ctx) +{ + struct expression * p_expression_node = ((void *)0); + if (1) + { + p_expression_node = exclusive_or_expression(ctx); + if (p_expression_node == ((void *)0)) + { + goto _catch_label_1; + } + while (ctx->current != ((void *)0) && (ctx->current->type == 124)) + { + struct token * operator_token = ctx->current; + parser_match(ctx); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + struct expression * new_expression = calloc(1, sizeof *new_expression); + if (new_expression == ((void *)0)) + { + goto _catch_label_1; + } + new_expression->first_token = ctx->current; + new_expression->expression_type = 50; + new_expression->left = p_expression_node; + p_expression_node = ((void *)0); + new_expression->right = exclusive_or_expression(ctx); + if (new_expression->right == ((void *)0)) + { + expression_delete(new_expression); + goto _catch_label_1; + } + check_diferent_enuns(ctx, operator_token, new_expression->left, new_expression->right, "operator '|' between enumerations of different types."); + new_expression->last_token = new_expression->right->last_token; + if (execute_bitwise_operator(ctx, new_expression, 124) != 0) + { + expression_delete(new_expression); + goto _catch_label_1; + } + p_expression_node = new_expression; + } + } + else _catch_label_1: + { + expression_delete(p_expression_node); + p_expression_node = ((void *)0); + } + return p_expression_node; +} + +struct expression *logical_and_expression(struct parser_ctx * ctx) +{ + struct expression * p_expression_node = ((void *)0); + if (1) + { + p_expression_node = inclusive_or_expression(ctx); + if (p_expression_node == ((void *)0)) + { + goto _catch_label_1; + } + while (ctx->current != ((void *)0) && (ctx->current->type == 9766)) + { + parser_match(ctx); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + struct expression * new_expression = calloc(1, sizeof *new_expression); + if (new_expression == ((void *)0)) + { + goto _catch_label_1; + } + new_expression->first_token = ctx->current; + new_expression->expression_type = 52; + new_expression->left = p_expression_node; + p_expression_node = ((void *)0); + new_expression->right = inclusive_or_expression(ctx); + if (new_expression->right == ((void *)0)) + { + expression_delete(new_expression); + goto _catch_label_1; + } + new_expression->last_token = new_expression->right->last_token; + if ( !ctx->evaluation_is_disabled && object_has_constant_value(&new_expression->left->object) && object_has_constant_value(&new_expression->right->object)) + { + unsigned char a = object_to_bool(&new_expression->left->object); + unsigned char b = object_to_bool(&new_expression->right->object); + new_expression->object = object_make_signed_int(a && b); + } + if ( !type_is_scalar(&new_expression->left->type)) + { + expression_delete(new_expression); + compiler_diagnostic_message(870, ctx, ctx->current, ((void *)0), "left type is not scalar for or expression"); + goto _catch_label_1; + } + if ( !type_is_scalar(&new_expression->right->type)) + { + expression_delete(new_expression); + compiler_diagnostic_message(880, ctx, ctx->current, ((void *)0), "right type is not scalar for or expression"); + goto _catch_label_1; + } + new_expression->type = type_make_int_bool_like(); + p_expression_node = new_expression; + } + } + else _catch_label_1: + { + expression_delete(p_expression_node); + p_expression_node = ((void *)0); + } + return p_expression_node; +} + +struct expression *logical_or_expression(struct parser_ctx * ctx) +{ + struct expression * p_expression_node = ((void *)0); + if (1) + { + p_expression_node = logical_and_expression(ctx); + if (p_expression_node == ((void *)0)) + { + goto _catch_label_1; + } + while (ctx->current != ((void *)0) && (ctx->current->type == 31868)) + { + parser_match(ctx); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + struct expression * new_expression = calloc(1, sizeof *new_expression); + if (new_expression == ((void *)0)) + { + goto _catch_label_1; + } + new_expression->first_token = ctx->current; + new_expression->expression_type = 51; + new_expression->left = p_expression_node; + p_expression_node = ((void *)0); + new_expression->right = logical_and_expression(ctx); + if (new_expression->right == ((void *)0)) + { + expression_delete(new_expression); + goto _catch_label_1; + } + new_expression->last_token = new_expression->right->last_token; + if ( !ctx->evaluation_is_disabled && object_has_constant_value(&new_expression->left->object) && object_has_constant_value(&new_expression->right->object)) + { + unsigned char a = object_to_bool(&new_expression->left->object); + unsigned char b = object_to_bool(&new_expression->right->object); + new_expression->object = object_make_signed_int(a || b); + } + if ( !type_is_scalar(&new_expression->left->type)) + { + expression_delete(new_expression); + compiler_diagnostic_message(870, ctx, ctx->current, ((void *)0), "left type is not scalar for or expression"); + goto _catch_label_1; + } + if ( !type_is_scalar(&new_expression->right->type)) + { + expression_delete(new_expression); + compiler_diagnostic_message(880, ctx, ctx->current, ((void *)0), "right type is not scalar for or expression"); + goto _catch_label_1; + } + new_expression->type = type_make_int_bool_like(); + p_expression_node = new_expression; + } + } + else _catch_label_1: + { + expression_delete(p_expression_node); + p_expression_node = ((void *)0); + } + return p_expression_node; +} + +struct expression *conditional_expression(struct parser_ctx * ctx); + +struct expression *assignment_expression(struct parser_ctx * ctx) +{ + struct expression * p_expression_node = ((void *)0); + if (1) + { + p_expression_node = conditional_expression(ctx); + if (p_expression_node == ((void *)0)) + { + goto _catch_label_1; + } + ; + while (ctx->current != ((void *)0) && (ctx->current->type == 61 || ctx->current->type == 10813 || ctx->current->type == 12093 || ctx->current->type == 9533 || ctx->current->type == 11069 || ctx->current->type == 11581 || ctx->current->type == 15421 || ctx->current->type == 15933 || ctx->current->type == 9789 || ctx->current->type == 24125 || ctx->current->type == 31805)) + { + struct token * op_token = ctx->current; + parser_match(ctx); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + struct expression * new_expression = calloc(1, sizeof *new_expression); + if (new_expression == ((void *)0)) + { + goto _catch_label_1; + } + new_expression->first_token = ctx->current; + new_expression->expression_type = 53; + new_expression->left = p_expression_node; + p_expression_node = ((void *)0); + struct marker left_operand_marker = {0, 0, 0, 0, 0, 0, 0}; + left_operand_marker.p_token_begin = new_expression->left->first_token; + left_operand_marker.p_token_end = new_expression->left->last_token; + if (type_is_function(&new_expression->left->type)) + { + compiler_diagnostic_message(900, ctx, ((void *)0), &left_operand_marker, "assignment of function"); + } + else + { + if (type_is_array(&new_expression->left->type)) + { + if (new_expression->left->type.storage_class_specifier_flags & 2048) + { + compiler_diagnostic_message(42, ctx, ((void *)0), &left_operand_marker, "assignment to array parameter"); + } + else + { + compiler_diagnostic_message(910, ctx, ((void *)0), &left_operand_marker, "assignment to expression with array type"); + } + } + } + if (type_is_const(&new_expression->left->type)) + { + compiler_diagnostic_message(920, ctx, ((void *)0), &left_operand_marker, "assignment of read-only object"); + } + if ( !expression_is_lvalue(new_expression->left)) + { + compiler_diagnostic_message(1230, ctx, ((void *)0), &left_operand_marker, "lvalue required as left operand of assignment"); + } + new_expression->right = assignment_expression(ctx); + if (new_expression->right == ((void *)0)) + { + expression_delete(new_expression); + goto _catch_label_1; + } + if (op_token->type == 61) + { + check_assigment(ctx, &new_expression->left->type, new_expression->right, 2); + } + new_expression->last_token = new_expression->right->last_token; + new_expression->type = type_dup(&new_expression->left->type); + new_expression->type.storage_class_specifier_flags = ~8192; + new_expression->type.storage_class_specifier_flags = ~16384; + check_diferent_enuns(ctx, op_token, new_expression->left, new_expression->right, "assignment of different enums."); + new_expression->left->is_assignment_expression = 1; + if (new_expression->left->left) + { + new_expression->left->left->is_assignment_expression = 1; + } + p_expression_node = new_expression; + } + } + else _catch_label_1: + { + expression_delete(p_expression_node); + p_expression_node = ((void *)0); + } + return p_expression_node; +} + +void argument_expression_list_push(struct argument_expression_list * list, struct argument_expression * pitem) +{ + if (list->head == ((void *)0)) + { + list->head = pitem; + } + else + { + ; + ; + list->tail->next = pitem; + } + list->tail = pitem; +} + +void argument_expression_list_destroy(struct argument_expression_list * p) +{ + struct argument_expression * item = p->head; + while (item) + { + struct argument_expression * next = item->next; + item->next = ((void *)0); + argument_expression_delete(item); + item = next; + } +} + +unsigned char expression_is_malloc(struct expression * p) +{ + if (p->expression_type == 12 && p->left && p->left->declarator && p->left->declarator->name_opt) + { + if (strcmp(p->left->declarator->name_opt->lexeme, "malloc") == 0) + { + return 1; + } + } + return 0; +} + +unsigned char expression_is_calloc(struct expression * p) +{ + if (p->expression_type == 12 && p->left && p->left->declarator && p->left->declarator->name_opt) + { + if (strcmp(p->left->declarator->name_opt->lexeme, "calloc") == 0) + { + return 1; + } + } + return 0; +} + +void compound_statement_delete(struct compound_statement * p); +void braced_initializer_delete(struct braced_initializer * p); + +void expression_delete(struct expression * p) +{ + if (p) + { + expression_delete(p->condition_expr); + compound_statement_delete(p->compound_statement); + type_name_delete(p->type_name); + expression_delete(p->right); + expression_delete(p->left); + braced_initializer_delete(p->braced_initializer); + generic_selection_delete(p->generic_selection); + type_destroy(&p->type); + argument_expression_list_destroy(&p->argument_expression_list); + free(p); + } +} + +struct expression *expression(struct parser_ctx * ctx) +{ + struct expression * p_expression_node = ((void *)0); + if (1) + { + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + p_expression_node = assignment_expression(ctx); + if (p_expression_node == ((void *)0)) + { + goto _catch_label_1; + } + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + if (ctx->current->type == 44) + { + while (ctx->current->type == 44) + { + parser_match(ctx); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + struct expression * p_expression_node_new = calloc(1, sizeof *p_expression_node_new); + if (p_expression_node_new == ((void *)0)) + { + goto _catch_label_1; + } + p_expression_node_new->first_token = ctx->current; + p_expression_node_new->expression_type = 54; + p_expression_node_new->left = p_expression_node; + p_expression_node = ((void *)0); + p_expression_node_new->right = expression(ctx); + if (p_expression_node_new->right == ((void *)0)) + { + expression_delete(p_expression_node_new); + goto _catch_label_1; + } + p_expression_node_new->left->last_token = p_expression_node_new->right->last_token; + p_expression_node = p_expression_node_new; + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + } + type_destroy(&p_expression_node->type); + p_expression_node->type = type_dup(&p_expression_node->right->type); + } + } + else _catch_label_1: + { + expression_delete(p_expression_node); + p_expression_node = ((void *)0); + } + return p_expression_node; +} + +unsigned char is_first_of_conditional_expression(struct parser_ctx * ctx) +{ + return is_first_of_unary_expression(ctx) || is_first_of_primary_expression(ctx); +} + +unsigned char expression_is_one(struct expression * expression) +{ + if (expression->expression_type == 8) + { + return (object_has_constant_value(&expression->object) && object_to_signed_int(&expression->object) == 1); + } + return 0; +} + +unsigned char expression_is_zero(struct expression * expression) +{ + if (expression->expression_type == 8) + { + return (object_has_constant_value(&expression->object) && object_to_signed_int(&expression->object) == 0); + } + return 0; +} + +unsigned char type_is_nullptr_t(struct type * p_type); + +unsigned char expression_is_null_pointer_constant(struct expression * expression) +{ + if (type_is_nullptr_t(&expression->type) || (object_has_constant_value(&expression->object) && object_to_signed_int(&expression->object) == 0)) + { + return 1; + } + return 0; +} + +void type_swap(struct type * a, struct type * b); +unsigned char type_is_void(struct type * p_type); +unsigned char type_is_void_ptr(struct type * p_type); + +struct expression *conditional_expression(struct parser_ctx * ctx) +{ + struct expression * p_expression_node = ((void *)0); + struct type left_type = {0}; + struct type right_type = {0}; + if (1) + { + p_expression_node = logical_or_expression(ctx); + if (p_expression_node == ((void *)0)) + { + goto _catch_label_1; + } + if (ctx->current && ctx->current->type == 63) + { + struct expression * p_conditional_expression = calloc(1, sizeof *p_conditional_expression); + if (p_conditional_expression == ((void *)0)) + { + goto _catch_label_1; + } + p_conditional_expression->first_token = ctx->current; + p_conditional_expression->expression_type = 55; + p_conditional_expression->condition_expr = p_expression_node; + p_expression_node = ((void *)0); + parser_match(ctx); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + expression_delete(p_conditional_expression); + goto _catch_label_1; + } + struct expression * p_left = expression(ctx); + if (p_left == ((void *)0)) + { + expression_delete(p_conditional_expression); + goto _catch_label_1; + } + p_conditional_expression->left = p_left; + parser_match(ctx); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + expression_delete(p_conditional_expression); + goto _catch_label_1; + } + struct expression * p_right = conditional_expression(ctx); + if (p_right == ((void *)0)) + { + expression_delete(p_conditional_expression); + goto _catch_label_1; + } + p_conditional_expression->right = p_right; + if (object_has_constant_value(&p_conditional_expression->condition_expr->object)) + { + if (object_to_bool(&p_conditional_expression->condition_expr->object)) + { + p_conditional_expression->type = type_dup(&p_conditional_expression->left->type); + p_conditional_expression->object = p_conditional_expression->left->object; + } + else + { + p_conditional_expression->type = type_dup(&p_conditional_expression->right->type); + p_conditional_expression->object = p_conditional_expression->right->object; + } + } + if (expression_is_subjected_to_lvalue_conversion(p_conditional_expression->left)) + { + left_type = type_lvalue_conversion(&p_conditional_expression->left->type, ctx->options.null_checks_enabled); + } + else + { + left_type = type_dup(&p_conditional_expression->left->type); + } + if (expression_is_subjected_to_lvalue_conversion(p_conditional_expression->right)) + { + right_type = type_lvalue_conversion(&p_conditional_expression->right->type, ctx->options.null_checks_enabled); + } + else + { + right_type = type_dup(&p_conditional_expression->right->type); + } + if ( !type_is_scalar(&p_conditional_expression->condition_expr->type)) + { + compiler_diagnostic_message(940, ctx, ctx->current, ((void *)0), "condition must have scalar type"); + } + else + { + if (type_is_arithmetic(&left_type) && type_is_arithmetic(&right_type)) + { + type_destroy(&p_conditional_expression->type); + p_conditional_expression->type = type_common(&left_type, &right_type); + } + else + { + if (type_is_struct_or_union(&left_type) && type_is_struct_or_union(&right_type)) + { + if ( !type_is_same(&left_type, &right_type, 1)) + { + compiler_diagnostic_message(950, ctx, p_conditional_expression->condition_expr->first_token, ((void *)0), "incompatible types"); + } + type_swap(&p_conditional_expression->type, &right_type); + } + else + { + if (type_is_void(&left_type) && type_is_void(&right_type)) + { + type_swap(&p_conditional_expression->type, &right_type); + } + else + { + if (type_is_nullptr_t(&left_type) && type_is_nullptr_t(&right_type)) + { + type_swap(&p_conditional_expression->type, &right_type); + } + else + { + if (type_is_pointer(&left_type)) + { + if (expression_is_null_pointer_constant(p_conditional_expression->right) || type_is_nullptr_t(&right_type) || type_is_void_ptr(&right_type)) + { + type_swap(&p_conditional_expression->type, &left_type); + } + else + { + if (type_is_pointer(&right_type)) + { + if (type_is_nullptr_t(&left_type) || type_is_void_ptr(&left_type)) + { + type_swap(&p_conditional_expression->type, &left_type); + } + else + { + if ( !type_is_same(&left_type, &right_type, 0)) + { + compiler_diagnostic_message(950, ctx, ctx->current, ((void *)0), "incompatible types"); + } + else + { + type_swap(&p_conditional_expression->type, &right_type); + } + } + } + else + { + compiler_diagnostic_message(950, ctx, p_conditional_expression->condition_expr->first_token, ((void *)0), "incompatible types"); + } + } + } + else + { + if (type_is_pointer(&right_type)) + { + if (expression_is_null_pointer_constant(p_conditional_expression->left) || type_is_nullptr_t(&left_type) || type_is_void_ptr(&left_type)) + { + type_swap(&p_conditional_expression->type, &right_type); + } + else + { + if (type_is_pointer(&left_type)) + { + if (type_is_nullptr_t(&left_type) || type_is_void_ptr(&left_type)) + { + type_swap(&p_conditional_expression->type, &right_type); + } + else + { + if ( !type_is_same(&left_type, &right_type, 0)) + { + compiler_diagnostic_message(950, ctx, p_conditional_expression->condition_expr->first_token, ((void *)0), "incompatible types"); + } + else + { + type_swap(&p_conditional_expression->type, &right_type); + } + } + } + else + { + compiler_diagnostic_message(950, ctx, p_conditional_expression->condition_expr->first_token, ((void *)0), "incompatible types"); + } + } + } + else + { + compiler_diagnostic_message(950, ctx, p_conditional_expression->condition_expr->first_token, ((void *)0), "incompatible types??"); + ; + } + } + } + } + } + } + } + p_expression_node = p_conditional_expression; + } + } + else _catch_label_1: + { + expression_delete(p_expression_node); + p_expression_node = ((void *)0); + } + type_destroy(&left_type); + type_destroy(&right_type); + return p_expression_node; +} + +struct expression *constant_expression(struct parser_ctx * ctx, unsigned char show_error_if_not_constant) +{ + struct expression * p_expression = conditional_expression(ctx); + if (show_error_if_not_constant && p_expression && !object_has_constant_value(&p_expression->object)) + { + compiler_diagnostic_message(960, ctx, ctx->current, ((void *)0), "expected constant expression"); + } + return p_expression; +} + +unsigned char expression_is_lvalue(struct expression * expr) +{ + switch (expr->expression_type) + { + case 2 : + case 4 : + case 3 : + case 13 : + case 15 : + case 11 : + case 32 : + return 1; + default: + break; + } + if (expr->expression_type == 9 && expr->right) + { + return expression_is_lvalue(expr->right); + } + else + { + if (expr->expression_type == 14 && expr->left) + { + return expression_is_lvalue(expr->left); + } + } + return 0; +} + +unsigned char expression_is_subjected_to_lvalue_conversion(struct expression * expression) +{ + switch (expression->expression_type) + { + case 33 : + case 26 : + case 27 : + case 16 : + case 17 : + return 0; + default: + if (expression->type.storage_class_specifier_flags & 2048) + { + return 1; + } + } + return 1; +} + +void check_comparison(struct parser_ctx * ctx, struct expression * p_a_expression, struct expression * p_b_expression, struct token * op_token) +{ + struct type * p_a_type = &p_a_expression->type; + struct type * p_b_type = &p_b_expression->type; + if (type_is_pointer(p_a_type) && type_is_integer(p_b_type)) + { + if (expression_is_zero(p_b_expression)) + { + } + else + { + compiler_diagnostic_message(3, ctx, op_token, ((void *)0), "comparison between pointer and integer"); + } + } + check_diferent_enuns(ctx, op_token, p_a_expression, p_b_expression, "comparing different enums."); +} + +unsigned char type_is_bool(struct type * p_type); +unsigned char type_is_any_owner(struct type * p_type); +unsigned char type_is_obj_owner(struct type * p_type); +unsigned char type_is_nullable(struct type * p_type, unsigned char nullable_enabled); +unsigned char type_is_enum(struct type * p_type); +void type_print(struct type * a); + +void check_assigment(struct parser_ctx * ctx, struct type * p_a_type, struct expression * p_b_expression, int assignment_type) +{ + struct type * p_b_type = &p_b_expression->type; + unsigned char is_null_pointer_constant = expression_is_null_pointer_constant(p_b_expression); + if (type_is_pointer(p_a_type)) + { + if ( !type_is_nullptr_t(p_b_type) && !type_is_pointer_or_array(p_b_type) && !type_is_function(p_b_type)) + { + if (is_null_pointer_constant) + { + if (p_b_expression->expression_type == 8) + { + compiler_diagnostic_message(10, ctx, p_b_expression->first_token, ((void *)0), "use NULL instead of 0"); + } + else + { + compiler_diagnostic_message(45, ctx, p_b_expression->first_token, ((void *)0), "unusual expression/type used as null pointer constant"); + } + } + else + { + compiler_diagnostic_message(1340, ctx, p_b_expression->first_token, ((void *)0), "non-pointer to pointer"); + } + } + } + if (type_is_bool(p_a_type) && type_is_nullptr_t(p_b_type)) + { + struct marker marker = {0, 0, 0, 0, 0, 0, 0}; + marker.p_token_begin = p_b_expression->first_token; + marker.p_token_end = p_b_expression->first_token; + compiler_diagnostic_message(48, ctx, ((void *)0), &marker, "implicit conversion of nullptr constant to 'bool'"); + } + struct type lvalue_right_type = {0}; + struct type t2 = {0}; + if (expression_is_subjected_to_lvalue_conversion(p_b_expression)) + { + lvalue_right_type = type_lvalue_conversion(p_b_type, ctx->options.null_checks_enabled); + } + else + { + lvalue_right_type = type_dup(p_b_type); + } + if (type_is_owner(p_a_type) && !type_is_owner(&p_b_expression->type)) + { + if ( !is_null_pointer_constant) + { + compiler_diagnostic_message(24, ctx, p_b_expression->first_token, ((void *)0), "cannot assign a non-owner to owner"); + type_destroy(&lvalue_right_type); + type_destroy(&t2); + return; + } + } + if ( !type_is_owner(p_a_type) && type_is_any_owner(&p_b_expression->type)) + { + if (p_b_expression->type.storage_class_specifier_flags & 8192) + { + compiler_diagnostic_message(22, ctx, p_b_expression->first_token, ((void *)0), "cannot assign a temporary owner to non-owner object."); + type_destroy(&lvalue_right_type); + type_destroy(&t2); + return; + } + } + if (assignment_type == 0) + { + if ( !type_is_owner(p_a_type) && type_is_any_owner(&p_b_expression->type)) + { + if (p_b_expression->type.storage_class_specifier_flags & 4096) + { + compiler_diagnostic_message(1280, ctx, p_b_expression->first_token, ((void *)0), "cannot return a automatic storage duration _Owner to non-owner"); + type_destroy(&lvalue_right_type); + type_destroy(&t2); + return; + } + } + } + if (type_is_obj_owner(p_a_type) && type_is_pointer(p_a_type)) + { + if (type_is_owner(p_b_type)) + { + } + else + { + if ( !p_b_type->address_of) + { + compiler_diagnostic_message(18, ctx, p_b_expression->first_token, ((void *)0), "source expression of _Obj_owner must be addressof"); + } + } + } + if (type_is_pointer(p_a_type) && !type_is_nullable(p_a_type, ctx->options.null_checks_enabled) && is_null_pointer_constant) + { + compiler_diagnostic_message(34, ctx, p_b_expression->first_token, ((void *)0), "cannot convert a null pointer constant to non-nullable pointer"); + type_destroy(&lvalue_right_type); + type_destroy(&t2); + return; + } + if (type_is_enum(p_b_type) && type_is_enum(p_a_type)) + { + if ( !type_is_same(p_b_type, p_a_type, 0)) + { + compiler_diagnostic_message(39, ctx, p_b_expression->first_token, ((void *)0), " incompatible types "); + } + type_destroy(&lvalue_right_type); + type_destroy(&t2); + return; + } + if (type_is_arithmetic(p_b_type) && type_is_arithmetic(p_a_type)) + { + type_destroy(&lvalue_right_type); + type_destroy(&t2); + return; + } + if (is_null_pointer_constant && type_is_pointer(p_a_type)) + { + type_destroy(&lvalue_right_type); + type_destroy(&t2); + return; + } + if (is_null_pointer_constant && type_is_array(p_a_type)) + { + compiler_diagnostic_message(27, ctx, p_b_expression->first_token, ((void *)0), " passing null as array"); + type_destroy(&lvalue_right_type); + type_destroy(&t2); + return; + } + if (type_is_pointer_or_array(p_b_type) && type_is_pointer_or_array(p_a_type)) + { + if (type_is_void_ptr(p_b_type)) + { + type_destroy(&lvalue_right_type); + type_destroy(&t2); + return; + } + if (type_is_void_ptr(p_a_type)) + { + type_destroy(&lvalue_right_type); + type_destroy(&t2); + return; + } + if (type_is_array(p_a_type)) + { + int parameter_array_size = p_a_type->num_of_elements; + if (type_is_array(p_b_type)) + { + int argument_array_size = p_b_type->num_of_elements; + if (parameter_array_size != 0 && argument_array_size < parameter_array_size) + { + compiler_diagnostic_message(1130, ctx, p_b_expression->first_token, ((void *)0), " 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_b_type)) + { + compiler_diagnostic_message(38, ctx, p_b_expression->first_token, ((void *)0), " passing null as array"); + } + } + t2 = type_lvalue_conversion(p_a_type, ctx->options.null_checks_enabled); + } + else + { + t2 = type_dup(p_a_type); + } + if ( !type_is_same(&lvalue_right_type, &t2, 0)) + { + type_print(&lvalue_right_type); + type_print(&t2); + compiler_diagnostic_message(53, ctx, p_b_expression->first_token, ((void *)0), " incompatible types"); + } + if (type_is_pointer(&lvalue_right_type) && type_is_pointer(&t2)) + { + struct type argument_pointer_to = type_remove_pointer(&lvalue_right_type); + struct type parameter_pointer_to = type_remove_pointer(&t2); + if (type_is_const(&argument_pointer_to) && !type_is_const(¶meter_pointer_to)) + { + compiler_diagnostic_message(14, ctx, p_b_expression->first_token, ((void *)0), " discarding const at argument "); + } + type_destroy(&argument_pointer_to); + type_destroy(¶meter_pointer_to); + } + } + if ( !type_is_same(p_a_type, &lvalue_right_type, 0)) + { + } + type_destroy(&lvalue_right_type); + type_destroy(&t2); +} + diff --git a/out/src/fs.c b/out/src/fs.c new file mode 100644 index 0000000..577507d --- /dev/null +++ b/out/src/fs.c @@ -0,0 +1,426 @@ +struct _stat64i32 { + unsigned int st_dev; + unsigned short st_ino; + unsigned short st_mode; + short st_nlink; + short st_uid; + short st_gid; + unsigned int st_rdev; + long st_size; + __int64 st_atime; + __int64 st_mtime; + __int64 st_ctime; +}; + +struct _FILETIME { + unsigned long dwLowDateTime; + unsigned long dwHighDateTime; +}; + +struct _WIN32_FIND_DATAA { + unsigned long dwFileAttributes; + struct _FILETIME ftCreationTime; + struct _FILETIME ftLastAccessTime; + struct _FILETIME ftLastWriteTime; + unsigned long nFileSizeHigh; + unsigned long nFileSizeLow; + unsigned long dwReserved0; + unsigned long dwReserved1; + char cFileName[260]; + char cAlternateFileName[14]; +}; + +struct stat { + unsigned int st_dev; + unsigned short st_ino; + unsigned short st_mode; + short st_nlink; + short st_uid; + short st_gid; + unsigned int st_rdev; + long st_size; + __int64 st_atime; + __int64 st_mtime; + __int64 st_ctime; +}; + +struct HINSTANCE__ { + int unused; +}; + +struct dirent { + unsigned short d_ino; + long d_off; + unsigned short d_reclen; + unsigned char d_type; + char d_name[256]; +}; + +struct TAGDIR { + void * handle; + struct dirent dirent; +}; + +struct _iobuf { + void * _Placeholder; +}; + + +int tolower(int _C); + +unsigned char path_is_normalized(char * path) +{ + { + char * p = path; + for (; *p; p++) + { + int before = *p; + int after = tolower( *p); + if (before != after) + { + return 0; + } + if (after == 92) + { + return 0; + } + } + } + return 1; +} + +void path_normalize(char * path) +{ + { + char * p = path; + for (; *p; p++) + { + *p = (char)tolower( *p); + if ( *p == 92) + { + *p = 47; + } + } + } +} + +unsigned char path_is_absolute(char * path) +{ + char ch = (char)tolower(path[0]); + if (ch >= 97 && ch <= 122) + { + if (path[1] == 58 && (path[2] == 92 || path[2] == 47)) + { + return 1; + } + } + if (path[0] == 92 && path[1] == 92) + { + return 1; + } + return 0; +} + +unsigned char path_is_relative(char * path) +{ + return !path_is_absolute(path); +} + +char *strcat(char * _Destination, char * _Source); +void *FindFirstFileA(char * lpFileName, struct _WIN32_FIND_DATAA * lpFindFileData); +void *calloc(int nmemb, unsigned int size); +int FindClose(void * hFindFile); +int *_errno(void); +int windows_error_to_posix(int i); +unsigned long GetLastError(void); + +struct TAGDIR *opendir(char * name) +{ + ; + struct _WIN32_FIND_DATAA fdfile = {0}; + char path[260] = {0}; + strcat(path, name); + strcat(path, "\\*.*"); + void * handle = FindFirstFileA(path, &fdfile); + if (handle != ((void *)(long) -1)) + { + struct TAGDIR * p = calloc(1, sizeof *p); + if (p) + { + p->handle = handle; + return p; + } + else + { + FindClose(handle); + } + } + else + { + ( *_errno()) = windows_error_to_posix(GetLastError()); + } + return ((void *)0); +} + +void free(void * ptr); + +int closedir(struct TAGDIR * dirp) +{ + FindClose(dirp->handle); + free(dirp); + return 0; +} + +int FindNextFileA(void * hFindFile, struct _WIN32_FIND_DATAA * lpFindFileData); +void *memset(void * _Dst, int _Val, unsigned int _Size); +char *strncpy(char * _Destination, char * _Source, unsigned int _Count); + +struct dirent *readdir(struct TAGDIR * dirp) +{ + struct _WIN32_FIND_DATAA fdfile = {0}; + int b = FindNextFileA(dirp->handle, &fdfile); + if (b) + { + memset(&dirp->dirent, 0, sizeof (dirp->dirent)); + if (fdfile.dwFileAttributes & 16) + { + dirp->dirent.d_type = 4; + } + strncpy(dirp->dirent.d_name, fdfile.cFileName, sizeof (dirp->dirent.d_name) - 1); + return &dirp->dirent; + } + else + { + ( *_errno()) = windows_error_to_posix(GetLastError()); + } + return ((void *)0); +} + +char *_fullpath(char * _Buffer, char * _Path, unsigned int _BufferCount); + +char *realpath(char * path, char * resolved_path) +{ + char * p = _fullpath(resolved_path, path, 260); + if (p) + { + char * p2 = resolved_path; + while ( *p2) + { + if ( *p2 == 92) + { + *p2 = 47; + } + p2++; + } + } + return p; +} + +struct _iobuf *fopen(char * _FileName, char * _Mode); +int fclose(struct _iobuf * _Stream); +unsigned int fread(void * _Buffer, unsigned int _ElementSize, unsigned int _ElementCount, struct _iobuf * _Stream); +unsigned int fwrite(void * _Buffer, unsigned int _ElementSize, unsigned int _ElementCount, struct _iobuf * _Stream); + +int copy_file(char * pathfrom, char * pathto) +{ + struct _iobuf * fd_from = fopen(pathfrom, "rb"); + if (fd_from == ((void *)0)) + { + return -1; + } + struct _iobuf * fd_to = fopen(pathto, "wb"); + if (fd_to == ((void *)0)) + { + fclose(fd_from); + return -1; + } + char buf[4096] = {0}; + unsigned int nread; + while (nread = fread(buf, sizeof (char), sizeof buf, fd_from), nread > 0) + { + char * out_ptr = buf; + unsigned int nwritten; + do + { + nwritten = fwrite(out_ptr, sizeof (char), nread, fd_to); + nread = nwritten; + out_ptr = nwritten; + } + while (nread > 0); + } + if (nread == 0) + { + fclose(fd_to); + fclose(fd_from); + return 0; + } + fclose(fd_to); + fclose(fd_from); + return -1; +} + +int _mkdir(char * _Path); +int strcmp(char * _Str1, char * _Str2); +int snprintf(char * _Buffer, unsigned int _BufferCount, char * _Format, ...); + +int copy_folder(char * from, char * to) +{ + int errcode = _mkdir(to); + if (errcode != 0) + { + return errcode; + } + struct TAGDIR * dir = opendir(from); + if (dir == ((void *)0)) + { + return ( *_errno()); + } + struct dirent * dp; + while ((dp = readdir(dir)) != ((void *)0)) + { + if (strcmp(dp->d_name, ".") == 0 || strcmp(dp->d_name, "..") == 0) + { + continue; + } + char fromlocal[260] = {0}; + snprintf(fromlocal, 260, "%s/%s", from, dp->d_name); + char tolocal[260] = {0}; + snprintf(tolocal, 260, "%s/%s", to, dp->d_name); + if (dp->d_type & 4) + { + errcode = copy_folder(fromlocal, tolocal); + } + else + { + errcode = copy_file(fromlocal, tolocal); + } + if (errcode != 0) + { + break; + } + } + closedir(dir); + return errcode; +} + +unsigned long GetModuleFileNameA(struct HINSTANCE__ * hModule, char * lpFilename, unsigned long nSize); + +int get_self_path(char * buffer, int maxsize) +{ + unsigned long r = GetModuleFileNameA(((void *)0), buffer, maxsize); + return r; +} + +char *strrchr_ex(char * s, int c1, int c2) +{ + char * last = ((void *)0); + char * p = s; + while ( *p) + { + if ( *p == c1 || *p == c2) + { + last = p; + } + p++; + } + return (char *)last; +} + +char *basename(char * filename) +{ + char * p = strrchr_ex(filename, 47, 92); + return p ? p + 1 : (char *)filename; +} + +char *dirname(char * path) +{ + int last = -1; + { + int i = 0; + for (; path[i]; i++) + { + if (path[i] == 92 || path[i] == 47) + { + last = i; + } + } + } + if (last != -1) + { + path[last] = 0; + } + else + { + path[0] = 0; + } + return path; +} + + +int _stat64i32(char * _FileName, struct _stat64i32 * _Stat); +inline static int stat(char * _FileName, struct stat * _Stat) +{ + return _stat64i32(_FileName, (struct _stat64i32 *)_Stat); +} +void *malloc(unsigned int size); +int feof(struct _iobuf * _Stream); + +char *read_file(char * path, unsigned char append_newline) +{ + char * data = ((void *)0); + struct _iobuf * file = ((void *)0); + struct stat info = {0}; + if (stat(path, &info) != 0) + { + return ((void *)0); + } + int mem_size_bytes = sizeof (char) * info.st_size + 1 + 1; + if (mem_size_bytes < 4) + { + mem_size_bytes = 4; + } + data = malloc(mem_size_bytes); + if (data == ((void *)0)) + { + return ((void *)0); + } + file = fopen(path, "r"); + if (file == ((void *)0)) + { + free(data); + return ((void *)0); + } + unsigned int bytes_read = fread(data, 1, 3, file); + if (bytes_read < 3) + { + data[bytes_read] = 0; + if (feof(file)) + { + fclose(file); + return data; + } + free(data); + fclose(file); + return ((void *)0); + } + unsigned int bytes_read_part2 = 0; + if ((unsigned char)data[0] == (unsigned char)239 && (unsigned char)data[1] == (unsigned char)187 && (unsigned char)data[2] == (unsigned char)191) + { + bytes_read_part2 = fread(&data[0], 1, info.st_size - 3, file); + } + else + { + bytes_read_part2 = fread(&data[3], 1, info.st_size - 3, file); + bytes_read_part2 = bytes_read_part2 + 3; + } + data[bytes_read_part2] = 0; + if (append_newline && data[bytes_read_part2 - 1] != 10) + { + data[bytes_read_part2] = 10; + ; + data[bytes_read_part2 + 1] = 0; + } + fclose(file); + return data; +} + diff --git a/out/src/hashmap.c b/out/src/hashmap.c new file mode 100644 index 0000000..85a9767 --- /dev/null +++ b/out/src/hashmap.c @@ -0,0 +1,361 @@ +struct struct_entry12; +union _struct_tag_5 { + unsigned int number; + struct enum_specifier * p_enum_specifier; + struct enumerator * p_enumerator; + struct struct_or_union_specifier * p_struct_or_union_specifier; + struct declarator * p_declarator; + struct init_declarator * p_init_declarator; + struct macro * p_macro; + struct struct_entry * p_struct_entry; +}; + +struct enumerator2; +struct struct_entry; +struct macro11; +struct map_entry { + struct map_entry * next; + unsigned int hash; + char * key; + int type; + union _struct_tag_5 data; +}; + +struct enum_specifier; +struct struct_or_union_specifier; +struct macro; +struct init_declarator; +struct declarator; +struct enumerator7; +struct hash_map { + struct map_entry ** table; + int capacity; + int size; +}; + +struct enum_specifier0; +struct hash_item_set { + unsigned int number; + struct enum_specifier6 * p_enum_specifier; + struct enumerator7 * p_enumerator; + struct struct_or_union_specifier8 * p_struct_or_union_specifier; + struct declarator9 * p_declarator; + struct init_declarator10 * p_init_declarator; + struct macro11 * p_macro; + struct struct_entry12 * p_struct_entry; +}; + +struct struct_or_union_specifier1; +struct init_declarator4; +struct enumerator; +struct init_declarator10; +struct enum_specifier6; +struct macro5; +struct struct_or_union_specifier8; +struct declarator9; +struct declarator3; + +unsigned int strlen(char * _Str); + +static unsigned int string_hash(char * key) +{ + unsigned int hash_val = 2166136261U; + unsigned int first = 0; + unsigned int last = (unsigned int)strlen(key); + unsigned int stride = 1 + last / 10; + for (; first < last; first = stride) + { + hash_val = 16777619U * hash_val ^ (unsigned int)key[first]; + } + return (hash_val); +} + +void enum_specifier_delete(struct enum_specifier0 * p); +void struct_or_union_specifier_delete(struct struct_or_union_specifier1 * p); +void enumerator_delete(struct enumerator2 * p); +void declarator_delete(struct declarator3 * p); +void init_declarator_delete(struct init_declarator4 * p); +void macro_delete(struct macro5 * p); +void free(void * ptr); + +void map_entry_delete(struct map_entry * p) +{ + if (p == ((void *)0)) + { + return; + } + switch (p->type) + { + case 0 : + break; + case 1 : + enum_specifier_delete(p->data.p_enum_specifier); + break; + case 2 : + struct_or_union_specifier_delete(p->data.p_struct_or_union_specifier); + break; + case 3 : + enumerator_delete(p->data.p_enumerator); + break; + case 4 : + declarator_delete(p->data.p_declarator); + break; + case 5 : + init_declarator_delete(p->data.p_init_declarator); + break; + case 6 : + macro_delete(p->data.p_macro); + break; + } + free(p->key); + free(p); +} + +void hashmap_remove_all(struct hash_map * map) +{ + if (map->table != ((void *)0)) + { + { + int i = 0; + for (; i < map->capacity; i++) + { + struct map_entry * pentry = map->table[i]; + while (pentry != ((void *)0)) + { + struct map_entry * next = pentry->next; + map_entry_delete(pentry); + pentry = next; + } + } + } + free(map->table); + map->table = ((void *)0); + map->size = 0; + } +} + +void hashmap_destroy(struct hash_map * map) +{ + hashmap_remove_all(map); + ; +} + +int strcmp(char * _Str1, char * _Str2); + +struct map_entry *hashmap_find(struct hash_map * map, char * key) +{ + if (map->table == ((void *)0)) + { + return ((void *)0); + } + unsigned int hash = string_hash(key); + int index = hash % map->capacity; + struct map_entry * pentry = map->table[index]; + for (; pentry != ((void *)0); pentry = pentry->next) + { + if (pentry->hash == hash && strcmp(pentry->key, key) == 0) + { + return pentry; + } + } + return ((void *)0); +} + +void *hashmap_remove(struct hash_map * map, char * key, int * p_type_opt) +{ + if (map->table != ((void *)0)) + { + unsigned int hash = string_hash(key); + struct map_entry ** pp_entry = &map->table[hash % map->capacity]; + struct map_entry * p_entry = *pp_entry; + for (; p_entry != ((void *)0); p_entry = p_entry->next) + { + if ((p_entry->hash == hash) && (strcmp(p_entry->key, key) == 0)) + { + *pp_entry = p_entry->next; + if (p_type_opt) + { + *p_type_opt = p_entry->type; + } + void * p = p_entry->data.p_declarator; + free((void *)p_entry->key); + free((void *)p_entry); + return p; + } + pp_entry = &p_entry->next; + } + } + return ((void *)0); +} + +void hash_item_set_destroy(struct hash_item_set * p) +{ + declarator_delete(p->p_declarator); + enumerator_delete(p->p_enumerator); + enum_specifier_delete(p->p_enum_specifier); + init_declarator_delete(p->p_init_declarator); + struct_or_union_specifier_delete(p->p_struct_or_union_specifier); + macro_delete(p->p_macro); +} + +void *calloc(int nmemb, unsigned int size); +char *strdup(char * src); + +int hashmap_set(struct hash_map * map, char * key, struct hash_item_set * item) +{ + int result = 0; + void * p = ((void *)0); + int type = 0; + if (item->p_declarator) + { + type = 4; + p = item->p_declarator; + item->p_declarator = ((void *)0); + } + else + { + if (item->p_enumerator) + { + type = 3; + p = item->p_enumerator; + item->p_enumerator = ((void *)0); + } + else + { + if (item->p_enum_specifier) + { + type = 1; + p = item->p_enum_specifier; + item->p_enum_specifier = ((void *)0); + } + else + { + if (item->p_init_declarator) + { + type = 5; + p = item->p_init_declarator; + item->p_init_declarator = ((void *)0); + } + else + { + if (item->p_struct_or_union_specifier) + { + type = 2; + p = item->p_struct_or_union_specifier; + item->p_struct_or_union_specifier = ((void *)0); + } + else + { + if (item->p_macro) + { + type = 6; + p = item->p_macro; + item->p_macro = ((void *)0); + } + else + { + if (item->p_struct_entry) + { + type = 7; + p = item->p_struct_entry; + item->p_struct_entry = ((void *)0); + } + else + { + type = 0; + p = (void *)item->number; + } + } + } + } + } + } + } + if (1) + { + if (map->table == ((void *)0)) + { + if (map->capacity < 1) + { + map->capacity = 1000; + } + map->table = calloc(map->capacity, sizeof (map->table[0])); + if (map->table == ((void *)0)) + { + goto _catch_label_1; + } + } + if (map->table != ((void *)0)) + { + unsigned int hash = string_hash(key); + int index = hash % map->capacity; + struct map_entry * pentry = map->table[index]; + for (; pentry != ((void *)0); pentry = pentry->next) + { + if (pentry->hash == hash && strcmp(pentry->key, key) == 0) + { + break; + } + } + if (pentry == ((void *)0)) + { + struct map_entry * p_new_entry = calloc(1, sizeof ( *pentry)); + if (p_new_entry == ((void *)0)) + { + goto _catch_label_1; + } + p_new_entry->hash = hash; + p_new_entry->data.p_declarator = (void *)p; + p_new_entry->type = type; + char * temp_key = strdup(key); + if (temp_key == ((void *)0)) + { + map_entry_delete(p_new_entry); + goto _catch_label_1; + } + p_new_entry->key = temp_key; + p_new_entry->next = map->table[index]; + map->table[index] = p_new_entry; + map->size++; + result = 0; + } + else + { + switch (pentry->type) + { + case 0 : + break; + case 1 : + item->p_enum_specifier = pentry->data.p_enum_specifier; + break; + case 2 : + item->p_struct_or_union_specifier = pentry->data.p_struct_or_union_specifier; + break; + case 3 : + item->p_enumerator = pentry->data.p_enumerator; + break; + case 4 : + item->p_declarator = pentry->data.p_declarator; + break; + case 5 : + item->p_init_declarator = pentry->data.p_init_declarator; + break; + case 6 : + item->p_macro = pentry->data.p_macro; + break; + case 7 : + item->p_struct_entry = pentry->data.p_struct_entry; + break; + } + result = 1; + pentry->data.p_declarator = (void *)p; + pentry->type = type; + } + } + } + else _catch_label_1: + { + } + return result; +} + diff --git a/out/src/object.c b/out/src/object.c new file mode 100644 index 0000000..8995815 --- /dev/null +++ b/out/src/object.c @@ -0,0 +1,3043 @@ +struct primary_block { + struct compound_statement * compound_statement; + struct selection_statement * selection_statement; + struct iteration_statement * iteration_statement; + struct defer_statement * defer_statement; + struct try_statement * try_statement; +}; + +struct member_declarator_list { + struct member_declarator * head; + struct member_declarator * tail; +}; + +struct defer_statement { + struct token * first_token; + struct token * last_token; + struct secondary_block * secondary_block; +}; + +struct secondary_block { + struct token * first_token; + struct token * last_token; + struct statement * statement; +}; + +struct attribute_argument_clause { + struct balanced_token_sequence * p_balanced_token_sequence; + struct token * token; +}; + +struct hash_map { + struct map_entry ** table; + int capacity; + int size; +}; + +struct argument_expression_list { + struct argument_expression * head; + struct argument_expression * tail; +}; + +struct initializer_list { + struct token * first_token; + struct initializer_list_item * head; + struct initializer_list_item * tail; + int size; +}; + +struct param_list { + unsigned char is_var_args; + unsigned char is_void; + struct param * head; + struct param * tail; +}; + +struct type { + int category; + int attributes_flags; + int type_specifier_flags; + int type_qualifier_flags; + int storage_class_specifier_flags; + char * name_opt; + struct struct_or_union_specifier * struct_or_union_specifier; + struct enum_specifier * enum_specifier; + struct expression * array_num_elements_expression; + int num_of_elements; + unsigned char static_array; + unsigned char address_of; + struct param_list params; + struct type * next; +}; + +struct generic_association { + struct type type; + struct type_name * p_type_name; + struct expression * expression; + struct token * first_token; + struct token * last_token; + struct generic_association * next; +}; + +struct storage_class_specifier { + int flags; + struct token * token; +}; + +struct attribute_specifier { + struct token * first_token; + struct token * last_token; + struct attribute_list * attribute_list; + struct attribute_specifier * next; +}; + +struct attribute { + int attributes_flags; + struct attribute_token * attribute_token; + struct attribute_argument_clause * attribute_argument_clause; + struct attribute * next; +}; + +struct generic_assoc_list { + struct generic_association * head; + struct generic_association * tail; +}; + +struct defer_list { + struct defer_list_item * head; + struct defer_list_item * tail; +}; + +struct specifier_qualifier_list { + int type_specifier_flags; + int type_qualifier_flags; + struct struct_or_union_specifier * struct_or_union_specifier; + struct enum_specifier * enum_specifier; + struct typeof_specifier * typeof_specifier; + struct declarator * typedef_declarator; + struct type_specifier_qualifier * head; + struct type_specifier_qualifier * tail; + struct token * first_token; + struct token * last_token; + struct attribute_specifier_sequence * p_attribute_specifier_sequence; +}; + +union _struct_tag_0 { + unsigned char bool_value; + signed char signed_char_value; + unsigned char unsigned_char_value; + signed short signed_short_value; + unsigned short unsigned_short_value; + signed int signed_int_value; + unsigned int unsigned_int_value; + signed long signed_long_value; + unsigned long unsigned_long_value; + signed long long signed_long_long_value; + unsigned long long unsigned_long_long_value; + float float_value; + double double_value; + long double long_double_value; +}; + +struct object { + int state; + int value_type; + struct type type2; + char * debug_name; + union _struct_tag_0 value; + struct object * parent; + struct expression * p_init_expression; + struct object * members; + struct object * next; +}; + +struct flow_objects_view { + struct flow_object ** data; + int size; + int capacity; +}; + +struct flow_object_state { + char * dbg_name; + int state_number; + struct flow_object * pointed; + int state; + struct flow_objects_view alternatives; + struct flow_object_state * next; +}; + +struct flow_object { + unsigned int visit_number; + struct flow_object * parent; + struct declarator * p_declarator_origin; + struct expression * p_expression_origin; + struct flow_objects_view members; + struct flow_object_state current; + int id; + unsigned char is_temporary; +}; + +struct init_statement { + struct expression_statement * p_expression_statement; + struct simple_declaration * p_simple_declaration; +}; + +struct label { + struct expression * constant_expression; + struct token * p_identifier_opt; + struct token * p_first_token; +}; + +struct statement { + struct labeled_statement * labeled_statement; + struct unlabeled_statement * unlabeled_statement; +}; + +struct type_name { + struct token * first_token; + struct token * last_token; + struct specifier_qualifier_list * specifier_qualifier_list; + struct declarator * abstract_declarator; + struct type type; +}; + +struct block_item_list { + struct block_item * head; + struct block_item * tail; +}; + +struct diagnostic { + unsigned long long errors; + unsigned long long warnings; + unsigned long long notes; +}; + +struct compound_statement { + struct token * first_token; + struct token * last_token; + struct block_item_list block_item_list; + struct diagnostic diagnostic_flags; + struct defer_list defer_list; +}; + +struct parameter_type_list { + unsigned char is_var_args; + unsigned char is_void; + struct parameter_list * parameter_list; +}; + +union _struct_tag_1 { + unsigned int number; + struct enum_specifier * p_enum_specifier; + struct enumerator * p_enumerator; + struct struct_or_union_specifier * p_struct_or_union_specifier; + struct declarator * p_declarator; + struct init_declarator * p_init_declarator; + struct macro * p_macro; + struct struct_entry * p_struct_entry; +}; + +struct block_item { + struct token * first_token; + struct declaration * declaration; + struct unlabeled_statement * unlabeled_statement; + struct label * label; + struct block_item * next; +}; + +struct declarator { + unsigned char has_shared_ownership; + struct token * first_token_opt; + struct token * last_token_opt; + struct pointer * pointer; + struct direct_declarator * direct_declarator; + struct declaration_specifiers * declaration_specifiers; + struct specifier_qualifier_list * specifier_qualifier_list; + struct token * name_opt; + struct compound_statement * function_body; + int num_uses; + struct object object; + struct flow_object * p_object; + struct type type; +}; + +struct defer_list_item { + struct declarator * declarator; + struct defer_statement * defer_statement; + struct defer_list_item * next; +}; + +struct type_specifier_qualifier { + struct type_specifier * type_specifier; + struct type_qualifier * type_qualifier; + struct alignment_specifier * alignment_specifier; + struct type_specifier_qualifier * next; +}; + +struct expression_statement { + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt; + struct expression * expression_opt; +}; + +struct try_statement { + struct secondary_block * secondary_block; + struct secondary_block * catch_secondary_block_opt; + struct token * first_token; + struct token * last_token; + struct token * catch_token_opt; + int try_catch_block_index; +}; + +struct __crt_multibyte_data; +struct pragma_declaration { + struct token * first_token; + struct token * last_token; +}; + +struct attribute_specifier_sequence { + struct token * first_token; + struct token * last_token; + int attributes_flags; + struct attribute_specifier * head; + struct attribute_specifier * tail; +}; + +struct parameter_declaration { + struct attribute_specifier_sequence * attribute_specifier_sequence_opt; + struct declaration_specifiers * declaration_specifiers; + struct declarator * declarator; + struct parameter_declaration * next; +}; + +struct enumerator_list { + struct enumerator * head; + struct enumerator * tail; +}; + +struct attribute_token { + int attributes_flags; + struct token * token; +}; + +struct static_assert_declaration { + struct token * first_token; + struct token * last_token; + struct expression * constant_expression; + struct token * string_literal_opt; +}; + +struct jump_statement { + struct token * label; + struct token * first_token; + struct token * last_token; + struct expression * expression_opt; + int try_catch_block_index; + struct defer_list defer_list; +}; + +struct iteration_statement { + struct token * first_token; + struct token * second_token; + struct secondary_block * secondary_block; + struct expression * expression1; + struct expression * expression2; + struct expression * expression0; + struct declaration * declaration; + struct defer_list defer_list; +}; + +struct selection_statement { + struct init_statement * p_init_statement; + struct condition * condition; + struct secondary_block * secondary_block; + struct secondary_block * else_secondary_block_opt; + struct token * open_parentesis_token; + struct token * close_parentesis_token; + struct token * first_token; + struct token * last_token; + struct token * else_token_opt; + struct defer_list defer_list; +}; + +struct direct_declarator { + struct token * name_opt; + struct declarator * declarator; + struct array_declarator * array_declarator; + struct function_declarator * function_declarator; + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt; +}; + +struct designation { + struct designator_list * designator_list; + struct token * token; +}; + +struct init_declarator_list { + struct init_declarator * head; + struct init_declarator * tail; +}; + +struct declaration { + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt; + struct static_assert_declaration * static_assert_declaration; + struct pragma_declaration * pragma_declaration; + struct declaration_specifiers * declaration_specifiers; + struct init_declarator_list init_declarator_list; + struct compound_statement * function_body; + struct defer_list defer_list; + struct declarator * contract_declarator; + struct token * first_token; + struct token * last_token; + struct declaration * next; +}; + +struct labeled_statement { + struct label * label; + struct statement * statement; +}; + +struct __crt_locale_data; +struct typeof_specifier { + struct token * first_token; + struct token * last_token; + struct typeof_specifier_argument * typeof_specifier_argument; + struct type type; +}; + +struct condition { + struct expression * expression; + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt; + struct declaration_specifiers * p_declaration_specifiers; + struct init_declarator * p_init_declarator; + struct token * first_token; + struct token * last_token; +}; + +struct generic_selection { + struct expression * expression; + struct type_name * type_name; + struct expression * p_view_selected_expression; + struct generic_assoc_list generic_assoc_list; + struct token * first_token; + struct token * last_token; +}; + +struct member_declaration_list { + struct token * first_token; + struct token * last_token; + struct member_declaration * head; + struct member_declaration * tail; +}; + +struct struct_or_union_specifier { + unsigned char has_shared_ownership; + struct attribute_specifier_sequence * attribute_specifier_sequence_opt; + struct member_declaration_list member_declaration_list; + struct token * first_token; + struct token * last_token; + unsigned char is_owner; + struct token * tagtoken; + char tag_name[200]; + unsigned char has_anonymous_tag; + unsigned char show_anonymous_tag; + int scope_level; + int visit_moved; + struct struct_or_union_specifier * complete_struct_or_union_specifier_indirection; +}; + +struct __crt_locale_pointers { + struct __crt_locale_data * locinfo; + struct __crt_multibyte_data * mbcinfo; +}; + +struct enum_specifier { + unsigned char has_shared_ownership; + struct attribute_specifier_sequence * attribute_specifier_sequence_opt; + struct specifier_qualifier_list * specifier_qualifier_list; + char tag_name[200]; + struct enumerator_list enumerator_list; + struct token * tag_token; + struct token * first_token; + struct enum_specifier * complete_enum_specifier2; +}; + +struct scope { + int scope_level; + struct hash_map tags; + struct hash_map variables; + struct scope * next; + struct scope * previous; +}; + +struct braced_initializer { + struct token * first_token; + struct token * last_token; + struct initializer_list * initializer_list; +}; + +struct token { + int type; + char * lexeme; + char * original; + int line; + int col; + int level; + int flags; + struct token * token_origin; + struct token * next; + struct token * prev; +}; + +struct _iobuf { + void * _Placeholder; +}; + +struct type_specifier { + int flags; + struct token * token; + struct struct_or_union_specifier * struct_or_union_specifier; + struct typeof_specifier * typeof_specifier; + struct enum_specifier * enum_specifier; + struct declarator * typedef_declarator; + struct atomic_type_specifier * atomic_type_specifier; +}; + +struct argument_expression { + struct expression * expression; + struct argument_expression * next; + unsigned char set_unkown; +}; + +struct balanced_token { + struct token * token; + struct balanced_token * next; +}; + +struct macro; +struct array_declarator { + struct direct_declarator * direct_declarator; + struct expression * assignment_expression; + struct expression * expression; + struct type_qualifier_list * type_qualifier_list_opt; + struct token * token; + struct token * static_token_opt; +}; + +struct atomic_type_specifier { + struct token * token; + struct type_name * type_name; +}; + +struct parameter_list { + struct parameter_declaration * head; + struct parameter_declaration * tail; +}; + +struct member_declaration { + struct specifier_qualifier_list * specifier_qualifier_list; + struct member_declarator_list * member_declarator_list_opt; + struct static_assert_declaration * static_assert_declaration; + struct pragma_declaration * pragma_declaration; + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt; + struct member_declaration * next; +}; + +struct initializer { + struct token * first_token; + struct braced_initializer * braced_initializer; + struct expression * assignment_expression; +}; + +struct attribute_list { + int attributes_flags; + struct attribute * head; + struct attribute * tail; +}; + +struct initializer_list_item { + struct designation * designation; + struct initializer * initializer; + struct initializer_list_item * next; +}; + +struct typeof_specifier_argument { + struct expression * expression; + struct type_name * type_name; +}; + +struct type_qualifier_list { + int flags; + struct type_qualifier * head; + struct type_qualifier * tail; +}; + +struct designator_list { + struct designator * head; + struct designator * tail; +}; + +struct member_declarator { + struct declarator * declarator; + struct expression * constant_expression; + struct member_declarator * next; +}; + +struct simple_declaration { + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt; + struct declaration_specifiers * p_declaration_specifiers; + struct init_declarator_list init_declarator_list; + struct token * first_token; + struct token * last_token; +}; + +struct struct_entry; +struct function_specifier { + int flags; + struct token * token; +}; + +struct unlabeled_statement { + struct expression_statement * expression_statement; + struct primary_block * primary_block; + struct jump_statement * jump_statement; +}; + +struct declaration_specifiers { + int attributes_flags; + int type_specifier_flags; + int type_qualifier_flags; + int storage_class_specifier_flags; + int function_specifier_flags; + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt; + struct struct_or_union_specifier * struct_or_union_specifier; + struct enum_specifier * enum_specifier; + struct declarator * typedef_declarator; + struct typeof_specifier * typeof_specifier; + struct token * first_token; + struct token * last_token; + struct declaration_specifier * head; + struct declaration_specifier * tail; +}; + +struct init_declarator { + unsigned char has_shared_ownership; + struct declarator * p_declarator; + struct initializer * initializer; + struct init_declarator * next; +}; + +struct type_qualifier { + int flags; + struct token * token; + struct type_qualifier * next; +}; + +struct alignment_specifier { + struct type_name * type_name; + struct expression * constant_expression; + struct token * token; +}; + +struct balanced_token_sequence { + struct balanced_token * head; + struct balanced_token * tail; +}; + +struct enumerator { + unsigned char has_shared_ownership; + struct token * token; + struct attribute_specifier_sequence * attribute_specifier_sequence_opt; + struct expression * constant_expression_opt; + struct enum_specifier * enum_specifier; + struct enumerator * next; + struct object value; +}; + +struct designator { + struct expression * constant_expression_opt; + struct token * token; + struct designator * next; +}; + +struct pointer { + struct attribute_specifier_sequence * attribute_specifier_sequence_opt; + struct type_qualifier_list * type_qualifier_list_opt; + struct pointer * pointer; +}; + +struct function_declarator { + struct direct_declarator * direct_declarator; + struct scope parameters_scope; + struct parameter_type_list * parameter_type_list_opt; +}; + +struct param { + struct type type; + struct param * next; +}; + +struct expression { + int expression_type; + struct type type; + struct object object; + struct type_name * type_name; + struct braced_initializer * braced_initializer; + struct compound_statement * compound_statement; + struct generic_selection * generic_selection; + struct token * first_token; + struct token * last_token; + struct declarator * declarator; + int member_index; + struct argument_expression_list argument_expression_list; + struct expression * condition_expr; + struct expression * left; + struct expression * right; + unsigned char is_assignment_expression; +}; + +struct map_entry { + struct map_entry * next; + unsigned int hash; + char * key; + int type; + union _struct_tag_1 data; +}; + +struct declaration_specifier { + struct storage_class_specifier * storage_class_specifier; + struct type_specifier_qualifier * type_specifier_qualifier; + struct function_specifier * function_specifier; + struct declaration_specifier * next; +}; + + +unsigned char unsigned_long_long_sub(unsigned long long * result, unsigned long long a, unsigned long long b) +{ + *result = 0; + if (a < b) + { + return 0; + } + *result = a - b; + return 1; +} + +unsigned char unsigned_long_long_mul(unsigned long long * result, unsigned long long a, unsigned long long b) +{ + *result = 0; + if (b == 0) + { + *result = 0; + return 1; + } + if (a > 18446744073709551615ULL / b) + { + return 0; + } + *result = a * b; + return 1; +} + +unsigned char unsigned_long_long_add(unsigned long long * result, unsigned long long a, unsigned long long b) +{ + *result = 0; + if (a > 18446744073709551615ULL - b) + { + return 0; + } + *result = a + b; + return 1; +} + +unsigned char signed_long_long_sub(signed long long * result, signed long long a, signed long long b) +{ + *result = 0; + if (a >= 0 && b >= 0) + { + } + else + { + if (a < 0 && b < 0) + { + } + else + { + if (a < 0) + { + if (a < ( -9223372036854775807LL - 1) + b) + { + return 0; + } + } + else + { + if (b == ( -9223372036854775807LL - 1)) + { + return 0; + } + if (a > 9223372036854775807LL - ( -b)) + { + return 0; + } + } + } + } + *result = a - b; + return 1; +} + +unsigned char signed_long_long_add(signed long long * result, signed long long a, signed long long b) +{ + *result = 0; + if (a >= 0 && b >= 0) + { + if (a > 9223372036854775807LL - b) + { + return 0; + } + } + else + { + if (a < 0 && b < 0) + { + if (a == ( -9223372036854775807LL - 1) || b == ( -9223372036854775807LL - 1)) + { + return 0; + } + if (a < ( -9223372036854775807LL - 1) - b) + { + return 0; + } + } + else + { + } + } + *result = a + b; + return 1; +} + +unsigned char signed_long_long_mul(signed long long * result, signed long long a, signed long long b) +{ + *result = 0; + if (a > 0 && b > 0) + { + if (a > 9223372036854775807LL / b) + { + return 0; + } + } + else + { + if (a < 0 && b < 0) + { + if (a == ( -9223372036854775807LL - 1) || b == ( -9223372036854775807LL - 1)) + { + return 0; + } + if ( -a > 9223372036854775807LL / -b) + { + return 0; + } + } + else + { + if (a == 0 || b == 0) + { + *result = 0; + return 1; + } + if (b > 0) + { + if (a < ( -9223372036854775807LL - 1) / b) + { + return 0; + } + } + else + { + if (b < ( -9223372036854775807LL - 1) / a) + { + return 0; + } + } + } + } + *result = a * b; + return 1; +} + +void free(void * ptr); + +void object_delete(struct object * p) +{ + if (p) + { + free(p->debug_name); + free(p); + } +} + +struct object *object_get_referenced(struct object * p_object); + +unsigned char object_has_constant_value(struct object * a) +{ + a = object_get_referenced(a); + return a->state == 3; +} + +int snprintf(char * _Buffer, unsigned int _BufferCount, char * _Format, ...); + +void object_to_string(struct object * a, char buffer[], int sz) +{ + a = object_get_referenced(a); + buffer[0] = 0; + switch (a->value_type) + { + case 2 : + snprintf(buffer, sz, "%s", a->value.signed_char_value ? "true" : "false"); + break; + case 3 : + snprintf(buffer, sz, "%c", a->value.signed_char_value); + break; + case 4 : + snprintf(buffer, sz, "%c", a->value.unsigned_char_value); + break; + case 5 : + snprintf(buffer, sz, "%c", a->value.signed_short_value); + break; + case 6 : + snprintf(buffer, sz, "%c", a->value.signed_short_value); + break; + case 0 : + snprintf(buffer, sz, "%d", a->value.signed_int_value); + break; + case 1 : + snprintf(buffer, sz, "%u", a->value.signed_int_value); + break; + case 7 : + snprintf(buffer, sz, "%ld", a->value.signed_long_value); + break; + case 8 : + break; + case 9 : + snprintf(buffer, sz, "%lud", a->value.signed_long_value); + break; + case 10 : + snprintf(buffer, sz, "%llu", a->value.signed_long_long_value); + break; + case 11 : + snprintf(buffer, sz, "%f", a->value.float_value); + break; + case 12 : + snprintf(buffer, sz, "%f", a->value.double_value); + break; + case 13 : + snprintf(buffer, sz, "%Lf", a->value.long_double_value); + break; + } +} + +struct object object_make_size_t(unsigned int value) +{ + struct object r = {0}; + r.state = 3; + r.value_type = 1; + r.value.unsigned_int_value = value; + return r; +} + +struct object object_make_nullptr() +{ + struct object r = {0}; + r.state = 3; + r.value_type = 0; + r.value.signed_short_value = 0; + return r; +} + +struct object object_make_wchar_t(unsigned short value) +{ + struct object r = {0}; + r.state = 3; + r.value_type = 5; + r.value.signed_short_value = value; + return r; +} + +struct object object_make_bool(unsigned char value) +{ + struct object r = {0}; + r.state = 3; + r.value_type = 2; + r.value.bool_value = value; + return r; +} + +unsigned char object_to_bool(struct object * a) +{ + a = object_get_referenced(a); + switch (a->value_type) + { + case 2 : + return a->value.bool_value; + case 3 : + return a->value.signed_char_value; + case 4 : + return a->value.unsigned_char_value; + case 5 : + return a->value.signed_short_value; + case 6 : + return a->value.unsigned_short_value; + case 0 : + return a->value.signed_int_value; + case 1 : + return a->value.unsigned_int_value; + case 7 : + return a->value.signed_long_value; + case 8 : + return a->value.unsigned_long_value; + case 9 : + return a->value.signed_long_long_value; + case 10 : + return a->value.unsigned_long_long_value; + case 11 : + return a->value.float_value; + case 12 : + return a->value.double_value; + case 13 : + return a->value.long_double_value; + } + ; + return 0; +} + +struct object object_make_signed_char(signed char value) +{ + struct object r = {0}; + r.state = 3; + r.value_type = 3; + r.value.signed_char_value = value; + return r; +} + +int object_increment_value(struct object * a) +{ + a = object_get_referenced(a); + switch (a->value_type) + { + case 2 : + return a->value.bool_value++; + case 3 : + return a->value.signed_char_value++; + case 4 : + return a->value.unsigned_char_value++; + case 5 : + return a->value.signed_short_value++; + case 6 : + return a->value.unsigned_short_value++; + case 0 : + return a->value.signed_int_value++; + case 1 : + return a->value.unsigned_int_value++; + case 7 : + return a->value.signed_long_value++; + case 8 : + return a->value.unsigned_long_value++; + case 9 : + return a->value.signed_long_long_value++; + case 10 : + return a->value.unsigned_long_long_value++; + case 11 : + return a->value.float_value++; + case 12 : + return a->value.double_value++; + case 13 : + return a->value.long_double_value++; + } + ; + return 0; +} + +signed char object_to_signed_char(struct object * a) +{ + a = object_get_referenced(a); + switch (a->value_type) + { + case 2 : + return a->value.bool_value; + case 3 : + return a->value.signed_char_value; + case 4 : + return a->value.unsigned_char_value; + case 5 : + return a->value.signed_short_value; + case 6 : + return a->value.unsigned_short_value; + case 0 : + return a->value.signed_int_value; + case 1 : + return a->value.unsigned_int_value; + case 7 : + return a->value.signed_long_value; + case 8 : + return a->value.unsigned_long_value; + case 9 : + return a->value.signed_long_long_value; + case 10 : + return a->value.unsigned_long_long_value; + case 11 : + return a->value.float_value; + case 12 : + return a->value.double_value; + case 13 : + return a->value.long_double_value; + } + ; + return 0; +} + +struct object object_make_unsigned_char(unsigned char value) +{ + struct object r = {0}; + r.state = 3; + r.value_type = 4; + r.value.unsigned_char_value = value; + return r; +} + +unsigned char object_to_unsigned_char(struct object * a) +{ + a = object_get_referenced(a); + switch (a->value_type) + { + case 2 : + return a->value.bool_value; + case 3 : + return a->value.signed_char_value; + case 4 : + return a->value.unsigned_char_value; + case 5 : + return a->value.signed_short_value; + case 6 : + return a->value.unsigned_short_value; + case 0 : + return a->value.signed_int_value; + case 1 : + return a->value.unsigned_int_value; + case 7 : + return a->value.signed_long_value; + case 8 : + return a->value.unsigned_long_value; + case 9 : + return a->value.signed_long_long_value; + case 10 : + return a->value.unsigned_long_long_value; + case 11 : + return a->value.float_value; + case 12 : + return a->value.double_value; + case 13 : + return a->value.long_double_value; + } + ; + return 0; +} + +struct object object_make_signed_short(signed short value) +{ + struct object r = {0}; + r.state = 3; + r.value_type = 5; + r.value.signed_short_value = value; + return r; +} + +signed short object_to_signed_short(struct object * a) +{ + a = object_get_referenced(a); + switch (a->value_type) + { + case 2 : + return a->value.bool_value; + case 3 : + return a->value.signed_char_value; + case 4 : + return a->value.unsigned_char_value; + case 5 : + return a->value.signed_short_value; + case 6 : + return a->value.unsigned_short_value; + case 0 : + return a->value.signed_int_value; + case 1 : + return a->value.unsigned_int_value; + case 7 : + return a->value.signed_long_value; + case 8 : + return a->value.unsigned_long_value; + case 9 : + return a->value.signed_long_long_value; + case 10 : + return a->value.unsigned_long_long_value; + case 11 : + return a->value.float_value; + case 12 : + return a->value.double_value; + case 13 : + return a->value.long_double_value; + } + ; + return 0; +} + +struct object object_make_unsigned_short(unsigned short value) +{ + struct object r = {0}; + r.state = 3; + r.value_type = 6; + r.value.unsigned_short_value = value; + return r; +} + +unsigned short object_to_unsigned_short(struct object * a) +{ + a = object_get_referenced(a); + switch (a->value_type) + { + case 2 : + return a->value.bool_value; + case 3 : + return a->value.signed_char_value; + case 4 : + return a->value.unsigned_char_value; + case 5 : + return a->value.signed_short_value; + case 6 : + return a->value.unsigned_short_value; + case 0 : + return a->value.signed_int_value; + case 1 : + return a->value.unsigned_int_value; + case 7 : + return a->value.signed_long_value; + case 8 : + return a->value.unsigned_long_value; + case 9 : + return a->value.signed_long_long_value; + case 10 : + return a->value.unsigned_long_long_value; + case 11 : + return a->value.float_value; + case 12 : + return a->value.double_value; + case 13 : + return a->value.long_double_value; + } + ; + return 0; +} + +struct object object_make_signed_int(signed int value) +{ + struct object r = {0}; + r.state = 3; + r.value_type = 0; + r.value.signed_int_value = value; + return r; +} + +signed int object_to_signed_int(struct object * a) +{ + a = object_get_referenced(a); + switch (a->value_type) + { + case 2 : + return a->value.bool_value; + case 3 : + return a->value.signed_char_value; + case 4 : + return a->value.unsigned_char_value; + case 5 : + return a->value.signed_short_value; + case 6 : + return a->value.unsigned_short_value; + case 0 : + return a->value.signed_int_value; + case 1 : + return a->value.unsigned_int_value; + case 7 : + return a->value.signed_long_value; + case 8 : + return a->value.unsigned_long_value; + case 9 : + return a->value.signed_long_long_value; + case 10 : + return a->value.unsigned_long_long_value; + case 11 : + return a->value.float_value; + case 12 : + return a->value.double_value; + case 13 : + return a->value.long_double_value; + } + ; + return 0; +} + +struct object object_make_unsigned_int(unsigned int value) +{ + struct object r = {0}; + r.state = 3; + r.value_type = 1; + r.value.unsigned_int_value = value; + return r; +} + +unsigned int object_to_unsigned_int(struct object * a) +{ + a = object_get_referenced(a); + switch (a->value_type) + { + case 2 : + return a->value.bool_value; + case 3 : + return a->value.signed_char_value; + case 4 : + return a->value.unsigned_char_value; + case 5 : + return a->value.signed_short_value; + case 6 : + return a->value.unsigned_short_value; + case 0 : + return a->value.signed_int_value; + case 1 : + return a->value.unsigned_int_value; + case 7 : + return a->value.signed_long_value; + case 8 : + return a->value.unsigned_long_value; + case 9 : + return a->value.signed_long_long_value; + case 10 : + return a->value.unsigned_long_long_value; + case 11 : + return a->value.float_value; + case 12 : + return a->value.double_value; + case 13 : + return a->value.long_double_value; + } + ; + return 0; +} + +struct object object_make_signed_long(signed long value) +{ + struct object r = {0}; + r.state = 3; + r.value_type = 7; + r.value.signed_long_value = value; + return r; +} + +signed long object_to_signed_long(struct object * a) +{ + a = object_get_referenced(a); + switch (a->value_type) + { + case 2 : + return a->value.bool_value; + case 3 : + return a->value.signed_char_value; + case 4 : + return a->value.unsigned_char_value; + case 5 : + return a->value.signed_short_value; + case 6 : + return a->value.unsigned_short_value; + case 0 : + return a->value.signed_int_value; + case 1 : + return a->value.unsigned_int_value; + case 7 : + return a->value.signed_long_value; + case 8 : + return a->value.unsigned_long_value; + case 9 : + return a->value.signed_long_long_value; + case 10 : + return a->value.unsigned_long_long_value; + case 11 : + return a->value.float_value; + case 12 : + return a->value.double_value; + case 13 : + return a->value.long_double_value; + } + ; + return 0; +} + +struct object object_make_unsigned_long(unsigned long value) +{ + struct object r = {0}; + r.state = 3; + r.value_type = 8; + r.value.unsigned_long_value = value; + return r; +} + +unsigned long object_to_unsigned_long(struct object * a) +{ + a = object_get_referenced(a); + switch (a->value_type) + { + case 2 : + return a->value.bool_value; + case 3 : + return a->value.signed_char_value; + case 4 : + return a->value.unsigned_char_value; + case 5 : + return a->value.signed_short_value; + case 6 : + return a->value.unsigned_short_value; + case 0 : + return a->value.signed_int_value; + case 1 : + return a->value.unsigned_int_value; + case 7 : + return a->value.signed_long_value; + case 8 : + return a->value.unsigned_long_value; + case 9 : + return a->value.signed_long_long_value; + case 10 : + return a->value.unsigned_long_long_value; + case 11 : + return a->value.float_value; + case 12 : + return a->value.double_value; + case 13 : + return a->value.long_double_value; + } + ; + return 0; +} + +struct object object_make_signed_long_long(signed long long value) +{ + struct object r = {0}; + r.state = 3; + r.value_type = 9; + r.value.signed_long_long_value = value; + return r; +} + +signed long long object_to_signed_long_long(struct object * a) +{ + a = object_get_referenced(a); + switch (a->value_type) + { + case 2 : + return a->value.bool_value; + case 3 : + return a->value.signed_char_value; + case 4 : + return a->value.unsigned_char_value; + case 5 : + return a->value.signed_short_value; + case 6 : + return a->value.unsigned_short_value; + case 0 : + return a->value.signed_int_value; + case 1 : + return a->value.unsigned_int_value; + case 7 : + return a->value.signed_long_value; + case 8 : + return a->value.unsigned_long_value; + case 9 : + return a->value.signed_long_long_value; + case 10 : + return a->value.unsigned_long_long_value; + case 11 : + return a->value.float_value; + case 12 : + return a->value.double_value; + case 13 : + return a->value.long_double_value; + } + ; + return 0; +} + +struct object object_make_unsigned_long_long(unsigned long long value) +{ + struct object r = {0}; + r.state = 3; + r.value_type = 10; + r.value.unsigned_long_long_value = value; + return r; +} + +unsigned long long object_to_unsigned_long_long(struct object * a) +{ + a = object_get_referenced(a); + switch (a->value_type) + { + case 2 : + return a->value.bool_value; + case 3 : + return a->value.signed_char_value; + case 4 : + return a->value.unsigned_char_value; + case 5 : + return a->value.signed_short_value; + case 6 : + return a->value.unsigned_short_value; + case 0 : + return a->value.signed_int_value; + case 1 : + return a->value.unsigned_int_value; + case 7 : + return a->value.signed_long_value; + case 8 : + return a->value.unsigned_long_value; + case 9 : + return a->value.signed_long_long_value; + case 10 : + return a->value.unsigned_long_long_value; + case 11 : + return a->value.float_value; + case 12 : + return a->value.double_value; + case 13 : + return a->value.long_double_value; + } + ; + return 0; +} + +struct object object_make_float(float value) +{ + struct object r = {0}; + r.state = 3; + r.value_type = 11; + r.value.float_value = value; + return r; +} + +float object_to_float(struct object * a) +{ + a = object_get_referenced(a); + switch (a->value_type) + { + case 2 : + return a->value.bool_value; + case 3 : + return a->value.signed_char_value; + case 4 : + return a->value.unsigned_char_value; + case 5 : + return a->value.signed_short_value; + case 6 : + return a->value.unsigned_short_value; + case 0 : + return a->value.signed_int_value; + case 1 : + return a->value.unsigned_int_value; + case 7 : + return a->value.signed_long_value; + case 8 : + return a->value.unsigned_long_value; + case 9 : + return a->value.signed_long_long_value; + case 10 : + return a->value.unsigned_long_long_value; + case 11 : + return a->value.float_value; + case 12 : + return a->value.double_value; + case 13 : + return a->value.long_double_value; + } + ; + return 0; +} + +struct object object_make_double(double value) +{ + struct object r = {0}; + r.state = 3; + r.value_type = 12; + r.value.double_value = value; + return r; +} + +double object_to_double(struct object * a) +{ + a = object_get_referenced(a); + switch (a->value_type) + { + case 2 : + return a->value.bool_value; + case 3 : + return a->value.signed_char_value; + case 4 : + return a->value.unsigned_char_value; + case 5 : + return a->value.signed_short_value; + case 6 : + return a->value.unsigned_short_value; + case 0 : + return a->value.signed_int_value; + case 1 : + return a->value.unsigned_int_value; + case 7 : + return a->value.signed_long_value; + case 8 : + return a->value.unsigned_long_value; + case 9 : + return a->value.signed_long_long_value; + case 10 : + return a->value.unsigned_long_long_value; + case 11 : + return a->value.float_value; + case 12 : + return a->value.double_value; + case 13 : + return a->value.long_double_value; + } + ; + return 0; +} + +struct object object_make_reference(struct object * object) +{ + struct object r = {0}; + r.state = 4; + r.value_type = 0; + r.value.signed_int_value = 0; + r.members = object_get_referenced(object); + return r; +} + +struct object object_make_long_double(long double value) +{ + struct object r = {0}; + r.state = 3; + r.value_type = 13; + r.value.long_double_value = value; + return r; +} + +long double object_to_long_double(struct object * a) +{ + a = object_get_referenced(a); + switch (a->value_type) + { + case 2 : + return a->value.bool_value; + case 3 : + return a->value.signed_char_value; + case 4 : + return a->value.unsigned_char_value; + case 5 : + return a->value.signed_short_value; + case 6 : + return a->value.unsigned_short_value; + case 0 : + return a->value.signed_int_value; + case 1 : + return a->value.unsigned_int_value; + case 7 : + return a->value.signed_long_value; + case 8 : + return a->value.unsigned_long_value; + case 9 : + return a->value.signed_long_long_value; + case 10 : + return a->value.unsigned_long_long_value; + case 11 : + return a->value.float_value; + case 12 : + return a->value.double_value; + case 13 : + return a->value.long_double_value; + } + ; + return 0; +} + +struct object object_cast(int t, struct object * v) +{ + v = object_get_referenced(v); + if (v->value_type == t) + { + return *v; + } + if (t == 2) + { + if (v->value_type == 3) + { + return object_make_bool((unsigned char )v->value.signed_char_value); + } + if (v->value_type == 4) + { + return object_make_bool((unsigned char )v->value.unsigned_char_value); + } + if (v->value_type == 5) + { + return object_make_bool((unsigned char )v->value.signed_short_value); + } + if (v->value_type == 6) + { + return object_make_bool((unsigned char )v->value.unsigned_short_value); + } + if (v->value_type == 0) + { + return object_make_bool((unsigned char )v->value.signed_int_value); + } + if (v->value_type == 1) + { + return object_make_bool((unsigned char )v->value.unsigned_int_value); + } + if (v->value_type == 7) + { + return object_make_bool((unsigned char )v->value.signed_long_value); + } + if (v->value_type == 8) + { + return object_make_bool((unsigned char )v->value.unsigned_long_value); + } + if (v->value_type == 9) + { + return object_make_bool((unsigned char )v->value.signed_long_long_value); + } + if (v->value_type == 10) + { + return object_make_bool((unsigned char )v->value.unsigned_long_long_value); + } + if (v->value_type == 11) + { + return object_make_bool((unsigned char )v->value.float_value); + } + if (v->value_type == 12) + { + return object_make_bool((unsigned char )v->value.double_value); + } + if (v->value_type == 13) + { + return object_make_bool((unsigned char )v->value.long_double_value); + } + } + if (t == 3) + { + if (v->value_type == 2) + { + return object_make_signed_char((signed char)v->value.bool_value); + } + if (v->value_type == 4) + { + return object_make_signed_char((signed char)v->value.unsigned_char_value); + } + if (v->value_type == 5) + { + return object_make_signed_char((signed char)v->value.signed_short_value); + } + if (v->value_type == 6) + { + return object_make_signed_char((signed char)v->value.unsigned_short_value); + } + if (v->value_type == 0) + { + return object_make_signed_char((signed char)v->value.signed_int_value); + } + if (v->value_type == 1) + { + return object_make_signed_char((signed char)v->value.unsigned_int_value); + } + if (v->value_type == 7) + { + return object_make_signed_char((signed char)v->value.signed_long_value); + } + if (v->value_type == 8) + { + return object_make_signed_char((signed char)v->value.unsigned_long_value); + } + if (v->value_type == 9) + { + return object_make_signed_char((signed char)v->value.signed_long_long_value); + } + if (v->value_type == 10) + { + return object_make_signed_char((signed char)v->value.unsigned_long_long_value); + } + if (v->value_type == 11) + { + return object_make_signed_char((signed char)v->value.float_value); + } + if (v->value_type == 12) + { + return object_make_signed_char((signed char)v->value.double_value); + } + if (v->value_type == 13) + { + return object_make_signed_char((signed char)v->value.long_double_value); + } + } + if (t == 4) + { + if (v->value_type == 2) + { + return object_make_unsigned_char((unsigned char)v->value.bool_value); + } + if (v->value_type == 3) + { + return object_make_unsigned_char((unsigned char)v->value.signed_char_value); + } + if (v->value_type == 5) + { + return object_make_unsigned_char((unsigned char)v->value.signed_short_value); + } + if (v->value_type == 6) + { + return object_make_unsigned_char((unsigned char)v->value.unsigned_short_value); + } + if (v->value_type == 0) + { + return object_make_unsigned_char((unsigned char)v->value.signed_int_value); + } + if (v->value_type == 1) + { + return object_make_unsigned_char((unsigned char)v->value.unsigned_int_value); + } + if (v->value_type == 7) + { + return object_make_unsigned_char((unsigned char)v->value.signed_long_value); + } + if (v->value_type == 8) + { + return object_make_unsigned_char((unsigned char)v->value.unsigned_long_value); + } + if (v->value_type == 9) + { + return object_make_unsigned_char((unsigned char)v->value.signed_long_long_value); + } + if (v->value_type == 10) + { + return object_make_unsigned_char((unsigned char)v->value.unsigned_long_long_value); + } + if (v->value_type == 11) + { + return object_make_unsigned_char((unsigned char)v->value.float_value); + } + if (v->value_type == 12) + { + return object_make_unsigned_char((unsigned char)v->value.double_value); + } + if (v->value_type == 13) + { + return object_make_unsigned_char((unsigned char)v->value.long_double_value); + } + } + if (t == 5) + { + if (v->value_type == 2) + { + return object_make_signed_short((signed short)v->value.bool_value); + } + if (v->value_type == 3) + { + return object_make_signed_short((signed short)v->value.signed_char_value); + } + if (v->value_type == 4) + { + return object_make_signed_short((signed short)v->value.unsigned_char_value); + } + if (v->value_type == 6) + { + return object_make_signed_short((signed short)v->value.unsigned_short_value); + } + if (v->value_type == 0) + { + return object_make_signed_short((signed short)v->value.signed_int_value); + } + if (v->value_type == 1) + { + return object_make_signed_short((signed short)v->value.unsigned_int_value); + } + if (v->value_type == 7) + { + return object_make_signed_short((signed short)v->value.signed_long_value); + } + if (v->value_type == 8) + { + return object_make_signed_short((signed short)v->value.unsigned_long_value); + } + if (v->value_type == 9) + { + return object_make_signed_short((signed short)v->value.signed_long_long_value); + } + if (v->value_type == 10) + { + return object_make_signed_short((signed short)v->value.unsigned_long_long_value); + } + if (v->value_type == 11) + { + return object_make_signed_short((signed short)v->value.float_value); + } + if (v->value_type == 12) + { + return object_make_signed_short((signed short)v->value.double_value); + } + if (v->value_type == 13) + { + return object_make_signed_short((signed short)v->value.long_double_value); + } + } + if (t == 6) + { + if (v->value_type == 2) + { + return object_make_unsigned_short((unsigned short)v->value.bool_value); + } + if (v->value_type == 3) + { + return object_make_unsigned_short((unsigned short)v->value.signed_char_value); + } + if (v->value_type == 4) + { + return object_make_unsigned_short((unsigned short)v->value.unsigned_char_value); + } + if (v->value_type == 5) + { + return object_make_unsigned_short((unsigned short)v->value.signed_short_value); + } + if (v->value_type == 0) + { + return object_make_unsigned_short((unsigned short)v->value.signed_int_value); + } + if (v->value_type == 1) + { + return object_make_unsigned_short((unsigned short)v->value.unsigned_int_value); + } + if (v->value_type == 7) + { + return object_make_unsigned_short((unsigned short)v->value.signed_long_value); + } + if (v->value_type == 8) + { + return object_make_unsigned_short((unsigned short)v->value.unsigned_long_value); + } + if (v->value_type == 9) + { + return object_make_unsigned_short((unsigned short)v->value.signed_long_long_value); + } + if (v->value_type == 10) + { + return object_make_unsigned_short((unsigned short)v->value.unsigned_long_long_value); + } + if (v->value_type == 11) + { + return object_make_unsigned_short((unsigned short)v->value.float_value); + } + if (v->value_type == 12) + { + return object_make_unsigned_short((unsigned short)v->value.double_value); + } + if (v->value_type == 13) + { + return object_make_unsigned_short((unsigned short)v->value.long_double_value); + } + } + if (t == 0) + { + if (v->value_type == 2) + { + return object_make_signed_int((signed int)v->value.bool_value); + } + if (v->value_type == 3) + { + return object_make_signed_int((signed int)v->value.signed_char_value); + } + if (v->value_type == 4) + { + return object_make_signed_int((signed int)v->value.unsigned_char_value); + } + if (v->value_type == 5) + { + return object_make_signed_int((signed int)v->value.signed_short_value); + } + if (v->value_type == 6) + { + return object_make_signed_int((signed int)v->value.unsigned_short_value); + } + if (v->value_type == 1) + { + return object_make_signed_int((signed int)v->value.unsigned_int_value); + } + if (v->value_type == 7) + { + return object_make_signed_int((signed int)v->value.signed_long_value); + } + if (v->value_type == 8) + { + return object_make_signed_int((signed int)v->value.unsigned_long_value); + } + if (v->value_type == 9) + { + return object_make_signed_int((signed int)v->value.signed_long_long_value); + } + if (v->value_type == 10) + { + return object_make_signed_int((signed int)v->value.unsigned_long_long_value); + } + if (v->value_type == 11) + { + return object_make_signed_int((signed int)v->value.float_value); + } + if (v->value_type == 12) + { + return object_make_signed_int((signed int)v->value.double_value); + } + if (v->value_type == 13) + { + return object_make_signed_int((signed int)v->value.long_double_value); + } + } + if (t == 1) + { + if (v->value_type == 2) + { + return object_make_unsigned_int((unsigned int)v->value.bool_value); + } + if (v->value_type == 3) + { + return object_make_unsigned_int((unsigned int)v->value.signed_char_value); + } + if (v->value_type == 4) + { + return object_make_unsigned_int((unsigned int)v->value.unsigned_char_value); + } + if (v->value_type == 5) + { + return object_make_unsigned_int((unsigned int)v->value.signed_short_value); + } + if (v->value_type == 6) + { + return object_make_unsigned_int((unsigned int)v->value.unsigned_short_value); + } + if (v->value_type == 0) + { + return object_make_unsigned_int((unsigned int)v->value.signed_int_value); + } + if (v->value_type == 7) + { + return object_make_unsigned_int((unsigned int)v->value.signed_long_value); + } + if (v->value_type == 8) + { + return object_make_unsigned_int((unsigned int)v->value.unsigned_long_value); + } + if (v->value_type == 9) + { + return object_make_unsigned_int((unsigned int)v->value.signed_long_long_value); + } + if (v->value_type == 10) + { + return object_make_unsigned_int((unsigned int)v->value.unsigned_long_long_value); + } + if (v->value_type == 11) + { + return object_make_unsigned_int((unsigned int)v->value.float_value); + } + if (v->value_type == 12) + { + return object_make_unsigned_int((unsigned int)v->value.double_value); + } + if (v->value_type == 13) + { + return object_make_unsigned_int((unsigned int)v->value.long_double_value); + } + } + if (t == 7) + { + if (v->value_type == 2) + { + return object_make_signed_long((signed long)v->value.bool_value); + } + if (v->value_type == 3) + { + return object_make_signed_long((signed long)v->value.signed_char_value); + } + if (v->value_type == 4) + { + return object_make_signed_long((signed long)v->value.unsigned_char_value); + } + if (v->value_type == 5) + { + return object_make_signed_long((signed long)v->value.signed_short_value); + } + if (v->value_type == 6) + { + return object_make_signed_long((signed long)v->value.unsigned_short_value); + } + if (v->value_type == 0) + { + return object_make_signed_long((signed long)v->value.signed_int_value); + } + if (v->value_type == 1) + { + return object_make_signed_long((signed long)v->value.unsigned_int_value); + } + if (v->value_type == 8) + { + return object_make_signed_long((signed long)v->value.unsigned_long_value); + } + if (v->value_type == 9) + { + return object_make_signed_long((signed long)v->value.signed_long_long_value); + } + if (v->value_type == 10) + { + return object_make_signed_long((signed long)v->value.unsigned_long_long_value); + } + if (v->value_type == 11) + { + return object_make_signed_long((signed long)v->value.float_value); + } + if (v->value_type == 12) + { + return object_make_signed_long((signed long)v->value.double_value); + } + if (v->value_type == 13) + { + return object_make_signed_long((signed long)v->value.long_double_value); + } + } + if (t == 8) + { + if (v->value_type == 2) + { + return object_make_unsigned_long((unsigned long)v->value.bool_value); + } + if (v->value_type == 3) + { + return object_make_unsigned_long((unsigned long)v->value.signed_char_value); + } + if (v->value_type == 4) + { + return object_make_unsigned_long((unsigned long)v->value.unsigned_char_value); + } + if (v->value_type == 5) + { + return object_make_unsigned_long((unsigned long)v->value.signed_short_value); + } + if (v->value_type == 6) + { + return object_make_unsigned_long((unsigned long)v->value.unsigned_short_value); + } + if (v->value_type == 0) + { + return object_make_unsigned_long((unsigned long)v->value.signed_int_value); + } + if (v->value_type == 1) + { + return object_make_unsigned_long((unsigned long)v->value.unsigned_int_value); + } + if (v->value_type == 7) + { + return object_make_unsigned_long((unsigned long)v->value.signed_long_value); + } + if (v->value_type == 9) + { + return object_make_unsigned_long((unsigned long)v->value.signed_long_long_value); + } + if (v->value_type == 10) + { + return object_make_unsigned_long((unsigned long)v->value.unsigned_long_long_value); + } + if (v->value_type == 11) + { + return object_make_unsigned_long((unsigned long)v->value.float_value); + } + if (v->value_type == 12) + { + return object_make_unsigned_long((unsigned long)v->value.double_value); + } + if (v->value_type == 13) + { + return object_make_unsigned_long((unsigned long)v->value.long_double_value); + } + } + if (t == 9) + { + if (v->value_type == 2) + { + return object_make_signed_long_long((signed long long)v->value.bool_value); + } + if (v->value_type == 3) + { + return object_make_signed_long_long((signed long long)v->value.signed_char_value); + } + if (v->value_type == 4) + { + return object_make_signed_long_long((signed long long)v->value.unsigned_char_value); + } + if (v->value_type == 5) + { + return object_make_signed_long_long((signed long long)v->value.signed_short_value); + } + if (v->value_type == 6) + { + return object_make_signed_long_long((signed long long)v->value.unsigned_short_value); + } + if (v->value_type == 0) + { + return object_make_signed_long_long((signed long long)v->value.signed_int_value); + } + if (v->value_type == 1) + { + return object_make_signed_long_long((signed long long)v->value.unsigned_int_value); + } + if (v->value_type == 7) + { + return object_make_signed_long_long((signed long long)v->value.signed_long_value); + } + if (v->value_type == 8) + { + return object_make_signed_long_long((signed long long)v->value.unsigned_long_value); + } + if (v->value_type == 10) + { + return object_make_signed_long_long((signed long long)v->value.unsigned_long_long_value); + } + if (v->value_type == 11) + { + return object_make_signed_long_long((signed long long)v->value.float_value); + } + if (v->value_type == 12) + { + return object_make_signed_long_long((signed long long)v->value.double_value); + } + if (v->value_type == 13) + { + return object_make_signed_long_long((signed long long)v->value.long_double_value); + } + } + if (t == 10) + { + if (v->value_type == 2) + { + return object_make_unsigned_long_long((unsigned long long)v->value.bool_value); + } + if (v->value_type == 3) + { + return object_make_unsigned_long_long((unsigned long long)v->value.signed_char_value); + } + if (v->value_type == 4) + { + return object_make_unsigned_long_long((unsigned long long)v->value.unsigned_char_value); + } + if (v->value_type == 5) + { + return object_make_unsigned_long_long((unsigned long long)v->value.signed_short_value); + } + if (v->value_type == 6) + { + return object_make_unsigned_long_long((unsigned long long)v->value.unsigned_short_value); + } + if (v->value_type == 0) + { + return object_make_unsigned_long_long((unsigned long long)v->value.signed_int_value); + } + if (v->value_type == 1) + { + return object_make_unsigned_long_long((unsigned long long)v->value.unsigned_int_value); + } + if (v->value_type == 7) + { + return object_make_unsigned_long_long((unsigned long long)v->value.signed_long_value); + } + if (v->value_type == 8) + { + return object_make_unsigned_long_long((unsigned long long)v->value.unsigned_long_value); + } + if (v->value_type == 9) + { + return object_make_unsigned_long_long((unsigned long long)v->value.signed_long_long_value); + } + if (v->value_type == 11) + { + return object_make_unsigned_long_long((unsigned long long)v->value.float_value); + } + if (v->value_type == 12) + { + return object_make_unsigned_long_long((unsigned long long)v->value.double_value); + } + if (v->value_type == 13) + { + return object_make_unsigned_long_long((unsigned long long)v->value.long_double_value); + } + } + if (t == 11) + { + if (v->value_type == 2) + { + return object_make_float((float)v->value.bool_value); + } + if (v->value_type == 3) + { + return object_make_float((float)v->value.signed_char_value); + } + if (v->value_type == 4) + { + return object_make_float((float)v->value.unsigned_char_value); + } + if (v->value_type == 5) + { + return object_make_float((float)v->value.signed_short_value); + } + if (v->value_type == 6) + { + return object_make_float((float)v->value.unsigned_short_value); + } + if (v->value_type == 0) + { + return object_make_float((float)v->value.signed_int_value); + } + if (v->value_type == 1) + { + return object_make_float((float)v->value.unsigned_int_value); + } + if (v->value_type == 7) + { + return object_make_float((float)v->value.signed_long_value); + } + if (v->value_type == 8) + { + return object_make_float((float)v->value.unsigned_long_value); + } + if (v->value_type == 9) + { + return object_make_float((float)v->value.signed_long_long_value); + } + if (v->value_type == 10) + { + return object_make_float((float)v->value.unsigned_long_long_value); + } + if (v->value_type == 12) + { + return object_make_float((float)v->value.double_value); + } + if (v->value_type == 13) + { + return object_make_float((float)v->value.long_double_value); + } + } + if (t == 12) + { + if (v->value_type == 2) + { + return object_make_double((double)v->value.bool_value); + } + if (v->value_type == 3) + { + return object_make_double((double)v->value.signed_char_value); + } + if (v->value_type == 4) + { + return object_make_double((double)v->value.unsigned_char_value); + } + if (v->value_type == 5) + { + return object_make_double((double)v->value.signed_short_value); + } + if (v->value_type == 6) + { + return object_make_double((double)v->value.unsigned_short_value); + } + if (v->value_type == 0) + { + return object_make_double((double)v->value.signed_int_value); + } + if (v->value_type == 1) + { + return object_make_double((double)v->value.unsigned_int_value); + } + if (v->value_type == 7) + { + return object_make_double((double)v->value.signed_long_value); + } + if (v->value_type == 8) + { + return object_make_double((double)v->value.unsigned_long_value); + } + if (v->value_type == 9) + { + return object_make_double((double)v->value.signed_long_long_value); + } + if (v->value_type == 10) + { + return object_make_double((double)v->value.unsigned_long_long_value); + } + if (v->value_type == 11) + { + return object_make_double((double)v->value.float_value); + } + if (v->value_type == 13) + { + return object_make_double((double)v->value.long_double_value); + } + } + if (t == 13) + { + if (v->value_type == 2) + { + return object_make_long_double((long double)v->value.bool_value); + } + if (v->value_type == 3) + { + return object_make_long_double((long double)v->value.signed_char_value); + } + if (v->value_type == 4) + { + return object_make_long_double((long double)v->value.unsigned_char_value); + } + if (v->value_type == 5) + { + return object_make_long_double((long double)v->value.signed_short_value); + } + if (v->value_type == 6) + { + return object_make_long_double((long double)v->value.unsigned_short_value); + } + if (v->value_type == 0) + { + return object_make_long_double((long double)v->value.signed_int_value); + } + if (v->value_type == 1) + { + return object_make_long_double((long double)v->value.unsigned_int_value); + } + if (v->value_type == 7) + { + return object_make_long_double((long double)v->value.signed_long_value); + } + if (v->value_type == 8) + { + return object_make_long_double((long double)v->value.unsigned_long_value); + } + if (v->value_type == 9) + { + return object_make_long_double((long double)v->value.signed_long_long_value); + } + if (v->value_type == 10) + { + return object_make_long_double((long double)v->value.unsigned_long_long_value); + } + if (v->value_type == 11) + { + return object_make_long_double((long double)v->value.float_value); + } + if (v->value_type == 12) + { + return object_make_long_double((long double)v->value.double_value); + } + } + struct object empty = {0}; + return empty; +} + +unsigned char type_is_union(struct type * p_type); + +void object_default_initialization(struct object * p_object, unsigned char is_constant) +{ + if (p_object->members == ((void *)0)) + { + if (is_constant) + { + p_object->state = 3; + } + else + { + p_object->state = 2; + } + p_object->value.unsigned_long_long_value = 0; + } + if (type_is_union(&p_object->type2)) + { + struct object * p = p_object->members; + if (p) + { + object_default_initialization(p, is_constant); + } + } + else + { + struct object * p = p_object->members; + while (p) + { + object_default_initialization(p, is_constant); + p = p->next; + } + } +} + +struct object *object_get_referenced(struct object * p_object) +{ + if (p_object->state == 4) + { + ; + p_object = p_object->members; + } + ; + return p_object; +} + +unsigned char object_is_derived(struct object * p_object) +{ + if (p_object->state == 4) + { + return 0; + } + return p_object->members != ((void *)0); +} + +unsigned char object_is_reference(struct object * p_object) +{ + return p_object->state == 4; +} + +static void object_fix_parent(struct object * p_object, struct object * parent) +{ + struct object * it = p_object->members; + while (it) + { + it->parent = parent; + it = it->next; + } +} + +struct object *object_get_member(struct object * p_object, int index) +{ + p_object = (struct object *)object_get_referenced(p_object); + if (p_object->members == ((void *)0)) + { + return ((void *)0); + } + struct object * it = p_object->members; + int count = 0; + while (it) + { + if (index == count) + { + return it; + } + count++; + it = it->next; + } + return ((void *)0); +} + +void object_set(struct object * to, struct expression * p_init_expression, struct object * from, unsigned char is_constant) +{ + from = object_get_referenced(from); + to->p_init_expression = p_init_expression; + if (object_is_derived(to)) + { + struct object * it_to = to->members; + struct object * it_from = from->members; + while (it_from && it_to) + { + object_set(it_to, ((void *)0), it_from, is_constant); + it_to = it_to->next; + it_from = it_from->next; + } + if (it_from != ((void *)0) || it_to != ((void *)0)) + { + } + } + else + { + ; + to->state = from->state; + to->value = object_cast(to->value_type, from).value; + if ( !is_constant && to->state == 3) + { + to->state = 2; + } + } +} + +void *calloc(int nmemb, unsigned int size); +char *strdup(char * src); +struct type type_dup(struct type * p_type); +struct type get_array_item_type(struct type * p_type); +void type_destroy(struct type * p_type); +int type_to_object_type(struct type * type); +struct struct_or_union_specifier *get_complete_struct_or_union_specifier(struct struct_or_union_specifier * p_struct_or_union_specifier); + +struct object *make_object_ptr_core(struct type * p_type, char * name) +{ + struct object * p_object = ((void *)0); + if (1) + { + if (p_type->category == 1) + { + p_object = calloc(1, sizeof *p_object); + if (p_object == ((void *)0)) + { + goto _catch_label_1; + } + p_object->debug_name = strdup(name); + p_object->type2 = type_dup(p_type); + return p_object; + } + if (p_type->category == 3) + { + p_object = calloc(1, sizeof *p_object); + if (p_object == ((void *)0)) + { + goto _catch_label_1; + } + *p_object = object_make_nullptr(); + p_object->state = 0; + ; + p_object->debug_name = strdup(name); + p_object->type2 = type_dup(p_type); + return p_object; + } + if (p_type->category == 2) + { + p_object = calloc(1, sizeof *p_object); + if (p_object == ((void *)0)) + { + goto _catch_label_1; + } + p_object->type2 = type_dup(p_type); + p_object->debug_name = strdup(name); + if (p_type->num_of_elements > 0) + { + struct type array_item_type = get_array_item_type(p_type); + struct object * p_tail_object = ((void *)0); + { + int i = 0; + for (; i < p_type->num_of_elements; i++) + { + char buffer[200] = {0}; + snprintf(buffer, sizeof buffer, "%s[%d]", name, i); + struct object * p_member_obj = make_object_ptr_core(&array_item_type, buffer); + if (p_member_obj == ((void *)0)) + { + type_destroy(&array_item_type); + goto _catch_label_1; + } + p_member_obj->parent = p_object; + p_member_obj->debug_name = strdup(buffer); + if (p_tail_object == ((void *)0)) + { + ; + p_object->members = p_member_obj; + } + else + { + ; + p_tail_object->next = p_member_obj; + } + p_tail_object = p_member_obj; + } + } + type_destroy(&array_item_type); + } + return p_object; + } + if (p_type->struct_or_union_specifier == ((void *)0)) + { + p_object = calloc(1, sizeof *p_object); + if (p_object == ((void *)0)) + { + goto _catch_label_1; + } + p_object->state = 0; + p_object->value_type = type_to_object_type(p_type); + p_object->value.signed_long_long_value = -1; + p_object->debug_name = strdup(name); + p_object->type2 = type_dup(p_type); + return p_object; + } + 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 == ((void *)0)) + { + goto _catch_label_1; + } + p_object = calloc(1, sizeof *p_object); + if (p_object == ((void *)0)) + { + goto _catch_label_1; + } + p_object->debug_name = strdup(name); + p_object->type2 = type_dup(p_type); + struct object * p_last_member_obj = ((void *)0); + struct member_declaration * p_member_declaration = p_struct_or_union_specifier->member_declaration_list.head; + 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 buffer[200] = {0}; + snprintf(buffer, sizeof buffer, "%s.%s", name, p_member_declarator->declarator->name_opt->lexeme); + struct object * p_member_obj = make_object_ptr_core(&p_member_declarator->declarator->type, buffer); + if (p_member_obj == ((void *)0)) + { + goto _catch_label_1; + } + p_member_obj->parent = p_object; + if (p_object->members == ((void *)0)) + { + p_object->members = p_member_obj; + } + else + { + p_last_member_obj->next = p_member_obj; + } + p_last_member_obj = p_member_obj; + } + p_member_declarator = p_member_declarator->next; + } + } + else + { + if (p_member_declaration->specifier_qualifier_list != ((void *)0)) + { + if (p_member_declaration->specifier_qualifier_list->struct_or_union_specifier) + { + struct type t = {0}; + t.category = 0; + t.struct_or_union_specifier = p_member_declaration->specifier_qualifier_list->struct_or_union_specifier; + t.type_specifier_flags = 32768; + char buffer[200] = {0}; + snprintf(buffer, sizeof buffer, ".%s", name); + struct object * p_member_obj = make_object_ptr_core(&t, buffer); + if (p_member_obj == ((void *)0)) + { + goto _catch_label_1; + } + p_member_obj->parent = p_object; + if (p_last_member_obj == ((void *)0)) + { + ; + p_object->members = p_member_obj; + p_last_member_obj = p_member_obj; + } + else + { + p_last_member_obj->next = p_member_obj; + } + type_destroy(&t); + } + } + } + p_member_declaration = p_member_declaration->next; + } + return p_object; + } + else _catch_label_1: + { + object_delete(p_object); + p_object = ((void *)0); + } + return ((void *)0); +} + +struct object *make_object_ptr(struct type * p_type) +{ + return make_object_ptr_core(p_type, ""); +} + +int make_object(struct type * p_type, struct object * obj) +{ + struct object * p = make_object_ptr_core(p_type, ""); + if (p) + { + *obj = *p; + object_fix_parent(obj, obj); + free(p); + } + return p == 0 ? 1 : 0; +} + +int type_specifier_to_object_type(int type_specifier_flags) +{ + if (type_specifier_flags & 512) + { + return 2; + } + if (type_specifier_flags & 32) + { + return 11; + } + if (type_specifier_flags & 64) + { + if (type_specifier_flags & 16) + { + return 13; + } + return 12; + } + if (type_specifier_flags & 256) + { + if (type_specifier_flags & 2) + { + return 4; + } + if (type_specifier_flags & 4) + { + return 6; + } + if (type_specifier_flags & 16) + { + return 8; + } + if (type_specifier_flags & 8) + { + return 1; + } + if (type_specifier_flags & 4194304) + { + return 10; + } + } + else + { + if (type_specifier_flags & 2) + { + return 3; + } + if (type_specifier_flags & 4) + { + return 5; + } + if (type_specifier_flags & 16) + { + return 7; + } + if (type_specifier_flags & 8) + { + return 0; + } + if (type_specifier_flags & 4194304) + { + return 9; + } + } + return 0; +} + +unsigned char type_is_pointer(struct type * p_type); + +int type_to_object_type(struct type * type) +{ + if (type_is_pointer(type)) + { + return 1; + } + return type_specifier_to_object_type(type->type_specifier_flags); +} + + + +int __stdio_common_vfprintf(unsigned __int64 _Options, struct _iobuf * _Stream, char * _Format, struct __crt_locale_pointers * _Locale, char * _ArgList); + +inline unsigned __int64 *__local_stdio_printf_options(void) +{ + static unsigned __int64 _OptionsStorage; + return &_OptionsStorage; +} +inline int _vfprintf_l(struct _iobuf * _Stream, char * _Format, struct __crt_locale_pointers * _Locale, char * _ArgList) +{ + return __stdio_common_vfprintf(( *__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList); +} +struct _iobuf *__acrt_iob_func(unsigned int _Ix); +inline int printf(char * _Format, ...) +{ + int _Result; + char * _ArgList; + ((void)(_ArgList = (char *)(&(_Format)) + ((sizeof (_Format) + sizeof (int) - 1) & ~(sizeof (int) - 1)))); + _Result = _vfprintf_l((__acrt_iob_func(1)), _Format, ((void *)0), _ArgList); + ((void)(_ArgList = (char *)0)); + return _Result; +} + +void object_print_value_debug(struct object * a) +{ + a = object_get_referenced(a); + switch (a->value_type) + { + case 2 : + printf("%s (bool)", a->value.bool_value ? "true" : "false"); + break; + case 3 : + printf("%d (signed char)", (int)a->value.signed_char_value); + break; + case 4 : + printf("%d (unsigned char)", (int)a->value.unsigned_char_value); + break; + case 5 : + printf("%d (short)", a->value.signed_short_value); + break; + case 6 : + printf("%d (unsigned short)", a->value.unsigned_short_value); + break; + case 0 : + printf("%d (int)", a->value.signed_int_value); + break; + case 1 : + printf("%du (unsigned int)", a->value.unsigned_int_value); + break; + case 7 : + printf("%ld (long)", a->value.signed_long_value); + break; + case 8 : + printf("%lu (unsigned long)", a->value.unsigned_long_value); + break; + case 9 : + printf("%lld (long long)", a->value.signed_long_long_value); + break; + case 10 : + printf("%llu (unsigned long long)", a->value.unsigned_long_long_value); + break; + case 11 : + printf("%f (float)", a->value.float_value); + break; + case 12 : + printf("%lf (double)", a->value.double_value); + break; + case 13 : + printf("%Lf (long double)", a->value.long_double_value); + break; + } +} + +void type_print(struct type * a); + +void object_print_to_debug_core(struct object * object, int n) +{ + if (object_is_reference(object)) + { + object = object_get_referenced(object); + } + { + int i = 0; + for (; i < n; i++) + printf(" "); + } + if (object->members != ((void *)0)) + { + type_print(&object->type2); + printf(" {\n"); + struct object * member = object->members; + while (member) + { + object_print_to_debug_core(member, n + 1); + member = member->next; + } + { + int i = 0; + for (; i < n; i++) + printf(" "); + } + printf("}\n"); + } + else + { + type_print(&object->type2); + printf(" = "); + object_print_value_debug(object); + switch (object->state) + { + case 0 : + printf(" uninitialized "); + break; + case 1 : + printf(" unknown "); + break; + case 2 : + printf(" exact "); + break; + case 3 : + printf(" constant_exact "); + break; + case 4 : + ; + break; + } + printf("\n"); + } +} + +void object_print_to_debug(struct object * object) +{ + int n = 0; + object_print_to_debug_core(object, n); +} + +struct object *object_extend_array_to_index(struct type * p_type, struct object * a, int max_index, unsigned char is_constant) +{ + struct object * it = a->members; + if (1) + { + int count = 0; + while (it) + { + count++; + if (it->next == ((void *)0)) + { + break; + } + it = it->next; + } + while (count < (max_index + 1)) + { + if (it == ((void *)0)) + { + ; + a->members = make_object_ptr(p_type); + if (a->members == ((void *)0)) + { + goto _catch_label_1; + } + object_default_initialization(a->members, is_constant); + it = a->members; + it->parent = a; + count++; + } + else + { + struct object * p = make_object_ptr(p_type); + if (p == ((void *)0)) + { + goto _catch_label_1; + } + p->parent = a; + object_default_initialization(p, is_constant); + ; + it->next = p; + it = p; + count++; + } + } + } + else _catch_label_1: + { + } + return it; +} + diff --git a/out/src/object_flow.c b/out/src/object_flow.c new file mode 100644 index 0000000..1ccd0f5 --- /dev/null +++ b/out/src/object_flow.c @@ -0,0 +1,3876 @@ +struct param_list { + unsigned char is_var_args; + unsigned char is_void; + struct param * head; + struct param * tail; +}; + +struct type { + int category; + int attributes_flags; + int type_specifier_flags; + int type_qualifier_flags; + int storage_class_specifier_flags; + char * name_opt; + struct struct_or_union_specifier * struct_or_union_specifier; + struct enum_specifier * enum_specifier; + struct expression * array_num_elements_expression; + int num_of_elements; + unsigned char static_array; + unsigned char address_of; + struct param_list params; + struct type * next; +}; + +struct macro; +struct flow_objects_view { + struct flow_object ** data; + int size; + int capacity; +}; + +struct flow_object_state { + char * dbg_name; + int state_number; + struct flow_object * pointed; + int state; + struct flow_objects_view alternatives; + struct flow_object_state * next; +}; + +struct flow_object { + unsigned int visit_number; + struct flow_object * parent; + struct declarator * p_declarator_origin; + struct expression * p_expression_origin; + struct flow_objects_view members; + struct flow_object_state current; + int id; + unsigned char is_temporary; +}; + +struct atomic_type_specifier { + struct token * token; + struct type_name * type_name; +}; + +struct balanced_token { + struct token * token; + struct balanced_token * next; +}; + +struct diagnostic { + unsigned long long errors; + unsigned long long warnings; + unsigned long long notes; +}; + +struct diagnostic_stack { + int top_index; + struct diagnostic stack[10]; +}; + +struct declaration_specifier { + struct storage_class_specifier * storage_class_specifier; + struct type_specifier_qualifier * type_specifier_qualifier; + struct function_specifier * function_specifier; + struct declaration_specifier * next; +}; + +struct secondary_block { + struct token * first_token; + struct token * last_token; + struct statement * statement; +}; + +struct member_declaration_list { + struct token * first_token; + struct token * last_token; + struct member_declaration * head; + struct member_declaration * tail; +}; + +struct struct_or_union_specifier { + unsigned char has_shared_ownership; + struct attribute_specifier_sequence * attribute_specifier_sequence_opt; + struct member_declaration_list member_declaration_list; + struct token * first_token; + struct token * last_token; + unsigned char is_owner; + struct token * tagtoken; + char tag_name[200]; + unsigned char has_anonymous_tag; + unsigned char show_anonymous_tag; + int scope_level; + int visit_moved; + struct struct_or_union_specifier * complete_struct_or_union_specifier_indirection; +}; + +struct primary_block { + struct compound_statement * compound_statement; + struct selection_statement * selection_statement; + struct iteration_statement * iteration_statement; + struct defer_statement * defer_statement; + struct try_statement * try_statement; +}; + +struct array_declarator { + struct direct_declarator * direct_declarator; + struct expression * assignment_expression; + struct expression * expression; + struct type_qualifier_list * type_qualifier_list_opt; + struct token * token; + struct token * static_token_opt; +}; + +struct token_list { + struct token * head; + struct token * tail; +}; + +struct declaration_list { + struct declaration * head; + struct declaration * tail; +}; + +struct ast { + struct token_list token_list; + struct declaration_list declaration_list; +}; + +struct flow_objects { + struct flow_object ** data; + int size; + int capacity; +}; + +struct label_state { + char * label_name; + int state_number; +}; + +struct flow_visit_ctx { + struct secondary_block * catch_secondary_block_opt; + struct parser_ctx * ctx; + struct ast ast; + struct type * p_return_type; + int parameter_list; + int state_number_generator; + unsigned char expression_is_not_evaluated; + unsigned char inside_assert; + int throw_join_state; + int break_join_state; + int initial_state; + struct flow_objects arena; + struct label_state labels[100]; + int labels_size; +}; + +struct pointer { + struct attribute_specifier_sequence * attribute_specifier_sequence_opt; + struct type_qualifier_list * type_qualifier_list_opt; + struct pointer * pointer; +}; + +struct init_declarator_list { + struct init_declarator * head; + struct init_declarator * tail; +}; + +struct initializer_list_item { + struct designation * designation; + struct initializer * initializer; + struct initializer_list_item * next; +}; + +struct direct_declarator { + struct token * name_opt; + struct declarator * declarator; + struct array_declarator * array_declarator; + struct function_declarator * function_declarator; + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt; +}; + +struct designator { + struct expression * constant_expression_opt; + struct token * token; + struct designator * next; +}; + +struct object_name_list { + char * name; + struct object_name_list * previous; +}; + +union _struct_tag_1 { + unsigned char bool_value; + signed char signed_char_value; + unsigned char unsigned_char_value; + signed short signed_short_value; + unsigned short unsigned_short_value; + signed int signed_int_value; + unsigned int unsigned_int_value; + signed long signed_long_value; + unsigned long unsigned_long_value; + signed long long signed_long_long_value; + unsigned long long unsigned_long_long_value; + float float_value; + double double_value; + long double long_double_value; +}; + +struct object { + int state; + int value_type; + struct type type2; + char * debug_name; + union _struct_tag_1 value; + struct object * parent; + struct expression * p_init_expression; + struct object * members; + struct object * next; +}; + +struct declarator { + unsigned char has_shared_ownership; + struct token * first_token_opt; + struct token * last_token_opt; + struct pointer * pointer; + struct direct_declarator * direct_declarator; + struct declaration_specifiers * declaration_specifiers; + struct specifier_qualifier_list * specifier_qualifier_list; + struct token * name_opt; + struct compound_statement * function_body; + int num_uses; + struct object object; + struct flow_object * p_object; + struct type type; +}; + +union _struct_tag_0 { + unsigned int number; + struct enum_specifier * p_enum_specifier; + struct enumerator * p_enumerator; + struct struct_or_union_specifier * p_struct_or_union_specifier; + struct declarator * p_declarator; + struct init_declarator * p_init_declarator; + struct macro * p_macro; + struct struct_entry * p_struct_entry; +}; + +struct map_entry { + struct map_entry * next; + unsigned int hash; + char * key; + int type; + union _struct_tag_0 data; +}; + +struct init_declarator { + unsigned char has_shared_ownership; + struct declarator * p_declarator; + struct initializer * initializer; + struct init_declarator * next; +}; + +struct labeled_statement { + struct label * label; + struct statement * statement; +}; + +struct type_name { + struct token * first_token; + struct token * last_token; + struct specifier_qualifier_list * specifier_qualifier_list; + struct declarator * abstract_declarator; + struct type type; +}; + +struct __crt_locale_pointers { + struct __crt_locale_data * locinfo; + struct __crt_multibyte_data * mbcinfo; +}; + +struct enumerator { + unsigned char has_shared_ownership; + struct token * token; + struct attribute_specifier_sequence * attribute_specifier_sequence_opt; + struct expression * constant_expression_opt; + struct enum_specifier * enum_specifier; + struct enumerator * next; + struct object value; +}; + +struct member_declaration { + struct specifier_qualifier_list * specifier_qualifier_list; + struct member_declarator_list * member_declarator_list_opt; + struct static_assert_declaration * static_assert_declaration; + struct pragma_declaration * pragma_declaration; + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt; + struct member_declaration * next; +}; + +struct simple_declaration { + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt; + struct declaration_specifiers * p_declaration_specifiers; + struct init_declarator_list init_declarator_list; + struct token * first_token; + struct token * last_token; +}; + +struct block_item { + struct token * first_token; + struct declaration * declaration; + struct unlabeled_statement * unlabeled_statement; + struct label * label; + struct block_item * next; +}; + +struct label { + struct expression * constant_expression; + struct token * p_identifier_opt; + struct token * p_first_token; +}; + +struct generic_assoc_list { + struct generic_association * head; + struct generic_association * tail; +}; + +struct generic_selection { + struct expression * expression; + struct type_name * type_name; + struct expression * p_view_selected_expression; + struct generic_assoc_list generic_assoc_list; + struct token * first_token; + struct token * last_token; +}; + +struct function_specifier { + int flags; + struct token * token; +}; + +struct object_visitor { + int member_index; + struct type * p_type; + struct flow_object * p_object; +}; + +struct hash_map { + struct map_entry ** table; + int capacity; + int size; +}; + +struct scope { + int scope_level; + struct hash_map tags; + struct hash_map variables; + struct scope * next; + struct scope * previous; +}; + +struct function_declarator { + struct direct_declarator * direct_declarator; + struct scope parameters_scope; + struct parameter_type_list * parameter_type_list_opt; +}; + +struct scope_list { + struct scope * head; + struct scope * tail; +}; + +struct switch_value { + long long value; + struct label * p_label; + struct switch_value * next; +}; + +struct designation { + struct designator_list * designator_list; + struct token * token; +}; + +struct attribute { + int attributes_flags; + struct attribute_token * attribute_token; + struct attribute_argument_clause * attribute_argument_clause; + struct attribute * next; +}; + +struct typeof_specifier { + struct token * first_token; + struct token * last_token; + struct typeof_specifier_argument * typeof_specifier_argument; + struct type type; +}; + +struct statement { + struct labeled_statement * labeled_statement; + struct unlabeled_statement * unlabeled_statement; +}; + +struct type_specifier_qualifier { + struct type_specifier * type_specifier; + struct type_qualifier * type_qualifier; + struct alignment_specifier * alignment_specifier; + struct type_specifier_qualifier * next; +}; + +struct try_statement { + struct secondary_block * secondary_block; + struct secondary_block * catch_secondary_block_opt; + struct token * first_token; + struct token * last_token; + struct token * catch_token_opt; + int try_catch_block_index; +}; + +struct static_assert_declaration { + struct token * first_token; + struct token * last_token; + struct expression * constant_expression; + struct token * string_literal_opt; +}; + +struct defer_list_item { + struct declarator * declarator; + struct defer_statement * defer_statement; + struct defer_list_item * next; +}; + +struct __crt_locale_data; +struct alignment_specifier { + struct type_name * type_name; + struct expression * constant_expression; + struct token * token; +}; + +struct argument_expression_list { + struct argument_expression * head; + struct argument_expression * tail; +}; + +struct attribute_argument_clause { + struct balanced_token_sequence * p_balanced_token_sequence; + struct token * token; +}; + +struct generic_association { + struct type type; + struct type_name * p_type_name; + struct expression * expression; + struct token * first_token; + struct token * last_token; + struct generic_association * next; +}; + +struct attribute_token { + int attributes_flags; + struct token * token; +}; + +struct options { + int input; + int target; + struct diagnostic_stack diagnostic_stack; + int style; + unsigned char show_includes; + unsigned char disable_assert; + unsigned char flow_analysis; + unsigned char test_mode; + unsigned char null_checks_enabled; + unsigned char ownership_enabled; + unsigned char preprocess_only; + unsigned char clear_error_at_end; + unsigned char sarif_output; + unsigned char no_output; + unsigned char visual_studio_ouput_format; + unsigned char dump_tokens; + unsigned char dump_pptokens; + unsigned char auto_config; + char output[200]; + char sarifpath[200]; +}; + +struct param { + struct type type; + struct param * next; +}; + +struct parser_ctx { + struct options options; + struct scope_list scopes; + struct declaration * p_current_function_opt; + struct try_statement * p_current_try_statement_opt; + struct selection_statement * p_current_selection_statement; + struct switch_value_list * p_switch_value_list; + struct _iobuf * sarif_file; + unsigned int sarif_entries; + struct token_list input_list; + struct token * current; + struct token * previous; + int try_catch_block_index; + unsigned char evaluation_is_disabled; + unsigned char inside_generic_association; + struct report * p_report; +}; + +struct initializer { + struct token * first_token; + struct braced_initializer * braced_initializer; + struct expression * assignment_expression; +}; + +struct storage_class_specifier { + int flags; + struct token * token; +}; + +struct struct_entry; +struct enumerator_list { + struct enumerator * head; + struct enumerator * tail; +}; + +struct initializer_list { + struct token * first_token; + struct initializer_list_item * head; + struct initializer_list_item * tail; + int size; +}; + +struct marker { + char * file; + int line; + int start_col; + int end_col; + struct token * p_token_caret; + struct token * p_token_begin; + struct token * p_token_end; +}; + +struct braced_initializer { + struct token * first_token; + struct token * last_token; + struct initializer_list * initializer_list; +}; + +struct type_specifier { + int flags; + struct token * token; + struct struct_or_union_specifier * struct_or_union_specifier; + struct typeof_specifier * typeof_specifier; + struct enum_specifier * enum_specifier; + struct declarator * typedef_declarator; + struct atomic_type_specifier * atomic_type_specifier; +}; + +struct attribute_specifier_sequence { + struct token * first_token; + struct token * last_token; + int attributes_flags; + struct attribute_specifier * head; + struct attribute_specifier * tail; +}; + +struct switch_value_list { + struct switch_value * head; + struct switch_value * tail; + struct switch_value * p_default; +}; + +struct enum_specifier { + unsigned char has_shared_ownership; + struct attribute_specifier_sequence * attribute_specifier_sequence_opt; + struct specifier_qualifier_list * specifier_qualifier_list; + char tag_name[200]; + struct enumerator_list enumerator_list; + struct token * tag_token; + struct token * first_token; + struct enum_specifier * complete_enum_specifier2; +}; + +struct pragma_declaration { + struct token * first_token; + struct token * last_token; +}; + +struct type_qualifier_list { + int flags; + struct type_qualifier * head; + struct type_qualifier * tail; +}; + +struct parameter_type_list { + unsigned char is_var_args; + unsigned char is_void; + struct parameter_list * parameter_list; +}; + +struct attribute_specifier { + struct token * first_token; + struct token * last_token; + struct attribute_list * attribute_list; + struct attribute_specifier * next; +}; + +struct osstream { + char * c_str; + int size; + int capacity; +}; + +struct parameter_list { + struct parameter_declaration * head; + struct parameter_declaration * tail; +}; + +struct specifier_qualifier_list { + int type_specifier_flags; + int type_qualifier_flags; + struct struct_or_union_specifier * struct_or_union_specifier; + struct enum_specifier * enum_specifier; + struct typeof_specifier * typeof_specifier; + struct declarator * typedef_declarator; + struct type_specifier_qualifier * head; + struct type_specifier_qualifier * tail; + struct token * first_token; + struct token * last_token; + struct attribute_specifier_sequence * p_attribute_specifier_sequence; +}; + +struct expression_statement { + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt; + struct expression * expression_opt; +}; + +struct unlabeled_statement { + struct expression_statement * expression_statement; + struct primary_block * primary_block; + struct jump_statement * jump_statement; +}; + +struct declaration_specifiers { + int attributes_flags; + int type_specifier_flags; + int type_qualifier_flags; + int storage_class_specifier_flags; + int function_specifier_flags; + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt; + struct struct_or_union_specifier * struct_or_union_specifier; + struct enum_specifier * enum_specifier; + struct declarator * typedef_declarator; + struct typeof_specifier * typeof_specifier; + struct token * first_token; + struct token * last_token; + struct declaration_specifier * head; + struct declaration_specifier * tail; +}; + +struct balanced_token_sequence { + struct balanced_token * head; + struct balanced_token * tail; +}; + +struct block_item_list { + struct block_item * head; + struct block_item * tail; +}; + +struct defer_list { + struct defer_list_item * head; + struct defer_list_item * tail; +}; + +struct compound_statement { + struct token * first_token; + struct token * last_token; + struct block_item_list block_item_list; + struct diagnostic diagnostic_flags; + struct defer_list defer_list; +}; + +struct type_qualifier { + int flags; + struct token * token; + struct type_qualifier * next; +}; + +struct argument_expression { + struct expression * expression; + struct argument_expression * next; + unsigned char set_unkown; +}; + +struct member_declarator { + struct declarator * declarator; + struct expression * constant_expression; + struct member_declarator * next; +}; + +struct member_declarator_list { + struct member_declarator * head; + struct member_declarator * tail; +}; + +struct iteration_statement { + struct token * first_token; + struct token * second_token; + struct secondary_block * secondary_block; + struct expression * expression1; + struct expression * expression2; + struct expression * expression0; + struct declaration * declaration; + struct defer_list defer_list; +}; + +struct jump_statement { + struct token * label; + struct token * first_token; + struct token * last_token; + struct expression * expression_opt; + int try_catch_block_index; + struct defer_list defer_list; +}; + +struct condition { + struct expression * expression; + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt; + struct declaration_specifiers * p_declaration_specifiers; + struct init_declarator * p_init_declarator; + struct token * first_token; + struct token * last_token; +}; + +struct __crt_multibyte_data; +struct init_statement { + struct expression_statement * p_expression_statement; + struct simple_declaration * p_simple_declaration; +}; + +struct expression { + int expression_type; + struct type type; + struct object object; + struct type_name * type_name; + struct braced_initializer * braced_initializer; + struct compound_statement * compound_statement; + struct generic_selection * generic_selection; + struct token * first_token; + struct token * last_token; + struct declarator * declarator; + int member_index; + struct argument_expression_list argument_expression_list; + struct expression * condition_expr; + struct expression * left; + struct expression * right; + unsigned char is_assignment_expression; +}; + +struct declaration { + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt; + struct static_assert_declaration * static_assert_declaration; + struct pragma_declaration * pragma_declaration; + struct declaration_specifiers * declaration_specifiers; + struct init_declarator_list init_declarator_list; + struct compound_statement * function_body; + struct defer_list defer_list; + struct declarator * contract_declarator; + struct token * first_token; + struct token * last_token; + struct declaration * next; +}; + +struct designator_list { + struct designator * head; + struct designator * tail; +}; + +struct token { + int type; + char * lexeme; + char * original; + int line; + int col; + int level; + int flags; + struct token * token_origin; + struct token * next; + struct token * prev; +}; + +struct typeof_specifier_argument { + struct expression * expression; + struct type_name * type_name; +}; + +struct parameter_declaration { + struct attribute_specifier_sequence * attribute_specifier_sequence_opt; + struct declaration_specifiers * declaration_specifiers; + struct declarator * declarator; + struct parameter_declaration * next; +}; + +struct attribute_list { + int attributes_flags; + struct attribute * head; + struct attribute * tail; +}; + +struct report { + int no_files; + double cpu_time_used_sec; + int error_count; + int warnings_count; + int info_count; + unsigned char test_mode; + int test_failed; + int test_succeeded; + int last_diagnostics_ids[2]; + int fatal_error_expected; + unsigned char ignore_this_report; +}; + +struct selection_statement { + struct init_statement * p_init_statement; + struct condition * condition; + struct secondary_block * secondary_block; + struct secondary_block * else_secondary_block_opt; + struct token * open_parentesis_token; + struct token * close_parentesis_token; + struct token * first_token; + struct token * last_token; + struct token * else_token_opt; + struct defer_list defer_list; +}; + +struct defer_statement { + struct token * first_token; + struct token * last_token; + struct secondary_block * secondary_block; +}; + +struct _iobuf { + void * _Placeholder; +}; + + +unsigned int s_visit_number = 1; +unsigned char flow_object_is_not_null(struct flow_object * p) +{ + int e = p->current.state; + return ( !(e & 2) && ((e & 4) || (e & 8))); +} + +unsigned char flow_object_can_be_not_null_or_moved(struct flow_object * p) +{ + int e = p->current.state; + return (e & 4) || (e & 8); +} + +unsigned char flow_object_is_null(struct flow_object * p) +{ + int e = p->current.state; + return ((e & 2) && !(e & 4) && !(e & 8)); +} + +unsigned char flow_object_is_zero(struct flow_object * p) +{ + int e = p->current.state; + return ((e & 32) && !(e & 64)); +} + +unsigned char flow_object_is_not_zero(struct flow_object * p) +{ + int e = p->current.state; + return ( !(e & 32) && (e & 64)); +} + +unsigned char flow_object_can_be_zero(struct flow_object * p) +{ + int e = p->current.state; + return (e & 32); +} + +unsigned char flow_object_can_be_moved(struct flow_object * p) +{ + int e = p->current.state; + return (e & 8); +} + +unsigned char flow_object_can_be_null(struct flow_object * p) +{ + int e = p->current.state; + return (e & 2); +} + +unsigned char flow_object_is_uninitialized(struct flow_object * p) +{ + int e = p->current.state; + return e == 1; +} + +unsigned char flow_object_can_be_uninitialized(struct flow_object * p) +{ + int e = p->current.state; + return (e & 1); +} + +unsigned char flow_object_can_have_its_lifetime_ended(struct flow_object * p) +{ + int e = p->current.state; + return (e & 128); +} + + + +int __stdio_common_vfprintf(unsigned __int64 _Options, struct _iobuf * _Stream, char * _Format, struct __crt_locale_pointers * _Locale, char * _ArgList); + +inline unsigned __int64 *__local_stdio_printf_options(void) +{ + static unsigned __int64 _OptionsStorage; + return &_OptionsStorage; +} +inline int _vfprintf_l(struct _iobuf * _Stream, char * _Format, struct __crt_locale_pointers * _Locale, char * _ArgList) +{ + return __stdio_common_vfprintf(( *__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList); +} +struct _iobuf *__acrt_iob_func(unsigned int _Ix); +inline int printf(char * _Format, ...) +{ + int _Result; + char * _ArgList; + ((void)(_ArgList = (char *)(&(_Format)) + ((sizeof (_Format) + sizeof (int) - 1) & ~(sizeof (int) - 1)))); + _Result = _vfprintf_l((__acrt_iob_func(1)), _Format, ((void *)0), _ArgList); + ((void)(_ArgList = (char *)0)); + return _Result; +} + +static void object_state_to_string_core(int e) +{ + unsigned char first = 1; + printf("\""); + if (e & 1) + { + if (first) + { + first = 0; + } + else + { + printf(" | "); + } + printf("uninitialized"); + } + if (e & 4) + { + if (first) + { + first = 0; + } + else + { + printf(" | "); + } + printf("not-null"); + } + if (e & 2) + { + if (first) + { + first = 0; + } + else + { + printf(" | "); + } + printf("null"); + } + if (e & 32) + { + if (first) + { + first = 0; + } + else + { + printf(" | "); + } + printf("zero"); + } + if (e & 64) + { + if (first) + { + first = 0; + } + else + { + printf(" | "); + } + printf("not-zero"); + } + if (e & 128) + { + if (first) + { + first = 0; + } + else + { + printf(" | "); + } + printf("lifetime-ended"); + } + if (e & 8) + { + if (first) + { + first = 0; + } + else + { + printf(" | "); + } + printf("moved"); + } + printf("\""); +} + +void objects_view_destroy(struct flow_objects_view * p); +void free(void * ptr); + +void flow_object_state_delete(struct flow_object_state * p) +{ + if (p) + { + objects_view_destroy(&p->alternatives); + ; + free(p); + } +} + +void objects_view_copy(struct flow_objects_view * dest, struct flow_objects_view * source); + +void flow_object_state_copy(struct flow_object_state * to, struct flow_object_state * from) +{ + to->state = from->state; + to->pointed = from->pointed; + objects_view_copy(&to->alternatives, &from->alternatives); +} + +void flow_object_print_state(struct flow_object * p) +{ + object_state_to_string_core(p->current.state); +} + +void object_state_set_item_print(struct flow_object_state * item) +{ + object_state_to_string_core(item->state); +} + +unsigned char flow_object_is_expansible(struct flow_object * p_object) +{ + return (p_object && p_object->current.state != 2 && p_object->current.state != 1 && p_object->current.pointed == 0); +} + +struct type type_remove_pointer(struct type * p_type); +unsigned char type_is_void(struct type * p_type); +struct flow_object *make_flow_object(struct flow_visit_ctx * ctx, struct type * p_type, struct declarator * p_declarator_opt, struct expression * p_expression_origin); +unsigned char type_is_nullable(struct type * p_type, unsigned char nullable_enabled); +void flow_object_set_unknown(struct type * p_type, unsigned char t_is_nullable, struct flow_object * p_object, unsigned char nullable_enabled); +void object_set_pointer(struct flow_object * p_object, struct flow_object * p_object2); +void flow_object_push_states_from(struct flow_object * p_object_from, struct flow_object * p_object_to); +void type_destroy(struct type * p_type); + +void flow_object_expand_pointer(struct flow_visit_ctx * ctx, struct type * p_type, struct flow_object * p_object) +{ + ; + if (flow_object_is_expansible(p_object)) + { + unsigned char nullable_enabled = ctx->ctx->options.null_checks_enabled; + struct type t2 = type_remove_pointer(p_type); + if ( !type_is_void(&t2)) + { + struct flow_object * p_object2 = make_flow_object(ctx, &t2, p_object->p_declarator_origin, p_object->p_expression_origin); + if (p_object2) + { + unsigned char is_nullable = type_is_nullable(&t2, nullable_enabled); + flow_object_set_unknown(&t2, is_nullable, p_object2, nullable_enabled); + object_set_pointer(p_object, p_object2); + flow_object_push_states_from(p_object, p_object2); + } + else + { + } + } + type_destroy(&t2); + } +} + +void flow_object_swap(struct flow_object * a, struct flow_object * b) +{ + struct flow_object temp = *a; + *a = *b; + *b = temp; +} + +void flow_object_destroy(struct flow_object * p); + +void flow_object_delete(struct flow_object * p) +{ + if (p) + { + flow_object_destroy(p); + free(p); + } +} + +void object_set_pointer(struct flow_object * p_object, struct flow_object * p_object2) +{ + p_object->current.pointed = p_object2; +} + +void flow_object_destroy(struct flow_object * p) +{ + objects_view_destroy(&p->members); + struct flow_object_state * p_flow_object_state = p->current.next; + while (p_flow_object_state) + { + struct flow_object_state * temp = p_flow_object_state->next; + p_flow_object_state->next = ((void *)0); + flow_object_state_delete(p_flow_object_state); + p_flow_object_state = temp; + } + objects_view_destroy(&p->current.alternatives); +} + +void flow_object_update_current(struct flow_object * p) +{ + if (p->current.alternatives.size > 0) + { + p->current.state = 0; + { + int i = 0; + for (; i < p->current.alternatives.size; i++) + { + flow_object_update_current(p->current.alternatives.data[i]); + p->current.state = p->current.alternatives.data[i]->current.state; + } + } + } +} + +void flow_object_set_current_state_to_can_be_null(struct flow_object * p) +{ + p->current.state = 2; +} + +void flow_object_set_current_state_to_is_null(struct flow_object * p) +{ + p->current.state = 2; + if (p->current.alternatives.size > 0) + { + { + int i = 0; + for (; i < p->current.alternatives.size; i++) + { + flow_object_set_current_state_to_can_be_null(p->current.alternatives.data[i]); + } + } + } +} + +int flow_object_add_state(struct flow_object * p, struct flow_object_state * pnew) +{ + ; + pnew->next = p->current.next; + p->current.next = pnew; + return 0; +} + +void objects_view_destroy(struct flow_objects_view * p) +{ + free(p->data); +} + +void *realloc(void * ptr, unsigned int size); + +int objects_view_reserve(struct flow_objects_view * p, int n) +{ + if (n > p->capacity) + { + if ((unsigned int)n > (4294967295U / (sizeof (p->data[0])))) + { + return 132; + } + void * pnew = realloc(p->data, n * sizeof (p->data[0])); + if (pnew == ((void *)0)) + { + return 12; + } + p->data = pnew; + p->capacity = n; + } + return 0; +} + +int objects_view_push_back(struct flow_objects_view * p, struct flow_object * p_object) +{ + if (p->size == 2147483647) + { + return 132; + } + if (p->size + 1 > p->capacity) + { + int new_capacity = 0; + if (p->capacity > (2147483647 - p->capacity / 2)) + { + new_capacity = 2147483647; + } + else + { + new_capacity = p->capacity + p->capacity / 2; + if (new_capacity < p->size + 1) + { + new_capacity = p->size + 1; + } + } + int error = objects_view_reserve(p, new_capacity); + if (error != 0) + { + return error; + } + } + p->data[p->size] = p_object; + p->size++; + return 0; +} + +void objects_view_clear(struct flow_objects_view * p) +{ + p->size = 0; +} + +unsigned char objects_view_find(struct flow_objects_view * p, struct flow_object * p_object); + +void objects_view_merge(struct flow_objects_view * dest, struct flow_objects_view * source) +{ + { + int i = 0; + for (; i < source->size; i++) + { + if ( !objects_view_find(dest, source->data[i])) + { + objects_view_push_back(dest, source->data[i]); + } + } + } +} + +void objects_view_copy(struct flow_objects_view * dest, struct flow_objects_view * source) +{ + objects_view_reserve(dest, source->size); + { + int i = 0; + for (; i < source->size; i++) + { + dest->data[i] = source->data[i]; + } + } + dest->size = source->size; +} + +unsigned char objects_view_find(struct flow_objects_view * p, struct flow_object * p_object) +{ + { + int i = 0; + for (; i < p->size; i++) + { + if (p->data[i] == p_object) + { + return 1; + } + } + } + return 0; +} + +void flow_objects_destroy(struct flow_objects * p) +{ + { + int i = 0; + for (; i < p->size; i++) + { + flow_object_delete(p->data[i]); + } + } + free(p->data); +} + +void flow_objects_clear(struct flow_objects * p) +{ + { + int i = 0; + for (; i < p->size; i++) + { + flow_object_delete(p->data[i]); + } + } + p->size = 0; +} + +int objects_reserve(struct flow_objects * p, int n) +{ + if (n > p->capacity) + { + if ((unsigned int)n > (4294967295U / (sizeof (p->data[0])))) + { + return 132; + } + void * pnew = realloc(p->data, n * sizeof (p->data[0])); + if (pnew == ((void *)0)) + { + return 12; + } + p->data = pnew; + p->capacity = n; + } + return 0; +} + +struct flow_object *flow_objects_find(struct flow_objects * p_objects, struct flow_object * object) +{ + { + int i = 0; + for (; i < p_objects->size; i++) + { + if (p_objects->data[i] == object) + { + return object; + } + } + } + return ((void *)0); +} + +int flow_objects_push_back(struct flow_objects * p, struct flow_object * p_object) +{ + if (p->size == 2147483647) + { + flow_object_delete(p_object); + return 132; + } + if (p->size + 1 > p->capacity) + { + int new_capacity = 0; + if (p->capacity > (2147483647 - p->capacity / 2)) + { + new_capacity = 2147483647; + } + 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) + { + flow_object_delete(p_object); + return error; + } + ; + } + p->data[p->size] = p_object; + p->size++; + return 0; +} + +int strcmp(char * _Str1, char * _Str2); + +unsigned char has_name(char * name, struct object_name_list * list) +{ + struct object_name_list * p = list; + while (p) + { + if (strcmp(p->name, name) == 0) + { + return 1; + } + p = p->previous; + } + return 0; +} + +struct flow_object *arena_new_object(struct flow_visit_ctx * ctx); +struct struct_or_union_specifier *get_complete_struct_or_union_specifier(struct struct_or_union_specifier * p_struct_or_union_specifier); +unsigned char type_is_array(struct type * p_type); + +struct flow_object *make_object_core(struct flow_visit_ctx * ctx, struct type * p_type, struct object_name_list * list, struct declarator * p_declarator_opt, struct expression * p_expression_origin) +{ + if (p_declarator_opt == ((void *)0)) + { + } + if (p_expression_origin == ((void *)0)) + { + } + struct flow_object * p_object = arena_new_object(ctx); + if (1) + { + if (p_object == ((void *)0)) + { + goto _catch_label_1; + } + p_object->p_expression_origin = p_expression_origin; + p_object->p_declarator_origin = p_declarator_opt; + 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) + { + p_object->current.state = 0; + 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; + 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 = ((void *)0); + 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 flow_object * member_obj = arena_new_object(ctx); + if (member_obj == ((void *)0)) + { + goto _catch_label_1; + } + member_obj->parent = p_object; + member_obj->p_expression_origin = p_expression_origin; + member_obj->p_declarator_origin = p_declarator_opt; + member_obj->current.state = 0; + objects_view_push_back(&p_object->members, member_obj); + } + else + { + struct flow_object * p_member_obj = make_object_core(ctx, &p_member_declarator->declarator->type, &l, p_declarator_opt, p_expression_origin); + if (p_member_obj == ((void *)0)) + { + goto _catch_label_1; + } + p_member_obj->parent = p_object; + objects_view_push_back(&p_object->members, p_member_obj); + } + } + p_member_declarator = p_member_declarator->next; + } + } + else + { + if (p_member_declaration->specifier_qualifier_list != ((void *)0)) + { + if (p_member_declaration->specifier_qualifier_list->struct_or_union_specifier) + { + struct type t = {0}; + t.category = 0; + t.struct_or_union_specifier = p_member_declaration->specifier_qualifier_list->struct_or_union_specifier; + t.type_specifier_flags = 32768; + struct flow_object * member_obj = make_object_core(ctx, &t, &l, p_declarator_opt, p_expression_origin); + if (member_obj == ((void *)0)) + { + type_destroy(&t); + goto _catch_label_1; + } + { + int k = 0; + for (; k < member_obj->members.size; k++) + { + objects_view_push_back(&p_object->members, member_obj->members.data[k]); + member_obj->members.data[k] = ((void *)0); + } + } + type_destroy(&t); + } + } + } + p_member_declaration = p_member_declaration->next; + } + return p_object; + } + return p_object; + } + else + { + if (type_is_array(p_type)) + { + return p_object; + } + } + p_object->current.state = 1; + } + else _catch_label_1: + { + p_object = ((void *)0); + } + return p_object; +} + +struct flow_object *make_flow_object(struct flow_visit_ctx * ctx, struct type * p_type, struct declarator * p_declarator_opt, struct expression * p_expression_origin) +{ + struct object_name_list list = {"", 0}; + struct flow_object * p_object = make_object_core(ctx, p_type, &list, p_declarator_opt, p_expression_origin); + return p_object; +} + +struct token *flow_object_get_token(struct flow_object * object) +{ + if (object->p_declarator_origin) + { + return object->p_declarator_origin->name_opt; + } + if (object->p_expression_origin) + { + return object->p_expression_origin->first_token; + } + return ((void *)0); +} + +void *calloc(int nmemb, unsigned int size); + +void flow_object_add_new_state_as_a_copy_of_current_state(struct flow_object * object, char * name, int state_number) +{ + struct flow_object_state * pnew = calloc(1, sizeof *pnew); + if (pnew == ((void *)0)) + { + return; + } + pnew->dbg_name = name; + pnew->state_number = state_number; + pnew->next = object->current.next; + object->current.next = pnew; + flow_object_state_copy(pnew, &object->current); +} + +void flow_object_remove_state(struct flow_object * object, int state_number) +{ + struct flow_object_state * previous = &object->current; + struct flow_object_state * it = object->current.next; + while (it) + { + if (it->state_number == state_number) + { + struct flow_object_state * p_it_next = it->next; + it->next = ((void *)0); + flow_object_state_delete(previous->next); + previous->next = p_it_next; + break; + } + previous = it; + it = it->next; + } +} + +int snprintf(char * _Buffer, unsigned int _BufferCount, char * _Format, ...); +unsigned char type_is_pointer(struct type * p_type); + +void print_object_core(int ident, struct object_visitor * p_visitor, char * previous_names, unsigned char is_pointer, unsigned char short_version, unsigned int visit_number) +{ + if (p_visitor->p_object->visit_number == visit_number) + { + return; + } + p_visitor->p_object->visit_number = visit_number; + if (p_visitor->p_type->struct_or_union_specifier) + { + ; + struct struct_or_union_specifier * p_struct_or_union_specifier = get_complete_struct_or_union_specifier(p_visitor->p_type->struct_or_union_specifier); + if (p_struct_or_union_specifier) + { + printf("%*c", ident + 1, 32); + printf("#%02d {\n", p_visitor->p_object->id); + struct member_declaration * p_member_declaration = p_struct_or_union_specifier->member_declaration_list.head; + 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 * name = p_member_declarator->declarator->name_opt ? p_member_declarator->declarator->name_opt->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); + } + struct object_visitor visitor = {0}; + visitor.p_type = &p_member_declarator->declarator->type; + visitor.p_object = p_visitor->p_object->members.data[p_visitor->member_index]; + print_object_core(ident + 2, &visitor, buffer, type_is_pointer(&p_member_declarator->declarator->type), short_version, visit_number); + p_visitor->member_index++; + } + p_member_declarator = p_member_declarator->next; + } + } + else + { + if (p_member_declaration->specifier_qualifier_list != ((void *)0)) + { + struct type t = {0}; + t.category = 0; + t.struct_or_union_specifier = p_member_declaration->specifier_qualifier_list->struct_or_union_specifier; + t.type_specifier_flags = 32768; + struct type * temp = p_visitor->p_type; + p_visitor->p_type = &t; + int visit_number0 = p_visitor->p_object->visit_number; + p_visitor->p_object->visit_number = 0; + print_object_core(ident + 1, p_visitor, previous_names, 0, short_version, visit_number); + p_visitor->p_type = temp; + p_visitor->p_object->visit_number = visit_number0; + type_destroy(&t); + } + } + p_member_declaration = p_member_declaration->next; + } + printf("%*c", ident + 1, 32); + printf("}\n"); + } + } + else + { + if (type_is_pointer(p_visitor->p_type)) + { + struct type t2 = type_remove_pointer(p_visitor->p_type); + printf("%*c", ident, 32); + if (short_version) + { + printf("#%02d %s == ", p_visitor->p_object->id, previous_names); + flow_object_print_state(p_visitor->p_object); + if (flow_object_is_null(p_visitor->p_object)) + { + } + else + { + if (flow_object_can_be_uninitialized(p_visitor->p_object)) + { + } + else + { + printf(" -> "); + if (p_visitor->p_object->current.pointed != ((void *)0)) + { + printf(" #%02d", p_visitor->p_object->current.pointed->id); + } + else + { + printf("{...}"); + } + } + } + } + else + { + printf("%p:%s == ", p_visitor->p_object, previous_names); + printf("{"); + struct flow_object_state * it = p_visitor->p_object->current.next; + while (it) + { + printf("\x1b[36;1m"); + printf("(#%02d %s)", it->state_number, it->dbg_name); + object_state_set_item_print(it); + printf("\x1b"); + printf(","); + it = it->next; + } + printf("\x1b[95m"); + printf("(current)"); + flow_object_print_state(p_visitor->p_object); + printf("\x1b"); + printf("}"); + } + printf("\n"); + type_destroy(&t2); + } + else + { + printf("%*c", ident, 32); + if (short_version) + { + printf("#%02d %s == ", p_visitor->p_object->id, previous_names); + flow_object_print_state(p_visitor->p_object); + } + else + { + printf("%p:%s == ", p_visitor->p_object, previous_names); + printf("{"); + struct flow_object_state * it = p_visitor->p_object->current.next; + while (it) + { + printf("(#%02d %s)", it->state_number, it->dbg_name); + object_state_set_item_print(it); + printf(","); + it = it->next; + } + flow_object_print_state(p_visitor->p_object); + printf("}"); + } + printf("\n"); + } + } +} + +void flow_object_merge_state(struct flow_object * pdest, struct flow_object * object1, struct flow_object * object2) +{ + pdest->current.state = object1->current.state | object2->current.state; + if (pdest->members.size == object1->members.size && object1->members.size == object2->members.size) + { + { + int i = 0; + for (; i < object1->members.size; i++) + { + struct flow_object * m1 = object1->members.data[i]; + struct flow_object * m2 = object2->members.data[i]; + flow_object_merge_state(pdest->members.data[i], m1, m2); + } + } + } +} + +int object_restore_current_state_from_core(struct flow_object * object, int state_number, unsigned int visit_number) +{ + if (object->visit_number == visit_number) + { + return 1; + } + object->visit_number = visit_number; + struct flow_object_state * it = object->current.next; + while (it) + { + if (it->state_number == state_number) + { + object->current.state = it->state; + break; + } + it = it->next; + } + { + int i = 0; + for (; i < object->members.size; i++) + { + object_restore_current_state_from_core(object->members.data[i], state_number, visit_number); + } + } + return 1; +} + +extern unsigned int s_visit_number; + +int flow_object_restore_current_state_from(struct flow_object * object, int state_number) +{ + return object_restore_current_state_from_core(object, state_number, s_visit_number++); +} + +int object_merge_current_state_with_state_number_core(struct flow_object * object, int state_number, unsigned int visit_number) +{ + if (object->visit_number == visit_number) + { + return 1; + } + object->visit_number = visit_number; + struct flow_object_state * it = object->current.next; + while (it) + { + if (it->state_number == state_number) + { + it->state = object->current.state; + break; + } + it = it->next; + } + { + int i = 0; + for (; i < object->members.size; i++) + { + object_merge_current_state_with_state_number_core(object->members.data[i], state_number, visit_number); + } + } + if (object->current.state == 2 || object->current.state == 1) + { + } + else + { + } + return 1; +} + +void object_get_name(struct type * p_type, struct flow_object * p_object, char * outname, int out_size); + +void print_flow_object(struct type * p_type, struct flow_object * p_object, unsigned char short_version) +{ + char name[100] = {0}; + object_get_name(p_type, p_object, name, sizeof name); + struct object_visitor visitor = {0}; + visitor.p_type = p_type; + visitor.p_object = p_object; + print_object_core(0, &visitor, name, type_is_pointer(p_type), short_version, s_visit_number++); +} + +void object_set_uninitialized_core(struct object_visitor * p_visitor) +{ + if (p_visitor->p_type->struct_or_union_specifier) + { + struct struct_or_union_specifier * p_struct_or_union_specifier = get_complete_struct_or_union_specifier(p_visitor->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; + 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 (p_visitor->member_index < p_visitor->p_object->members.size) + { + struct object_visitor visitor = {0}; + visitor.p_type = &p_member_declarator->declarator->type; + visitor.p_object = p_visitor->p_object->members.data[p_visitor->member_index]; + object_set_uninitialized_core(&visitor); + } + p_visitor->member_index++; + } + p_member_declarator = p_member_declarator->next; + } + } + else + { + if (p_member_declaration->specifier_qualifier_list != ((void *)0)) + { + if (p_member_declaration->specifier_qualifier_list->struct_or_union_specifier) + { + struct type t = {0}; + t.category = 0; + t.struct_or_union_specifier = p_member_declaration->specifier_qualifier_list->struct_or_union_specifier; + t.type_specifier_flags = 32768; + struct type * type_temp = p_visitor->p_type; + p_visitor->p_type = &t; + object_set_uninitialized_core(p_visitor); + p_visitor->p_type = type_temp; + type_destroy(&t); + } + } + } + p_member_declaration = p_member_declaration->next; + } + return; + } + } + if (type_is_pointer(p_visitor->p_type)) + { + p_visitor->p_object->current.state = 1; + } + else + { + p_visitor->p_object->current.state = 1; + } +} + +void flow_object_set_uninitialized(struct type * p_type, struct flow_object * p_object) +{ + struct object_visitor visitor = {0}; + visitor.p_type = p_type; + visitor.p_object = p_object; + object_set_uninitialized_core(&visitor); +} + +unsigned char type_is_any_owner(struct type * p_type); +unsigned char compiler_diagnostic_message(int w, struct parser_ctx * ctx, struct token * p_token, struct marker * p_marker, char * fmt, ...); + +static void checked_empty_core(struct flow_visit_ctx * ctx, struct type * p_type, struct flow_object * p_object, char * previous_names, struct marker * p_marker) +{ + 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 : ((void *)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) + { + char * name = p_member_declarator->declarator->name_opt ? p_member_declarator->declarator->name_opt->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); + } + checked_empty_core(ctx, &p_member_declarator->declarator->type, p_object->members.data[member_index], name, p_marker); + member_index++; + } + p_member_declarator = p_member_declarator->next; + } + } + else + { + if (p_member_declaration->specifier_qualifier_list != ((void *)0)) + { + } + } + p_member_declaration = p_member_declaration->next; + } + return; + } + if (type_is_any_owner(p_type)) + { + if (p_object->current.state == (1 | 2 | 8) || p_object->current.state == (2 | 8) || p_object->current.state == 2 || p_object->current.state == 8 || p_object->current.state == 1 || p_object->current.state == (1 | 2) || p_object->current.state == (1 | 8)) + { + } + else + { + compiler_diagnostic_message(28, ctx->ctx, ((void *)0), p_marker, "object '%s' may not be empty", previous_names); + } + } +} + +void checked_empty(struct flow_visit_ctx * ctx, struct type * p_type, struct flow_object * p_object, struct marker * p_marker) +{ + char name[100] = {0}; + object_get_name(p_type, p_object, name, sizeof name); + checked_empty_core(ctx, p_type, p_object, name, p_marker); +} + +static void object_set_moved_core(struct object_visitor * p_visitor) +{ + if (p_visitor->p_type->struct_or_union_specifier) + { + struct struct_or_union_specifier * p_struct_or_union_specifier = get_complete_struct_or_union_specifier(p_visitor->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; + 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 (p_visitor->member_index < p_visitor->p_object->members.size) + { + struct object_visitor visitor = {0}; + visitor.p_type = &p_member_declarator->declarator->type; + visitor.p_object = p_visitor->p_object->members.data[p_visitor->member_index]; + object_set_moved_core(&visitor); + } + p_visitor->member_index++; + } + p_member_declarator = p_member_declarator->next; + } + } + else + { + if (p_member_declaration->specifier_qualifier_list != ((void *)0)) + { + if (p_member_declaration->specifier_qualifier_list->struct_or_union_specifier) + { + struct type t = {0}; + t.category = 0; + t.struct_or_union_specifier = p_member_declaration->specifier_qualifier_list->struct_or_union_specifier; + t.type_specifier_flags = 32768; + struct type * type_temp = p_visitor->p_type; + p_visitor->p_type = &t; + object_set_moved_core(p_visitor); + p_visitor->p_type = type_temp; + type_destroy(&t); + } + } + } + p_member_declaration = p_member_declaration->next; + } + return; + } + } + if (type_is_pointer(p_visitor->p_type)) + { + p_visitor->p_object->current.state = 8; + } + else + { + p_visitor->p_object->current.state = 8; + } +} + +void flow_object_set_moved(struct type * p_type, struct flow_object * p_object) +{ + struct object_visitor visitor = {0}; + visitor.p_type = p_type; + visitor.p_object = p_object; + object_set_moved_core(&visitor); +} + +unsigned char type_is_struct_or_union(struct type * p_type); + +static void object_set_unknown_core(struct object_visitor * p_visitor, unsigned char t_is_nullable, unsigned int visit_number, unsigned char nullable_enabled) +{ + if (p_visitor->p_object->visit_number == visit_number) + { + return; + } + p_visitor->p_object->visit_number = visit_number; + if (p_visitor->p_type->struct_or_union_specifier) + { + struct struct_or_union_specifier * p_struct_or_union_specifier = get_complete_struct_or_union_specifier(p_visitor->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; + 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 (p_visitor->member_index < p_visitor->p_object->members.size) + { + struct object_visitor visitor = {0}; + visitor.p_type = &p_member_declarator->declarator->type; + visitor.p_object = p_visitor->p_object->members.data[p_visitor->member_index]; + object_set_unknown_core(&visitor, t_is_nullable, visit_number, nullable_enabled); + } + else + { + } + p_visitor->member_index++; + } + p_member_declarator = p_member_declarator->next; + } + } + else + { + if (p_member_declaration->specifier_qualifier_list != ((void *)0)) + { + if (p_member_declaration->specifier_qualifier_list->struct_or_union_specifier) + { + struct type t = {0}; + t.category = 0; + t.struct_or_union_specifier = p_member_declaration->specifier_qualifier_list->struct_or_union_specifier; + t.type_specifier_flags = 32768; + struct type * temp = p_visitor->p_type; + p_visitor->p_type = &t; + int vn = p_visitor->p_object->visit_number; + p_visitor->p_object->visit_number = 0; + object_set_unknown_core(p_visitor, t_is_nullable, visit_number, nullable_enabled); + p_visitor->p_object->visit_number = vn; + p_visitor->p_type = temp; + type_destroy(&t); + } + } + } + p_member_declaration = p_member_declaration->next; + } + return; + } + return; + } + if (type_is_pointer(p_visitor->p_type)) + { + if (t_is_nullable || type_is_nullable(p_visitor->p_type, nullable_enabled)) + { + p_visitor->p_object->current.state = 2 | 4; + } + else + { + p_visitor->p_object->current.state = 4; + } + struct flow_object * pointed = p_visitor->p_object->current.pointed; + if (pointed) + { + struct type t2 = type_remove_pointer(p_visitor->p_type); + unsigned char t2_is_nullable = type_is_nullable(&t2, nullable_enabled); + struct object_visitor visitor = {0}; + visitor.p_type = &t2; + visitor.p_object = pointed; + object_set_unknown_core(&visitor, t2_is_nullable, visit_number, nullable_enabled); + type_destroy(&t2); + } + } + else + { + if ( !type_is_struct_or_union(p_visitor->p_type)) + { + p_visitor->p_object->current.state = 32 | 64; + } + } +} + +void flow_object_set_unknown(struct type * p_type, unsigned char t_is_nullable, struct flow_object * p_object, unsigned char nullable_enabled) +{ + struct object_visitor visitor = {0}; + visitor.p_type = p_type; + visitor.p_object = p_object; + object_set_unknown_core(&visitor, t_is_nullable, s_visit_number++, nullable_enabled); +} + +static void object_set_deleted_core(struct type * p_type, struct flow_object * p_object, unsigned int visit_number) +{ + if (p_object->visit_number == visit_number) + { + return; + } + p_object->visit_number = visit_number; + 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_deleted_core(&p_member_declarator->declarator->type, p_object->members.data[member_index], visit_number); + } + else + { + } + member_index++; + } + p_member_declarator = p_member_declarator->next; + } + } + else + { + if (p_member_declaration->specifier_qualifier_list != ((void *)0)) + { + } + } + p_member_declaration = p_member_declaration->next; + } + return; + } + return; + } + if (type_is_pointer(p_type)) + { + p_object->current.state = 128; + } + else + { + if ( !type_is_struct_or_union(p_type)) + { + p_object->current.state = 128; + } + } +} + +void flow_object_set_can_be_uninitialized(struct flow_object * p_object) +{ + p_object->current.state = 1; +} + +void flow_object_set_is_unitialized(struct flow_object * p_object) +{ + p_object->current.state = 1; + if (p_object->current.alternatives.size > 0) + { + { + int i = 0; + for (; i < p_object->current.alternatives.size; i++) + { + flow_object_set_can_be_uninitialized(p_object->current.alternatives.data[i]); + } + } + } +} + +void flow_object_set_can_be_moved(struct flow_object * p_object) +{ + if (p_object->current.state & 4) + { + p_object->current.state = ~4; + p_object->current.state = 8; + p_object->current.state = 8; + } +} + +void flow_object_set_is_moved(struct flow_object * p_object) +{ + p_object->current.state = 8; + if (p_object->current.alternatives.size > 0) + { + { + int i = 0; + for (; i < p_object->current.alternatives.size; i++) + { + flow_object_set_can_be_moved(p_object->current.alternatives.data[i]); + } + } + } +} + +void object_set_deleted(struct type * p_type, struct flow_object * p_object) +{ + object_set_deleted_core(p_type, p_object, s_visit_number++); +} + +void object_set_zero_core(struct object_visitor * p_visitor) +{ + if (p_visitor->p_type->struct_or_union_specifier) + { + struct struct_or_union_specifier * p_struct_or_union_specifier = get_complete_struct_or_union_specifier(p_visitor->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; + 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 (p_visitor->member_index < p_visitor->p_object->members.size) + { + struct object_visitor visitor = {0}; + visitor.p_type = &p_member_declarator->declarator->type; + visitor.p_object = p_visitor->p_object->members.data[p_visitor->member_index]; + object_set_zero_core(&visitor); + } + p_visitor->member_index++; + } + p_member_declarator = p_member_declarator->next; + } + } + else + { + if (p_member_declaration->specifier_qualifier_list != ((void *)0)) + { + if (p_member_declaration->specifier_qualifier_list->struct_or_union_specifier) + { + struct type t = {0}; + t.category = 0; + t.struct_or_union_specifier = p_member_declaration->specifier_qualifier_list->struct_or_union_specifier; + t.type_specifier_flags = 32768; + struct type * temp = p_visitor->p_type; + p_visitor->p_type = &t; + object_set_zero_core(p_visitor); + p_visitor->p_type = temp; + type_destroy(&t); + } + } + } + p_member_declaration = p_member_declaration->next; + } + return; + } + return; + } + if (type_is_pointer(p_visitor->p_type)) + { + p_visitor->p_object->current.state = 2; + } + else + { + p_visitor->p_object->current.state = 32; + } +} + +void flow_object_set_zero(struct type * p_type, struct flow_object * p_object) +{ + struct object_visitor visitor = {0}; + visitor.p_type = p_type; + visitor.p_object = p_object; + object_set_zero_core(&visitor); +} + +void object_set_end_of_lifetime_core(struct object_visitor * p_visitor) +{ + if (p_visitor->p_type->struct_or_union_specifier) + { + struct struct_or_union_specifier * p_struct_or_union_specifier = get_complete_struct_or_union_specifier(p_visitor->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; + 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 (p_visitor->member_index < p_visitor->p_object->members.size) + { + struct object_visitor visitor = {0}; + visitor.p_type = &p_member_declarator->declarator->type; + visitor.p_object = p_visitor->p_object->members.data[p_visitor->member_index]; + object_set_end_of_lifetime_core(&visitor); + } + p_visitor->member_index++; + } + p_member_declarator = p_member_declarator->next; + } + } + else + { + if (p_member_declaration->specifier_qualifier_list != ((void *)0)) + { + if (p_member_declaration->specifier_qualifier_list->struct_or_union_specifier) + { + struct type t = {0}; + t.category = 0; + t.struct_or_union_specifier = p_member_declaration->specifier_qualifier_list->struct_or_union_specifier; + t.type_specifier_flags = 32768; + struct type * temp = p_visitor->p_type; + p_visitor->p_type = &t; + object_set_end_of_lifetime_core(p_visitor); + p_visitor->p_type = temp; + type_destroy(&t); + } + } + } + p_member_declaration = p_member_declaration->next; + } + return; + } + return; + } + p_visitor->p_object->current.state = 128; +} + +void flow_object_set_end_of_lifetime(struct type * p_type, struct flow_object * p_object) +{ + struct object_visitor visitor = {0}; + visitor.p_type = p_type; + visitor.p_object = p_object; + object_set_end_of_lifetime_core(&visitor); +} + +unsigned char type_is_owner(struct type * p_type); + +unsigned char object_check(struct type * p_type, struct flow_object * p_object) +{ + if (p_type->type_qualifier_flags & 64) + { + return 0; + } + if ( !type_is_any_owner(p_type)) + { + return 0; + } + 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; + } + } + else + { + if (p_member_declaration->specifier_qualifier_list != ((void *)0)) + { + } + } + p_member_declaration = p_member_declaration->next; + } + return need_destroy_count > 1 && (need_destroy_count == possible_need_destroy_count); + } + else + { + unsigned char should_had_been_moved = 0; + if (type_is_pointer(p_type)) + { + should_had_been_moved = (p_object->current.state & 4); + } + else + { + if (p_object->current.state == 1 || (p_object->current.state & 8) || p_object->current.state == 4 || p_object->current.state == (1)) + { + } + else + { + should_had_been_moved = 1; + } + } + return should_had_been_moved; + } + return 0; +} + +void object_get_name_core(struct type * p_type, struct flow_object * p_object, struct flow_object * p_object_target, char * previous_names, char * outname, int out_size, unsigned int visit_number) +{ + if (p_object->visit_number == visit_number) + { + return; + } + ((struct flow_object *)p_object)->visit_number = visit_number; + 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) + { + char * name = p_member_declarator->declarator->name_opt ? p_member_declarator->declarator->name_opt->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, visit_number); + member_index++; + } + p_member_declarator = p_member_declarator->next; + } + } + else + { + if (p_member_declaration->specifier_qualifier_list != ((void *)0)) + { + } + } + p_member_declaration = p_member_declaration->next; + } + } + else + { + snprintf(outname, out_size, "%s", previous_names); + } +} + +void object_get_name(struct type * p_type, struct flow_object * p_object, char * outname, int out_size) +{ + outname[0] = 0; + if (p_object->p_declarator_origin) + { + char * root_name = p_object->p_declarator_origin->name_opt ? p_object->p_declarator_origin->name_opt->lexeme : "?"; + struct flow_object * root = p_object->p_declarator_origin->p_object; + object_get_name_core(&p_object->p_declarator_origin->type, root, p_object, root_name, outname, out_size, s_visit_number++); + } + else + { + if (p_object->p_expression_origin) + { + int bytes_written = 0; + struct token * p = p_object->p_expression_origin->first_token; + { + int i = 0; + for (; i < 10; i++) + { + char * ps = p->lexeme; + while ( *ps) + { + if (bytes_written < (out_size - 1)) + { + outname[bytes_written] = *ps; + } + bytes_written++; + ps++; + } + if (p == p_object->p_expression_origin->last_token) + { + break; + } + p = p->next; + } + } + if (bytes_written < (out_size - 1)) + { + outname[bytes_written] = 0; + } + else + { + outname[out_size - 1] = 0; + } + } + else + { + outname[0] = 63; + outname[1] = 0; + } + } +} + +void checked_moved_core(struct flow_visit_ctx * ctx, struct type * p_type, struct flow_object * p_object, struct token * position_token, unsigned int visit_number) +{ + if (p_object->visit_number == visit_number) + { + return; + } + p_object->visit_number = visit_number; + 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) + { + checked_moved_core(ctx, &p_member_declarator->declarator->type, p_object->members.data[member_index], position_token, visit_number); + member_index++; + } + p_member_declarator = p_member_declarator->next; + } + } + else + { + if (p_member_declaration->specifier_qualifier_list != ((void *)0)) + { + ; + } + } + p_member_declaration = p_member_declaration->next; + } + return; + } + else + { + if (type_is_pointer(p_type) && !type_is_any_owner(p_type)) + { + if (p_object->current.state != 1 && p_object->current.state != 2) + { + struct type t2 = type_remove_pointer(p_type); + type_destroy(&t2); + } + } + if (p_object->current.state & 8) + { + struct token * name_pos = flow_object_get_token(p_object); + char * parameter_name = name_pos ? name_pos->lexeme : "?"; + char name[200] = {0}; + object_get_name(p_type, p_object, name, sizeof name); + if (compiler_diagnostic_message(28, ctx->ctx, position_token, ((void *)0), "parameter '%s' is leaving scoped with a moved object '%s'", parameter_name, name)) + { + compiler_diagnostic_message(62, ctx->ctx, name_pos, ((void *)0), "parameter", name); + } + } + if (p_object->current.state & 1) + { + struct token * name_pos = flow_object_get_token(p_object); + char * parameter_name = name_pos ? name_pos->lexeme : "?"; + char name[200] = {0}; + object_get_name(p_type, p_object, name, sizeof name); + if (compiler_diagnostic_message(28, ctx->ctx, position_token, ((void *)0), "parameter '%s' is leaving scoped with a uninitialized object '%s'", parameter_name, name)) + { + compiler_diagnostic_message(62, ctx->ctx, name_pos, ((void *)0), "parameter", name); + } + } + } +} + +void checked_moved(struct flow_visit_ctx * ctx, struct type * p_type, struct flow_object * p_object, struct token * position_token) +{ + checked_moved_core(ctx, p_type, p_object, position_token, s_visit_number++); +} + +static void checked_read_object_core(struct flow_visit_ctx * ctx, struct object_visitor * p_visitor, unsigned char is_nullable, struct token * position_token_opt, struct marker * p_marker_opt, unsigned char check_pointed_object, char * previous_names, unsigned int visit_number) +{ + ; + if (p_visitor->p_object == ((void *)0)) + { + return; + } + if (p_visitor->p_object->visit_number == visit_number) + { + return; + } + p_visitor->p_object->visit_number = visit_number; + if (p_visitor->p_type->struct_or_union_specifier && p_visitor->p_object->members.size > 0) + { + struct struct_or_union_specifier * p_struct_or_union_specifier = get_complete_struct_or_union_specifier(p_visitor->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 : ((void *)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 * name = p_member_declarator->declarator->name_opt ? p_member_declarator->declarator->name_opt->lexeme : "?"; + char buffer[200] = {0}; + if (type_is_pointer(p_visitor->p_type)) + { + snprintf(buffer, sizeof buffer, "%s->%s", previous_names, name); + } + else + { + snprintf(buffer, sizeof buffer, "%s.%s", previous_names, name); + } + struct object_visitor visitor = {0}; + visitor.p_type = &p_member_declarator->declarator->type; + visitor.p_object = p_visitor->p_object->members.data[p_visitor->member_index]; + checked_read_object_core(ctx, &visitor, is_nullable, position_token_opt, p_marker_opt, check_pointed_object, buffer, visit_number); + p_visitor->member_index++; + } + p_member_declarator = p_member_declarator->next; + } + } + else + { + if (p_member_declaration->specifier_qualifier_list) + { + struct type t = {0}; + t.category = 0; + t.struct_or_union_specifier = p_member_declaration->specifier_qualifier_list->struct_or_union_specifier; + t.type_specifier_flags = 32768; + char buffer[200] = {0}; + if (type_is_pointer(p_visitor->p_type)) + { + snprintf(buffer, sizeof buffer, "%s->", previous_names); + } + else + { + snprintf(buffer, sizeof buffer, "%s.", previous_names); + } + struct type * temp = p_visitor->p_type; + p_visitor->p_type = &t; + int visit_number0 = p_visitor->p_object->visit_number; + p_visitor->p_object->visit_number = 0; + checked_read_object_core(ctx, p_visitor, is_nullable, position_token_opt, p_marker_opt, check_pointed_object, buffer, visit_number); + p_visitor->p_type = temp; + p_visitor->p_object->visit_number = visit_number0; + type_destroy(&t); + } + } + p_member_declaration = p_member_declaration->next; + } + return; + } + else + { + if (type_is_pointer(p_visitor->p_type) && !is_nullable && !type_is_nullable(p_visitor->p_type, ctx->ctx->options.null_checks_enabled) && flow_object_can_be_null(p_visitor->p_object)) + { + compiler_diagnostic_message(32, ctx->ctx, ((void *)0), p_marker_opt, "non-nullable pointer '%s' may be null", previous_names); + } + if (type_is_pointer(p_visitor->p_type) && check_pointed_object && flow_object_can_be_not_null_or_moved(p_visitor->p_object)) + { + struct type t2 = type_remove_pointer(p_visitor->p_type); + if (p_visitor->p_object->current.pointed) + { + struct object_visitor visitor = {0}; + visitor.p_type = &t2; + visitor.p_object = p_visitor->p_object->current.pointed; + checked_read_object_core(ctx, &visitor, is_nullable, position_token_opt, p_marker_opt, 1, previous_names, visit_number); + } + type_destroy(&t2); + } + if (p_visitor->p_object->current.state & 1) + { + if (type_is_array(p_visitor->p_type)) + { + } + else + { + compiler_diagnostic_message(29, ctx->ctx, position_token_opt, p_marker_opt, "uninitialized object '%s'", previous_names); + } + } + if (p_visitor->p_object->current.state & 128) + { + compiler_diagnostic_message(30, ctx->ctx, position_token_opt, p_marker_opt, "lifetime ended '%s'", previous_names); + } + } +} + +void checked_read_object(struct flow_visit_ctx * ctx, struct type * p_type, unsigned char is_nullable, struct flow_object * p_object, struct token * position_token, struct marker * p_marker_opt, unsigned char check_pointed_object) +{ + char * s = ((void *)0); + char name[200] = {0}; + object_get_name(p_type, p_object, name, sizeof name); + struct object_visitor visitor = {0}; + visitor.p_object = p_object; + visitor.p_type = p_type; + checked_read_object_core(ctx, &visitor, is_nullable, position_token, p_marker_opt, check_pointed_object, name, s_visit_number++); + free((void *)s); +} + +unsigned char type_is_view(struct type * p_type); +unsigned char type_is_obj_owner(struct type * p_type); + +static void flow_end_of_block_visit_core(struct flow_visit_ctx * ctx, struct object_visitor * p_visitor, unsigned char b_type_is_view, struct token * position_token, char * previous_names, unsigned int visit_number) +{ + if (p_visitor->p_object == ((void *)0)) + { + return; + } + if (p_visitor->p_object->visit_number == visit_number) + { + return; + } + p_visitor->p_object->visit_number = visit_number; + if (p_visitor->p_type->struct_or_union_specifier && p_visitor->p_object->members.size > 0) + { + struct struct_or_union_specifier * p_struct_or_union_specifier = get_complete_struct_or_union_specifier(p_visitor->p_type->struct_or_union_specifier); + if (p_struct_or_union_specifier == ((void *)0)) + { + return; + } + struct member_declaration * p_member_declaration = p_struct_or_union_specifier->member_declaration_list.head; + if (object_check(p_visitor->p_type, p_visitor->p_object)) + { + struct token * name = flow_object_get_token(p_visitor->p_object); + if (compiler_diagnostic_message(28, ctx->ctx, name, ((void *)0), "object '%s' was not moved/destroyed", previous_names)) + { + if (p_visitor->p_object->p_declarator_origin) + { + compiler_diagnostic_message(62, ctx->ctx, position_token, ((void *)0), "end of '%s' scope", previous_names); + } + } + } + else + { + 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 * name = p_member_declarator->declarator->name_opt ? p_member_declarator->declarator->name_opt->lexeme : "?"; + char buffer[200] = {0}; + if (type_is_pointer(p_visitor->p_type)) + { + snprintf(buffer, sizeof buffer, "%s->%s", previous_names, name); + } + else + { + snprintf(buffer, sizeof buffer, "%s.%s", previous_names, name); + } + unsigned char member_is_view = type_is_view(&p_member_declarator->declarator->type); + struct object_visitor visitor = {0}; + visitor.p_type = &p_member_declarator->declarator->type; + visitor.p_object = p_visitor->p_object->members.data[p_visitor->member_index]; + flow_end_of_block_visit_core(ctx, &visitor, b_type_is_view || member_is_view, position_token, buffer, visit_number); + p_visitor->member_index++; + } + p_member_declarator = p_member_declarator->next; + } + } + else + { + if (p_member_declaration->specifier_qualifier_list != ((void *)0)) + { + struct type t = {0}; + t.category = 0; + t.struct_or_union_specifier = p_member_declaration->specifier_qualifier_list->struct_or_union_specifier; + t.type_specifier_flags = 32768; + struct type * temp = p_visitor->p_type; + p_visitor->p_type = &t; + unsigned char member_is_view = type_is_view(&t); + int visit_number0 = p_visitor->p_object->visit_number; + p_visitor->p_object->visit_number = 0; + flow_end_of_block_visit_core(ctx, p_visitor, member_is_view, position_token, previous_names, visit_number); + p_visitor->p_type = temp; + p_visitor->p_object->visit_number = visit_number0; + type_destroy(&t); + } + } + p_member_declaration = p_member_declaration->next; + } + } + } + else + { + char * name = previous_names; + struct token * position = ((void *)0); + if (p_visitor->p_object->p_declarator_origin) + { + position = p_visitor->p_object->p_declarator_origin->name_opt ? p_visitor->p_object->p_declarator_origin->name_opt : p_visitor->p_object->p_declarator_origin->first_token_opt; + } + else + { + if (p_visitor->p_object->p_expression_origin) + { + position = p_visitor->p_object->p_expression_origin->first_token; + } + else + { + ; + } + } + if (name[0] == 0) + { + name = "?"; + } + if (type_is_pointer(p_visitor->p_type) && !b_type_is_view && type_is_owner(p_visitor->p_type) && p_visitor->p_object->current.state & 4) + { + if (compiler_diagnostic_message(28, ctx->ctx, position, ((void *)0), "ownership of '%s' not moved before the end of lifetime", previous_names)) + { + compiler_diagnostic_message(62, ctx->ctx, position_token, ((void *)0), "end of '%s' lifetime", previous_names); + } + } + else + { + if ( !b_type_is_view && type_is_obj_owner(p_visitor->p_type) && type_is_pointer(p_visitor->p_type)) + { + char buffer[100] = {0}; + snprintf(buffer, sizeof buffer, "%s", previous_names); + struct type t2 = type_remove_pointer(p_visitor->p_type); + if (p_visitor->p_object->current.pointed) + { + struct object_visitor visitor = {0}; + visitor.p_type = &t2; + visitor.p_object = p_visitor->p_object->current.pointed; + flow_end_of_block_visit_core(ctx, &visitor, b_type_is_view, position, buffer, visit_number); + } + type_destroy(&t2); + } + else + { + if (type_is_owner(p_visitor->p_type) && !type_is_pointer(p_visitor->p_type)) + { + if (p_visitor->p_object->current.state == 1 || p_visitor->p_object->current.state == 2 || p_visitor->p_object->current.state == 8) + { + } + else + { + if (compiler_diagnostic_message(28, ctx->ctx, position, ((void *)0), "ownership of '%s' not moved before the end of lifetime", previous_names)) + { + compiler_diagnostic_message(62, ctx->ctx, position_token, ((void *)0), "end of '%s' lifetime", previous_names); + } + } + } + else + { + if (type_is_pointer(p_visitor->p_type)) + { + if (p_visitor->p_type->storage_class_specifier_flags & 2048) + { + if (type_is_any_owner(p_visitor->p_type)) + { + } + else + { + struct type t2 = type_remove_pointer(p_visitor->p_type); + if (p_visitor->p_object->current.pointed) + { + struct token * name_token = p_visitor->p_object->p_declarator_origin->name_opt ? p_visitor->p_object->p_declarator_origin->name_opt : p_visitor->p_object->p_declarator_origin->first_token_opt; + checked_read_object(ctx, &t2, 0, p_visitor->p_object->current.pointed, name_token, ((void *)0), 1); + } + type_destroy(&t2); + } + } + } + else + { + } + } + } + } + } +} + +void flow_end_of_block_visit(struct flow_visit_ctx * ctx, struct type * p_type, unsigned char type_is_view, struct flow_object * p_object, struct token * position_token, char * previous_names) +{ + struct object_visitor visitor = {0}; + visitor.p_type = p_type; + visitor.p_object = p_object; + flow_end_of_block_visit_core(ctx, &visitor, type_is_view, position_token, previous_names, s_visit_number++); +} + +unsigned char flow_object_is_zero_or_null(struct flow_object * p_object) +{ + return (p_object->current.state == 2) || (p_object->current.state == 32); +} + +struct type get_array_item_type(struct type * p_type); +unsigned char type_is_out(struct type * p_type); +unsigned char type_is_const(struct type * p_type); +unsigned char type_is_nullptr_t(struct type * p_type); +unsigned char type_is_integer(struct type * p_type); +unsigned char type_is_void_ptr(struct type * p_type); + +static void flow_assignment_core(struct flow_visit_ctx * ctx, struct token * error_position, struct marker * p_a_marker, struct marker * p_b_marker, int assigment_type, unsigned char check_uninitialized_b, unsigned char a_type_is_view, unsigned char a_type_is_nullable, struct object_visitor * p_visitor_a, struct object_visitor * p_visitor_b, unsigned char * set_argument_to_unkown) +{ + if (check_uninitialized_b && flow_object_can_be_uninitialized(p_visitor_b->p_object)) + { + if (type_is_array(p_visitor_b->p_type)) + { + if (assigment_type == 1) + { + struct type item_type = {0}; + if (type_is_array(p_visitor_a->p_type)) + { + item_type = get_array_item_type(p_visitor_a->p_type); + } + else + { + item_type = type_remove_pointer(p_visitor_a->p_type); + } + unsigned char cannot_be_uninitialized = (ctx->ctx->options.ownership_enabled && !type_is_out(&item_type)) || type_is_const(&item_type); + if (cannot_be_uninitialized) + { + char b_object_name[100] = {0}; + object_get_name(p_visitor_b->p_type, p_visitor_b->p_object, b_object_name, sizeof b_object_name); + compiler_diagnostic_message(29, ctx->ctx, ((void *)0), p_b_marker, "uninitialized object '%s' passed to non-optional parameter", b_object_name); + } + type_destroy(&item_type); + } + } + else + { + char b_object_name[100] = {0}; + object_get_name(p_visitor_b->p_type, p_visitor_b->p_object, b_object_name, sizeof b_object_name); + if (assigment_type == 1) + { + compiler_diagnostic_message(29, ctx->ctx, ((void *)0), p_b_marker, "passing an uninitialized argument '%s' object", b_object_name); + } + else + { + if (assigment_type == 0) + { + compiler_diagnostic_message(29, ctx->ctx, ((void *)0), p_b_marker, "returning an uninitialized '%s' object", b_object_name); + } + else + { + compiler_diagnostic_message(29, ctx->ctx, ((void *)0), p_b_marker, "reading an uninitialized '%s' object", b_object_name); + } + } + } + return; + } + if (check_uninitialized_b && flow_object_can_have_its_lifetime_ended(p_visitor_a->p_object)) + { + char buffer[100] = {0}; + object_get_name(p_visitor_a->p_type, p_visitor_a->p_object, buffer, sizeof buffer); + compiler_diagnostic_message(30, ctx->ctx, ((void *)0), p_a_marker, "The object '%s' may have been deleted or its lifetime have ended.", buffer); + return; + } + if (type_is_pointer(p_visitor_a->p_type) && ( !type_is_nullable(p_visitor_a->p_type, ctx->ctx->options.null_checks_enabled)) && flow_object_can_be_null(p_visitor_b->p_object)) + { + if ( !a_type_is_nullable) + { + char buffer[100] = {0}; + object_get_name(p_visitor_b->p_type, p_visitor_b->p_object, buffer, sizeof buffer); + if (assigment_type == 1) + { + compiler_diagnostic_message(34, ctx->ctx, ((void *)0), p_b_marker, "passing a possible null pointer '%s' to non-nullable pointer parameter", buffer); + } + else + { + if (assigment_type == 0) + { + compiler_diagnostic_message(34, ctx->ctx, ((void *)0), p_b_marker, "returning a possible null pointer '%s' to non-nullable pointer", buffer); + } + else + { + compiler_diagnostic_message(34, ctx->ctx, ((void *)0), p_b_marker, "assignment of possible null pointer '%s' to non-nullable pointer", buffer); + } + } + } + } + if (type_is_pointer(p_visitor_a->p_type)) + { + if ( !a_type_is_view && type_is_owner(p_visitor_a->p_type)) + { + checked_empty(ctx, p_visitor_a->p_type, p_visitor_a->p_object, p_a_marker); + } + if (flow_object_is_zero_or_null(p_visitor_b->p_object)) + { + if (type_is_array(p_visitor_b->p_type)) + { + p_visitor_a->p_object->current.state = 4; + return; + } + else + { + if (type_is_nullptr_t(p_visitor_b->p_type) || type_is_integer(p_visitor_b->p_type)) + { + flow_object_set_current_state_to_is_null(p_visitor_a->p_object); + return; + } + } + } + } + if ( !a_type_is_view && type_is_obj_owner(p_visitor_a->p_type) && type_is_pointer(p_visitor_a->p_type)) + { + checked_empty(ctx, p_visitor_a->p_type, p_visitor_a->p_object, p_a_marker); + if (flow_object_is_zero_or_null(p_visitor_b->p_object)) + { + return; + } + } + if (type_is_void_ptr(p_visitor_a->p_type) && type_is_pointer(p_visitor_b->p_type)) + { + p_visitor_a->p_object->current.state = p_visitor_b->p_object->current.state; + if ( !a_type_is_view && type_is_owner(p_visitor_a->p_type)) + { + struct type t = type_remove_pointer(p_visitor_b->p_type); + if (p_visitor_b->p_object->current.pointed == ((void *)0)) + { + if (flow_object_is_expansible(p_visitor_b->p_object) && type_is_owner(&t)) + { + compiler_diagnostic_message(28, ctx->ctx, ((void *)0), p_a_marker, "pointed object may be not empty"); + } + } + else + { + checked_empty(ctx, &t, p_visitor_b->p_object->current.pointed, p_b_marker); + object_set_deleted(&t, p_visitor_b->p_object->current.pointed); + } + type_destroy(&t); + if (assigment_type == 1) + { + flow_object_set_is_unitialized(p_visitor_b->p_object); + p_visitor_b->p_object->current.state = 1; + } + else + { + flow_object_set_is_moved(p_visitor_b->p_object); + } + } + return; + } + if (type_is_pointer(p_visitor_a->p_type) && type_is_pointer(p_visitor_b->p_type)) + { + p_visitor_a->p_object->current.state = p_visitor_b->p_object->current.state; + p_visitor_a->p_object->current.pointed = p_visitor_b->p_object->current.pointed; + struct type t = type_remove_pointer(p_visitor_a->p_type); + unsigned char checked_pointed_object_read = ctx->ctx->options.ownership_enabled && !type_is_out(&t); + unsigned char is_nullable = a_type_is_nullable || type_is_nullable(&t, ctx->ctx->options.null_checks_enabled); + checked_read_object(ctx, p_visitor_b->p_type, is_nullable, p_visitor_b->p_object, error_position, p_b_marker, checked_pointed_object_read); + type_destroy(&t); + if ( !a_type_is_view && type_is_owner(p_visitor_a->p_type)) + { + if (flow_object_can_be_moved(p_visitor_b->p_object)) + { + compiler_diagnostic_message(31, ctx->ctx, error_position, ((void *)0), "source object has already been moved"); + } + if (assigment_type == 1) + { + p_visitor_b->p_object->current.state = 1; + if (p_visitor_b->p_object->current.pointed) + { + struct flow_object * pointed = p_visitor_b->p_object->current.pointed; + struct type t2 = type_remove_pointer(p_visitor_b->p_type); + object_set_deleted(&t2, pointed); + type_destroy(&t2); + } + } + else + { + p_visitor_a->p_object->current.state = p_visitor_a->p_object->current.state & ~8; + if (p_visitor_b->p_object->current.state & 4) + { + p_visitor_b->p_object->current.state = ~4; + p_visitor_b->p_object->current.state = 8; + } + } + } + else + { + if ( !a_type_is_view && type_is_obj_owner(p_visitor_a->p_type)) + { + if (type_is_any_owner(p_visitor_b->p_type)) + { + if (assigment_type == 1) + { + if (p_visitor_b->p_object->current.pointed) + { + struct flow_object * pointed = p_visitor_b->p_object->current.pointed; + struct type t2 = type_remove_pointer(p_visitor_b->p_type); + flow_object_set_uninitialized(&t2, pointed); + type_destroy(&t2); + } + } + else + { + flow_object_set_moved(p_visitor_b->p_type, p_visitor_b->p_object); + } + } + else + { + if (p_visitor_b->p_type->address_of) + { + if (assigment_type == 1) + { + p_visitor_b->p_object->current.state = 1; + if (p_visitor_b->p_object->current.pointed) + { + struct flow_object * pointed = p_visitor_b->p_object->current.pointed; + struct type t2 = type_remove_pointer(p_visitor_b->p_type); + flow_object_set_uninitialized(&t2, pointed); + type_destroy(&t2); + } + } + else + { + flow_object_set_moved(p_visitor_b->p_type, p_visitor_b->p_object); + } + } + else + { + } + } + } + else + { + if (a_type_is_view || !type_is_owner(p_visitor_a->p_type)) + { + p_visitor_a->p_object->current.state = p_visitor_b->p_object->current.state; + } + if (assigment_type == 1) + { + struct type t3 = type_remove_pointer(p_visitor_a->p_type); + if ( !type_is_const(&t3)) + { + if (p_visitor_b->p_object->current.pointed) + { + if (set_argument_to_unkown) + { + *set_argument_to_unkown = 1; + } + } + } + type_destroy(&t3); + } + } + } + return; + } + if (p_visitor_a->p_type->struct_or_union_specifier && p_visitor_a->p_object->members.size > 0) + { + struct struct_or_union_specifier * p_a_struct_or_union_specifier = get_complete_struct_or_union_specifier(p_visitor_a->p_type->struct_or_union_specifier); + if (p_visitor_b->p_type->struct_or_union_specifier == ((void *)0)) + { + return; + } + struct struct_or_union_specifier * p_b_struct_or_union_specifier = get_complete_struct_or_union_specifier(p_visitor_b->p_type->struct_or_union_specifier); + if (p_a_struct_or_union_specifier && p_b_struct_or_union_specifier) + { + struct member_declaration * p_a_member_declaration = p_a_struct_or_union_specifier->member_declaration_list.head; + struct member_declaration * p_b_member_declaration = p_b_struct_or_union_specifier->member_declaration_list.head; + while (p_a_member_declaration && p_b_member_declaration) + { + if (p_a_member_declaration->member_declarator_list_opt) + { + struct member_declarator * p_a_member_declarator = p_a_member_declaration->member_declarator_list_opt->head; + struct member_declarator * p_b_member_declarator = p_b_member_declaration->member_declarator_list_opt->head; + while (p_a_member_declarator && p_b_member_declarator) + { + if (p_a_member_declarator->declarator && p_b_member_declarator->declarator) + { + if (p_visitor_a->member_index < p_visitor_a->p_object->members.size && p_visitor_b->member_index < p_visitor_b->p_object->members.size) + { + struct object_visitor visitor_a = {0}; + visitor_a.p_type = &p_a_member_declarator->declarator->type; + visitor_a.p_object = p_visitor_a->p_object->members.data[p_visitor_a->member_index]; + struct object_visitor visitor_b = {0}; + visitor_b.p_type = &p_b_member_declarator->declarator->type; + visitor_b.p_object = p_visitor_b->p_object->members.data[p_visitor_b->member_index]; + flow_assignment_core(ctx, error_position, p_a_marker, p_b_marker, assigment_type, check_uninitialized_b, a_type_is_view, a_type_is_nullable, &visitor_a, &visitor_b, set_argument_to_unkown); + } + else + { + } + p_visitor_a->member_index++; + p_visitor_b->member_index++; + } + p_a_member_declarator = p_a_member_declarator->next; + p_b_member_declarator = p_b_member_declarator->next; + } + } + else + { + if (p_a_member_declaration->specifier_qualifier_list && p_a_member_declaration->specifier_qualifier_list->struct_or_union_specifier) + { + struct type t = {0}; + t.category = 0; + t.struct_or_union_specifier = p_a_member_declaration->specifier_qualifier_list->struct_or_union_specifier; + t.type_specifier_flags = 32768; + struct type * temp1 = p_visitor_a->p_type; + struct type * temp2 = p_visitor_b->p_type; + p_visitor_a->p_type = &t; + p_visitor_b->p_type = &t; + flow_assignment_core(ctx, error_position, p_a_marker, p_b_marker, assigment_type, check_uninitialized_b, a_type_is_view, a_type_is_nullable, p_visitor_a, p_visitor_b, set_argument_to_unkown); + p_visitor_a->p_type = temp1; + p_visitor_b->p_type = temp2; + type_destroy(&t); + } + } + p_a_member_declaration = p_a_member_declaration->next; + p_b_member_declaration = p_b_member_declaration->next; + } + return; + } + } + p_visitor_a->p_object->current.state = p_visitor_b->p_object->current.state; + if ( !a_type_is_view && type_is_owner(p_visitor_a->p_type)) + { + if (assigment_type == 1) + { + flow_object_set_uninitialized(p_visitor_b->p_type, p_visitor_b->p_object); + } + else + { + flow_object_set_moved(p_visitor_b->p_type, p_visitor_b->p_object); + } + } +} + +unsigned char object_has_constant_value(struct object * a); +unsigned char object_to_bool(struct object * a); + +struct flow_object *expression_get_flow_object(struct flow_visit_ctx * ctx, struct expression * p_expression, unsigned char nullable_enabled) +{ + if (p_expression == ((void *)0)) + { + return ((void *)0); + } + if (1) + { + if (p_expression->expression_type == 2) + { + ; + if (p_expression->declarator->declaration_specifiers && !(p_expression->declarator->declaration_specifiers->storage_class_specifier_flags & 4096)) + { + ; + if (flow_objects_find(&ctx->arena, p_expression->declarator->p_object) == ((void *)0)) + { + p_expression->declarator->p_object = make_flow_object(ctx, &p_expression->declarator->type, p_expression->declarator, ((void *)0)); + flow_object_set_unknown(&p_expression->declarator->type, type_is_nullable(&p_expression->declarator->type, ctx->ctx->options.null_checks_enabled), p_expression->declarator->p_object, ctx->ctx->options.null_checks_enabled); + } + } + return p_expression->declarator->p_object; + } + else + { + if (p_expression->expression_type == 33) + { + ; + struct flow_object * p_object = make_flow_object(ctx, &p_expression->type, ((void *)0), p_expression); + if (p_object == ((void *)0)) + { + goto _catch_label_1; + } + struct flow_object * p_object_pointed = expression_get_flow_object(ctx, p_expression->right, nullable_enabled); + if (p_object_pointed) + { + object_set_pointer(p_object, p_object_pointed); + } + p_object->current.state = 4; + p_object->is_temporary = 1; + return p_object; + } + else + { + if (p_expression->expression_type == 9) + { + ; + return expression_get_flow_object(ctx, p_expression->right, nullable_enabled); + } + else + { + if (p_expression->expression_type == 34) + { + ; + struct flow_object * p = expression_get_flow_object(ctx, p_expression->left, nullable_enabled); + if (p) + { + if (type_is_pointer(&p_expression->type_name->type)) + { + if (p->current.state & 32) + { + p->current.state = ~32; + p->current.state = 2; + } + if (p->current.state & 64) + { + p->current.state = ~64; + p->current.state = 4; + } + } + } + return p; + } + else + { + if (p_expression->expression_type == 14) + { + ; + struct flow_object * p_obj = expression_get_flow_object(ctx, p_expression->left, nullable_enabled); + if (p_obj) + { + if (p_expression->member_index < p_obj->members.size) + { + return p_obj->members.data[p_expression->member_index]; + } + else + { + return ((void *)0); + } + } + } + else + { + if (p_expression->expression_type == 13) + { + ; + struct flow_object * p_obj = expression_get_flow_object(ctx, p_expression->left, nullable_enabled); + if (p_obj) + { + if (p_obj->current.pointed == ((void *)0)) + { + flow_object_expand_pointer(ctx, &p_expression->left->type, p_obj); + } + if (p_obj->current.pointed) + { + struct flow_object * pointed = p_obj->current.pointed; + return pointed; + } + } + return ((void *)0); + } + else + { + if (p_expression->expression_type == 15) + { + ; + struct flow_object * p_obj = expression_get_flow_object(ctx, p_expression->left, nullable_enabled); + if (p_obj) + { + if (p_obj->current.pointed == 0) + { + flow_object_expand_pointer(ctx, &p_expression->left->type, p_obj); + } + struct flow_object * pointed = p_obj->current.pointed; + if (pointed == ((void *)0) || p_expression->member_index >= pointed->members.size) + { + return ((void *)0); + } + struct flow_object * p_obj2 = pointed->members.data[p_expression->member_index]; + p_obj2->p_declarator_origin = ((void *)0); + p_obj2->p_expression_origin = p_expression; + return p_obj2; + } + return ((void *)0); + } + else + { + if (p_expression->expression_type == 32) + { + ; + struct flow_object * p_obj = expression_get_flow_object(ctx, p_expression->right, nullable_enabled); + if (p_obj) + { + if (p_obj->current.pointed == ((void *)0)) + { + flow_object_expand_pointer(ctx, &p_expression->right->type, p_obj); + } + if (p_obj->current.pointed != ((void *)0)) + { + return p_obj->current.pointed; + } + } + return p_obj; + } + else + { + if (p_expression->expression_type == 12) + { + struct flow_object * p_object = make_flow_object(ctx, &p_expression->type, ((void *)0), p_expression); + if (p_object == ((void *)0)) + { + goto _catch_label_1; + } + unsigned char is_nullable = type_is_nullable(&p_expression->type, nullable_enabled); + flow_object_set_unknown(&p_expression->type, is_nullable, p_object, nullable_enabled); + p_object->is_temporary = 1; + if (type_is_pointer(&p_expression->type) && flow_object_is_expansible(p_object)) + { + flow_object_expand_pointer(ctx, &p_expression->type, p_object); + } + return p_object; + } + else + { + if (p_expression->expression_type == 11) + { + ; + return p_expression->type_name->abstract_declarator->p_object; + } + else + { + if (p_expression->expression_type == 3) + { + struct flow_object * p_object = make_flow_object(ctx, &p_expression->type, ((void *)0), p_expression); + if (p_object == ((void *)0)) + { + goto _catch_label_1; + } + p_object->current.state = 4; + return p_object; + } + else + { + if (p_expression->expression_type == 6) + { + struct flow_object * p_object = make_flow_object(ctx, &p_expression->type, ((void *)0), p_expression); + if (p_object == ((void *)0)) + { + goto _catch_label_1; + } + if (p_expression->type.type_specifier_flags == 16777216) + { + p_object->current.state = 2; + } + else + { + if (object_has_constant_value(&p_expression->object)) + { + unsigned char not_zero = object_to_bool(&p_expression->object); + p_object->current.state = not_zero ? 64 : 32; + } + } + return p_object; + } + else + { + if (p_expression->expression_type == 53) + { + ; + struct flow_object * p_obj = expression_get_flow_object(ctx, p_expression->left, nullable_enabled); + return p_obj; + } + else + { + if (p_expression->expression_type == 55) + { + ; + ; + struct flow_object * p_object = make_flow_object(ctx, &p_expression->type, ((void *)0), p_expression); + if (p_object == ((void *)0)) + { + goto _catch_label_1; + } + struct flow_object * p_obj1 = expression_get_flow_object(ctx, p_expression->left, nullable_enabled); + struct flow_object * p_obj2 = expression_get_flow_object(ctx, p_expression->right, nullable_enabled); + if (p_obj1 && p_obj2) + { + flow_object_merge_state(p_object, p_obj1, p_obj2); + } + return p_object; + } + else + { + if (p_expression->expression_type == 46 || p_expression->expression_type == 47) + { + struct flow_object * p_object = make_flow_object(ctx, &p_expression->type, ((void *)0), p_expression); + if (p_object == ((void *)0)) + { + goto _catch_label_1; + } + if (object_has_constant_value(&p_expression->object)) + { + unsigned char not_zero = object_to_bool(&p_expression->object); + p_object->current.state = not_zero ? 64 : 32; + } + else + { + p_object->current.state = 64 | 32; + } + return p_object; + } + else + { + if (p_expression->expression_type == 38) + { + struct flow_object * p_object = make_flow_object(ctx, &p_expression->type, ((void *)0), p_expression); + if (p_object == ((void *)0)) + { + goto _catch_label_1; + } + if (type_is_pointer(&p_expression->type)) + { + p_object->current.state = 4; + } + else + { + if (object_has_constant_value(&p_expression->object)) + { + unsigned char not_zero = object_to_bool(&p_expression->object); + p_object->current.state = not_zero ? 4 : 2; + } + else + { + p_object->current.state = 4 | 2; + } + } + return p_object; + } + else + { + if (p_expression->expression_type == 30 || p_expression->expression_type == 31) + { + ; + struct flow_object * p_obj_right = expression_get_flow_object(ctx, p_expression->right, nullable_enabled); + struct flow_object * p_object = make_flow_object(ctx, &p_expression->type, ((void *)0), p_expression); + if (p_object == ((void *)0)) + { + goto _catch_label_1; + } + if (p_obj_right) + { + p_object->current.state = p_obj_right->current.state; + } + return p_object; + } + else + { + struct flow_object * p_object = make_flow_object(ctx, &p_expression->type, ((void *)0), p_expression); + if (p_object == ((void *)0)) + { + goto _catch_label_1; + } + if (type_is_pointer(&p_expression->type)) + { + if (object_has_constant_value(&p_expression->object)) + { + unsigned char not_zero = object_to_bool(&p_expression->object); + p_object->current.state = not_zero ? 4 : 2; + } + else + { + p_object->current.state = 4 | 2; + } + } + else + { + if (object_has_constant_value(&p_expression->object)) + { + unsigned char not_zero = object_to_bool(&p_expression->object); + p_object->current.state = not_zero ? 64 : 32; + } + else + { + p_object->current.state = 64 | 32; + } + } + return p_object; + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + else _catch_label_1: + { + } + return ((void *)0); +} + +void flow_check_assignment(struct flow_visit_ctx * ctx, struct token * error_position, struct marker * p_a_marker, struct marker * p_b_marker, int assigment_type, unsigned char check_uninitialized_b, unsigned char a_type_is_view, unsigned char a_type_is_nullable, struct type * p_a_type, struct flow_object * p_a_object, struct type * p_b_type, struct flow_object * p_b_object, unsigned char * set_argument_to_unkown) +{ + if (type_is_pointer(p_b_type) && flow_object_is_expansible(p_b_object)) + { + } + struct object_visitor visitor_a = {0, 0, 0}; + visitor_a.p_type = p_a_type; + visitor_a.p_object = p_a_object; + struct object_visitor visitor_b = {0, 0, 0}; + visitor_b.p_type = p_b_type; + visitor_b.p_object = p_b_object; + flow_assignment_core(ctx, error_position, p_a_marker, p_b_marker, assigment_type, check_uninitialized_b, a_type_is_view, a_type_is_nullable, &visitor_a, &visitor_b, set_argument_to_unkown); +} + +int ss_fprintf(struct osstream * stream, char * fmt, ...); +void ss_close(struct osstream * stream); + +void print_object_state_to_str(int e, char str[], int sz) +{ + unsigned char first = 1; + struct osstream ss = {0}; + if (e == 0) + { + ss_fprintf(&ss, "--"); + } + if (e & 1) + { + if (first) + { + first = 0; + } + else + { + ss_fprintf(&ss, ","); + } + ss_fprintf(&ss, "unset"); + } + if (e & 4) + { + if (first) + { + first = 0; + } + else + { + ss_fprintf(&ss, ","); + } + ss_fprintf(&ss, "not-null"); + } + if (e & 2) + { + if (first) + { + first = 0; + } + else + { + ss_fprintf(&ss, ","); + } + ss_fprintf(&ss, "null"); + } + if (e & 32) + { + if (first) + { + first = 0; + } + else + { + ss_fprintf(&ss, ","); + } + ss_fprintf(&ss, "zero"); + } + if (e & 64) + { + if (first) + { + first = 0; + } + else + { + ss_fprintf(&ss, ","); + } + ss_fprintf(&ss, "not-zero"); + } + if (e & 128) + { + if (first) + { + first = 0; + } + else + { + ss_fprintf(&ss, ","); + } + ss_fprintf(&ss, "lifetime-ended"); + } + if (e & 8) + { + if (first) + { + first = 0; + } + else + { + ss_fprintf(&ss, ","); + } + ss_fprintf(&ss, "moved"); + } + snprintf(str, sz, "%s", ss.c_str); + ss_close(&ss); +} + +void flow_object_state_print(struct flow_object_state * p_state) +{ + struct osstream ss = {0}; + char temp[200] = {0}; + print_object_state_to_str(p_state->state, temp, sizeof temp); + ss_fprintf(&ss, "%d %s", p_state->state_number, temp); + if (p_state->pointed) + { + ss_fprintf(&ss, " ->%d", p_state->pointed->id); + } + if (p_state->alternatives.size > 0) + { + ss_fprintf(&ss, " "); + } + { + int i = 0; + for (; i < p_state->alternatives.size; i++) + { + if (i != 0) + { + ss_fprintf(&ss, ","); + } + ss_fprintf(&ss, "%d", p_state->alternatives.data[i]->id); + } + } + printf("%-25s\xe2\x94\x82", ss.c_str); + ss_close(&ss); +} + +void print_object_line(struct flow_object * p_object, int extra_cols) +{ + struct osstream ss = {0}; + if (p_object->parent) + { + ss_fprintf(&ss, "\xe2\x86\x91%d", p_object->parent->id); + printf("\xe2\x94\x82%-2d\xe2\x94\x82", p_object->id); + printf("%-20s\xe2\x94\x82", ss.c_str); + } + else + { + int line = 0; + int col = 0; + if (p_object->p_declarator_origin) + { + if (p_object->p_declarator_origin->name_opt) + { + line = p_object->p_declarator_origin->name_opt->line; + col = p_object->p_declarator_origin->name_opt->col; + ss_fprintf(&ss, "%2d:%2d ", line, col); + ss_fprintf(&ss, "%s", p_object->p_declarator_origin->name_opt->lexeme); + } + else + { + ss_fprintf(&ss, "%2d:%2d ", line, col); + ss_fprintf(&ss, "%s", "?"); + } + } + else + { + if (p_object->p_expression_origin) + { + line = p_object->p_expression_origin->first_token->line; + col = p_object->p_expression_origin->first_token->col; + ss_fprintf(&ss, "%2d:%2d ", line, col); + ss_fprintf(&ss, "%s", p_object->p_expression_origin->first_token->lexeme); + } + else + { + ss_fprintf(&ss, "&"); + } + } + printf("\xe2\x94\x82%-2d\xe2\x94\x82", p_object->id); + printf("%-18s\xe2\x94\x82", ss.c_str); + } + ss_close(&ss); + int cols = 0; + struct flow_object_state * p_state = &p_object->current; + while (p_state) + { + cols++; + flow_object_state_print(p_state); + p_state = p_state->next; + } + { + int i = 0; + for (; i <= extra_cols - cols; i++) + { + printf("%-25s\xe2\x94\x82", " "); + } + } + printf("\n"); +} + diff --git a/out/src/options.c b/out/src/options.c new file mode 100644 index 0000000..a352e2a --- /dev/null +++ b/out/src/options.c @@ -0,0 +1,481 @@ +struct _iobuf { + void * _Placeholder; +}; + +struct w { + int w; + char * name; +}; + +struct __crt_locale_pointers { + struct __crt_locale_data * locinfo; + struct __crt_multibyte_data * mbcinfo; +}; + +struct __crt_multibyte_data; +struct diagnostic { + unsigned long long errors; + unsigned long long warnings; + unsigned long long notes; +}; + +struct diagnostic_stack { + int top_index; + struct diagnostic stack[10]; +}; + +struct options { + int input; + int target; + struct diagnostic_stack diagnostic_stack; + int style; + unsigned char show_includes; + unsigned char disable_assert; + unsigned char flow_analysis; + unsigned char test_mode; + unsigned char null_checks_enabled; + unsigned char ownership_enabled; + unsigned char preprocess_only; + unsigned char clear_error_at_end; + unsigned char sarif_output; + unsigned char no_output; + unsigned char visual_studio_ouput_format; + unsigned char dump_tokens; + unsigned char dump_pptokens; + unsigned char auto_config; + char output[200]; + char sarifpath[200]; +}; + +struct __crt_locale_data; + +unsigned char is_diagnostic_note(int id) +{ + if (id == 63 || id == 62) + { + return 1; + } + return 0; +} + +unsigned char is_diagnostic_warning(int id) +{ + return id > 63 && id <= 640; +} + +unsigned char is_diagnostic_error(int id) +{ + return id >= 640; +} + +unsigned char is_diagnostic_configurable(int id) +{ + return id >= 0 && id < 62; +} + +int diagnostic_stack_push_empty(struct diagnostic_stack * diagnostic_stack) +{ + int index = diagnostic_stack->top_index; + diagnostic_stack->top_index++; + diagnostic_stack->stack[diagnostic_stack->top_index].warnings = 0; + diagnostic_stack->stack[diagnostic_stack->top_index].errors = 0; + diagnostic_stack->stack[diagnostic_stack->top_index].notes = 0; + return index; +} + +void diagnostic_stack_pop(struct diagnostic_stack * diagnostic_stack) +{ + if (diagnostic_stack->top_index > 0) + { + diagnostic_stack->top_index--; + } + else + { + ; + } +} + +struct diagnostic default_diagnostic = {0, 4294966237ULL, 0}; +static struct w s_warnings[53] = {1, "unused-variable", 2, "deprecated", 3, "enum-conversion", 4, "address", 5, "unused-parameter", 6, "hide-declarator", 7, "typeof-parameter", 8, "attributes", 9, "unused-value", 10, "style", 11, "comment", 12, "line-slicing", 44, "switch", 45, "unusual-null", 14, "discarded-qualifiers", 16, "uninitialized", 17, "return-local-addr", 36, "div-by-zero", 37, "constant-value", 46, "sizeof-array-argument", 13, "string-slicing", 15, "declarator-state", 20, "missing-owner-qualifier", 21, "not-owner", 22, "temp-owner", 23, "non-owner-move", 24, "non-owner-to-owner-move", 25, "discard-owner", 26, "non-owner-move", 35, "flow-div-by-zero", 27, "flow-not-null", 28, "missing-destructor", 31, "using-moved-object", 29, "analyzer-maybe-uninitialized", 32, "analyzer-null-dereference", 33, "analyzer-non-opt-arg", 30, "lifetime-ended", 34, "nullable-to-non-nullable", 18, "must-use-address-of", 38, "null-as-array", 39, "incompatible-enum", 40, "multi-char", 19, "array-indirection", 41, "out-of-bounds", 42, "array-parameter-assignment", 43, "conditional-constant", 47, "const-init", 48, "null-conversion", 49, "implicitly-unsigned-literal", 50, "overflow", 51, "array-size", 52, "empty-statement", 53, "incompatible-types"}; +void diagnostic_remove(struct diagnostic * d, int w) +{ + if ( !is_diagnostic_configurable(w)) + { + return; + } + if ((d->errors & (1ULL << w)) != 0) + { + d->errors = ~(1ULL << w); + } + if ((d->warnings & (1ULL << w)) != 0) + { + d->warnings = ~(1ULL << w); + } + if ((d->notes & (1ULL << w)) != 0) + { + d->notes = ~(1ULL << w); + } +} + +int get_diagnostic_type(struct diagnostic * d, int w) +{ + if (is_diagnostic_configurable(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; + } + } + if (is_diagnostic_note(w)) + { + return 1; + } + if (is_diagnostic_warning(w)) + { + return 2; + } + if (is_diagnostic_error(w)) + { + return 3; + } + return 3; +} + +int get_diagnostic_phase(int w) +{ + switch (w) + { + case 28 : + case 29 : + case 31 : + case 32 : + case 33 : + case 27 : + case 30 : + case 35 : + return 2; + default: + break; + } + return 0; +} + +int strncmp(char * _Str1, char * _Str2, unsigned int _MaxCount); +unsigned int strlen(char * _Str); +int atoi(char * _String); + +int get_warning(char * wname) +{ + if ( !(wname[0] == 45 || wname[0] == 69)) + { + return 0; + } + if (wname[0] == 45 && wname[1] == 87) + { + { + int j = 0; + for (; j < sizeof (s_warnings) / sizeof (s_warnings[0]); j++) + { + if (strncmp(s_warnings[j].name, wname + 2, strlen(s_warnings[j].name)) == 0) + { + return s_warnings[j].w; + } + } + } + } + else + { + if (wname[1] == 69) + { + int ec = atoi(wname + 2); + return ec; + } + } + return 0; +} + +unsigned long long get_warning_bit_mask(char * wname) +{ + unsigned char disable_warning = wname[2] == 110 && wname[3] == 111; + char * final_name = disable_warning ? wname + 5 : wname + 2; + ; + { + int j = 0; + for (; j < sizeof (s_warnings) / sizeof (s_warnings[0]); j++) + { + if (strncmp(s_warnings[j].name, final_name, strlen(s_warnings[j].name)) == 0) + { + return (1ULL << ((unsigned long long)s_warnings[j].w)); + } + } + } + return 0; +} + + + +int __stdio_common_vsprintf(unsigned __int64 _Options, char * _Buffer, unsigned int _BufferCount, char * _Format, struct __crt_locale_pointers * _Locale, char * _ArgList); + +inline unsigned __int64 *__local_stdio_printf_options(void) +{ + static unsigned __int64 _OptionsStorage; + return &_OptionsStorage; +} +inline int vsnprintf(char * _Buffer, unsigned int _BufferCount, char * _Format, char * _ArgList) +{ + int _Result = __stdio_common_vsprintf(( *__local_stdio_printf_options()) | (1ULL << 1), _Buffer, _BufferCount, _Format, ((void *)0), _ArgList); + return _Result < 0 ? -1 : _Result; +} +inline int snprintf(char * _Buffer, unsigned int _BufferCount, char * _Format, ...) +{ + int _Result; + char * _ArgList; + ((void)(_ArgList = (char *)(&(_Format)) + ((sizeof (_Format) + sizeof (int) - 1) & ~(sizeof (int) - 1)))); + _Result = vsnprintf(_Buffer, _BufferCount, _Format, _ArgList); + ((void)(_ArgList = (char *)0)); + return _Result; +} + +int get_warning_name(int w, int n, char buffer[]) +{ + if (is_diagnostic_configurable(w)) + { + { + int j = 0; + for (; j < sizeof (s_warnings) / sizeof (s_warnings[0]); j++) + { + if (s_warnings[j].w == w) + { + snprintf(buffer, n, "-W%s", s_warnings[j].name); + return 0; + } + } + } + } + else + { + snprintf(buffer, n, "E%d", w); + } + return 0; +} + +extern struct diagnostic default_diagnostic; +int strcmp(char * _Str1, char * _Str2); +char *strcpy(char * _Destination, char * _Source); + + +int __stdio_common_vfprintf(unsigned __int64 _Options, struct _iobuf * _Stream, char * _Format, struct __crt_locale_pointers * _Locale, char * _ArgList); +inline int _vfprintf_l(struct _iobuf * _Stream, char * _Format, struct __crt_locale_pointers * _Locale, char * _ArgList) +{ + return __stdio_common_vfprintf(( *__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList); +} +struct _iobuf *__acrt_iob_func(unsigned int _Ix); +inline int printf(char * _Format, ...) +{ + int _Result; + char * _ArgList; + ((void)(_ArgList = (char *)(&(_Format)) + ((sizeof (_Format) + sizeof (int) - 1) & ~(sizeof (int) - 1)))); + _Result = _vfprintf_l((__acrt_iob_func(1)), _Format, ((void *)0), _ArgList); + ((void)(_ArgList = (char *)0)); + return _Result; +} + +int fill_options(struct options * options, int argc, char ** argv) +{ + options->diagnostic_stack.stack[0] = default_diagnostic; + options->diagnostic_stack.stack[0].warnings = ~(1ULL << 10); + { + int i = 1; + for (; i < argc; i++) + { + if (argv[i][0] != 45) + { + continue; + } + if (argv[i][1] == 73 || argv[i][1] == 68) + { + continue; + } + if (strcmp(argv[i], "-no-output") == 0) + { + options->no_output = 1; + continue; + } + if (strcmp(argv[i], "-o") == 0) + { + if (i + 1 < argc) + { + strcpy(options->output, argv[i + 1]); + i++; + } + else + { + } + continue; + } + if (strcmp(argv[i], "-sarif-path") == 0) + { + if (i + 1 < argc) + { + strcpy(options->sarifpath, argv[i + 1]); + i++; + } + else + { + } + continue; + } + if (strcmp(argv[i], "-show-includes") == 0) + { + options->show_includes = 1; + continue; + } + if (strcmp(argv[i], "-E") == 0) + { + options->preprocess_only = 1; + continue; + } + if (strcmp(argv[i], "-sarif") == 0) + { + options->sarif_output = 1; + continue; + } + if (strcmp(argv[i], "-fanalyzer") == 0) + { + options->flow_analysis = 1; + continue; + } + if (strcmp(argv[i], "-nullchecks") == 0) + { + options->null_checks_enabled = 1; + continue; + } + if (strcmp(argv[i], "-ownership=enable") == 0) + { + options->ownership_enabled = 1; + continue; + } + if (strcmp(argv[i], "-ownership=disable") == 0) + { + options->ownership_enabled = 0; + continue; + } + if (strcmp(argv[i], "-test-mode") == 0) + { + options->test_mode = 1; + continue; + } + if (strcmp(argv[i], "-msvc-output") == 0 || strcmp(argv[i], "-fdiagnostics-format=msvc") == 0) + { + options->visual_studio_ouput_format = 1; + continue; + } + if (strcmp(argv[i], "-style=cake") == 0) + { + options->style = 0; + continue; + } + if (strcmp(argv[i], "-style=gnu") == 0) + { + options->style = 7; + continue; + } + if (strcmp(argv[i], "-style=microsoft") == 0) + { + options->style = 7; + continue; + } + if (strcmp(argv[i], "-nullable=disable") == 0) + { + options->null_checks_enabled = 0; + unsigned long long w = ((1ULL << 32) | (1ULL << 34)); + options->diagnostic_stack.stack[0].warnings = ~w; + continue; + } + if (strcmp(argv[i], "-nullable=enabled") == 0) + { + options->null_checks_enabled = 1; + continue; + } + if (strcmp(argv[i], "-autoconfig") == 0 || strcmp(argv[i], "-auto-config") == 0) + { + options->auto_config = 1; + continue; + } + if (strcmp(argv[i], "-std=c2x") == 0 || strcmp(argv[i], "-std=c23") == 0) + { + options->input = 0; + continue; + } + if (strcmp(argv[i], "-std=cxx") == 0) + { + options->input = 2; + continue; + } + if (argv[i][1] == 87) + { + if (strcmp(argv[i], "-Wall") == 0) + { + options->diagnostic_stack.stack[0].warnings = ~0ULL; + continue; + } + unsigned char disable_warning = (argv[i][2] == 110 && argv[i][3] == 111); + unsigned long long w = get_warning_bit_mask(argv[i]); + if (w == 0) + { + printf("unknown warning '%s'", argv[i]); + return 1; + } + if (disable_warning) + { + options->diagnostic_stack.stack[0].warnings = ~w; + } + else + { + if (w == 10) + { + options->diagnostic_stack.stack[0].warnings = w; + } + else + { + options->diagnostic_stack.stack[0].notes = w; + } + } + continue; + } + if (strcmp(argv[i], "-dump-tokens") == 0) + { + options->dump_tokens = 1; + continue; + } + if (strcmp(argv[i], "-dump-pp-tokens") == 0) + { + options->dump_pptokens = 1; + continue; + } + if (strcmp(argv[i], "-disable-assert") == 0) + { + options->disable_assert = 1; + continue; + } + printf("unknown option '%s'", argv[i]); + return 1; + } + } + return 0; +} + +void print_help() +{ + char * options = "\x1b[92m"; + printf("%s", options); +} + diff --git a/out/src/osstream.c b/out/src/osstream.c new file mode 100644 index 0000000..07ce1db --- /dev/null +++ b/out/src/osstream.c @@ -0,0 +1,130 @@ +struct __crt_multibyte_data; +struct osstream { + char * c_str; + int size; + int capacity; +}; + +struct __crt_locale_pointers { + struct __crt_locale_data * locinfo; + struct __crt_multibyte_data * mbcinfo; +}; + +struct __crt_locale_data; + +void ss_swap(struct osstream * a, struct osstream * b) +{ + struct osstream r = *a; + *a = *b; + *b = r; +} + +void ss_clear(struct osstream * stream) +{ + if (stream->c_str) + { + stream->c_str[0] = 0; + } + stream->size = 0; +} + +void free(void * ptr); + +void ss_close(struct osstream * stream) +{ + free(stream->c_str); +} + +void *realloc(void * ptr, unsigned int size); +int *_errno(void); + +static int reserve(struct osstream * stream, int size) +{ + int errorcode = 0; + if (size > stream->capacity) + { + void * pnew = realloc(stream->c_str, (size + 1) * sizeof (char)); + if (pnew) + { + stream->c_str = pnew; + stream->capacity = size; + stream->c_str[size] = 0; + } + else + { + ( *_errno()) = 12; + errorcode = 1; + } + } + return errorcode; +} + + +int __stdio_common_vsprintf(unsigned __int64 _Options, char * _Buffer, unsigned int _BufferCount, char * _Format, struct __crt_locale_pointers * _Locale, char * _ArgList); + +inline unsigned __int64 *__local_stdio_printf_options(void) +{ + static unsigned __int64 _OptionsStorage; + return &_OptionsStorage; +} +inline int vsnprintf(char * _Buffer, unsigned int _BufferCount, char * _Format, char * _ArgList) +{ + int _Result = __stdio_common_vsprintf(( *__local_stdio_printf_options()) | (1ULL << 1), _Buffer, _BufferCount, _Format, ((void *)0), _ArgList); + return _Result < 0 ? -1 : _Result; +} + + +inline int _vsnprintf_l(char * _Buffer, unsigned int _BufferCount, char * _Format, struct __crt_locale_pointers * _Locale, char * _ArgList) +{ + int _Result = __stdio_common_vsprintf(( *__local_stdio_printf_options()) | (1ULL << 0), _Buffer, _BufferCount, _Format, _Locale, _ArgList); + return _Result < 0 ? -1 : _Result; +} +inline int vsprintf(char * _Buffer, char * _Format, char * _ArgList) +{ + return _vsnprintf_l(_Buffer, (unsigned int) -1, _Format, ((void *)0), _ArgList); +} + +int ss_vafprintf(struct osstream * stream, char * fmt, char * args) +{ + ; + int size = 0; + char * tmpa = {0}; + ((tmpa) = (args)); + size = vsnprintf(stream->c_str + stream->size, stream->capacity - stream->size, fmt, tmpa); + ((void)(tmpa = (char *)0)); + if (size < 0) + { + return -1; + } + if (reserve(stream, stream->size + size) != 0) + { + return -1; + } + size = vsprintf(stream->c_str + stream->size, fmt, args); + if (size > 0) + { + stream->size = size; + } + return size; +} + +int ss_putc(char ch, struct osstream * stream) +{ + if (reserve(stream, stream->size + 1) != 0) + { + return ( -1); + } + stream->c_str[stream->size] = ch; + stream->size++; + return ch; +} + +int ss_fprintf(struct osstream * stream, char * fmt, ...) +{ + char * args = {0}; + ((void)(args = (char *)(&(fmt)) + ((sizeof (fmt) + sizeof (int) - 1) & ~(sizeof (int) - 1)))); + int size = ss_vafprintf(stream, fmt, args); + ((void)(args = (char *)0)); + return size; +} + diff --git a/out/src/parser.c b/out/src/parser.c new file mode 100644 index 0000000..586f814 --- /dev/null +++ b/out/src/parser.c @@ -0,0 +1,11456 @@ +struct try_statement { + struct secondary_block * secondary_block; + struct secondary_block * catch_secondary_block_opt; + struct token * first_token; + struct token * last_token; + struct token * catch_token_opt; + int try_catch_block_index; +}; + +struct param_list { + unsigned char is_var_args; + unsigned char is_void; + struct param * head; + struct param * tail; +}; + +struct block_item_list { + struct block_item * head; + struct block_item * tail; +}; + +struct diagnostic { + unsigned long long errors; + unsigned long long warnings; + unsigned long long notes; +}; + +struct defer_list { + struct defer_list_item * head; + struct defer_list_item * tail; +}; + +struct compound_statement { + struct token * first_token; + struct token * last_token; + struct block_item_list block_item_list; + struct diagnostic diagnostic_flags; + struct defer_list defer_list; +}; + +struct block_item { + struct token * first_token; + struct declaration * declaration; + struct unlabeled_statement * unlabeled_statement; + struct label * label; + struct block_item * next; +}; + +struct type { + int category; + int attributes_flags; + int type_specifier_flags; + int type_qualifier_flags; + int storage_class_specifier_flags; + char * name_opt; + struct struct_or_union_specifier * struct_or_union_specifier; + struct enum_specifier * enum_specifier; + struct expression * array_num_elements_expression; + int num_of_elements; + unsigned char static_array; + unsigned char address_of; + struct param_list params; + struct type * next; +}; + +struct find_object_result { + struct object * object; + struct type type; +}; + +struct member_declarator_list { + struct member_declarator * head; + struct member_declarator * tail; +}; + +struct labeled_statement { + struct label * label; + struct statement * statement; +}; + +struct osstream { + char * c_str; + int size; + int capacity; +}; + +struct label { + struct expression * constant_expression; + struct token * p_identifier_opt; + struct token * p_first_token; +}; + +struct defer_statement { + struct token * first_token; + struct token * last_token; + struct secondary_block * secondary_block; +}; + +struct token_list { + struct token * head; + struct token * tail; +}; + +struct declaration_list { + struct declaration * head; + struct declaration * tail; +}; + +struct ast { + struct token_list token_list; + struct declaration_list declaration_list; +}; + +struct flow_objects { + struct flow_object ** data; + int size; + int capacity; +}; + +struct label_state { + char * label_name; + int state_number; +}; + +struct flow_visit_ctx { + struct secondary_block * catch_secondary_block_opt; + struct parser_ctx * ctx; + struct ast ast; + struct type * p_return_type; + int parameter_list; + int state_number_generator; + unsigned char expression_is_not_evaluated; + unsigned char inside_assert; + int throw_join_state; + int break_join_state; + int initial_state; + struct flow_objects arena; + struct label_state labels[100]; + int labels_size; +}; + +struct direct_declarator { + struct token * name_opt; + struct declarator * declarator; + struct array_declarator * array_declarator; + struct function_declarator * function_declarator; + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt; +}; + +struct hash_map { + struct map_entry ** table; + int capacity; + int size; +}; + +struct scope { + int scope_level; + struct hash_map tags; + struct hash_map variables; + struct scope * next; + struct scope * previous; +}; + +struct function_declarator { + struct direct_declarator * direct_declarator; + struct scope parameters_scope; + struct parameter_type_list * parameter_type_list_opt; +}; + +struct balanced_token { + struct token * token; + struct balanced_token * next; +}; + +union _struct_tag_6 { + unsigned char bool_value; + signed char signed_char_value; + unsigned char unsigned_char_value; + signed short signed_short_value; + unsigned short unsigned_short_value; + signed int signed_int_value; + unsigned int unsigned_int_value; + signed long signed_long_value; + unsigned long unsigned_long_value; + signed long long signed_long_long_value; + unsigned long long unsigned_long_long_value; + float float_value; + double double_value; + long double long_double_value; +}; + +struct TAGDIR; +struct diagnostic_stack { + int top_index; + struct diagnostic stack[10]; +}; + +struct options { + int input; + int target; + struct diagnostic_stack diagnostic_stack; + int style; + unsigned char show_includes; + unsigned char disable_assert; + unsigned char flow_analysis; + unsigned char test_mode; + unsigned char null_checks_enabled; + unsigned char ownership_enabled; + unsigned char preprocess_only; + unsigned char clear_error_at_end; + unsigned char sarif_output; + unsigned char no_output; + unsigned char visual_studio_ouput_format; + unsigned char dump_tokens; + unsigned char dump_pptokens; + unsigned char auto_config; + char output[200]; + char sarifpath[200]; +}; + +struct include_dir_list { + struct include_dir * head; + struct include_dir * tail; +}; + +struct preprocessor_ctx { + struct options options; + int flags; + struct hash_map macros; + struct include_dir_list include_dir; + struct hash_map pragma_once_map; + struct token * current; + struct token_list input_list; + unsigned int count_macro_value; + unsigned char conditional_inclusion; + int n_warnings; + int n_errors; +}; + +struct flow_objects_view { + struct flow_object ** data; + int size; + int capacity; +}; + +struct flow_object_state { + char * dbg_name; + int state_number; + struct flow_object * pointed; + int state; + struct flow_objects_view alternatives; + struct flow_object_state * next; +}; + +struct flow_object { + unsigned int visit_number; + struct flow_object * parent; + struct declarator * p_declarator_origin; + struct expression * p_expression_origin; + struct flow_objects_view members; + struct flow_object_state current; + int id; + unsigned char is_temporary; +}; + +struct tokenizer_ctx { + struct options options; + int n_warnings; + int n_errors; +}; + +struct member_declaration_list { + struct token * first_token; + struct token * last_token; + struct member_declaration * head; + struct member_declaration * tail; +}; + +struct struct_entry; +union _struct_tag_5 { + unsigned int number; + struct enum_specifier * p_enum_specifier; + struct enumerator * p_enumerator; + struct struct_or_union_specifier * p_struct_or_union_specifier; + struct declarator * p_declarator; + struct init_declarator * p_init_declarator; + struct macro * p_macro; + struct struct_entry * p_struct_entry; +}; + +struct macro0; +struct d_visit_ctx { + int indentation; + int locals_count; + int extern_count; + int tag_name_count; + struct hash_map tag_names; + struct hash_map structs_map; + struct hash_map function_map; + struct osstream add_this_before; + struct osstream add_this_before_external_decl; + struct osstream data_types; + struct osstream function_types; + struct ast ast; +}; + +struct statement { + struct labeled_statement * labeled_statement; + struct unlabeled_statement * unlabeled_statement; +}; + +struct designator { + struct expression * constant_expression_opt; + struct token * token; + struct designator * next; +}; + +struct object { + int state; + int value_type; + struct type type2; + char * debug_name; + union _struct_tag_6 value; + struct object * parent; + struct expression * p_init_expression; + struct object * members; + struct object * next; +}; + +struct declarator { + unsigned char has_shared_ownership; + struct token * first_token_opt; + struct token * last_token_opt; + struct pointer * pointer; + struct direct_declarator * direct_declarator; + struct declaration_specifiers * declaration_specifiers; + struct specifier_qualifier_list * specifier_qualifier_list; + struct token * name_opt; + struct compound_statement * function_body; + int num_uses; + struct object object; + struct flow_object * p_object; + struct type type; +}; + +struct attribute { + int attributes_flags; + struct attribute_token * attribute_token; + struct attribute_argument_clause * attribute_argument_clause; + struct attribute * next; +}; + +struct generic_association { + struct type type; + struct type_name * p_type_name; + struct expression * expression; + struct token * first_token; + struct token * last_token; + struct generic_association * next; +}; + +struct init_declarator_list { + struct init_declarator * head; + struct init_declarator * tail; +}; + +struct simple_declaration { + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt; + struct declaration_specifiers * p_declaration_specifiers; + struct init_declarator_list init_declarator_list; + struct token * first_token; + struct token * last_token; +}; + +struct attribute_token { + int attributes_flags; + struct token * token; +}; + +struct expression_statement { + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt; + struct expression * expression_opt; +}; + +struct type_specifier { + int flags; + struct token * token; + struct struct_or_union_specifier * struct_or_union_specifier; + struct typeof_specifier * typeof_specifier; + struct enum_specifier * enum_specifier; + struct declarator * typedef_declarator; + struct atomic_type_specifier * atomic_type_specifier; +}; + +struct member_declaration { + struct specifier_qualifier_list * specifier_qualifier_list; + struct member_declarator_list * member_declarator_list_opt; + struct static_assert_declaration * static_assert_declaration; + struct pragma_declaration * pragma_declaration; + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt; + struct member_declaration * next; +}; + +struct hash_item_set { + unsigned int number; + struct enum_specifier * p_enum_specifier; + struct enumerator * p_enumerator; + struct struct_or_union_specifier * p_struct_or_union_specifier; + struct declarator * p_declarator; + struct init_declarator * p_init_declarator; + struct macro0 * p_macro; + struct struct_entry1 * p_struct_entry; +}; + +struct attribute_list { + int attributes_flags; + struct attribute * head; + struct attribute * tail; +}; + +struct defer_visit_ctx { + struct secondary_block * catch_secondary_block_opt; + struct parser_ctx * ctx; + struct ast ast; + struct defer_defer_scope * tail_block; + int parameter_list; +}; + +struct attribute_specifier_sequence { + struct token * first_token; + struct token * last_token; + int attributes_flags; + struct attribute_specifier * head; + struct attribute_specifier * tail; +}; + +struct dirent { + unsigned short d_ino; + long d_off; + unsigned short d_reclen; + unsigned char d_type; + char d_name[256]; +}; + +struct macro; +struct unlabeled_statement { + struct expression_statement * expression_statement; + struct primary_block * primary_block; + struct jump_statement * jump_statement; +}; + +struct member_declarator { + struct declarator * declarator; + struct expression * constant_expression; + struct member_declarator * next; +}; + +struct pointer { + struct attribute_specifier_sequence * attribute_specifier_sequence_opt; + struct type_qualifier_list * type_qualifier_list_opt; + struct pointer * pointer; +}; + +struct switch_value_list { + struct switch_value * head; + struct switch_value * tail; + struct switch_value * p_default; +}; + +struct initializer_list_item { + struct designation * designation; + struct initializer * initializer; + struct initializer_list_item * next; +}; + +struct declaration_specifier { + struct storage_class_specifier * storage_class_specifier; + struct type_specifier_qualifier * type_specifier_qualifier; + struct function_specifier * function_specifier; + struct declaration_specifier * next; +}; + +struct struct_or_union_specifier { + unsigned char has_shared_ownership; + struct attribute_specifier_sequence * attribute_specifier_sequence_opt; + struct member_declaration_list member_declaration_list; + struct token * first_token; + struct token * last_token; + unsigned char is_owner; + struct token * tagtoken; + char tag_name[200]; + unsigned char has_anonymous_tag; + unsigned char show_anonymous_tag; + int scope_level; + int visit_moved; + struct struct_or_union_specifier * complete_struct_or_union_specifier_indirection; +}; + +struct __crt_multibyte_data; +struct __crt_locale_pointers { + struct __crt_locale_data * locinfo; + struct __crt_multibyte_data * mbcinfo; +}; + +struct storage_class_specifier { + int flags; + struct token * token; +}; + +struct scope_list { + struct scope * head; + struct scope * tail; +}; + +struct parameter_type_list { + unsigned char is_var_args; + unsigned char is_void; + struct parameter_list * parameter_list; +}; + +struct argument_expression_list { + struct argument_expression * head; + struct argument_expression * tail; +}; + +struct type_name { + struct token * first_token; + struct token * last_token; + struct specifier_qualifier_list * specifier_qualifier_list; + struct declarator * abstract_declarator; + struct type type; +}; + +struct attribute_specifier { + struct token * first_token; + struct token * last_token; + struct attribute_list * attribute_list; + struct attribute_specifier * next; +}; + +struct typeof_specifier { + struct token * first_token; + struct token * last_token; + struct typeof_specifier_argument * typeof_specifier_argument; + struct type type; +}; + +struct parameter_declaration { + struct attribute_specifier_sequence * attribute_specifier_sequence_opt; + struct declaration_specifiers * declaration_specifiers; + struct declarator * declarator; + struct parameter_declaration * next; +}; + +struct initializer_list { + struct token * first_token; + struct initializer_list_item * head; + struct initializer_list_item * tail; + int size; +}; + +struct type_qualifier { + int flags; + struct token * token; + struct type_qualifier * next; +}; + +struct param { + struct type type; + struct param * next; +}; + +struct type_specifier_qualifier { + struct type_specifier * type_specifier; + struct type_qualifier * type_qualifier; + struct alignment_specifier * alignment_specifier; + struct type_specifier_qualifier * next; +}; + +struct enumerator_list { + struct enumerator * head; + struct enumerator * tail; +}; + +struct enum_specifier { + unsigned char has_shared_ownership; + struct attribute_specifier_sequence * attribute_specifier_sequence_opt; + struct specifier_qualifier_list * specifier_qualifier_list; + char tag_name[200]; + struct enumerator_list enumerator_list; + struct token * tag_token; + struct token * first_token; + struct enum_specifier * complete_enum_specifier2; +}; + +struct __crt_locale_data; +struct defer_defer_scope; +struct pragma_declaration { + struct token * first_token; + struct token * last_token; +}; + +struct generic_assoc_list { + struct generic_association * head; + struct generic_association * tail; +}; + +struct argument_expression { + struct expression * expression; + struct argument_expression * next; + unsigned char set_unkown; +}; + +struct struct_entry1; +struct designation { + struct designator_list * designator_list; + struct token * token; +}; + +struct designator_list { + struct designator * head; + struct designator * tail; +}; + +struct include_dir { + char * path; + struct include_dir * next; +}; + +struct parser_ctx { + struct options options; + struct scope_list scopes; + struct declaration * p_current_function_opt; + struct try_statement * p_current_try_statement_opt; + struct selection_statement * p_current_selection_statement; + struct switch_value_list * p_switch_value_list; + struct _iobuf * sarif_file; + unsigned int sarif_entries; + struct token_list input_list; + struct token * current; + struct token * previous; + int try_catch_block_index; + unsigned char evaluation_is_disabled; + unsigned char inside_generic_association; + struct report * p_report; +}; + +struct marker { + char * file; + int line; + int start_col; + int end_col; + struct token * p_token_caret; + struct token * p_token_begin; + struct token * p_token_end; +}; + +struct atomic_type_specifier { + struct token * token; + struct type_name * type_name; +}; + +struct alignment_specifier { + struct type_name * type_name; + struct expression * constant_expression; + struct token * token; +}; + +struct array_declarator { + struct direct_declarator * direct_declarator; + struct expression * assignment_expression; + struct expression * expression; + struct type_qualifier_list * type_qualifier_list_opt; + struct token * token; + struct token * static_token_opt; +}; + +struct initializer { + struct token * first_token; + struct braced_initializer * braced_initializer; + struct expression * assignment_expression; +}; + +struct iteration_statement { + struct token * first_token; + struct token * second_token; + struct secondary_block * secondary_block; + struct expression * expression1; + struct expression * expression2; + struct expression * expression0; + struct declaration * declaration; + struct defer_list defer_list; +}; + +struct primary_block { + struct compound_statement * compound_statement; + struct selection_statement * selection_statement; + struct iteration_statement * iteration_statement; + struct defer_statement * defer_statement; + struct try_statement * try_statement; +}; + +struct expression { + int expression_type; + struct type type; + struct object object; + struct type_name * type_name; + struct braced_initializer * braced_initializer; + struct compound_statement * compound_statement; + struct generic_selection * generic_selection; + struct token * first_token; + struct token * last_token; + struct declarator * declarator; + int member_index; + struct argument_expression_list argument_expression_list; + struct expression * condition_expr; + struct expression * left; + struct expression * right; + unsigned char is_assignment_expression; +}; + +struct switch_value { + long long value; + struct label * p_label; + struct switch_value * next; +}; + +struct condition { + struct expression * expression; + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt; + struct declaration_specifiers * p_declaration_specifiers; + struct init_declarator * p_init_declarator; + struct token * first_token; + struct token * last_token; +}; + +struct declaration { + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt; + struct static_assert_declaration * static_assert_declaration; + struct pragma_declaration * pragma_declaration; + struct declaration_specifiers * declaration_specifiers; + struct init_declarator_list init_declarator_list; + struct compound_statement * function_body; + struct defer_list defer_list; + struct declarator * contract_declarator; + struct token * first_token; + struct token * last_token; + struct declaration * next; +}; + +struct enumerator { + unsigned char has_shared_ownership; + struct token * token; + struct attribute_specifier_sequence * attribute_specifier_sequence_opt; + struct expression * constant_expression_opt; + struct enum_specifier * enum_specifier; + struct enumerator * next; + struct object value; +}; + +struct token { + int type; + char * lexeme; + char * original; + int line; + int col; + int level; + int flags; + struct token * token_origin; + struct token * next; + struct token * prev; +}; + +struct braced_initializer { + struct token * first_token; + struct token * last_token; + struct initializer_list * initializer_list; +}; + +struct typeof_specifier_argument { + struct expression * expression; + struct type_name * type_name; +}; + +struct selection_statement { + struct init_statement * p_init_statement; + struct condition * condition; + struct secondary_block * secondary_block; + struct secondary_block * else_secondary_block_opt; + struct token * open_parentesis_token; + struct token * close_parentesis_token; + struct token * first_token; + struct token * last_token; + struct token * else_token_opt; + struct defer_list defer_list; +}; + +struct declaration_specifiers { + int attributes_flags; + int type_specifier_flags; + int type_qualifier_flags; + int storage_class_specifier_flags; + int function_specifier_flags; + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt; + struct struct_or_union_specifier * struct_or_union_specifier; + struct enum_specifier * enum_specifier; + struct declarator * typedef_declarator; + struct typeof_specifier * typeof_specifier; + struct token * first_token; + struct token * last_token; + struct declaration_specifier * head; + struct declaration_specifier * tail; +}; + +struct balanced_token_sequence { + struct balanced_token * head; + struct balanced_token * tail; +}; + +struct init_statement { + struct expression_statement * p_expression_statement; + struct simple_declaration * p_simple_declaration; +}; + +struct init_declarator { + unsigned char has_shared_ownership; + struct declarator * p_declarator; + struct initializer * initializer; + struct init_declarator * next; +}; + +struct secondary_block { + struct token * first_token; + struct token * last_token; + struct statement * statement; +}; + +struct type_qualifier_list { + int flags; + struct type_qualifier * head; + struct type_qualifier * tail; +}; + +struct generic_selection { + struct expression * expression; + struct type_name * type_name; + struct expression * p_view_selected_expression; + struct generic_assoc_list generic_assoc_list; + struct token * first_token; + struct token * last_token; +}; + +struct defer_list_item { + struct declarator * declarator; + struct defer_statement * defer_statement; + struct defer_list_item * next; +}; + +struct jump_statement { + struct token * label; + struct token * first_token; + struct token * last_token; + struct expression * expression_opt; + int try_catch_block_index; + struct defer_list defer_list; +}; + +struct specifier_qualifier_list { + int type_specifier_flags; + int type_qualifier_flags; + struct struct_or_union_specifier * struct_or_union_specifier; + struct enum_specifier * enum_specifier; + struct typeof_specifier * typeof_specifier; + struct declarator * typedef_declarator; + struct type_specifier_qualifier * head; + struct type_specifier_qualifier * tail; + struct token * first_token; + struct token * last_token; + struct attribute_specifier_sequence * p_attribute_specifier_sequence; +}; + +struct map_entry { + struct map_entry * next; + unsigned int hash; + char * key; + int type; + union _struct_tag_5 data; +}; + +struct report { + int no_files; + double cpu_time_used_sec; + int error_count; + int warnings_count; + int info_count; + unsigned char test_mode; + int test_failed; + int test_succeeded; + int last_diagnostics_ids[2]; + int fatal_error_expected; + unsigned char ignore_this_report; +}; + +struct attribute_argument_clause { + struct balanced_token_sequence * p_balanced_token_sequence; + struct token * token; +}; + +struct parameter_list { + struct parameter_declaration * head; + struct parameter_declaration * tail; +}; + +struct function_specifier { + int flags; + struct token * token; +}; + +struct static_assert_declaration { + struct token * first_token; + struct token * last_token; + struct expression * constant_expression; + struct token * string_literal_opt; +}; + +struct _iobuf { + void * _Placeholder; +}; + + +void secondary_block_delete(struct secondary_block * p); +void free(void * ptr); + +void defer_statement_delete(struct defer_statement * p) +{ + if (p) + { + secondary_block_delete(p->secondary_block); + free(p); + } +} + +static int s_anonymous_struct_count = 0; +static unsigned char parser_is_diagnostic_enabled(struct parser_ctx * ctx, int w) +{ + if (w > 63) + { + return 1; + } + return ((ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index].errors & w) != 0) || ((ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index].warnings & w) != 0) || ((ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index].notes & w) != 0); +} + +unsigned char compiler_diagnostic_message(int w, struct parser_ctx * ctx, struct token * p_token, struct marker * p_marker, char * fmt, ...); + +static void check_open_brace_style(struct parser_ctx * ctx, struct token * token) +{ + if (token->level == 0 && !(token->flags & 2) && token->type == 123 && token->prev && parser_is_diagnostic_enabled(ctx, 10)) + { + if (ctx->options.style == 0) + { + if (token->prev->type == 143 && token->prev->prev && token->prev->prev->type == 10) + { + } + else + { + compiler_diagnostic_message(10, ctx, token, ((void *)0), "not following correct brace style {"); + } + } + } +} + +static void check_close_brace_style(struct parser_ctx * ctx, struct token * token) +{ + if (token->level == 0 && !(token->flags & 2) && token->type == 125 && token->prev && token->prev->prev && parser_is_diagnostic_enabled(ctx, 10)) + { + if (ctx->options.style == 0) + { + if (token->prev->type == 143 && token->prev->prev->type == 10) + { + } + else + { + compiler_diagnostic_message(10, ctx, token, ((void *)0), "not following correct close brace style }"); + } + } + } +} + +static void check_func_open_brace_style(struct parser_ctx * ctx, struct token * token) +{ + if (token->level == 0 && !(token->flags & 2) && token->type == 123 && token->prev && parser_is_diagnostic_enabled(ctx, 10)) + { + if (ctx->options.style == 0) + { + if (token->prev->type == 10) + { + } + else + { + compiler_diagnostic_message(10, ctx, token, ((void *)0), "not following correct brace style {"); + } + } + } +} + +void hashmap_destroy(struct hash_map * map); + +void scope_destroy(struct scope * p) +{ + 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->head == ((void *)0)) + { + list->head = pnew; + list->tail = pnew; + } + else + { + ; + pnew->previous = list->tail; + list->tail->next = pnew; + list->tail = pnew; + } +} + +void scope_list_pop(struct scope_list * list) +{ + if (list->head == ((void *)0)) + { + return; + } + ; + struct scope * p = list->tail; + if (list->head == list->tail) + { + list->head = ((void *)0); + list->tail = ((void *)0); + } + else + { + list->tail = list->tail->previous; + if (list->tail == list->head) + { + ; + list->tail->next = ((void *)0); + list->tail->previous = ((void *)0); + } + } + p->next = ((void *)0); + p->previous = ((void *)0); +} + +void switch_value_destroy(struct switch_value_list * p) +{ + struct switch_value * item = p->head; + while (item) + { + struct switch_value * next = item->next; + item->next = ((void *)0); + free(item); + item = next; + } + if (p->p_default) + { + ; + free(p->p_default); + } +} + +void switch_value_list_push(struct switch_value_list * list, struct switch_value * pnew) +{ + if (list->head == ((void *)0)) + { + list->head = pnew; + list->tail = pnew; + } + else + { + ; + ; + list->tail->next = pnew; + list->tail = pnew; + } +} + +struct switch_value *switch_value_list_find(struct switch_value_list * list, long long value) +{ + struct switch_value * p = list->head; + while (p) + { + if (p->value == value) + { + return p; + } + p = p->next; + } + return ((void *)0); +} + +int fclose(struct _iobuf * _Stream); + +void parser_ctx_destroy(struct parser_ctx * ctx) +{ + if (ctx->sarif_file) + { + fclose(ctx->sarif_file); + } +} + +static void stringfy(char * input, char * json_str_message, int output_size) +{ + json_str_message[0] = 0; + int k = 0; + while ( *input != 0) + { + if ( *input == 34) + { + if (k < output_size) + { + json_str_message[k] = 92; + } + k++; + if (k < output_size) + { + json_str_message[k] = 34; + } + k++; + input++; + } + else + { + if ( *input == 10) + { + if (k < output_size) + { + json_str_message[k] = 92; + } + k++; + if (k < output_size) + { + json_str_message[k] = 110; + } + k++; + input++; + } + else + { + if (k < output_size) + { + json_str_message[k] = *input; + } + k++; + input++; + } + } + } + if (k < output_size) + { + json_str_message[k] = 0; + } + else + { + json_str_message[output_size - 1] = 0; + } +} + +unsigned char is_diagnostic_configurable(int id); +unsigned char is_diagnostic_note(int id); +unsigned char is_diagnostic_error(int id); +unsigned char is_diagnostic_warning(int id); +int get_warning_name(int w, int n, char buffer[]); +void print_position(char * path, int line, int col, unsigned char msvc_format); + +int __stdio_common_vsprintf(unsigned __int64 _Options, char * _Buffer, unsigned int _BufferCount, char * _Format, struct __crt_locale_pointers * _Locale, char * _ArgList); + +inline unsigned __int64 *__local_stdio_printf_options(void) +{ + static unsigned __int64 _OptionsStorage; + return &_OptionsStorage; +} +inline int vsnprintf(char * _Buffer, unsigned int _BufferCount, char * _Format, char * _ArgList) +{ + int _Result = __stdio_common_vsprintf(( *__local_stdio_printf_options()) | (1ULL << 1), _Buffer, _BufferCount, _Format, ((void *)0), _ArgList); + return _Result < 0 ? -1 : _Result; +} + + +int __stdio_common_vfprintf(unsigned __int64 _Options, struct _iobuf * _Stream, char * _Format, struct __crt_locale_pointers * _Locale, char * _ArgList); +inline int _vfprintf_l(struct _iobuf * _Stream, char * _Format, struct __crt_locale_pointers * _Locale, char * _ArgList) +{ + return __stdio_common_vfprintf(( *__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList); +} +struct _iobuf *__acrt_iob_func(unsigned int _Ix); +inline int printf(char * _Format, ...) +{ + int _Result; + char * _ArgList; + ((void)(_ArgList = (char *)(&(_Format)) + ((sizeof (_Format) + sizeof (int) - 1) & ~(sizeof (int) - 1)))); + _Result = _vfprintf_l((__acrt_iob_func(1)), _Format, ((void *)0), _ArgList); + ((void)(_ArgList = (char *)0)); + return _Result; +} +void print_line_and_token(struct marker * p_marker, unsigned char visual_studio_ouput_format); + +inline int fprintf(struct _iobuf * _Stream, char * _Format, ...) +{ + int _Result; + char * _ArgList; + ((void)(_ArgList = (char *)(&(_Format)) + ((sizeof (_Format) + sizeof (int) - 1) & ~(sizeof (int) - 1)))); + _Result = _vfprintf_l(_Stream, _Format, ((void *)0), _ArgList); + ((void)(_ArgList = (char *)0)); + return _Result; +} + +unsigned char compiler_diagnostic_message(int w, struct parser_ctx * ctx, struct token * p_token_opt, struct marker * p_marker_temp, char * fmt, ...) +{ + unsigned char included_file_location = 0; + struct marker marker = {0}; + if (p_marker_temp == ((void *)0)) + { + if (p_token_opt == ((void *)0)) + { + return 0; + } + marker.file = p_token_opt->token_origin->lexeme; + marker.line = p_token_opt->line; + marker.start_col = p_token_opt->col; + marker.end_col = p_token_opt->col; + marker.p_token_caret = p_token_opt; + included_file_location = p_token_opt->level > 0; + } + else + { + marker = *p_marker_temp; + if (marker.p_token_caret) + { + p_token_opt = marker.p_token_caret; + } + else + { + if (marker.p_token_begin) + { + p_token_opt = marker.p_token_begin; + } + } + if (p_token_opt == ((void *)0)) + { + return 0; + } + marker.file = p_token_opt->token_origin->lexeme; + included_file_location = p_token_opt->level > 0; + marker.line = p_token_opt->line; + marker.start_col = p_token_opt->col; + marker.end_col = p_token_opt->col; + } + unsigned char is_error = 0; + unsigned char is_warning = 0; + unsigned char is_note = 0; + if (is_diagnostic_configurable(w)) + { + is_error = (ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index].errors & (1ULL << w)) != 0; + is_warning = (ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index].warnings & (1ULL << w)) != 0; + is_note = ((ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index].notes & (1ULL << w)) != 0); + } + else + { + is_note = is_diagnostic_note(w); + is_error = is_diagnostic_error(w); + is_warning = is_diagnostic_warning(w); + } + if (is_error) + { + ctx->p_report->error_count++; + } + else + { + if (is_warning) + { + if (included_file_location) + { + return 0; + } + ctx->p_report->warnings_count++; + } + else + { + if (is_note) + { + if (included_file_location) + { + return 0; + } + if (w != 62) + { + ctx->p_report->info_count++; + } + } + else + { + return 0; + } + } + } + if (w != 62) + { + ctx->p_report->last_diagnostics_ids[1] = ctx->p_report->last_diagnostics_ids[0]; + ctx->p_report->last_diagnostics_ids[0] = w; + } + char * func_name = "module"; + if (ctx->p_current_function_opt) + { + ; + ; + ; + func_name = ctx->p_current_function_opt->init_declarator_list.head->p_declarator->name_opt->lexeme; + } + char buffer[200] = {0}; + char diagnostic_name[100] = {0}; + get_warning_name(w, sizeof diagnostic_name, diagnostic_name); + print_position(marker.file, marker.line, marker.start_col, ctx->options.visual_studio_ouput_format); + char * args = {0}; + ((void)(args = (char *)(&(fmt)) + ((sizeof (fmt) + sizeof (int) - 1) & ~(sizeof (int) - 1)))); + vsnprintf(buffer, sizeof (buffer), fmt, args); + ((void)(args = (char *)0)); + 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); + printf(" [%s]\n", diagnostic_name); + } + else + { + if (is_error) + { + printf("\x1b[91m", buffer, diagnostic_name); + } + else + { + if (is_warning) + { + printf("\x1b[95m", buffer, diagnostic_name); + } + else + { + if (is_note) + { + if (w == 62) + { + printf("\x1b[36;1m", buffer); + } + else + { + printf("\x1b[36;1m", buffer, diagnostic_name); + } + } + } + } + } + print_line_and_token(&marker, ctx->options.visual_studio_ouput_format); + if (ctx->sarif_file) + { + char json_str_message[200] = {0}; + stringfy(buffer, json_str_message, sizeof json_str_message); + if (ctx->sarif_entries > 0) + { + fprintf(ctx->sarif_file, " ,\n"); + } + ((struct parser_ctx *)ctx)->sarif_entries++; + fprintf(ctx->sarif_file, " {\n"); + fprintf(ctx->sarif_file, " \"ruleId\":\"%s\",\n", diagnostic_name); + if (is_error) + { + fprintf(ctx->sarif_file, " \"level\":\"error\",\n"); + } + else + { + if (is_warning) + { + fprintf(ctx->sarif_file, " \"level\":\"warning\",\n"); + } + else + { + if (is_note) + { + fprintf(ctx->sarif_file, " \"level\":\"note\",\n"); + } + } + } + fprintf(ctx->sarif_file, " \"message\": {\n"); + fprintf(ctx->sarif_file, " \"text\": \"%s\"\n", json_str_message); + 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", marker.file); + fprintf(ctx->sarif_file, " },\n"); + fprintf(ctx->sarif_file, " \"region\": {\n"); + fprintf(ctx->sarif_file, " \"startLine\": %d,\n", marker.line); + fprintf(ctx->sarif_file, " \"startColumn\": %d,\n", marker.start_col); + fprintf(ctx->sarif_file, " \"endLine\": %d,\n", marker.line); + fprintf(ctx->sarif_file, " \"endColumn\": %d\n", marker.end_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 print_scope(struct scope_list * e) +{ + printf("--- begin of scope---\n"); + struct scope * p = e->head; + int level = 0; + while (p) + { + if (p->variables.table) + { + { + int i = 0; + for (; i < p->variables.capacity; i++) + { + if (p->variables.table[i]) + { + { + int k = 0; + for (; k < level; k++) + printf(" "); + } + printf("%s\n", p->variables.table[i]->key); + } + } + } + { + int i = 0; + for (; i < p->tags.capacity; i++) + { + if (p->tags.table[i]) + { + { + int k = 0; + for (; k < level; k++) + printf(" "); + } + printf("tag %s\n", p->tags.table[i]->key); + } + } + } + } + level++; + p = p->next; + } + printf("--- end of scope---\n"); +} + +unsigned char first_of_function_specifier(struct parser_ctx * ctx) +{ + struct token * token = ctx->current; + if (token == ((void *)0)) + { + return 0; + } + return token->type == 9018 || token->type == 9054; +} + +unsigned char first_of_enum_specifier_token(struct token * token) +{ + return token->type == 9012; +} + +unsigned char first_of_enum_specifier(struct parser_ctx * ctx) +{ + if (ctx->current == ((void *)0)) + { + return 0; + } + return first_of_enum_specifier_token(ctx->current); +} + +unsigned char first_of_alignment_specifier(struct parser_ctx * ctx) +{ + if (ctx->current == ((void *)0)) + { + return 0; + } + return ctx->current->type == 9043; +} + +struct token *parser_look_ahead(struct parser_ctx * ctx); + +unsigned char first_of_atomic_type_specifier(struct parser_ctx * ctx) +{ + if (ctx->current == ((void *)0)) + { + return 0; + } + if (ctx->current->type == 9045) + { + struct token * ahead = parser_look_ahead(ctx); + if (ahead != ((void *)0)) + { + return ahead->type == 40; + } + } + return 0; +} + +unsigned char first_of_storage_class_specifier(struct parser_ctx * ctx) +{ + if (ctx->current == ((void *)0)) + { + return 0; + } + return ctx->current->type == 9035 || ctx->current->type == 9002 || ctx->current->type == 9013 || ctx->current->type == 9032 || ctx->current->type == 9057 || ctx->current->type == 8999 || ctx->current->type == 9025; +} + +unsigned char first_of_struct_or_union_token(struct token * token) +{ + return token->type == 9033 || token->type == 9038; +} + +unsigned char first_of_struct_or_union(struct parser_ctx * ctx) +{ + if (ctx->current == ((void *)0)) + { + return 0; + } + return first_of_struct_or_union_token(ctx->current); +} + +unsigned char first_of_type_qualifier_token(struct token * p_token) +{ + return p_token->type == 9004 || p_token->type == 9026 || p_token->type == 9041 || p_token->type == 9045 || p_token->type == 9065 || p_token->type == 9064 || p_token->type == 9066 || p_token->type == 9067 || p_token->type == 9068; +} + +unsigned char first_of_type_qualifier(struct parser_ctx * ctx) +{ + if (ctx->current == ((void *)0)) + { + return 0; + } + return first_of_type_qualifier_token(ctx->current); +} + +struct map_entry *hashmap_find(struct hash_map * map, char * key); + +struct map_entry *find_tag(struct parser_ctx * ctx, 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 ((void *)0); +} + +struct map_entry *find_variables(struct parser_ctx * ctx, char * lexeme, struct scope ** ppscope_opt) +{ + if (ppscope_opt != ((void *)0)) + { + *ppscope_opt = ((void *)0); + } + 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 ((void *)0); +} + +struct enum_specifier *find_enum_specifier(struct parser_ctx * ctx, char * lexeme) +{ + struct enum_specifier * best = ((void *)0); + struct scope * scope = ctx->scopes.tail; + while (scope) + { + struct map_entry * p_entry = hashmap_find(&scope->tags, lexeme); + if (p_entry && p_entry->type == 1) + { + ; + best = p_entry->data.p_enum_specifier; + if (best->enumerator_list.head != ((void *)0)) + { + return best; + } + else + { + } + } + scope = scope->previous; + } + return best; +} + +struct struct_or_union_specifier *find_struct_or_union_specifier(struct parser_ctx * ctx, char * lexeme) +{ + struct struct_or_union_specifier * p = ((void *)0); + struct scope * scope = ctx->scopes.tail; + while (scope) + { + struct map_entry * p_entry = hashmap_find(&scope->tags, lexeme); + if (p_entry && p_entry->type == 2) + { + ; + p = p_entry->data.p_struct_or_union_specifier; + break; + } + scope = scope->previous; + } + return p; +} + +struct declarator *find_declarator(struct parser_ctx * ctx, char * lexeme, struct scope ** ppscope_opt) +{ + struct map_entry * p_entry = find_variables(ctx, lexeme, ppscope_opt); + if (p_entry) + { + if (p_entry->type == 5) + { + ; + struct init_declarator * p_init_declarator = p_entry->data.p_init_declarator; + return (struct declarator *)p_init_declarator->p_declarator; + } + else + { + if (p_entry->type == 4) + { + return p_entry->data.p_declarator; + } + } + } + return ((void *)0); +} + +struct enumerator *find_enumerator(struct parser_ctx * ctx, char * lexeme, struct scope ** ppscope_opt) +{ + struct map_entry * p_entry = find_variables(ctx, lexeme, ppscope_opt); + if (p_entry && p_entry->type == 3) + { + return p_entry->data.p_enumerator; + } + return ((void *)0); +} + +unsigned char first_of_typedef_name(struct parser_ctx * ctx, struct token * p_token) +{ + if (p_token->type != 8996) + { + return 0; + } + if (p_token->flags & 16) + { + return 1; + } + if (p_token->flags & 32) + { + return 0; + } + struct declarator * p_declarator = find_declarator(ctx, p_token->lexeme, ((void *)0)); + if (p_declarator && p_declarator->declaration_specifiers && (p_declarator->declaration_specifiers->storage_class_specifier_flags & 1)) + { + p_declarator->num_uses++; + p_token->flags = 16; + return 1; + } + else + { + p_token->flags = 32; + } + return 0; +} + +unsigned char first_of_type_specifier_token(struct parser_ctx * ctx, struct token * token); + +unsigned char first_of_type_name_ahead(struct parser_ctx * ctx) +{ + if (ctx->current == ((void *)0)) + { + return 0; + } + if (ctx->current->type != 40) + { + return 0; + } + struct token * token_ahead = parser_look_ahead(ctx); + if (token_ahead == ((void *)0)) + { + return 0; + } + return first_of_type_specifier_token(ctx, token_ahead) || first_of_type_qualifier_token(token_ahead); +} + +unsigned char first_of_type_specifier(struct parser_ctx * ctx); + +unsigned char first_of_type_name(struct parser_ctx * ctx) +{ + return first_of_type_specifier(ctx) || first_of_type_qualifier(ctx); +} + +unsigned char first_of_type_specifier_token(struct parser_ctx * ctx, struct token * p_token) +{ + return p_token->type == 9040 || p_token->type == 9003 || p_token->type == 9028 || p_token->type == 9019 || p_token->type == 9020 || p_token->type == 9021 || p_token->type == 9022 || p_token->type == 9023 || p_token->type == 9024 || p_token->type == 9014 || p_token->type == 9010 || p_token->type == 9029 || p_token->type == 9039 || p_token->type == 9063 || p_token->type == 9047 || p_token->type == 9048 || p_token->type == 9050 || p_token->type == 9051 || p_token->type == 9049 || p_token->type == 9058 || p_token->type == 9062 || 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); +} + +unsigned char first_of_type_specifier(struct parser_ctx * ctx) +{ + if (ctx->current == ((void *)0)) + { + return 0; + } + return first_of_type_specifier_token(ctx, ctx->current); +} + +unsigned char 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); +} + +unsigned char first_of_compound_statement(struct parser_ctx * ctx) +{ + return ctx->current != ((void *)0) && ctx->current->type == 123; +} + +unsigned char first_of_jump_statement(struct parser_ctx * ctx) +{ + if (ctx->current == ((void *)0)) + { + return 0; + } + return ctx->current->type == 9016 || ctx->current->type == 9005 || ctx->current->type == 9000 || ctx->current->type == 9027 || ctx->current->type == 9037; +} + +unsigned char first_of_selection_statement(struct parser_ctx * ctx) +{ + if (ctx->current == ((void *)0)) + { + return 0; + } + return ctx->current->type == 9017 || ctx->current->type == 9034; +} + +unsigned char first_of_iteration_statement(struct parser_ctx * ctx) +{ + if (ctx->current == ((void *)0)) + { + return 0; + } + return ctx->current->type == 9042 || ctx->current->type == 9008 || ctx->current->type == 9015; +} + +unsigned char first_of_label(struct parser_ctx * ctx) +{ + if (ctx->current == ((void *)0)) + { + return 0; + } + if (ctx->current->type == 8996) + { + struct token * next = parser_look_ahead(ctx); + return next && next->type == 58; + } + else + { + if (ctx->current->type == 9001) + { + return 1; + } + else + { + if (ctx->current->type == 9007) + { + return 1; + } + } + } + return 0; +} + +unsigned char first_of_declaration_specifier(struct parser_ctx * ctx) +{ + return first_of_storage_class_specifier(ctx) || first_of_function_specifier(ctx) || first_of_type_specifier_qualifier(ctx); +} + +unsigned char first_of_pragma_declaration(struct parser_ctx * ctx) +{ + if (ctx->current == ((void *)0)) + { + return 0; + } + return ctx->current->type == 128; +} + +unsigned char first_of_static_assert_declaration(struct parser_ctx * ctx) +{ + if (ctx->current == ((void *)0)) + { + return 0; + } + return ctx->current->type == 9055 || ctx->current->type == 9069 || ctx->current->type == 9070 || ctx->current->type == 9071 || ctx->current->type == 9072; +} + +unsigned char first_of_attribute_specifier(struct parser_ctx * ctx) +{ + if (ctx->current == ((void *)0)) + { + return 0; + } + if (ctx->current->type != 91) + { + return 0; + } + struct token * p_token = parser_look_ahead(ctx); + return p_token != ((void *)0) && p_token->type == 91; +} + +unsigned char first_of_labeled_statement(struct parser_ctx * ctx) +{ + return first_of_label(ctx); +} + +unsigned char first_of_designator(struct parser_ctx * ctx) +{ + if (ctx->current == ((void *)0)) + { + return 0; + } + return ctx->current->type == 91 || ctx->current->type == 46; +} + +struct token *previous_parser_token(struct token * token) +{ + if (token->prev == ((void *)0)) + { + return ((void *)0); + } + struct token * prev = token->prev; + while (prev && !(prev->flags & 1)) + { + prev = prev->prev; + } + return prev; +} + +int strcmp(char * _Str1, char * _Str2); + +int is_keyword(char * text) +{ + int result = 0; + switch (text[0]) + { + case 97 : + if (strcmp("alignof", text) == 0) + { + result = 9044; + } + else + { + if (strcmp("auto", text) == 0) + { + result = 8999; + } + else + { + if (strcmp("alignas", text) == 0) + { + result = 9043; + } + else + { + if (strcmp("alignof", text) == 0) + { + result = 9043; + } + else + { + if (strcmp("assert", text) == 0) + { + result = 9056; + } + } + } + } + } + break; + case 98 : + if (strcmp("break", text) == 0) + { + result = 9000; + } + else + { + if (strcmp("bool", text) == 0) + { + result = 9047; + } + } + break; + case 99 : + if (strcmp("case", text) == 0) + { + result = 9001; + } + else + { + if (strcmp("char", text) == 0) + { + result = 9003; + } + else + { + if (strcmp("const", text) == 0) + { + result = 9004; + } + else + { + if (strcmp("constexpr", text) == 0) + { + result = 9002; + } + else + { + if (strcmp("continue", text) == 0) + { + result = 9005; + } + else + { + if (strcmp("catch", text) == 0) + { + result = 9006; + } + } + } + } + } + } + break; + case 100 : + if (strcmp("default", text) == 0) + { + result = 9007; + } + else + { + if (strcmp("do", text) == 0) + { + result = 9008; + } + else + { + if (strcmp("defer", text) == 0) + { + result = 9009; + } + else + { + if (strcmp("double", text) == 0) + { + result = 9010; + } + } + } + } + break; + case 101 : + if (strcmp("else", text) == 0) + { + result = 9011; + } + else + { + if (strcmp("enum", text) == 0) + { + result = 9012; + } + else + { + if (strcmp("extern", text) == 0) + { + result = 9013; + } + } + } + break; + case 102 : + if (strcmp("float", text) == 0) + { + result = 9014; + } + else + { + if (strcmp("for", text) == 0) + { + result = 9015; + } + else + { + if (strcmp("false", text) == 0) + { + result = 9060; + } + } + } + break; + case 103 : + if (strcmp("goto", text) == 0) + { + result = 9016; + } + break; + case 105 : + if (strcmp("if", text) == 0) + { + result = 9017; + } + else + { + if (strcmp("inline", text) == 0) + { + result = 9018; + } + else + { + if (strcmp("int", text) == 0) + { + result = 9019; + } + } + } + break; + case 110 : + if (strcmp("nullptr", text) == 0) + { + result = 9061; + } + break; + case 108 : + if (strcmp("long", text) == 0) + { + result = 9020; + } + break; + case 114 : + if (strcmp("register", text) == 0) + { + result = 9025; + } + else + { + if (strcmp("restrict", text) == 0) + { + result = 9026; + } + else + { + if (strcmp("return", text) == 0) + { + result = 9027; + } + } + } + break; + case 115 : + if (strcmp("short", text) == 0) + { + result = 9028; + } + else + { + if (strcmp("signed", text) == 0) + { + result = 9029; + } + else + { + if (strcmp("sizeof", text) == 0) + { + result = 9030; + } + else + { + if (strcmp("static", text) == 0) + { + result = 9032; + } + else + { + if (strcmp("struct", text) == 0) + { + result = 9033; + } + else + { + if (strcmp("switch", text) == 0) + { + result = 9034; + } + else + { + if (strcmp("static_assert", text) == 0) + { + result = 9055; + } + else + { + if (strcmp("static_debug", text) == 0) + { + result = 9069; + } + else + { + if (strcmp("static_debug_ex", text) == 0) + { + result = 9070; + } + else + { + if (strcmp("static_state", text) == 0) + { + result = 9071; + } + else + { + if (strcmp("static_set", text) == 0) + { + result = 9072; + } + } + } + } + } + } + } + } + } + } + } + break; + case 116 : + if (strcmp("typedef", text) == 0) + { + result = 9035; + } + else + { + if (strcmp("typeof", text) == 0) + { + result = 9058; + } + else + { + if (strcmp("typeof_unqual", text) == 0) + { + result = 9062; + } + else + { + if (strcmp("true", text) == 0) + { + result = 9059; + } + else + { + if (strcmp("thread_local", text) == 0) + { + result = 9057; + } + else + { + if (strcmp("try", text) == 0) + { + result = 9036; + } + else + { + if (strcmp("throw", text) == 0) + { + result = 9037; + } + } + } + } + } + } + } + break; + case 117 : + if (strcmp("union", text) == 0) + { + result = 9038; + } + else + { + if (strcmp("unsigned", text) == 0) + { + result = 9039; + } + } + break; + case 118 : + if (strcmp("void", text) == 0) + { + result = 9040; + } + else + { + if (strcmp("volatile", text) == 0) + { + result = 9041; + } + } + break; + case 119 : + if (strcmp("while", text) == 0) + { + result = 9042; + } + break; + case 95 : + if (strcmp("_Out", text) == 0) + { + result = 9065; + } + else + { + if (strcmp("_Owner", text) == 0) + { + result = 9064; + } + else + { + if (strcmp("_Obj_owner", text) == 0) + { + result = 9066; + } + else + { + if (strcmp("_Opt", text) == 0) + { + result = 9068; + } + else + { + if (strcmp("_View", text) == 0) + { + result = 9067; + } + else + { + if (strcmp("_Lengthof", text) == 0) + { + result = 9031; + } + else + { + if (strcmp("_is_lvalue", text) == 0) + { + result = 9074; + } + else + { + if (strcmp("_is_const", text) == 0) + { + result = 9075; + } + else + { + if (strcmp("_is_owner", text) == 0) + { + result = 9076; + } + else + { + if (strcmp("_is_pointer", text) == 0) + { + result = 9073; + } + else + { + if (strcmp("_is_array", text) == 0) + { + result = 9077; + } + else + { + if (strcmp("_is_function", text) == 0) + { + result = 9078; + } + else + { + if (strcmp("_is_arithmetic", text) == 0) + { + result = 9080; + } + else + { + if (strcmp("_is_floating_point", text) == 0) + { + result = 9081; + } + else + { + if (strcmp("_is_integral", text) == 0) + { + result = 9082; + } + else + { + if (strcmp("_is_scalar", text) == 0) + { + result = 9079; + } + else + { + if (strcmp("_Alignof", text) == 0) + { + result = 9044; + } + else + { + if (strcmp("_Alignas", text) == 0) + { + result = 9043; + } + else + { + if (strcmp("_Atomic", text) == 0) + { + result = 9045; + } + else + { + if (strcmp("_Bool", text) == 0) + { + result = 9047; + } + else + { + if (strcmp("_Complex", text) == 0) + { + result = 9048; + } + else + { + if (strcmp("_Decimal32", text) == 0) + { + result = 9050; + } + else + { + if (strcmp("_Decimal64", text) == 0) + { + result = 9051; + } + else + { + if (strcmp("_Decimal128", text) == 0) + { + result = 9049; + } + else + { + if (strcmp("_Generic", text) == 0) + { + result = 9052; + } + else + { + if (strcmp("_Imaginary", text) == 0) + { + result = 9053; + } + else + { + if (strcmp("_Noreturn", text) == 0) + { + result = 9054; + } + else + { + if (strcmp("_Static_assert", text) == 0) + { + result = 9055; + } + else + { + if (strcmp("_Thread_local", text) == 0) + { + result = 9057; + } + else + { + if (strcmp("_BitInt", text) == 0) + { + result = 9063; + } + else + { + if (strcmp("__typeof__", text) == 0) + { + result = 9058; + } + else + { + if (strcmp("__int8", text) == 0) + { + result = 9021; + } + else + { + if (strcmp("__int16", text) == 0) + { + result = 9022; + } + else + { + if (strcmp("__int32", text) == 0) + { + result = 9023; + } + else + { + if (strcmp("__int64", text) == 0) + { + result = 9024; + } + else + { + if (strcmp("__forceinline", text) == 0) + { + result = 9018; + } + else + { + if (strcmp("__inline", text) == 0) + { + result = 9018; + } + else + { + if (strcmp("_asm", text) == 0 || strcmp("__asm", text) == 0) + { + result = 9046; + } + else + { + if (strcmp("__alignof", text) == 0) + { + result = 9044; + } + else + { + if (strcmp("__restrict", text) == 0) + { + result = 9026; + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + break; + default: + break; + } + return result; +} + +int parse_number(char * lexeme, char suffix[4], char erromsg[100]); + +static void token_promote(struct parser_ctx * ctx, struct token * token) +{ + if (token->type == 8997) + { + token->type = 8996; + } + if (token->type == 8996) + { + int t = is_keyword(token->lexeme); + if (t != 0) + { + token->type = t; + } + } + else + { + if (token->type == 134) + { + char errormsg[100] = {0}; + char suffix[4] = {0}; + token->type = parse_number(token->lexeme, suffix, errormsg); + if (token->type == 0) + { + compiler_diagnostic_message(1380, ctx, token, ((void *)0), errormsg); + } + } + } +} + +struct token *parser_look_ahead(struct parser_ctx * ctx) +{ + if (ctx->current == ((void *)0)) + { + return ((void *)0); + } + struct token * p = ctx->current->next; + while (p && !(p->flags & 1)) + { + p = p->next; + } + if (p) + { + token_promote(ctx, p); + } + return p; +} + +static struct token *pragma_match(struct token * p_current) +{ + struct token * p_token = p_current->next; + while (p_token && p_token->type == 143) + { + p_token = p_token->next; + } + return p_token; +} + +static void pragma_skip_blanks(struct parser_ctx * ctx) +{ + while (ctx->current && ctx->current->type == 143) + { + ctx->current = ctx->current->next; + } +} + +void unexpected_end_of_file(struct parser_ctx * ctx); +unsigned long long get_warning_bit_mask(char * wname); +int get_warning(char * wname); +int get_diagnostic_type(struct diagnostic * d, int w); + +static void parse_pragma(struct parser_ctx * ctx, struct token * token) +{ + if (1) + { + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + if (ctx->current->type == 128) + { + 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); + unsigned char onoff = 0; + if (ctx->current && strcmp(ctx->current->lexeme, "ON") == 0) + { + onoff = 1; + } + else + { + if (ctx->current && strcmp(ctx->current->lexeme, "OFF") == 0) + { + onoff = 0; + } + else + { + compiler_diagnostic_message(1250, ctx, ctx->current, ((void *)0), "nullchecks pragma needs to use ON OFF"); + } + } + ctx->options.null_checks_enabled = 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) + { + if (ctx->options.diagnostic_stack.top_index < sizeof (ctx->options.diagnostic_stack) / sizeof (ctx->options.diagnostic_stack.stack[0])) + { + ctx->options.diagnostic_stack.top_index++; + ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index] = ctx->options.diagnostic_stack.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) + { + 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)) + { + unsigned char is_error = strcmp(ctx->current->lexeme, "error") == 0; + unsigned char is_warning = strcmp(ctx->current->lexeme, "warning") == 0; + unsigned char is_note = strcmp(ctx->current->lexeme, "note") == 0; + ctx->current = ctx->current->next; + pragma_skip_blanks(ctx); + if (ctx->current && ctx->current->type == 130) + { + unsigned long long w = get_warning_bit_mask(ctx->current->lexeme + 1); + ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index].errors = ~w; + ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index].notes = ~w; + ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index].warnings = ~w; + if (is_error) + { + ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index].errors = w; + } + else + { + if (is_warning) + { + ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index].warnings = w; + } + else + { + if (is_note) + { + ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index].notes = w; + } + } + } + } + } + else + { + if (ctx->current && (strcmp(ctx->current->lexeme, "check") == 0)) + { + ctx->current = ctx->current->next; + pragma_skip_blanks(ctx); + if (ctx->current && ctx->current->type == 130) + { + int id = get_warning(ctx->current->lexeme + 1 + 2); + unsigned char found = 0; + { + int i = 0; + for (; i < (int)(sizeof (ctx->p_report->last_diagnostics_ids) / sizeof (ctx->p_report->last_diagnostics_ids[0])); i++) + { + if (ctx->p_report->last_diagnostics_ids[i] == 0) + { + break; + } + if (ctx->p_report->last_diagnostics_ids[i] == id) + { + found = 1; + int t = get_diagnostic_type(&ctx->options.diagnostic_stack.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--; + } + } + } + break; + } + } + } + if ( !found) + { + compiler_diagnostic_message(650, ctx, ctx->current, ((void *)0), "pragma check failed"); + } + } + } + else + { + compiler_diagnostic_message(650, ctx, ctx->current, ((void *)0), "unknown pragma"); + } + } + } + } + } + } + } + else _catch_label_1: + { + } +} + +static void parser_skip_blanks(struct parser_ctx * ctx) +{ + while (ctx->current && !(ctx->current->flags & 1)) + { + if (ctx->current->type == 128) + { + parse_pragma(ctx, ctx->current); + } + if (ctx->current) + { + ctx->current = ctx->current->next; + } + } + if (ctx->current) + { + token_promote(ctx, ctx->current); + } +} + +void parser_match(struct parser_ctx * ctx) +{ + if (ctx->current == ((void *)0)) + { + return; + } + ctx->previous = ctx->current; + ctx->current = ctx->current->next; + parser_skip_blanks(ctx); +} + +void unexpected_end_of_file(struct parser_ctx * ctx) +{ + compiler_diagnostic_message(970, ctx, ctx->input_list.tail, ((void *)0), "unexpected end of file"); +} + +char *get_token_name(int tk); + +int parser_match_tk(struct parser_ctx * ctx, int type) +{ + int error = 0; + if (ctx->current != ((void *)0)) + { + if (ctx->current->type != type) + { + compiler_diagnostic_message(970, ctx, ctx->current, ((void *)0), "expected %s", get_token_name(type)); + error = 1; + } + ctx->previous = ctx->current; + ctx->current = ctx->current->next; + parser_skip_blanks(ctx); + } + else + { + compiler_diagnostic_message(970, ctx, ctx->input_list.tail, ((void *)0), "unexpected end of file after"); + error = 1; + } + return error; +} + +void print_type_qualifier_flags(struct osstream * ss, unsigned char * first, int e_type_qualifier_flags); +int ss_fprintf(struct osstream * stream, char * fmt, ...); +void print_item(struct osstream * ss, unsigned char * first, char * item); +unsigned char print_type_specifier_flags(struct osstream * ss, unsigned char * first, int e_type_specifier_flags); + +void print_declaration_specifiers(struct osstream * ss, struct declaration_specifiers * p_declaration_specifiers) +{ + unsigned char first = 1; + 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 + { + ; + } + } + 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) + { + if (p_declaration_specifiers->typedef_declarator->name_opt) + { + print_item(ss, &first, p_declaration_specifiers->typedef_declarator->name_opt->lexeme); + } + } + else + { + print_type_specifier_flags(ss, &first, p_declaration_specifiers->type_specifier_flags); + } + } + } +} + +unsigned char type_specifier_is_integer(int flags) +{ + if ((flags & 2) || (flags & 4) || (flags & 8) || (flags & 16) || (flags & 8) || (flags & 262144) || (flags & 524288) || (flags & 1048576) || (flags & 2097152) || (flags & 4194304)) + { + return 1; + } + return 0; +} + +int final_specifier(struct parser_ctx * ctx, int * flags) +{ + if ((( *flags) & 256) || (( *flags) & 128)) + { + if ( !type_specifier_is_integer( *flags)) + { + ( *flags) = 8; + } + } + return 0; +} + +int add_specifier(struct parser_ctx * ctx, int * flags, int new_flag) +{ + if (new_flag & 16) + { + if (( *flags) & 4194304) + { + compiler_diagnostic_message(980, ctx, ctx->current, ((void *)0), "cannot combine with previous 'long long' declaration specifier"); + return 1; + } + else + { + if (( *flags) & 16) + { + ( *flags) = ( *flags) & ~16; + ( *flags) = 4194304; + } + else + { + ( *flags) = ( *flags) & ~8; + ( *flags) = 16; + } + } + } + else + { + ( *flags) = new_flag; + } + switch ((unsigned int) *flags) + { + case 1 : + case 2 : + case 130 : + case 258 : + case 4 : + case 132 : + case 12 : + case 140 : + case 260 : + case 268 : + case 8 : + case 128 : + case 136 : + case 256 : + case 264 : + case 16 : + case 144 : + case 24 : + case 152 : + case 272 : + case 280 : + case 4194304 : + case 4194432 : + case 4194312 : + case 4194440 : + case 4194560 : + case 4194568 : + case 32 : + case 64 : + case 80 : + case 2048 : + case 4096 : + case 8192 : + case 512 : + case 1056 : + case 1088 : + case 1104 : + case 16384 : + case 32768 : + case 65536 : + case 8388608 : + case 131072 : + case 262144 : + case 262400 : + case 524288 : + case 524544 : + case 524416 : + case 1048576 : + case 1048832 : + case 1048704 : + case 2097152 : + case 2097408 : + case 2097280 : + break; + default: + compiler_diagnostic_message(1300, ctx, ctx->current, ((void *)0), "incompatible specifiers"); + return 1; + } + return 0; +} + +void attribute_specifier_sequence_delete(struct attribute_specifier_sequence * p); +void declaration_specifier_delete(struct declaration_specifier * p); + +void declaration_specifiers_delete(struct declaration_specifiers * p) +{ + if (p) + { + attribute_specifier_sequence_delete(p->p_attribute_specifier_sequence_opt); + struct declaration_specifier * item = p->head; + while (item) + { + struct declaration_specifier * next = item->next; + item->next = ((void *)0); + declaration_specifier_delete(item); + item = next; + } + free(p); + } +} + +void declaration_specifiers_add(struct declaration_specifiers * list, struct declaration_specifier * p_item) +{ + if (list->head == ((void *)0)) + { + list->head = p_item; + } + else + { + ; + ; + list->tail->next = p_item; + } + list->tail = p_item; +} + +void *calloc(int nmemb, unsigned int size); +struct declaration_specifier *declaration_specifier(struct parser_ctx * ctx); +struct attribute_specifier_sequence *attribute_specifier_sequence_opt(struct parser_ctx * ctx); + +struct declaration_specifiers *declaration_specifiers(struct parser_ctx * ctx, int default_storage_flag) +{ + if (ctx->current == ((void *)0)) + { + return ((void *)0); + } + struct declaration_specifiers * p_declaration_specifiers = calloc(1, sizeof (struct declaration_specifiers)); + if (1) + { + if (p_declaration_specifiers == ((void *)0)) + { + goto _catch_label_1; + } + p_declaration_specifiers->first_token = ctx->current; + while (first_of_declaration_specifier(ctx)) + { + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + if (ctx->current->flags & 16) + { + if (p_declaration_specifiers->type_specifier_flags != 0) + { + break; + } + } + struct declaration_specifier * p_declaration_specifier = declaration_specifier(ctx); + if (p_declaration_specifier == ((void *)0)) + { + goto _catch_label_1; + } + 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) + { + } + 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->type == 8996) + { + p_declaration_specifiers->typedef_declarator = find_declarator(ctx, p_declaration_specifier->type_specifier_qualifier->type_specifier->token->lexeme, ((void *)0)); + } + } + } + } + } + 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->function_specifier) + { + p_declaration_specifiers->function_specifier_flags = p_declaration_specifier->function_specifier->flags; + } + } + } + declaration_specifiers_add(p_declaration_specifiers, p_declaration_specifier); + ; + p_declaration_specifiers->p_attribute_specifier_sequence_opt = attribute_specifier_sequence_opt(ctx); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + if (ctx->current->type == 8996 && p_declaration_specifiers->type_specifier_flags != 0) + { + break; + } + } + struct token * prev = previous_parser_token(ctx->current); + if (prev == ((void *)0)) + { + goto _catch_label_1; + } + p_declaration_specifiers->last_token = prev; + 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 & 4) + { + p_declaration_specifiers->storage_class_specifier_flags = ~4096; + } + } + else _catch_label_1: + { + declaration_specifiers_delete(p_declaration_specifiers); + p_declaration_specifiers = ((void *)0); + } + return p_declaration_specifiers; +} + +struct static_assert_declaration *static_assert_declaration(struct parser_ctx * ctx); +struct pragma_declaration *pragma_declaration(struct parser_ctx * ctx); +struct init_declarator_list init_declarator_list(struct parser_ctx * ctx, struct declaration_specifiers * p_declaration_specifiers); +void declaration_delete(struct declaration * p); + +struct declaration *declaration_core(struct parser_ctx * ctx, struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt, unsigned char can_be_function_definition, unsigned char * is_function_definition, int default_storage_class_specifier_flags, unsigned char without_semicolon) +{ + struct declaration * p_declaration = ((void *)0); + if (1) + { + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + p_declaration = calloc(1, sizeof (struct declaration)); + if (p_declaration == ((void *)0)) + { + goto _catch_label_1; + } + p_declaration->p_attribute_specifier_sequence_opt = p_attribute_specifier_sequence_opt; + p_attribute_specifier_sequence_opt = ((void *)0); + p_declaration->first_token = ctx->current; + if (ctx->current->type == 59) + { + parser_match(ctx); + return p_declaration; + } + if (first_of_static_assert_declaration(ctx)) + { + p_declaration->static_assert_declaration = static_assert_declaration(ctx); + } + else + { + if (first_of_pragma_declaration(ctx)) + { + p_declaration->pragma_declaration = pragma_declaration(ctx); + } + else + { + if (first_of_declaration_specifier(ctx)) + { + p_declaration->declaration_specifiers = declaration_specifiers(ctx, default_storage_class_specifier_flags); + if (p_declaration->declaration_specifiers == ((void *)0)) + { + goto _catch_label_1; + } + 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 == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + if (ctx->current->type != 59) + { + p_declaration->init_declarator_list = init_declarator_list(ctx, p_declaration->declaration_specifiers); + } + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + p_declaration->last_token = ctx->current; + if (ctx->current->type == 123) + { + if (can_be_function_definition) + { + *is_function_definition = 1; + } + } + else + { + if ( !without_semicolon && parser_match_tk(ctx, 59) != 0) + { + goto _catch_label_1; + } + } + } + else + { + if (ctx->current->type == 8996) + { + compiler_diagnostic_message(860, ctx, ctx->current, ((void *)0), "invalid type '%s'", ctx->current->lexeme); + } + else + { + compiler_diagnostic_message(990, ctx, ctx->current, ((void *)0), "expected declaration not '%s'", ctx->current->lexeme); + } + parser_match(ctx); + } + } + } + } + else _catch_label_1: + { + declaration_delete(p_declaration); + p_declaration = ((void *)0); + } + attribute_specifier_sequence_delete(p_attribute_specifier_sequence_opt); + return p_declaration; +} + +struct compound_statement *function_body(struct parser_ctx * ctx); +void defer_start_visit_declaration(struct defer_visit_ctx * ctx, struct declaration * p_declaration); +void defer_visit_ctx_destroy(struct defer_visit_ctx * p); +void flow_start_visit_declaration(struct flow_visit_ctx * ctx, struct declaration * p_declaration); +void flow_visit_ctx_destroy(struct flow_visit_ctx * p); +unsigned char type_is_maybe_unused(struct type * p_type); + +struct declaration *function_definition_or_declaration(struct parser_ctx * ctx) +{ + struct declaration * p_declaration = ((void *)0); + if (1) + { + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt = attribute_specifier_sequence_opt(ctx); + unsigned char is_function_definition = 0; + p_declaration = declaration_core(ctx, p_attribute_specifier_sequence_opt, 1, &is_function_definition, 0, 0); + if (p_declaration == ((void *)0)) + { + goto _catch_label_1; + } + if (is_function_definition) + { + if (p_declaration->init_declarator_list.head == ((void *)0) || p_declaration->init_declarator_list.head->p_declarator->direct_declarator == ((void *)0) || p_declaration->init_declarator_list.head->p_declarator->direct_declarator->function_declarator == ((void *)0)) + { + goto _catch_label_1; + } + ctx->p_current_function_opt = p_declaration; + ; + 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); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + check_func_open_brace_style(ctx, ctx->current); + struct diagnostic before_function_diagnostics = ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index]; + struct compound_statement * p_function_body = function_body(ctx); + if (p_function_body == ((void *)0)) + { + goto _catch_label_1; + } + ; + p_declaration->function_body = p_function_body; + p_declaration->init_declarator_list.head->p_declarator->function_body = p_declaration->function_body; + { + struct defer_visit_ctx ctx2 = {0}; + ctx2.ctx = ctx; + defer_start_visit_declaration(&ctx2, p_declaration); + defer_visit_ctx_destroy(&ctx2); + } + if (ctx->options.flow_analysis) + { + ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index] = before_function_diagnostics; + struct flow_visit_ctx ctx2 = {0}; + ctx2.ctx = ctx; + flow_start_visit_declaration(&ctx2, p_declaration); + flow_visit_ctx_destroy(&ctx2); + } + struct parameter_declaration * parameter = ((void *)0); + if (p_declaration->init_declarator_list.head && p_declaration->init_declarator_list.head->p_declarator->direct_declarator && 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; + } + while (parameter) + { + if ( !type_is_maybe_unused(¶meter->declarator->type) && parameter->declarator && parameter->declarator->num_uses == 0) + { + if (parameter->declarator->name_opt && parameter->declarator->name_opt->level == 0) + { + compiler_diagnostic_message(5, ctx, parameter->declarator->name_opt, ((void *)0), "'%s': unreferenced formal parameter", parameter->declarator->name_opt->lexeme); + } + } + parameter = parameter->next; + } + scope_list_pop(&ctx->scopes); + ctx->p_current_function_opt = ((void *)0); + } + else + { + if (ctx->options.flow_analysis) + { + struct flow_visit_ctx ctx2 = {0}; + ctx2.ctx = ctx; + flow_start_visit_declaration(&ctx2, p_declaration); + flow_visit_ctx_destroy(&ctx2); + } + } + } + else _catch_label_1: + { + declaration_delete(p_declaration); + p_declaration = ((void *)0); + } + return p_declaration; +} + +void simple_declaration_delete(struct simple_declaration * p); + +struct simple_declaration *simple_declaration(struct parser_ctx * ctx, struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt, unsigned char ignore_semicolon) +{ + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + attribute_specifier_sequence_delete(p_attribute_specifier_sequence_opt); + return ((void *)0); + } + int storage_specifier_flags = 4096; + struct simple_declaration * p_simple_declaration = calloc(1, sizeof (struct simple_declaration)); + if (1) + { + if (p_simple_declaration == ((void *)0)) + { + goto _catch_label_1; + } + p_simple_declaration->first_token = ctx->current; + p_simple_declaration->p_attribute_specifier_sequence_opt = p_attribute_specifier_sequence_opt; + p_attribute_specifier_sequence_opt = ((void *)0); + struct declaration_specifiers * ptemp = declaration_specifiers(ctx, storage_specifier_flags); + if (ptemp == ((void *)0)) + { + goto _catch_label_1; + } + p_simple_declaration->p_declaration_specifiers = ptemp; + if (p_simple_declaration->p_attribute_specifier_sequence_opt) + { + p_simple_declaration->p_declaration_specifiers->attributes_flags = p_simple_declaration->p_attribute_specifier_sequence_opt->attributes_flags; + } + p_simple_declaration->init_declarator_list = init_declarator_list(ctx, p_simple_declaration->p_declaration_specifiers); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + struct token * prev = previous_parser_token(ctx->current); + if (prev == ((void *)0)) + { + goto _catch_label_1; + } + p_simple_declaration->last_token = prev; + if ( !ignore_semicolon && parser_match_tk(ctx, 59) != 0) + { + goto _catch_label_1; + } + } + else _catch_label_1: + { + simple_declaration_delete(p_simple_declaration); + p_simple_declaration = ((void *)0); + } + attribute_specifier_sequence_delete(p_attribute_specifier_sequence_opt); + return p_simple_declaration; +} + +struct declaration *declaration(struct parser_ctx * ctx, struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt, int storage_specifier_flags) +{ + unsigned char is_function_definition = 0; + return declaration_core(ctx, p_attribute_specifier_sequence_opt, 0, &is_function_definition, storage_specifier_flags, 0); +} + +void type_specifier_qualifier_delete(struct type_specifier_qualifier * p); + +void declaration_specifier_delete(struct declaration_specifier * p) +{ + if (p) + { + free(p->function_specifier); + type_specifier_qualifier_delete(p->type_specifier_qualifier); + free(p->storage_class_specifier); + ; + free(p); + } +} + +struct storage_class_specifier *storage_class_specifier(struct parser_ctx * ctx); +struct type_specifier_qualifier *type_specifier_qualifier(struct parser_ctx * ctx); +struct function_specifier *function_specifier(struct parser_ctx * ctx); + +struct declaration_specifier *declaration_specifier(struct parser_ctx * ctx) +{ + struct declaration_specifier * p_declaration_specifier = ((void *)0); + if (1) + { + p_declaration_specifier = calloc(1, sizeof *p_declaration_specifier); + if (p_declaration_specifier == ((void *)0)) + { + goto _catch_label_1; + } + if (first_of_storage_class_specifier(ctx)) + { + p_declaration_specifier->storage_class_specifier = storage_class_specifier(ctx); + if (p_declaration_specifier->storage_class_specifier == ((void *)0)) + { + goto _catch_label_1; + } + } + else + { + if (first_of_type_specifier_qualifier(ctx)) + { + p_declaration_specifier->type_specifier_qualifier = type_specifier_qualifier(ctx); + if (p_declaration_specifier->type_specifier_qualifier == ((void *)0)) + { + goto _catch_label_1; + } + } + else + { + if (first_of_function_specifier(ctx)) + { + p_declaration_specifier->function_specifier = function_specifier(ctx); + if (p_declaration_specifier->function_specifier == ((void *)0)) + { + goto _catch_label_1; + } + } + else + { + compiler_diagnostic_message(650, ctx, ctx->current, ((void *)0), "unexpected"); + } + } + } + } + else _catch_label_1: + { + declaration_specifier_delete(p_declaration_specifier); + p_declaration_specifier = ((void *)0); + } + return p_declaration_specifier; +} + +struct init_declarator *init_declarator_add_ref(struct init_declarator * p) +{ + p->has_shared_ownership = 1; + return (struct init_declarator *)p; +} + +void init_declarator_sink(struct init_declarator * p); +void initializer_delete(struct initializer * p); +void declarator_delete(struct declarator * p); + +void init_declarator_delete(struct init_declarator * p) +{ + if (p) + { + if (p->has_shared_ownership) + { + p->has_shared_ownership = 0; + init_declarator_sink(p); + return; + } + initializer_delete(p->initializer); + declarator_delete(p->p_declarator); + ; + free(p); + } +} + +struct declarator *declarator(struct parser_ctx * ctx, struct specifier_qualifier_list * specifier_qualifier_list, struct declaration_specifiers * declaration_specifiers, unsigned char abstract_acceptable, struct token ** pptokenname); +struct type make_type_using_declarator(struct parser_ctx * ctx, struct declarator * pdeclarator); +void naming_convention_global_var(struct parser_ctx * ctx, struct token * token, struct type * type, int storage); +unsigned char type_is_same(struct type * a, struct type * b, unsigned char compare_qualifiers); +int hashmap_set(struct hash_map * map, char * key, struct hash_item_set * item); +void hash_item_set_destroy(struct hash_item_set * p); +struct initializer *initializer(struct parser_ctx * ctx); +int make_object(struct type * p_type, struct object * obj); +unsigned char type_is_const(struct type * p_type); +int initializer_init_new(struct parser_ctx * ctx, struct type * p_current_object_type, struct object * p_current_object, struct initializer * braced_initializer, unsigned char is_constant); +unsigned char type_is_array(struct type * p_type); +struct type type_dup(struct type * p_type); +struct type type_lvalue_conversion(struct type * p_type, unsigned char nullchecks_enabled); +void type_swap(struct type * a, struct type * b); +void type_destroy(struct type * p_type); +void type_remove_names(struct type * p_type); +char *strdup(char * src); +void type_set_qualifiers_using_declarator(struct type * p_type, struct declarator * pdeclarator); +void type_visit_to_mark_anonymous(struct type * p_type); +void check_assigment(struct parser_ctx * ctx, struct type * left_type, struct expression * right, int assigment_type); +unsigned char type_is_pointer(struct type * p_type); +unsigned char type_is_function(struct type * p_type); +unsigned char type_is_vla(struct type * p_type); +unsigned int type_get_sizeof(struct type * p_type); + +struct init_declarator *init_declarator(struct parser_ctx * ctx, struct declaration_specifiers * p_declaration_specifiers) +{ + struct init_declarator * p_init_declarator = ((void *)0); + if (1) + { + p_init_declarator = calloc(1, sizeof (struct init_declarator)); + if (p_init_declarator == ((void *)0)) + { + goto _catch_label_1; + } + struct token * tkname = ((void *)0); + { + struct declarator * p_temp_declarator = declarator(ctx, ((void *)0), p_declaration_specifiers, 0, &tkname); + if (p_temp_declarator == ((void *)0)) + { + goto _catch_label_1; + } + p_init_declarator->p_declarator = p_temp_declarator; + } + if (tkname == ((void *)0)) + { + compiler_diagnostic_message(650, ctx, ctx->current, ((void *)0), "init declarator must have a name"); + goto _catch_label_1; + } + p_init_declarator->p_declarator->declaration_specifiers = p_declaration_specifiers; + p_init_declarator->p_declarator->name_opt = tkname; + if (p_init_declarator->p_declarator->declaration_specifiers->storage_class_specifier_flags & 16) + { + } + else + { + ; + p_init_declarator->p_declarator->type = make_type_using_declarator(ctx, p_init_declarator->p_declarator); + } + ; + ; + if (ctx->scopes.tail->scope_level == 0) + { + naming_convention_global_var(ctx, tkname, &p_init_declarator->p_declarator->type, p_init_declarator->p_declarator->declaration_specifiers->storage_class_specifier_flags); + } + char * name = p_init_declarator->p_declarator->name_opt->lexeme; + struct scope * out_scope = ((void *)0); + 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) + { + if ( !type_is_same(&previous->type, &p_init_declarator->p_declarator->type, 1)) + { + } + } + else + { + compiler_diagnostic_message(1020, ctx, ctx->current, ((void *)0), "redeclaration"); + compiler_diagnostic_message(63, ctx, previous->name_opt, ((void *)0), "previous declaration"); + } + } + else + { + struct hash_item_set item = {0}; + item.p_init_declarator = init_declarator_add_ref(p_init_declarator); + hashmap_set(&ctx->scopes.tail->variables, name, &item); + hash_item_set_destroy(&item); + if (out_scope->scope_level != 0) + { + if (compiler_diagnostic_message(6, ctx, p_init_declarator->p_declarator->first_token_opt, ((void *)0), "declaration of '%s' hides previous declaration", name)) + { + compiler_diagnostic_message(63, ctx, previous->first_token_opt, ((void *)0), "previous declaration is here"); + } + } + } + } + else + { + struct hash_item_set item = {0}; + item.p_init_declarator = init_declarator_add_ref(p_init_declarator); + hashmap_set(&ctx->scopes.tail->variables, name, &item); + hash_item_set_destroy(&item); + } + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + if (ctx->current->type == 61) + { + parser_match(ctx); + ; + p_init_declarator->initializer = initializer(ctx); + if (p_init_declarator->initializer == ((void *)0)) + { + goto _catch_label_1; + } + if (p_init_declarator->initializer->braced_initializer) + { + if (p_init_declarator->p_declarator->declaration_specifiers->storage_class_specifier_flags & 16) + { + compiler_diagnostic_message(1290, ctx, p_init_declarator->p_declarator->first_token_opt, ((void *)0), "'auto' requires a plain identifier"); + goto _catch_label_1; + } + int er = make_object(&p_init_declarator->p_declarator->type, &p_init_declarator->p_declarator->object); + if (er != 0) + { + compiler_diagnostic_message(740, ctx, p_init_declarator->p_declarator->first_token_opt, ((void *)0), "incomplete struct/union type"); + goto _catch_label_1; + } + unsigned char is_constant = type_is_const(&p_init_declarator->p_declarator->type) || p_init_declarator->p_declarator->declaration_specifiers->storage_class_specifier_flags & 64; + initializer_init_new(ctx, &p_init_declarator->p_declarator->type, &p_init_declarator->p_declarator->object, p_init_declarator->initializer, is_constant); + } + else + { + if (p_init_declarator->initializer->assignment_expression) + { + if (type_is_array(&p_init_declarator->p_declarator->type)) + { + int array_size_elements = p_init_declarator->p_declarator->type.num_of_elements; + if (array_size_elements == 0) + { + p_init_declarator->p_declarator->type.num_of_elements = p_init_declarator->initializer->assignment_expression->type.num_of_elements; + } + else + { + if (p_init_declarator->initializer->assignment_expression->type.num_of_elements > array_size_elements) + { + if (p_init_declarator->p_declarator->first_token_opt) + { + compiler_diagnostic_message(51, ctx, p_init_declarator->p_declarator->first_token_opt, ((void *)0), "initializer for array is too long"); + } + } + } + } + ; + if (p_init_declarator->p_declarator->declaration_specifiers->storage_class_specifier_flags & 16) + { + if (p_init_declarator->p_declarator->direct_declarator && (p_init_declarator->p_declarator->direct_declarator->array_declarator != ((void *)0) || p_init_declarator->p_declarator->direct_declarator->function_declarator != ((void *)0))) + { + compiler_diagnostic_message(1290, ctx, p_init_declarator->p_declarator->first_token_opt, ((void *)0), "'auto' requires a plain identifier"); + goto _catch_label_1; + } + if (p_init_declarator->p_declarator->pointer != ((void *)0)) + { + compiler_diagnostic_message(1290, ctx, p_init_declarator->p_declarator->first_token_opt, ((void *)0), "'auto' requires a plain identifier"); + goto _catch_label_1; + } + struct type t = {0}; + if (p_init_declarator->initializer->assignment_expression->expression_type == 33) + { + t = type_dup(&p_init_declarator->initializer->assignment_expression->type); + } + else + { + struct type t2 = type_lvalue_conversion(&p_init_declarator->initializer->assignment_expression->type, ctx->options.null_checks_enabled); + type_swap(&t2, &t); + type_destroy(&t2); + } + type_remove_names(&t); + ; + t.name_opt = strdup(p_init_declarator->p_declarator->name_opt->lexeme); + type_set_qualifiers_using_declarator(&t, p_init_declarator->p_declarator); + type_visit_to_mark_anonymous(&t); + type_swap(&p_init_declarator->p_declarator->type, &t); + type_destroy(&t); + } + check_assigment(ctx, &p_init_declarator->p_declarator->type, p_init_declarator->initializer->assignment_expression, 2); + int er = make_object(&p_init_declarator->p_declarator->type, &p_init_declarator->p_declarator->object); + if (er != 0) + { + goto _catch_label_1; + } + unsigned char is_constant = type_is_const(&p_init_declarator->p_declarator->type) || p_init_declarator->p_declarator->declaration_specifiers->storage_class_specifier_flags & 64; + initializer_init_new(ctx, &p_init_declarator->p_declarator->type, &p_init_declarator->p_declarator->object, p_init_declarator->initializer, is_constant); + } + } + } + else + { + if (type_is_const(&p_init_declarator->p_declarator->type)) + { + if (p_declaration_specifiers->storage_class_specifier_flags & 1) + { + } + else + { + compiler_diagnostic_message(47, ctx, p_init_declarator->p_declarator->first_token_opt, ((void *)0), "const object should be initialized"); + } + } + } + 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) + { + if (p_init_declarator->p_declarator->first_token_opt) + { + compiler_diagnostic_message(1000, ctx, p_init_declarator->p_declarator->first_token_opt, ((void *)0), "static or type qualifiers are not allowed in non-parameter array declarator"); + } + else + { + if (p_init_declarator->initializer) + { + compiler_diagnostic_message(1000, ctx, p_init_declarator->initializer->first_token, ((void *)0), "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 & 32) + { + if (p_init_declarator->p_declarator->first_token_opt) + { + compiler_diagnostic_message(1010, ctx, p_init_declarator->p_declarator->first_token_opt, ((void *)0), "_Obj_owner qualifier can only be used with pointers"); + } + else + { + if (p_init_declarator->initializer) + { + compiler_diagnostic_message(1010, ctx, p_init_declarator->initializer->first_token, ((void *)0), "_Obj_owner qualifier can only be used with pointers"); + } + } + } + } + if ( !(p_init_declarator->p_declarator->type.storage_class_specifier_flags & 1) && !type_is_function(&p_init_declarator->p_declarator->type)) + { + if (type_is_vla(&p_init_declarator->p_declarator->type)) + { + } + else + { + int sz = type_get_sizeof(&p_init_declarator->p_declarator->type); + if (sz == -3) + { + } + else + { + if (sz < 0) + { + if (p_init_declarator->p_declarator->type.storage_class_specifier_flags & 2) + { + } + else + { + compiler_diagnostic_message(1270, ctx, p_init_declarator->p_declarator->name_opt, ((void *)0), "storage size of '%s' isn't known", p_init_declarator->p_declarator->name_opt->lexeme); + } + } + else + { + } + } + } + } + } + else _catch_label_1: + { + init_declarator_delete(p_init_declarator); + p_init_declarator = ((void *)0); + } + return p_init_declarator; +} + +void init_declarator_list_add(struct init_declarator_list * list, struct init_declarator * p_item) +{ + if (list->head == ((void *)0)) + { + list->head = p_item; + } + else + { + ; + ; + list->tail->next = p_item; + } + list->tail = p_item; +} + +void init_declarator_list_destroy(struct init_declarator_list * p) +{ + struct init_declarator * item = p->head; + while (item) + { + struct init_declarator * next = item->next; + item->next = ((void *)0); + init_declarator_delete(item); + item = next; + } +} + +struct init_declarator_list init_declarator_list(struct parser_ctx * ctx, struct declaration_specifiers * p_declaration_specifiers) +{ + struct init_declarator_list init_declarator_list = {0}; + struct init_declarator * p_init_declarator = ((void *)0); + if (1) + { + p_init_declarator = init_declarator(ctx, p_declaration_specifiers); + if (p_init_declarator == ((void *)0)) + { + goto _catch_label_1; + } + init_declarator_list_add(&init_declarator_list, p_init_declarator); + p_init_declarator = ((void *)0); + while (ctx->current != ((void *)0) && ctx->current->type == 44) + { + parser_match(ctx); + p_init_declarator = init_declarator(ctx, p_declaration_specifiers); + if (p_init_declarator == ((void *)0)) + { + goto _catch_label_1; + } + init_declarator_list_add(&init_declarator_list, p_init_declarator); + p_init_declarator = ((void *)0); + } + } + else _catch_label_1: + { + } + return init_declarator_list; +} + +void storage_class_specifier_delete(struct storage_class_specifier * p) +{ + if (p) + { + free(p); + } +} + +struct storage_class_specifier *storage_class_specifier(struct parser_ctx * ctx) +{ + struct storage_class_specifier * p_storage_class_specifier = ((void *)0); + if (1) + { + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + p_storage_class_specifier = calloc(1, sizeof (struct storage_class_specifier)); + if (p_storage_class_specifier == ((void *)0)) + { + goto _catch_label_1; + } + p_storage_class_specifier->token = ctx->current; + switch (ctx->current->type) + { + case 9035 : + p_storage_class_specifier->flags = 1; + break; + case 9013 : + p_storage_class_specifier->flags = 2; + break; + case 9002 : + p_storage_class_specifier->flags = 64; + if (ctx->scopes.tail && ctx->scopes.tail->scope_level == 0) + { + p_storage_class_specifier->flags = 128; + } + break; + case 9032 : + p_storage_class_specifier->flags = 4; + break; + case 9057 : + p_storage_class_specifier->flags = 8; + break; + case 8999 : + p_storage_class_specifier->flags = 16; + break; + case 9025 : + p_storage_class_specifier->flags = 32; + break; + default: + ; + } + parser_match(ctx); + } + else _catch_label_1: + { + storage_class_specifier_delete(p_storage_class_specifier); + p_storage_class_specifier = ((void *)0); + } + return p_storage_class_specifier; +} + +struct type_name *type_name(struct parser_ctx * ctx); +struct expression *expression(struct parser_ctx * ctx); +void typeof_specifier_argument_delete(struct typeof_specifier_argument * p); + +struct typeof_specifier_argument *typeof_specifier_argument(struct parser_ctx * ctx) +{ + struct typeof_specifier_argument * new_typeof_specifier_argument = ((void *)0); + if (1) + { + new_typeof_specifier_argument = calloc(1, sizeof (struct typeof_specifier_argument)); + if (new_typeof_specifier_argument == ((void *)0)) + { + goto _catch_label_1; + } + if (first_of_type_name(ctx)) + { + new_typeof_specifier_argument->type_name = type_name(ctx); + } + else + { + unsigned char disable_evaluation_copy = ctx->evaluation_is_disabled; + ctx->evaluation_is_disabled = 1; + new_typeof_specifier_argument->expression = expression(ctx); + ctx->evaluation_is_disabled = disable_evaluation_copy; + if (new_typeof_specifier_argument->expression == ((void *)0)) + { + goto _catch_label_1; + } + } + } + else _catch_label_1: + { + typeof_specifier_argument_delete(new_typeof_specifier_argument); + new_typeof_specifier_argument = ((void *)0); + } + return new_typeof_specifier_argument; +} + +unsigned char first_of_typeof_specifier(struct parser_ctx * ctx) +{ + if (ctx->current == ((void *)0)) + { + return 0; + } + return ctx->current->type == 9058 || ctx->current->type == 9062; +} + +struct type type_param_array_to_pointer(struct type * p_type, unsigned char null_checks_enabled); +void type_remove_qualifiers(struct type * p_type); +void typeof_specifier_delete(struct typeof_specifier * p); + +struct typeof_specifier *typeof_specifier(struct parser_ctx * ctx) +{ + struct typeof_specifier * p_typeof_specifier = ((void *)0); + if (1) + { + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + p_typeof_specifier = calloc(1, sizeof (struct typeof_specifier)); + if (p_typeof_specifier == ((void *)0)) + { + goto _catch_label_1; + } + p_typeof_specifier->first_token = ctx->current; + unsigned char is_typeof_unqual = ctx->current->type == 9062; + parser_match(ctx); + if (parser_match_tk(ctx, 40) != 0) + { + goto _catch_label_1; + } + struct typeof_specifier_argument * p_typeof_specifier_argument = typeof_specifier_argument(ctx); + if (p_typeof_specifier_argument == ((void *)0)) + { + goto _catch_label_1; + } + p_typeof_specifier->typeof_specifier_argument = p_typeof_specifier_argument; + 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->abstract_declarator->type); + } + } + if (p_typeof_specifier->type.storage_class_specifier_flags & 2048) + { + compiler_diagnostic_message(7, ctx, ctx->current, ((void *)0), "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, ctx->options.null_checks_enabled); + type_swap(&t, &p_typeof_specifier->type); + type_destroy(&t); + } + } + if (is_typeof_unqual) + { + type_remove_qualifiers(&p_typeof_specifier->type); + } + type_visit_to_mark_anonymous(&p_typeof_specifier->type); + free((void *)p_typeof_specifier->type.name_opt); + p_typeof_specifier->type.name_opt = ((void *)0); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + p_typeof_specifier->last_token = ctx->current; + if (parser_match_tk(ctx, 41) != 0) + { + goto _catch_label_1; + } + } + else _catch_label_1: + { + typeof_specifier_delete(p_typeof_specifier); + p_typeof_specifier = ((void *)0); + } + return p_typeof_specifier; +} + +void expression_delete(struct expression * p); +void type_name_delete(struct type_name * p); + +void typeof_specifier_argument_delete(struct typeof_specifier_argument * p) +{ + if (p) + { + expression_delete(p->expression); + type_name_delete(p->type_name); + free(p); + } +} + +void typeof_specifier_delete(struct typeof_specifier * p) +{ + if (p) + { + typeof_specifier_argument_delete(p->typeof_specifier_argument); + type_destroy(&p->type); + free(p); + } +} + +void struct_or_union_specifier_delete(struct struct_or_union_specifier * p); +void enum_specifier_delete(struct enum_specifier * p); +void atomic_type_specifier_delete(struct atomic_type_specifier * p); + +void type_specifier_delete(struct type_specifier * 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 atomic_type_specifier *atomic_type_specifier(struct parser_ctx * ctx); +struct struct_or_union_specifier *struct_or_union_specifier(struct parser_ctx * ctx); +struct enum_specifier *enum_specifier(struct parser_ctx *); + +struct type_specifier *type_specifier(struct parser_ctx * ctx) +{ + struct type_specifier * p_type_specifier = ((void *)0); + if (1) + { + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + p_type_specifier = calloc(1, sizeof *p_type_specifier); + if (p_type_specifier == ((void *)0)) + { + goto _catch_label_1; + } + switch (ctx->current->type) + { + case 9040 : + p_type_specifier->token = ctx->current; + p_type_specifier->flags = 1; + parser_match(ctx); + return p_type_specifier; + case 9003 : + p_type_specifier->token = ctx->current; + p_type_specifier->flags = 2; + parser_match(ctx); + return p_type_specifier; + case 9028 : + p_type_specifier->token = ctx->current; + p_type_specifier->flags = 4; + p_type_specifier->token = ctx->current; + parser_match(ctx); + return p_type_specifier; + case 9019 : + p_type_specifier->token = ctx->current; + p_type_specifier->flags = 8; + p_type_specifier->token = ctx->current; + parser_match(ctx); + return p_type_specifier; + case 9021 : + p_type_specifier->token = ctx->current; + p_type_specifier->flags = 262144; + p_type_specifier->token = ctx->current; + parser_match(ctx); + return p_type_specifier; + case 9022 : + p_type_specifier->token = ctx->current; + p_type_specifier->flags = 524288; + p_type_specifier->token = ctx->current; + parser_match(ctx); + return p_type_specifier; + case 9023 : + p_type_specifier->token = ctx->current; + p_type_specifier->flags = 1048576; + p_type_specifier->token = ctx->current; + parser_match(ctx); + return p_type_specifier; + case 9024 : + p_type_specifier->token = ctx->current; + p_type_specifier->flags = 2097152; + p_type_specifier->token = ctx->current; + parser_match(ctx); + return p_type_specifier; + case 9020 : + p_type_specifier->token = ctx->current; + p_type_specifier->flags = 16; + p_type_specifier->token = ctx->current; + parser_match(ctx); + return p_type_specifier; + case 9014 : + p_type_specifier->token = ctx->current; + p_type_specifier->flags = 32; + p_type_specifier->token = ctx->current; + parser_match(ctx); + return p_type_specifier; + case 9010 : + p_type_specifier->token = ctx->current; + p_type_specifier->flags = 64; + p_type_specifier->token = ctx->current; + parser_match(ctx); + return p_type_specifier; + case 9029 : + p_type_specifier->token = ctx->current; + p_type_specifier->flags = 128; + p_type_specifier->token = ctx->current; + parser_match(ctx); + return p_type_specifier; + case 9039 : + p_type_specifier->flags = 256; + p_type_specifier->token = ctx->current; + parser_match(ctx); + return p_type_specifier; + case 9047 : + p_type_specifier->token = ctx->current; + p_type_specifier->flags = 512; + p_type_specifier->token = ctx->current; + parser_match(ctx); + return p_type_specifier; + case 9048 : + p_type_specifier->token = ctx->current; + p_type_specifier->flags = 1024; + p_type_specifier->token = ctx->current; + parser_match(ctx); + return p_type_specifier; + case 9050 : + p_type_specifier->token = ctx->current; + p_type_specifier->flags = 2048; + p_type_specifier->token = ctx->current; + parser_match(ctx); + return p_type_specifier; + case 9051 : + p_type_specifier->flags = 4096; + p_type_specifier->token = ctx->current; + parser_match(ctx); + return p_type_specifier; + case 9049 : + p_type_specifier->flags = 8192; + p_type_specifier->token = ctx->current; + parser_match(ctx); + return p_type_specifier; + default: + break; + } + if (first_of_typeof_specifier(ctx)) + { + p_type_specifier->token = ctx->current; + p_type_specifier->flags = 8388608; + p_type_specifier->typeof_specifier = typeof_specifier(ctx); + if (p_type_specifier->typeof_specifier == ((void *)0)) + { + type_specifier_delete(p_type_specifier); + return ((void *)0); + } + } + else + { + if (first_of_atomic_type_specifier(ctx)) + { + p_type_specifier->token = ctx->current; + p_type_specifier->flags = 16384; + p_type_specifier->atomic_type_specifier = atomic_type_specifier(ctx); + if (p_type_specifier->atomic_type_specifier == ((void *)0)) + { + type_specifier_delete(p_type_specifier); + return ((void *)0); + } + } + else + { + if (first_of_struct_or_union(ctx)) + { + p_type_specifier->token = ctx->current; + p_type_specifier->flags = 32768; + p_type_specifier->struct_or_union_specifier = struct_or_union_specifier(ctx); + if (p_type_specifier->struct_or_union_specifier == ((void *)0)) + { + type_specifier_delete(p_type_specifier); + return ((void *)0); + } + } + else + { + if (first_of_enum_specifier(ctx)) + { + p_type_specifier->token = ctx->current; + p_type_specifier->flags = 65536; + p_type_specifier->enum_specifier = enum_specifier(ctx); + if (p_type_specifier->enum_specifier == ((void *)0)) + { + type_specifier_delete(p_type_specifier); + return ((void *)0); + } + } + else + { + if (ctx->current->type == 9063) + { + type_specifier_delete(p_type_specifier); + return ((void *)0); + } + else + { + if (ctx->current->type == 8996) + { + p_type_specifier->token = ctx->current; + p_type_specifier->flags = 131072; + p_type_specifier->typedef_declarator = find_declarator(ctx, ctx->current->lexeme, ((void *)0)); + ; + parser_match(ctx); + } + } + } + } + } + } + } + else _catch_label_1: + { + type_specifier_delete(p_type_specifier); + p_type_specifier = ((void *)0); + } + return p_type_specifier; +} + +struct enum_specifier *get_complete_enum_specifier(struct enum_specifier * p_enum_specifier) +{ + if (p_enum_specifier->enumerator_list.head) + { + return p_enum_specifier; + } + else + { + if (p_enum_specifier->complete_enum_specifier2 && p_enum_specifier->complete_enum_specifier2->enumerator_list.head) + { + return p_enum_specifier->complete_enum_specifier2; + } + else + { + if (p_enum_specifier->complete_enum_specifier2 && p_enum_specifier->complete_enum_specifier2->complete_enum_specifier2 && p_enum_specifier->complete_enum_specifier2->complete_enum_specifier2->enumerator_list.head) + { + return p_enum_specifier->complete_enum_specifier2->complete_enum_specifier2; + } + } + } + return ((void *)0); +} + +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->member_declaration_list.head) + { + 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) + { + 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) + { + return p_struct_or_union_specifier->complete_struct_or_union_specifier_indirection->complete_struct_or_union_specifier_indirection; + } + } + } + return ((void *)0); +} + +unsigned char 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) != ((void *)0); +} + +struct struct_or_union_specifier *struct_or_union_specifier_add_ref(struct struct_or_union_specifier * p) +{ + p->has_shared_ownership = 1; + return (struct struct_or_union_specifier *)p; +} + +unsigned char struct_or_union_specifier_is_union(struct struct_or_union_specifier * p) +{ + return p->first_token->type == 9038; +} + +void struct_or_union_specifier_sink(struct struct_or_union_specifier * p); +void member_declaration_list_destroy(struct member_declaration_list * p); + +void struct_or_union_specifier_delete(struct struct_or_union_specifier * p) +{ + if (p) + { + if (p->has_shared_ownership > 0) + { + p->has_shared_ownership = 0; + struct_or_union_specifier_sink(p); + return; + } + member_declaration_list_destroy(&p->member_declaration_list); + attribute_specifier_sequence_delete(p->attribute_specifier_sequence_opt); + free(p); + } +} + +int snprintf(char * _Buffer, unsigned int _BufferCount, char * _Format, ...); +void naming_convention_struct_tag(struct parser_ctx * ctx, struct token * token); +struct member_declaration_list member_declaration_list(struct parser_ctx * ctx, struct struct_or_union_specifier *); + +struct struct_or_union_specifier *struct_or_union_specifier(struct parser_ctx * ctx) +{ + struct struct_or_union_specifier * p_struct_or_union_specifier = ((void *)0); + if (1) + { + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + p_struct_or_union_specifier = calloc(1, sizeof *p_struct_or_union_specifier); + if (p_struct_or_union_specifier == ((void *)0)) + { + goto _catch_label_1; + } + if (ctx->current->type == 9033 || ctx->current->type == 9038) + { + p_struct_or_union_specifier->first_token = ctx->current; + parser_match(ctx); + } + else + { + goto _catch_label_1; + } + 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 = ((void *)0); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + if (ctx->current->type == 8996) + { + p_struct_or_union_specifier->tagtoken = ctx->current; + 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) + { + if (p_entry->type == 2) + { + ; + p_first_tag_in_this_scope = p_entry->data.p_struct_or_union_specifier; + p_struct_or_union_specifier->complete_struct_or_union_specifier_indirection = p_first_tag_in_this_scope; + } + else + { + compiler_diagnostic_message(1030, ctx, ctx->current, ((void *)0), "use of '%s' with tag type that does not match previous declaration.", ctx->current->lexeme); + } + } + else + { + 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 == ((void *)0)) + { + p_struct_or_union_specifier->scope_level = ctx->scopes.tail->scope_level; + struct hash_item_set item = {0}; + item.p_struct_or_union_specifier = struct_or_union_specifier_add_ref(p_struct_or_union_specifier); + hashmap_set(&ctx->scopes.tail->tags, ctx->current->lexeme, &item); + hash_item_set_destroy(&item); + } + else + { + p_struct_or_union_specifier->complete_struct_or_union_specifier_indirection = p_first_tag_previous_scopes; + } + } + parser_match(ctx); + } + else + { + snprintf(p_struct_or_union_specifier->tag_name, sizeof p_struct_or_union_specifier->tag_name, "_struct_tag_%d", s_anonymous_struct_count); + s_anonymous_struct_count++; + p_struct_or_union_specifier->has_anonymous_tag = 1; + p_struct_or_union_specifier->scope_level = ctx->scopes.tail->scope_level; + struct hash_item_set item = {0}; + item.p_struct_or_union_specifier = struct_or_union_specifier_add_ref(p_struct_or_union_specifier); + hashmap_set(&ctx->scopes.tail->tags, p_struct_or_union_specifier->tag_name, &item); + hash_item_set_destroy(&item); + } + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + if (ctx->current->type == 123) + { + struct struct_or_union_specifier * first = find_struct_or_union_specifier(ctx, p_struct_or_union_specifier->tag_name); + if (first) + { + 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 (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + struct token * firsttoken = ctx->current; + parser_match(ctx); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + if (ctx->current->type != 125) + { + p_struct_or_union_specifier->member_declaration_list = member_declaration_list(ctx, p_struct_or_union_specifier); + if (p_struct_or_union_specifier->member_declaration_list.head == ((void *)0)) + { + goto _catch_label_1; + } + } + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + 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; + if (parser_match_tk(ctx, 125) != 0) + { + goto _catch_label_1; + } + } + 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); + if (p_complete) + { + if (p_complete->attribute_specifier_sequence_opt && p_complete->attribute_specifier_sequence_opt->attributes_flags & 1) + { + if (p_struct_or_union_specifier->tagtoken) + { + compiler_diagnostic_message(2, ctx, p_struct_or_union_specifier->first_token, ((void *)0), "'%s' is deprecated", p_struct_or_union_specifier->tagtoken->lexeme); + } + else + { + compiler_diagnostic_message(2, ctx, p_struct_or_union_specifier->first_token, ((void *)0), "deprecated"); + } + } + } + } + else _catch_label_1: + { + struct_or_union_specifier_delete(p_struct_or_union_specifier); + p_struct_or_union_specifier = ((void *)0); + } + return p_struct_or_union_specifier; +} + +unsigned char type_is_owner(struct type * p_type); +void naming_convention_struct_member(struct parser_ctx * ctx, struct token * token, struct type * type); +struct expression *constant_expression(struct parser_ctx * ctx, unsigned char show_error_if_not_constant); +void member_declarator_delete(struct member_declarator * p); + +struct member_declarator *member_declarator(struct parser_ctx * ctx, struct struct_or_union_specifier * p_struct_or_union_specifier, struct specifier_qualifier_list * p_specifier_qualifier_list) +{ + struct member_declarator * p_member_declarator = ((void *)0); + if (1) + { + p_member_declarator = calloc(1, sizeof (struct member_declarator)); + if (p_member_declarator == ((void *)0)) + { + goto _catch_label_1; + } + struct token * p_token_name = ((void *)0); + p_member_declarator->declarator = declarator(ctx, p_specifier_qualifier_list, ((void *)0), 0, &p_token_name); + if (p_member_declarator->declarator == ((void *)0)) + { + goto _catch_label_1; + } + p_member_declarator->declarator->name_opt = 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); + if (type_is_owner(&p_member_declarator->declarator->type)) + { + p_struct_or_union_specifier->is_owner = 1; + } + if (p_member_declarator->declarator->name_opt) + { + naming_convention_struct_member(ctx, p_member_declarator->declarator->name_opt, &p_member_declarator->declarator->type); + } + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + if (ctx->current->type == 58) + { + parser_match(ctx); + p_member_declarator->constant_expression = constant_expression(ctx, 1); + } + } + else _catch_label_1: + { + member_declarator_delete(p_member_declarator); + p_member_declarator = ((void *)0); + } + return p_member_declarator; +} + +void member_declarator_delete(struct member_declarator * p) +{ + if (p) + { + expression_delete(p->constant_expression); + ; + declarator_delete(p->declarator); + free(p); + } +} + +void member_declarator_list_add(struct member_declarator_list * list, struct member_declarator * p_item) +{ + if (list->head == ((void *)0)) + { + list->head = p_item; + } + else + { + ; + ; + list->tail->next = p_item; + } + list->tail = p_item; +} + +void member_declarator_list_delete(struct member_declarator_list * p) +{ + if (p) + { + struct member_declarator * item = p->head; + while (item) + { + struct member_declarator * next = item->next; + item->next = ((void *)0); + member_declarator_delete(item); + item = next; + } + free(p); + } +} + +struct member_declarator_list *member_declarator_list(struct parser_ctx * ctx, struct struct_or_union_specifier * p_struct_or_union_specifier, struct specifier_qualifier_list * p_specifier_qualifier_list) +{ + struct member_declarator_list * p_member_declarator_list = calloc(1, sizeof (struct member_declarator_list)); + if (1) + { + if (p_member_declarator_list == ((void *)0)) + { + goto _catch_label_1; + } + struct member_declarator * p_member_declarator = member_declarator(ctx, p_struct_or_union_specifier, p_specifier_qualifier_list); + if (p_member_declarator == ((void *)0)) + { + goto _catch_label_1; + } + member_declarator_list_add(p_member_declarator_list, p_member_declarator); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + while (ctx->current->type == 44) + { + parser_match(ctx); + struct member_declarator * p_member_declarator2 = member_declarator(ctx, p_struct_or_union_specifier, p_specifier_qualifier_list); + if (p_member_declarator2 == ((void *)0)) + { + goto _catch_label_1; + } + member_declarator_list_add(p_member_declarator_list, p_member_declarator2); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + } + } + else _catch_label_1: + { + member_declarator_list_delete(p_member_declarator_list); + p_member_declarator_list = ((void *)0); + } + return p_member_declarator_list; +} + +void member_declaration_list_add(struct member_declaration_list * list, struct member_declaration * p_item) +{ + if (list->head == ((void *)0)) + { + list->head = p_item; + } + else + { + ; + ; + list->tail->next = p_item; + } + list->tail = p_item; +} + +void member_declaration_delete(struct member_declaration * p); + +void member_declaration_list_destroy(struct member_declaration_list * p) +{ + struct member_declaration * item = p->head; + while (item) + { + struct member_declaration * next = item->next; + item->next = ((void *)0); + member_declaration_delete(item); + item = next; + } +} + +struct member_declaration *member_declaration(struct parser_ctx * ctx, struct 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}; + struct member_declaration * p_member_declaration = ((void *)0); + if (1) + { + p_member_declaration = member_declaration(ctx, p_struct_or_union_specifier); + if (p_member_declaration == ((void *)0)) + { + goto _catch_label_1; + } + member_declaration_list_add(&list, p_member_declaration); + p_member_declaration = ((void *)0); + while (ctx->current && ctx->current->type != 125) + { + p_member_declaration = member_declaration(ctx, p_struct_or_union_specifier); + if (p_member_declaration == ((void *)0)) + { + goto _catch_label_1; + } + member_declaration_list_add(&list, p_member_declaration); + p_member_declaration = ((void *)0); + } + } + else _catch_label_1: + { + member_declaration_list_destroy(&list); + struct member_declaration_list __cmp_lt_0 = {0, 0, 0, 0}; + list = __cmp_lt_0; + } + return list; +} + +void specifier_qualifier_list_delete(struct specifier_qualifier_list * p); +void static_assert_declaration_delete(struct static_assert_declaration * p); +void pragma_declaration_delete(struct pragma_declaration * p); + +void member_declaration_delete(struct member_declaration * p) +{ + if (p) + { + ; + 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); + pragma_declaration_delete(p->pragma_declaration); + free(p); + } +} + +struct specifier_qualifier_list *specifier_qualifier_list(struct parser_ctx * ctx); + +struct member_declaration *member_declaration(struct parser_ctx * ctx, struct struct_or_union_specifier * p_struct_or_union_specifier) +{ + struct member_declaration * p_member_declaration = ((void *)0); + if (1) + { + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + p_member_declaration = calloc(1, sizeof (struct member_declaration)); + if (p_member_declaration == ((void *)0)) + { + goto _catch_label_1; + } + if (ctx->current->type == 9055) + { + p_member_declaration->static_assert_declaration = static_assert_declaration(ctx); + } + else + { + if (ctx->current->type == 128) + { + p_member_declaration->pragma_declaration = pragma_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 (p_member_declaration->specifier_qualifier_list == ((void *)0)) + { + goto _catch_label_1; + } + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + if (ctx->current->type != 59) + { + p_member_declaration->member_declarator_list_opt = member_declarator_list(ctx, p_struct_or_union_specifier, p_member_declaration->specifier_qualifier_list); + if (p_member_declaration->member_declarator_list_opt == ((void *)0)) + { + goto _catch_label_1; + } + } + if (parser_match_tk(ctx, 59) != 0) + { + goto _catch_label_1; + } + } + } + } + else _catch_label_1: + { + member_declaration_delete(p_member_declaration); + p_member_declaration = ((void *)0); + } + return p_member_declaration; +} + +struct member_declarator *find_member_declarator(struct member_declaration_list * list, char * name, int * p_member_index) +{ + if (list->head == ((void *)0)) + { + return ((void *)0); + } + struct member_declaration * p_member_declaration = list->head; + while (p_member_declaration) + { + struct member_declarator * p_member_declarator = ((void *)0); + if (p_member_declaration->member_declarator_list_opt) + { + p_member_declarator = p_member_declaration->member_declarator_list_opt->head; + while (p_member_declarator) + { + if (p_member_declarator->declarator) + { + if (p_member_declarator->declarator->name_opt && strcmp(p_member_declarator->declarator->name_opt->lexeme, name) == 0) + { + return p_member_declarator; + } + } + ( *p_member_index)++; + p_member_declarator = p_member_declarator->next; + } + } + else + { + if (p_member_declaration->specifier_qualifier_list && p_member_declaration->specifier_qualifier_list->struct_or_union_specifier) + { + struct struct_or_union_specifier * p_complete = get_complete_struct_or_union_specifier(p_member_declaration->specifier_qualifier_list->struct_or_union_specifier); + if (p_complete) + { + p_member_declarator = find_member_declarator(&p_complete->member_declaration_list, name, p_member_index); + if (p_member_declarator) + { + return p_member_declarator; + } + } + } + } + p_member_declaration = p_member_declaration->next; + } + return ((void *)0); +} + +static struct member_declarator *find_member_declarator_by_index_core(struct member_declaration_list * list, int member_index, int * p_count) +{ + if (list->head == ((void *)0)) + { + return ((void *)0); + } + struct member_declaration * p_member_declaration = list->head; + while (p_member_declaration) + { + struct member_declarator * p_member_declarator = ((void *)0); + if (p_member_declaration->member_declarator_list_opt) + { + p_member_declarator = p_member_declaration->member_declarator_list_opt->head; + while (p_member_declarator) + { + if (p_member_declarator->declarator) + { + if (member_index == *p_count) + { + return p_member_declarator; + } + } + ( *p_count)++; + p_member_declarator = p_member_declarator->next; + } + } + else + { + if (p_member_declaration->specifier_qualifier_list && 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; + p_member_declarator = find_member_declarator_by_index_core(p_member_declaration_list, member_index, p_count); + if (p_member_declarator) + { + return p_member_declarator; + } + } + } + p_member_declaration = p_member_declaration->next; + } + return ((void *)0); +} + +struct member_declarator *find_member_declarator_by_index(struct member_declaration_list * list, int member_index) +{ + int count = 0; + return find_member_declarator_by_index_core(list, member_index, &count); +} + +void print_specifier_qualifier_list(struct osstream * ss, unsigned char * first, struct specifier_qualifier_list * p_specifier_qualifier_list) +{ + print_type_qualifier_flags(ss, first, p_specifier_qualifier_list->type_qualifier_flags); + if (p_specifier_qualifier_list->enum_specifier) + { + ; + } + 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) + { + if (p_specifier_qualifier_list->typedef_declarator->name_opt) + { + print_item(ss, first, p_specifier_qualifier_list->typedef_declarator->name_opt->lexeme); + } + } + else + { + print_type_specifier_flags(ss, first, p_specifier_qualifier_list->type_specifier_flags); + } + } + } +} + +void specifier_qualifier_list_add(struct specifier_qualifier_list * list, struct type_specifier_qualifier * p_item) +{ + if (list->head == ((void *)0)) + { + list->head = p_item; + } + else + { + ; + ; + list->tail->next = p_item; + } + list->tail = p_item; +} + +void specifier_qualifier_list_delete(struct specifier_qualifier_list * p) +{ + if (p) + { + struct type_specifier_qualifier * item = p->head; + while (item) + { + struct type_specifier_qualifier * next = item->next; + item->next = ((void *)0); + type_specifier_qualifier_delete(item); + item = next; + } + attribute_specifier_sequence_delete(p->p_attribute_specifier_sequence); + free(p); + } +} + +struct specifier_qualifier_list *specifier_qualifier_list(struct parser_ctx * ctx) +{ + struct specifier_qualifier_list * p_specifier_qualifier_list = ((void *)0); + if (1) + { + if ( !first_of_type_specifier(ctx) && !first_of_type_qualifier(ctx)) + { + compiler_diagnostic_message(1040, ctx, ctx->current, ((void *)0), "type specifier or qualifier expected"); + goto _catch_label_1; + } + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + p_specifier_qualifier_list = calloc(1, sizeof (struct specifier_qualifier_list)); + if (p_specifier_qualifier_list == ((void *)0)) + { + goto _catch_label_1; + } + p_specifier_qualifier_list->first_token = ctx->current; + while (ctx->current != ((void *)0) && (first_of_type_specifier(ctx) || first_of_type_qualifier(ctx))) + { + if (ctx->current->flags & 16) + { + if (p_specifier_qualifier_list->type_specifier_flags != 0) + { + break; + } + } + struct type_specifier_qualifier * p_type_specifier_qualifier = type_specifier_qualifier(ctx); + if (p_type_specifier_qualifier == ((void *)0)) + { + goto _catch_label_1; + } + 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); + goto _catch_label_1; + } + 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 == 8996) + { + p_specifier_qualifier_list->typedef_declarator = find_declarator(ctx, p_type_specifier_qualifier->type_specifier->token->lexeme, ((void *)0)); + } + } + } + } + } + else + { + if (p_type_specifier_qualifier->type_qualifier) + { + p_specifier_qualifier_list->type_qualifier_flags = p_type_specifier_qualifier->type_qualifier->flags; + } + } + ; + p_specifier_qualifier_list->p_attribute_specifier_sequence = attribute_specifier_sequence_opt(ctx); + specifier_qualifier_list_add(p_specifier_qualifier_list, p_type_specifier_qualifier); + } + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + final_specifier(ctx, &p_specifier_qualifier_list->type_specifier_flags); + struct token * p_previous_parser_token = previous_parser_token(ctx->current); + if (p_previous_parser_token == ((void *)0)) + { + goto _catch_label_1; + } + p_specifier_qualifier_list->last_token = p_previous_parser_token; + } + else _catch_label_1: + { + specifier_qualifier_list_delete(p_specifier_qualifier_list); + p_specifier_qualifier_list = ((void *)0); + } + return p_specifier_qualifier_list; +} + +void type_qualifier_delete(struct type_qualifier * p) +{ + if (p) + { + ; + free(p); + } +} + +void alignment_specifier_delete(struct alignment_specifier * p); + +void type_specifier_qualifier_delete(struct type_specifier_qualifier * p) +{ + if (p) + { + ; + if (p->type_qualifier) + { + ; + free(p->type_qualifier); + } + alignment_specifier_delete(p->alignment_specifier); + type_specifier_delete(p->type_specifier); + free(p); + } +} + +struct type_qualifier *type_qualifier(struct parser_ctx * ctx); +struct alignment_specifier *alignment_specifier(struct parser_ctx * ctx); + +struct type_specifier_qualifier *type_specifier_qualifier(struct parser_ctx * ctx) +{ + struct type_specifier_qualifier * type_specifier_qualifier = ((void *)0); + if (1) + { + type_specifier_qualifier = calloc(1, sizeof *type_specifier_qualifier); + if (type_specifier_qualifier == ((void *)0)) + { + goto _catch_label_1; + } + if (first_of_type_specifier(ctx)) + { + type_specifier_qualifier->type_specifier = type_specifier(ctx); + if (type_specifier_qualifier->type_specifier == ((void *)0)) + { + goto _catch_label_1; + } + } + else + { + if (first_of_type_qualifier(ctx)) + { + type_specifier_qualifier->type_qualifier = type_qualifier(ctx); + if (type_specifier_qualifier->type_qualifier == ((void *)0)) + { + goto _catch_label_1; + } + } + else + { + if (first_of_alignment_specifier(ctx)) + { + type_specifier_qualifier->alignment_specifier = alignment_specifier(ctx); + if (type_specifier_qualifier->alignment_specifier == ((void *)0)) + { + goto _catch_label_1; + } + } + else + { + ; + } + } + } + } + else _catch_label_1: + { + type_specifier_qualifier_delete(type_specifier_qualifier); + type_specifier_qualifier = ((void *)0); + } + return type_specifier_qualifier; +} + +signed long long object_to_signed_long_long(struct object * a); + +struct enumerator *find_enumerator_by_value(struct enum_specifier * p_enum_specifier, long long value) +{ + if (p_enum_specifier->enumerator_list.head == ((void *)0)) + { + return ((void *)0); + } + struct enumerator * p = p_enum_specifier->enumerator_list.head; + while (p) + { + if (object_to_signed_long_long(&p->value) == value) + { + return p; + } + p = p->next; + } + return ((void *)0); +} + +struct enum_specifier *enum_specifier_add_ref(struct enum_specifier * p) +{ + p->has_shared_ownership = 1; + return (struct enum_specifier *)p; +} + +void enum_specifier_delete_sink(struct enum_specifier * p); +void enumerator_list_destroy(struct enumerator_list * p_enum_specifier); + +void enum_specifier_delete(struct enum_specifier * p) +{ + if (p) + { + if (p->has_shared_ownership > 0) + { + p->has_shared_ownership = 0; + enum_specifier_delete_sink(p); + return; + } + 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); + } +} + +void naming_convention_enum_tag(struct parser_ctx * ctx, struct token * token); +struct enumerator_list enumerator_list(struct parser_ctx * ctx, struct enum_specifier * p_enum_specifier); + +struct enum_specifier *enum_specifier(struct parser_ctx * ctx) +{ + struct enum_specifier * p_enum_specifier = ((void *)0); + if (1) + { + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + p_enum_specifier = calloc(1, sizeof *p_enum_specifier); + if (p_enum_specifier == ((void *)0)) + { + goto _catch_label_1; + } + p_enum_specifier->first_token = ctx->current; + if (parser_match_tk(ctx, 9012) != 0) + { + goto _catch_label_1; + } + p_enum_specifier->attribute_specifier_sequence_opt = attribute_specifier_sequence_opt(ctx); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + if (ctx->current->type == 8996) + { + snprintf(p_enum_specifier->tag_name, sizeof p_enum_specifier->tag_name, "%s", ctx->current->lexeme); + p_enum_specifier->tag_token = ctx->current; + parser_match(ctx); + } + else + { + snprintf(p_enum_specifier->tag_name, sizeof p_enum_specifier->tag_name, "_anonymous_struct_%d", s_anonymous_struct_count); + s_anonymous_struct_count++; + } + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + if (ctx->current->type == 58) + { + if ( !ctx->inside_generic_association) + { + parser_match(ctx); + p_enum_specifier->specifier_qualifier_list = specifier_qualifier_list(ctx); + } + else + { + } + } + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + if (ctx->current->type == 123) + { + if (p_enum_specifier->tag_token) + { + naming_convention_enum_tag(ctx, p_enum_specifier->tag_token); + } + p_enum_specifier->complete_enum_specifier2 = p_enum_specifier; + if (parser_match_tk(ctx, 123) != 0) + { + goto _catch_label_1; + } + p_enum_specifier->enumerator_list = enumerator_list(ctx, p_enum_specifier); + if (p_enum_specifier->enumerator_list.head == ((void *)0)) + { + goto _catch_label_1; + } + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + if (ctx->current->type == 44) + { + parser_match(ctx); + } + if (parser_match_tk(ctx, 125) != 0) + { + goto _catch_label_1; + } + struct hash_item_set item = {0}; + item.p_enum_specifier = enum_specifier_add_ref(p_enum_specifier); + hashmap_set(&ctx->scopes.tail->tags, p_enum_specifier->tag_name, &item); + p_enum_specifier->complete_enum_specifier2 = p_enum_specifier; + hash_item_set_destroy(&item); + } + else + { + struct enum_specifier * p_existing_enum_specifier = find_enum_specifier(ctx, p_enum_specifier->tag_token->lexeme); + if (p_existing_enum_specifier) + { + p_enum_specifier->complete_enum_specifier2 = p_existing_enum_specifier; + } + else + { + struct hash_item_set item = {0}; + item.p_enum_specifier = enum_specifier_add_ref(p_enum_specifier); + hashmap_set(&ctx->scopes.tail->tags, p_enum_specifier->tag_name, &item); + p_enum_specifier->complete_enum_specifier2 = p_enum_specifier; + hash_item_set_destroy(&item); + } + } + } + else _catch_label_1: + { + enum_specifier_delete(p_enum_specifier); + p_enum_specifier = ((void *)0); + } + return p_enum_specifier; +} + +void enumerator_list_add(struct enumerator_list * list, struct enumerator * p_item) +{ + if (list->head == ((void *)0)) + { + list->head = p_item; + } + else + { + ; + ; + list->tail->next = p_item; + } + list->tail = p_item; +} + +void enumerator_delete(struct enumerator * p); + +void enumerator_list_destroy(struct enumerator_list * p) +{ + struct enumerator * item = p->head; + while (item) + { + struct enumerator * next = item->next; + item->next = ((void *)0); + enumerator_delete(item); + item = next; + } +} + +struct object object_make_signed_int(signed int value); +int type_specifier_to_object_type(int type_specifier_flags); +struct object object_cast(int e, struct object * a); +struct enumerator *enumerator(struct parser_ctx * ctx, struct enum_specifier * p_enum_specifier, struct object * p_enumerator_value); + +struct enumerator_list enumerator_list(struct parser_ctx * ctx, struct enum_specifier * p_enum_specifier) +{ + struct object next_enumerator_value = object_make_signed_int(0); + if (p_enum_specifier->specifier_qualifier_list) + { + int vt = type_specifier_to_object_type(p_enum_specifier->specifier_qualifier_list->type_specifier_flags); + next_enumerator_value = object_cast(vt, &next_enumerator_value); + } + struct enumerator_list enumeratorlist = {0}; + struct enumerator * p_enumerator = ((void *)0); + if (1) + { + p_enumerator = enumerator(ctx, p_enum_specifier, &next_enumerator_value); + if (p_enumerator == ((void *)0)) + { + goto _catch_label_1; + } + enumerator_list_add(&enumeratorlist, p_enumerator); + while (ctx->current != ((void *)0) && ctx->current->type == 44) + { + parser_match(ctx); + if (ctx->current && ctx->current->type != 125) + { + p_enumerator = enumerator(ctx, p_enum_specifier, &next_enumerator_value); + if (p_enumerator == ((void *)0)) + { + goto _catch_label_1; + } + enumerator_list_add(&enumeratorlist, p_enumerator); + } + } + } + else _catch_label_1: + { + enumerator_list_destroy(&enumeratorlist); + enumeratorlist.head = ((void *)0); + enumeratorlist.tail = ((void *)0); + } + return enumeratorlist; +} + +struct enumerator *enumerator_add_ref(struct enumerator * p) +{ + p->has_shared_ownership = 1; + return (struct enumerator *)p; +} + +void enumerator_sink(struct enumerator * p); + +void enumerator_delete(struct enumerator * p) +{ + if (p) + { + if (p->has_shared_ownership > 0) + { + p->has_shared_ownership = 0; + enumerator_sink(p); + return; + } + ; + attribute_specifier_sequence_delete(p->attribute_specifier_sequence_opt); + expression_delete(p->constant_expression_opt); + free(p); + } +} + +void naming_convention_enumerator(struct parser_ctx * ctx, struct token * token); +int object_increment_value(struct object * a); + +struct enumerator *enumerator(struct parser_ctx * ctx, struct enum_specifier * p_enum_specifier, struct object * p_next_enumerator_value) +{ + struct enumerator * p_enumerator = ((void *)0); + if (1) + { + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + p_enumerator = calloc(1, sizeof (struct enumerator)); + if (p_enumerator == ((void *)0)) + { + goto _catch_label_1; + } + p_enumerator->enum_specifier = p_enum_specifier; + struct token * name = ctx->current; + naming_convention_enumerator(ctx, name); + if (parser_match_tk(ctx, 8996) != 0) + { + goto _catch_label_1; + } + p_enumerator->attribute_specifier_sequence_opt = attribute_specifier_sequence_opt(ctx); + p_enumerator->token = name; + struct hash_item_set item = {0}; + item.p_enumerator = enumerator_add_ref(p_enumerator); + hashmap_set(&ctx->scopes.tail->variables, p_enumerator->token->lexeme, &item); + hash_item_set_destroy(&item); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + if (ctx->current->type == 61) + { + parser_match(ctx); + ; + p_enumerator->constant_expression_opt = constant_expression(ctx, 1); + if (p_enumerator->constant_expression_opt == ((void *)0)) + { + goto _catch_label_1; + } + p_enumerator->value = p_enumerator->constant_expression_opt->object; + *p_next_enumerator_value = p_enumerator->value; + if (object_increment_value(p_next_enumerator_value) != 0) + { + } + } + else + { + p_enumerator->value = *p_next_enumerator_value; + if (object_increment_value(p_next_enumerator_value) != 0) + { + } + } + } + else _catch_label_1: + { + enumerator_delete(p_enumerator); + p_enumerator = ((void *)0); + } + return p_enumerator; +} + +void alignment_specifier_delete(struct alignment_specifier * p) +{ + if (p) + { + expression_delete(p->constant_expression); + type_name_delete(p->type_name); + free(p); + } +} + +struct alignment_specifier *alignment_specifier(struct parser_ctx * ctx) +{ + struct alignment_specifier * alignment_specifier = ((void *)0); + if (1) + { + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + alignment_specifier = calloc(1, sizeof *alignment_specifier); + if (alignment_specifier == ((void *)0)) + { + goto _catch_label_1; + } + alignment_specifier->token = ctx->current; + if (parser_match_tk(ctx, 9043) != 0) + { + goto _catch_label_1; + } + if (parser_match_tk(ctx, 40) != 0) + { + goto _catch_label_1; + } + if (first_of_type_name(ctx)) + { + alignment_specifier->type_name = type_name(ctx); + if (alignment_specifier->type_name == ((void *)0)) + { + goto _catch_label_1; + } + } + else + { + alignment_specifier->constant_expression = constant_expression(ctx, 1); + if (alignment_specifier->constant_expression == ((void *)0)) + { + goto _catch_label_1; + } + } + if (parser_match_tk(ctx, 41) != 0) + { + goto _catch_label_1; + } + } + else _catch_label_1: + { + } + return alignment_specifier; +} + +void atomic_type_specifier_delete(struct atomic_type_specifier * p) +{ + if (p) + { + type_name_delete(p->type_name); + free(p); + } +} + +struct atomic_type_specifier *atomic_type_specifier(struct parser_ctx * ctx) +{ + struct atomic_type_specifier * p_atomic_type_specifier = ((void *)0); + if (1) + { + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + p_atomic_type_specifier = calloc(1, sizeof *p_atomic_type_specifier); + if (p_atomic_type_specifier == ((void *)0)) + { + goto _catch_label_1; + } + p_atomic_type_specifier->token = ctx->current; + if (parser_match_tk(ctx, 9045) != 0) + { + goto _catch_label_1; + } + if (parser_match_tk(ctx, 40) != 0) + { + goto _catch_label_1; + } + struct type_name * ptemp = type_name(ctx); + if (ptemp == ((void *)0)) + { + goto _catch_label_1; + } + p_atomic_type_specifier->type_name = ptemp; + if (parser_match_tk(ctx, 41) != 0) + { + goto _catch_label_1; + } + } + else _catch_label_1: + { + atomic_type_specifier_delete(p_atomic_type_specifier); + p_atomic_type_specifier = ((void *)0); + } + return p_atomic_type_specifier; +} + +struct type_qualifier *type_qualifier(struct parser_ctx * ctx) +{ + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + return ((void *)0); + } + struct type_qualifier * p_type_qualifier = calloc(1, sizeof *p_type_qualifier); + if (p_type_qualifier == ((void *)0)) + { + return ((void *)0); + } + switch (ctx->current->type) + { + case 9004 : + p_type_qualifier->flags = 1; + break; + case 9026 : + p_type_qualifier->flags = 2; + break; + case 9041 : + p_type_qualifier->flags = 4; + break; + case 9045 : + p_type_qualifier->flags = 8; + break; + default: + break; + } + if (ctx->options.ownership_enabled) + { + switch (ctx->current->type) + { + case 9065 : + p_type_qualifier->flags = 512; + break; + case 9064 : + p_type_qualifier->flags = 16; + break; + case 9066 : + p_type_qualifier->flags = 32; + break; + case 9067 : + p_type_qualifier->flags = 64; + break; + default: + break; + } + } + if (ctx->options.null_checks_enabled) + { + switch (ctx->current->type) + { + case 9068 : + p_type_qualifier->flags = 128; + break; + default: + break; + } + } + p_type_qualifier->token = ctx->current; + parser_match(ctx); + return p_type_qualifier; +} + +struct type_qualifier *type_qualifier_opt(struct parser_ctx * ctx) +{ + if (first_of_type_qualifier(ctx)) + { + return type_qualifier(ctx); + } + return ((void *)0); +} + +void function_specifier_delete(struct function_specifier * p) +{ + if (p) + { + free(p); + } +} + +struct function_specifier *function_specifier(struct parser_ctx * ctx) +{ + struct function_specifier * p_function_specifier = ((void *)0); + if (1) + { + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + p_function_specifier = calloc(1, sizeof *p_function_specifier); + if (p_function_specifier == ((void *)0)) + { + goto _catch_label_1; + } + if (ctx->current->type == 9054) + { + compiler_diagnostic_message(10, ctx, ctx->current, ((void *)0), "_Noreturn is deprecated use attributes"); + } + if (ctx->current->type == 9018) + { + p_function_specifier->flags = 1; + } + p_function_specifier->token = ctx->current; + parser_match(ctx); + } + else _catch_label_1: + { + function_specifier_delete(p_function_specifier); + p_function_specifier = ((void *)0); + } + return p_function_specifier; +} + +struct declarator *declarator_add_ref(struct declarator * p) +{ + p->has_shared_ownership = 1; + return (struct declarator *)p; +} + +void declarator_sink(struct declarator * p); +void direct_declarator_delete(struct direct_declarator * p); +void pointer_delete(struct pointer * p); + +void declarator_delete(struct declarator * p) +{ + if (p) + { + if (p->has_shared_ownership > 0) + { + p->has_shared_ownership = 0; + declarator_sink(p); + return; + } + type_destroy(&p->type); + direct_declarator_delete(p->direct_declarator); + pointer_delete(p->pointer); + free(p); + } +} + +struct pointer *pointer_opt(struct parser_ctx * ctx); +struct direct_declarator *direct_declarator(struct parser_ctx * ctx, struct specifier_qualifier_list * specifier_qualifier_list, struct declaration_specifiers * declaration_specifiers, unsigned char abstract_acceptable, struct token ** pptoken_name); + +struct declarator *declarator(struct parser_ctx * ctx, struct specifier_qualifier_list * p_specifier_qualifier_list_opt, struct declaration_specifiers * p_declaration_specifiers_opt, unsigned char abstract_acceptable, struct token ** pp_token_name_opt) +{ + struct declarator * p_declarator = ((void *)0); + if (1) + { + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + p_declarator = calloc(1, sizeof (struct declarator)); + if (p_declarator == ((void *)0)) + { + goto _catch_label_1; + } + p_declarator->first_token_opt = ctx->current; + p_declarator->pointer = pointer_opt(ctx); + p_declarator->direct_declarator = direct_declarator(ctx, p_specifier_qualifier_list_opt, p_declaration_specifiers_opt, abstract_acceptable, pp_token_name_opt); + if (p_declarator->direct_declarator == ((void *)0)) + { + goto _catch_label_1; + } + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + if (ctx->current != p_declarator->first_token_opt) + { + p_declarator->last_token_opt = previous_parser_token(ctx->current); + } + else + { + p_declarator->last_token_opt = p_declarator->first_token_opt; + p_declarator->first_token_opt = ((void *)0); + } + } + else _catch_label_1: + { + declarator_delete(p_declarator); + p_declarator = ((void *)0); + } + return p_declarator; +} + +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; + } + } + return ((void *)0); +} + +unsigned char declarator_is_function(struct declarator * p_declarator) +{ + return (p_declarator->direct_declarator && p_declarator->direct_declarator->function_declarator != ((void *)0)); +} + +void parameter_type_list_delete(struct parameter_type_list * p); + +void function_declarator_delete(struct function_declarator * 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 array_declarator_delete(struct array_declarator * p); + +void direct_declarator_delete(struct direct_declarator * 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); + free(p); + } +} + +struct array_declarator *array_declarator(struct direct_declarator * p_direct_declarator, struct parser_ctx * ctx); +struct function_declarator *function_declarator(struct direct_declarator * p_direct_declarator, struct parser_ctx * ctx); + +struct direct_declarator *direct_declarator(struct parser_ctx * ctx, struct specifier_qualifier_list * p_specifier_qualifier_list, struct declaration_specifiers * p_declaration_specifiers, unsigned char abstract_acceptable, struct token ** pp_token_name_opt) +{ + struct direct_declarator * p_direct_declarator = ((void *)0); + if (1) + { + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + p_direct_declarator = calloc(1, sizeof (struct direct_declarator)); + if (p_direct_declarator == ((void *)0)) + { + goto _catch_label_1; + } + struct token * p_token_ahead = parser_look_ahead(ctx); + if (p_token_ahead == ((void *)0)) + { + goto _catch_label_1; + } + if (ctx->current->type == 8996) + { + p_direct_declarator->name_opt = ctx->current; + if (pp_token_name_opt != ((void *)0)) + { + *pp_token_name_opt = ctx->current; + } + parser_match(ctx); + p_direct_declarator->p_attribute_specifier_sequence_opt = attribute_specifier_sequence_opt(ctx); + } + else + { + if (ctx->current->type == 40) + { + struct token * ahead = parser_look_ahead(ctx); + if (ahead == ((void *)0)) + { + goto _catch_label_1; + } + if ( !first_of_type_specifier_token(ctx, p_token_ahead) && !first_of_type_qualifier_token(p_token_ahead) && ahead->type != 41 && ahead->type != 11822) + { + parser_match(ctx); + struct declarator * p_declarator_temp = declarator(ctx, p_specifier_qualifier_list, p_declaration_specifiers, abstract_acceptable, pp_token_name_opt); + if (p_declarator_temp == ((void *)0)) + { + goto _catch_label_1; + } + p_direct_declarator->declarator = p_declarator_temp; + parser_match(ctx); + } + } + } + while (ctx->current != ((void *)0) && (ctx->current->type == 91 || ctx->current->type == 40)) + { + struct direct_declarator * p_direct_declarator2 = calloc(1, sizeof (struct direct_declarator)); + if (p_direct_declarator2 == ((void *)0)) + { + goto _catch_label_1; + } + if (ctx->current->type == 91) + { + p_direct_declarator2->array_declarator = array_declarator(p_direct_declarator, ctx); + p_direct_declarator = ((void *)0); + if (p_direct_declarator2->array_declarator == ((void *)0)) + { + direct_declarator_delete(p_direct_declarator2); + goto _catch_label_1; + } + } + else + { + p_direct_declarator2->function_declarator = function_declarator(p_direct_declarator, ctx); + p_direct_declarator = ((void *)0); + if (p_direct_declarator2->function_declarator == ((void *)0)) + { + direct_declarator_delete(p_direct_declarator2); + goto _catch_label_1; + } + } + p_direct_declarator = p_direct_declarator2; + } + } + else _catch_label_1: + { + direct_declarator_delete(p_direct_declarator); + p_direct_declarator = ((void *)0); + } + return p_direct_declarator; +} + +void type_qualifier_list_delete(struct type_qualifier_list * p); + +void array_declarator_delete(struct array_declarator * 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); + free(p); + } +} + +unsigned char object_has_constant_value(struct object * a); +unsigned long long object_to_unsigned_long_long(struct object * a); + +unsigned long long array_declarator_get_size(struct array_declarator * p_array_declarator) +{ + if (p_array_declarator->assignment_expression) + { + if (object_has_constant_value(&p_array_declarator->assignment_expression->object)) + { + return object_to_unsigned_long_long(&p_array_declarator->assignment_expression->object); + } + } + return 0; +} + +struct type_qualifier_list *type_qualifier_list(struct parser_ctx * ctx); +struct expression *assignment_expression(struct parser_ctx * ctx); + +struct array_declarator *array_declarator(struct direct_declarator * p_direct_declarator, struct parser_ctx * ctx) +{ + struct array_declarator * p_array_declarator = ((void *)0); + if (1) + { + p_array_declarator = calloc(1, sizeof *p_array_declarator); + if (p_array_declarator == ((void *)0)) + { + goto _catch_label_1; + } + p_array_declarator->direct_declarator = p_direct_declarator; + p_direct_declarator = ((void *)0); + if (parser_match_tk(ctx, 91) != 0) + { + goto _catch_label_1; + } + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + unsigned char has_static = 0; + if (ctx->current->type == 9032) + { + p_array_declarator->static_token_opt = ctx->current; + parser_match(ctx); + has_static = 1; + } + if (first_of_type_qualifier(ctx)) + { + p_array_declarator->type_qualifier_list_opt = type_qualifier_list(ctx); + } + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + if ( !has_static) + { + if (ctx->current->type == 9032) + { + parser_match(ctx); + has_static = 1; + } + } + if (has_static) + { + unsigned char evaluation_is_disabled = ctx->evaluation_is_disabled; + ctx->evaluation_is_disabled = 0; + p_array_declarator->assignment_expression = assignment_expression(ctx); + ctx->evaluation_is_disabled = evaluation_is_disabled; + if (p_array_declarator->assignment_expression == ((void *)0)) + { + goto _catch_label_1; + } + } + else + { + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + if (ctx->current->type == 42) + { + parser_match(ctx); + } + else + { + if (ctx->current->type != 93) + { + unsigned char evaluation_is_disabled = ctx->evaluation_is_disabled; + ctx->evaluation_is_disabled = 0; + p_array_declarator->assignment_expression = assignment_expression(ctx); + ctx->evaluation_is_disabled = evaluation_is_disabled; + if (p_array_declarator->assignment_expression == ((void *)0)) + { + goto _catch_label_1; + } + } + else + { + } + } + } + if (parser_match_tk(ctx, 93) != 0) + { + goto _catch_label_1; + } + } + else _catch_label_1: + { + array_declarator_delete(p_array_declarator); + p_array_declarator = ((void *)0); + } + direct_declarator_delete(p_direct_declarator); + return p_array_declarator; +} + +struct parameter_type_list *parameter_type_list(struct parser_ctx * ctx); + +struct function_declarator *function_declarator(struct direct_declarator * p_direct_declarator_arg, struct parser_ctx * ctx) +{ + struct direct_declarator * p_direct_declarator = p_direct_declarator_arg; + struct function_declarator * p_function_declarator = calloc(1, sizeof (struct function_declarator)); + if (1) + { + if (p_function_declarator == ((void *)0)) + { + goto _catch_label_1; + } + p_function_declarator->direct_declarator = p_direct_declarator; + p_direct_declarator = ((void *)0); + 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; + if (parser_match_tk(ctx, 40) != 0) + { + goto _catch_label_1; + } + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + if (ctx->current->type != 41) + { + scope_list_push(&ctx->scopes, &p_function_declarator->parameters_scope); + p_function_declarator->parameter_type_list_opt = parameter_type_list(ctx); + scope_list_pop(&ctx->scopes); + if (p_function_declarator->parameter_type_list_opt == ((void *)0)) + { + goto _catch_label_1; + } + } + if (parser_match_tk(ctx, 41) != 0) + { + goto _catch_label_1; + } + } + else _catch_label_1: + { + function_declarator_delete(p_function_declarator); + p_function_declarator = ((void *)0); + } + direct_declarator_delete(p_direct_declarator); + return p_function_declarator; +} + +void pointer_delete(struct pointer * p) +{ + if (p) + { + attribute_specifier_sequence_delete(p->attribute_specifier_sequence_opt); + type_qualifier_list_delete(p->type_qualifier_list_opt); + struct pointer * item = p->pointer; + while (item) + { + struct pointer * 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); + } +} + +struct pointer *pointer_opt(struct parser_ctx * ctx) +{ + struct pointer * p = ((void *)0); + struct pointer * p_pointer = ((void *)0); + if (1) + { + while (ctx->current != ((void *)0) && ctx->current->type == 42) + { + p_pointer = calloc(1, sizeof (struct pointer)); + if (p_pointer == ((void *)0)) + { + goto _catch_label_1; + } + p = p_pointer; + parser_match(ctx); + p_pointer->attribute_specifier_sequence_opt = attribute_specifier_sequence_opt(ctx); + if (first_of_type_qualifier(ctx)) + { + ; + if (ctx->current->type == 9067) + { + compiler_diagnostic_message(640, ctx, ctx->current, ((void *)0), "invalid qualifier for pointer"); + } + else + { + p_pointer->type_qualifier_list_opt = type_qualifier_list(ctx); + } + } + while (ctx->current != ((void *)0) && ctx->current->type == 42) + { + p_pointer->pointer = pointer_opt(ctx); + if (p_pointer->pointer == ((void *)0)) + { + goto _catch_label_1; + } + } + } + } + else _catch_label_1: + { + } + return p; +} + +void type_qualifier_list_add(struct type_qualifier_list * list, struct type_qualifier * p_item) +{ + if (list->head == ((void *)0)) + { + list->head = p_item; + } + else + { + ; + ; + list->tail->next = p_item; + } + list->tail = p_item; +} + +void type_qualifier_list_delete(struct type_qualifier_list * p) +{ + if (p) + { + struct type_qualifier * item = p->head; + while (item) + { + struct type_qualifier * next = item->next; + item->next = ((void *)0); + free(item); + item = next; + } + free(p); + } +} + +struct type_qualifier_list *type_qualifier_list(struct parser_ctx * ctx) +{ + struct type_qualifier_list * p_type_qualifier_list = ((void *)0); + struct type_qualifier * p_type_qualifier = ((void *)0); + if (1) + { + p_type_qualifier_list = calloc(1, sizeof (struct type_qualifier_list)); + if (p_type_qualifier_list == ((void *)0)) + { + goto _catch_label_1; + } + p_type_qualifier = type_qualifier(ctx); + if (p_type_qualifier == ((void *)0)) + { + goto _catch_label_1; + } + p_type_qualifier_list->flags = p_type_qualifier->flags; + type_qualifier_list_add(p_type_qualifier_list, p_type_qualifier); + p_type_qualifier = ((void *)0); + while (ctx->current != ((void *)0) && first_of_type_qualifier(ctx)) + { + p_type_qualifier = type_qualifier(ctx); + if (p_type_qualifier == ((void *)0)) + { + goto _catch_label_1; + } + p_type_qualifier_list->flags = p_type_qualifier->flags; + type_qualifier_list_add(p_type_qualifier_list, p_type_qualifier); + p_type_qualifier = ((void *)0); + } + } + else _catch_label_1: + { + } + return p_type_qualifier_list; +} + +void parameter_list_delete(struct parameter_list * p); + +void parameter_type_list_delete(struct parameter_type_list * p) +{ + if (p) + { + parameter_list_delete(p->parameter_list); + free(p); + } +} + +struct parameter_list *parameter_list(struct parser_ctx * ctx); +unsigned char type_is_void(struct type * p_type); + +struct parameter_type_list *parameter_type_list(struct parser_ctx * ctx) +{ + if (ctx->current == ((void *)0)) + { + return ((void *)0); + } + struct parameter_type_list * p_parameter_type_list = calloc(1, sizeof (struct parameter_type_list)); + if (1) + { + if (p_parameter_type_list == ((void *)0)) + { + goto _catch_label_1; + } + p_parameter_type_list->parameter_list = parameter_list(ctx); + if (p_parameter_type_list->parameter_list == ((void *)0)) + { + goto _catch_label_1; + } + 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 = 1; + } + } + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + if (ctx->current->type == 11822) + { + parser_match(ctx); + p_parameter_type_list->is_var_args = 1; + } + } + else _catch_label_1: + { + parameter_type_list_delete(p_parameter_type_list); + p_parameter_type_list = ((void *)0); + } + return p_parameter_type_list; +} + +void parameter_list_add(struct parameter_list * list, struct parameter_declaration * p_item) +{ + if (list->head == ((void *)0)) + { + list->head = p_item; + } + else + { + ; + ; + list->tail->next = p_item; + } + list->tail = p_item; +} + +void parameter_declaration_delete(struct parameter_declaration * p); + +void parameter_list_delete(struct parameter_list * p) +{ + if (p) + { + struct parameter_declaration * item = p->head; + while (item) + { + struct parameter_declaration * next = item->next; + item->next = ((void *)0); + parameter_declaration_delete(item); + item = next; + } + free(p); + } +} + +struct parameter_declaration *parameter_declaration(struct parser_ctx * ctx); + +struct parameter_list *parameter_list(struct parser_ctx * ctx) +{ + struct parameter_list * p_parameter_list = ((void *)0); + struct parameter_declaration * p_parameter_declaration = ((void *)0); + if (1) + { + p_parameter_list = calloc(1, sizeof (struct parameter_list)); + if (p_parameter_list == ((void *)0)) + { + goto _catch_label_1; + } + p_parameter_declaration = parameter_declaration(ctx); + if (p_parameter_declaration == ((void *)0)) + { + goto _catch_label_1; + } + parameter_list_add(p_parameter_list, p_parameter_declaration); + p_parameter_declaration = ((void *)0); + while (ctx->current != ((void *)0) && ctx->current->type == 44) + { + parser_match(ctx); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + if (ctx->current->type == 11822) + { + break; + } + p_parameter_declaration = parameter_declaration(ctx); + if (p_parameter_declaration == ((void *)0)) + { + goto _catch_label_1; + } + parameter_list_add(p_parameter_list, p_parameter_declaration); + p_parameter_declaration = ((void *)0); + } + } + else _catch_label_1: + { + parameter_list_delete(p_parameter_list); + p_parameter_list = ((void *)0); + } + return p_parameter_list; +} + +void parameter_declaration_delete(struct parameter_declaration * p) +{ + if (p) + { + attribute_specifier_sequence_delete(p->attribute_specifier_sequence_opt); + declaration_specifiers_delete(p->declaration_specifiers); + declarator_delete(p->declarator); + ; + free(p); + } +} + +void naming_convention_parameter(struct parser_ctx * ctx, struct token * token, struct type * type); + +struct parameter_declaration *parameter_declaration(struct parser_ctx * ctx) +{ + struct parameter_declaration * p_parameter_declaration = calloc(1, sizeof (struct parameter_declaration)); + if (1) + { + if (p_parameter_declaration == ((void *)0)) + { + goto _catch_label_1; + } + p_parameter_declaration->attribute_specifier_sequence_opt = attribute_specifier_sequence_opt(ctx); + struct declaration_specifiers * p_declaration_specifiers = declaration_specifiers(ctx, 2048 | 4096); + if (p_declaration_specifiers == ((void *)0)) + { + goto _catch_label_1; + } + p_parameter_declaration->declaration_specifiers = p_declaration_specifiers; + struct token * p_token_name = ((void *)0); + p_parameter_declaration->declarator = declarator(ctx, ((void *)0), p_parameter_declaration->declaration_specifiers, 1, &p_token_name); + if (p_parameter_declaration->declarator == ((void *)0)) + { + goto _catch_label_1; + } + p_parameter_declaration->declarator->name_opt = 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); + 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 = 2048; + if (p_parameter_declaration->declarator->name_opt) + { + naming_convention_parameter(ctx, p_parameter_declaration->declarator->name_opt, &p_parameter_declaration->declarator->type); + } + if (p_parameter_declaration->declarator->name_opt) + { + struct hash_item_set item = {0}; + item.p_declarator = declarator_add_ref(p_parameter_declaration->declarator); + ; + hashmap_set(&ctx->scopes.tail->variables, p_parameter_declaration->declarator->name_opt->lexeme, &item); + hash_item_set_destroy(&item); + } + } + else _catch_label_1: + { + parameter_declaration_delete(p_parameter_declaration); + p_parameter_declaration = ((void *)0); + } + return p_parameter_declaration; +} + +struct specifier_qualifier_list *copy(struct declaration_specifiers * p_declaration_specifiers) +{ + struct specifier_qualifier_list * p_specifier_qualifier_list = calloc(1, sizeof (struct specifier_qualifier_list)); + if (1) + { + if (p_specifier_qualifier_list == ((void *)0)) + { + goto _catch_label_1; + } + 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; + while (p_declaration_specifier) + { + if (p_declaration_specifier->type_specifier_qualifier) + { + struct type_specifier_qualifier * p_specifier_qualifier = calloc(1, sizeof (struct type_specifier_qualifier)); + if (p_specifier_qualifier == ((void *)0)) + { + goto _catch_label_1; + } + if (p_declaration_specifier->type_specifier_qualifier->type_qualifier) + { + struct type_qualifier * p_type_qualifier = calloc(1, sizeof (struct type_qualifier)); + if (p_type_qualifier == ((void *)0)) + { + type_specifier_qualifier_delete(p_specifier_qualifier); + goto _catch_label_1; + } + 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 * p_type_specifier = calloc(1, sizeof (struct type_specifier)); + if (p_type_specifier == ((void *)0)) + { + type_specifier_qualifier_delete(p_specifier_qualifier); + goto _catch_label_1; + } + p_type_specifier->flags = p_declaration_specifier->type_specifier_qualifier->type_specifier->flags; + ; + p_type_specifier->token = p_declaration_specifier->type_specifier_qualifier->type_specifier->token; + p_specifier_qualifier->type_specifier = p_type_specifier; + } + } + specifier_qualifier_list_add(p_specifier_qualifier_list, p_specifier_qualifier); + } + p_declaration_specifier = p_declaration_specifier->next; + } + } + else _catch_label_1: + { + specifier_qualifier_list_delete(p_specifier_qualifier_list); + p_specifier_qualifier_list = ((void *)0); + } + return p_specifier_qualifier_list; +} + +void print_declarator(struct osstream * ss, struct declarator * declarator, unsigned char is_abstract); + +void print_direct_declarator(struct osstream * ss, struct direct_declarator * p_direct_declarator, unsigned char 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->name_opt && !is_abstract) + { + 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); + 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 : ((void *)0); + 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, " "); + if (p_parameter_declaration->declarator) + { + print_declarator(ss, p_parameter_declaration->declarator, is_abstract); + } + p_parameter_declaration = p_parameter_declaration->next; + } + ss_fprintf(ss, ")"); + } + if (p_direct_declarator->array_declarator) + { + ss_fprintf(ss, "[]"); + } +} + +int declarator_get_type_specifier_flags(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; +} + +void print_declarator(struct osstream * ss, struct declarator * p_declarator, unsigned char is_abstract) +{ + unsigned char first = 1; + 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; + } + } + if (p_declarator->direct_declarator) + { + print_direct_declarator(ss, p_declarator->direct_declarator, is_abstract); + } +} + +void print_type_name(struct osstream * ss, struct type_name * p) +{ + unsigned char first = 1; + print_specifier_qualifier_list(ss, &first, p->specifier_qualifier_list); + print_declarator(ss, p->abstract_declarator, 1); +} + +void type_name_delete(struct type_name * p) +{ + if (p) + { + specifier_qualifier_list_delete(p->specifier_qualifier_list); + type_destroy(&p->type); + declarator_delete(p->abstract_declarator); + free(p); + } +} + +struct type_name *type_name(struct parser_ctx * ctx) +{ + if (ctx->current == ((void *)0)) + { + return ((void *)0); + } + struct type_name * p_type_name = calloc(1, sizeof (struct type_name)); + if (1) + { + if (p_type_name == ((void *)0)) + { + goto _catch_label_1; + } + p_type_name->first_token = ctx->current; + struct specifier_qualifier_list * p_specifier_qualifier_list = specifier_qualifier_list(ctx); + if (p_specifier_qualifier_list == ((void *)0)) + { + goto _catch_label_1; + } + p_type_name->specifier_qualifier_list = p_specifier_qualifier_list; + struct declarator * p_declarator = declarator(ctx, p_type_name->specifier_qualifier_list, ((void *)0), 1, ((void *)0)); + if (p_declarator == ((void *)0)) + { + goto _catch_label_1; + } + p_type_name->abstract_declarator = p_declarator; + p_type_name->abstract_declarator->specifier_qualifier_list = p_type_name->specifier_qualifier_list; + p_type_name->abstract_declarator->type = make_type_using_declarator(ctx, p_type_name->abstract_declarator); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + if (ctx->current->prev == ((void *)0)) + { + goto _catch_label_1; + } + p_type_name->last_token = ctx->current->prev; + p_type_name->type = type_dup(&p_type_name->abstract_declarator->type); + } + else _catch_label_1: + { + type_name_delete(p_type_name); + p_type_name = ((void *)0); + } + return p_type_name; +} + +void initializer_list_delete(struct initializer_list * p); + +void braced_initializer_delete(struct braced_initializer * p) +{ + if (p) + { + initializer_list_delete(p->initializer_list); + free(p); + } +} + +struct initializer_list *initializer_list(struct parser_ctx * ctx); + +struct braced_initializer *braced_initializer(struct parser_ctx * ctx) +{ + struct braced_initializer * p_bracket_initializer_list = ((void *)0); + if (1) + { + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + p_bracket_initializer_list = calloc(1, sizeof (struct braced_initializer)); + if (p_bracket_initializer_list == ((void *)0)) + { + goto _catch_label_1; + } + p_bracket_initializer_list->first_token = ctx->current; + if (parser_match_tk(ctx, 123) != 0) + { + goto _catch_label_1; + } + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + if (ctx->current->type != 125) + { + p_bracket_initializer_list->initializer_list = initializer_list(ctx); + } + if (parser_match_tk(ctx, 125) != 0) + { + goto _catch_label_1; + } + } + else _catch_label_1: + { + braced_initializer_delete(p_bracket_initializer_list); + p_bracket_initializer_list = ((void *)0); + } + return p_bracket_initializer_list; +} + +void initializer_delete(struct initializer * p) +{ + if (p) + { + expression_delete(p->assignment_expression); + braced_initializer_delete(p->braced_initializer); + free(p); + } +} + +struct initializer *initializer(struct parser_ctx * ctx) +{ + struct initializer * p_initializer = ((void *)0); + if (1) + { + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + p_initializer = calloc(1, sizeof (struct initializer)); + if (p_initializer == ((void *)0)) + { + goto _catch_label_1; + } + p_initializer->first_token = ctx->current; + if (ctx->current->type == 123) + { + p_initializer->braced_initializer = braced_initializer(ctx); + if (p_initializer->braced_initializer == ((void *)0)) + { + goto _catch_label_1; + } + } + else + { + p_initializer->assignment_expression = assignment_expression(ctx); + if (p_initializer->assignment_expression == ((void *)0)) + { + goto _catch_label_1; + } + } + } + else _catch_label_1: + { + initializer_delete(p_initializer); + p_initializer = ((void *)0); + } + return p_initializer; +} + +void defer_list_add(struct defer_list * list, struct defer_list_item * p_item) +{ + if (list->head == ((void *)0)) + { + list->head = p_item; + } + else + { + ; + ; + list->tail->next = p_item; + } + list->tail = p_item; +} + +void defer_list_destroy(struct defer_list * p) +{ + struct defer_list_item * item = p->head; + while (item) + { + struct defer_list_item * next = item->next; + item->next = ((void *)0); + free(item); + item = next; + } + free(p); +} + +void initializer_list_add(struct initializer_list * list, struct initializer_list_item * p_item) +{ + if (list->head == ((void *)0)) + { + list->head = p_item; + } + else + { + ; + ; + list->tail->next = p_item; + } + list->tail = p_item; +} + +void designation_delete(struct designation * p); + +void initializer_list_item_delete(struct initializer_list_item * p) +{ + if (p) + { + designation_delete(p->designation); + initializer_delete(p->initializer); + free(p); + } +} + +void initializer_list_delete(struct initializer_list * p) +{ + if (p) + { + struct initializer_list_item * item = p->head; + while (item) + { + struct initializer_list_item * next = item->next; + item->next = ((void *)0); + initializer_list_item_delete(item); + item = next; + } + free(p); + } +} + +struct designation *designation(struct parser_ctx * ctx); + +struct initializer_list *initializer_list(struct parser_ctx * ctx) +{ + struct initializer_list * p_initializer_list = ((void *)0); + if (1) + { + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + return ((void *)0); + } + p_initializer_list = calloc(1, sizeof (struct initializer_list)); + if (p_initializer_list == ((void *)0)) + { + goto _catch_label_1; + } + p_initializer_list->first_token = ctx->current; + struct initializer_list_item * p_initializer_list_item = calloc(1, sizeof *p_initializer_list_item); + if (p_initializer_list_item == ((void *)0)) + { + goto _catch_label_1; + } + struct designation * p_designation = ((void *)0); + if (first_of_designator(ctx)) + { + p_designation = designation(ctx); + if (p_designation == ((void *)0)) + { + goto _catch_label_1; + } + p_initializer_list_item->designation = p_designation; + } + struct initializer * p_initializer = initializer(ctx); + if (p_initializer == ((void *)0)) + { + designation_delete(p_designation); + goto _catch_label_1; + } + p_initializer_list_item->initializer = p_initializer; + initializer_list_add(p_initializer_list, p_initializer_list_item); + p_initializer_list_item = ((void *)0); + while (ctx->current != ((void *)0) && ctx->current->type == 44) + { + parser_match(ctx); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + if (ctx->current->type == 125) + { + break; + } + p_initializer_list_item = calloc(1, sizeof *p_initializer_list_item); + if (p_initializer_list_item == ((void *)0)) + { + goto _catch_label_1; + } + struct designation * p_designation2 = ((void *)0); + if (first_of_designator(ctx)) + { + p_designation2 = designation(ctx); + if (p_designation2 == ((void *)0)) + { + goto _catch_label_1; + } + } + p_initializer_list_item->designation = p_designation2; + struct initializer * p_initializer2 = initializer(ctx); + if (p_initializer2 == ((void *)0)) + { + designation_delete(p_designation2); + goto _catch_label_1; + } + p_initializer_list_item->initializer = p_initializer2; + initializer_list_add(p_initializer_list, p_initializer_list_item); + p_initializer_list_item = ((void *)0); + p_initializer_list->size++; + } + } + else _catch_label_1: + { + initializer_list_delete(p_initializer_list); + p_initializer_list = ((void *)0); + } + return p_initializer_list; +} + +void designator_list_delete(struct designator_list * p); + +void designation_delete(struct designation * p) +{ + if (p) + { + designator_list_delete(p->designator_list); + free(p); + } +} + +struct designator_list *designator_list(struct parser_ctx * ctx); + +struct designation *designation(struct parser_ctx * ctx) +{ + struct designation * p_designation = ((void *)0); + if (1) + { + p_designation = calloc(1, sizeof (struct designation)); + if (p_designation == ((void *)0)) + { + goto _catch_label_1; + } + struct designator_list * p_designator_list = designator_list(ctx); + if (p_designator_list == ((void *)0)) + { + goto _catch_label_1; + } + p_designation->designator_list = p_designator_list; + if (parser_match_tk(ctx, 61) != 0) + { + goto _catch_label_1; + } + } + else _catch_label_1: + { + designation_delete(p_designation); + p_designation = ((void *)0); + } + return p_designation; +} + +void designator_list_add(struct designator_list * list, struct designator * p_item) +{ + if (list->head == ((void *)0)) + { + list->head = p_item; + } + else + { + ; + ; + list->tail->next = p_item; + } + list->tail = p_item; +} + +void designator_delete(struct designator * p); + +void designator_list_delete(struct designator_list * p) +{ + if (p) + { + struct designator * item = p->head; + while (item) + { + struct designator * next = item->next; + item->next = ((void *)0); + designator_delete(item); + item = next; + } + free(p); + } +} + +struct designator *designator(struct parser_ctx * ctx); + +struct designator_list *designator_list(struct parser_ctx * ctx) +{ + struct designator_list * p_designator_list = ((void *)0); + struct designator * p_designator = ((void *)0); + if (1) + { + p_designator_list = calloc(1, sizeof (struct designator_list)); + if (p_designator_list == ((void *)0)) + { + goto _catch_label_1; + } + p_designator = designator(ctx); + if (p_designator == ((void *)0)) + { + goto _catch_label_1; + } + designator_list_add(p_designator_list, p_designator); + p_designator = ((void *)0); + while (ctx->current != ((void *)0) && first_of_designator(ctx)) + { + p_designator = designator(ctx); + if (p_designator == ((void *)0)) + { + goto _catch_label_1; + } + designator_list_add(p_designator_list, p_designator); + p_designator = ((void *)0); + } + } + else _catch_label_1: + { + designator_list_delete(p_designator_list); + p_designator_list = ((void *)0); + } + return p_designator_list; +} + +void designator_delete(struct designator * p) +{ + if (p) + { + ; + expression_delete(p->constant_expression_opt); + free(p); + } +} + +struct designator *designator(struct parser_ctx * ctx) +{ + struct designator * p_designator = ((void *)0); + if (1) + { + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + p_designator = calloc(1, sizeof (struct designator)); + if (p_designator == ((void *)0)) + { + goto _catch_label_1; + } + if (ctx->current->type == 91) + { + if (parser_match_tk(ctx, 91) != 0) + { + goto _catch_label_1; + } + p_designator->constant_expression_opt = constant_expression(ctx, 1); + if (parser_match_tk(ctx, 93) != 0) + { + goto _catch_label_1; + } + } + else + { + if (ctx->current->type == 46) + { + parser_match(ctx); + p_designator->token = ctx->current; + if (parser_match_tk(ctx, 8996) != 0) + { + goto _catch_label_1; + } + } + } + } + else _catch_label_1: + { + designator_delete(p_designator); + p_designator = ((void *)0); + } + return p_designator; +} + +void static_assert_declaration_delete(struct static_assert_declaration * p) +{ + if (p) + { + expression_delete(p->constant_expression); + free(p); + } +} + +void pragma_declaration_delete(struct pragma_declaration * p) +{ + if (p) + { + free(p); + } +} + +int get_diagnostic_phase(int w); +int atoi(char * _String); + +void execute_pragma(struct parser_ctx * ctx, struct pragma_declaration * p_pragma, unsigned char on_flow_analysis) +{ + struct token * p_pragma_token = p_pragma->first_token; + if (p_pragma_token->type != 128) + { + ; + return; + } + p_pragma_token = pragma_match(p_pragma_token); + if (p_pragma_token && (strcmp(p_pragma_token->lexeme, "CAKE") == 0 || strcmp(p_pragma_token->lexeme, "cake") == 0)) + { + p_pragma_token = pragma_match(p_pragma_token); + } + if (p_pragma_token && strcmp(p_pragma_token->lexeme, "diagnostic") == 0) + { + p_pragma_token = pragma_match(p_pragma_token); + if (p_pragma_token && strcmp(p_pragma_token->lexeme, "push") == 0) + { + if (ctx->options.diagnostic_stack.top_index < sizeof (ctx->options.diagnostic_stack) / sizeof (ctx->options.diagnostic_stack.stack[0])) + { + ctx->options.diagnostic_stack.top_index++; + ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index] = ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index - 1]; + } + p_pragma_token = p_pragma_token->next; + } + else + { + if (p_pragma_token && strcmp(p_pragma_token->lexeme, "pop") == 0) + { + if (ctx->options.diagnostic_stack.top_index > 0) + { + ctx->options.diagnostic_stack.top_index--; + } + p_pragma_token = pragma_match(p_pragma_token); + } + else + { + if (p_pragma_token && (strcmp(p_pragma_token->lexeme, "error") == 0 || strcmp(p_pragma_token->lexeme, "warning") == 0 || strcmp(p_pragma_token->lexeme, "note") == 0 || strcmp(p_pragma_token->lexeme, "ignored") == 0)) + { + unsigned char is_error = strcmp(p_pragma_token->lexeme, "error") == 0; + unsigned char is_warning = strcmp(p_pragma_token->lexeme, "warning") == 0; + unsigned char is_note = strcmp(p_pragma_token->lexeme, "note") == 0; + p_pragma_token = pragma_match(p_pragma_token); + if (p_pragma_token && p_pragma_token->type == 130) + { + unsigned long long w = get_warning_bit_mask(p_pragma_token->lexeme + 1); + ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index].errors = ~w; + ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index].notes = ~w; + ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index].warnings = ~w; + if (is_error) + { + ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index].errors = w; + } + else + { + if (is_warning) + { + ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index].warnings = w; + } + else + { + if (is_note) + { + ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index].notes = w; + } + } + } + } + } + else + { + if (p_pragma_token && (strcmp(p_pragma_token->lexeme, "check") == 0)) + { + p_pragma_token = pragma_match(p_pragma_token); + if (p_pragma_token && p_pragma_token->type == 130) + { + int id = get_warning(p_pragma_token->lexeme + 1); + if (( !on_flow_analysis && get_diagnostic_phase(id) != 2) || (on_flow_analysis && get_diagnostic_phase(id) == 2)) + { + unsigned char found = 0; + { + int i = 0; + for (; i < (int)(sizeof (ctx->p_report->last_diagnostics_ids) / sizeof (ctx->p_report->last_diagnostics_ids[0])); i++) + { + if (ctx->p_report->last_diagnostics_ids[i] == 0) + { + break; + } + if (ctx->p_report->last_diagnostics_ids[i] == id) + { + found = 1; + int t = get_diagnostic_type(&ctx->options.diagnostic_stack.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--; + } + } + } + break; + } + } + } + if ( !found) + { + ctx->p_report->fatal_error_expected = atoi(p_pragma_token->lexeme + 3); + compiler_diagnostic_message(650, ctx, p_pragma_token, ((void *)0), "pragma check failed"); + } + } + } + } + else + { + compiler_diagnostic_message(650, ctx, p_pragma_token, ((void *)0), "unknown pragma"); + } + } + } + } + } + else + { + if (p_pragma_token && strcmp(p_pragma_token->lexeme, "nullable") == 0) + { + p_pragma_token = pragma_match(p_pragma_token); + if (p_pragma_token && strcmp(p_pragma_token->lexeme, "enable") == 0) + { + unsigned long long w = ((1ULL << 32) | (1ULL << 34)); + ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index].errors = ~w; + ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index].notes = ~w; + ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index].warnings = ~w; + ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index].warnings = w; + ctx->options.null_checks_enabled = 1; + ctx->options.flow_analysis = 1; + } + if (p_pragma_token && strcmp(p_pragma_token->lexeme, "disable") == 0) + { + unsigned long long w = ((1ULL << 32) | (1ULL << 34)); + ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index].errors = ~w; + ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index].notes = ~w; + ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index].warnings = ~w; + ctx->options.null_checks_enabled = 0; + } + } + else + { + if (p_pragma_token && strcmp(p_pragma_token->lexeme, "ownership") == 0) + { + p_pragma_token = pragma_match(p_pragma_token); + if (p_pragma_token && strcmp(p_pragma_token->lexeme, "enable") == 0) + { + unsigned long long w = ((1ULL << 29)); + ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index].errors = ~w; + ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index].notes = ~w; + ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index].warnings = ~w; + ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index].warnings = w; + ctx->options.ownership_enabled = 1; + ctx->options.flow_analysis = 1; + } + if (p_pragma_token && strcmp(p_pragma_token->lexeme, "disable") == 0) + { + unsigned long long w = ((1ULL << 29)); + ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index].errors = ~w; + ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index].notes = ~w; + ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index].warnings = ~w; + ctx->options.ownership_enabled = 0; + } + } + else + { + if (p_pragma_token && strcmp(p_pragma_token->lexeme, "flow") == 0) + { + p_pragma_token = pragma_match(p_pragma_token); + if (p_pragma_token && strcmp(p_pragma_token->lexeme, "enable") == 0) + { + ctx->options.flow_analysis = 1; + } + if (p_pragma_token && strcmp(p_pragma_token->lexeme, "disable") == 0) + { + ctx->options.flow_analysis = 0; + } + } + else + { + if (p_pragma_token && strcmp(p_pragma_token->lexeme, "safety") == 0) + { + p_pragma_token = pragma_match(p_pragma_token); + if (p_pragma_token && strcmp(p_pragma_token->lexeme, "enable") == 0) + { + unsigned long long w = ((1ULL << 32) | (1ULL << 34)) | ((1ULL << 29)); + ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index].errors = ~w; + ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index].notes = ~w; + ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index].warnings = ~w; + ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index].warnings = w; + ctx->options.null_checks_enabled = 1; + ctx->options.flow_analysis = 1; + ctx->options.ownership_enabled = 1; + } + if (p_pragma_token && strcmp(p_pragma_token->lexeme, "disable") == 0) + { + unsigned long long w = ((1ULL << 32) | (1ULL << 34)) | ((1ULL << 29)); + ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index].errors = ~w; + ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index].notes = ~w; + ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index].warnings = ~w; + ctx->options.null_checks_enabled = 0; + ctx->options.ownership_enabled = 0; + ctx->options.flow_analysis = 0; + } + } + } + } + } + } +} + +struct pragma_declaration *pragma_declaration(struct parser_ctx * ctx) +{ + struct pragma_declaration * p_pragma_declaration = ((void *)0); + if (1) + { + if (ctx->current == ((void *)0) || ctx->current->type != 128) + { + ; + goto _catch_label_1; + } + p_pragma_declaration = calloc(1, sizeof (struct pragma_declaration)); + if (p_pragma_declaration == ((void *)0)) + { + goto _catch_label_1; + } + p_pragma_declaration->first_token = ctx->current; + parser_match(ctx); + while (ctx->current && ctx->current->type != 129) + { + ctx->current = ctx->current->next; + } + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + p_pragma_declaration->last_token = ctx->current; + parser_match(ctx); + } + else _catch_label_1: + { + } + if (p_pragma_declaration) + { + execute_pragma(ctx, p_pragma_declaration, 0); + } + return p_pragma_declaration; +} + +unsigned char object_to_bool(struct object * a); + +struct static_assert_declaration *static_assert_declaration(struct parser_ctx * ctx) +{ + struct static_assert_declaration * p_static_assert_declaration = ((void *)0); + if (1) + { + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + p_static_assert_declaration = calloc(1, sizeof (struct static_assert_declaration)); + if (p_static_assert_declaration == ((void *)0)) + { + goto _catch_label_1; + } + p_static_assert_declaration->first_token = ctx->current; + struct token * position = ctx->current; + parser_match(ctx); + if (parser_match_tk(ctx, 40) != 0) + { + goto _catch_label_1; + } + unsigned char show_error_if_not_constant = 0; + if (p_static_assert_declaration->first_token->type == 9055) + { + show_error_if_not_constant = 1; + } + struct expression * p_constant_expression = constant_expression(ctx, show_error_if_not_constant); + if (p_constant_expression == ((void *)0)) + { + goto _catch_label_1; + } + p_static_assert_declaration->constant_expression = p_constant_expression; + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + if (ctx->current->type == 44) + { + parser_match(ctx); + p_static_assert_declaration->string_literal_opt = ctx->current; + if (parser_match_tk(ctx, 130) != 0) + { + goto _catch_label_1; + } + } + if (parser_match_tk(ctx, 41) != 0) + { + goto _catch_label_1; + } + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + p_static_assert_declaration->last_token = ctx->current; + if (parser_match_tk(ctx, 59) != 0) + { + goto _catch_label_1; + } + if (position->type == 9055) + { + if ( !object_to_bool(&p_static_assert_declaration->constant_expression->object)) + { + if (p_static_assert_declaration->string_literal_opt) + { + compiler_diagnostic_message(1060, ctx, position, ((void *)0), "static_assert failed %s\n", p_static_assert_declaration->string_literal_opt->lexeme); + } + else + { + compiler_diagnostic_message(1060, ctx, position, ((void *)0), "static_assert failed"); + } + } + } + } + else _catch_label_1: + { + } + return p_static_assert_declaration; +} + +void attribute_specifier_sequence_add(struct attribute_specifier_sequence * list, struct attribute_specifier * p_item) +{ + if (list->head == ((void *)0)) + { + list->head = p_item; + } + else + { + ; + ; + list->tail->next = p_item; + } + list->tail = p_item; +} + +void attribute_specifier_delete(struct attribute_specifier * p); + +void attribute_specifier_sequence_delete(struct attribute_specifier_sequence * p) +{ + if (p) + { + struct attribute_specifier * item = p->head; + while (item) + { + struct attribute_specifier * next = item->next; + item->next = ((void *)0); + attribute_specifier_delete(item); + item = next; + } + free(p); + } +} + +struct attribute_specifier *attribute_specifier(struct parser_ctx * ctx); + +struct attribute_specifier_sequence *attribute_specifier_sequence_opt(struct parser_ctx * ctx) +{ + struct attribute_specifier_sequence * p_attribute_specifier_sequence = ((void *)0); + if (1) + { + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + if (first_of_attribute_specifier(ctx)) + { + p_attribute_specifier_sequence = calloc(1, sizeof (struct attribute_specifier_sequence)); + if (p_attribute_specifier_sequence == ((void *)0)) + { + goto _catch_label_1; + } + p_attribute_specifier_sequence->first_token = ctx->current; + while (ctx->current != ((void *)0) && first_of_attribute_specifier(ctx)) + { + struct attribute_specifier * p_attribute_specifier = attribute_specifier(ctx); + if (p_attribute_specifier == ((void *)0)) + { + goto _catch_label_1; + } + p_attribute_specifier_sequence->attributes_flags = p_attribute_specifier->attribute_list->attributes_flags; + attribute_specifier_sequence_add(p_attribute_specifier_sequence, p_attribute_specifier); + } + if (ctx->previous == ((void *)0)) + { + goto _catch_label_1; + } + p_attribute_specifier_sequence->last_token = ctx->previous; + } + } + else _catch_label_1: + { + attribute_specifier_sequence_delete(p_attribute_specifier_sequence); + p_attribute_specifier_sequence = ((void *)0); + } + return p_attribute_specifier_sequence; +} + +struct attribute_specifier_sequence *attribute_specifier_sequence(struct parser_ctx * ctx) +{ + struct attribute_specifier_sequence * p_attribute_specifier_sequence = ((void *)0); + if (1) + { + p_attribute_specifier_sequence = calloc(1, sizeof (struct attribute_specifier_sequence)); + if (p_attribute_specifier_sequence == ((void *)0)) + { + goto _catch_label_1; + } + while (first_of_attribute_specifier(ctx)) + { + struct attribute_specifier * p_attribute_specifier = attribute_specifier(ctx); + if (p_attribute_specifier == ((void *)0)) + { + goto _catch_label_1; + } + attribute_specifier_sequence_add(p_attribute_specifier_sequence, p_attribute_specifier); + } + } + else _catch_label_1: + { + attribute_specifier_sequence_delete(p_attribute_specifier_sequence); + p_attribute_specifier_sequence = ((void *)0); + } + return p_attribute_specifier_sequence; +} + +void attribute_list_delete(struct attribute_list * p); + +void attribute_specifier_delete(struct attribute_specifier * p) +{ + if (p) + { + attribute_list_delete(p->attribute_list); + ; + free(p); + } +} + +struct attribute_list *attribute_list(struct parser_ctx * ctx); + +struct attribute_specifier *attribute_specifier(struct parser_ctx * ctx) +{ + struct attribute_specifier * p_attribute_specifier = ((void *)0); + if (1) + { + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + p_attribute_specifier = calloc(1, sizeof (struct attribute_specifier)); + if (p_attribute_specifier == ((void *)0)) + { + goto _catch_label_1; + } + p_attribute_specifier->first_token = ctx->current; + if (parser_match_tk(ctx, 91) != 0) + { + goto _catch_label_1; + } + if (parser_match_tk(ctx, 91) != 0) + { + goto _catch_label_1; + } + struct attribute_list * p_attribute_list = attribute_list(ctx); + if (p_attribute_list == ((void *)0)) + { + goto _catch_label_1; + } + p_attribute_specifier->attribute_list = p_attribute_list; + if (parser_match_tk(ctx, 93) != 0) + { + goto _catch_label_1; + } + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + p_attribute_specifier->last_token = ctx->current; + if (parser_match_tk(ctx, 93) != 0) + { + goto _catch_label_1; + } + } + else _catch_label_1: + { + attribute_specifier_delete(p_attribute_specifier); + p_attribute_specifier = ((void *)0); + } + return p_attribute_specifier; +} + +void attribute_token_delete(struct attribute_token * p); +void attribute_argument_clause_delete(struct attribute_argument_clause * p); + +void attribute_delete(struct attribute * p) +{ + if (p) + { + attribute_token_delete(p->attribute_token); + attribute_argument_clause_delete(p->attribute_argument_clause); + ; + free(p); + } +} + +void attribute_list_add(struct attribute_list * list, struct attribute * p_item) +{ + if (list->head == ((void *)0)) + { + list->head = p_item; + } + else + { + ; + ; + list->tail->next = p_item; + } + list->tail = p_item; +} + +void attribute_list_destroy(struct attribute_list * p) +{ + struct attribute * item = p->head; + while (item) + { + struct attribute * next = item->next; + item->next = ((void *)0); + attribute_delete(item); + item = next; + } +} + +void attribute_list_delete(struct attribute_list * p) +{ + if (p) + { + attribute_list_destroy(p); + free(p); + } +} + +unsigned char first_of_attribute(struct parser_ctx * ctx); +struct attribute *attribute(struct parser_ctx * ctx); + +struct attribute_list *attribute_list(struct parser_ctx * ctx) +{ + struct attribute_list * p_attribute_list = ((void *)0); + if (1) + { + p_attribute_list = calloc(1, sizeof (struct attribute_list)); + if (p_attribute_list == ((void *)0)) + { + goto _catch_label_1; + } + while (ctx->current != ((void *)0) && (first_of_attribute(ctx) || ctx->current->type == 44)) + { + if (first_of_attribute(ctx)) + { + struct attribute * p_attribute = attribute(ctx); + if (p_attribute == ((void *)0)) + { + goto _catch_label_1; + } + p_attribute_list->attributes_flags = p_attribute->attributes_flags; + attribute_list_add(p_attribute_list, p_attribute); + } + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + if (ctx->current->type == 44) + { + parser_match(ctx); + } + } + } + else _catch_label_1: + { + attribute_list_delete(p_attribute_list); + p_attribute_list = ((void *)0); + } + return p_attribute_list; +} + +unsigned char first_of_attribute(struct parser_ctx * ctx) +{ + if (ctx->current == ((void *)0)) + { + return 0; + } + return ctx->current->type == 8996; +} + +struct attribute_token *attribute_token(struct parser_ctx * ctx); +struct attribute_argument_clause *attribute_argument_clause(struct parser_ctx * ctx); + +struct attribute *attribute(struct parser_ctx * ctx) +{ + struct attribute * p_attribute = ((void *)0); + if (1) + { + p_attribute = calloc(1, sizeof (struct attribute)); + if (p_attribute == ((void *)0)) + { + goto _catch_label_1; + } + struct attribute_token * p_attribute_token = attribute_token(ctx); + if (p_attribute_token == ((void *)0)) + { + goto _catch_label_1; + } + p_attribute->attribute_token = p_attribute_token; + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + p_attribute->attributes_flags = p_attribute->attribute_token->attributes_flags; + if (ctx->current->type == 40) + { + struct attribute_argument_clause * p_attribute_argument_clause = attribute_argument_clause(ctx); + if (p_attribute_argument_clause == ((void *)0)) + { + goto _catch_label_1; + } + p_attribute->attribute_argument_clause = p_attribute_argument_clause; + } + } + else _catch_label_1: + { + attribute_delete(p_attribute); + p_attribute = ((void *)0); + } + return p_attribute; +} + +void attribute_token_delete(struct attribute_token * p) +{ + if (p) + { + free(p); + } +} + +unsigned char token_is_identifier_or_keyword(int t); + +struct attribute_token *attribute_token(struct parser_ctx * ctx) +{ + struct attribute_token * p_attribute_token = ((void *)0); + if (1) + { + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + p_attribute_token = calloc(1, sizeof (struct attribute_token)); + if (p_attribute_token == ((void *)0)) + { + goto _catch_label_1; + } + struct token * attr_token = ctx->current; + unsigned char is_standard_attribute = 0; + if (strcmp(attr_token->lexeme, "deprecated") == 0) + { + is_standard_attribute = 1; + p_attribute_token->attributes_flags = 1; + } + else + { + if (strcmp(attr_token->lexeme, "fallthrough") == 0) + { + is_standard_attribute = 1; + } + else + { + if (strcmp(attr_token->lexeme, "maybe_unused") == 0) + { + is_standard_attribute = 1; + p_attribute_token->attributes_flags = 4; + } + else + { + if (strcmp(attr_token->lexeme, "noreturn") == 0) + { + is_standard_attribute = 1; + p_attribute_token->attributes_flags = 16; + } + else + { + if (strcmp(attr_token->lexeme, "reproducible") == 0) + { + is_standard_attribute = 1; + p_attribute_token->attributes_flags = 64; + } + else + { + if (strcmp(attr_token->lexeme, "unsequenced") == 0) + { + is_standard_attribute = 1; + p_attribute_token->attributes_flags = 32; + } + else + { + if (strcmp(attr_token->lexeme, "nodiscard") == 0) + { + is_standard_attribute = 1; + p_attribute_token->attributes_flags = 8; + } + } + } + } + } + } + } + unsigned char is_cake_attr = strcmp(attr_token->lexeme, "cake") == 0; + if (token_is_identifier_or_keyword(ctx->current->type)) + { + parser_match(ctx); + } + else + { + compiler_diagnostic_message(970, ctx, attr_token, ((void *)0), "expected identifier"); + } + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + if (ctx->current->type == 14906) + { + parser_match(ctx); + if (is_cake_attr) + { + compiler_diagnostic_message(8, ctx, attr_token, ((void *)0), "warning '%s' is not an cake attribute", ctx->current->lexeme); + } + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + if (token_is_identifier_or_keyword(ctx->current->type)) + { + parser_match(ctx); + } + else + { + compiler_diagnostic_message(970, ctx, attr_token, ((void *)0), "expected identifier"); + } + } + else + { + if ( !is_standard_attribute) + { + compiler_diagnostic_message(8, ctx, attr_token, ((void *)0), "warning '%s' is not an standard attribute", attr_token->lexeme); + } + } + } + else _catch_label_1: + { + attribute_token_delete(p_attribute_token); + p_attribute_token = ((void *)0); + } + return p_attribute_token; +} + +void balanced_token_sequence_delete(struct balanced_token_sequence * p); + +void attribute_argument_clause_delete(struct attribute_argument_clause * p) +{ + if (p) + { + balanced_token_sequence_delete(p->p_balanced_token_sequence); + free(p); + } +} + +struct balanced_token_sequence *balanced_token_sequence_opt(struct parser_ctx * ctx); + +struct attribute_argument_clause *attribute_argument_clause(struct parser_ctx * ctx) +{ + struct attribute_argument_clause * p_attribute_argument_clause = calloc(1, sizeof (struct attribute_argument_clause)); + if (1) + { + if (p_attribute_argument_clause == ((void *)0)) + { + goto _catch_label_1; + } + if (parser_match_tk(ctx, 40) != 0) + { + goto _catch_label_1; + } + p_attribute_argument_clause->p_balanced_token_sequence = balanced_token_sequence_opt(ctx); + if (parser_match_tk(ctx, 41) != 0) + { + goto _catch_label_1; + } + } + else _catch_label_1: + { + attribute_argument_clause_delete(p_attribute_argument_clause); + p_attribute_argument_clause = ((void *)0); + } + return p_attribute_argument_clause; +} + +void balanced_token_sequence_delete(struct balanced_token_sequence * p) +{ + if (p) + { + struct balanced_token * item = p->head; + while (item) + { + struct balanced_token * next = item->next; + free(item); + item = next; + } + free(p); + } +} + +struct balanced_token_sequence *balanced_token_sequence_opt(struct parser_ctx * ctx) +{ + struct balanced_token_sequence * p_balanced_token_sequence = calloc(1, sizeof (struct balanced_token_sequence)); + if (1) + { + if (p_balanced_token_sequence == ((void *)0)) + { + goto _catch_label_1; + } + int count1 = 0; + int count2 = 0; + int count3 = 0; + for (; ctx->current; ) + { + if (ctx->current->type == 40) + { + count1++; + } + else + { + if (ctx->current->type == 91) + { + count2++; + } + else + { + if (ctx->current->type == 123) + { + count3++; + } + else + { + if (ctx->current->type == 41) + { + if (count1 == 0) + { + break; + } + count1--; + } + else + { + if (ctx->current->type == 91) + { + count2--; + } + else + { + if (ctx->current->type == 123) + { + count3--; + } + } + } + } + } + } + parser_match(ctx); + } + if (count2 != 0) + { + compiler_diagnostic_message(1090, ctx, ctx->current, ((void *)0), "expected ']' before ')'"); + } + if (count3 != 0) + { + compiler_diagnostic_message(1090, ctx, ctx->current, ((void *)0), "expected '}' before ')'"); + } + } + else _catch_label_1: + { + balanced_token_sequence_delete(p_balanced_token_sequence); + p_balanced_token_sequence = ((void *)0); + } + return p_balanced_token_sequence; +} + +void labeled_statement_delete(struct labeled_statement * p); +void unlabeled_statement_delete(struct unlabeled_statement * p); + +void statement_delete(struct statement * p) +{ + if (p) + { + labeled_statement_delete(p->labeled_statement); + unlabeled_statement_delete(p->unlabeled_statement); + free(p); + } +} + +struct labeled_statement *labeled_statement(struct parser_ctx * ctx); +struct unlabeled_statement *unlabeled_statement(struct parser_ctx * ctx); + +struct statement *statement(struct parser_ctx * ctx) +{ + struct statement * p_statement = calloc(1, sizeof (struct statement)); + if (1) + { + if (p_statement == ((void *)0)) + { + goto _catch_label_1; + } + if (first_of_labeled_statement(ctx)) + { + p_statement->labeled_statement = labeled_statement(ctx); + if (p_statement->labeled_statement == ((void *)0)) + { + goto _catch_label_1; + } + } + else + { + p_statement->unlabeled_statement = unlabeled_statement(ctx); + if (p_statement->unlabeled_statement == ((void *)0)) + { + goto _catch_label_1; + } + } + } + else _catch_label_1: + { + statement_delete(p_statement); + p_statement = ((void *)0); + } + return p_statement; +} + +struct compound_statement *compound_statement(struct parser_ctx * ctx); +struct selection_statement *selection_statement(struct parser_ctx * ctx); +struct iteration_statement *iteration_statement(struct parser_ctx * ctx); +struct defer_statement *defer_statement(struct parser_ctx * ctx); +struct try_statement *try_statement(struct parser_ctx * ctx); +void primary_block_delete(struct primary_block * p); + +struct primary_block *primary_block(struct parser_ctx * ctx) +{ + ; + struct primary_block * p_primary_block = calloc(1, sizeof (struct primary_block)); + if (1) + { + if (p_primary_block == ((void *)0)) + { + goto _catch_label_1; + } + if (first_of_compound_statement(ctx)) + { + p_primary_block->compound_statement = compound_statement(ctx); + if (p_primary_block->compound_statement == ((void *)0)) + { + goto _catch_label_1; + } + } + else + { + if (first_of_selection_statement(ctx)) + { + p_primary_block->selection_statement = selection_statement(ctx); + if (p_primary_block->selection_statement == ((void *)0)) + { + goto _catch_label_1; + } + } + else + { + if (first_of_iteration_statement(ctx)) + { + p_primary_block->iteration_statement = iteration_statement(ctx); + if (p_primary_block->iteration_statement == ((void *)0)) + { + goto _catch_label_1; + } + } + else + { + if (ctx->current->type == 9009) + { + p_primary_block->defer_statement = defer_statement(ctx); + if (p_primary_block->defer_statement == ((void *)0)) + { + goto _catch_label_1; + } + } + else + { + if (ctx->current->type == 9036) + { + p_primary_block->try_statement = try_statement(ctx); + if (p_primary_block->try_statement == ((void *)0)) + { + goto _catch_label_1; + } + } + else + { + compiler_diagnostic_message(970, ctx, ctx->current, ((void *)0), "unexpected token"); + } + } + } + } + } + } + else _catch_label_1: + { + primary_block_delete(p_primary_block); + p_primary_block = ((void *)0); + } + return p_primary_block; +} + +struct secondary_block *secondary_block(struct parser_ctx * ctx) +{ + struct secondary_block * p_secondary_block = ((void *)0); + if (1) + { + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + check_open_brace_style(ctx, ctx->current); + p_secondary_block = calloc(1, sizeof (struct secondary_block)); + if (p_secondary_block == ((void *)0)) + { + goto _catch_label_1; + } + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + p_secondary_block->first_token = ctx->current; + struct statement * p_statement = statement(ctx); + if (p_statement == ((void *)0)) + { + goto _catch_label_1; + } + p_secondary_block->statement = p_statement; + if (ctx->previous == ((void *)0)) + { + goto _catch_label_1; + } + p_secondary_block->last_token = ctx->previous; + check_close_brace_style(ctx, p_secondary_block->last_token); + } + else _catch_label_1: + { + secondary_block_delete(p_secondary_block); + p_secondary_block = ((void *)0); + } + return p_secondary_block; +} + +unsigned char unlabeled_statement_ends_with_jump(struct unlabeled_statement * p_unlabeled_statement) +{ + struct expression * p_expression = ((void *)0); + if (p_unlabeled_statement->expression_statement) + { + p_expression = p_unlabeled_statement->expression_statement->expression_opt; + } + else + { + if (p_unlabeled_statement->jump_statement) + { + return 1; + } + else + { + if (p_unlabeled_statement->primary_block && p_unlabeled_statement->primary_block->compound_statement && p_unlabeled_statement->primary_block->compound_statement->block_item_list.tail && p_unlabeled_statement->primary_block->compound_statement->block_item_list.tail->unlabeled_statement && p_unlabeled_statement->primary_block->compound_statement->block_item_list.tail->unlabeled_statement->expression_statement) + { + p_expression = p_unlabeled_statement->primary_block->compound_statement->block_item_list.tail->unlabeled_statement->expression_statement->expression_opt; + } + } + } + if (p_expression) + { + return p_expression->type.attributes_flags & 16; + } + if (p_unlabeled_statement->primary_block && p_unlabeled_statement->primary_block->compound_statement && p_unlabeled_statement->primary_block->compound_statement->block_item_list.tail && p_unlabeled_statement->primary_block->compound_statement->block_item_list.tail->unlabeled_statement) + { + return p_unlabeled_statement->primary_block->compound_statement->block_item_list.tail->unlabeled_statement->jump_statement != ((void *)0); + } + return 0; +} + +unsigned char secondary_block_ends_with_jump(struct secondary_block * p_secondary_block) +{ + if (p_secondary_block && p_secondary_block->statement->unlabeled_statement) + { + return unlabeled_statement_ends_with_jump(p_secondary_block->statement->unlabeled_statement); + } + return 0; +} + +void secondary_block_delete(struct secondary_block * p) +{ + if (p) + { + statement_delete(p->statement); + free(p); + } +} + +void compound_statement_delete(struct compound_statement * p); +void iteration_statement_delete(struct iteration_statement * p); +void selection_statement_delete(struct selection_statement * p); +void try_statement_delete(struct try_statement * p); + +void primary_block_delete(struct primary_block * 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); + } +} + +static unsigned char first_of_primary_block(struct parser_ctx * ctx) +{ + if (ctx->current == ((void *)0)) + { + return 0; + } + if (first_of_compound_statement(ctx) || first_of_selection_statement(ctx) || first_of_iteration_statement(ctx) || ctx->current->type == 9009 || ctx->current->type == 9036) + { + return 1; + } + return 0; +} + +void expression_statement_delete(struct expression_statement * p); +void jump_statement_delete(struct jump_statement * p); + +void unlabeled_statement_delete(struct unlabeled_statement * p) +{ + if (p) + { + expression_statement_delete(p->expression_statement); + jump_statement_delete(p->jump_statement); + primary_block_delete(p->primary_block); + free(p); + } +} + +struct jump_statement *jump_statement(struct parser_ctx * ctx); +struct expression_statement *expression_statement(struct parser_ctx * ctx, unsigned char ignore_semicolon); +unsigned char type_is_nodiscard(struct type * p_type); + +struct unlabeled_statement *unlabeled_statement(struct parser_ctx * ctx) +{ + struct unlabeled_statement * p_unlabeled_statement = calloc(1, sizeof (struct unlabeled_statement)); + if (1) + { + if (p_unlabeled_statement == ((void *)0)) + { + goto _catch_label_1; + } + if (first_of_primary_block(ctx)) + { + p_unlabeled_statement->primary_block = primary_block(ctx); + if (p_unlabeled_statement->primary_block == ((void *)0)) + { + goto _catch_label_1; + } + } + else + { + if (first_of_jump_statement(ctx)) + { + p_unlabeled_statement->jump_statement = jump_statement(ctx); + if (p_unlabeled_statement->jump_statement == ((void *)0)) + { + goto _catch_label_1; + } + } + else + { + p_unlabeled_statement->expression_statement = expression_statement(ctx, 0); + if (p_unlabeled_statement->expression_statement == ((void *)0)) + { + goto _catch_label_1; + } + 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 & 8192) + { + if (p_unlabeled_statement->expression_statement->expression_opt->first_token->level == 0) + { + compiler_diagnostic_message(8, ctx, p_unlabeled_statement->expression_statement->expression_opt->first_token, ((void *)0), "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 & 8192) + { + if (p_unlabeled_statement->expression_statement->expression_opt->first_token->level == 0) + { + compiler_diagnostic_message(8, ctx, p_unlabeled_statement->expression_statement->expression_opt->first_token, ((void *)0), "ignoring the result of _Owner type "); + } + } + } + if (p_unlabeled_statement->expression_statement->expression_opt && p_unlabeled_statement->expression_statement->expression_opt->expression_type == 12) + { + } + else + { + if (p_unlabeled_statement != ((void *)0) && p_unlabeled_statement->jump_statement == ((void *)0) && p_unlabeled_statement->expression_statement != ((void *)0) && 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 != 53 && p_unlabeled_statement->expression_statement->expression_opt->expression_type != 12 && p_unlabeled_statement->expression_statement->expression_opt->expression_type != 16 && p_unlabeled_statement->expression_statement->expression_opt->expression_type != 17 && p_unlabeled_statement->expression_statement->expression_opt->expression_type != 26 && p_unlabeled_statement->expression_statement->expression_opt->expression_type != 27 && p_unlabeled_statement->expression_statement->expression_opt->expression_type != 23 && p_unlabeled_statement->expression_statement->expression_opt->expression_type != 25) + { + if (ctx->current && ctx->current->level == 0) + { + } + } + } + } + } + } + else _catch_label_1: + { + unlabeled_statement_delete(p_unlabeled_statement); + p_unlabeled_statement = ((void *)0); + } + return p_unlabeled_statement; +} + +void label_delete(struct label * p) +{ + if (p) + { + expression_delete(p->constant_expression); + free(p); + } +} + +unsigned char type_is_enum(struct type * p_type); +void check_diferent_enuns(struct parser_ctx * ctx, struct token * operator_token, struct expression * left, struct expression * right, char * message); + +struct label *label(struct parser_ctx * ctx) +{ + if (ctx->current == ((void *)0)) + { + return ((void *)0); + } + struct label * p_label = calloc(1, sizeof (struct label)); + if (1) + { + if (p_label == ((void *)0)) + { + goto _catch_label_1; + } + p_label->p_first_token = ctx->current; + if (ctx->current->type == 8996) + { + p_label->p_identifier_opt = ctx->current; + parser_match(ctx); + if (parser_match_tk(ctx, 58) != 0) + { + goto _catch_label_1; + } + } + else + { + if (ctx->current->type == 9001) + { + if (ctx->p_current_selection_statement == ((void *)0) || ctx->p_current_selection_statement->condition == ((void *)0)) + { + goto _catch_label_1; + } + parser_match(ctx); + p_label->constant_expression = constant_expression(ctx, 1); + if (p_label->constant_expression == ((void *)0)) + { + goto _catch_label_1; + } + if (parser_match_tk(ctx, 58) != 0) + { + goto _catch_label_1; + } + long long case_value = object_to_signed_long_long(&p_label->constant_expression->object); + if (ctx->p_switch_value_list == ((void *)0)) + { + goto _catch_label_1; + } + struct switch_value * p_switch_value = switch_value_list_find(ctx->p_switch_value_list, case_value); + if (p_switch_value) + { + compiler_diagnostic_message(44, ctx, p_label->constant_expression->first_token, ((void *)0), "duplicate case value '%lld'", case_value); + ; + compiler_diagnostic_message(62, ctx, p_switch_value->p_label->constant_expression->first_token, ((void *)0), "previous declaration"); + } + struct switch_value * newvalue = calloc(1, sizeof *newvalue); + if (newvalue == ((void *)0)) + { + goto _catch_label_1; + } + newvalue->p_label = p_label; + newvalue->value = case_value; + switch_value_list_push(ctx->p_switch_value_list, newvalue); + if (ctx->p_current_selection_statement && ctx->p_current_selection_statement->condition && ctx->p_current_selection_statement->condition->expression) + { + if (type_is_enum(&ctx->p_current_selection_statement->condition->expression->type)) + { + if (type_is_enum(&p_label->constant_expression->type)) + { + check_diferent_enuns(ctx, p_label->constant_expression->first_token, p_label->constant_expression, ctx->p_current_selection_statement->condition->expression, "mismatch in enumeration types"); + } + else + { + } + } + if (ctx->p_current_selection_statement == ((void *)0)) + { + goto _catch_label_1; + } + struct enum_specifier * p_enum_specifier = ((void *)0); + if (ctx->p_current_selection_statement->condition && ctx->p_current_selection_statement->condition->expression && ctx->p_current_selection_statement->condition->expression->type.enum_specifier) + { + p_enum_specifier = get_complete_enum_specifier(ctx->p_current_selection_statement->condition->expression->type.enum_specifier); + } + if (p_enum_specifier) + { + struct enumerator * p_enumerator = find_enumerator_by_value(p_enum_specifier, case_value); + if (p_enumerator == ((void *)0)) + { + compiler_diagnostic_message(3, ctx, p_label->constant_expression->first_token, ((void *)0), "case value '%lld' not in enumerated type 'enum %s'", case_value, p_enum_specifier->tag_name); + } + else + { + } + } + } + } + else + { + if (ctx->current->type == 9007) + { + if (ctx->p_switch_value_list == ((void *)0)) + { + goto _catch_label_1; + } + if (ctx->p_switch_value_list->p_default) + { + goto _catch_label_1; + } + struct switch_value * p_default = calloc(1, sizeof *p_default); + if (p_default == ((void *)0)) + { + goto _catch_label_1; + } + p_default->p_label = p_label; + ctx->p_switch_value_list->p_default = p_default; + parser_match(ctx); + if (parser_match_tk(ctx, 58) != 0) + { + goto _catch_label_1; + } + } + } + } + } + else _catch_label_1: + { + label_delete(p_label); + p_label = ((void *)0); + } + return p_label; +} + +void labeled_statement_delete(struct labeled_statement * p) +{ + if (p) + { + label_delete(p->label); + statement_delete(p->statement); + free(p); + } +} + +struct labeled_statement *labeled_statement(struct parser_ctx * ctx) +{ + struct labeled_statement * p_labeled_statement = calloc(1, sizeof (struct labeled_statement)); + if (1) + { + if (p_labeled_statement == ((void *)0)) + { + goto _catch_label_1; + } + struct label * p_label = label(ctx); + if (p_label == ((void *)0)) + { + goto _catch_label_1; + } + p_labeled_statement->label = p_label; + struct statement * p_statement = statement(ctx); + if (p_statement == ((void *)0)) + { + goto _catch_label_1; + } + p_labeled_statement->statement = p_statement; + } + else _catch_label_1: + { + labeled_statement_delete(p_labeled_statement); + p_labeled_statement = ((void *)0); + } + return p_labeled_statement; +} + +void block_item_list_destroy(struct block_item_list * p); + +void compound_statement_delete(struct compound_statement * p) +{ + if (p) + { + block_item_list_destroy(&p->block_item_list); + free(p); + } +} + +struct block_item_list block_item_list(struct parser_ctx * ctx, unsigned char * error); + +struct compound_statement *compound_statement(struct parser_ctx * ctx) +{ + struct scope block_scope = {0, 0, 0, 0, 0, 10, 0, 0, 0}; + struct compound_statement * p_compound_statement = ((void *)0); + if (1) + { + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + p_compound_statement = calloc(1, sizeof (struct compound_statement)); + if (p_compound_statement == ((void *)0)) + { + goto _catch_label_1; + } + p_compound_statement->diagnostic_flags = ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index]; + scope_list_push(&ctx->scopes, &block_scope); + p_compound_statement->first_token = ctx->current; + if (parser_match_tk(ctx, 123) != 0) + { + goto _catch_label_1; + } + if (ctx->current == ((void *)0)) + { + compiler_diagnostic_message(970, ctx, ctx->input_list.tail, ((void *)0), "unexpected end of file"); + goto _catch_label_1; + } + if (ctx->current->type != 125) + { + unsigned char berror = 0; + p_compound_statement->block_item_list = block_item_list(ctx, &berror); + if (berror) + { + goto _catch_label_1; + } + } + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + p_compound_statement->last_token = ctx->current; + if (parser_match_tk(ctx, 125) != 0) + { + goto _catch_label_1; + } + { + int i = 0; + for (; i < block_scope.variables.capacity; i++) + { + if (block_scope.variables.table == ((void *)0)) + { + continue; + } + struct map_entry * entry = block_scope.variables.table[i]; + while (entry) + { + if (entry->type != 4 && entry->type != 5) + { + entry = entry->next; + continue; + } + struct declarator * p_declarator = ((void *)0); + struct init_declarator * p_init_declarator = ((void *)0); + if (entry->type == 5) + { + ; + p_init_declarator = entry->data.p_init_declarator; + p_declarator = p_init_declarator->p_declarator; + } + else + { + p_declarator = entry->data.p_declarator; + } + if (p_declarator) + { + if ( !type_is_maybe_unused(&p_declarator->type) && p_declarator->num_uses == 0) + { + if (p_declarator->name_opt && p_declarator->name_opt->token_origin->level == 0) + { + compiler_diagnostic_message(1, ctx, p_declarator->name_opt, ((void *)0), "'%s': unreferenced declarator", p_declarator->name_opt->lexeme); + } + } + } + entry = entry->next; + } + } + } + } + else _catch_label_1: + { + compound_statement_delete(p_compound_statement); + p_compound_statement = ((void *)0); + } + scope_list_pop(&ctx->scopes); + scope_destroy(&block_scope); + return p_compound_statement; +} + +void block_item_list_add(struct block_item_list * list, struct block_item * p_item) +{ + if (list->head == ((void *)0)) + { + list->head = p_item; + } + else + { + ; + ; + list->tail->next = p_item; + } + list->tail = p_item; +} + +void block_item_delete(struct block_item * p); + +void block_item_list_destroy(struct block_item_list * list) +{ + struct block_item * item = list->head; + while (item) + { + struct block_item * next = item->next; + item->next = ((void *)0); + block_item_delete(item); + item = next; + } +} + +struct block_item *block_item(struct parser_ctx * ctx); + +struct block_item_list block_item_list(struct parser_ctx * ctx, unsigned char * error) +{ + *error = 0; + struct block_item_list block_item_list = {0}; + struct block_item * p_block_item = ((void *)0); + if (1) + { + p_block_item = block_item(ctx); + if (p_block_item == ((void *)0)) + { + goto _catch_label_1; + } + block_item_list_add(&block_item_list, p_block_item); + p_block_item = ((void *)0); + while (ctx->current != ((void *)0) && ctx->current->type != 125) + { + p_block_item = block_item(ctx); + if (p_block_item == ((void *)0)) + { + goto _catch_label_1; + } + block_item_list_add(&block_item_list, p_block_item); + p_block_item = ((void *)0); + } + } + else _catch_label_1: + { + *error = 1; + } + return block_item_list; +} + +void block_item_delete(struct block_item * p) +{ + if (p) + { + declaration_delete(p->declaration); + label_delete(p->label); + unlabeled_statement_delete(p->unlabeled_statement); + ; + free(p); + } +} + +void naming_convention_local_var(struct parser_ctx * ctx, struct token * token, struct type * type); + +struct block_item *block_item(struct parser_ctx * ctx) +{ + struct block_item * p_block_item = ((void *)0); + if (1) + { + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + p_block_item = calloc(1, sizeof (struct block_item)); + if (p_block_item == ((void *)0)) + { + goto _catch_label_1; + } + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt = attribute_specifier_sequence_opt(ctx); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + attribute_specifier_sequence_delete(p_attribute_specifier_sequence_opt); + goto _catch_label_1; + } + p_block_item->first_token = ctx->current; + if (ctx->current->type == 9046) + { + parser_match(ctx); + if (ctx->current == ((void *)0)) + { + attribute_specifier_sequence_delete(p_attribute_specifier_sequence_opt); + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + if (ctx->current->type == 123) + { + parser_match(ctx); + while (ctx->current && ctx->current->type != 125) + { + parser_match(ctx); + } + parser_match(ctx); + } + else + { + while (ctx->current && ctx->current->type != 10) + { + ctx->current = ctx->current->next; + } + parser_match(ctx); + } + if (ctx->current == ((void *)0)) + { + attribute_specifier_sequence_delete(p_attribute_specifier_sequence_opt); + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + if (ctx->current->type == 59) + { + parser_match(ctx); + } + } + else + { + if (first_of_declaration_specifier(ctx) || first_of_static_assert_declaration(ctx) || first_of_pragma_declaration(ctx)) + { + p_block_item->declaration = declaration(ctx, p_attribute_specifier_sequence_opt, 4096); + if (p_block_item->declaration == ((void *)0)) + { + goto _catch_label_1; + } + p_attribute_specifier_sequence_opt = ((void *)0); + struct init_declarator * p = p_block_item->declaration->init_declarator_list.head; + while (p) + { + if (p->p_declarator->name_opt) + { + naming_convention_local_var(ctx, p->p_declarator->name_opt, &p->p_declarator->type); + } + p = p->next; + } + } + else + { + if (first_of_label(ctx)) + { + p_block_item->label = label(ctx); + if (p_block_item->label == ((void *)0)) + { + attribute_specifier_sequence_delete(p_attribute_specifier_sequence_opt); + goto _catch_label_1; + } + } + else + { + p_block_item->unlabeled_statement = unlabeled_statement(ctx); + if (p_block_item->unlabeled_statement == ((void *)0)) + { + attribute_specifier_sequence_delete(p_attribute_specifier_sequence_opt); + goto _catch_label_1; + } + } + } + } + attribute_specifier_sequence_delete(p_attribute_specifier_sequence_opt); + } + else _catch_label_1: + { + block_item_delete(p_block_item); + p_block_item = ((void *)0); + } + return p_block_item; +} + +void try_statement_delete(struct try_statement * p) +{ + if (p) + { + secondary_block_delete(p->catch_secondary_block_opt); + secondary_block_delete(p->secondary_block); + free(p); + } +} + +struct try_statement *try_statement(struct parser_ctx * ctx) +{ + struct try_statement * p_try_statement = ((void *)0); + if (1) + { + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + p_try_statement = calloc(1, sizeof (struct try_statement)); + if (p_try_statement == ((void *)0)) + { + goto _catch_label_1; + } + p_try_statement->first_token = ctx->current; + ; + 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; + if (parser_match_tk(ctx, 9036) != 0) + { + goto _catch_label_1; + } + struct secondary_block * p_secondary_block = secondary_block(ctx); + if (p_secondary_block == ((void *)0)) + { + goto _catch_label_1; + } + p_try_statement->secondary_block = p_secondary_block; + ctx->p_current_try_statement_opt = try_statement_copy_opt; + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + if (ctx->current->type == 9006) + { + p_try_statement->catch_token_opt = ctx->current; + parser_match(ctx); + ; + p_try_statement->catch_secondary_block_opt = secondary_block(ctx); + if (p_try_statement->catch_secondary_block_opt == ((void *)0)) + { + goto _catch_label_1; + } + } + if (ctx->previous == ((void *)0)) + { + goto _catch_label_1; + } + p_try_statement->last_token = ctx->previous; + } + else _catch_label_1: + { + try_statement_delete(p_try_statement); + p_try_statement = ((void *)0); + } + return p_try_statement; +} + +void condition_delete(struct condition * p); +void init_statement_delete(struct init_statement * p); + +void selection_statement_delete(struct selection_statement * p) +{ + if (p) + { + secondary_block_delete(p->secondary_block); + secondary_block_delete(p->else_secondary_block_opt); + condition_delete(p->condition); + init_statement_delete(p->p_init_statement); + free(p); + } +} + +unsigned char style_has_one_space(struct token * token); +struct init_statement *init_statement(struct parser_ctx * ctx, unsigned char ignore_semicolon); +struct condition *condition(struct parser_ctx * ctx); + +struct selection_statement *selection_statement(struct parser_ctx * ctx) +{ + struct scope if_scope = {0}; + scope_list_push(&ctx->scopes, &if_scope); + struct selection_statement * p_selection_statement = ((void *)0); + if (1) + { + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + p_selection_statement = calloc(1, sizeof (struct selection_statement)); + if (p_selection_statement == ((void *)0)) + { + goto _catch_label_1; + } + p_selection_statement->first_token = ctx->current; + unsigned char is_if = (ctx->current->type == 9017); + if (ctx->current->type == 9017 || ctx->current->type == 9034) + { + parser_match(ctx); + } + else + { + goto _catch_label_1; + } + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + if ( !(ctx->current->flags & 2) && !style_has_one_space(ctx->current)) + { + compiler_diagnostic_message(10, ctx, ctx->current, ((void *)0), "one space"); + } + p_selection_statement->open_parentesis_token = ctx->current; + if (parser_match_tk(ctx, 40) != 0) + { + goto _catch_label_1; + } + p_selection_statement->p_init_statement = init_statement(ctx, 1); + if (p_selection_statement->p_init_statement == ((void *)0)) + { + goto _catch_label_1; + } + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + if (ctx->current->type == 59) + { + if (p_selection_statement->p_init_statement->p_simple_declaration) + { + p_selection_statement->p_init_statement->p_simple_declaration->last_token = ctx->current; + } + else + { + if (p_selection_statement->p_init_statement->p_expression_statement) + { + p_selection_statement->p_init_statement->p_simple_declaration->last_token = ctx->current; + } + } + parser_match(ctx); + p_selection_statement->condition = condition(ctx); + } + else + { + if (ctx->current->type == 41) + { + p_selection_statement->condition = calloc(1, sizeof *p_selection_statement->condition); + if (p_selection_statement->condition == ((void *)0)) + { + goto _catch_label_1; + } + if (p_selection_statement->p_init_statement->p_expression_statement) + { + p_selection_statement->condition->first_token = p_selection_statement->p_init_statement->p_expression_statement->expression_opt->first_token; + p_selection_statement->condition->last_token = p_selection_statement->p_init_statement->p_expression_statement->expression_opt->last_token; + p_selection_statement->condition->expression = p_selection_statement->p_init_statement->p_expression_statement->expression_opt; + p_selection_statement->p_init_statement->p_expression_statement->expression_opt = ((void *)0); + } + if (p_selection_statement->p_init_statement->p_simple_declaration) + { + p_selection_statement->condition->first_token = p_selection_statement->p_init_statement->p_simple_declaration->first_token; + p_selection_statement->condition->last_token = p_selection_statement->p_init_statement->p_simple_declaration->last_token; + if (p_selection_statement->p_init_statement->p_simple_declaration->init_declarator_list.head != p_selection_statement->p_init_statement->p_simple_declaration->init_declarator_list.tail) + { + ; + goto _catch_label_1; + } + p_selection_statement->condition->p_init_declarator = p_selection_statement->p_init_statement->p_simple_declaration->init_declarator_list.head; + p_selection_statement->p_init_statement->p_simple_declaration->init_declarator_list.head = ((void *)0); + p_selection_statement->p_init_statement->p_simple_declaration->init_declarator_list.tail = ((void *)0); + p_selection_statement->condition->p_declaration_specifiers = p_selection_statement->p_init_statement->p_simple_declaration->p_declaration_specifiers; + p_selection_statement->p_init_statement->p_simple_declaration->p_declaration_specifiers = ((void *)0); + } + init_statement_delete(p_selection_statement->p_init_statement); + p_selection_statement->p_init_statement = ((void *)0); + } + } + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + p_selection_statement->close_parentesis_token = ctx->current; + if (parser_match_tk(ctx, 41) != 0) + { + goto _catch_label_1; + } + struct selection_statement * previous = ctx->p_current_selection_statement; + ctx->p_current_selection_statement = p_selection_statement; + struct switch_value_list * previous_switch_value_list = ctx->p_switch_value_list; + struct switch_value_list switch_value_list = {0}; + ctx->p_switch_value_list = &switch_value_list; + struct secondary_block * p_secondary_block = secondary_block(ctx); + if (p_secondary_block == ((void *)0)) + { + switch_value_destroy(&switch_value_list); + goto _catch_label_1; + } + if (p_secondary_block->statement->unlabeled_statement && p_secondary_block->statement->unlabeled_statement->expression_statement && p_secondary_block->statement->unlabeled_statement->expression_statement->expression_opt == ((void *)0)) + { + compiler_diagnostic_message(44, ctx, p_secondary_block->first_token, ((void *)0), "empty controlled statement found; is this the intent?"); + } + ; + p_selection_statement->secondary_block = p_secondary_block; + if (p_selection_statement->first_token->type == 9034) + { + if (switch_value_list.p_default == ((void *)0)) + { + struct enum_specifier * p_enum_specifier = ((void *)0); + if (ctx->p_current_selection_statement && ctx->p_current_selection_statement->condition && ctx->p_current_selection_statement->condition->expression && ctx->p_current_selection_statement->condition->expression->type.enum_specifier) + { + p_enum_specifier = get_complete_enum_specifier(ctx->p_current_selection_statement->condition->expression->type.enum_specifier); + } + if (p_enum_specifier) + { + struct enumerator * p = p_enum_specifier->enumerator_list.head; + while (p) + { + struct switch_value * p_used = switch_value_list_find(&switch_value_list, object_to_signed_long_long(&p->value)); + if (p_used == ((void *)0)) + { + compiler_diagnostic_message(44, ctx, ctx->current, ((void *)0), "enumeration value '%s' not handled in switch", p->token->lexeme); + } + p = p->next; + } + } + } + } + ctx->p_current_selection_statement = previous; + ctx->p_switch_value_list = previous_switch_value_list; + switch_value_destroy(&switch_value_list); + if (is_if && ctx->current && ctx->current->type == 9011) + { + p_selection_statement->else_token_opt = ctx->current; + parser_match(ctx); + ; + struct secondary_block * p_secondary_block2 = secondary_block(ctx); + if (p_secondary_block2 == ((void *)0)) + { + goto _catch_label_1; + } + p_selection_statement->else_secondary_block_opt = p_secondary_block2; + } + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + struct token * p_tk = previous_parser_token(ctx->current); + if (p_tk == ((void *)0)) + { + goto _catch_label_1; + } + p_selection_statement->last_token = p_tk; + } + else _catch_label_1: + { + selection_statement_delete(p_selection_statement); + p_selection_statement = ((void *)0); + } + scope_list_pop(&ctx->scopes); + scope_destroy(&if_scope); + return p_selection_statement; +} + +struct defer_statement *defer_statement(struct parser_ctx * ctx) +{ + struct defer_statement * p_defer_statement = ((void *)0); + if (1) + { + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + p_defer_statement = calloc(1, sizeof (struct defer_statement)); + if (p_defer_statement == ((void *)0)) + { + goto _catch_label_1; + } + if (ctx->current->type == 9009) + { + p_defer_statement->first_token = ctx->current; + parser_match(ctx); + struct secondary_block * p_secondary_block = secondary_block(ctx); + if (p_secondary_block == ((void *)0)) + { + goto _catch_label_1; + } + p_defer_statement->secondary_block = p_secondary_block; + if (ctx->previous == ((void *)0)) + { + goto _catch_label_1; + } + p_defer_statement->last_token = ctx->previous; + } + } + else _catch_label_1: + { + defer_statement_delete(p_defer_statement); + p_defer_statement = ((void *)0); + } + return p_defer_statement; +} + +void iteration_statement_delete(struct iteration_statement * 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 *iteration_statement(struct parser_ctx * ctx) +{ + struct iteration_statement * p_iteration_statement = ((void *)0); + if (1) + { + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + p_iteration_statement = calloc(1, sizeof (struct iteration_statement)); + if (p_iteration_statement == ((void *)0)) + { + goto _catch_label_1; + } + p_iteration_statement->first_token = ctx->current; + if (ctx->current->type == 9008) + { + parser_match(ctx); + struct secondary_block * p_secondary_block = secondary_block(ctx); + if (p_secondary_block == ((void *)0)) + { + goto _catch_label_1; + } + p_iteration_statement->secondary_block = p_secondary_block; + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + p_iteration_statement->second_token = ctx->current; + if (parser_match_tk(ctx, 9042) != 0) + { + goto _catch_label_1; + } + if (parser_match_tk(ctx, 40) != 0) + { + goto _catch_label_1; + } + p_iteration_statement->expression1 = expression(ctx); + if (parser_match_tk(ctx, 41) != 0) + { + goto _catch_label_1; + } + if (parser_match_tk(ctx, 59) != 0) + { + goto _catch_label_1; + } + } + else + { + if (ctx->current->type == 9042) + { + parser_match(ctx); + if (parser_match_tk(ctx, 40) != 0) + { + goto _catch_label_1; + } + p_iteration_statement->expression1 = expression(ctx); + if (parser_match_tk(ctx, 41) != 0) + { + goto _catch_label_1; + } + struct secondary_block * p_secondary_block = secondary_block(ctx); + if (p_secondary_block == ((void *)0)) + { + goto _catch_label_1; + } + p_iteration_statement->secondary_block = p_secondary_block; + } + else + { + if (ctx->current->type == 9015) + { + parser_match(ctx); + if (parser_match_tk(ctx, 40) != 0) + { + goto _catch_label_1; + } + if (first_of_declaration_specifier(ctx)) + { + struct scope for_scope = {0}; + scope_list_push(&ctx->scopes, &for_scope); + p_iteration_statement->declaration = declaration(ctx, ((void *)0), 4096); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + scope_list_pop(&ctx->scopes); + scope_destroy(&for_scope); + goto _catch_label_1; + } + if (ctx->current->type != 59) + { + p_iteration_statement->expression1 = expression(ctx); + if (p_iteration_statement->expression1 == ((void *)0)) + { + scope_list_pop(&ctx->scopes); + scope_destroy(&for_scope); + goto _catch_label_1; + } + } + if (parser_match_tk(ctx, 59) != 0) + { + scope_list_pop(&ctx->scopes); + scope_destroy(&for_scope); + goto _catch_label_1; + } + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + scope_list_pop(&ctx->scopes); + scope_destroy(&for_scope); + goto _catch_label_1; + } + if (ctx->current->type != 41) + { + p_iteration_statement->expression2 = expression(ctx); + } + if (parser_match_tk(ctx, 41) != 0) + { + scope_list_pop(&ctx->scopes); + scope_destroy(&for_scope); + goto _catch_label_1; + } + struct secondary_block * p_secondary_block = secondary_block(ctx); + if (p_secondary_block == ((void *)0)) + { + scope_list_pop(&ctx->scopes); + scope_destroy(&for_scope); + goto _catch_label_1; + } + p_iteration_statement->secondary_block = p_secondary_block; + scope_list_pop(&ctx->scopes); + scope_destroy(&for_scope); + } + else + { + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + if (ctx->current->type != 59) + { + p_iteration_statement->expression0 = expression(ctx); + } + if (parser_match_tk(ctx, 59) != 0) + { + goto _catch_label_1; + } + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + if (ctx->current->type != 59) + { + p_iteration_statement->expression1 = expression(ctx); + } + if (parser_match_tk(ctx, 59) != 0) + { + goto _catch_label_1; + } + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + if (ctx->current->type != 41) + { + p_iteration_statement->expression2 = expression(ctx); + } + if (parser_match_tk(ctx, 41) != 0) + { + goto _catch_label_1; + } + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + struct secondary_block * p_secondary_block = secondary_block(ctx); + if (p_secondary_block == ((void *)0)) + { + goto _catch_label_1; + } + p_iteration_statement->secondary_block = p_secondary_block; + } + } + } + } + } + else _catch_label_1: + { + iteration_statement_delete(p_iteration_statement); + p_iteration_statement = ((void *)0); + } + return p_iteration_statement; +} + +void jump_statement_delete(struct jump_statement * p) +{ + if (p) + { + expression_delete(p->expression_opt); + free(p); + } +} + +struct type get_function_return_type(struct type * p_type); + +struct jump_statement *jump_statement(struct parser_ctx * ctx) +{ + struct jump_statement * p_jump_statement = ((void *)0); + if (1) + { + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + p_jump_statement = calloc(1, sizeof (struct jump_statement)); + if (p_jump_statement == ((void *)0)) + { + goto _catch_label_1; + } + p_jump_statement->first_token = ctx->current; + if (ctx->current->type == 9016) + { + parser_match(ctx); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + p_jump_statement->label = ctx->current; + if (parser_match_tk(ctx, 8996) != 0) + { + goto _catch_label_1; + } + } + else + { + if (ctx->current->type == 9005) + { + parser_match(ctx); + } + else + { + if (ctx->current->type == 9000) + { + parser_match(ctx); + } + else + { + if (ctx->current->type == 9037) + { + if (ctx->p_current_try_statement_opt == ((void *)0)) + { + compiler_diagnostic_message(1110, ctx, ctx->current, ((void *)0), "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 == 9027) + { + struct token * p_return_token = ctx->current; + parser_match(ctx); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + if (ctx->current->type != 59) + { + p_jump_statement->expression_opt = expression(ctx); + if (p_jump_statement->expression_opt) + { + 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(1120, ctx, p_return_token, ((void *)0), "void function '%s' should not return a value", ctx->p_current_function_opt->init_declarator_list.head->p_declarator->name_opt->lexeme); + } + else + { + check_assigment(ctx, &return_type, p_jump_statement->expression_opt, 0); + } + type_destroy(&return_type); + } + } + } + else + { + ; + } + } + } + } + } + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + p_jump_statement->last_token = ctx->current; + if (parser_match_tk(ctx, 59) != 0) + { + goto _catch_label_1; + } + } + else _catch_label_1: + { + jump_statement_delete(p_jump_statement); + p_jump_statement = ((void *)0); + } + return p_jump_statement; +} + +void expression_statement_delete(struct expression_statement * p) +{ + if (p) + { + attribute_specifier_sequence_delete(p->p_attribute_specifier_sequence_opt); + expression_delete(p->expression_opt); + free(p); + } +} + +struct expression_statement *expression_statement(struct parser_ctx * ctx, unsigned char ignore_semicolon) +{ + struct expression_statement * p_expression_statement = calloc(1, sizeof (struct expression_statement)); + if (1) + { + if (p_expression_statement == ((void *)0)) + { + goto _catch_label_1; + } + p_expression_statement->p_attribute_specifier_sequence_opt = attribute_specifier_sequence_opt(ctx); + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + if (ctx->current->type != 59) + { + p_expression_statement->expression_opt = expression(ctx); + if (p_expression_statement->expression_opt == ((void *)0)) + { + goto _catch_label_1; + } + } + if ( !ignore_semicolon && parser_match_tk(ctx, 59) != 0) + { + goto _catch_label_1; + } + } + else _catch_label_1: + { + expression_statement_delete(p_expression_statement); + p_expression_statement = ((void *)0); + } + return p_expression_statement; +} + +void declaration_list_add(struct declaration_list * list, struct declaration * p_declaration) +{ + if (list->head == ((void *)0)) + { + list->head = p_declaration; + } + else + { + ; + ; + list->tail->next = p_declaration; + } + list->tail = p_declaration; +} + +void simple_declaration_delete(struct simple_declaration * p_simple_declaration) +{ + if (p_simple_declaration) + { + declaration_specifiers_delete(p_simple_declaration->p_declaration_specifiers); + init_declarator_list_destroy(&p_simple_declaration->init_declarator_list); + attribute_specifier_sequence_delete(p_simple_declaration->p_attribute_specifier_sequence_opt); + free(p_simple_declaration); + } +} + +void condition_delete(struct condition * p_condition) +{ + if (p_condition) + { + init_declarator_delete(p_condition->p_init_declarator); + expression_delete(p_condition->expression); + attribute_specifier_sequence_delete(p_condition->p_attribute_specifier_sequence_opt); + declaration_specifiers_delete(p_condition->p_declaration_specifiers); + free(p_condition); + } +} + +struct condition *condition(struct parser_ctx * ctx) +{ + struct condition * p_condition = ((void *)0); + if (1) + { + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + p_condition = calloc(1, sizeof *p_condition); + if (p_condition == ((void *)0)) + { + goto _catch_label_1; + } + p_condition->first_token = ctx->current; + if (first_of_declaration_specifier(ctx)) + { + p_condition->p_attribute_specifier_sequence_opt = attribute_specifier_sequence(ctx); + p_condition->p_declaration_specifiers = declaration_specifiers(ctx, 4096); + if (p_condition->p_declaration_specifiers == ((void *)0)) + { + goto _catch_label_1; + } + struct init_declarator * p_init_declarator = init_declarator(ctx, p_condition->p_declaration_specifiers); + if (p_init_declarator == ((void *)0)) + { + goto _catch_label_1; + } + p_condition->p_init_declarator = p_init_declarator; + } + else + { + p_condition->expression = expression(ctx); + if (p_condition->expression == ((void *)0)) + { + goto _catch_label_1; + } + } + if (ctx->current == ((void *)0)) + { + unexpected_end_of_file(ctx); + goto _catch_label_1; + } + struct token * previous = previous_parser_token(ctx->current); + if (previous) + { + p_condition->last_token = previous; + } + } + else _catch_label_1: + { + condition_delete(p_condition); + p_condition = ((void *)0); + } + return p_condition; +} + +void init_statement_delete(struct init_statement * p_init_statement) +{ + if (p_init_statement) + { + expression_statement_delete(p_init_statement->p_expression_statement); + simple_declaration_delete(p_init_statement->p_simple_declaration); + free(p_init_statement); + } +} + +struct init_statement *init_statement(struct parser_ctx * ctx, unsigned char ignore_semicolon) +{ + struct init_statement * p_init_statement = ((void *)0); + if (1) + { + p_init_statement = calloc(1, sizeof *p_init_statement); + if (p_init_statement == ((void *)0)) + { + goto _catch_label_1; + } + if (first_of_declaration_specifier(ctx)) + { + p_init_statement->p_simple_declaration = simple_declaration(ctx, ((void *)0), ignore_semicolon); + } + else + { + p_init_statement->p_expression_statement = expression_statement(ctx, ignore_semicolon); + } + } + else _catch_label_1: + { + init_statement_delete(p_init_statement); + p_init_statement = ((void *)0); + } + return p_init_statement; +} + +void declaration_delete(struct declaration * p) +{ + if (p) + { + attribute_specifier_sequence_delete(p->p_attribute_specifier_sequence_opt); + static_assert_declaration_delete(p->static_assert_declaration); + declaration_specifiers_delete(p->declaration_specifiers); + compound_statement_delete(p->function_body); + pragma_declaration_delete(p->pragma_declaration); + init_declarator_list_destroy(&p->init_declarator_list); + ; + free(p); + } +} + +void declaration_list_destroy(struct declaration_list * list) +{ + struct declaration * p = list->head; + while (p) + { + struct declaration * next = p->next; + p->next = ((void *)0); + declaration_delete(p); + p = next; + } +} + +struct declaration *external_declaration(struct parser_ctx * ctx); + +struct declaration_list translation_unit(struct parser_ctx * ctx, unsigned char * berror) +{ + *berror = 0; + struct declaration_list declaration_list = {0}; + if (1) + { + while (ctx->current != ((void *)0)) + { + struct declaration * p = external_declaration(ctx); + if (p == ((void *)0)) + { + goto _catch_label_1; + } + declaration_list_add(&declaration_list, p); + } + } + else _catch_label_1: + { + *berror = 1; + } + return declaration_list; +} + +struct declaration *external_declaration(struct parser_ctx * ctx) +{ + return function_definition_or_declaration(ctx); +} + +struct compound_statement *function_body(struct parser_ctx * ctx) +{ + ctx->try_catch_block_index = 0; + ctx->p_current_try_statement_opt = ((void *)0); + return compound_statement(ctx); +} + +static void show_unused_file_scope(struct parser_ctx * ctx) +{ + if (ctx->scopes.head == ((void *)0)) + { + return; + } + { + int i = 0; + for (; i < ctx->scopes.head->variables.capacity; i++) + { + if (ctx->scopes.head->variables.table == ((void *)0)) + { + continue; + } + struct map_entry * entry = ctx->scopes.head->variables.table[i]; + while (entry) + { + if (entry->type != 4 && entry->type != 5) + { + entry = entry->next; + continue; + } + struct declarator * p_declarator = ((void *)0); + struct init_declarator * p_init_declarator = ((void *)0); + if (entry->type == 5) + { + ; + p_init_declarator = entry->data.p_init_declarator; + p_declarator = p_init_declarator->p_declarator; + } + else + { + p_declarator = entry->data.p_declarator; + } + if (p_declarator && p_declarator->first_token_opt && p_declarator->first_token_opt->level == 0 && declarator_is_function(p_declarator) && p_declarator->declaration_specifiers && (p_declarator->declaration_specifiers->storage_class_specifier_flags & 4)) + { + if ( !type_is_maybe_unused(&p_declarator->type) && p_declarator->num_uses == 0) + { + if (p_declarator->name_opt) + { + compiler_diagnostic_message(1, ctx, p_declarator->name_opt, ((void *)0), "declarator '%s' not used", p_declarator->name_opt->lexeme); + } + } + } + entry = entry->next; + } + } + } +} + +struct declaration_list parse(struct parser_ctx * ctx, struct token_list * list, unsigned char * berror) +{ + *berror = 0; + s_anonymous_struct_count = 0; + struct declaration_list l = {0}; + struct scope file_scope = {0}; + if (1) + { + scope_list_push(&ctx->scopes, &file_scope); + ctx->input_list = *list; + ctx->current = ctx->input_list.head; + parser_skip_blanks(ctx); + unsigned char local_error = 0; + l = translation_unit(ctx, &local_error); + if (local_error) + { + goto _catch_label_1; + } + show_unused_file_scope(ctx); + } + else _catch_label_1: + { + *berror = 1; + } + scope_destroy(&file_scope); + return l; +} + +struct include_dir *include_dir_add(struct include_dir_list * list, char * path); +struct token_list tokenizer(struct tokenizer_ctx * ctx, char * text, char * filename_opt, int level, int addflags); +struct token_list preprocessor(struct preprocessor_ctx * ctx, struct token_list * input_list, int level); +void token_list_destroy(struct token_list * list); + +int fill_preprocessor_options(int argc, char ** argv, struct preprocessor_ctx * prectx) +{ + { + int i = 1; + for (; i < argc; i++) + { + if (argv[i][0] != 45) + { + continue; + } + if (argv[i][1] == 73) + { + include_dir_add(&prectx->include_dir, argv[i] + 2); + continue; + } + if (argv[i][1] == 68) + { + char buffer[200] = {0}; + snprintf(buffer, sizeof buffer, "#define %s \n", argv[i] + 2); + char * p = &buffer[7]; + while ( *p) + { + if ( *p == 61) + { + *p = 32; + break; + } + p++; + } + struct tokenizer_ctx tctx = {0}; + struct token_list l1 = tokenizer(&tctx, buffer, "", 0, 0); + struct token_list r = preprocessor(prectx, &l1, 0); + token_list_destroy(&l1); + token_list_destroy(&r); + continue; + } + } + } + return 0; +} + +unsigned long GetEnvironmentVariableA(char * lpName, char * lpBuffer, unsigned long nSize); +char *strcat(char * _Destination, char * _Source); + +void append_msvc_include_dir(struct preprocessor_ctx * prectx) +{ + char env[2000] = {0}; + int n = GetEnvironmentVariableA("INCLUDE", env, sizeof (env)); + if (n > 0) + { + char * p = env; + for (; ; ) + { + if ( *p == 0) + { + break; + } + char filename_local[500] = {0}; + int count = 0; + while ( *p != 0 && ( *p != 59 && *p != 10)) + { + 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++; + } + } +} + +void c_visit(struct ast * ast) +{ +} + +struct _iobuf *fopen(char * _FileName, char * _Mode); +int *_errno(void); + +int generate_config_file(char * configpath) +{ + struct _iobuf * outfile = ((void *)0); + int error = 0; + if (1) + { + outfile = fopen(configpath, "w"); + if (outfile == ((void *)0)) + { + printf("Cannot open the file '%s' for writing.\n", configpath); + error = ( *_errno()); + goto _catch_label_1; + } + fprintf(outfile, "//This was generated by running cake -autoconfig \n"); + char env[2000] = {0}; + int n = GetEnvironmentVariableA("INCLUDE", env, sizeof (env)); + if (n <= 0) + { + printf("INCLUDE not found.\nPlease, run cake -autoconfig inside visual studio command prompty.\n"); + error = 1; + goto _catch_label_1; + } + fprintf(outfile, "//This file was generated reading the variable INCLUDE inside Visual Studio Command Prompt.\n"); + fprintf(outfile, "//echo %%INCLUDE%% \n"); + char * p = env; + for (; ; ) + { + if ( *p == 0) + { + break; + } + char filename_local[500] = {0}; + int count = 0; + while ( *p != 0 && ( *p != 59 && *p != 10)) + { + filename_local[count] = *p; + p++; + count++; + } + filename_local[count] = 0; + if (count > 0) + { + strcat(filename_local, "/"); + char * pch = filename_local; + while ( *pch) + { + if ( *pch == 92) + { + *pch = 47; + } + pch++; + } + fprintf(outfile, "#pragma dir \"%s\"\n", filename_local); + } + if ( *p == 0) + { + break; + } + p++; + } + } + else _catch_label_1: + { + } + if (outfile) + { + fclose(outfile); + } + if (error == 0) + { + printf("file '%s'\n", configpath); + printf("successfully generated\n"); + } + return error; +} + +void add_standard_macros(struct preprocessor_ctx * ctx); +int include_config_header(struct preprocessor_ctx * ctx, char * file_name); +char *read_file(char * path, unsigned char append_newline); +int _mkdir(char * _Path); +char *basename(char * filename); +void print_tokens(struct token * p_token); +char *print_preprocessed_to_string2(struct token * p_token); +void d_visit(struct d_visit_ctx * ctx, struct osstream * oss); +char *get_posix_error_message(int error); +void ast_destroy(struct ast * ast); +void preprocessor_ctx_destroy(struct preprocessor_ctx * p); + +int compile_one_file(char * file_name, struct options * options, char * out_file_name, int argc, char ** argv, struct report * report) +{ + printf("%s\n", file_name); + struct preprocessor_ctx prectx = {0}; + prectx.macros.capacity = 5000; + add_standard_macros(&prectx); + if (include_config_header(&prectx, file_name) != 0) + { + } + struct ast ast = {0}; + char * s = ((void *)0); + struct parser_ctx ctx = {0}; + struct tokenizer_ctx tctx = {0}; + struct token_list tokens = {0}; + ctx.options = *options; + ctx.p_report = report; + char * content = ((void *)0); + if (1) + { + if (fill_preprocessor_options(argc, argv, &prectx) != 0) + { + goto _catch_label_1; + } + prectx.options = *options; + append_msvc_include_dir(&prectx); + content = read_file(file_name, 1); + if (content == ((void *)0)) + { + report->error_count++; + printf("file not found '%s'\n", file_name); + goto _catch_label_1; + } + if (options->sarif_output) + { + char sarif_file_name[260] = {0}; + if (options->sarifpath[0] != 0) + { + _mkdir(options->sarifpath); + snprintf(sarif_file_name, sizeof sarif_file_name, "%s/%s.cake.sarif", options->sarifpath, basename(file_name)); + } + else + { + snprintf(sarif_file_name, sizeof sarif_file_name, "%s.cake.sarif", file_name); + } + ctx.sarif_file = (struct _iobuf *)fopen(sarif_file_name, "w"); + if (ctx.sarif_file) + { + char * begin_sarif = "{\n"; + fprintf(ctx.sarif_file, "%s", begin_sarif); + } + else + { + report->error_count++; + printf("cannot open Sarif output file '%s'\n", sarif_file_name); + goto _catch_label_1; + } + } + tokens = tokenizer(&tctx, content, file_name, 0, 0); + if (tctx.n_errors > 0) + { + goto _catch_label_1; + } + if (options->dump_tokens) + { + print_tokens(tokens.head); + } + ast.token_list = preprocessor(&prectx, &tokens, 0); + report->warnings_count = prectx.n_warnings; + report->error_count = prectx.n_errors; + if (prectx.n_errors > 0) + { + goto _catch_label_1; + } + if (options->dump_pptokens) + { + if (ast.token_list.head != ((void *)0)) + { + print_tokens(ast.token_list.head); + } + } + if (options->preprocess_only) + { + char * s2 = print_preprocessed_to_string2(ast.token_list.head); + printf("%s", s2); + free((void *)s2); + } + else + { + unsigned char berror = 0; + ast.declaration_list = parse(&ctx, &ast.token_list, &berror); + if (berror || report->error_count > 0) + { + goto _catch_label_1; + } + if ( !options->no_output) + { + if (options->target == 0) + { + struct osstream ss = {0}; + struct d_visit_ctx ctx2 = {0}; + ctx2.ast = ast; + d_visit(&ctx2, &ss); + s = ss.c_str; + } + struct _iobuf * outfile = fopen(out_file_name, "w"); + if (outfile) + { + if (s) + { + fprintf(outfile, "%s", s); + } + fclose(outfile); + } + else + { + report->error_count++; + printf("cannot open output file '%s' - %s\n", out_file_name, get_posix_error_message(( *_errno()))); + goto _catch_label_1; + } + } + } + if (ctx.sarif_file) + { + fprintf(ctx.sarif_file, "%s", " ],\n"); + fclose(ctx.sarif_file); + ctx.sarif_file = ((void *)0); + } + } + else _catch_label_1: + { + } + if (ctx.options.test_mode) + { + char buf[260] = {0}; + snprintf(buf, sizeof buf, "%s.txt", file_name); + char * content_expected = read_file(buf, 0); + if (content_expected) + { + if (s && strcmp(content_expected, s) != 0) + { + printf("diferent"); + report->error_count++; + } + free(content_expected); + } + if (report->fatal_error_expected != 0) + { + if (report->last_diagnostics_ids[0] == report->fatal_error_expected) + { + report->error_count--; + } + } + if (report->error_count > 0 || report->warnings_count > 0) + { + printf("-------------------------------------------\n"); + printf("%s", content); + printf("\n-------------------------------------------\n"); + printf("\x1b[91m", report->error_count, report->warnings_count); + printf("\n\n"); + report->test_failed++; + } + else + { + report->test_succeeded++; + printf("\x1b[92m"); + } + } + token_list_destroy(&tokens); + parser_ctx_destroy(&ctx); + free((void *)s); + free(content); + ast_destroy(&ast); + preprocessor_ctx_destroy(&prectx); + return report->error_count > 0; +} + +char *strrchr(char * _String, int _Ch); +char *dirname(char * path); +struct TAGDIR *opendir(char * name); +struct dirent *readdir(struct TAGDIR * dirp); +char *strcpy(char * _Destination, char * _Source); +int closedir(struct TAGDIR * dirp); + +int compile_many_files(char * file_name, struct options * options, char * out_file_name, int argc, char ** argv, struct report * report) +{ + char * file_name_name = basename(file_name); + char * file_name_extension = strrchr((char *)file_name_name, 46); + if (file_name_extension == ((void *)0)) + { + ; + } + int num_files = 0; + char path[260] = {0}; + snprintf(path, sizeof path, "%s", file_name); + dirname(path); + struct TAGDIR * dir = opendir(path); + if (dir == ((void *)0)) + { + return ( *_errno()); + } + struct dirent * dp; + while ((dp = readdir(dir)) != ((void *)0)) + { + if (strcmp(dp->d_name, ".") == 0 || strcmp(dp->d_name, "..") == 0) + { + continue; + } + char fromlocal[257] = {0}; + snprintf(fromlocal, sizeof fromlocal, "%s/%s", "", dp->d_name); + if (dp->d_type & 4) + { + } + else + { + char * file_name_iter = basename(dp->d_name); + char * file_extension = strrchr((char *)file_name_iter, 46); + if (file_name_extension && file_extension && strcmp(file_name_extension, file_extension) == 0) + { + char out_file_name_final[260] = {0}; + strcpy(out_file_name_final, out_file_name); + dirname(out_file_name_final); + strcat(out_file_name_final, "/"); + strcat(out_file_name_final, file_name_iter); + char in_file_name_final[260] = {0}; + strcpy(in_file_name_final, file_name); + dirname(in_file_name_final); + strcat(in_file_name_final, "/"); + strcat(in_file_name_final, file_name_iter); + struct report report_local = {0}; + report_local.test_mode = report->test_mode; + compile_one_file(in_file_name_final, options, out_file_name_final, argc, argv, &report_local); + report->fatal_error_expected = report_local.fatal_error_expected; + report->error_count = report_local.error_count; + report->warnings_count = report_local.warnings_count; + report->info_count = report_local.info_count; + report->test_succeeded = report_local.test_succeeded; + report->test_failed = report_local.test_failed; + num_files++; + } + } + } + closedir(dir); + return num_files; +} + +char *realpath(char * path, char * resolved_path); +char *strncpy(char * _Destination, char * _Source, unsigned int _Count); + +static void longest_common_path(int argc, char ** argv, char root_dir[260]) +{ + { + int i = 1; + for (; i < argc; i++) + { + if (argv[i][0] == 45) + { + continue; + } + char fullpath_i[260] = {0}; + realpath(argv[i], fullpath_i); + strcpy(root_dir, fullpath_i); + dirname(root_dir); + { + int k = 0; + for (; k < 260; k++) + { + char ch = fullpath_i[k]; + { + int j = 2; + for (; j < argc; j++) + { + if (argv[j][0] == 45) + { + continue; + } + char fullpath_j[260] = {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; + } + } + } + } + } + exit: + ; +} + +unsigned int strlen(char * _Str); + +static int create_multiple_paths(char * root, char * outdir) +{ + char * p = outdir + strlen(root) + 1; + for (; ; ) + { + if ( *p != 0 && *p != 47 && *p != 92) + { + p++; + continue; + } + char temp[260] = {0}; + strncpy(temp, outdir, p - outdir); + int er = _mkdir(temp); + if (er != 0) + { + er = ( *_errno()); + if (er != 17) + { + printf("error creating output folder '%s' - %s\n", temp, get_posix_error_message(er)); + return er; + } + } + if ( *p == 0) + { + break; + } + p++; + } + return 0; +} + +int fill_options(struct options * options, int argc, char ** argv); +int get_self_path(char * buffer, int maxsize); +long clock(void); + +int compile(int argc, char ** argv, struct report * report) +{ + struct options options = {0}; + if (fill_options(&options, argc, argv) != 0) + { + return 1; + } + char executable_path[246] = {0}; + get_self_path(executable_path, sizeof (executable_path)); + dirname(executable_path); + char cakeconfig_path[260] = {0}; + snprintf(cakeconfig_path, sizeof cakeconfig_path, "%s", executable_path); + if (options.auto_config) + { + report->ignore_this_report = 1; + return generate_config_file(cakeconfig_path); + } + report->test_mode = options.test_mode; + long begin_clock = clock(); + int no_files = 0; + char root_dir[260] = {0}; + if ( !options.no_output) + { + longest_common_path(argc, argv, root_dir); + } + int root_dir_len = strlen(root_dir); + { + int i = 1; + for (; i < argc; i++) + { + if (strcmp(argv[i], "-o") == 0 || strcmp(argv[i], "-sarif-path") == 0) + { + i++; + continue; + } + if (argv[i][0] == 45) + { + continue; + } + no_files++; + char output_file[260] = {0}; + if ( !options.no_output) + { + if (no_files == 1 && options.output[0] != 0) + { + strcat(output_file, options.output); + } + else + { + char fullpath[260] = {0}; + realpath(argv[i], fullpath); + strcpy(output_file, root_dir); + strcat(output_file, "/out"); + strcat(output_file, fullpath + root_dir_len); + char outdir[260] = {0}; + strcpy(outdir, output_file); + dirname(outdir); + if (create_multiple_paths(root_dir, outdir) != 0) + { + return 1; + } + } + } + char fullpath[260] = {0}; + realpath(argv[i], fullpath); + char * file_extension = basename(fullpath); + if (file_extension[0] == 42) + { + no_files--; + no_files = compile_many_files(fullpath, &options, output_file, argc, argv, report); + } + else + { + struct report report_local = {0}; + compile_one_file(fullpath, &options, output_file, argc, argv, &report_local); + report->fatal_error_expected = report_local.fatal_error_expected; + report->error_count = report_local.error_count; + report->warnings_count = report_local.warnings_count; + report->info_count = report_local.info_count; + report->test_succeeded = report_local.test_succeeded; + report->test_failed = report_local.test_failed; + } + } + } + long end_clock = clock(); + double cpu_time_used = ((double)(end_clock - begin_clock)) / ((long)1000); + report->no_files = no_files; + report->cpu_time_used_sec = cpu_time_used; + return 0; +} + +struct ast get_ast(struct options * options, char * filename, char * source, struct report * report) +{ + struct ast ast = {0}; + struct tokenizer_ctx tctx = {0}; + struct token_list list = tokenizer(&tctx, source, filename, 0, 0); + struct preprocessor_ctx prectx = {0}; + struct parser_ctx ctx = {0}; + ctx.p_report = report; + if (1) + { + prectx.options = *options; + prectx.macros.capacity = 5000; + add_standard_macros(&prectx); + ast.token_list = preprocessor(&prectx, &list, 0); + if (prectx.n_errors != 0) + { + goto _catch_label_1; + } + ctx.options = *options; + unsigned char berror = 0; + ast.declaration_list = parse(&ctx, &ast.token_list, &berror); + if (berror) + { + goto _catch_label_1; + } + } + else _catch_label_1: + { + } + parser_ctx_destroy(&ctx); + token_list_destroy(&list); + preprocessor_ctx_destroy(&prectx); + return ast; +} + +int strtoargv(char * s, int n, char *argv[]) +{ + int argvc = 0; + char * p = s; + while ( *p) + { + while ( *p == 32) + p++; + if ( *p == 0) + { + break; + } + argv[argvc] = p; + argvc++; + while ( *p != 32 && *p != 0) + p++; + if ( *p == 0) + { + break; + } + *p = 0; + p++; + if (argvc >= n) + { + break; + } + } + return argvc; +} + +char *compile_source(char * pszoptions, char * content, struct report * report) +{ + char *argv[100] = {0}; + char string[200] = {0}; + snprintf(string, sizeof string, "exepath %s", pszoptions); + int argc = strtoargv(string, 10, argv); + char * s = ((void *)0); + struct preprocessor_ctx prectx = {0}; + struct ast ast = {0}; + struct options options =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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + if (1) + { + if (fill_options(&options, argc, argv) != 0) + { + goto _catch_label_1; + } + 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, 0); + 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 + { + ast = get_ast(&options, "c:/main.c", content, report); + if (report->error_count > 0) + { + goto _catch_label_1; + } + if (options.target == 0) + { + struct osstream ss = {0}; + struct d_visit_ctx ctx2 = {0}; + ctx2.ast = ast; + d_visit(&ctx2, &ss); + s = ss.c_str; + } + } + } + else _catch_label_1: + { + } + preprocessor_ctx_destroy(&prectx); + ast_destroy(&ast); + return s; +} + +char *CompileText(char * pszoptions, char * content) +{ + printf("\x1b[97m"); + printf("\x1b[97m", pszoptions); + struct report report = {0}; + return (char *)compile_source(pszoptions, content, &report); +} + +void ast_destroy(struct ast * ast) +{ + token_list_destroy(&ast->token_list); + declaration_list_destroy(&ast->declaration_list); +} + +int toupper(int _C); + +static unsigned char is_all_upper(char * text) +{ + char * p = text; + while ( *p) + { + if ( *p != toupper( *p)) + { + return 0; + } + p++; + } + return 1; +} + +static unsigned char is_snake_case(char * text) +{ + if ( !( *text >= 97 && *text <= 122)) + { + return 0; + } + while ( *text) + { + if (( *text >= 97 && *text <= 122) || *text == 95 || ( *text >= 48 && *text <= 57)) + { + } + else + { + return 0; + } + text++; + } + return 1; +} + +static unsigned char is_camel_case(char * text) +{ + if ( !( *text >= 97 && *text <= 122)) + { + return 0; + } + while ( *text) + { + if (( *text >= 97 && *text <= 122) || ( *text >= 65 && *text <= 90) || ( *text >= 48 && *text <= 57)) + { + } + else + { + return 0; + } + text++; + } + return 1; +} + +static unsigned char is_pascal_case(char * text) +{ + if ( !(text[0] >= 65 && text[0] <= 90)) + { + return 0; + } + while ( *text) + { + if (( *text >= 97 && *text <= 122) || ( *text >= 65 && *text <= 90) || ( *text >= 48 && *text <= 57)) + { + } + else + { + return 0; + } + text++; + } + return 1; +} + +void naming_convention_struct_tag(struct parser_ctx * ctx, struct token * token) +{ + if ( !parser_is_diagnostic_enabled(ctx, 10) || token->level != 0) + { + return; + } + if (ctx->options.style == 0) + { + if ( !is_snake_case(token->lexeme)) + { + compiler_diagnostic_message(10, ctx, token, ((void *)0), "use snake_case for struct/union tags"); + } + } + else + { + if (ctx->options.style == 6) + { + if ( !is_pascal_case(token->lexeme)) + { + compiler_diagnostic_message(10, ctx, token, ((void *)0), "use camelCase for struct/union tags"); + } + } + } +} + +void naming_convention_enum_tag(struct parser_ctx * ctx, struct token * token) +{ + if ( !parser_is_diagnostic_enabled(ctx, 10) || token->level != 0) + { + return; + } + if (ctx->options.style == 0) + { + if ( !is_snake_case(token->lexeme)) + { + compiler_diagnostic_message(10, ctx, token, ((void *)0), "use snake_case for enum tags"); + } + } + else + { + if (ctx->options.style == 6) + { + if ( !is_pascal_case(token->lexeme)) + { + compiler_diagnostic_message(10, ctx, token, ((void *)0), "use PascalCase for enum tags"); + } + } + } +} + +void naming_convention_function(struct parser_ctx * ctx, struct token * token) +{ + if ( !parser_is_diagnostic_enabled(ctx, 10) || token->level != 0) + { + return; + } + if (ctx->options.style == 0) + { + if ( !is_snake_case(token->lexeme)) + { + compiler_diagnostic_message(10, ctx, token, ((void *)0), "use snake_case for functions"); + } + } + else + { + if (ctx->options.style == 6) + { + if ( !is_pascal_case(token->lexeme)) + { + compiler_diagnostic_message(10, ctx, token, ((void *)0), "use PascalCase for functions"); + } + } + } +} + +unsigned char type_is_function_or_function_pointer(struct type * p_type); + +void naming_convention_global_var(struct parser_ctx * ctx, struct token * token, struct type * type, int storage) +{ + if ( !parser_is_diagnostic_enabled(ctx, 10) || token->level != 0) + { + return; + } + if ( !type_is_function_or_function_pointer(type)) + { + if (storage & 4) + { + if (type_is_const(type)) + { + } + else + { + if (token->lexeme[0] != 115 || token->lexeme[1] != 95) + { + compiler_diagnostic_message(10, ctx, token, ((void *)0), "use prefix s_ for static global variables"); + } + } + } + if ( !is_snake_case(token->lexeme)) + { + compiler_diagnostic_message(10, ctx, token, ((void *)0), "use snake_case global variables"); + } + } +} + +void naming_convention_local_var(struct parser_ctx * ctx, struct token * token, struct type * type) +{ + if ( !parser_is_diagnostic_enabled(ctx, 10) || token->level != 0) + { + return; + } + if (ctx->options.style == 0) + { + if ( !is_snake_case(token->lexeme)) + { + compiler_diagnostic_message(10, ctx, token, ((void *)0), "use snake_case for local variables"); + } + } + else + { + if (ctx->options.style == 6) + { + if ( !is_camel_case(token->lexeme)) + { + compiler_diagnostic_message(10, ctx, token, ((void *)0), "use camelCase for local variables"); + } + } + } +} + +void naming_convention_enumerator(struct parser_ctx * ctx, struct token * token) +{ + if ( !parser_is_diagnostic_enabled(ctx, 10) || token->level != 0) + { + return; + } + if ( !is_all_upper(token->lexeme)) + { + compiler_diagnostic_message(10, ctx, token, ((void *)0), "use UPPERCASE for enumerators"); + } +} + +void naming_convention_struct_member(struct parser_ctx * ctx, struct token * token, struct type * type) +{ + if ( !parser_is_diagnostic_enabled(ctx, 10) || token->level != 0) + { + return; + } + if ( !is_snake_case(token->lexeme)) + { + compiler_diagnostic_message(10, ctx, token, ((void *)0), "use snake_case for struct members"); + } +} + +void naming_convention_parameter(struct parser_ctx * ctx, struct token * token, struct type * type) +{ + if ( !parser_is_diagnostic_enabled(ctx, 10) || token->level != 0) + { + return; + } + if ( !is_snake_case(token->lexeme)) + { + compiler_diagnostic_message(10, ctx, token, ((void *)0), "use snake_case for arguments"); + } +} + +static void designation_to_string(struct parser_ctx * ctx, struct designation * designation, char buffer[], int sz) +{ + buffer[0] = 0; + if (1) + { + struct designator * designator = designation->designator_list->head; + while (designator) + { + if (designator->constant_expression_opt) + { + if ( !object_has_constant_value(&designator->constant_expression_opt->object)) + { + goto _catch_label_1; + } + unsigned long long index = object_to_unsigned_long_long(&designator->constant_expression_opt->object); + snprintf(buffer, sz, "%s[%llu]", buffer, index); + } + else + { + if (designator->token) + { + snprintf(buffer, sz, "%s.%s", buffer, designator->token->lexeme); + } + } + designator = designator->next; + } + } + else _catch_label_1: + { + } +} + +struct object *object_get_referenced(struct object * p_object); +unsigned char type_is_union(struct type * p_type); + +static struct object *find_first_subobject_old(struct type * p_type_not_used, struct object * p_object, struct type * p_type_out, unsigned char * sub_object_of_union) +{ + p_object = (struct object *)object_get_referenced(p_object); + if (p_object->members == ((void *)0)) + { + *sub_object_of_union = 0; + *p_type_out = type_dup(&p_object->type2); + return p_object; + } + *sub_object_of_union = type_is_union(&p_object->type2); + *p_type_out = type_dup(&p_object->members->type2); + return p_object->members; +} + +static struct object *find_first_subobject(struct type * p_type_not_used, struct object * p_object, struct type * p_type_out, unsigned char * sub_object_of_union) +{ + return find_first_subobject_old(p_type_not_used, p_object, p_type_out, sub_object_of_union); +} + +static struct object *find_last_suboject_of_suboject_old(struct type * p_type_not_used, struct object * p_object, struct type * p_type_out) +{ + p_object = (struct object *)object_get_referenced(p_object); + if (p_object->members == ((void *)0)) + { + *p_type_out = type_dup(&p_object->type2); + return p_object; + } + struct object * it = p_object->members; + while (it) + { + if (it->next == ((void *)0)) + { + return find_last_suboject_of_suboject_old(p_type_not_used, it, p_type_out); + } + it = it->next; + } + *p_type_out = type_dup(&p_object->type2); + return p_object; +} + +static struct object *find_last_suboject_of_suboject(struct type * p_type_not_used, struct object * p_object, struct type * p_type_out) +{ + return find_last_suboject_of_suboject_old(p_type_not_used, p_object, p_type_out); +} + +void type_clear(struct type * a); + +static struct object *find_next_subobject_old(struct type * p_top_object_not_used, struct object * current_object, struct object * it, struct type * p_type_out, unsigned char * sub_object_of_union) +{ + type_clear(p_type_out); + if (it == ((void *)0)) + { + return ((void *)0); + } + if (it->members) + { + *sub_object_of_union = type_is_union(&it->type2); + it = it->members; + *p_type_out = type_dup(&it->type2); + return it; + } + for (; ; ) + { + if (it == ((void *)0)) + { + break; + } + struct object * next = it->next; + if (next != ((void *)0)) + { + if (it->parent) + { + *sub_object_of_union = type_is_union(&it->parent->type2); + } + it = next; + break; + } + it = it->parent; + } + if (it != ((void *)0)) + { + *p_type_out = type_dup(&it->type2); + } + return it; +} + +static struct object *find_next_subobject(struct type * p_top_object_not_used, struct object * current_object, struct object * it, struct type * p_type_out, unsigned char * sub_object_of_union) +{ + return find_next_subobject_old(p_top_object_not_used, current_object, it, p_type_out, sub_object_of_union); +} + +unsigned char type_is_scalar(struct type * p_type); +struct type get_array_item_type(struct type * p_type); + +static unsigned char find_next_subobject_core(struct type * p_type, struct object * obj, struct object * subobj, struct find_object_result * result) +{ + if (1) + { + if (type_is_scalar(p_type)) + { + if (result->object != ((void *)0)) + { + result->object = obj; + result->type = type_dup(p_type); + return 1; + } + } + if (subobj == obj) + { + result->object = obj; + return 0; + } + if (type_is_array(p_type)) + { + struct type item_type = get_array_item_type(p_type); + struct object * it = obj->members; + for (; it; it = it->next) + { + if (find_next_subobject_core(&item_type, it, subobj, result)) + { + return 1; + } + } + type_destroy(&item_type); + return 0; + } + 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 == ((void *)0)) + { + goto _catch_label_1; + } + if (subobj == obj) + { + result->object = obj; + } + struct member_declaration * p_member_declaration = p_struct_or_union_specifier->member_declaration_list.head; + struct object * member_object = obj->members; + 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 (find_next_subobject_core(&p_member_declarator->declarator->type, member_object, subobj, result)) + { + return 1; + } + member_object = member_object->next; + } + p_member_declarator = p_member_declarator->next; + } + } + else + { + if (p_member_declaration->specifier_qualifier_list != ((void *)0)) + { + if (p_member_declaration->specifier_qualifier_list->struct_or_union_specifier) + { + struct type t = {0}; + t.category = 0; + t.struct_or_union_specifier = p_member_declaration->specifier_qualifier_list->struct_or_union_specifier; + t.type_specifier_flags = 32768; + if (find_next_subobject_core(&t, member_object, subobj, result)) + { + return 1; + } + type_destroy(&t); + } + } + } + p_member_declaration = p_member_declaration->next; + } + } + } + else _catch_label_1: + { + } + return 0; +} + +static struct object *next_sub_object2(struct type * p_type, struct object * obj, struct object * subobj, struct type * p_type_out) +{ + type_clear(p_type_out); + struct find_object_result find_object_result = {0}; + if (find_next_subobject_core(p_type, obj, subobj, &find_object_result)) + { + type_swap(&find_object_result.type, p_type_out); + return find_object_result.object; + } + return ((void *)0); +} + +unsigned char type_is_struct_or_union(struct type * p_type); +struct object *object_extend_array_to_index(struct type * p_type, struct object * a, int n, unsigned char is_constant); +struct object *object_get_member(struct object * p_object, int index); + +static struct object *find_designated_subobject(struct parser_ctx * ctx, struct type * p_current_object_type, struct object * current_object, struct designator * p_designator, unsigned char is_constant, struct type * p_type_out) +{ + if (1) + { + if (type_is_struct_or_union(p_current_object_type)) + { + struct struct_or_union_specifier * p_struct_or_union_specifier = get_complete_struct_or_union_specifier(p_current_object_type->struct_or_union_specifier); + if (p_struct_or_union_specifier == ((void *)0)) + { + goto _catch_label_1; + } + struct member_declaration * p_member_declaration = p_struct_or_union_specifier->member_declaration_list.head; + struct member_declarator * p_member_declarator = ((void *)0); + char * name = p_designator->token->lexeme; + struct object * p_member_object = current_object->members; + while (p_member_declaration) + { + if (p_member_declaration->member_declarator_list_opt) + { + p_member_declarator = p_member_declaration->member_declarator_list_opt->head; + while (p_member_declarator) + { + if (p_member_declarator->declarator) + { + if (p_member_declarator->declarator->name_opt && strcmp(p_member_declarator->declarator->name_opt->lexeme, name) == 0) + { + if (p_designator->next != ((void *)0)) + { + return find_designated_subobject(ctx, &p_member_declarator->declarator->type, p_member_object, p_designator->next, is_constant, p_type_out); + } + else + { + *p_type_out = type_dup(&p_member_declarator->declarator->type); + return p_member_object; + } + } + } + p_member_object = p_member_object->next; + p_member_declarator = p_member_declarator->next; + } + } + else + { + if (p_member_declaration->specifier_qualifier_list && p_member_declaration->specifier_qualifier_list->struct_or_union_specifier) + { + } + } + p_member_declaration = p_member_declaration->next; + } + compiler_diagnostic_message(720, ctx, p_designator->token, ((void *)0), "member '%s' not found in '%s'", name, p_struct_or_union_specifier->tag_name); + return ((void *)0); + } + else + { + if (type_is_array(p_current_object_type)) + { + unsigned char compute_array_size = p_current_object_type->array_num_elements_expression == ((void *)0); + long long index = -1; + int max_index = -1; + struct type array_item_type = get_array_item_type(p_current_object_type); + struct object * member_obj = current_object->members; + if (p_designator->constant_expression_opt) + { + index = object_to_signed_long_long(&p_designator->constant_expression_opt->object); + if (index > max_index) + { + max_index = index; + if (compute_array_size) + { + member_obj = object_extend_array_to_index(&array_item_type, current_object, max_index, is_constant); + } + } + member_obj = object_get_member(current_object, index); + if (member_obj == ((void *)0)) + { + if (index < 0) + { + compiler_diagnostic_message(720, ctx, p_designator->constant_expression_opt->first_token, ((void *)0), "array designator value '%d' is negative", index); + } + else + { + if (index > p_current_object_type->num_of_elements) + { + compiler_diagnostic_message(720, ctx, p_designator->constant_expression_opt->first_token, ((void *)0), "array index '%d' in initializer exceeds array bounds", index); + } + } + type_destroy(&array_item_type); + return ((void *)0); + } + if (p_designator->next != ((void *)0)) + { + struct object * p = find_designated_subobject(ctx, &array_item_type, member_obj, p_designator->next, is_constant, p_type_out); + type_destroy(&array_item_type); + return p; + } + else + { + type_swap(p_type_out, &array_item_type); + type_destroy(&array_item_type); + } + return member_obj; + } + else + { + } + } + } + } + else _catch_label_1: + { + } + return ((void *)0); +} + +static struct initializer_list_item *find_innner_initializer_list_item(struct braced_initializer * braced_initializer) +{ + struct initializer_list_item * p_initializer_list_item = braced_initializer->initializer_list->head; + while (p_initializer_list_item->initializer->braced_initializer) + { + p_initializer_list_item = p_initializer_list_item->initializer->braced_initializer->initializer_list->head; + if (p_initializer_list_item->next == ((void *)0)) + { + return p_initializer_list_item; + } + p_initializer_list_item = p_initializer_list_item->next; + } + return p_initializer_list_item; +} + +void object_default_initialization(struct object * p_object, unsigned char is_constant); +void object_set(struct object * to, struct expression * init_expression, struct object * from, unsigned char is_constant); +unsigned char type_is_char(struct type * p_type); +unsigned char type_is_array_of_char(struct type * p_type); + +static int braced_initializer_new(struct parser_ctx * ctx, struct type * p_current_object_type, struct object * current_object, struct braced_initializer * braced_initializer, unsigned char is_constant) +{ + if (braced_initializer->initializer_list == ((void *)0)) + { + object_default_initialization(current_object, is_constant); + return 0; + } + if ( !type_is_union(p_current_object_type)) + { + object_default_initialization(current_object, is_constant); + } + if (type_is_scalar(p_current_object_type) && braced_initializer != ((void *)0)) + { + struct initializer_list_item * p_initializer_list_item = find_innner_initializer_list_item(braced_initializer); + if (p_initializer_list_item == ((void *)0)) + { + return 0; + } + if (p_initializer_list_item->initializer->assignment_expression != ((void *)0)) + { + object_set(current_object, p_initializer_list_item->initializer->assignment_expression, &p_initializer_list_item->initializer->assignment_expression->object, is_constant); + } + p_initializer_list_item = p_initializer_list_item->next; + if (p_initializer_list_item != ((void *)0)) + { + compiler_diagnostic_message(100, ctx, p_initializer_list_item->initializer->first_token, ((void *)0), "warning: excess elements in initializer"); + } + return 0; + } + struct object * parent_copy = current_object->parent; + current_object->parent = ((void *)0); + struct initializer_list_item * p_initializer_list_item = braced_initializer->initializer_list->head; + long long array_to_expand_index = -1; + int array_to_expand_max_index = -1; + unsigned char compute_array_size = 0; + struct type array_item_type = {0}; + if (type_is_array(p_current_object_type)) + { + array_item_type = get_array_item_type(p_current_object_type); + compute_array_size = p_current_object_type->array_num_elements_expression == ((void *)0); + if (type_is_char(&array_item_type)) + { + struct initializer_list_item * p_initializer_list_item2 = find_innner_initializer_list_item(braced_initializer); + if (p_initializer_list_item2 == ((void *)0)) + { + return 0; + } + if (p_initializer_list_item2->initializer->assignment_expression != ((void *)0)) + { + if (p_initializer_list_item2->initializer->assignment_expression->expression_type == 3) + { + unsigned long long num_of_elements = p_initializer_list_item2->initializer->assignment_expression->type.num_of_elements; + if (compute_array_size) + { + object_extend_array_to_index(&array_item_type, current_object, num_of_elements - 1, is_constant); + } + object_set(current_object, p_initializer_list_item2->initializer->assignment_expression, &p_initializer_list_item2->initializer->assignment_expression->object, is_constant); + p_current_object_type->num_of_elements = num_of_elements; + return 0; + } + } + } + } + struct object * p_subobject = ((void *)0); + for (; ; ) + { + unsigned char is_subobject_of_union = 0; + struct type subobject_type = {0}; + if (p_initializer_list_item == ((void *)0)) + { + break; + } + if (p_initializer_list_item->designation) + { + if (compute_array_size) + { + array_to_expand_index = object_to_signed_long_long(&p_initializer_list_item->designation->designator_list->head->constant_expression_opt->object); + if (array_to_expand_index > array_to_expand_max_index) + { + array_to_expand_max_index = array_to_expand_index; + } + object_extend_array_to_index(&array_item_type, current_object, array_to_expand_max_index, is_constant); + } + is_subobject_of_union = type_is_union(&subobject_type); + p_subobject = find_designated_subobject(ctx, p_current_object_type, current_object, p_initializer_list_item->designation->designator_list->head, is_constant, &subobject_type); + if (p_subobject == ((void *)0)) + { + p_initializer_list_item = p_initializer_list_item->next; + break; + } + } + else + { + if (compute_array_size) + { + struct object * po = find_next_subobject(p_current_object_type, current_object, p_subobject, &subobject_type, &is_subobject_of_union); + if (po == ((void *)0)) + { + array_to_expand_index++; + if (array_to_expand_index > array_to_expand_max_index) + { + array_to_expand_max_index = array_to_expand_index; + } + object_extend_array_to_index(&array_item_type, current_object, array_to_expand_max_index, is_constant); + } + } + if (p_subobject == ((void *)0)) + { + p_subobject = find_first_subobject(p_current_object_type, current_object, &subobject_type, &is_subobject_of_union); + } + else + { + p_subobject = find_next_subobject(p_current_object_type, current_object, p_subobject, &subobject_type, &is_subobject_of_union); + } + } + if (p_subobject == ((void *)0)) + { + break; + } + if (p_initializer_list_item->initializer->braced_initializer) + { + braced_initializer_new(ctx, &subobject_type, p_subobject, p_initializer_list_item->initializer->braced_initializer, is_constant); + struct type t = {0}; + is_subobject_of_union = type_is_union(&subobject_type); + p_subobject = find_last_suboject_of_suboject(&subobject_type, p_subobject, &t); + type_swap(&t, &subobject_type); + type_destroy(&t); + } + else + { + unsigned char entire_object_initialized = 0; + if (type_is_array_of_char(&subobject_type) && p_initializer_list_item->initializer->assignment_expression->expression_type == 3) + { + entire_object_initialized = 1; + } + else + { + if (type_is_array(&subobject_type)) + { + while (type_is_array(&subobject_type)) + { + p_subobject = find_next_subobject(p_current_object_type, current_object, p_subobject, &subobject_type, &is_subobject_of_union); + } + } + else + { + if (type_is_struct_or_union(&subobject_type)) + { + if (type_is_struct_or_union(&p_initializer_list_item->initializer->assignment_expression->type)) + { + entire_object_initialized = 1; + } + else + { + p_subobject = find_next_subobject(p_current_object_type, current_object, p_subobject, &subobject_type, &is_subobject_of_union); + } + } + } + } + object_set(p_subobject, p_initializer_list_item->initializer->assignment_expression, &p_initializer_list_item->initializer->assignment_expression->object, is_constant); + if (is_subobject_of_union) + { + struct type t = {0}; + is_subobject_of_union = 1; + p_subobject = find_last_suboject_of_suboject(&p_subobject->parent->type2, p_subobject->parent, &t); + type_swap(&t, &subobject_type); + type_destroy(&t); + if (p_subobject) + { + subobject_type = type_dup(&p_subobject->type2); + } + } + else + { + if (entire_object_initialized) + { + struct type t = {0}; + is_subobject_of_union = type_is_union(p_current_object_type); + p_subobject = find_last_suboject_of_suboject(&subobject_type, p_subobject, &t); + type_swap(&t, &subobject_type); + type_destroy(&t); + if (p_subobject) + { + subobject_type = type_dup(&p_subobject->type2); + } + } + } + } + p_initializer_list_item = p_initializer_list_item->next; + type_destroy(&subobject_type); + } + if (p_initializer_list_item != ((void *)0)) + { + compiler_diagnostic_message(100, ctx, p_initializer_list_item->initializer->first_token, ((void *)0), "warning: excess elements in initializer"); + } + if (compute_array_size) + { + current_object->type2.num_of_elements = array_to_expand_max_index + 1; + p_current_object_type->num_of_elements = array_to_expand_max_index + 1; + } + current_object->parent = parent_copy; + return 0; +} + +int initializer_init_new(struct parser_ctx * ctx, struct type * p_type, struct object * object, struct initializer * initializer, unsigned char is_constant) +{ + if (initializer->assignment_expression != ((void *)0)) + { + object_set(object, initializer->assignment_expression, &initializer->assignment_expression->object, is_constant); + } + else + { + if (initializer->braced_initializer) + { + if (braced_initializer_new(ctx, p_type, object, initializer->braced_initializer, is_constant) != 0) + { + return 1; + } + } + } + return 0; +} + diff --git a/out/src/pre_expressions.c b/out/src/pre_expressions.c new file mode 100644 index 0000000..7773d86 --- /dev/null +++ b/out/src/pre_expressions.c @@ -0,0 +1,1104 @@ +union _struct_tag_5 { + unsigned int number; + struct enum_specifier * p_enum_specifier; + struct enumerator * p_enumerator; + struct struct_or_union_specifier * p_struct_or_union_specifier; + struct declarator * p_declarator; + struct init_declarator * p_init_declarator; + struct macro * p_macro; + struct struct_entry * p_struct_entry; +}; + +struct map_entry { + struct map_entry * next; + unsigned int hash; + char * key; + int type; + union _struct_tag_5 data; +}; + +struct expression2; +struct struct_or_union_specifier0; +struct declarator; +union _struct_tag_6 { + unsigned char bool_value; + signed char signed_char_value; + unsigned char unsigned_char_value; + signed short signed_short_value; + unsigned short unsigned_short_value; + signed int signed_int_value; + unsigned int unsigned_int_value; + signed long signed_long_value; + unsigned long unsigned_long_value; + signed long long signed_long_long_value; + unsigned long long unsigned_long_long_value; + float float_value; + double double_value; + long double long_double_value; +}; + +struct struct_entry; +struct hash_map { + struct map_entry ** table; + int capacity; + int size; +}; + +struct struct_or_union_specifier; +struct param_list { + unsigned char is_var_args; + unsigned char is_void; + struct param * head; + struct param * tail; +}; + +struct include_dir_list { + struct include_dir * head; + struct include_dir * tail; +}; + +struct diagnostic { + unsigned long long errors; + unsigned long long warnings; + unsigned long long notes; +}; + +struct diagnostic_stack { + int top_index; + struct diagnostic stack[10]; +}; + +struct options { + int input; + int target; + struct diagnostic_stack diagnostic_stack; + int style; + unsigned char show_includes; + unsigned char disable_assert; + unsigned char flow_analysis; + unsigned char test_mode; + unsigned char null_checks_enabled; + unsigned char ownership_enabled; + unsigned char preprocess_only; + unsigned char clear_error_at_end; + unsigned char sarif_output; + unsigned char no_output; + unsigned char visual_studio_ouput_format; + unsigned char dump_tokens; + unsigned char dump_pptokens; + unsigned char auto_config; + char output[200]; + char sarifpath[200]; +}; + +struct token_list { + struct token * head; + struct token * tail; +}; + +struct preprocessor_ctx { + struct options options; + int flags; + struct hash_map macros; + struct include_dir_list include_dir; + struct hash_map pragma_once_map; + struct token * current; + struct token_list input_list; + unsigned int count_macro_value; + unsigned char conditional_inclusion; + int n_warnings; + int n_errors; +}; + +struct expression; +struct enumerator; +struct pre_expression_ctx { + long long value; +}; + +struct enum_specifier; +struct token { + int type; + char * lexeme; + char * original; + int line; + int col; + int level; + int flags; + struct token * token_origin; + struct token * next; + struct token * prev; +}; + +struct type { + int category; + int attributes_flags; + int type_specifier_flags; + int type_qualifier_flags; + int storage_class_specifier_flags; + char * name_opt; + struct struct_or_union_specifier0 * struct_or_union_specifier; + struct enum_specifier1 * enum_specifier; + struct expression * array_num_elements_expression; + int num_of_elements; + unsigned char static_array; + unsigned char address_of; + struct param_list params; + struct type * next; +}; + +struct object { + int state; + int value_type; + struct type type2; + char * debug_name; + union _struct_tag_6 value; + struct object * parent; + struct expression2 * p_init_expression; + struct object * members; + struct object * next; +}; + +struct include_dir { + char * path; + struct include_dir * next; +}; + +struct macro; +struct init_declarator; +struct param { + struct type type; + struct param * next; +}; + +struct enum_specifier1; + +int parse_number(char * lexeme, char suffix[4], char erromsg[100]); +unsigned char preprocessor_diagnostic_message(int w, struct preprocessor_ctx * ctx, struct token * p_token, char * fmt, ...); +unsigned long long strtoull(char * _String, char ** _EndPtr, int _Radix); +int *_errno(void); +struct object object_make_unsigned_int(unsigned int value); +struct object object_make_unsigned_long(unsigned long value); +struct object object_make_unsigned_long_long(unsigned long long value); +struct object object_make_signed_int(signed int value); +struct object object_make_signed_long(signed long value); +struct object object_make_signed_long_long(signed long long value); +signed long long object_to_signed_long_long(struct object * a); + +static int ppnumber_to_longlong(struct preprocessor_ctx * ctx, struct token * token, long long * result) +{ + int c = 0; + char buffer[260] = {0}; + char * s = token->lexeme; + while ( *s) + { + if ( *s != 39) + { + buffer[c] = *s; + c++; + } + s++; + } + char errormsg[100]; + char suffix[4] = {0}; + int type = parse_number(token->lexeme, suffix, errormsg); + if (type == 0) + { + preprocessor_diagnostic_message(1380, ctx, token, "%s", errormsg); + return 0; + } + struct object cv = {0}; + switch (type) + { + case 136 : + case 137 : + case 138 : + case 139 : + { + unsigned long long value = 0; + switch (type) + { + case 136 : + value = strtoull(buffer, ((void *)0), 10); + break; + case 137 : + value = strtoull(buffer + 1, ((void *)0), 8); + break; + case 138 : + value = strtoull(buffer + 2, ((void *)0), 16); + break; + case 139 : + value = strtoull(buffer + 2, ((void *)0), 2); + break; + default: + break; + } + if (value == 18446744073709551615ULL && ( *_errno()) == 34) + { + } + if (suffix[0] == 85) + { + if (value <= 4294967295LL && suffix[1] != 76) + { + cv = object_make_unsigned_int((unsigned int)value); + } + else + { + if (value <= 4294967295UL && suffix[2] != 76) + { + cv = object_make_unsigned_long((unsigned long)value); + } + else + { + cv = object_make_unsigned_long_long((unsigned long long)value); + } + } + } + else + { + if (value <= 2147483647 && suffix[0] != 76) + { + cv = object_make_signed_int((int)value); + } + else + { + if (value <= 2147483647L && suffix[1] != 76) + { + cv = object_make_signed_long((long)value); + } + else + { + if (value <= 9223372036854775807LL) + { + cv = object_make_signed_long_long((long long)value); + } + else + { + cv = object_make_signed_long_long(value); + } + } + } + } + } + break; + case 140 : + case 141 : + break; + default: + ; + } + *result = object_to_signed_long_long(&cv); + return 0; +} + +unsigned char token_is_blank(struct token * p); + +static struct token *pre_match(struct preprocessor_ctx * ctx) +{ + if (ctx->current == ((void *)0)) + { + return ((void *)0); + } + ctx->current = ctx->current->next; + while (ctx->current && token_is_blank(ctx->current)) + { + ctx->current = ctx->current->next; + } + return ctx->current; +} + +unsigned char *utf8_decode(unsigned char * s, unsigned int * c); +unsigned char *escape_sequences_decode_opt(unsigned char * p, unsigned int * out_value); +int snprintf(char * _Buffer, unsigned int _BufferCount, char * _Format, ...); +struct object object_make_wchar_t(unsigned short value); + +static struct object char_constant_to_value(char * s, char error_message[], int error_message_sz_bytes) +{ + error_message[0] = 0; + unsigned char * p = (unsigned char *)s; + if (1) + { + if (p[0] == 117 && p[1] == 56) + { + p++; + p++; + p++; + unsigned int c = 0; + p = utf8_decode(p, &c); + if (p == ((void *)0)) + { + goto _catch_label_1; + } + if (c == 92) + { + p = escape_sequences_decode_opt(p, &c); + if (p == ((void *)0)) + { + goto _catch_label_1; + } + } + if ( *p != 39) + { + snprintf(error_message, error_message_sz_bytes, "Unicode character literals may not contain multiple characters."); + } + if (c > 128) + { + snprintf(error_message, error_message_sz_bytes, "Character too large for enclosing character literal type."); + } + return object_make_wchar_t((unsigned short)c); + } + else + { + if (p[0] == 117) + { + p++; + p++; + unsigned int c = 0; + p = utf8_decode(p, &c); + if (p == ((void *)0)) + { + goto _catch_label_1; + } + if (c == 92) + { + p = escape_sequences_decode_opt(p, &c); + if (p == ((void *)0)) + { + goto _catch_label_1; + } + } + if ( *p != 39) + { + snprintf(error_message, error_message_sz_bytes, "Unicode character literals may not contain multiple characters."); + } + if (c > 65535) + { + snprintf(error_message, error_message_sz_bytes, "Character too large for enclosing character literal type."); + } + return object_make_wchar_t((unsigned short)c); + } + else + { + if (p[0] == 85) + { + p++; + p++; + unsigned int c = 0; + p = utf8_decode(p, &c); + if (p == ((void *)0)) + { + goto _catch_label_1; + } + if (c == 92) + { + p = escape_sequences_decode_opt(p, &c); + if (p == ((void *)0)) + { + goto _catch_label_1; + } + } + if ( *p != 39) + { + snprintf(error_message, error_message_sz_bytes, "Unicode character literals may not contain multiple characters."); + } + if (c > 4294967295LL) + { + snprintf(error_message, error_message_sz_bytes, "Character too large for enclosing character literal type."); + } + return object_make_wchar_t((unsigned short)c); + } + else + { + if (p[0] == 76) + { + p++; + p++; + long long value = 0; + while ( *p != 39) + { + unsigned int c = 0; + p = utf8_decode(p, &c); + if (p == ((void *)0)) + { + goto _catch_label_1; + } + if (c == 92) + { + p = escape_sequences_decode_opt(p, &c); + if (p == ((void *)0)) + { + goto _catch_label_1; + } + } + value = value * 256 + c; + if (value > 65535) + { + snprintf(error_message, error_message_sz_bytes, "character constant too long for its type"); + break; + } + } + return object_make_wchar_t((unsigned short)value); + } + else + { + p++; + long long value = 0; + while ( *p != 39) + { + unsigned int c = 0; + p = utf8_decode(p, &c); + if (p == ((void *)0)) + { + goto _catch_label_1; + } + if (c == 92) + { + p = escape_sequences_decode_opt(p, &c); + if (p == ((void *)0)) + { + goto _catch_label_1; + } + } + if (c < 128) + { + value = value * 256 + c; + } + else + { + value = c; + } + if (value > 2147483647) + { + snprintf(error_message, error_message_sz_bytes, "character constant too long for its type"); + break; + } + } + return object_make_wchar_t((unsigned short)value); + } + } + } + } + } + else _catch_label_1: + { + } + struct object empty = {0}; + return empty; +} + +void pre_unexpected_end_of_file(struct token * p_token, struct preprocessor_ctx * ctx); +static void pre_expression(struct preprocessor_ctx * ctx, struct pre_expression_ctx * ectx); + +static void pre_primary_expression(struct preprocessor_ctx * ctx, struct pre_expression_ctx * ectx) +{ + if (1) + { + if (ctx->current == ((void *)0)) + { + pre_unexpected_end_of_file(ctx->input_list.tail, ctx); + goto _catch_label_1; + } + if (ctx->current->type == 131) + { + char * p = ctx->current->lexeme + 1; + char errmsg[200] = {0}; + struct object v = char_constant_to_value(p, errmsg, sizeof errmsg); + if (errmsg[0] != 0) + { + preprocessor_diagnostic_message(650, ctx, ctx->current, "%s", errmsg); + } + ectx->value = object_to_signed_long_long(&v); + pre_match(ctx); + } + else + { + if (ctx->current->type == 134) + { + ppnumber_to_longlong(ctx, ctx->current, &ectx->value); + pre_match(ctx); + } + else + { + if (ctx->current->type == 40) + { + pre_match(ctx); + pre_expression(ctx, ectx); + if (ctx->n_errors > 0) + { + goto _catch_label_1; + } + if (ctx->current && ctx->current->type != 41) + { + preprocessor_diagnostic_message(650, ctx, ctx->current, "expected )"); + goto _catch_label_1; + } + pre_match(ctx); + } + else + { + preprocessor_diagnostic_message(1140, ctx, ctx->current, "token '%s' is not valid in preprocessor expressions", ctx->current->lexeme); + goto _catch_label_1; + } + } + } + } + else _catch_label_1: + { + } +} + +static void pre_postfix_expression(struct preprocessor_ctx * ctx, struct pre_expression_ctx * ectx) +{ + if (1) + { + pre_primary_expression(ctx, ectx); + if (ctx->n_errors > 0) + { + goto _catch_label_1; + } + } + else _catch_label_1: + { + } +} + +static void pre_cast_expression(struct preprocessor_ctx * ctx, struct pre_expression_ctx * ectx); + +static void pre_unary_expression(struct preprocessor_ctx * ctx, struct pre_expression_ctx * ectx) +{ + if (1) + { + if (ctx->current && (ctx->current->type == 11051 || ctx->current->type == 11565)) + { + preprocessor_diagnostic_message(1140, ctx, ctx->current, "token '%s' is not valid in preprocessor expressions", ctx->current->lexeme); + goto _catch_label_1; + } + else + { + if (ctx->current != ((void *)0) && (ctx->current->type == 38 || ctx->current->type == 42 || ctx->current->type == 43 || ctx->current->type == 45 || ctx->current->type == 126 || ctx->current->type == 33)) + { + struct token * p_old = ctx->current; + int op = ctx->current->type; + pre_match(ctx); + pre_cast_expression(ctx, ectx); + if (ctx->n_errors > 0) + { + goto _catch_label_1; + } + if (op == 33) + { + ectx->value = !ectx->value; + } + else + { + if (op == 126) + { + ectx->value = ~ectx->value; + } + else + { + if (op == 45) + { + ectx->value = -ectx->value; + } + else + { + if (op == 43) + { + ectx->value = +ectx->value; + } + else + { + if (op == 42) + { + preprocessor_diagnostic_message(1140, ctx, p_old, "token '%s' is not valid in preprocessor expressions", p_old->lexeme); + } + else + { + if (op == 38) + { + preprocessor_diagnostic_message(1140, ctx, p_old, "token '%s' is not valid in preprocessor expressions", p_old->lexeme); + } + else + { + preprocessor_diagnostic_message(1140, ctx, p_old, "token '%s' is not valid in preprocessor expressions", p_old->lexeme); + } + } + } + } + } + } + } + else + { + pre_postfix_expression(ctx, ectx); + } + } + } + else _catch_label_1: + { + } +} + +static void pre_cast_expression(struct preprocessor_ctx * ctx, struct pre_expression_ctx * ectx) +{ + pre_unary_expression(ctx, ectx); +} + +static void pre_multiplicative_expression(struct preprocessor_ctx * ctx, struct pre_expression_ctx * ectx) +{ + if (1) + { + pre_cast_expression(ctx, ectx); + if (ctx->n_errors > 0) + { + goto _catch_label_1; + } + while (ctx->current != ((void *)0) && (ctx->current->type == 42 || ctx->current->type == 47 || ctx->current->type == 37)) + { + struct token * op_token = ctx->current; + int op = ctx->current->type; + pre_match(ctx); + long long left_value = ectx->value; + pre_cast_expression(ctx, ectx); + if (ctx->n_errors > 0) + { + goto _catch_label_1; + } + if (op == 42) + { + ectx->value = (left_value * ectx->value); + } + else + { + if (op == 47) + { + if (ectx->value == 0) + { + preprocessor_diagnostic_message(1330, ctx, op_token, "division by zero"); + goto _catch_label_1; + } + else + { + ectx->value = (left_value / ectx->value); + } + } + else + { + if (op == 37) + { + ectx->value = (left_value % ectx->value); + } + } + } + } + } + else _catch_label_1: + { + } +} + +static void pre_additive_expression(struct preprocessor_ctx * ctx, struct pre_expression_ctx * ectx) +{ + if (1) + { + pre_multiplicative_expression(ctx, ectx); + if (ctx->n_errors > 0) + { + goto _catch_label_1; + } + while (ctx->current != ((void *)0) && (ctx->current->type == 43 || ctx->current->type == 45)) + { + struct token * p_op_token = ctx->current; + pre_match(ctx); + if (ctx->current == ((void *)0)) + { + pre_unexpected_end_of_file(ctx->input_list.tail, ctx); + goto _catch_label_1; + } + long long left_value = ectx->value; + pre_multiplicative_expression(ctx, ectx); + if (ctx->n_errors > 0) + { + goto _catch_label_1; + } + if (p_op_token->type == 43) + { + ectx->value = left_value + ectx->value; + } + else + { + if (p_op_token->type == 45) + { + ectx->value = left_value - ectx->value; + } + else + { + goto _catch_label_1; + } + } + } + } + else _catch_label_1: + { + } +} + +static void pre_shift_expression(struct preprocessor_ctx * ctx, struct pre_expression_ctx * ectx) +{ + if (1) + { + pre_additive_expression(ctx, ectx); + if (ctx->n_errors > 0) + { + goto _catch_label_1; + } + while (ctx->current != ((void *)0) && (ctx->current->type == 15934 || ctx->current->type == 15420)) + { + int op = ctx->current->type; + pre_match(ctx); + long long left_value = ectx->value; + pre_multiplicative_expression(ctx, ectx); + if (ctx->n_errors > 0) + { + goto _catch_label_1; + } + if (op == 15934) + { + ectx->value = left_value >> ectx->value; + } + else + { + if (op == 15420) + { + ectx->value = left_value << ectx->value; + } + } + } + } + else _catch_label_1: + { + } +} + +static void pre_relational_expression(struct preprocessor_ctx * ctx, struct pre_expression_ctx * ectx) +{ + if (1) + { + pre_shift_expression(ctx, ectx); + if (ctx->n_errors > 0) + { + goto _catch_label_1; + } + while (ctx->current != ((void *)0) && (ctx->current->type == 62 || ctx->current->type == 60 || ctx->current->type == 15933 || ctx->current->type == 15421)) + { + int op = ctx->current->type; + pre_match(ctx); + long long left_value = ectx->value; + pre_shift_expression(ctx, ectx); + if (ctx->n_errors > 0) + { + goto _catch_label_1; + } + if (op == 62) + { + ectx->value = left_value > ectx->value; + } + else + { + if (op == 60) + { + ectx->value = left_value < ectx->value; + } + else + { + if (op == 15933) + { + ectx->value = left_value >= ectx->value; + } + else + { + if (op == 15421) + { + ectx->value = left_value <= ectx->value; + } + } + } + } + } + } + else _catch_label_1: + { + } +} + +static void pre_equality_expression(struct preprocessor_ctx * ctx, struct pre_expression_ctx * ectx) +{ + if (1) + { + pre_relational_expression(ctx, ectx); + if (ctx->n_errors > 0) + { + goto _catch_label_1; + } + while (ctx->current != ((void *)0) && (ctx->current->type == 15677 || ctx->current->type == 8509)) + { + int op = ctx->current->type; + pre_match(ctx); + long long left_value = ectx->value; + pre_multiplicative_expression(ctx, ectx); + if (ctx->n_errors > 0) + { + goto _catch_label_1; + } + if (op == 15677) + { + ectx->value = left_value == ectx->value; + } + else + { + if (op == 8509) + { + ectx->value = left_value != ectx->value; + } + } + } + } + else _catch_label_1: + { + } +} + +static void pre_and_expression(struct preprocessor_ctx * ctx, struct pre_expression_ctx * ectx) +{ + if (1) + { + pre_equality_expression(ctx, ectx); + if (ctx->n_errors > 0) + { + goto _catch_label_1; + } + while (ctx->current != ((void *)0) && (ctx->current->type == 38)) + { + pre_match(ctx); + long long left_value = ectx->value; + pre_equality_expression(ctx, ectx); + if (ctx->n_errors > 0) + { + goto _catch_label_1; + } + ectx->value = left_value & ectx->value; + } + } + else _catch_label_1: + { + } +} + +static void pre_exclusive_or_expression(struct preprocessor_ctx * ctx, struct pre_expression_ctx * ectx) +{ + if (1) + { + pre_and_expression(ctx, ectx); + if (ctx->n_errors > 0) + { + goto _catch_label_1; + } + while (ctx->current != ((void *)0) && (ctx->current->type == 94)) + { + pre_match(ctx); + long long left_value = ectx->value; + pre_and_expression(ctx, ectx); + if (ctx->n_errors > 0) + { + goto _catch_label_1; + } + ectx->value = left_value ^ ectx->value; + } + } + else _catch_label_1: + { + } +} + +static void pre_inclusive_or_expression(struct preprocessor_ctx * ctx, struct pre_expression_ctx * ectx) +{ + if (1) + { + pre_exclusive_or_expression(ctx, ectx); + if (ctx->n_errors > 0) + { + goto _catch_label_1; + } + while (ctx->current != ((void *)0) && (ctx->current->type == 124)) + { + pre_match(ctx); + long long left_value = ectx->value; + pre_exclusive_or_expression(ctx, ectx); + if (ctx->n_errors > 0) + { + goto _catch_label_1; + } + ectx->value = left_value | ectx->value; + } + } + else _catch_label_1: + { + } +} + +static void pre_logical_and_expression(struct preprocessor_ctx * ctx, struct pre_expression_ctx * ectx) +{ + if (1) + { + pre_inclusive_or_expression(ctx, ectx); + if (ctx->n_errors > 0) + { + goto _catch_label_1; + } + while (ctx->current != ((void *)0) && (ctx->current->type == 9766)) + { + pre_match(ctx); + long long left_value = ectx->value; + pre_inclusive_or_expression(ctx, ectx); + if (ctx->n_errors > 0) + { + goto _catch_label_1; + } + ectx->value = left_value && ectx->value; + } + } + else _catch_label_1: + { + } +} + +static void pre_logical_or_expression(struct preprocessor_ctx * ctx, struct pre_expression_ctx * ectx) +{ + if (1) + { + pre_logical_and_expression(ctx, ectx); + if (ctx->n_errors > 0) + { + goto _catch_label_1; + } + while (ctx->current != ((void *)0) && (ctx->current->type == 31868)) + { + pre_match(ctx); + long long left_value = ectx->value; + pre_logical_and_expression(ctx, ectx); + if (ctx->n_errors > 0) + { + goto _catch_label_1; + } + ectx->value = left_value || ectx->value; + } + } + else _catch_label_1: + { + } +} + +static void pre_conditional_expression(struct preprocessor_ctx * ctx, struct pre_expression_ctx * ectx); + +static void pre_assignment_expression(struct preprocessor_ctx * ctx, struct pre_expression_ctx * ectx) +{ + if (1) + { + pre_conditional_expression(ctx, ectx); + if (ctx->n_errors > 0) + { + goto _catch_label_1; + } + while (ctx->current != ((void *)0) && (ctx->current->type == 61 || ctx->current->type == 10813 || ctx->current->type == 12093 || ctx->current->type == 11069 || ctx->current->type == 11581 || ctx->current->type == 15421 || ctx->current->type == 15933 || ctx->current->type == 9789 || ctx->current->type == 24125 || ctx->current->type == 31805)) + { + preprocessor_diagnostic_message(1140, ctx, ctx->current, "token '%s' is not valid in preprocessor expressions", ctx->current->lexeme); + goto _catch_label_1; + } + } + else _catch_label_1: + { + } +} + +static void pre_expression(struct preprocessor_ctx * ctx, struct pre_expression_ctx * ectx) +{ + if (1) + { + pre_assignment_expression(ctx, ectx); + if (ctx->n_errors > 0) + { + goto _catch_label_1; + } + while (ctx->current && ctx->current->type == 44) + { + pre_match(ctx); + pre_expression(ctx, ectx); + if (ctx->n_errors > 0) + { + goto _catch_label_1; + } + } + } + else _catch_label_1: + { + } +} + +static void pre_conditional_expression(struct preprocessor_ctx * ctx, struct pre_expression_ctx * ectx) +{ + if (1) + { + pre_logical_or_expression(ctx, ectx); + if (ctx->n_errors > 0) + { + goto _catch_label_1; + } + if (ctx->current && ctx->current->type == 63) + { + pre_match(ctx); + if (ectx->value) + { + pre_expression(ctx, ectx); + if (ctx->n_errors > 0) + { + goto _catch_label_1; + } + pre_match(ctx); + struct pre_expression_ctx temp = {0}; + pre_conditional_expression(ctx, &temp); + if (ctx->n_errors > 0) + { + goto _catch_label_1; + } + } + else + { + struct pre_expression_ctx temp = {0}; + pre_expression(ctx, &temp); + if (ctx->n_errors > 0) + { + goto _catch_label_1; + } + pre_match(ctx); + pre_conditional_expression(ctx, ectx); + if (ctx->n_errors > 0) + { + goto _catch_label_1; + } + } + } + } + else _catch_label_1: + { + } +} + +int pre_constant_expression(struct preprocessor_ctx * ctx, long long * pvalue) +{ + struct pre_expression_ctx ectx = {0}; + pre_conditional_expression(ctx, &ectx); + *pvalue = ectx.value; + return ctx->n_errors > 0; +} + diff --git a/out/src/token.c b/out/src/token.c new file mode 100644 index 0000000..31cb5e5 --- /dev/null +++ b/out/src/token.c @@ -0,0 +1,1484 @@ +struct diagnostic { + unsigned long long errors; + unsigned long long warnings; + unsigned long long notes; +}; + +struct diagnostic_stack { + int top_index; + struct diagnostic stack[10]; +}; + +struct options { + int input; + int target; + struct diagnostic_stack diagnostic_stack; + int style; + unsigned char show_includes; + unsigned char disable_assert; + unsigned char flow_analysis; + unsigned char test_mode; + unsigned char null_checks_enabled; + unsigned char ownership_enabled; + unsigned char preprocess_only; + unsigned char clear_error_at_end; + unsigned char sarif_output; + unsigned char no_output; + unsigned char visual_studio_ouput_format; + unsigned char dump_tokens; + unsigned char dump_pptokens; + unsigned char auto_config; + char output[200]; + char sarifpath[200]; +}; + +struct tokenizer_ctx { + struct options options; + int n_warnings; + int n_errors; +}; + +struct token { + int type; + char * lexeme; + char * original; + int line; + int col; + int level; + int flags; + struct token * token_origin; + struct token * next; + struct token * prev; +}; + +struct osstream { + char * c_str; + int size; + int capacity; +}; + +struct token_list { + struct token * head; + struct token * tail; +}; + +struct _iobuf { + void * _Placeholder; +}; + +struct __crt_locale_data; +struct stream { + char * source; + char * current; + int line; + int col; + int line_continuation_count; + char * path; +}; + +struct __crt_locale_pointers { + struct __crt_locale_data * locinfo; + struct __crt_multibyte_data * mbcinfo; +}; + +struct __crt_multibyte_data; +struct marker { + char * file; + int line; + int start_col; + int end_col; + struct token * p_token_caret; + struct token * p_token_begin; + struct token * p_token_end; +}; + + +unsigned char token_is_blank(struct token * p); + +unsigned char style_has_space(struct token * token) +{ + return token_is_blank(token->prev); +} + +unsigned char style_has_one_space(struct token * token) +{ + return token->prev && token->prev->type == 143; +} + +void token_delete(struct token * p); + +void token_list_clear(struct token_list * list) +{ + struct token * p = list->head; + while (p) + { + struct token * next = p->next; + p->next = ((void *)0); + token_delete(p); + p = next; + } + list->head = ((void *)0); + list->tail = ((void *)0); +} + +void token_range_add_show(struct token * first, struct token * last) +{ + { + struct token * current = first; + for (; current != last->next; current = current->next) + { + current->flags = current->flags & ~64; + if (current->next == ((void *)0)) + { + break; + } + } + } +} + +void token_range_remove_flag(struct token * first, struct token * last, int flag) +{ + { + struct token * current = first; + for (; current && current != last->next; current = current->next) + { + current->flags = current->flags & ~flag; + } + } +} + +void token_range_add_flag(struct token * first, struct token * last, int flag) +{ + { + struct token * current = first; + for (; current && current != last->next; current = current->next) + { + current->flags = flag; + } + } +} + +void token_list_pop_back(struct token_list * list) +{ + if (list->head == ((void *)0)) + { + return; + } + if (list->head == list->tail) + { + token_delete(list->head); + list->head = ((void *)0); + list->tail = ((void *)0); + } + else + { + ; + ; + list->tail = list->tail->prev; + token_delete(list->tail->next); + list->tail->next = ((void *)0); + if (list->tail == list->head) + { + list->tail->prev = ((void *)0); + } + } +} + +void token_list_pop_front(struct token_list * list) +{ + if (list->head == ((void *)0)) + { + return; + } + struct token * p = list->head; + if (list->head == list->tail) + { + list->head = ((void *)0); + list->tail = ((void *)0); + } + else + { + list->head = p->next; + } + p->next = ((void *)0); + p->prev = ((void *)0); + token_delete(p); +} + +struct token *token_list_pop_front_get(struct token_list * list) +{ + if (list->head == ((void *)0)) + { + return ((void *)0); + } + struct token * head = list->head; + if (list->head == list->tail) + { + list->head = ((void *)0); + list->tail = ((void *)0); + head->next = ((void *)0); + head->prev = ((void *)0); + return head; + } + list->head = head->next; + head->next = ((void *)0); + head->prev = ((void *)0); + return head; +} + +void token_list_swap(struct token_list * a, struct token_list * b) +{ + struct token_list temp = *a; + *a = *b; + *b = temp; +} + +void free(void * ptr); + +void token_delete(struct token * p) +{ + if (p) + { + ; + free(p->lexeme); + free(p); + } +} + +void token_list_set_file(struct token_list * list, struct token * filetoken, int line, int col) +{ + struct token * p = list->head; + while (p) + { + p->token_origin = filetoken; + p->line = line; + p->col = col; + p = p->next; + } +} + +void token_list_destroy(struct token_list * list) +{ + struct token * p = list->head; + while (p) + { + struct token * next = p->next; + p->next = ((void *)0); + token_delete(p); + p = next; + } +} + +int ss_fprintf(struct osstream * stream, char * fmt, ...); +void ss_close(struct osstream * stream); + +char *token_list_join_tokens(struct token_list * list, unsigned char bliteral) +{ + struct osstream ss = {0}; + if (bliteral) + { + ss_fprintf(&ss, "\""); + } + unsigned char has_space = 0; + struct token * current = list->head; + while (current) + { + if (token_is_blank(current)) + { + has_space = 1; + current = current->next; + continue; + } + if (has_space) + { + ss_fprintf(&ss, " "); + } + char * p = current->lexeme; + while ( *p) + { + if ( *p == 34) + { + ss_fprintf(&ss, "\\\""); + } + else + { + ss_fprintf(&ss, "%c", *p); + } + p++; + } + current = current->next; + if (current) + { + has_space = current->flags & 4; + } + } + if (bliteral) + { + ss_fprintf(&ss, "\""); + } + char * cstr = ss.c_str; + ss.c_str = ((void *)0); + ss_close(&ss); + return cstr; +} + +struct token_list tokenizer(struct tokenizer_ctx * ctx, char * text, char * filename_opt, int level, int addflags); +void token_list_insert_after(struct token_list * list, struct token * after, struct token_list * append); + +void token_list_paste_string_after(struct token_list * list, struct token * after, char * s) +{ + struct tokenizer_ctx tctx = {0}; + struct token_list l = tokenizer(&tctx, s, ((void *)0), 0, 1); + token_list_insert_after(list, after, &l); + token_list_destroy(&l); +} + +void token_list_insert_before(struct token_list * token_list, struct token * after, struct token_list * append_list); + +void token_list_paste_string_before(struct token_list * list, struct token * before, char * s) +{ + struct tokenizer_ctx tctx = {0}; + struct token_list l = tokenizer(&tctx, s, ((void *)0), 0, 1); + token_list_insert_before(list, before, &l); + token_list_destroy(&l); +} + +void token_list_insert_after(struct token_list * token_list, struct token * after, struct token_list * append_list) +{ + if (append_list->head == ((void *)0)) + { + return; + } + if (token_list->head == ((void *)0)) + { + ; + token_list->head = append_list->head; + token_list->tail = append_list->tail; + append_list->head = ((void *)0); + append_list->tail = ((void *)0); + return; + } + if (after == ((void *)0)) + { + ; + ; + append_list->tail->next = token_list->head; + token_list->head->prev = append_list->tail; + token_list->head = append_list->head; + append_list->head->prev = ((void *)0); + } + else + { + struct token * follow = after->next; + if (token_list->tail == after) + { + token_list->tail = append_list->tail; + } + else + { + if (token_list->head == after) + { + } + } + ; + ; + append_list->tail->next = follow; + follow->prev = append_list->tail; + after->next = append_list->head; + append_list->head->prev = after; + } + append_list->head = ((void *)0); + append_list->tail = ((void *)0); +} + +void token_list_insert_before(struct token_list * token_list, struct token * after, struct token_list * append_list) +{ + token_list_insert_after(token_list, after->prev, append_list); +} + +struct token *token_list_add(struct token_list * list, struct token * pnew) +{ + ; + ; + if (list->head == ((void *)0)) + { + pnew->prev = ((void *)0); + pnew->next = ((void *)0); + list->head = pnew; + list->tail = pnew; + } + else + { + ; + ; + pnew->prev = list->tail; + list->tail->next = pnew; + list->tail = pnew; + } + ; + ; + return list->tail; +} + +unsigned char token_is_identifier_or_keyword(int t) +{ + switch (t) + { + case 8996 : + return 1; + case 8999 : + case 9000 : + case 9001 : + case 9002 : + case 9003 : + case 9004 : + case 9005 : + case 9006 : + case 9007 : + case 9008 : + case 9009 : + case 9010 : + case 9011 : + case 9012 : + case 9013 : + case 9014 : + case 9015 : + case 9016 : + case 9017 : + case 9018 : + case 9019 : + case 9020 : + case 9021 : + case 9022 : + case 9023 : + case 9024 : + case 9025 : + case 9026 : + case 9027 : + case 9028 : + case 9029 : + case 9030 : + case 9032 : + case 9033 : + case 9034 : + case 9035 : + case 9036 : + case 9037 : + case 9038 : + case 9039 : + case 9040 : + case 9041 : + case 9042 : + case 9043 : + case 9044 : + case 9045 : + case 9046 : + case 9047 : + case 9048 : + case 9049 : + case 9050 : + case 9051 : + case 9052 : + case 9053 : + case 9054 : + case 9055 : + case 9056 : + case 9057 : + case 9058 : + case 9059 : + case 9060 : + case 9061 : + case 9062 : + case 9063 : + case 9064 : + case 9065 : + case 9066 : + case 9067 : + case 9068 : + case 9069 : + case 9070 : + case 9071 : + case 9072 : + case 9073 : + case 9074 : + case 9075 : + case 9076 : + case 9077 : + case 9078 : + case 9079 : + case 9080 : + case 9081 : + case 9082 : + return 1; + default: + break; + } + return 0; +} + +unsigned char token_is_blank(struct token * p) +{ + return p->type == 8998 || p->type == 143 || p->type == 132 || p->type == 133; +} + +struct token *clone_token(struct token * p); + +struct token *token_list_clone_and_add(struct token_list * list, struct token * pnew) +{ + struct token * clone = clone_token(pnew); + if (clone == ((void *)0)) + { + return ((void *)0); + } + return token_list_add(list, clone); +} + +void token_list_append_list_at_beginning(struct token_list * dest, struct token_list * source) +{ + if (source->head == ((void *)0)) + { + return; + } + if (dest->head == ((void *)0)) + { + dest->head = source->head; + dest->tail = source->tail; + } + else + { + ; + ; + source->tail->next = dest->head; + dest->head = source->head; + } + source->head = ((void *)0); + source->tail = ((void *)0); +} + +void token_list_append_list(struct token_list * dest, struct token_list * source) +{ + if (source->head == ((void *)0)) + { + return; + } + if (dest->head == ((void *)0)) + { + dest->head = source->head; + dest->tail = source->tail; + } + else + { + ; + ; + dest->tail->next = source->head; + source->head->prev = dest->tail; + dest->tail = source->tail; + } + source->head = ((void *)0); + source->tail = ((void *)0); +} + +void *calloc(int nmemb, unsigned int size); +char *strdup(char * src); + +struct token *clone_token(struct token * p) +{ + struct token * token = calloc(1, sizeof *token); + if (token == ((void *)0)) + { + return ((void *)0); + } + char * lexeme = strdup(p->lexeme); + if (lexeme == ((void *)0)) + { + free(token); + return ((void *)0); + } + *token = *p; + token->lexeme = lexeme; + token->next = ((void *)0); + token->prev = ((void *)0); + return token; +} + +struct token_list token_list_remove_get(struct token_list * list, struct token * first, struct token * last) +{ + struct token_list r = {0}; + struct token * before_first = first->prev; + struct token * after_last = last->next; + last->next = ((void *)0); + if (before_first) + { + before_first->next = after_last; + } + if (after_last) + { + after_last->prev = before_first; + } + r.head = (struct token *)first; + first->prev = ((void *)0); + r.tail = last; + return r; +} + +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); + token_list_destroy(&r); +} + +unsigned char token_list_is_empty(struct token_list * p) +{ + ; + return p->head == ((void *)0); +} + + + +int __stdio_common_vfprintf(unsigned __int64 _Options, struct _iobuf * _Stream, char * _Format, struct __crt_locale_pointers * _Locale, char * _ArgList); + +inline unsigned __int64 *__local_stdio_printf_options(void) +{ + static unsigned __int64 _OptionsStorage; + return &_OptionsStorage; +} +inline int _vfprintf_l(struct _iobuf * _Stream, char * _Format, struct __crt_locale_pointers * _Locale, char * _ArgList) +{ + return __stdio_common_vfprintf(( *__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList); +} +struct _iobuf *__acrt_iob_func(unsigned int _Ix); +inline int printf(char * _Format, ...) +{ + int _Result; + char * _ArgList; + ((void)(_ArgList = (char *)(&(_Format)) + ((sizeof (_Format) + sizeof (int) - 1) & ~(sizeof (int) - 1)))); + _Result = _vfprintf_l((__acrt_iob_func(1)), _Format, ((void *)0), _ArgList); + ((void)(_ArgList = (char *)0)); + return _Result; +} +void print_literal2(char * s); + +void print_list(struct token_list * list) +{ + struct token * current = list->head; + while (current) + { + if (current != list->head) + { + printf("\xcb\xb0"); + } + print_literal2(current->lexeme); + printf("\x1b"); + if (current == list->tail) + { + } + current = current->next; + } + printf("\n"); +} + +void print_literal2(char * s) +{ + while ( *s) + { + switch ( *s) + { + case 10 : + printf("\\n"); + break; + default: + printf("%c", *s); + } + s++; + } +} + +int snprintf(char * _Buffer, unsigned int _BufferCount, char * _Format, ...); +char *get_token_name(int tk); +char *strcat(char * _Destination, char * _Source); + +void print_token(struct token * p_token) +{ + { + int i = 0; + for (; i < p_token->level; i++) + { + printf(" "); + } + } + if (p_token->flags & 1) + { + printf("\x1b[92m"); + } + else + { + printf("\x1b[37m"); + } + 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 & 2) + { + printf("\x1b[36;1m"); + } + char buffer[50] = {0}; + strcat(buffer, "["); + if (p_token->flags & 1) + { + strcat(buffer, "final "); + } + if (p_token->flags & 64) + { + strcat(buffer, "hide "); + } + if (p_token->flags & 2) + { + strcat(buffer, "expanded "); + } + if (p_token->flags & 4) + { + strcat(buffer, "space "); + } + if (p_token->flags & 8) + { + strcat(buffer, "newline "); + } + strcat(buffer, "]"); + printf("%-20s ", buffer); + print_literal2(p_token->lexeme); + printf("\n"); + printf("\x1b"); +} + +void print_tokens(struct token * p_token) +{ + printf("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"); + struct token * current = p_token; + while (current) + { + print_token(current); + current = current->next; + } + printf("\n"); + printf("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n"); + printf("\x1b"); +} + +void print_token_html(struct token * p_token) +{ + printf("flags & 1)) + { + printf("notfinal "); + } + if (p_token->flags & 1) + { + printf("final "); + } + if (p_token->flags & 64) + { + printf("hide "); + } + if (p_token->flags & 2) + { + printf("expanded "); + } + if (p_token->flags & 4) + { + printf("space "); + } + if (p_token->flags & 8) + { + printf("newline "); + } + printf("\">"); + print_literal2(p_token->lexeme); + printf(""); + if (p_token->type == 10 || p_token->type == 8998) + { + printf("
\n"); + } +} + +void print_tokens_html(struct token * p_token) +{ + printf("
\n");
+    struct token * current = p_token;
+    while (current)
+    {
+        print_token_html(current);
+        current = current->next;
+    }
+    printf("\n
"); +} + +void print_position(char * path, int line, int col, unsigned char visual_studio_ouput_format) +{ + if (visual_studio_ouput_format) + { + printf("%s(%d,%d): ", path ? path : "<>", line, col); + } + else + { + printf("\x1b[97m", path ? path : "<>", line, col); + } +} + +int putc(int _Character, struct _iobuf * _Stream); + +void print_line_and_token(struct marker * p_marker, unsigned char visual_studio_ouput_format) +{ + if (1) + { + struct token * p_token = p_marker->p_token_caret ? p_marker->p_token_caret : p_marker->p_token_begin; + if (p_token == ((void *)0)) + { + goto _catch_label_1; + } + int line = p_marker->line; + if ( !visual_studio_ouput_format) + { + printf("\x1b"); + } + char nbuffer[20] = {0}; + int n = snprintf(nbuffer, sizeof nbuffer, "%d", line); + printf(" %s |", nbuffer); + struct token * p_line_begin = p_token; + while (p_line_begin->prev && (p_line_begin->prev->type != 10 && p_line_begin->prev->type != 8998)) + { + p_line_begin = p_line_begin->prev; + } + struct token * p_token_begin = p_marker->p_token_begin ? p_marker->p_token_begin : p_marker->p_token_caret; + struct token * p_token_end = p_marker->p_token_end ? p_marker->p_token_end : p_marker->p_token_caret; + if (p_token_begin == ((void *)0)) + { + goto _catch_label_1; + } + unsigned char expand_macro = p_token_begin->flags & 2; + if ( !visual_studio_ouput_format) + { + printf("\x1b[34;1m"); + } + struct token * p_item = p_line_begin; + while (p_item) + { + if ( !visual_studio_ouput_format) + { + if (p_item->flags & 2) + { + printf("\x1b[90m"); + } + else + { + if (p_item->type >= 8999 && p_item->type <= 9082) + { + printf("\x1b[34m"); + } + else + { + if (p_item->type == 133 || p_item->type == 132) + { + printf("\x1b[93m"); + } + } + } + } + if ( !(p_item->flags & 2) || expand_macro) + { + char * p = p_item->lexeme; + while ( *p) + { + putc( *p, (__acrt_iob_func(1))); + p++; + } + } + if ( !visual_studio_ouput_format) + { + printf("\x1b"); + } + if (p_item->type == 10) + { + break; + } + p_item = p_item->next; + } + if ( !visual_studio_ouput_format) + { + printf("\x1b"); + } + if (p_item == ((void *)0)) + { + printf("\n"); + } + printf(" %*s |", n, " "); + unsigned char complete = 0; + int start_col = 1; + int end_col = 1; + unsigned char onoff = 0; + p_item = p_line_begin; + while (p_item) + { + if (p_item == p_token_begin) + { + if ( !visual_studio_ouput_format) + { + printf("\x1b[92m"); + } + onoff = 1; + end_col = start_col; + } + if ( !(p_item->flags & 2) || expand_macro) + { + char * p = p_item->lexeme; + while ( *p) + { + if (onoff) + { + putc(126, (__acrt_iob_func(1))); + end_col++; + } + else + { + putc(32, (__acrt_iob_func(1))); + if ( !complete) + { + start_col++; + } + } + p++; + } + } + if (p_item->type == 10) + { + break; + } + if (p_item == p_token_end) + { + complete = 1; + onoff = 0; + if ( !visual_studio_ouput_format) + { + printf("\x1b"); + } + } + p_item = p_item->next; + } + if ( !visual_studio_ouput_format) + { + printf("\x1b"); + } + printf("\n"); + p_marker->start_col = start_col; + p_marker->end_col = end_col; + } + else _catch_label_1: + { + } +} + +int is_digit(struct stream * p); +void stream_match(struct stream * stream); + +static void digit_sequence(struct stream * stream) +{ + while (is_digit(stream)) + { + stream_match(stream); + } +} + +static void binary_exponent_part(struct stream * stream) +{ + stream_match(stream); + if (stream->current[0] == 43 || stream->current[0] == 45) + { + stream_match(stream); + } + digit_sequence(stream); +} + +static unsigned char is_hexadecimal_digit(struct stream * stream) +{ + return (stream->current[0] >= 48 && stream->current[0] <= 57) || (stream->current[0] >= 97 && stream->current[0] <= 102) || (stream->current[0] >= 65 && stream->current[0] <= 70); +} + +static unsigned char is_octal_digit(struct stream * stream) +{ + return stream->current[0] >= 48 && stream->current[0] <= 55; +} + +static void hexadecimal_digit_sequence(struct stream * stream) +{ + stream_match(stream); + while (stream->current[0] == 39 || is_hexadecimal_digit(stream)) + { + if (stream->current[0] == 39) + { + stream_match(stream); + if ( !is_hexadecimal_digit(stream)) + { + } + stream_match(stream); + } + else + { + stream_match(stream); + } + } +} + +static void integer_suffix_opt(struct stream * stream, char suffix[4]) +{ + if (stream->current[0] == 85 || stream->current[0] == 117) + { + suffix[0] = 85; + stream_match(stream); + if (stream->current[0] == 108 || stream->current[0] == 76) + { + suffix[1] = 76; + stream_match(stream); + } + if (stream->current[0] == 108 || stream->current[0] == 76) + { + suffix[2] = 76; + stream_match(stream); + } + } + else + { + if ((stream->current[0] == 108 || stream->current[0] == 76)) + { + suffix[0] = 76; + stream_match(stream); + if ((stream->current[0] == 108 || stream->current[0] == 76)) + { + suffix[1] = 76; + stream_match(stream); + } + if (stream->current[0] == 85 || stream->current[0] == 117) + { + suffix[3] = suffix[2]; + suffix[2] = suffix[1]; + suffix[1] = suffix[0]; + suffix[0] = 85; + stream_match(stream); + } + } + else + { + if (stream->current[0] == 105 && stream->current[1] == 56) + { + stream_match(stream); + stream_match(stream); + stream_match(stream); + suffix[0] = 105; + suffix[1] = 56; + } + else + { + if (stream->current[0] == 105 && stream->current[1] == 51 && stream->current[2] == 50) + { + stream_match(stream); + stream_match(stream); + stream_match(stream); + suffix[0] = 105; + suffix[1] = 51; + suffix[2] = 50; + } + else + { + if (stream->current[0] == 105 && stream->current[1] == 54 && stream->current[2] == 52) + { + stream_match(stream); + stream_match(stream); + stream_match(stream); + suffix[0] = 105; + suffix[1] = 54; + suffix[2] = 52; + } + } + } + } + } +} + +static void exponent_part_opt(struct stream * stream) +{ + if (stream->current[0] == 101 || stream->current[0] == 69) + { + stream_match(stream); + if (stream->current[0] == 45 || stream->current[0] == 43) + { + stream_match(stream); + } + digit_sequence(stream); + } +} + +static void floating_suffix_opt(struct stream * stream, char suffix[4]) +{ + if (stream->current[0] == 108 || stream->current[0] == 76) + { + suffix[0] = 76; + stream_match(stream); + } + else + { + if (stream->current[0] == 102 || stream->current[0] == 70) + { + suffix[0] = 70; + stream_match(stream); + } + } +} + +static unsigned char is_binary_digit(struct stream * stream) +{ + return stream->current[0] >= 48 && stream->current[0] <= 49; +} + +static unsigned char is_nonzero_digit(struct stream * stream) +{ + return stream->current[0] >= 49 && stream->current[0] <= 57; +} + +int parse_number_core(struct stream * stream, char suffix[4], char errmsg[100]) +{ + errmsg[0] = 0; + int type = 0; + if (stream->current[0] == 46) + { + type = 140; + stream_match(stream); + digit_sequence(stream); + exponent_part_opt(stream); + floating_suffix_opt(stream, suffix); + } + else + { + if (stream->current[0] == 48 && (stream->current[1] == 120 || stream->current[1] == 88)) + { + type = 138; + stream_match(stream); + stream_match(stream); + if (is_hexadecimal_digit(stream)) + { + while (is_hexadecimal_digit(stream)) + { + stream_match(stream); + } + } + else + { + snprintf(errmsg, 100, "expected hexadecimal digit"); + return 0; + } + integer_suffix_opt(stream, suffix); + if (stream->current[0] == 46) + { + type = 141; + hexadecimal_digit_sequence(stream); + } + if (stream->current[0] == 112 || stream->current[0] == 80) + { + type = 141; + binary_exponent_part(stream); + } + if (type == 141) + { + floating_suffix_opt(stream, suffix); + } + } + else + { + if (stream->current[0] == 48 && (stream->current[1] == 98 || stream->current[1] == 66)) + { + type = 139; + stream_match(stream); + stream_match(stream); + if (is_binary_digit(stream)) + { + while (is_binary_digit(stream)) + { + stream_match(stream); + } + } + else + { + snprintf(errmsg, 100, "expected binary digit"); + return 0; + } + integer_suffix_opt(stream, suffix); + } + else + { + if (stream->current[0] == 48) + { + type = 137; + stream_match(stream); + if (stream->current[0] == 79 || stream->current[0] == 111) + { + stream_match(stream); + } + while (is_octal_digit(stream)) + { + stream_match(stream); + } + integer_suffix_opt(stream, suffix); + if (stream->current[0] == 46) + { + type = 140; + hexadecimal_digit_sequence(stream); + floating_suffix_opt(stream, suffix); + } + } + else + { + if (is_nonzero_digit(stream)) + { + type = 136; + stream_match(stream); + while (is_digit(stream)) + { + stream_match(stream); + } + integer_suffix_opt(stream, suffix); + if (stream->current[0] == 101 || stream->current[0] == 69) + { + exponent_part_opt(stream); + floating_suffix_opt(stream, suffix); + } + else + { + if (stream->current[0] == 46) + { + stream_match(stream); + type = 140; + digit_sequence(stream); + exponent_part_opt(stream); + floating_suffix_opt(stream, suffix); + } + } + } + } + } + } + } + return type; +} + +int parse_number(char * lexeme, char suffix[4], char errmsg[100]) +{ + struct stream stream = {0, 0, 0, 0, 0, 0}; + stream.source = lexeme; + stream.current = lexeme; + stream.line = 1; + stream.col = 1; + stream.path = ""; + return parse_number_core(&stream, suffix, errmsg); +} + +unsigned char *utf8_decode(unsigned char * s, unsigned int * c) +{ + *c = 0; + if (s[0] == 0) + { + *c = 0; + return ((void *)0); + } + unsigned char * next = ((void *)0); + if (s[0] < 128) + { + *c = s[0]; + ; + next = s + 1; + } + else + { + if ((s[0] & 224) == 192) + { + *c = ((int)(s[0] & 31) << 6) | ((int)(s[1] & 63) << 0); + ; + next = s + 2; + } + else + { + if ((s[0] & 240) == 224) + { + *c = ((int)(s[0] & 15) << 12) | ((int)(s[1] & 63) << 6) | ((int)(s[2] & 63) << 0); + ; + next = s + 3; + } + else + { + if ((s[0] & 248) == 240 && (s[0] <= 244)) + { + *c = ((int)(s[0] & 7) << 18) | ((int)(s[1] & 63) << 12) | ((int)(s[2] & 63) << 6) | ((int)(s[3] & 63) << 0); + ; + next = s + 4; + } + else + { + *c = 0; + next = s + 1; + } + } + } + } + if ( *c >= 55296 && *c <= 57343) + { + *c = 0; + } + return next; +} + +static unsigned char is_hex_digit(unsigned char c) +{ + if (c >= 48 && c <= 57) + { + return 1; + } + else + { + if (c >= 97 && c <= 102) + { + return 1; + } + else + { + if (c >= 65 && c <= 70) + { + return 1; + } + } + } + return 0; +} + +unsigned char *escape_sequences_decode_opt(unsigned char * p, unsigned int * out_value) +{ + if ( *p == 120) + { + p++; + int result = 0; + while (is_hex_digit( *p)) + { + int byte = 0; + if ( *p >= 48 && *p <= 57) + { + byte = ( *p - 48); + } + else + { + if ( *p >= 97 && *p <= 102) + { + byte = ( *p - 97) + 10; + } + else + { + if ( *p >= 65 && *p <= 70) + { + byte = ( *p - 65) + 10; + } + } + } + result = (result << 4) | (byte & 15); + p++; + } + *out_value = result; + } + else + { + if ( *p == 117 || *p == 85) + { + int num_of_hex_digits = *p == 85 ? 8 : 4; + p++; + unsigned long long result = 0; + { + int i = 0; + for (; i < num_of_hex_digits; i++) + { + int byte = 0; + if ( *p >= 48 && *p <= 57) + { + byte = ( *p - 48); + } + else + { + if ( *p >= 97 && *p <= 102) + { + byte = ( *p - 97) + 10; + } + else + { + if ( *p >= 65 && *p <= 70) + { + byte = ( *p - 65) + 10; + } + } + } + result = (result << 4) | (byte & 15); + p++; + } + } + *out_value = (int)result; + } + else + { + if ( *p == 48) + { + p++; + int result = 0; + while (( *p >= 48 && *p <= 55)) + { + int byte; + byte = ( *p - 48); + result = (result << 4) | (byte & 15); + p++; + } + *out_value = result; + } + else + { + switch ( *p) + { + case 97 : + *out_value = 7; + break; + case 98 : + *out_value = 8; + break; + case 102 : + *out_value = 12; + break; + case 110 : + *out_value = 10; + break; + case 114 : + *out_value = 13; + break; + ; + case 116 : + *out_value = 9; + break; + case 39 : + *out_value = 39; + break; + case 92 : + *out_value = 92; + break; + case 34 : + *out_value = 34; + break; + default: + ; + return ((void *)0); + } + p++; + } + } + } + return p; +} + diff --git a/out/src/tokenizer.c b/out/src/tokenizer.c new file mode 100644 index 0000000..ce0abd4 --- /dev/null +++ b/out/src/tokenizer.c @@ -0,0 +1,5374 @@ +struct diagnostic { + unsigned long long errors; + unsigned long long warnings; + unsigned long long notes; +}; + +struct token_list { + struct token * head; + struct token * tail; +}; + +struct struct_entry; +struct include_dir { + char * path; + struct include_dir * next; +}; + +struct macro_parameter { + char * name; + struct macro_parameter * next; +}; + +struct struct_or_union_specifier; +struct struct_entry5; +struct enumerator; +struct diagnostic_stack { + int top_index; + struct diagnostic stack[10]; +}; + +struct options { + int input; + int target; + struct diagnostic_stack diagnostic_stack; + int style; + unsigned char show_includes; + unsigned char disable_assert; + unsigned char flow_analysis; + unsigned char test_mode; + unsigned char null_checks_enabled; + unsigned char ownership_enabled; + unsigned char preprocess_only; + unsigned char clear_error_at_end; + unsigned char sarif_output; + unsigned char no_output; + unsigned char visual_studio_ouput_format; + unsigned char dump_tokens; + unsigned char dump_pptokens; + unsigned char auto_config; + char output[200]; + char sarifpath[200]; +}; + +struct hash_map { + struct map_entry ** table; + int capacity; + int size; +}; + +struct include_dir_list { + struct include_dir * head; + struct include_dir * tail; +}; + +struct preprocessor_ctx { + struct options options; + int flags; + struct hash_map macros; + struct include_dir_list include_dir; + struct hash_map pragma_once_map; + struct token * current; + struct token_list input_list; + unsigned int count_macro_value; + unsigned char conditional_inclusion; + int n_warnings; + int n_errors; +}; + +struct declarator3; +struct _iobuf { + void * _Placeholder; +}; + +struct tokenizer_ctx { + struct options options; + int n_warnings; + int n_errors; +}; + +union _struct_tag_5 { + unsigned int number; + struct enum_specifier * p_enum_specifier; + struct enumerator * p_enumerator; + struct struct_or_union_specifier * p_struct_or_union_specifier; + struct declarator * p_declarator; + struct init_declarator * p_init_declarator; + struct macro * p_macro; + struct struct_entry * p_struct_entry; +}; + +struct map_entry { + struct map_entry * next; + unsigned int hash; + char * key; + int type; + union _struct_tag_5 data; +}; + +struct osstream { + char * c_str; + int size; + int capacity; +}; + +struct __crt_locale_pointers { + struct __crt_locale_data * locinfo; + struct __crt_multibyte_data * mbcinfo; +}; + +struct enum_specifier0; +struct marker { + char * file; + int line; + int start_col; + int end_col; + struct token * p_token_caret; + struct token * p_token_begin; + struct token * p_token_end; +}; + +struct macro_argument_list { + struct token_list tokens; + struct macro_argument * head; + struct macro_argument * tail; +}; + +struct stream { + char * source; + char * current; + int line; + int col; + int line_continuation_count; + char * path; +}; + +struct enum_specifier; +struct tm { + int tm_sec; + int tm_min; + int tm_hour; + int tm_mday; + int tm_mon; + int tm_year; + int tm_wday; + int tm_yday; + int tm_isdst; +}; + +struct hash_item_set { + unsigned int number; + struct enum_specifier0 * p_enum_specifier; + struct enumerator1 * p_enumerator; + struct struct_or_union_specifier2 * p_struct_or_union_specifier; + struct declarator3 * p_declarator; + struct init_declarator4 * p_init_declarator; + struct macro * p_macro; + struct struct_entry5 * p_struct_entry; +}; + +struct token { + int type; + char * lexeme; + char * original; + int line; + int col; + int level; + int flags; + struct token * token_origin; + struct token * next; + struct token * prev; +}; + +struct macro_expanded { + char * name; + struct macro_expanded * p_previous; +}; + +struct init_declarator4; +struct enumerator1; +struct __crt_multibyte_data; +struct init_declarator; +struct declarator; +struct struct_or_union_specifier2; +struct __crt_locale_data; +struct macro { + char * name; + struct token_list replacement_list; + struct macro_parameter * parameters; + unsigned char is_function; + int usage; + unsigned char expand; +}; + +struct macro_argument { + char * name; + struct token_list tokens; + struct macro_argument * next; +}; + + +void free(void * ptr); + +void include_dir_list_destroy(struct include_dir_list * list) +{ + struct include_dir * p = list->head; + while (p) + { + struct include_dir * next = p->next; + free((void *)p->path); + free(p); + p = next; + } +} + +void hashmap_destroy(struct hash_map * map); +void token_list_destroy(struct token_list * list); + +void preprocessor_ctx_destroy(struct preprocessor_ctx * p) +{ + hashmap_destroy(&p->macros); + include_dir_list_destroy(&p->include_dir); + hashmap_destroy(&p->pragma_once_map); + token_list_destroy(&p->input_list); +} + + +int __stdio_common_vsprintf(unsigned __int64 _Options, char * _Buffer, unsigned int _BufferCount, char * _Format, struct __crt_locale_pointers * _Locale, char * _ArgList); + +inline unsigned __int64 *__local_stdio_printf_options(void) +{ + static unsigned __int64 _OptionsStorage; + return &_OptionsStorage; +} +inline int vsnprintf(char * _Buffer, unsigned int _BufferCount, char * _Format, char * _ArgList) +{ + int _Result = __stdio_common_vsprintf(( *__local_stdio_printf_options()) | (1ULL << 1), _Buffer, _BufferCount, _Format, ((void *)0), _ArgList); + return _Result < 0 ? -1 : _Result; +} +void print_position(char * path, int line, int col, unsigned char msvc_format); + + +int __stdio_common_vfprintf(unsigned __int64 _Options, struct _iobuf * _Stream, char * _Format, struct __crt_locale_pointers * _Locale, char * _ArgList); +inline int _vfprintf_l(struct _iobuf * _Stream, char * _Format, struct __crt_locale_pointers * _Locale, char * _ArgList) +{ + return __stdio_common_vfprintf(( *__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList); +} +struct _iobuf *__acrt_iob_func(unsigned int _Ix); +inline int printf(char * _Format, ...) +{ + int _Result; + char * _ArgList; + ((void)(_ArgList = (char *)(&(_Format)) + ((sizeof (_Format) + sizeof (int) - 1) & ~(sizeof (int) - 1)))); + _Result = _vfprintf_l((__acrt_iob_func(1)), _Format, ((void *)0), _ArgList); + ((void)(_ArgList = (char *)0)); + return _Result; +} + +static void tokenizer_set_error(struct tokenizer_ctx * ctx, struct stream * stream, char * fmt, ...) +{ + ctx->n_errors++; + char buffer[200] = {0}; + char * args = {0}; + ((void)(args = (char *)(&(fmt)) + ((sizeof (fmt) + sizeof (int) - 1) & ~(sizeof (int) - 1)))); + vsnprintf(buffer, sizeof (buffer), fmt, args); + ((void)(args = (char *)0)); + print_position(stream->path, stream->line, stream->col, ctx->options.visual_studio_ouput_format); + if (ctx->options.visual_studio_ouput_format) + { + printf("error: ", buffer); + } + else + { + printf("\x1b[91m", buffer); + } +} + +static void tokenizer_set_warning(struct tokenizer_ctx * ctx, struct stream * stream, char * fmt, ...) +{ + ctx->n_warnings++; + char buffer[200] = {0}; + char * args = {0}; + ((void)(args = (char *)(&(fmt)) + ((sizeof (fmt) + sizeof (int) - 1) & ~(sizeof (int) - 1)))); + vsnprintf(buffer, sizeof (buffer), fmt, args); + ((void)(args = (char *)0)); + print_position(stream->path, stream->line, stream->col, ctx->options.visual_studio_ouput_format); + if (ctx->options.visual_studio_ouput_format) + { + printf("warning: ", buffer); + } + else + { + printf("\x1b[95m", buffer); + } +} + +unsigned char preprocessor_diagnostic_message(int w, struct preprocessor_ctx * ctx, struct token * p_token, char * fmt, ...); + +void pre_unexpected_end_of_file(struct token * p_token, struct preprocessor_ctx * ctx) +{ + preprocessor_diagnostic_message(970, ctx, p_token, "unexpected end of file"); +} + +void print_line_and_token(struct marker * p_marker, unsigned char visual_studio_ouput_format); + +unsigned char preprocessor_diagnostic_message(int w, struct preprocessor_ctx * ctx, struct token * p_token_opt, char * fmt, ...) +{ + struct marker marker = {0}; + if (p_token_opt == ((void *)0)) + { + return 0; + } + marker.file = p_token_opt->token_origin->lexeme; + marker.line = p_token_opt->line; + marker.start_col = p_token_opt->col; + marker.end_col = p_token_opt->col; + marker.p_token_caret = p_token_opt; + unsigned char included_file_location = p_token_opt->level > 0; + unsigned char is_error = 0; + unsigned char is_warning = 0; + unsigned char is_note = 0; + if (included_file_location) + { + return 0; + } + if (w > 63) + { + is_error = 1; + } + else + { + is_error = (ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index].errors & (1ULL << w)) != 0; + is_warning = (ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index].warnings & (1ULL << w)) != 0; + is_note = ((ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index].notes & (1ULL << w)) != 0); + } + if (is_error) + { + ctx->n_errors++; + } + else + { + if (is_warning) + { + ctx->n_warnings++; + } + else + { + if (is_note) + { + } + else + { + return 0; + } + } + } + print_position(marker.file, marker.line, marker.start_col, ctx->options.visual_studio_ouput_format); + char buffer[200] = {0}; + char * args = {0}; + ((void)(args = (char *)(&(fmt)) + ((sizeof (fmt) + sizeof (int) - 1) & ~(sizeof (int) - 1)))); + vsnprintf(buffer, sizeof (buffer), fmt, args); + ((void)(args = (char *)0)); + if (ctx->options.visual_studio_ouput_format) + { + if (is_warning) + { + printf("warning: ", buffer); + } + else + { + if (is_error) + { + printf("warning: ", buffer); + } + else + { + if (is_note) + { + printf("note: ", buffer); + } + } + } + print_line_and_token(&marker, ctx->options.visual_studio_ouput_format); + } + else + { + if (is_error) + { + printf("\x1b[91m", buffer); + } + else + { + if (is_warning) + { + printf("\x1b[95m", buffer); + } + else + { + if (is_note) + { + printf("\x1b[36;1m", buffer); + } + } + } + print_line_and_token(&marker, ctx->options.visual_studio_ouput_format); + } + return 1; +} + +void *calloc(int nmemb, unsigned int size); +unsigned int strlen(char * _Str); +char *strdup(char * src); +int snprintf(char * _Buffer, unsigned int _BufferCount, char * _Format, ...); + +struct include_dir *include_dir_add(struct include_dir_list * list, char * path) +{ + if (1) + { + struct include_dir * p_new_include_dir = calloc(1, sizeof *p_new_include_dir); + if (p_new_include_dir == ((void *)0)) + { + goto _catch_label_1; + } + int len = strlen(path); + if (path[len - 1] == 92) + { + char * temp = strdup(path); + if (temp == ((void *)0)) + { + free(p_new_include_dir); + goto _catch_label_1; + } + p_new_include_dir->path = temp; + } + else + { + if (path[len - 1] != 47) + { + char * temp = calloc(len + 2, sizeof (char)); + if (temp == ((void *)0)) + { + free(p_new_include_dir); + goto _catch_label_1; + } + p_new_include_dir->path = temp; + snprintf((char *)p_new_include_dir->path, len + 2, "%s/", path); + } + else + { + char * temp = strdup(path); + if (temp == ((void *)0)) + { + free(p_new_include_dir); + goto _catch_label_1; + } + p_new_include_dir->path = temp; + } + } + if (list->head == ((void *)0)) + { + list->head = p_new_include_dir; + list->tail = p_new_include_dir; + } + else + { + ; + ; + list->tail->next = p_new_include_dir; + list->tail = p_new_include_dir; + } + return list->tail; + } + else _catch_label_1: + { + } + return ((void *)0); +} + +int hashmap_set(struct hash_map * map, char * key, struct hash_item_set * item); +void hash_item_set_destroy(struct hash_item_set * p); + +static void pragma_once_add(struct preprocessor_ctx * ctx, char * path) +{ + struct hash_item_set item = {0}; + item.number = 1; + hashmap_set(&ctx->pragma_once_map, path, &item); + hash_item_set_destroy(&item); +} + +struct map_entry *hashmap_find(struct hash_map * map, char * key); + +static unsigned char pragma_once_already_included(struct preprocessor_ctx * ctx, char * path) +{ + return hashmap_find(&ctx->pragma_once_map, path) != ((void *)0); +} + +unsigned char path_is_absolute(char * path); +void path_normalize(char * path); +char *read_file(char * path, unsigned char append_newline); +char *realpath(char * path, char * resolved_path); + +char *find_and_read_include_file(struct preprocessor_ctx * ctx, char * path, char * current_file_dir, unsigned char is_angle_bracket_form, unsigned char * p_already_included, char full_path_out[], int full_path_out_size) +{ + char newpath[200] = {0}; + full_path_out[0] = 0; + if (path_is_absolute(path)) + { + snprintf(newpath, sizeof newpath, "%s", path); + path_normalize(newpath); + if (pragma_once_already_included(ctx, newpath)) + { + *p_already_included = 1; + return ((void *)0); + } + char * content = read_file(newpath, 1); + if (content != ((void *)0)) + { + snprintf(full_path_out, full_path_out_size, "%s", path); + return content; + } + return ((void *)0); + } + char * content = ((void *)0); + if ( !is_angle_bracket_form) + { + snprintf(newpath, sizeof newpath, "%s/%s", current_file_dir, path); + if ( !realpath(newpath, full_path_out)) + { + full_path_out[0] = 0; + } + path_normalize(full_path_out); + if (pragma_once_already_included(ctx, full_path_out)) + { + *p_already_included = 1; + return ((void *)0); + } + if (full_path_out[0] != 0) + { + content = read_file(full_path_out, 1); + } + if (content != ((void *)0)) + { + return content; + } + } + struct include_dir * current = ctx->include_dir.head; + while (current) + { + int len = strlen(current->path); + if (current->path[len - 1] == 47) + { + snprintf(full_path_out, full_path_out_size, "%s%s", current->path, path); + } + else + { + snprintf(full_path_out, full_path_out_size, "%s/%s", current->path, path); + } + path_normalize(full_path_out); + if (pragma_once_already_included(ctx, full_path_out)) + { + *p_already_included = 1; + return ((void *)0); + } + content = read_file(full_path_out, 1); + if (content != ((void *)0)) + { + return content; + } + current = current->next; + } + full_path_out[0] = 0; + return ((void *)0); +} + +void add_macro(struct preprocessor_ctx * ctx, char * name) +{ + if (1) + { + char * name_local = strdup(name); + if (name_local == ((void *)0)) + { + goto _catch_label_1; + } + struct macro * macro = calloc(1, sizeof *macro); + if (macro == ((void *)0)) + { + free(name_local); + goto _catch_label_1; + } + macro->name = name_local; + struct hash_item_set item = {0, 0, 0, 0, 0, 0, 0, 0}; + item.p_macro = macro; + hashmap_set(&ctx->macros, name, &item); + hash_item_set_destroy(&item); + } + else _catch_label_1: + { + } +} + +unsigned char token_is_blank(struct token * p); +struct token *token_list_clone_and_add(struct token_list * list, struct token * pnew); +void remove_line_continuation(char * s); + +struct token_list copy_argument_list_tokens(struct token_list * list) +{ + struct token_list r = {0}; + struct token * current = list->head; + while (current && (token_is_blank(current) || current->type == 10)) + { + current = current->next; + } + unsigned char is_first = 1; + for (; current; ) + { + if (current && (token_is_blank(current) || current->type == 10)) + { + if (current == list->tail) + { + break; + } + current = current->next; + continue; + } + struct token * token = token_list_clone_and_add(&r, current); + if (token->flags & 8) + { + token->flags = token->flags & ~8; + token->flags = 4; + } + if (is_first) + { + token->flags = token->flags & ~4; + token->flags = token->flags & ~8; + is_first = 0; + } + remove_line_continuation(token->lexeme); + if (current == list->tail) + { + break; + } + current = current->next; + } + return r; +} + +void macro_argument_delete(struct macro_argument * p) +{ + if (p) + { + ; + token_list_destroy(&p->tokens); + free((void *)p->name); + free(p); + } +} + +void token_delete(struct token * p); +struct token *token_list_add(struct token_list * list, struct token * pnew); + +struct token_list copy_argument_list(struct macro_argument * p_macro_argument) +{ + if (1) + { + struct token_list list = copy_argument_list_tokens(&p_macro_argument->tokens); + if (list.head == ((void *)0)) + { + struct token * p_new_token = calloc(1, sizeof *p_new_token); + if (p_new_token == ((void *)0)) + { + goto _catch_label_1; + } + char * temp = strdup(""); + if (temp == ((void *)0)) + { + token_delete(p_new_token); + goto _catch_label_1; + } + p_new_token->lexeme = temp; + p_new_token->type = 142; + token_list_add(&list, p_new_token); + } + return list; + } + else _catch_label_1: + { + } + struct token_list empty = {0}; + return empty; +} + +void macro_argument_list_destroy(struct macro_argument_list * list) +{ + token_list_destroy(&list->tokens); + struct macro_argument * p = list->head; + while (p) + { + struct macro_argument * next = p->next; + p->next = ((void *)0); + macro_argument_delete(p); + p = next; + } +} + +void print_list(struct token_list * list); + +void print_macro_arguments(struct macro_argument_list * arguments) +{ + struct macro_argument * p_argument = arguments->head; + while (p_argument) + { + printf("%s:", p_argument->name); + print_list(&p_argument->tokens); + p_argument = p_argument->next; + } +} + +int strcmp(char * _Str1, char * _Str2); + +struct macro_argument *find_macro_argument_by_name(struct macro_argument_list * parameters, char * name) +{ + struct macro_argument * p = parameters->head; + while (p) + { + if (strcmp(p->name, name) == 0) + { + return p; + } + p = p->next; + } + return ((void *)0); +} + +void argument_list_add(struct macro_argument_list * list, struct macro_argument * pnew) +{ + ; + if (list->head == ((void *)0)) + { + list->head = pnew; + ; + list->tail = pnew; + } + else + { + ; + ; + list->tail->next = pnew; + list->tail = pnew; + } +} + +void print_macro(struct macro * macro) +{ + printf("%s", macro->name); + if (macro->is_function) + { + printf("("); + } + struct macro_parameter * parameter = macro->parameters; + while (parameter) + { + if (macro->parameters != parameter) + { + printf(","); + } + printf("%s", parameter->name); + parameter = parameter->next; + } + if (macro->is_function) + { + printf(") "); + } + print_list(¯o->replacement_list); +} + +void macro_parameters_delete(struct macro_parameter * parameters) +{ + struct macro_parameter * p = parameters; + while (p) + { + struct macro_parameter * p_next = p->next; + free((void *)p->name); + free(p); + p = p_next; + } +} + +void macro_delete(struct macro * macro) +{ + if (macro) + { + token_list_destroy(¯o->replacement_list); + struct macro_parameter * p_macro_parameter = macro->parameters; + while (p_macro_parameter) + { + struct macro_parameter * p_next = p_macro_parameter->next; + free((void *)p_macro_parameter->name); + free(p_macro_parameter); + p_macro_parameter = p_next; + } + free((void *)macro->name); + free(macro); + } +} + +struct macro *find_macro(struct preprocessor_ctx * ctx, char * name) +{ + struct map_entry * p_entry = hashmap_find(&ctx->macros, name); + if (p_entry == ((void *)0)) + { + return ((void *)0); + } + return p_entry->data.p_macro; +} + +void stream_print_line(struct stream * stream) +{ + char * p = stream->current; + while ((p - 1) >= stream->source && *(p - 1) != 10) + { + p--; + } + while ( *p && *(p + 1) != 10) + { + printf("%c", *p); + p++; + } + printf("\n"); + { + int i = 0; + for (; i < stream->col - 1; i++) + printf(" "); + } + printf("^\n"); +} + +void stream_match(struct stream * stream) +{ + if (stream->current[0] == 10) + { + stream->line++; + stream->col = 1; + } + else + { + stream->col++; + } + if (stream->current[0] == 0) + { + return; + } + stream->current++; + while (stream->current[0] == 92 && stream->current[1] == 10) + { + stream->current++; + stream->current++; + stream->line++; + stream->col = 1; + stream->line_continuation_count++; + } +} + +void print_line(struct token * p) +{ + printf("%s\n", p->token_origin->lexeme); + struct token * prev = p; + while (prev->prev && prev->prev->type != 10) + { + prev = prev->prev; + } + struct token * next = prev; + while (next && next->type != 10) + { + printf("%s", next->lexeme); + next = next->next; + } + printf("\n"); +} + +int is_nondigit(struct stream * p) +{ + return (p->current[0] >= 97 && p->current[0] <= 122) || (p->current[0] >= 65 && p->current[0] <= 90) || (p->current[0] == 95); +} + +int is_punctuator(struct stream * stream) +{ + int type = 0; + switch (stream->current[0]) + { + case 91 : + type = 91; + stream_match(stream); + break; + case 93 : + type = 93; + stream_match(stream); + break; + case 40 : + type = 40; + stream_match(stream); + break; + case 41 : + type = 41; + stream_match(stream); + break; + case 123 : + type = 123; + stream_match(stream); + break; + case 125 : + type = 125; + stream_match(stream); + break; + case 59 : + type = 59; + stream_match(stream); + break; + case 44 : + type = 44; + stream_match(stream); + break; + case 33 : + type = 33; + stream_match(stream); + if (stream->current[0] == 61) + { + type = 8509; + stream_match(stream); + } + break; + case 58 : + type = 58; + stream_match(stream); + if (stream->current[0] == 58) + { + type = 14906; + stream_match(stream); + } + break; + case 126 : + type = 126; + stream_match(stream); + break; + case 63 : + type = 63; + stream_match(stream); + break; + case 47 : + type = 47; + stream_match(stream); + if (stream->current[0] == 61) + { + type = 12093; + stream_match(stream); + } + break; + case 42 : + type = 42; + stream_match(stream); + if (stream->current[0] == 61) + { + type = 10813; + stream_match(stream); + } + break; + case 37 : + type = 37; + stream_match(stream); + if (stream->current[0] == 61) + { + type = 9533; + stream_match(stream); + } + break; + case 45 : + type = 45; + stream_match(stream); + if (stream->current[0] == 62) + { + type = 11582; + stream_match(stream); + } + else + { + if (stream->current[0] == 45) + { + type = 11565; + stream_match(stream); + } + else + { + if (stream->current[0] == 61) + { + type = 11581; + stream_match(stream); + } + } + } + break; + case 124 : + type = 124; + stream_match(stream); + if (stream->current[0] == 124) + { + type = 31868; + stream_match(stream); + } + else + { + if (stream->current[0] == 61) + { + type = 31805; + stream_match(stream); + } + } + break; + case 43 : + type = 43; + stream_match(stream); + if (stream->current[0] == 43) + { + type = 11051; + stream_match(stream); + } + else + { + if (stream->current[0] == 61) + { + type = 11069; + stream_match(stream); + } + } + break; + case 61 : + type = 61; + stream_match(stream); + if (stream->current[0] == 61) + { + type = 15677; + stream_match(stream); + } + break; + case 94 : + type = 94; + stream_match(stream); + if (stream->current[0] == 61) + { + type = 24125; + stream_match(stream); + } + break; + case 38 : + type = 38; + stream_match(stream); + if (stream->current[0] == 38) + { + type = 9766; + stream_match(stream); + } + else + { + if (stream->current[0] == 61) + { + type = 9789; + stream_match(stream); + } + } + break; + case 62 : + type = 62; + stream_match(stream); + if (stream->current[0] == 62) + { + type = 15934; + stream_match(stream); + if (stream->current[0] == 61) + { + type = 15933; + stream_match(stream); + } + } + else + { + if (stream->current[0] == 61) + { + type = 15933; + stream_match(stream); + } + } + break; + case 60 : + type = 60; + stream_match(stream); + if (stream->current[0] == 60) + { + type = 15420; + stream_match(stream); + if (stream->current[0] == 61) + { + type = 15421; + stream_match(stream); + } + } + else + { + if (stream->current[0] == 61) + { + type = 15421; + stream_match(stream); + } + } + break; + case 35 : + type = 35; + stream_match(stream); + if (stream->current[0] == 35) + { + type = 8995; + stream_match(stream); + } + break; + case 46 : + type = 46; + stream_match(stream); + if (stream->current[0] == 46 && stream->current[1] == 46) + { + type = 11822; + stream_match(stream); + stream_match(stream); + } + break; + } + return type; +} + +char *strncpy(char * _Destination, char * _Source, unsigned int _Count); + +struct token *new_token(char * lexeme_head, char * lexeme_tail, int type) +{ + struct token * p_new_token = ((void *)0); + if (1) + { + p_new_token = calloc(1, sizeof *p_new_token); + if (p_new_token == ((void *)0)) + { + goto _catch_label_1; + } + unsigned int sz = lexeme_tail - lexeme_head; + char * temp = calloc(sz + 1, sizeof (char)); + if (temp == ((void *)0)) + { + goto _catch_label_1; + } + p_new_token->lexeme = temp; + p_new_token->type = type; + strncpy(p_new_token->lexeme, lexeme_head, sz); + } + else _catch_label_1: + { + token_delete(p_new_token); + p_new_token = ((void *)0); + } + return p_new_token; +} + +int is_digit(struct stream * p); + +struct token *identifier(struct stream * stream) +{ + char * start = stream->current; + stream_match(stream); + while (is_nondigit(stream) || is_digit(stream)) + { + stream_match(stream); + } + struct token * p_new_token = new_token(start, stream->current, 8996); + return p_new_token; +} + +static unsigned char first_of_character_constant(struct stream * stream) +{ + return stream->current[0] == 39 || (stream->current[0] == 117 && stream->current[1] == 56 && stream->current[2] == 39) || (stream->current[0] == 117 && stream->current[1] == 39) || (stream->current[0] == 85 && stream->current[1] == 39) || (stream->current[0] == 76 && stream->current[1] == 39); +} + +struct token *character_constant(struct tokenizer_ctx * ctx, struct stream * stream) +{ + char * start = stream->current; + if (stream->current[0] == 117) + { + stream_match(stream); + if (stream->current[0] == 56) + { + stream_match(stream); + } + } + else + { + if (stream->current[0] == 85 || stream->current[0] == 76) + { + stream_match(stream); + } + } + stream_match(stream); + while (stream->current[0] != 39) + { + if (stream->current[0] == 92) + { + stream_match(stream); + stream_match(stream); + } + else + { + stream_match(stream); + } + if (stream->current[0] == 0 || stream->current[0] == 10) + { + tokenizer_set_warning(ctx, stream, "missing terminating ' character"); + break; + } + } + stream_match(stream); + struct token * p_new_token = new_token(start, stream->current, 131); + return p_new_token; +} + +static unsigned char first_of_string_literal(struct stream * stream) +{ + return stream->current[0] == 34 || (stream->current[0] == 117 && stream->current[1] == 56 && stream->current[2] == 34) || (stream->current[0] == 117 && stream->current[1] == 34) || (stream->current[0] == 85 && stream->current[1] == 34) || (stream->current[0] == 76 && stream->current[1] == 34); +} + +struct token *string_literal(struct tokenizer_ctx * ctx, struct stream * stream) +{ + struct token * p_new_token = ((void *)0); + char * start = stream->current; + if (1) + { + if (stream->current[0] == 117) + { + stream_match(stream); + if (stream->current[0] == 56) + { + stream_match(stream); + } + } + else + { + if (stream->current[0] == 85 || stream->current[0] == 76) + { + stream_match(stream); + } + } + stream_match(stream); + while (stream->current[0] != 34) + { + if (stream->current[0] == 0 || stream->current[0] == 10) + { + tokenizer_set_error(ctx, stream, "missing terminating \" character"); + goto _catch_label_1; + } + if (stream->current[0] == 92) + { + stream_match(stream); + stream_match(stream); + } + else + { + stream_match(stream); + } + } + stream_match(stream); + p_new_token = new_token(start, stream->current, 130); + } + else _catch_label_1: + { + } + return p_new_token; +} + +int get_char_type(char * s) +{ + if (s[0] == 76) + { + return 2; + } + return 1; +} + +int string_literal_char_byte_size(char * s) +{ + if (s[0] == 117) + { + } + else + { + if (s[0] == 85 || s[0] == 76) + { + return (int)sizeof (unsigned short); + } + } + return 1; +} + +int string_literal_byte_size_not_zero_included(char * s) +{ + struct stream stream = {0, 0, 0, 0, 0, 0}; + stream.source = s; + stream.current = s; + stream.line = 1; + stream.col = 1; + stream.path = ""; + int size = 0; + int charsize = string_literal_char_byte_size(s); + if (1) + { + if (stream.current[0] == 117) + { + stream_match(&stream); + if (stream.current[0] == 56) + { + stream_match(&stream); + } + } + else + { + if (stream.current[0] == 85 || stream.current[0] == 76) + { + stream_match(&stream); + } + } + stream_match(&stream); + while (stream.current[0] != 34) + { + if (stream.current[0] == 0 || stream.current[0] == 10) + { + goto _catch_label_1; + } + if (stream.current[0] == 92) + { + stream_match(&stream); + stream_match(&stream); + size++; + } + else + { + stream_match(&stream); + size++; + } + } + stream_match(&stream); + } + else _catch_label_1: + { + } + return size * charsize; +} + +static struct token *ppnumber(struct stream * stream) +{ + char * start = stream->current; + if (is_digit(stream)) + { + stream_match(stream); + } + else + { + if (stream->current[0] == 46) + { + stream_match(stream); + stream_match(stream); + } + else + { + ; + } + } + for (; ; ) + { + if (stream->current[0] == 39) + { + stream_match(stream); + if (is_digit(stream)) + { + stream_match(stream); + } + else + { + if (is_nondigit(stream)) + { + stream_match(stream); + } + else + { + ; + break; + } + } + } + else + { + if ((stream->current[0] == 101 || stream->current[0] == 69 || stream->current[0] == 112 || stream->current[0] == 80) && (stream->current[1] == 43 || stream->current[1] == 45)) + { + stream_match(stream); + stream_match(stream); + } + else + { + if (stream->current[0] == 46) + { + stream_match(stream); + } + else + { + if (is_digit(stream) || is_nondigit(stream)) + { + stream_match(stream); + } + else + { + break; + } + } + } + } + } + struct token * p_new_token = new_token(start, stream->current, 134); + return p_new_token; +} + +struct _iobuf *fopen(char * _FileName, char * _Mode); +unsigned int fread(void * _Buffer, unsigned int _ElementSize, unsigned int _ElementCount, struct _iobuf * _Stream); +int fclose(struct _iobuf * _Stream); + +struct token_list embed_tokenizer(struct preprocessor_ctx * ctx, struct token * position, char * filename_opt, int level, int addflags) +{ + struct token_list list = {0}; + struct _iobuf * file = ((void *)0); + unsigned char b_first = 1; + int line = 1; + int col = 1; + int count = 0; + if (1) + { + file = (struct _iobuf *)fopen(filename_opt, "rb"); + if (file == ((void *)0)) + { + preprocessor_diagnostic_message(1150, ctx, position, "file '%s' not found", filename_opt); + goto _catch_label_1; + } + unsigned char ch = 0; + while (fread(&ch, 1, 1, file)) + { + if (b_first) + { + b_first = 0; + } + else + { + char b[2] = ","; + struct token * p_new_token = new_token(b, &b[1], 44); + if (p_new_token == ((void *)0)) + { + goto _catch_label_1; + } + p_new_token->flags = addflags; + p_new_token->level = level; + p_new_token->token_origin = ((void *)0); + p_new_token->line = line; + p_new_token->col = col; + token_list_add(&list, p_new_token); + if (count > 0 && count % 25 == 0) + { + char newline[2] = "\n"; + struct token * p_new3 = new_token(newline, &newline[1], 10); + if (p_new3 == ((void *)0)) + { + goto _catch_label_1; + } + p_new3->level = level; + p_new3->token_origin = ((void *)0); + p_new3->line = line; + p_new3->col = col; + token_list_add(&list, p_new3); + } + } + char buffer[30] = {0}; + int c = snprintf(buffer, sizeof buffer, "%d", (int)ch); + struct token * p_new_token = new_token(buffer, &buffer[c], 134); + if (p_new_token == ((void *)0)) + { + goto _catch_label_1; + } + p_new_token->flags = addflags; + p_new_token->level = level; + p_new_token->token_origin = ((void *)0); + p_new_token->line = line; + p_new_token->col = col; + token_list_add(&list, p_new_token); + count++; + } + char newline[2] = "\n"; + struct token * p_new_token = new_token(newline, &newline[1], 10); + if (p_new_token == ((void *)0)) + { + goto _catch_label_1; + } + p_new_token->level = level; + p_new_token->token_origin = ((void *)0); + p_new_token->line = line; + p_new_token->col = col; + token_list_add(&list, p_new_token); + ; + } + else _catch_label_1: + { + } + if (file) + { + fclose(file); + } + return list; +} + +static unsigned char set_sliced_flag(struct stream * stream, struct token * p_new_token) +{ + if (stream->line_continuation_count > 0) + { + p_new_token->flags = 1024; + if (stream->line_continuation_count == 1) + { + int l = strlen(p_new_token->lexeme); + if (p_new_token->lexeme[l - 1] == 10) + { + } + else + { + p_new_token->flags = 512; + } + } + else + { + p_new_token->flags = 512; + } + } + return p_new_token->flags & 512; +} + +int isdigit(int _C); + +struct token_list tokenizer(struct tokenizer_ctx * ctx, char * text, char * filename_opt, int level, int addflags) +{ + struct token_list list = {0}; + struct stream stream = {0, 0, 1, 1, 0, 0}; + stream.source = text; + stream.current = text; + stream.path = filename_opt ? filename_opt : ""; + if (1) + { + struct token * p_first = ((void *)0); + if (filename_opt != ((void *)0)) + { + char * begin = filename_opt; + char * end = filename_opt + strlen(filename_opt); + struct token * p_new = new_token(begin, end, 8998); + if (p_new == ((void *)0)) + { + goto _catch_label_1; + } + path_normalize(p_new->lexeme); + p_new->level = level; + p_first = token_list_add(&list, p_new); + } + unsigned char new_line = 1; + unsigned char has_space = 0; + while (1) + { + int line = stream.line; + int col = stream.col; + stream.line_continuation_count = 0; + if (stream.current[0] == 0) + { + stream_match(&stream); + break; + } + if (is_digit(&stream) || (stream.current[0] == 46 && isdigit(stream.current[0]))) + { + struct token * p_new_token = ppnumber(&stream); + if (p_new_token == ((void *)0)) + { + goto _catch_label_1; + } + p_new_token->flags = has_space ? 4 : 0; + p_new_token->flags = new_line ? 8 : 0; + p_new_token->flags = addflags; + p_new_token->flags = addflags; + p_new_token->level = level; + p_new_token->token_origin = p_first; + p_new_token->line = line; + p_new_token->col = col; + set_sliced_flag(&stream, p_new_token); + token_list_add(&list, p_new_token); + new_line = 0; + has_space = 0; + continue; + } + if (first_of_string_literal(&stream)) + { + struct token * p_new_token = string_literal(ctx, &stream); + if (p_new_token == ((void *)0)) + { + goto _catch_label_1; + } + p_new_token->flags = has_space ? 4 : 0; + p_new_token->flags = new_line ? 8 : 0; + p_new_token->flags = addflags; + p_new_token->flags = addflags; + p_new_token->level = level; + p_new_token->token_origin = p_first; + p_new_token->line = line; + p_new_token->col = col; + set_sliced_flag(&stream, p_new_token); + token_list_add(&list, p_new_token); + new_line = 0; + has_space = 0; + continue; + } + if (first_of_character_constant(&stream)) + { + struct token * p_new_token = character_constant(ctx, &stream); + if (p_new_token == ((void *)0)) + { + goto _catch_label_1; + } + p_new_token->flags = has_space ? 4 : 0; + p_new_token->flags = new_line ? 8 : 0; + p_new_token->flags = addflags; + p_new_token->level = level; + p_new_token->token_origin = p_first; + p_new_token->line = line; + p_new_token->col = col; + set_sliced_flag(&stream, p_new_token); + token_list_add(&list, p_new_token); + new_line = 0; + has_space = 0; + continue; + } + if (is_nondigit(&stream)) + { + struct token * p_new_token = identifier(&stream); + if (p_new_token == ((void *)0)) + { + goto _catch_label_1; + } + p_new_token->flags = has_space ? 4 : 0; + p_new_token->flags = new_line ? 8 : 0; + p_new_token->flags = addflags; + p_new_token->level = level; + p_new_token->token_origin = p_first; + p_new_token->line = line; + p_new_token->col = col; + new_line = 0; + has_space = 0; + if (set_sliced_flag(&stream, p_new_token)) + { + tokenizer_set_warning(ctx, &stream, "token sliced"); + } + token_list_add(&list, p_new_token); + continue; + } + if (stream.current[0] == 32 || stream.current[0] == 9 || stream.current[0] == 12) + { + char * start = stream.current; + while (stream.current[0] == 32 || stream.current[0] == 9 || stream.current[0] == 12) + { + stream_match(&stream); + } + struct token * p_new_token = new_token(start, stream.current, 143); + if (p_new_token == ((void *)0)) + { + goto _catch_label_1; + } + p_new_token->flags = has_space ? 4 : 0; + p_new_token->flags = new_line ? 8 : 0; + p_new_token->flags = addflags; + p_new_token->level = level; + p_new_token->token_origin = p_first; + p_new_token->line = line; + p_new_token->col = col; + set_sliced_flag(&stream, p_new_token); + token_list_add(&list, p_new_token); + has_space = 1; + continue; + } + if (stream.current[0] == 47 && stream.current[1] == 47) + { + char * start = stream.current; + stream_match(&stream); + stream_match(&stream); + while (stream.current[0] != 10) + { + stream_match(&stream); + if (stream.current[0] == 0) + { + break; + } + } + struct token * p_new_token = new_token(start, stream.current, 132); + if (p_new_token == ((void *)0)) + { + goto _catch_label_1; + } + p_new_token->flags = has_space ? 4 : 0; + p_new_token->flags = new_line ? 8 : 0; + p_new_token->flags = addflags; + p_new_token->level = level; + p_new_token->token_origin = p_first; + p_new_token->line = line; + p_new_token->col = col; + set_sliced_flag(&stream, p_new_token); + token_list_add(&list, p_new_token); + new_line = 1; + has_space = 0; + if (stream.current[0] == 0) + { + break; + } + continue; + } + if (stream.current[0] == 47 && stream.current[1] == 42) + { + char * start = stream.current; + stream_match(&stream); + stream_match(&stream); + for (; ; ) + { + if (stream.current[0] == 42 && stream.current[1] == 47) + { + stream_match(&stream); + stream_match(&stream); + break; + } + else + { + if (stream.current[0] == 0) + { + tokenizer_set_error(ctx, &stream, "missing end of comment"); + break; + } + else + { + stream_match(&stream); + } + } + } + struct token * p_new_token = new_token(start, stream.current, 133); + if (p_new_token == ((void *)0)) + { + goto _catch_label_1; + } + p_new_token->flags = has_space ? 4 : 0; + p_new_token->flags = new_line ? 8 : 0; + p_new_token->flags = addflags; + p_new_token->level = level; + p_new_token->token_origin = p_first; + p_new_token->line = line; + p_new_token->col = col; + token_list_add(&list, p_new_token); + new_line = 0; + has_space = 0; + continue; + } + if (new_line && stream.current[0] == 35) + { + char * start = stream.current; + stream_match(&stream); + struct token * p_new_token = new_token(start, stream.current, 35); + if (p_new_token == ((void *)0)) + { + goto _catch_label_1; + } + p_new_token->flags = has_space ? 4 : 0; + p_new_token->flags = new_line ? 8 : 0; + p_new_token->flags = addflags; + p_new_token->level = level; + p_new_token->token_origin = p_first; + p_new_token->line = line; + p_new_token->col = col; + p_new_token->type = 127; + set_sliced_flag(&stream, p_new_token); + token_list_add(&list, p_new_token); + new_line = 0; + has_space = 0; + continue; + } + if (stream.current[0] == 10 || stream.current[0] == 13) + { + if (stream.current[0] == 13 && stream.current[1] == 10) + { + stream_match(&stream); + stream_match(&stream); + } + else + { + stream_match(&stream); + } + char newline[2] = "\n"; + struct token * p_new_token = new_token(newline, newline + 1, 10); + if (p_new_token == ((void *)0)) + { + goto _catch_label_1; + } + p_new_token->flags = has_space ? 4 : 0; + p_new_token->flags = new_line ? 8 : 0; + p_new_token->flags = addflags; + p_new_token->level = level; + p_new_token->token_origin = p_first; + p_new_token->line = line; + p_new_token->col = col; + set_sliced_flag(&stream, p_new_token); + token_list_add(&list, p_new_token); + new_line = 1; + has_space = 0; + continue; + } + char * start = stream.current; + int t = is_punctuator(&stream); + if (t != 0) + { + struct token * p_new_token = new_token(start, stream.current, t); + if (p_new_token == ((void *)0)) + { + goto _catch_label_1; + } + p_new_token->flags = has_space ? 4 : 0; + p_new_token->flags = new_line ? 8 : 0; + p_new_token->flags = addflags; + p_new_token->level = level; + p_new_token->token_origin = p_first; + p_new_token->line = line; + p_new_token->col = col; + set_sliced_flag(&stream, p_new_token); + token_list_add(&list, p_new_token); + new_line = 0; + has_space = 0; + continue; + } + else + { + stream_match(&stream); + struct token * p_new_token = new_token(start, stream.current, 135); + if (p_new_token == ((void *)0)) + { + goto _catch_label_1; + } + p_new_token->flags = has_space ? 4 : 0; + p_new_token->flags = new_line ? 8 : 0; + p_new_token->flags = addflags; + p_new_token->level = level; + p_new_token->token_origin = p_first; + p_new_token->line = line; + p_new_token->col = col; + set_sliced_flag(&stream, p_new_token); + token_list_add(&list, p_new_token); + new_line = 0; + has_space = 0; + continue; + } + break; + } + } + else _catch_label_1: + { + } + ; + return list; +} + +int feof(struct _iobuf * _Stream); + +unsigned char fread2(void * buffer, unsigned int size, unsigned int count, struct _iobuf * stream, unsigned int * sz) +{ + *sz = 0; + unsigned char result = 0; + unsigned int n = fread(buffer, size, count, stream); + if (n == count) + { + *sz = n; + result = 1; + } + else + { + if (n < count) + { + if (feof(stream)) + { + *sz = n; + result = 1; + } + } + } + return result; +} + +unsigned char token_list_is_empty(struct token_list * p); +unsigned char preprocessor_token_ahead_is_identifier(struct token * p, char * lexeme); +struct token_list group_part(struct preprocessor_ctx * ctx, struct token_list * input_list, unsigned char is_active, int level); +void token_list_append_list(struct token_list * dest, struct token_list * source); + +struct token_list group_opt(struct preprocessor_ctx * ctx, struct token_list * input_list, unsigned char is_active, int level) +{ + struct token_list r = {0}; + if (1) + { + if (token_list_is_empty(input_list)) + { + return r; + } + while ( !token_list_is_empty(input_list)) + { + ; + if (input_list->head->type == 127 && (preprocessor_token_ahead_is_identifier(input_list->head, "endif") || preprocessor_token_ahead_is_identifier(input_list->head, "else") || preprocessor_token_ahead_is_identifier(input_list->head, "elif") || preprocessor_token_ahead_is_identifier(input_list->head, "elifdef") || preprocessor_token_ahead_is_identifier(input_list->head, "elifndef"))) + { + break; + } + else + { + struct token_list r2 = group_part(ctx, input_list, is_active, level); + token_list_append_list(&r, &r2); + token_list_destroy(&r2); + if (ctx->n_errors > 0) + { + goto _catch_label_1; + } + } + } + } + else _catch_label_1: + { + } + return r; +} + +unsigned char is_parser_token(struct token * p) +{ + return p->type != 133 && p->type != 143 && p->type != 132 && p->type != 10; +} + +unsigned char is_never_final(int type) +{ + return type == 8998 || type == 143 || type == 132 || type == 133 || type == 142 || type == 10; +} + +struct token *preprocessor_look_ahead_core(struct token * p) +{ + struct token * current = p->next; + while (current && (current->type == 143 || current->type == 142 || current->type == 132 || current->type == 133)) + { + current = current->next; + } + return current; +} + +unsigned char preprocessor_token_ahead_is(struct token * p, int t) +{ + struct token * p_token = preprocessor_look_ahead_core(p); + if (p_token != ((void *)0) && p_token->type == t) + { + return 1; + } + return 0; +} + +unsigned char preprocessor_token_ahead_is_identifier(struct token * p, char * lexeme) +{ + ; + struct token * p_token = preprocessor_look_ahead_core(p); + if (p_token != ((void *)0) && p_token->type == 8996) + { + return strcmp(p_token->lexeme, lexeme) == 0; + } + return 0; +} + +struct token *token_list_pop_front_get(struct token_list * list); +void token_list_pop_front(struct token_list * list); + +static void skip_blanks_level(struct preprocessor_ctx * ctx, struct token_list * dest, struct token_list * input_list, int level) +{ + while (input_list->head) + { + if ( !token_is_blank(input_list->head)) + { + break; + } + if (1 || level == 0) + { + struct token * p = token_list_pop_front_get(input_list); + ; + token_list_add(dest, p); + } + else + { + token_list_pop_front(input_list); + } + } +} + +static void skip_blanks(struct preprocessor_ctx * ctx, struct token_list * dest, struct token_list * input_list) +{ + while (input_list->head) + { + if ( !token_is_blank(input_list->head)) + { + break; + } + struct token * p = token_list_pop_front_get(input_list); + ; + token_list_add(dest, p); + } +} + +void prematch_level(struct token_list * dest, struct token_list * input_list, int level) +{ + if (1 || level == 0) + { + struct token * p = token_list_pop_front_get(input_list); + if (p) + { + token_list_add(dest, p); + } + } + else + { + token_list_pop_front(input_list); + } +} + +void prematch(struct token_list * dest, struct token_list * input_list) +{ + struct token * p = token_list_pop_front_get(input_list); + if (p) + { + token_list_add(dest, p); + } +} + +char *strcat(char * _Destination, char * _Source); + +struct token_list process_defined(struct preprocessor_ctx * ctx, struct token_list * input_list) +{ + struct token_list r = {0}; + if (1) + { + while (input_list->head != ((void *)0)) + { + if (input_list->head->type == 8996 && strcmp(input_list->head->lexeme, "defined") == 0) + { + token_list_pop_front(input_list); + skip_blanks(ctx, &r, input_list); + if (input_list->head == ((void *)0)) + { + pre_unexpected_end_of_file(r.tail, ctx); + goto _catch_label_1; + } + unsigned char has_parentesis = 0; + if (input_list->head->type == 40) + { + token_list_pop_front(input_list); + has_parentesis = 1; + } + skip_blanks(ctx, &r, input_list); + if (input_list->head == ((void *)0)) + { + pre_unexpected_end_of_file(r.tail, ctx); + goto _catch_label_1; + } + struct macro * macro = find_macro(ctx, input_list->head->lexeme); + struct token * p_new_token = token_list_pop_front_get(input_list); + if (p_new_token == ((void *)0)) + { + goto _catch_label_1; + } + p_new_token->type = 134; + char * temp = ((void *)0); + if (macro) + { + temp = strdup("1"); + } + else + { + temp = strdup("0"); + } + if (temp == ((void *)0)) + { + token_delete(p_new_token); + goto _catch_label_1; + } + free(p_new_token->lexeme); + p_new_token->lexeme = temp; + token_list_add(&r, p_new_token); + if (has_parentesis) + { + if (input_list->head == ((void *)0)) + { + goto _catch_label_1; + } + if (input_list->head->type != 41) + { + preprocessor_diagnostic_message(1160, ctx, input_list->head, "missing )"); + goto _catch_label_1; + } + token_list_pop_front(input_list); + } + } + else + { + if (input_list->head->type == 8996 && (strcmp(input_list->head->lexeme, "__has_include") == 0 || strcmp(input_list->head->lexeme, "__has_embed") == 0)) + { + token_list_pop_front(input_list); + skip_blanks(ctx, &r, input_list); + token_list_pop_front(input_list); + skip_blanks(ctx, &r, input_list); + char path[100] = {0}; + unsigned char is_angle_bracket_form = 0; + if (input_list->head == ((void *)0)) + { + pre_unexpected_end_of_file(r.tail, ctx); + goto _catch_label_1; + } + if (input_list->head->type == 130) + { + strcat(path, input_list->head->lexeme); + token_list_pop_front(input_list); + } + else + { + is_angle_bracket_form = 1; + token_list_pop_front(input_list); + if (input_list->head == ((void *)0)) + { + pre_unexpected_end_of_file(r.tail, ctx); + goto _catch_label_1; + } + while (input_list->head->type != 62) + { + strcat(path, input_list->head->lexeme); + token_list_pop_front(input_list); + if (input_list->head == ((void *)0)) + { + pre_unexpected_end_of_file(r.tail, ctx); + goto _catch_label_1; + } + } + token_list_pop_front(input_list); + } + char fullpath[300] = {0}; + char full_path_result[200] = {0}; + unsigned char already_included = 0; + char * s = find_and_read_include_file(ctx, path, fullpath, is_angle_bracket_form, &already_included, full_path_result, sizeof full_path_result); + unsigned char has_include = s != ((void *)0); + free((void *)s); + struct token * p_new_token = calloc(1, sizeof *p_new_token); + if (p_new_token == ((void *)0)) + { + goto _catch_label_1; + } + p_new_token->type = 134; + char * temp = strdup(has_include ? "1" : "0"); + if (temp == ((void *)0)) + { + token_delete(p_new_token); + goto _catch_label_1; + } + p_new_token->lexeme = temp; + p_new_token->flags = 1; + token_list_add(&r, p_new_token); + token_list_pop_front(input_list); + } + else + { + if (input_list->head->type == 8996 && strcmp(input_list->head->lexeme, "__has_c_attribute") == 0) + { + token_list_pop_front(input_list); + skip_blanks(ctx, &r, input_list); + token_list_pop_front(input_list); + skip_blanks(ctx, &r, input_list); + if (input_list->head == ((void *)0)) + { + pre_unexpected_end_of_file(r.tail, ctx); + goto _catch_label_1; + } + char path[100] = {0}; + while (input_list->head->type != 41) + { + strcat(path, input_list->head->lexeme); + token_list_pop_front(input_list); + if (input_list->head == ((void *)0)) + { + pre_unexpected_end_of_file(r.tail, ctx); + goto _catch_label_1; + } + } + token_list_pop_front(input_list); + unsigned char has_c_attribute = 0; + struct token * p_new_token = calloc(1, sizeof *p_new_token); + if (p_new_token == ((void *)0)) + { + goto _catch_label_1; + } + p_new_token->type = 134; + char * temp = strdup(has_c_attribute ? "1" : "0"); + if (temp == ((void *)0)) + { + token_delete(p_new_token); + goto _catch_label_1; + } + p_new_token->lexeme = temp; + p_new_token->flags = 1; + token_list_add(&r, p_new_token); + token_list_pop_front(input_list); + } + else + { + struct token * tk = token_list_pop_front_get(input_list); + if (tk) + { + token_list_add(&r, tk); + } + } + } + } + } + } + else _catch_label_1: + { + } + return r; +} + +struct token_list process_identifiers(struct preprocessor_ctx * ctx, struct token_list * list) +{ + ; + struct token_list list2 = {0}; + if (1) + { + while (list->head != ((void *)0)) + { + if (list->head->type == 8996) + { + struct macro * macro = find_macro(ctx, list->head->lexeme); + struct token * p_new_token = token_list_pop_front_get(list); + ; + p_new_token->type = 134; + if (macro) + { + char * temp = strdup("1"); + if (temp == ((void *)0)) + { + token_delete(p_new_token); + goto _catch_label_1; + } + free(p_new_token->lexeme); + p_new_token->lexeme = temp; + } + else + { + if (strcmp(p_new_token->lexeme, "true") == 0) + { + p_new_token->lexeme[0] = 49; + p_new_token->lexeme[1] = 0; + } + else + { + if (strcmp(p_new_token->lexeme, "false") == 0) + { + p_new_token->lexeme[0] = 48; + p_new_token->lexeme[1] = 0; + } + else + { + char * temp = strdup("0"); + if (temp == ((void *)0)) + { + token_delete(p_new_token); + goto _catch_label_1; + } + free(p_new_token->lexeme); + p_new_token->lexeme = temp; + } + } + } + token_list_add(&list2, p_new_token); + } + else + { + struct token * ptk = token_list_pop_front_get(list); + ; + token_list_add(&list2, ptk); + } + } + ; + } + else _catch_label_1: + { + } + return list2; +} + +struct token_list ignore_preprocessor_line(struct token_list * input_list) +{ + struct token_list r = {0}; + while (input_list->head && input_list->head->type != 10) + { + struct token * tk = token_list_pop_front_get(input_list); + ; + token_list_add(&r, tk); + } + return r; +} + +struct token_list copy_replacement_list(struct token_list * list); +void token_list_swap(struct token_list * a, struct token_list * b); +struct token_list preprocessor(struct preprocessor_ctx * ctx, struct token_list * input_list, int level); +int pre_constant_expression(struct preprocessor_ctx * ctx, long long * pvalue); + +long long preprocessor_constant_expression(struct preprocessor_ctx * ctx, struct token_list * output_list, struct token_list * input_list, int level) +{ + ; + struct token * first = input_list->head; + ctx->conditional_inclusion = 1; + struct token_list r = {0}; + while (input_list->head && input_list->head->type != 10) + { + struct token * tk = token_list_pop_front_get(input_list); + ; + token_list_add(&r, tk); + ; + r.tail->flags = ~1024; + } + struct token_list list1 = copy_replacement_list(&r); + token_list_swap(output_list, &r); + int flags = ctx->flags; + ctx->flags = 1; + struct token_list list2 = preprocessor(ctx, &list1, 1); + ctx->flags = flags; + long long value = 0; + if (list2.head == ((void *)0)) + { + preprocessor_diagnostic_message(1170, ctx, first, "empty expression"); + } + else + { + struct token_list list3 = process_defined(ctx, &list2); + struct token_list list4 = process_identifiers(ctx, &list3); + ; + struct preprocessor_ctx pre_ctx = {0}; + pre_ctx.input_list = list4; + pre_ctx.current = pre_ctx.input_list.head; + if (pre_constant_expression(&pre_ctx, &value) != 0) + { + preprocessor_diagnostic_message(1170, ctx, first, "expression error"); + } + ctx->conditional_inclusion = 0; + preprocessor_ctx_destroy(&pre_ctx); + } + token_list_destroy(&list1); + token_list_destroy(&r); + token_list_destroy(&list2); + return value; +} + +void match_level(struct token_list * dest, struct token_list * input_list, int level) +{ + if (1 || level == 0) + { + struct token * tk = token_list_pop_front_get(input_list); + if (tk) + { + token_list_add(dest, tk); + } + } + else + { + token_list_pop_front(input_list); + } +} + +char *get_token_name(int tk); + +int match_token_level(struct token_list * dest, struct token_list * input_list, int type, int level, struct preprocessor_ctx * ctx) +{ + if (1) + { + if (input_list->head == ((void *)0) || input_list->head->type != type) + { + if (type == 10 && input_list->head == ((void *)0)) + { + } + else + { + if (input_list->head) + { + preprocessor_diagnostic_message(970, ctx, input_list->head, "expected token %s got %s\n", get_token_name(type), get_token_name(input_list->head->type)); + } + else + { + preprocessor_diagnostic_message(970, ctx, dest->tail, "expected EOF \n"); + } + goto _catch_label_1; + } + } + if (input_list->head != ((void *)0)) + { + if (1 || level == 0) + { + token_list_add(dest, token_list_pop_front_get(input_list)); + } + else + { + token_list_pop_front(input_list); + } + } + } + else _catch_label_1: + { + } + return ctx->n_errors > 0; +} + +struct token_list if_group(struct preprocessor_ctx * ctx, struct token_list * input_list, unsigned char is_active, int level, unsigned char * p_result) +{ + *p_result = 0; + ; + struct token_list r = {0}; + if (1) + { + match_token_level(&r, input_list, 127, level, ctx); + skip_blanks_level(ctx, &r, input_list, level); + if (input_list->head == ((void *)0)) + { + goto _catch_label_1; + } + ; + if (strcmp(input_list->head->lexeme, "ifdef") == 0) + { + match_token_level(&r, input_list, 8996, level, ctx); + skip_blanks_level(ctx, &r, input_list, level); + if (input_list->head == ((void *)0)) + { + pre_unexpected_end_of_file(r.tail, ctx); + goto _catch_label_1; + } + if (is_active) + { + struct macro * macro = find_macro(ctx, input_list->head->lexeme); + *p_result = (macro != ((void *)0)) ? 1 : 0; + } + match_token_level(&r, input_list, 8996, level, ctx); + skip_blanks_level(ctx, &r, input_list, level); + match_token_level(&r, input_list, 10, level, ctx); + } + else + { + if (strcmp(input_list->head->lexeme, "ifndef") == 0) + { + match_token_level(&r, input_list, 8996, level, ctx); + skip_blanks_level(ctx, &r, input_list, level); + if (input_list->head == ((void *)0)) + { + pre_unexpected_end_of_file(r.tail, ctx); + goto _catch_label_1; + } + if (is_active) + { + struct macro * macro = find_macro(ctx, input_list->head->lexeme); + *p_result = (macro == ((void *)0)) ? 1 : 0; + } + match_token_level(&r, input_list, 8996, level, ctx); + skip_blanks_level(ctx, &r, input_list, level); + match_token_level(&r, input_list, 10, level, ctx); + } + else + { + if (strcmp(input_list->head->lexeme, "if") == 0) + { + match_token_level(&r, input_list, 8996, level, ctx); + skip_blanks_level(ctx, &r, input_list, level); + if (is_active) + { + struct token_list r0 = {0}; + *p_result = preprocessor_constant_expression(ctx, &r0, input_list, level); + token_list_append_list(&r, &r0); + token_list_destroy(&r0); + } + else + { + struct token_list r0 = ignore_preprocessor_line(input_list); + token_list_append_list(&r, &r0); + token_list_destroy(&r0); + } + match_token_level(&r, input_list, 10, level, ctx); + } + else + { + preprocessor_diagnostic_message(650, ctx, input_list->head, "unexpected"); + goto _catch_label_1; + } + } + } + struct token_list r2 = group_opt(ctx, input_list, is_active && *p_result, level); + token_list_append_list(&r, &r2); + ; + ; + } + else _catch_label_1: + { + } + return r; +} + +struct token_list elif_group(struct preprocessor_ctx * ctx, struct token_list * input_list, unsigned char is_active, int level, unsigned char * p_elif_result) +{ + *p_elif_result = 0; + ; + struct token_list r = {0}; + if (1) + { + match_token_level(&r, input_list, 127, level, ctx); + skip_blanks(ctx, &r, input_list); + if (input_list->head == ((void *)0)) + { + goto _catch_label_1; + } + unsigned long long result = 0; + if (strcmp(input_list->head->lexeme, "elif") == 0) + { + match_token_level(&r, input_list, 8996, level, ctx); + skip_blanks(ctx, &r, input_list); + if (is_active) + { + struct token_list r0 = {0}; + result = preprocessor_constant_expression(ctx, &r0, input_list, level); + token_list_append_list(&r, &r0); + token_list_destroy(&r0); + } + else + { + struct token_list r0 = ignore_preprocessor_line(input_list); + token_list_append_list(&r, &r0); + token_list_destroy(&r0); + } + } + else + { + if (strcmp(input_list->head->lexeme, "elifdef") == 0) + { + match_token_level(&r, input_list, 8996, level, ctx); + skip_blanks(ctx, &r, input_list); + if (input_list->head == ((void *)0)) + { + goto _catch_label_1; + } + if (is_active) + { + result = (hashmap_find(&ctx->macros, input_list->head->lexeme) != ((void *)0)) ? 1 : 0; + } + match_token_level(&r, input_list, 8996, level, ctx); + } + else + { + if (strcmp(input_list->head->lexeme, "elifndef") == 0) + { + match_token_level(&r, input_list, 8996, level, ctx); + skip_blanks(ctx, &r, input_list); + if (input_list->head == ((void *)0)) + { + goto _catch_label_1; + } + if (is_active) + { + result = (hashmap_find(&ctx->macros, input_list->head->lexeme) == ((void *)0)) ? 1 : 0; + } + match_token_level(&r, input_list, 8996, level, ctx); + } + } + } + *p_elif_result = (result != 0); + skip_blanks(ctx, &r, input_list); + match_token_level(&r, input_list, 10, level, ctx); + struct token_list r2 = group_opt(ctx, input_list, is_active && *p_elif_result, level); + token_list_append_list(&r, &r2); + token_list_destroy(&r2); + } + else _catch_label_1: + { + } + return r; +} + +struct token_list elif_groups(struct preprocessor_ctx * ctx, struct token_list * input_list, unsigned char is_active, int level, unsigned char * pelif_result) +{ + ; + struct token_list r = {0}; + if (1) + { + unsigned char already_found_elif_true = 0; + unsigned char elif_result = 0; + struct token_list r2 = elif_group(ctx, input_list, is_active, level, &elif_result); + if (input_list->head == ((void *)0)) + { + token_list_destroy(&r2); + goto _catch_label_1; + } + token_list_append_list(&r, &r2); + if (elif_result) + { + already_found_elif_true = 1; + } + if (input_list->head->type == 127 && (preprocessor_token_ahead_is_identifier(input_list->head, "elif") || preprocessor_token_ahead_is_identifier(input_list->head, "elifdef") || preprocessor_token_ahead_is_identifier(input_list->head, "elifndef"))) + { + struct token_list r3 = elif_groups(ctx, input_list, is_active && !already_found_elif_true, level, &elif_result); + token_list_append_list(&r, &r3); + if (elif_result) + { + already_found_elif_true = 1; + } + token_list_destroy(&r3); + } + *pelif_result = already_found_elif_true; + token_list_destroy(&r2); + } + else _catch_label_1: + { + } + return r; +} + +struct token_list else_group(struct preprocessor_ctx * ctx, struct token_list * input_list, unsigned char is_active, int level) +{ + struct token_list r = {0}; + if (1) + { + match_token_level(&r, input_list, 127, level, ctx); + skip_blanks_level(ctx, &r, input_list, level); + match_token_level(&r, input_list, 8996, level, ctx); + skip_blanks_level(ctx, &r, input_list, level); + match_token_level(&r, input_list, 10, level, ctx); + struct token_list r2 = group_opt(ctx, input_list, is_active, level); + token_list_append_list(&r, &r2); + token_list_destroy(&r2); + } + else _catch_label_1: + { + } + return r; +} + +struct token_list endif_line(struct preprocessor_ctx * ctx, struct token_list * input_list, int level) +{ + struct token_list r = {0}; + match_token_level(&r, input_list, 127, level, ctx); + skip_blanks_level(ctx, &r, input_list, level); + match_token_level(&r, input_list, 8996, level, ctx); + skip_blanks_level(ctx, &r, input_list, level); + match_token_level(&r, input_list, 10, level, ctx); + return r; +} + +struct token_list if_section(struct preprocessor_ctx * ctx, struct token_list * input_list, unsigned char is_active, int level) +{ + ; + struct token_list r = {0}; + if (1) + { + unsigned char if_result = 0; + struct token_list r2 = if_group(ctx, input_list, is_active, level, &if_result); + if (ctx->n_errors > 0) + { + token_list_destroy(&r2); + goto _catch_label_1; + } + if (input_list->head == ((void *)0)) + { + token_list_destroy(&r2); + goto _catch_label_1; + } + token_list_append_list(&r, &r2); + unsigned char elif_result = 0; + if (input_list->head->type == 127 && (preprocessor_token_ahead_is_identifier(input_list->head, "elif") || preprocessor_token_ahead_is_identifier(input_list->head, "elifdef") || preprocessor_token_ahead_is_identifier(input_list->head, "elifndef"))) + { + struct token_list r3 = elif_groups(ctx, input_list, is_active && !if_result, level, &elif_result); + token_list_append_list(&r, &r3); + token_list_destroy(&r3); + } + if (input_list->head == ((void *)0)) + { + token_list_destroy(&r2); + pre_unexpected_end_of_file(r.tail, ctx); + goto _catch_label_1; + } + if (input_list->head->type == 127 && preprocessor_token_ahead_is_identifier(input_list->head, "else")) + { + struct token_list r4 = else_group(ctx, input_list, is_active && !if_result && !elif_result, level); + token_list_append_list(&r, &r4); + token_list_destroy(&r4); + } + if (ctx->n_errors > 0) + { + token_list_destroy(&r2); + goto _catch_label_1; + } + struct token_list r5 = endif_line(ctx, input_list, level); + token_list_append_list(&r, &r5); + token_list_destroy(&r5); + token_list_destroy(&r2); + } + else _catch_label_1: + { + } + return r; +} + +struct token_list identifier_list(struct preprocessor_ctx * ctx, struct macro * macro, struct token_list * input_list, int level) +{ + ; + struct token_list r = {0}; + if (1) + { + skip_blanks(ctx, &r, input_list); + if (input_list->head == ((void *)0)) + { + goto _catch_label_1; + } + struct macro_parameter * p_macro_parameter = calloc(1, sizeof *p_macro_parameter); + if (p_macro_parameter == ((void *)0)) + { + goto _catch_label_1; + } + char * temp = strdup(input_list->head->lexeme); + if (temp == ((void *)0)) + { + macro_parameters_delete(p_macro_parameter); + goto _catch_label_1; + } + p_macro_parameter->name = temp; + ; + macro->parameters = p_macro_parameter; + struct macro_parameter * p_last_parameter = macro->parameters; + match_token_level(&r, input_list, 8996, level, ctx); + skip_blanks(ctx, &r, input_list); + if (input_list->head == ((void *)0)) + { + goto _catch_label_1; + } + while (input_list->head->type == 44) + { + match_token_level(&r, input_list, 44, level, ctx); + skip_blanks(ctx, &r, input_list); + if (input_list->head == ((void *)0)) + { + goto _catch_label_1; + } + if (input_list->head->type == 11822) + { + break; + } + struct macro_parameter * p_new_macro_parameter = calloc(1, sizeof *p_new_macro_parameter); + if (p_new_macro_parameter == ((void *)0)) + { + goto _catch_label_1; + } + char * temp2 = strdup(input_list->head->lexeme); + if (temp2 == ((void *)0)) + { + macro_parameters_delete(p_new_macro_parameter); + goto _catch_label_1; + } + p_new_macro_parameter->name = temp2; + ; + p_last_parameter->next = p_new_macro_parameter; + p_last_parameter = p_last_parameter->next; + match_token_level(&r, input_list, 8996, level, ctx); + skip_blanks(ctx, &r, input_list); + if (input_list->head == ((void *)0)) + { + goto _catch_label_1; + } + } + } + else _catch_label_1: + { + } + return r; +} + +struct token_list replacement_list(struct preprocessor_ctx * ctx, struct macro * macro, struct token_list * input_list, int level) +{ + struct token_list r = {0}; + if (1) + { + if (input_list->head == ((void *)0)) + { + pre_unexpected_end_of_file(((void *)0), ctx); + goto _catch_label_1; + } + while (input_list->head->type != 10) + { + match_level(&r, input_list, level); + if (input_list->head == ((void *)0)) + { + break; + } + } + ; + struct token_list copy = copy_replacement_list(&r); + token_list_append_list(¯o->replacement_list, ©); + token_list_destroy(©); + } + else _catch_label_1: + { + } + return r; +} + +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 && input_list->head->type != 10) + { + prematch_level(&r, input_list, level); + } + return r; +} + +static unsigned char is_empty_assert(struct token_list * replacement_list) +{ + struct token * token = replacement_list->head; + if (token == ((void *)0)) + { + return 0; + } + if (strcmp(token->lexeme, "(")) + { + return 0; + } + token = token->next; + if (token == ((void *)0)) + { + return 0; + } + if (strcmp(token->lexeme, "(")) + { + return 0; + } + token = token->next; + if (token == ((void *)0)) + { + return 0; + } + if (strcmp(token->lexeme, "void")) + { + return 0; + } + token = token->next; + if (token == ((void *)0)) + { + return 0; + } + if (strcmp(token->lexeme, ")")) + { + return 0; + } + token = token->next; + if (token == ((void *)0)) + { + return 0; + } + if (strcmp(token->lexeme, "0")) + { + return 0; + } + token = token->next; + if (token == ((void *)0)) + { + return 0; + } + if (strcmp(token->lexeme, ")")) + { + return 0; + } + token = token->next; + if (token != ((void *)0)) + { + return 0; + } + return 1; +} + +char *dirname(char * path); +void naming_convention_macro(struct preprocessor_ctx * ctx, struct token * token); +void *hashmap_remove(struct hash_map * map, char * key, int * p_type_opt); +unsigned long long get_warning_bit_mask(char * wname); + +struct token_list control_line(struct preprocessor_ctx * ctx, struct token_list * input_list, unsigned char is_active, int level) +{ + struct token_list r = {0}; + if (1) + { + if ( !is_active) + { + struct token_list r7 = pp_tokens_opt(ctx, input_list, level); + token_list_append_list(&r, &r7); + match_token_level(&r, input_list, 10, level, ctx); + token_list_destroy(&r7); + return r; + } + if (input_list->head == ((void *)0)) + { + pre_unexpected_end_of_file(r.tail, ctx); + goto _catch_label_1; + } + struct token * ptoken = input_list->head; + match_token_level(&r, input_list, 127, level, ctx); + skip_blanks_level(ctx, &r, input_list, level); + if (input_list->head == ((void *)0)) + { + pre_unexpected_end_of_file(r.tail, ctx); + goto _catch_label_1; + } + if (strcmp(input_list->head->lexeme, "include") == 0) + { + match_token_level(&r, input_list, 8996, level, ctx); + skip_blanks_level(ctx, &r, input_list, level); + if (input_list->head == ((void *)0)) + { + pre_unexpected_end_of_file(r.tail, ctx); + goto _catch_label_1; + } + char path[100] = {0}; + unsigned char is_angle_bracket_form = 0; + if (input_list->head->type == 130) + { + strcat(path, input_list->head->lexeme); + prematch_level(&r, input_list, level); + } + else + { + is_angle_bracket_form = 1; + while (input_list->head->type != 62) + { + strcat(path, input_list->head->lexeme); + prematch_level(&r, input_list, level); + if (input_list->head == ((void *)0)) + { + pre_unexpected_end_of_file(r.tail, ctx); + goto _catch_label_1; + } + } + strcat(path, input_list->head->lexeme); + prematch_level(&r, input_list, level); + } + while (input_list->head->type != 10) + { + prematch_level(&r, input_list, level); + if (input_list->head == ((void *)0)) + { + pre_unexpected_end_of_file(r.tail, ctx); + goto _catch_label_1; + } + } + match_token_level(&r, input_list, 10, level, ctx); + path[strlen(path) - 1] = 0; + char current_file_dir[300] = {0}; + snprintf(current_file_dir, sizeof current_file_dir, "%s", r.tail->token_origin->lexeme); + dirname(current_file_dir); + char full_path_result[200] = {0}; + unsigned char already_included = 0; + char * content = find_and_read_include_file(ctx, path + 1, current_file_dir, is_angle_bracket_form, &already_included, full_path_result, sizeof full_path_result); + if (content != ((void *)0)) + { + if (ctx->options.show_includes) + { + printf("Note: including file:"); + printf("%*c", level + 1, 32); + printf("%s\n", full_path_result); + } + struct tokenizer_ctx tctx = {0}; + struct token_list list = tokenizer(&tctx, content, full_path_result, level + 1, 0); + free((void *)content); + struct token_list list2 = preprocessor(ctx, &list, level + 1); + token_list_append_list(&r, &list2); + token_list_destroy(&list2); + token_list_destroy(&list); + } + else + { + if ( !already_included) + { + preprocessor_diagnostic_message(1150, ctx, r.tail, "file %s not found", path + 1); + { + struct include_dir * p = ctx->include_dir.head; + for (; p; p = p->next) + { + preprocessor_diagnostic_message(63, ctx, r.tail, "dir = '%s'", p->path); + } + } + } + else + { + } + } + } + else + { + if (strcmp(input_list->head->lexeme, "embed") == 0) + { + struct token_list discard0 = {0}; + struct token_list * p_list = &r; + if (ctx->options.target < 0) + { + p_list = &discard0; + char * temp = strdup(" "); + if (temp == ((void *)0)) + { + goto _catch_label_1; + } + free(ptoken->lexeme); + ptoken->lexeme = temp; + } + struct token * p_embed_token = input_list->head; + match_token_level(p_list, input_list, 8996, level, ctx); + skip_blanks_level(ctx, p_list, input_list, level); + if (input_list->head == ((void *)0)) + { + goto _catch_label_1; + } + char path[100] = {0}; + if (input_list->head->type == 130) + { + strcat(path, input_list->head->lexeme); + prematch_level(p_list, input_list, level); + } + else + { + while (input_list->head->type != 62) + { + strcat(path, input_list->head->lexeme); + prematch_level(p_list, input_list, level); + if (input_list->head == ((void *)0)) + { + goto _catch_label_1; + } + } + strcat(path, input_list->head->lexeme); + prematch_level(p_list, input_list, level); + } + if (input_list->head) + { + while (input_list->head->type != 10) + { + prematch_level(p_list, input_list, level); + if (input_list->head == ((void *)0)) + { + pre_unexpected_end_of_file(p_list->tail, ctx); + goto _catch_label_1; + } + } + } + match_token_level(p_list, input_list, 10, level, ctx); + char fullpath[300] = {0}; + path[strlen(path) - 1] = 0; + snprintf(fullpath, sizeof (fullpath), "%s", path + 1); + int nlevel = level; + int f = 0; + if (ctx->options.target < 0) + { + f = 1; + } + else + { + f = 1; + nlevel = nlevel + 1; + } + struct token_list list = embed_tokenizer(ctx, p_embed_token, fullpath, nlevel, f); + if (ctx->n_errors > 0) + { + token_list_destroy(&list); + goto _catch_label_1; + } + token_list_append_list(&r, &list); + token_list_destroy(&list); + token_list_destroy(&discard0); + } + else + { + if (strcmp(input_list->head->lexeme, "define") == 0) + { + struct macro * macro = calloc(1, sizeof *macro); + if (macro == ((void *)0)) + { + preprocessor_diagnostic_message(650, ctx, ctx->current, "_Out of mem"); + goto _catch_label_1; + } + match_token_level(&r, input_list, 8996, level, ctx); + skip_blanks_level(ctx, &r, input_list, level); + if (input_list->head == ((void *)0)) + { + macro_delete(macro); + pre_unexpected_end_of_file(r.tail, ctx); + goto _catch_label_1; + } + struct token * macro_name_token = input_list->head; + if (hashmap_find(&ctx->macros, input_list->head->lexeme) != ((void *)0)) + { + } + char * temp = strdup(input_list->head->lexeme); + if (temp == ((void *)0)) + { + macro_delete(macro); + goto _catch_label_1; + } + ; + macro->name = temp; + match_token_level(&r, input_list, 8996, level, ctx); + if (input_list->head == ((void *)0)) + { + macro_delete(macro); + pre_unexpected_end_of_file(r.tail, ctx); + goto _catch_label_1; + } + if (input_list->head->type == 40) + { + macro->is_function = 1; + match_token_level(&r, input_list, 40, level, ctx); + skip_blanks_level(ctx, &r, input_list, level); + if (input_list->head == ((void *)0)) + { + macro_delete(macro); + pre_unexpected_end_of_file(r.tail, ctx); + goto _catch_label_1; + } + if (input_list->head->type == 11822) + { + struct macro_parameter * p_macro_parameter = calloc(1, sizeof *p_macro_parameter); + if (p_macro_parameter == ((void *)0)) + { + macro_delete(macro); + goto _catch_label_1; + } + char * temp2 = strdup("__VA_ARGS__"); + if (temp2 == ((void *)0)) + { + macro_delete(macro); + macro_parameters_delete(p_macro_parameter); + goto _catch_label_1; + } + p_macro_parameter->name = temp2; + macro->parameters = p_macro_parameter; + match_token_level(&r, input_list, 11822, level, ctx); + skip_blanks_level(ctx, &r, input_list, level); + match_token_level(&r, input_list, 41, level, ctx); + } + else + { + if (input_list->head->type == 41) + { + match_token_level(&r, input_list, 41, level, ctx); + skip_blanks_level(ctx, &r, input_list, level); + } + else + { + struct token_list r3 = identifier_list(ctx, macro, input_list, level); + token_list_append_list(&r, &r3); + token_list_destroy(&r3); + skip_blanks_level(ctx, &r, input_list, level); + if (input_list->head == ((void *)0)) + { + macro_delete(macro); + pre_unexpected_end_of_file(r.tail, ctx); + goto _catch_label_1; + } + if (input_list->head->type == 11822) + { + struct macro_parameter * p_macro_parameter = calloc(1, sizeof *p_macro_parameter); + if (p_macro_parameter == ((void *)0)) + { + macro_delete(macro); + goto _catch_label_1; + } + char * temp3 = strdup("__VA_ARGS__"); + if (temp3 == ((void *)0)) + { + macro_delete(macro); + macro_parameters_delete(p_macro_parameter); + goto _catch_label_1; + } + p_macro_parameter->name = temp3; + struct macro_parameter * p_last = macro->parameters; + ; + while (p_last->next) + { + p_last = p_last->next; + } + p_last->next = p_macro_parameter; + match_token_level(&r, input_list, 11822, level, ctx); + } + skip_blanks_level(ctx, &r, input_list, level); + match_token_level(&r, input_list, 41, level, ctx); + } + } + } + else + { + macro->is_function = 0; + } + skip_blanks_level(ctx, &r, input_list, level); + if (input_list->head == ((void *)0)) + { + macro_delete(macro); + pre_unexpected_end_of_file(r.tail, ctx); + goto _catch_label_1; + } + struct token_list r4 = replacement_list(ctx, macro, input_list, level); + token_list_append_list(&r, &r4); + token_list_destroy(&r4); + match_token_level(&r, input_list, 10, level, ctx); + if ( !ctx->options.disable_assert && strcmp(macro->name, "assert") == 0) + { + if ( !is_empty_assert(¯o->replacement_list)) + { + macro_parameters_delete(macro->parameters); + struct macro_parameter * p_macro_parameter = calloc(1, sizeof *p_macro_parameter); + if (p_macro_parameter == ((void *)0)) + { + macro_delete(macro); + goto _catch_label_1; + } + char * temp2 = strdup("__VA_ARGS__"); + if (temp2 == ((void *)0)) + { + macro_delete(macro); + macro_parameters_delete(p_macro_parameter); + goto _catch_label_1; + } + p_macro_parameter->name = temp2; + macro->parameters = p_macro_parameter; + token_list_destroy(¯o->replacement_list); + struct tokenizer_ctx tctx = {0}; + macro->replacement_list = tokenizer(&tctx, "assert(__VA_ARGS__)", ((void *)0), level, 0); + } + } + naming_convention_macro(ctx, macro_name_token); + struct hash_item_set item = {0}; + item.p_macro = macro; + hashmap_set(&ctx->macros, macro->name, &item); + hash_item_set_destroy(&item); + } + else + { + if (strcmp(input_list->head->lexeme, "undef") == 0) + { + match_token_level(&r, input_list, 8996, level, ctx); + skip_blanks_level(ctx, &r, input_list, level); + if (input_list->head == ((void *)0)) + { + pre_unexpected_end_of_file(r.tail, ctx); + goto _catch_label_1; + } + struct macro * macro = (struct macro *)hashmap_remove(&ctx->macros, input_list->head->lexeme, ((void *)0)); + ; + if (macro) + { + macro_delete(macro); + match_token_level(&r, input_list, 8996, level, ctx); + } + else + { + match_token_level(&r, input_list, 8996, level, ctx); + } + skip_blanks_level(ctx, &r, input_list, level); + match_token_level(&r, input_list, 10, level, ctx); + } + else + { + if (strcmp(input_list->head->lexeme, "line") == 0) + { + match_token_level(&r, input_list, 8996, level, ctx); + struct token_list r5 = pp_tokens_opt(ctx, input_list, level); + token_list_append_list(&r, &r5); + token_list_destroy(&r5); + match_token_level(&r, input_list, 10, level, ctx); + } + else + { + if (strcmp(input_list->head->lexeme, "error") == 0) + { + ctx->n_warnings++; + match_token_level(&r, input_list, 8996, level, ctx); + struct token_list r6 = pp_tokens_opt(ctx, input_list, level); + preprocessor_diagnostic_message(1180, ctx, input_list->head, "#error"); + token_list_append_list(&r, &r6); + token_list_destroy(&r6); + match_token_level(&r, input_list, 10, level, ctx); + } + else + { + if (strcmp(input_list->head->lexeme, "warning") == 0) + { + ctx->n_warnings++; + match_token_level(&r, input_list, 8996, level, ctx); + struct token_list r6 = pp_tokens_opt(ctx, input_list, level); + preprocessor_diagnostic_message(0, ctx, input_list->head, "#warning"); + token_list_append_list(&r, &r6); + match_token_level(&r, input_list, 10, level, ctx); + token_list_destroy(&r6); + } + else + { + if (strcmp(input_list->head->lexeme, "pragma") == 0) + { + match_token_level(&r, input_list, 8996, level, ctx); + if (r.tail) + { + r.tail->type = 128; + r.tail->flags = 1; + } + skip_blanks_level(ctx, &r, input_list, level); + if (input_list->head == ((void *)0)) + { + pre_unexpected_end_of_file(r.tail, ctx); + goto _catch_label_1; + } + if (input_list->head->type == 8996) + { + if (strcmp(input_list->head->lexeme, "CAKE") == 0) + { + match_token_level(&r, input_list, 8996, level, ctx); + if (r.tail) + { + r.tail->flags = 1; + } + skip_blanks_level(ctx, &r, input_list, level); + } + if (input_list->head == ((void *)0)) + { + pre_unexpected_end_of_file(r.tail, ctx); + goto _catch_label_1; + } + if (strcmp(input_list->head->lexeme, "once") == 0) + { + pragma_once_add(ctx, input_list->head->token_origin->lexeme); + match_token_level(&r, input_list, 8996, level, ctx); + if (r.tail) + { + r.tail->flags = 1; + } + } + else + { + if (strcmp(input_list->head->lexeme, "dir") == 0) + { + match_token_level(&r, input_list, 8996, level, ctx); + skip_blanks_level(ctx, &r, input_list, level); + if (input_list->head == ((void *)0)) + { + pre_unexpected_end_of_file(r.tail, ctx); + goto _catch_label_1; + } + if (input_list->head->type != 130) + { + preprocessor_diagnostic_message(650, ctx, input_list->head, "expected string"); + goto _catch_label_1; + } + char path[200] = {0}; + strncpy(path, input_list->head->lexeme + 1, strlen(input_list->head->lexeme) - 2); + include_dir_add(&ctx->include_dir, path); + match_token_level(&r, input_list, 130, level, ctx); + if (r.tail) + { + r.tail->flags = 1; + } + } + else + { + if (strcmp(input_list->head->lexeme, "expand") == 0) + { + match_token_level(&r, input_list, 8996, level, ctx); + if (r.tail) + { + r.tail->flags = 1; + } + skip_blanks_level(ctx, &r, input_list, level); + if (input_list->head == ((void *)0)) + { + pre_unexpected_end_of_file(r.tail, ctx); + goto _catch_label_1; + } + struct macro * macro = find_macro(ctx, input_list->head->lexeme); + if (macro) + { + macro->expand = 1; + } + match_token_level(&r, input_list, 8996, level, ctx); + } + else + { + if (strcmp(input_list->head->lexeme, "nullchecks") == 0) + { + ; + match_token_level(&r, input_list, 8996, level, ctx); + ; + r.tail->flags = 1; + skip_blanks_level(ctx, &r, input_list, level); + ctx->options.null_checks_enabled = 1; + } + } + } + } + if (input_list->head == ((void *)0)) + { + pre_unexpected_end_of_file(r.tail, ctx); + goto _catch_label_1; + } + if (strcmp(input_list->head->lexeme, "diagnostic") == 0) + { + match_token_level(&r, input_list, 8996, level, ctx); + ; + r.tail->flags = 1; + skip_blanks_level(ctx, &r, input_list, level); + if (input_list->head == ((void *)0)) + { + pre_unexpected_end_of_file(r.tail, ctx); + goto _catch_label_1; + } + if (strcmp(input_list->head->lexeme, "push") == 0) + { + match_token_level(&r, input_list, 8996, level, ctx); + ; + r.tail->flags = 1; + if (ctx->options.diagnostic_stack.top_index < sizeof (ctx->options.diagnostic_stack) / sizeof (ctx->options.diagnostic_stack.stack[0])) + { + ctx->options.diagnostic_stack.top_index++; + ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index] = ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index - 1]; + } + } + else + { + if (strcmp(input_list->head->lexeme, "pop") == 0) + { + match_token_level(&r, input_list, 8996, level, ctx); + ; + r.tail->flags = 1; + if (ctx->options.diagnostic_stack.top_index > 0) + { + ctx->options.diagnostic_stack.top_index--; + } + } + else + { + if (strcmp(input_list->head->lexeme, "warning") == 0) + { + match_token_level(&r, input_list, 8996, level, ctx); + ; + r.tail->flags = 1; + skip_blanks_level(ctx, &r, input_list, level); + if (input_list->head && input_list->head->type == 130) + { + match_token_level(&r, input_list, 130, level, ctx); + ; + r.tail->flags = 1; + unsigned long long w = get_warning_bit_mask(input_list->head->lexeme + 1 + 2); + ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index].warnings = w; + } + } + else + { + if (strcmp(input_list->head->lexeme, "ignore") == 0) + { + match_token_level(&r, input_list, 8996, level, ctx); + ; + r.tail->flags = 1; + skip_blanks_level(ctx, &r, input_list, level); + if (input_list->head && input_list->head->type == 130) + { + unsigned long long w = get_warning_bit_mask(input_list->head->lexeme + 1 + 2); + ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index].warnings = ~w; + } + } + } + } + } + } + } + struct token_list r7 = pp_tokens_opt(ctx, input_list, level); + token_list_append_list(&r, &r7); + match_token_level(&r, input_list, 10, level, ctx); + ; + r.tail->type = 129; + r.tail->flags = 1; + token_list_destroy(&r7); + } + } + } + } + } + } + } + } + } + else _catch_label_1: + { + } + return r; +} + +static struct token_list non_directive(struct preprocessor_ctx * ctx, struct token_list * input_list, int level) +{ + struct token_list r = pp_tokens_opt(ctx, input_list, level); + skip_blanks_level(ctx, &r, input_list, level); + match_token_level(&r, input_list, 10, level, ctx); + return r; +} + +static struct macro_argument_list collect_macro_arguments(struct preprocessor_ctx * ctx, struct macro * macro, struct token_list * input_list, int level) +{ + struct macro_argument_list macro_argument_list = {0}; + if (1) + { + if (input_list->head == ((void *)0)) + { + goto _catch_label_1; + } + ; + struct token * macro_name_token = input_list->head; + match_token_level(¯o_argument_list.tokens, input_list, 8996, level, ctx); + if ( !macro->is_function) + { + return macro_argument_list; + } + int count = 1; + skip_blanks(ctx, ¯o_argument_list.tokens, input_list); + match_token_level(¯o_argument_list.tokens, input_list, 40, level, ctx); + skip_blanks(ctx, ¯o_argument_list.tokens, input_list); + if (input_list->head == ((void *)0)) + { + pre_unexpected_end_of_file(macro_argument_list.tokens.tail, ctx); + goto _catch_label_1; + } + if (input_list->head->type == 41) + { + if (macro->parameters != ((void *)0)) + { + struct macro_argument * p_argument = calloc(1, sizeof (struct macro_argument)); + if (p_argument == ((void *)0)) + { + goto _catch_label_1; + } + struct macro_parameter * p_current_parameter = macro->parameters; + char * name_temp = strdup(p_current_parameter->name); + if (name_temp == ((void *)0)) + { + macro_argument_delete(p_argument); + goto _catch_label_1; + } + p_argument->name = name_temp; + argument_list_add(¯o_argument_list, p_argument); + } + match_token_level(¯o_argument_list.tokens, input_list, 41, level, ctx); + return macro_argument_list; + } + if (macro->parameters == ((void *)0)) + { + preprocessor_diagnostic_message(1191, ctx, macro_name_token, "too many arguments provided to function-like macro invocation\n"); + goto _catch_label_1; + } + struct macro_parameter * p_current_parameter = macro->parameters; + struct macro_argument * p_argument = calloc(1, sizeof (struct macro_argument)); + if (p_argument == ((void *)0)) + { + goto _catch_label_1; + } + char * temp2 = strdup(p_current_parameter->name); + if (temp2 == ((void *)0)) + { + macro_argument_delete(p_argument); + goto _catch_label_1; + } + p_argument->name = temp2; + while (input_list->head != ((void *)0)) + { + if (input_list->head->type == 40) + { + count++; + token_list_clone_and_add(&p_argument->tokens, input_list->head); + match_token_level(¯o_argument_list.tokens, input_list, 40, level, ctx); + } + else + { + if (input_list->head->type == 41) + { + count--; + if (count == 0) + { + match_token_level(¯o_argument_list.tokens, input_list, 41, level, ctx); + argument_list_add(¯o_argument_list, p_argument); + p_argument = ((void *)0); + if (p_current_parameter->next != ((void *)0)) + { + p_current_parameter = p_current_parameter->next; + if (strcmp(p_current_parameter->name, "__VA_ARGS__") == 0) + { + p_argument = calloc(1, sizeof (struct macro_argument)); + if (p_argument == ((void *)0)) + { + goto _catch_label_1; + } + char * argument_name = strdup(p_current_parameter->name); + if (argument_name == ((void *)0)) + { + macro_argument_delete(p_argument); + goto _catch_label_1; + } + p_argument->name = argument_name; + argument_list_add(¯o_argument_list, p_argument); + p_argument = ((void *)0); + } + else + { + preprocessor_diagnostic_message(1190, ctx, macro_name_token, "too few arguments provided to function-like macro invocation\n"); + goto _catch_label_1; + } + } + break; + } + else + { + token_list_clone_and_add(&p_argument->tokens, input_list->head); + match_token_level(¯o_argument_list.tokens, input_list, 41, level, ctx); + } + } + else + { + if (count == 1 && input_list->head->type == 44) + { + if (strcmp(p_current_parameter->name, "__VA_ARGS__") == 0) + { + token_list_clone_and_add(&p_argument->tokens, input_list->head); + match_token_level(¯o_argument_list.tokens, input_list, 44, level, ctx); + } + else + { + match_token_level(¯o_argument_list.tokens, input_list, 44, level, ctx); + argument_list_add(¯o_argument_list, p_argument); + p_argument = ((void *)0); + p_argument = calloc(1, sizeof (struct macro_argument)); + if (p_argument == ((void *)0)) + { + goto _catch_label_1; + } + if (p_current_parameter->next == ((void *)0)) + { + preprocessor_diagnostic_message(1191, ctx, macro_argument_list.tokens.tail, "too many arguments provided to function-like macro invocation\n"); + macro_argument_delete(p_argument); + p_argument = ((void *)0); + goto _catch_label_1; + } + p_current_parameter = p_current_parameter->next; + char * temp3 = strdup(p_current_parameter->name); + if (temp3 == ((void *)0)) + { + macro_argument_delete(p_argument); + goto _catch_label_1; + } + p_argument->name = temp3; + } + } + else + { + token_list_clone_and_add(&p_argument->tokens, input_list->head); + prematch_level(¯o_argument_list.tokens, input_list, level); + } + } + } + } + ; + } + else _catch_label_1: + { + } + return macro_argument_list; +} + +int ss_fprintf(struct osstream * stream, char * fmt, ...); +void ss_close(struct osstream * stream); +void token_list_pop_back(struct token_list * list); + +static struct token_list concatenate(struct preprocessor_ctx * ctx, struct token_list * input_list) +{ + struct token_list r = {0}; + if (1) + { + while (input_list->head) + { + ; + if (input_list->head->type == 8995) + { + if (r.tail == ((void *)0)) + { + preprocessor_diagnostic_message(1210, ctx, input_list->head, "missing macro argument (should be checked before)"); + break; + } + token_list_pop_front(input_list); + struct osstream ss = {0}; + if (r.tail->lexeme[0] != 0) + { + ss_fprintf(&ss, "%s", r.tail->lexeme); + } + if (input_list->head && input_list->head->lexeme[0] != 0) + { + ss_fprintf(&ss, "%s", input_list->head->lexeme); + } + int level = input_list->head ? input_list->head->level : 0; + token_list_pop_front(input_list); + struct tokenizer_ctx tctx = {0}; + struct token_list newlist = {0}; + if (ss.c_str != ((void *)0)) + { + newlist = tokenizer(&tctx, ss.c_str, ((void *)0), level, 0); + } + if (newlist.head) + { + newlist.head->flags = r.tail->flags; + } + else + { + struct token * p_new_token = calloc(1, sizeof *p_new_token); + if (p_new_token == ((void *)0)) + { + ss_close(&ss); + goto _catch_label_1; + } + char * temp = strdup(""); + if (temp == ((void *)0)) + { + ss_close(&ss); + token_delete(p_new_token); + goto _catch_label_1; + } + p_new_token->lexeme = temp; + p_new_token->type = 142; + token_list_add(&newlist, p_new_token); + ; + newlist.head->flags = r.tail->flags; + } + token_list_pop_back(&r); + token_list_append_list(&r, &newlist); + ss_close(&ss); + token_list_destroy(&newlist); + if (input_list->head == ((void *)0)) + { + break; + } + } + else + { + prematch(&r, input_list); + } + } + } + else _catch_label_1: + { + } + return r; +} + +struct token_list replacement_list_reexamination(struct preprocessor_ctx * ctx, struct macro_expanded * p_list, struct token_list * oldlist, int level, struct token * origin); + +static unsigned char has_argument_list_empty_substitution(struct preprocessor_ctx * ctx, struct macro_expanded * p_list, struct macro_argument_list * p_macro_argument_list, struct token * origin) +{ + if (p_macro_argument_list->head == ((void *)0)) + { + return 1; + } + struct macro_argument * p_va_args_argument = find_macro_argument_by_name(p_macro_argument_list, "__VA_ARGS__"); + if (p_va_args_argument) + { + if (p_va_args_argument->tokens.head == ((void *)0)) + { + return 1; + } + struct token_list argumentlist = copy_argument_list(p_va_args_argument); + struct token_list r4 = replacement_list_reexamination(ctx, p_list, &argumentlist, 0, origin); + unsigned char results_in_empty_substituition = (r4.head == ((void *)0) || r4.head->type == 142); + token_list_destroy(&r4); + token_list_destroy(&argumentlist); + return results_in_empty_substituition; + } + return 0; +} + +void token_list_remove(struct token_list * list, struct token * first, struct token * last); +char *token_list_join_tokens(struct token_list * list, unsigned char bliteral); + +static struct token_list replace_macro_arguments(struct preprocessor_ctx * ctx, struct macro_expanded * p_list, struct token_list * input_list, struct macro_argument_list * arguments, struct token * origin) +{ + struct token_list r = {0}; + if (1) + { + while (input_list->head) + { + ; + ; + ; + struct macro_argument * p_argument = ((void *)0); + if (input_list->head->type == 8996) + { + if (strcmp(input_list->head->lexeme, "__VA_OPT__") == 0) + { + token_list_pop_front(input_list); + token_list_pop_front(input_list); + int parenteses_count = 1; + unsigned char discard_va_opt = has_argument_list_empty_substitution(ctx, p_list, arguments, origin); + if (discard_va_opt) + { + while (input_list->head) + { + if (input_list->head->type == 40) + { + parenteses_count++; + } + else + { + if (input_list->head->type == 41) + { + parenteses_count--; + } + } + token_list_pop_front(input_list); + if (parenteses_count == 0) + { + break; + } + } + } + else + { + struct token * p_token = input_list->head; + for (; p_token; p_token = p_token->next) + { + if (p_token->type == 40) + { + parenteses_count++; + } + else + { + if (p_token->type == 41) + { + parenteses_count--; + } + } + if (parenteses_count == 0) + { + break; + } + } + token_list_remove(input_list, p_token, p_token); + } + continue; + } + p_argument = find_macro_argument_by_name(arguments, input_list->head->lexeme); + } + if (p_argument) + { + if (r.tail != ((void *)0) && r.tail->type == 35) + { + int flags = input_list->head->flags; + token_list_pop_front(input_list); + while (token_is_blank(r.tail)) + { + token_list_pop_back(&r); + } + token_list_pop_back(&r); + struct token_list argumentlist = copy_argument_list(p_argument); + char * s = token_list_join_tokens(&argumentlist, 1); + if (s == ((void *)0)) + { + token_list_destroy(&argumentlist); + preprocessor_diagnostic_message(650, ctx, input_list->head, "unexpected"); + goto _catch_label_1; + } + struct token * p_new_token = calloc(1, sizeof *p_new_token); + if (p_new_token == ((void *)0)) + { + free(s); + token_list_destroy(&argumentlist); + goto _catch_label_1; + } + p_new_token->lexeme = s; + p_new_token->type = 130; + p_new_token->flags = flags; + token_list_add(&r, p_new_token); + token_list_destroy(&argumentlist); + continue; + } + else + { + if (r.tail != ((void *)0) && r.tail->type == 8995) + { + token_list_pop_front(input_list); + struct token_list argumentlist = copy_argument_list(p_argument); + token_list_append_list(&r, &argumentlist); + token_list_destroy(&argumentlist); + } + else + { + if (input_list->head->next && input_list->head->next->type == 8995) + { + int flags = input_list->head->flags; + token_list_pop_front(input_list); + struct token_list argumentlist = copy_argument_list(p_argument); + if (argumentlist.head != ((void *)0)) + { + argumentlist.head->flags = flags; + } + token_list_append_list(&r, &argumentlist); + prematch(&r, input_list); + token_list_destroy(&argumentlist); + } + else + { + int flags = input_list->head->flags; + token_list_pop_front(input_list); + struct token_list argumentlist = copy_argument_list(p_argument); + if (argumentlist.head) + { + argumentlist.head->flags = flags; + } + struct token_list r4 = replacement_list_reexamination(ctx, p_list, &argumentlist, 0, origin); + token_list_append_list(&r, &r4); + token_list_destroy(&r4); + if (ctx->n_errors > 0) + { + token_list_destroy(&argumentlist); + goto _catch_label_1; + } + token_list_destroy(&argumentlist); + } + } + } + } + else + { + prematch(&r, input_list); + } + } + } + else _catch_label_1: + { + } + return r; +} + +static unsigned char macro_already_expanded(struct macro_expanded * p_list, char * name) +{ + struct macro_expanded * p_item = p_list; + while (p_item) + { + if (strcmp(name, p_item->name) == 0) + { + return 1; + } + p_item = p_item->p_previous; + } + return 0; +} + +struct token_list expand_macro(struct preprocessor_ctx * ctx, struct macro_expanded * p_list, struct macro * macro, struct macro_argument_list * arguments, int level, struct token * origin); +void token_list_append_list_at_beginning(struct token_list * dest, struct token_list * source); + +struct token_list replacement_list_reexamination(struct preprocessor_ctx * ctx, struct macro_expanded * p_list, struct token_list * oldlist, int level, struct token * origin) +{ + struct token_list r = {0}; + if (1) + { + struct token_list new_list = concatenate(ctx, oldlist); + while (new_list.head != ((void *)0)) + { + ; + ; + struct macro * macro = ((void *)0); + if (new_list.head->type == 8996) + { + macro = find_macro(ctx, new_list.head->lexeme); + if (macro && macro->is_function && !preprocessor_token_ahead_is(new_list.head, 40)) + { + macro = ((void *)0); + } + if (macro && macro_already_expanded(p_list, new_list.head->lexeme)) + { + new_list.head->type = 8997; + macro = ((void *)0); + } + if (ctx->conditional_inclusion) + { + if (r.tail && r.tail->type == 8996 && strcmp(r.tail->lexeme, "defined") == 0) + { + macro = ((void *)0); + } + else + { + if (r.tail && r.tail->type == 40) + { + struct token * previous = r.tail->prev; + if (previous != ((void *)0) && previous->type == 8996 && strcmp(previous->lexeme, "defined") == 0) + { + macro = ((void *)0); + } + } + } + } + } + if (macro) + { + int flags = new_list.head->flags; + struct macro_argument_list arguments = collect_macro_arguments(ctx, macro, &new_list, level); + if (ctx->n_errors > 0) + { + macro_argument_list_destroy(&arguments); + token_list_destroy(&new_list); + goto _catch_label_1; + } + struct token_list r3 = expand_macro(ctx, p_list, macro, &arguments, level, origin); + if (ctx->n_errors > 0) + { + token_list_destroy(&new_list); + token_list_destroy(&r3); + macro_argument_list_destroy(&arguments); + goto _catch_label_1; + } + if (r3.head) + { + r3.head->flags = flags; + } + token_list_append_list_at_beginning(&new_list, &r3); + macro_argument_list_destroy(&arguments); + token_list_destroy(&r3); + } + else + { + new_list.head->level = level; + new_list.head->flags = 2; + ; + prematch(&r, &new_list); + } + } + } + else _catch_label_1: + { + } + return r; +} + +int lexeme_cmp(char * s1, char * s2) +{ + while ( *s1 && *s2) + { + while ((s1[0] == 92 && s1[1] == 10)) + { + s1++; + s1++; + } + while (s2[0] == 92 && s2[1] == 10) + { + s2++; + s2++; + } + if ( *s1 != *s2) + { + break; + } + s1++; + s2++; + } + while ((s1[0] == 92 && s1[1] == 10)) + { + s1++; + s1++; + } + while (s2[0] == 92 && s2[1] == 10) + { + s2++; + s2++; + } + return *(unsigned char *)s1 - *(unsigned char *)s2; +} + +void remove_line_continuation(char * s) +{ + char * pread = s; + char * pwrite = s; + while ( *pread) + { + if (pread[0] == 92 && pread[1] == 10) + { + pread++; + pread++; + } + else + { + *pwrite = *pread; + pread++; + pwrite++; + } + } + *pwrite = *pread; +} + +struct token_list copy_replacement_list(struct token_list * list) +{ + struct token_list r = {0}; + struct token * current = list->head; + while (current && token_is_blank(current)) + { + current = current->next; + } + unsigned char is_first = 1; + for (; current; ) + { + if (current && token_is_blank(current)) + { + if (current == list->tail) + { + break; + } + current = current->next; + continue; + } + struct token * token_added = token_list_clone_and_add(&r, current); + if (token_added->flags & 8) + { + token_added->flags = token_added->flags & ~8; + token_added->flags = 4; + } + if (is_first) + { + token_added->flags = token_added->flags & ~4; + token_added->flags = token_added->flags & ~8; + is_first = 0; + } + remove_line_continuation(token_added->lexeme); + if (current == list->tail) + { + break; + } + current = current->next; + } + return r; +} + +int stringify(char * input, int n, char output[]); + +struct token_list macro_copy_replacement_list(struct preprocessor_ctx * ctx, struct macro * macro, struct token * origin) +{ + if (strcmp(macro->name, "__LINE__") == 0) + { + struct tokenizer_ctx tctx = {0}; + char line[50] = {0}; + ; + snprintf(line, sizeof line, "%d", origin->line); + struct token_list r = tokenizer(&tctx, line, "", 0, 0); + token_list_pop_front(&r); + if (r.head != ((void *)0)) + { + r.head->flags = 0; + } + return r; + } + else + { + if (strcmp(macro->name, "__FILE__") == 0) + { + char buffer[300] = {0}; + if (stringify(origin->token_origin->lexeme, sizeof buffer, buffer) < 0) + { + } + struct tokenizer_ctx tctx = {0}; + struct token_list r = tokenizer(&tctx, buffer, "", 0, 0); + token_list_pop_front(&r); + if (r.head) + { + r.head->flags = 0; + } + return r; + } + else + { + if (strcmp(macro->name, "__COUNTER__") == 0) + { + char line[50] = {0}; + ctx->count_macro_value++; + snprintf(line, sizeof line, "%d", ctx->count_macro_value); + struct tokenizer_ctx tctx = {0}; + struct token_list r = tokenizer(&tctx, line, "", 0, 0); + token_list_pop_front(&r); + if (r.head != ((void *)0)) + { + r.head->flags = 0; + } + return r; + } + } + } + return copy_replacement_list(¯o->replacement_list); +} + +struct token_list expand_macro(struct preprocessor_ctx * ctx, struct macro_expanded * p_list_of_macro_expanded_opt, struct macro * macro, struct macro_argument_list * arguments, int level, struct token * origin) +{ + macro->usage++; + struct token_list r = {0}; + if (1) + { + ; + struct macro_expanded macro_expanded = {0}; + macro_expanded.name = macro->name; + macro_expanded.p_previous = p_list_of_macro_expanded_opt; + if (macro->is_function) + { + struct token_list copy = macro_copy_replacement_list(ctx, macro, origin); + struct token_list copy2 = replace_macro_arguments(ctx, ¯o_expanded, ©, arguments, origin); + struct token_list r2 = replacement_list_reexamination(ctx, ¯o_expanded, ©2, level, origin); + token_list_append_list(&r, &r2); + token_list_destroy(©); + token_list_destroy(©2); + token_list_destroy(&r2); + if (ctx->n_errors > 0) + { + goto _catch_label_1; + } + } + else + { + struct token_list copy = macro_copy_replacement_list(ctx, macro, origin); + struct token_list r3 = replacement_list_reexamination(ctx, ¯o_expanded, ©, level, origin); + if (ctx->n_errors > 0) + { + token_list_destroy(©); + token_list_destroy(&r3); + goto _catch_label_1; + } + token_list_append_list(&r, &r3); + token_list_destroy(©); + token_list_destroy(&r3); + } + } + else _catch_label_1: + { + } + return r; +} + +void token_list_set_file(struct token_list * list, struct token * filetoken, int line, int col); + +static struct token_list text_line(struct preprocessor_ctx * ctx, struct token_list * input_list, unsigned char is_active, int level) +{ + struct token_list r = {0}; + if (1) + { + while (input_list->head && input_list->head->type != 127) + { + struct macro * macro = ((void *)0); + struct token * start_token = input_list->head; + struct token * origin = ((void *)0); + if (is_active && input_list->head->type == 8996) + { + origin = input_list->head; + macro = find_macro(ctx, input_list->head->lexeme); + if (macro && macro->is_function && !preprocessor_token_ahead_is(input_list->head, 40)) + { + macro = ((void *)0); + } + if (ctx->conditional_inclusion) + { + if (r.tail && r.tail->type == 8996 && strcmp(r.tail->lexeme, "defined") == 0) + { + macro = ((void *)0); + } + else + { + if (r.tail && r.tail->type == 40) + { + struct token * previous = r.tail->prev; + if (previous != ((void *)0) && previous->type == 8996 && strcmp(previous->lexeme, "defined") == 0) + { + macro = ((void *)0); + } + } + } + } + } + if (macro) + { + int flags = input_list->head->flags; + struct macro_argument_list arguments = collect_macro_arguments(ctx, macro, input_list, level); + if (ctx->n_errors > 0) + { + macro_argument_list_destroy(&arguments); + goto _catch_label_1; + } + struct token_list start_macro = expand_macro(ctx, ((void *)0), macro, &arguments, level, origin); + if (start_macro.head) + { + start_macro.head->flags = flags; + } + if (macro->expand) + { + { + struct token * current = arguments.tokens.head; + for (; current && current != arguments.tokens.tail->next; current = current->next) + { + current->flags = 64; + } + } + { + struct token * current = start_macro.head; + for (; current && current != start_macro.tail->next; current = current->next) + { + current->flags = ~(2 | 512 | 1024); + } + } + } + token_list_set_file(&start_macro, start_token->token_origin, start_token->line, start_token->col); + token_list_append_list_at_beginning(input_list, &start_macro); + if (ctx->flags & 1) + { + } + else + { + if (level == 0 || 1) + { + token_list_append_list(&r, &arguments.tokens); + } + } + while (macro) + { + macro = ((void *)0); + if (input_list->head && input_list->head->type == 8996) + { + macro = find_macro(ctx, input_list->head->lexeme); + if (macro && macro->is_function && !preprocessor_token_ahead_is(input_list->head, 40)) + { + macro = ((void *)0); + } + if (macro) + { + int flags2 = input_list->head->flags; + struct macro_argument_list arguments2 = collect_macro_arguments(ctx, macro, input_list, level); + if (ctx->n_errors > 0) + { + macro_argument_list_destroy(&arguments2); + macro_argument_list_destroy(&arguments); + token_list_destroy(&start_macro); + goto _catch_label_1; + } + if (ctx->flags & 1) + { + } + else + { + if (level == 0 || 1) + { + token_list_append_list(&r, &arguments2.tokens); + } + } + struct token_list r3 = expand_macro(ctx, ((void *)0), macro, &arguments2, level, origin); + if (ctx->n_errors > 0) + { + macro_argument_list_destroy(&arguments2); + token_list_destroy(&r3); + macro_argument_list_destroy(&arguments); + token_list_destroy(&start_macro); + goto _catch_label_1; + } + token_list_set_file(&r3, start_token->token_origin, start_token->line, start_token->col); + if (r3.head) + { + r3.head->flags = flags2; + } + token_list_append_list_at_beginning(input_list, &r3); + macro_argument_list_destroy(&arguments2); + token_list_destroy(&r3); + } + } + } + macro_argument_list_destroy(&arguments); + token_list_destroy(&start_macro); + continue; + } + else + { + if (input_list->head->flags & 1024 && !(input_list->head->flags & 2)) + { + if (input_list->head->type == 130) + { + preprocessor_diagnostic_message(63, ctx, input_list->head, "you can use \"adjacent\" \"strings\""); + } + else + { + if (input_list->head->type == 132) + { + preprocessor_diagnostic_message(11, ctx, input_list->head, "multi-line //comment"); + } + else + { + preprocessor_diagnostic_message(12, ctx, input_list->head, "unnecessary line-slicing"); + } + } + } + unsigned char blanks = token_is_blank(input_list->head) || input_list->head->type == 10; + unsigned char is_final = is_active && !is_never_final(input_list->head->type); + if (ctx->flags & 1) + { + if (is_final) + { + prematch(&r, input_list); + ; + r.tail->flags = 1; + } + else + { + token_list_pop_front(input_list); + } + } + else + { + if (blanks) + { + if (level == 0 || 1) + { + prematch(&r, input_list); + } + else + { + token_list_pop_front(input_list); + } + } + else + { + if (level == 0 || 1) + { + prematch(&r, input_list); + if (is_final) + { + ; + r.tail->flags = 1; + } + } + else + { + if (is_final) + { + prematch(&r, input_list); + ; + r.tail->flags = 1; + } + else + { + token_list_pop_front(input_list); + } + } + } + } + } + } + } + else _catch_label_1: + { + } + return r; +} + +struct token_list group_part(struct preprocessor_ctx * ctx, struct token_list * input_list, unsigned char is_active, int level) +{ + ; + if (input_list->head->type == 127) + { + if (preprocessor_token_ahead_is_identifier(input_list->head, "if") || preprocessor_token_ahead_is_identifier(input_list->head, "ifdef") || preprocessor_token_ahead_is_identifier(input_list->head, "ifndef")) + { + return if_section(ctx, input_list, is_active, level); + } + else + { + if (preprocessor_token_ahead_is_identifier(input_list->head, "include") || preprocessor_token_ahead_is_identifier(input_list->head, "embed") || preprocessor_token_ahead_is_identifier(input_list->head, "define") || preprocessor_token_ahead_is_identifier(input_list->head, "undef") || preprocessor_token_ahead_is_identifier(input_list->head, "warning") || preprocessor_token_ahead_is_identifier(input_list->head, "line") || preprocessor_token_ahead_is_identifier(input_list->head, "error") || preprocessor_token_ahead_is_identifier(input_list->head, "pragma")) + { + return control_line(ctx, input_list, is_active, level); + } + else + { + return non_directive(ctx, input_list, level); + } + } + } + return text_line(ctx, input_list, is_active, level); +} + +struct token_list preprocessor(struct preprocessor_ctx * ctx, struct token_list * input_list, int level) +{ + struct token_list r = {0}; + if (input_list->head == ((void *)0)) + { + return r; + } + if (input_list->head->type == 8998) + { + prematch_level(&r, input_list, 1); + } + struct token_list g = group_opt(ctx, input_list, 1, level); + token_list_append_list(&r, &g); + token_list_destroy(&g); + return r; +} + +static void mark_macros_as_used(struct hash_map * map) +{ + if (map->table != ((void *)0)) + { + { + int i = 0; + for (; i < map->capacity; i++) + { + struct map_entry * pentry = map->table[i]; + while (pentry != ((void *)0)) + { + ; + struct macro * macro = pentry->data.p_macro; + macro->usage = 1; + pentry = pentry->next; + } + } + } + } +} + +void check_unused_macros(struct hash_map * map) +{ + if (map->table != ((void *)0)) + { + { + int i = 0; + for (; i < map->capacity; i++) + { + struct map_entry * pentry = map->table[i]; + while (pentry != ((void *)0)) + { + ; + struct macro * macro = pentry->data.p_macro; + if (macro->usage == 0) + { + printf("%s not used\n", macro->name); + } + pentry = pentry->next; + } + } + } + } +} + +int get_self_path(char * buffer, int maxsize); + +int include_config_header(struct preprocessor_ctx * ctx, char * file_name) +{ + char local_cakeconfig_path[260] = {0}; + snprintf(local_cakeconfig_path, sizeof local_cakeconfig_path, "%s", file_name); + dirname(local_cakeconfig_path); + snprintf(local_cakeconfig_path, sizeof local_cakeconfig_path, "%s", local_cakeconfig_path); + char * str = read_file(local_cakeconfig_path, 1); + while (str == ((void *)0)) + { + dirname(local_cakeconfig_path); + dirname(local_cakeconfig_path); + if (local_cakeconfig_path[0] == 0) + { + break; + } + str = read_file(local_cakeconfig_path, 1); + } + if (str == ((void *)0)) + { + char executable_path[246] = {0}; + get_self_path(executable_path, sizeof (executable_path)); + dirname(executable_path); + char root_cakeconfig_path[260] = {0}; + snprintf(root_cakeconfig_path, sizeof root_cakeconfig_path, "%s", executable_path); + str = read_file(root_cakeconfig_path, 1); + } + if (str == ((void *)0)) + { + return 2; + } + int w = ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index].warnings; + struct tokenizer_ctx tctx = {0}; + struct token_list l = tokenizer(&tctx, str, "standard macros inclusion", 0, 0); + struct token_list l10 = preprocessor(ctx, &l, 0); + mark_macros_as_used(&ctx->macros); + token_list_destroy(&l); + free(str); + token_list_destroy(&l10); + ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index].warnings = w; + return 0; +} + + +__int64 _time64(__int64 * _Time); +inline static __int64 time(__int64 * _Time) +{ + return _time64(_Time); +} + +struct tm *_localtime64(__int64 * _Time); +inline static struct tm *localtime(__int64 * _Time) +{ + return _localtime64(_Time); +} + +void add_standard_macros(struct preprocessor_ctx * ctx) +{ + struct diagnostic w = ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index]; + struct diagnostic __cmp_lt_0 = {0, 0, 0}; + ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index] = __cmp_lt_0; + static char mon[12][4] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; + __int64 now = time(((void *)0)); + struct tm * tm = localtime(&now); + struct tokenizer_ctx tctx = {0}; + char datastr[100] = {0}; + snprintf(datastr, sizeof datastr, "#define __DATE__ \"%s %2d %d\"\n", mon[tm->tm_mon], tm->tm_mday, tm->tm_year + 1900); + struct token_list l1 = tokenizer(&tctx, datastr, "__DATE__ macro inclusion", 0, 0); + struct token_list tl1 = preprocessor(ctx, &l1, 0); + token_list_destroy(&tl1); + token_list_destroy(&l1); + char timestr[100] = {0}; + snprintf(timestr, sizeof timestr, "#define __TIME__ \"%02d:%02d:%02d\"\n", tm->tm_hour, tm->tm_min, tm->tm_sec); + struct token_list l2 = tokenizer(&tctx, timestr, "__TIME__ macro inclusion", 0, 0); + struct token_list tl2 = preprocessor(ctx, &l2, 0); + token_list_destroy(&tl2); + token_list_destroy(&l2); + char * pre_defined_macros_text = "#define __CAKE__ 202311L\n"; + "\n"; + struct token_list l = tokenizer(&tctx, pre_defined_macros_text, "standard macros inclusion", 0, 0); + struct token_list l10 = preprocessor(ctx, &l, 0); + mark_macros_as_used(&ctx->macros); + token_list_destroy(&l); + token_list_destroy(&l10); + ctx->options.diagnostic_stack.stack[ctx->options.diagnostic_stack.top_index] = w; +} + +char *get_token_name(int tk) +{ + switch (tk) + { + case 0 : + return "TK_NONE"; + case 10 : + return "TK_NEWLINE"; + case 32 : + return "TK_WHITE_SPACE"; + case 33 : + return "TK_EXCLAMATION_MARK"; + case 34 : + return "TK_QUOTATION_MARK"; + case 35 : + return "TK_NUMBER_SIGN"; + case 36 : + return "TK_DOLLAR_SIGN"; + case 37 : + return "TK_PERCENT_SIGN"; + case 38 : + return "TK_AMPERSAND"; + case 39 : + return "TK_APOSTROPHE"; + case 40 : + return "TK_LEFT_PARENTHESIS"; + case 41 : + return "TK_RIGHT_PARENTHESIS"; + case 42 : + return "TK_ASTERISK"; + case 43 : + return "TK_PLUS_SIGN"; + case 44 : + return "TK_COMMA"; + case 45 : + return "TK_HYPHEN_MINUS"; + case 46 : + return "TK_FULL_STOP"; + case 47 : + return "TK_SOLIDUS"; + case 58 : + return "TK_COLON"; + case 59 : + return "TK_SEMICOLON"; + case 60 : + return "TK_LESS_THAN_SIGN"; + case 61 : + return "TK_EQUALS_SIGN"; + case 62 : + return "TK_GREATER_THAN_SIGN"; + case 63 : + return "TK_QUESTION_MARK"; + case 64 : + return "TK_COMMERCIAL_AT"; + case 91 : + return "TK_LEFT_SQUARE_BRACKET"; + case 12079 : + return "TK_REVERSE_SOLIDUS"; + case 93 : + return "TK_RIGHT_SQUARE_BRACKET"; + case 94 : + return "TK_CIRCUMFLEX_ACCENT"; + case 95 : + return "TK_FLOW_LINE"; + case 96 : + return "TK_GRAVE_ACCENT"; + case 123 : + return "TK_LEFT_CURLY_BRACKET"; + case 124 : + return "TK_VERTICAL_LINE"; + case 125 : + return "TK_RIGHT_CURLY_BRACKET"; + case 126 : + return "TK_TILDE"; + case 127 : + return "TK_PREPROCESSOR_LINE"; + case 128 : + return "TK_PRAGMA"; + case 130 : + return "TK_STRING_LITERAL"; + case 131 : + return "TK_CHAR_CONSTANT"; + case 132 : + return "TK_LINE_COMMENT"; + case 133 : + return "TK_COMMENT"; + case 134 : + return "TK_PPNUMBER"; + case 135 : + return "ANY_OTHER_PP_TOKEN"; + case 136 : + return "TK_COMPILER_DECIMAL_CONSTANT"; + case 137 : + return "TK_COMPILER_OCTAL_CONSTANT"; + case 138 : + return "TK_COMPILER_HEXADECIMAL_CONSTANT"; + case 139 : + return "TK_COMPILER_BINARY_CONSTANT"; + case 140 : + return "TK_COMPILER_DECIMAL_FLOATING_CONSTANT"; + case 141 : + return "TK_COMPILER_HEXADECIMAL_FLOATING_CONSTANT"; + case 142 : + return "TK_PLACEMARKER"; + case 143 : + return "TK_BLANKS"; + case 11051 : + return "TK_PLUSPLUS"; + case 11565 : + return "TK_MINUSMINUS"; + case 11582 : + return "TK_ARROW"; + case 15420 : + return "TK_SHIFTLEFT"; + case 15934 : + return "TK_SHIFTRIGHT"; + case 31868 : + return "TK_LOGICAL_OPERATOR_OR"; + case 9766 : + return "TK_LOGICAL_OPERATOR_AND"; + case 8995 : + return "TK_MACRO_CONCATENATE_OPERATOR"; + case 8996 : + return "TK_IDENTIFIER"; + case 8997 : + return "TK_IDENTIFIER_RECURSIVE_MACRO"; + case 8998 : + return "TK_BEGIN_OF_FILE"; + case 8999 : + return "TK_KEYWORD_AUTO"; + case 9000 : + return "TK_KEYWORD_BREAK"; + case 9001 : + return "TK_KEYWORD_CASE"; + case 9002 : + return "TK_KEYWORD_CONSTEXPR"; + case 9003 : + return "TK_KEYWORD_CHAR"; + case 9004 : + return "TK_KEYWORD_CONST"; + case 9005 : + return "TK_KEYWORD_CONTINUE"; + case 9006 : + return "TK_KEYWORD_CATCH"; + case 9007 : + return "TK_KEYWORD_DEFAULT"; + case 9008 : + return "TK_KEYWORD_DO"; + case 9009 : + return "TK_KEYWORD_DEFER"; + case 9010 : + return "TK_KEYWORD_DOUBLE"; + case 9011 : + return "TK_KEYWORD_ELSE"; + case 9012 : + return "TK_KEYWORD_ENUM"; + case 9013 : + return "TK_KEYWORD_EXTERN"; + case 9014 : + return "TK_KEYWORD_FLOAT"; + case 9015 : + return "TK_KEYWORD_FOR"; + case 9016 : + return "TK_KEYWORD_GOTO"; + case 9017 : + return "TK_KEYWORD_IF"; + case 9018 : + return "TK_KEYWORD_INLINE"; + case 9019 : + return "TK_KEYWORD_INT"; + case 9020 : + return "TK_KEYWORD_LONG"; + case 9021 : + return "TK_KEYWORD__INT8"; + case 9022 : + return "TK_KEYWORD__INT16"; + case 9023 : + return "TK_KEYWORD__INT32"; + case 9024 : + return "TK_KEYWORD__INT64"; + case 9025 : + return "TK_KEYWORD_REGISTER"; + case 9026 : + return "TK_KEYWORD_RESTRICT"; + case 9027 : + return "TK_KEYWORD_RETURN"; + case 9028 : + return "TK_KEYWORD_SHORT"; + case 9029 : + return "TK_KEYWORD_SIGNED"; + case 9030 : + return "TK_KEYWORD_SIZEOF"; + case 9032 : + return "TK_KEYWORD_STATIC"; + case 9033 : + return "TK_KEYWORD_STRUCT"; + case 9034 : + return "TK_KEYWORD_SWITCH"; + case 9035 : + return "TK_KEYWORD_TYPEDEF"; + case 9036 : + return "TK_KEYWORD_TRY"; + case 9037 : + return "TK_KEYWORD_THROW"; + case 9038 : + return "TK_KEYWORD_UNION"; + case 9039 : + return "TK_KEYWORD_UNSIGNED"; + case 9040 : + return "TK_KEYWORD_VOID"; + case 9041 : + return "TK_KEYWORD_VOLATILE"; + case 9042 : + return "TK_KEYWORD_WHILE"; + case 9043 : + return "TK_KEYWORD__ALIGNAS"; + case 9044 : + return "TK_KEYWORD__ALIGNOF"; + case 9045 : + return "TK_KEYWORD__ATOMIC"; + case 9046 : + return "TK_KEYWORD__ASM"; + case 9047 : + return "TK_KEYWORD__BOOL"; + case 9048 : + return "TK_KEYWORD__COMPLEX"; + case 9049 : + return "TK_KEYWORD__DECIMAL128"; + case 9050 : + return "TK_KEYWORD__DECIMAL32"; + case 9051 : + return "TK_KEYWORD__DECIMAL64"; + case 9052 : + return "TK_KEYWORD__GENERIC"; + case 9053 : + return "TK_KEYWORD__IMAGINARY"; + case 9054 : + return "TK_KEYWORD__NORETURN"; + case 9055 : + return "TK_KEYWORD__STATIC_ASSERT"; + case 9056 : + return "TK_KEYWORD_ASSERT"; + case 9057 : + return "TK_KEYWORD__THREAD_LOCAL"; + case 9058 : + return "TK_KEYWORD_TYPEOF"; + case 9059 : + return "TK_KEYWORD_TRUE"; + case 9060 : + return "TK_KEYWORD_FALSE"; + case 9061 : + return "TK_KEYWORD_NULLPTR"; + case 9062 : + return "TK_KEYWORD_TYPEOF_UNQUAL"; + case 9063 : + return "TK_KEYWORD__BITINT"; + case 9064 : + return "TK_KEYWORD__OWNER"; + case 9065 : + return "TK_KEYWORD__OUT"; + case 9066 : + return "TK_KEYWORD__OBJ_OWNER"; + case 9067 : + return "TK_KEYWORD__VIEW"; + case 9068 : + return "TK_KEYWORD__OPT"; + case 9069 : + return "TK_KEYWORD_STATIC_DEBUG"; + case 9070 : + return "TK_KEYWORD_STATIC_DEBUG_EX"; + case 9071 : + return "TK_KEYWORD_STATIC_STATE"; + case 9072 : + return "TK_KEYWORD_STATIC_SET"; + case 9073 : + return "TK_KEYWORD_IS_POINTER"; + case 9074 : + return "TK_KEYWORD_IS_LVALUE"; + case 9075 : + return "TK_KEYWORD_IS_CONST"; + case 9076 : + return "TK_KEYWORD_IS_OWNER"; + case 9077 : + return "TK_KEYWORD_IS_ARRAY"; + case 9078 : + return "TK_KEYWORD_IS_FUNCTION"; + case 9079 : + return "TK_KEYWORD_IS_SCALAR"; + case 9080 : + return "TK_KEYWORD_IS_ARITHMETIC"; + case 9081 : + return "TK_KEYWORD_IS_FLOATING_POINT"; + case 9082 : + return "TK_KEYWORD_IS_INTEGRAL"; + case 129 : + return "TK_PRAGMA_END"; + case 9031 : + return "TK_KEYWORD__LENGTHOF"; + } + return "TK_X_MISSING_NAME"; +} + +int stringify(char * input, int n, char output[]) +{ + int count = 0; + if (count < n) + { + output[count++] = 34; + } + char * p = input; + while ( *p) + { + if ( *p == 34 || *p == 92) + { + if (count < n) + { + output[count++] = 92; + } + if (count < n) + { + output[count++] = *p; + } + p++; + } + else + { + if (count < n) + { + output[count++] = *p; + } + p++; + } + } + if (count < n) + { + output[count++] = 34; + } + if (count < n) + { + output[count++] = 0; + } + if (count >= n) + { + return -count; + } + return count; +} + +void print_literal(char * s) +{ + if (s == ((void *)0)) + { + printf("\""); + printf("\""); + return; + } + printf("\""); + while ( *s) + { + switch ( *s) + { + case 10 : + printf("\\n"); + break; + default: + printf("%c", *s); + } + s++; + } + printf("\""); +} + +char *get_code_as_we_see_plus_macros(struct token_list * list) +{ + struct osstream ss = {0}; + struct token * current = list->head; + while (current) + { + if (current->level == 0 && current->type != 8998) + { + if (current->flags & 2) + { + ss_fprintf(&ss, "\x1b[36;1m"); + } + else + { + ss_fprintf(&ss, "\x1b[97m"); + } + ss_fprintf(&ss, "%s", current->lexeme); + ss_fprintf(&ss, "\x1b"); + } + current = current->next; + } + char * cstr = ss.c_str; + ss.c_str = ((void *)0); + ss_close(&ss); + return cstr; +} + +void print_code_as_we_see(struct token_list * list, unsigned char remove_comments) +{ + if (list->head == ((void *)0) || list->tail == ((void *)0)) + { + return; + } + struct token * current = list->head; + while (current && current != list->tail->next) + { + if (current->level == 0 && !(current->flags & 2) && !(current->flags & 64) && current->type != 8998) + { + if ((current->flags & 4) && (current->prev != ((void *)0) && current->prev->type != 143)) + { + printf(" "); + } + if (remove_comments) + { + if (current->type == 132) + { + printf("\n"); + } + else + { + if (current->type == 133) + { + printf(" "); + } + else + { + printf("%s", current->lexeme); + } + } + } + else + { + printf("%s", current->lexeme); + } + } + current = current->next; + } +} + +char *get_code_as_we_see(struct token_list * list, unsigned char remove_comments) +{ + if (list->head == ((void *)0) || list->tail == ((void *)0)) + { + return ((void *)0); + } + struct osstream ss = {0}; + struct token * current = list->head; + while (current && current != list->tail->next) + { + if (current->level == 0 && !(current->flags & 2) && !(current->flags & 64) && current->type != 8998) + { + if ((current->flags & 4) && (current->prev != ((void *)0) && current->prev->type != 143)) + { + ss_fprintf(&ss, " "); + } + if (remove_comments) + { + if (current->type == 132) + { + ss_fprintf(&ss, "\n"); + } + else + { + if (current->type == 133) + { + ss_fprintf(&ss, " "); + } + else + { + ss_fprintf(&ss, "%s", current->lexeme); + } + } + } + else + { + ss_fprintf(&ss, "%s", current->lexeme); + } + } + current = current->next; + } + char * cstr = ss.c_str; + ss.c_str = ((void *)0); + ss_close(&ss); + return cstr; +} + +char *get_code_as_compiler_see(struct token_list * list) +{ + if (list->head == ((void *)0) || list->tail == ((void *)0)) + { + return ((void *)0); + } + struct osstream ss = {0}; + struct token * current = list->head; + while (current && current != list->tail->next) + { + if ( !(current->flags & 64) && current->type != 8998 && (current->flags & 1)) + { + if (current->flags & 4) + { + ss_fprintf(&ss, " "); + } + if (current->flags & 8) + { + ss_fprintf(&ss, "\n"); + } + if (current->type == 132) + { + ss_fprintf(&ss, "\n"); + } + else + { + if (current->type == 133) + { + ss_fprintf(&ss, " "); + } + else + { + ss_fprintf(&ss, "%s", current->lexeme); + } + } + } + current = current->next; + } + return ss.c_str; +} + +char *print_preprocessed_to_string2(struct token * p_token) +{ + if (p_token == ((void *)0)) + { + return strdup("(null)"); + } + struct osstream ss = {0}; + struct token * current = p_token; + while (current) + { + remove_line_continuation(current->lexeme); + if (current->flags & 1) + { + if (current->level > 0) + { + if ((current->flags & 8)) + { + ss_fprintf(&ss, "\n"); + } + else + { + if ((current->flags & 4)) + { + ss_fprintf(&ss, " "); + } + } + } + else + { + if (current->flags & 2) + { + if ((current->flags & 4)) + { + ss_fprintf(&ss, " "); + } + } + } + if (current->lexeme[0] != 0) + { + ss_fprintf(&ss, "%s", current->lexeme); + } + current = current->next; + } + else + { + if (current->level == 0) + { + if (current->type == 143 || current->type == 10) + { + ss_fprintf(&ss, "%s", current->lexeme); + } + } + current = current->next; + } + } + return ss.c_str; +} + +char *print_preprocessed_to_string(struct token * p_token) +{ + struct osstream ss = {0}; + struct token * current = p_token; + while ( !(current->flags & 1) || current->type == 143 || current->type == 133 || current->type == 132 || current->type == 10 || current->type == 127) + { + current = current->next; + if (current == ((void *)0)) + { + return ss.c_str; + } + } + unsigned char first = 1; + while (current) + { + ; + if (current->flags & 1) + { + if ( !first && current->flags & 8) + { + ss_fprintf(&ss, "\n"); + } + else + { + if ( !first && current->flags & 4) + { + ss_fprintf(&ss, " "); + } + } + if (current->lexeme[0] != 0) + { + ss_fprintf(&ss, "%s", current->lexeme); + } + first = 0; + current = current->next; + } + else + { + current = current->next; + } + } + return ss.c_str; +} + +void print_preprocessed(struct token * p_token) +{ + char * s = print_preprocessed_to_string(p_token); + if (s) + { + printf("%s", s); + free((void *)s); + } +} + +static unsigned char is_screaming_case(char * text) +{ + unsigned char screaming_case = 0; + while ( *text) + { + if (( *text >= 65 && *text <= 90) || ( *text >= 48 && *text <= 57) || ( *text == 95)) + { + screaming_case = 1; + } + else + { + return 0; + } + text++; + } + return screaming_case; +} + +void print_all_macros(struct preprocessor_ctx * prectx) +{ + { + int i = 0; + for (; i < prectx->macros.capacity; i++) + { + struct map_entry * entry = prectx->macros.table[i]; + if (entry == ((void *)0)) + { + continue; + } + ; + struct macro * macro = entry->data.p_macro; + printf("#define %s", macro->name); + if (macro->is_function) + { + printf("("); + struct macro_parameter * parameter = macro->parameters; + while (parameter) + { + printf("%s", parameter->name); + if (parameter->next) + { + printf(","); + } + parameter = parameter->next; + } + printf(")"); + } + printf(" "); + struct token * token = macro->replacement_list.head; + while (token) + { + printf("%s", token->lexeme); + if (token == macro->replacement_list.tail) + { + break; + } + token = token->next; + } + printf("\n"); + } + } +} + +void naming_convention_macro(struct preprocessor_ctx * ctx, struct token * token) +{ + if ( !is_screaming_case(token->lexeme)) + { + preprocessor_diagnostic_message(63, ctx, token, "use SCREAMING_CASE for macros"); + } +} + diff --git a/out/src/type.c b/out/src/type.c new file mode 100644 index 0000000..75c977e --- /dev/null +++ b/out/src/type.c @@ -0,0 +1,3611 @@ +struct param_list { + unsigned char is_var_args; + unsigned char is_void; + struct param * head; + struct param * tail; +}; + +struct type { + int category; + int attributes_flags; + int type_specifier_flags; + int type_qualifier_flags; + int storage_class_specifier_flags; + char * name_opt; + struct struct_or_union_specifier * struct_or_union_specifier; + struct enum_specifier * enum_specifier; + struct expression * array_num_elements_expression; + int num_of_elements; + unsigned char static_array; + unsigned char address_of; + struct param_list params; + struct type * next; +}; + +union _struct_tag_6 { + unsigned char bool_value; + signed char signed_char_value; + unsigned char unsigned_char_value; + signed short signed_short_value; + unsigned short unsigned_short_value; + signed int signed_int_value; + unsigned int unsigned_int_value; + signed long signed_long_value; + unsigned long unsigned_long_value; + signed long long signed_long_long_value; + unsigned long long unsigned_long_long_value; + float float_value; + double double_value; + long double long_double_value; +}; + +struct object { + int state; + int value_type; + struct type type2; + char * debug_name; + union _struct_tag_6 value; + struct object * parent; + struct expression * p_init_expression; + struct object * members; + struct object * next; +}; + +struct argument_expression_list { + struct argument_expression * head; + struct argument_expression * tail; +}; + +struct expression { + int expression_type; + struct type type; + struct object object; + struct type_name * type_name; + struct braced_initializer * braced_initializer; + struct compound_statement * compound_statement; + struct generic_selection * generic_selection; + struct token * first_token; + struct token * last_token; + struct declarator * declarator; + int member_index; + struct argument_expression_list argument_expression_list; + struct expression * condition_expr; + struct expression * left; + struct expression * right; + unsigned char is_assignment_expression; +}; + +struct defer_list { + struct defer_list_item * head; + struct defer_list_item * tail; +}; + +struct selection_statement { + struct init_statement * p_init_statement; + struct condition * condition; + struct secondary_block * secondary_block; + struct secondary_block * else_secondary_block_opt; + struct token * open_parentesis_token; + struct token * close_parentesis_token; + struct token * first_token; + struct token * last_token; + struct token * else_token_opt; + struct defer_list defer_list; +}; + +struct array_declarator { + struct direct_declarator * direct_declarator; + struct expression * assignment_expression; + struct expression * expression; + struct type_qualifier_list * type_qualifier_list_opt; + struct token * token; + struct token * static_token_opt; +}; + +struct pragma_declaration { + struct token * first_token; + struct token * last_token; +}; + +struct designation { + struct designator_list * designator_list; + struct token * token; +}; + +struct hash_map { + struct map_entry ** table; + int capacity; + int size; +}; + +struct scope { + int scope_level; + struct hash_map tags; + struct hash_map variables; + struct scope * next; + struct scope * previous; +}; + +struct typeof_specifier { + struct token * first_token; + struct token * last_token; + struct typeof_specifier_argument * typeof_specifier_argument; + struct type type; +}; + +struct token { + int type; + char * lexeme; + char * original; + int line; + int col; + int level; + int flags; + struct token * token_origin; + struct token * next; + struct token * prev; +}; + +struct try_statement { + struct secondary_block * secondary_block; + struct secondary_block * catch_secondary_block_opt; + struct token * first_token; + struct token * last_token; + struct token * catch_token_opt; + int try_catch_block_index; +}; + +struct labeled_statement { + struct label * label; + struct statement * statement; +}; + +struct attribute_token { + int attributes_flags; + struct token * token; +}; + +struct member_declarator_list { + struct member_declarator * head; + struct member_declarator * tail; +}; + +struct init_declarator_list { + struct init_declarator * head; + struct init_declarator * tail; +}; + +struct simple_declaration { + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt; + struct declaration_specifiers * p_declaration_specifiers; + struct init_declarator_list init_declarator_list; + struct token * first_token; + struct token * last_token; +}; + +struct enumerator { + unsigned char has_shared_ownership; + struct token * token; + struct attribute_specifier_sequence * attribute_specifier_sequence_opt; + struct expression * constant_expression_opt; + struct enum_specifier * enum_specifier; + struct enumerator * next; + struct object value; +}; + +struct enumerator_list { + struct enumerator * head; + struct enumerator * tail; +}; + +struct storage_class_specifier { + int flags; + struct token * token; +}; + +struct generic_assoc_list { + struct generic_association * head; + struct generic_association * tail; +}; + +struct type_qualifier { + int flags; + struct token * token; + struct type_qualifier * next; +}; + +struct __crt_locale_pointers { + struct __crt_locale_data * locinfo; + struct __crt_multibyte_data * mbcinfo; +}; + +struct typeof_specifier_argument { + struct expression * expression; + struct type_name * type_name; +}; + +struct member_declaration_list { + struct token * first_token; + struct token * last_token; + struct member_declaration * head; + struct member_declaration * tail; +}; + +struct attribute_specifier { + struct token * first_token; + struct token * last_token; + struct attribute_list * attribute_list; + struct attribute_specifier * next; +}; + +struct type_name { + struct token * first_token; + struct token * last_token; + struct specifier_qualifier_list * specifier_qualifier_list; + struct declarator * abstract_declarator; + struct type type; +}; + +struct enum_specifier { + unsigned char has_shared_ownership; + struct attribute_specifier_sequence * attribute_specifier_sequence_opt; + struct specifier_qualifier_list * specifier_qualifier_list; + char tag_name[200]; + struct enumerator_list enumerator_list; + struct token * tag_token; + struct token * first_token; + struct enum_specifier * complete_enum_specifier2; +}; + +struct secondary_block { + struct token * first_token; + struct token * last_token; + struct statement * statement; +}; + +struct expression_statement { + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt; + struct expression * expression_opt; +}; + +struct declaration { + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt; + struct static_assert_declaration * static_assert_declaration; + struct pragma_declaration * pragma_declaration; + struct declaration_specifiers * declaration_specifiers; + struct init_declarator_list init_declarator_list; + struct compound_statement * function_body; + struct defer_list defer_list; + struct declarator * contract_declarator; + struct token * first_token; + struct token * last_token; + struct declaration * next; +}; + +struct flow_objects_view { + struct flow_object ** data; + int size; + int capacity; +}; + +struct block_item_list { + struct block_item * head; + struct block_item * tail; +}; + +struct diagnostic { + unsigned long long errors; + unsigned long long warnings; + unsigned long long notes; +}; + +struct compound_statement { + struct token * first_token; + struct token * last_token; + struct block_item_list block_item_list; + struct diagnostic diagnostic_flags; + struct defer_list defer_list; +}; + +struct scope_list { + struct scope * head; + struct scope * tail; +}; + +struct defer_list_item { + struct declarator * declarator; + struct defer_statement * defer_statement; + struct defer_list_item * next; +}; + +struct parameter_type_list { + unsigned char is_var_args; + unsigned char is_void; + struct parameter_list * parameter_list; +}; + +struct parameter_list { + struct parameter_declaration * head; + struct parameter_declaration * tail; +}; + +struct argument_expression { + struct expression * expression; + struct argument_expression * next; + unsigned char set_unkown; +}; + +struct static_assert_declaration { + struct token * first_token; + struct token * last_token; + struct expression * constant_expression; + struct token * string_literal_opt; +}; + +struct function_declarator { + struct direct_declarator * direct_declarator; + struct scope parameters_scope; + struct parameter_type_list * parameter_type_list_opt; +}; + +struct specifier_qualifier_list { + int type_specifier_flags; + int type_qualifier_flags; + struct struct_or_union_specifier * struct_or_union_specifier; + struct enum_specifier * enum_specifier; + struct typeof_specifier * typeof_specifier; + struct declarator * typedef_declarator; + struct type_specifier_qualifier * head; + struct type_specifier_qualifier * tail; + struct token * first_token; + struct token * last_token; + struct attribute_specifier_sequence * p_attribute_specifier_sequence; +}; + +struct token_list { + struct token * head; + struct token * tail; +}; + +struct designator_list { + struct designator * head; + struct designator * tail; +}; + +struct declaration_specifiers { + int attributes_flags; + int type_specifier_flags; + int type_qualifier_flags; + int storage_class_specifier_flags; + int function_specifier_flags; + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt; + struct struct_or_union_specifier * struct_or_union_specifier; + struct enum_specifier * enum_specifier; + struct declarator * typedef_declarator; + struct typeof_specifier * typeof_specifier; + struct token * first_token; + struct token * last_token; + struct declaration_specifier * head; + struct declaration_specifier * tail; +}; + +struct balanced_token_sequence { + struct balanced_token * head; + struct balanced_token * tail; +}; + +struct report { + int no_files; + double cpu_time_used_sec; + int error_count; + int warnings_count; + int info_count; + unsigned char test_mode; + int test_failed; + int test_succeeded; + int last_diagnostics_ids[2]; + int fatal_error_expected; + unsigned char ignore_this_report; +}; + +struct initializer_list_item { + struct designation * designation; + struct initializer * initializer; + struct initializer_list_item * next; +}; + +struct primary_block { + struct compound_statement * compound_statement; + struct selection_statement * selection_statement; + struct iteration_statement * iteration_statement; + struct defer_statement * defer_statement; + struct try_statement * try_statement; +}; + +struct condition { + struct expression * expression; + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt; + struct declaration_specifiers * p_declaration_specifiers; + struct init_declarator * p_init_declarator; + struct token * first_token; + struct token * last_token; +}; + +struct type_qualifier_list { + int flags; + struct type_qualifier * head; + struct type_qualifier * tail; +}; + +struct atomic_type_specifier { + struct token * token; + struct type_name * type_name; +}; + +struct unlabeled_statement { + struct expression_statement * expression_statement; + struct primary_block * primary_block; + struct jump_statement * jump_statement; +}; + +struct designator { + struct expression * constant_expression_opt; + struct token * token; + struct designator * next; +}; + +struct pointer { + struct attribute_specifier_sequence * attribute_specifier_sequence_opt; + struct type_qualifier_list * type_qualifier_list_opt; + struct pointer * pointer; +}; + +struct osstream { + char * c_str; + int size; + int capacity; +}; + +struct switch_value { + long long value; + struct label * p_label; + struct switch_value * next; +}; + +struct type_specifier_qualifier { + struct type_specifier * type_specifier; + struct type_qualifier * type_qualifier; + struct alignment_specifier * alignment_specifier; + struct type_specifier_qualifier * next; +}; + +struct marker { + char * file; + int line; + int start_col; + int end_col; + struct token * p_token_caret; + struct token * p_token_begin; + struct token * p_token_end; +}; + +struct parameter_declaration { + struct attribute_specifier_sequence * attribute_specifier_sequence_opt; + struct declaration_specifiers * declaration_specifiers; + struct declarator * declarator; + struct parameter_declaration * next; +}; + +struct direct_declarator { + struct token * name_opt; + struct declarator * declarator; + struct array_declarator * array_declarator; + struct function_declarator * function_declarator; + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt; +}; + +struct initializer { + struct token * first_token; + struct braced_initializer * braced_initializer; + struct expression * assignment_expression; +}; + +struct member_declarator { + struct declarator * declarator; + struct expression * constant_expression; + struct member_declarator * next; +}; + +struct attribute_specifier_sequence { + struct token * first_token; + struct token * last_token; + int attributes_flags; + struct attribute_specifier * head; + struct attribute_specifier * tail; +}; + +struct switch_value_list { + struct switch_value * head; + struct switch_value * tail; + struct switch_value * p_default; +}; + +struct __crt_locale_data; +struct param { + struct type type; + struct param * next; +}; + +struct function_specifier { + int flags; + struct token * token; +}; + +struct declaration_specifier { + struct storage_class_specifier * storage_class_specifier; + struct type_specifier_qualifier * type_specifier_qualifier; + struct function_specifier * function_specifier; + struct declaration_specifier * next; +}; + +struct alignment_specifier { + struct type_name * type_name; + struct expression * constant_expression; + struct token * token; +}; + +struct attribute_list { + int attributes_flags; + struct attribute * head; + struct attribute * tail; +}; + +struct iteration_statement { + struct token * first_token; + struct token * second_token; + struct secondary_block * secondary_block; + struct expression * expression1; + struct expression * expression2; + struct expression * expression0; + struct declaration * declaration; + struct defer_list defer_list; +}; + +struct label { + struct expression * constant_expression; + struct token * p_identifier_opt; + struct token * p_first_token; +}; + +struct attribute_argument_clause { + struct balanced_token_sequence * p_balanced_token_sequence; + struct token * token; +}; + +struct balanced_token { + struct token * token; + struct balanced_token * next; +}; + +struct init_statement { + struct expression_statement * p_expression_statement; + struct simple_declaration * p_simple_declaration; +}; + +struct generic_association { + struct type type; + struct type_name * p_type_name; + struct expression * expression; + struct token * first_token; + struct token * last_token; + struct generic_association * next; +}; + +struct statement { + struct labeled_statement * labeled_statement; + struct unlabeled_statement * unlabeled_statement; +}; + +struct member_declaration { + struct specifier_qualifier_list * specifier_qualifier_list; + struct member_declarator_list * member_declarator_list_opt; + struct static_assert_declaration * static_assert_declaration; + struct pragma_declaration * pragma_declaration; + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt; + struct member_declaration * next; +}; + +struct flow_object_state { + char * dbg_name; + int state_number; + struct flow_object * pointed; + int state; + struct flow_objects_view alternatives; + struct flow_object_state * next; +}; + +struct struct_or_union_specifier { + unsigned char has_shared_ownership; + struct attribute_specifier_sequence * attribute_specifier_sequence_opt; + struct member_declaration_list member_declaration_list; + struct token * first_token; + struct token * last_token; + unsigned char is_owner; + struct token * tagtoken; + char tag_name[200]; + unsigned char has_anonymous_tag; + unsigned char show_anonymous_tag; + int scope_level; + int visit_moved; + struct struct_or_union_specifier * complete_struct_or_union_specifier_indirection; +}; + +struct jump_statement { + struct token * label; + struct token * first_token; + struct token * last_token; + struct expression * expression_opt; + int try_catch_block_index; + struct defer_list defer_list; +}; + +struct generic_selection { + struct expression * expression; + struct type_name * type_name; + struct expression * p_view_selected_expression; + struct generic_assoc_list generic_assoc_list; + struct token * first_token; + struct token * last_token; +}; + +struct type_specifier { + int flags; + struct token * token; + struct struct_or_union_specifier * struct_or_union_specifier; + struct typeof_specifier * typeof_specifier; + struct enum_specifier * enum_specifier; + struct declarator * typedef_declarator; + struct atomic_type_specifier * atomic_type_specifier; +}; + +struct __crt_multibyte_data; +struct diagnostic_stack { + int top_index; + struct diagnostic stack[10]; +}; + +struct attribute { + int attributes_flags; + struct attribute_token * attribute_token; + struct attribute_argument_clause * attribute_argument_clause; + struct attribute * next; +}; + +struct initializer_list { + struct token * first_token; + struct initializer_list_item * head; + struct initializer_list_item * tail; + int size; +}; + +struct init_declarator { + unsigned char has_shared_ownership; + struct declarator * p_declarator; + struct initializer * initializer; + struct init_declarator * next; +}; + +struct declarator { + unsigned char has_shared_ownership; + struct token * first_token_opt; + struct token * last_token_opt; + struct pointer * pointer; + struct direct_declarator * direct_declarator; + struct declaration_specifiers * declaration_specifiers; + struct specifier_qualifier_list * specifier_qualifier_list; + struct token * name_opt; + struct compound_statement * function_body; + int num_uses; + struct object object; + struct flow_object * p_object; + struct type type; +}; + +struct braced_initializer { + struct token * first_token; + struct token * last_token; + struct initializer_list * initializer_list; +}; + +struct type_list { + struct type * head; + struct type * tail; +}; + +struct block_item { + struct token * first_token; + struct declaration * declaration; + struct unlabeled_statement * unlabeled_statement; + struct label * label; + struct block_item * next; +}; + +struct struct_entry; +struct options { + int input; + int target; + struct diagnostic_stack diagnostic_stack; + int style; + unsigned char show_includes; + unsigned char disable_assert; + unsigned char flow_analysis; + unsigned char test_mode; + unsigned char null_checks_enabled; + unsigned char ownership_enabled; + unsigned char preprocess_only; + unsigned char clear_error_at_end; + unsigned char sarif_output; + unsigned char no_output; + unsigned char visual_studio_ouput_format; + unsigned char dump_tokens; + unsigned char dump_pptokens; + unsigned char auto_config; + char output[200]; + char sarifpath[200]; +}; + +struct parser_ctx { + struct options options; + struct scope_list scopes; + struct declaration * p_current_function_opt; + struct try_statement * p_current_try_statement_opt; + struct selection_statement * p_current_selection_statement; + struct switch_value_list * p_switch_value_list; + struct _iobuf * sarif_file; + unsigned int sarif_entries; + struct token_list input_list; + struct token * current; + struct token * previous; + int try_catch_block_index; + unsigned char evaluation_is_disabled; + unsigned char inside_generic_association; + struct report * p_report; +}; + +struct defer_statement { + struct token * first_token; + struct token * last_token; + struct secondary_block * secondary_block; +}; + +union _struct_tag_5 { + unsigned int number; + struct enum_specifier * p_enum_specifier; + struct enumerator * p_enumerator; + struct struct_or_union_specifier * p_struct_or_union_specifier; + struct declarator * p_declarator; + struct init_declarator * p_init_declarator; + struct macro * p_macro; + struct struct_entry * p_struct_entry; +}; + +struct map_entry { + struct map_entry * next; + unsigned int hash; + char * key; + int type; + union _struct_tag_5 data; +}; + +struct _iobuf { + void * _Placeholder; +}; + +struct macro; +struct flow_object { + unsigned int visit_number; + struct flow_object * parent; + struct declarator * p_declarator_origin; + struct expression * p_expression_origin; + struct flow_objects_view members; + struct flow_object_state current; + int id; + unsigned char is_temporary; +}; + + +int ss_fprintf(struct osstream * stream, char * fmt, ...); + +void print_item(struct osstream * ss, unsigned char * first, char * item) +{ + if ( !( *first)) + { + ss_fprintf(ss, " "); + } + ss_fprintf(ss, "%s", item); + *first = 0; +} + +unsigned char print_type_specifier_flags(struct osstream * ss, unsigned char * first, int e_type_specifier_flags) +{ + if (e_type_specifier_flags & 1) + { + print_item(ss, first, "void"); + } + if (e_type_specifier_flags & 128) + { + print_item(ss, first, "signed"); + } + if (e_type_specifier_flags & 256) + { + print_item(ss, first, "unsigned"); + } + if (e_type_specifier_flags & 8) + { + print_item(ss, first, "int"); + } + if (e_type_specifier_flags & 4) + { + print_item(ss, first, "short"); + } + if (e_type_specifier_flags & 16) + { + print_item(ss, first, "long"); + } + if (e_type_specifier_flags & 4194304) + { + print_item(ss, first, "long long"); + } + if (e_type_specifier_flags & 524288) + { + print_item(ss, first, "__int16"); + } + if (e_type_specifier_flags & 1048576) + { + print_item(ss, first, "__int32"); + } + if (e_type_specifier_flags & 2097152) + { + print_item(ss, first, "__int64"); + } + if (e_type_specifier_flags & 2) + { + print_item(ss, first, "char"); + } + if (e_type_specifier_flags & 64) + { + print_item(ss, first, "double"); + } + if (e_type_specifier_flags & 32) + { + print_item(ss, first, "float"); + } + if (e_type_specifier_flags & 512) + { + print_item(ss, first, "_Bool"); + } + if (e_type_specifier_flags & 1024) + { + print_item(ss, first, "_Complex"); + } + if (e_type_specifier_flags & 2048) + { + print_item(ss, first, "_Decimal32"); + } + if (e_type_specifier_flags & 4096) + { + print_item(ss, first, "_Decimal64"); + } + if (e_type_specifier_flags & 8192) + { + print_item(ss, first, "_Decimal128"); + } + if (e_type_specifier_flags & 16777216) + { + print_item(ss, first, "nullptr_t"); + } + return *first; +} + +void print_type_qualifier_flags(struct osstream * ss, unsigned char * first, int e_type_qualifier_flags) +{ + if (e_type_qualifier_flags & 1) + { + print_item(ss, first, "const"); + } + if (e_type_qualifier_flags & 2) + { + print_item(ss, first, "restrict"); + } + if (e_type_qualifier_flags & 4) + { + print_item(ss, first, "volatile"); + } + if (e_type_qualifier_flags & 16) + { + print_item(ss, first, "_Owner"); + } + if (e_type_qualifier_flags & 32) + { + print_item(ss, first, "_Obj_owner"); + } + if (e_type_qualifier_flags & 64) + { + print_item(ss, first, "_View"); + } + if (e_type_qualifier_flags & 128) + { + print_item(ss, first, "_Opt"); + } +} + +void print_type_qualifier_specifiers(struct osstream * ss, struct type * type) +{ + unsigned char first = 1; + print_type_qualifier_flags(ss, &first, type->type_qualifier_flags); + if (type->type_specifier_flags & 32768) + { + ; + print_item(ss, &first, "struct "); + ss_fprintf(ss, "%s", type->struct_or_union_specifier->tag_name); + } + else + { + if (type->type_specifier_flags & 65536) + { + ; + print_item(ss, &first, "enum "); + if (type->enum_specifier->tag_token) + { + ss_fprintf(ss, "%s", type->enum_specifier->tag_token->lexeme); + } + } + else + { + if (type->type_specifier_flags & 131072) + { + ; + } + else + { + print_type_specifier_flags(ss, &first, type->type_specifier_flags); + } + } + } +} + +void type_integer_promotion(struct type * a) +{ + if ((a->type_specifier_flags & 512) || (a->type_specifier_flags & 2) || (a->type_specifier_flags & 4) || (a->type_specifier_flags & 262144) || (a->type_specifier_flags & 524288)) + { + a->type_specifier_flags = (8); + } +} + +void type_add_const(struct type * p_type) +{ + p_type->type_qualifier_flags = 1; +} + +void type_remove_qualifiers(struct type * p_type) +{ + p_type->type_qualifier_flags = 0; +} + +int type_get_category(struct type * p_type); +struct type type_add_pointer(struct type * p_type, unsigned char null_checks_enabled); +struct type get_array_item_type(struct type * p_type); +void type_destroy(struct type * p_type); +struct type type_dup(struct type * p_type); + +struct type type_lvalue_conversion(struct type * p_type, unsigned char nullchecks_enabled) +{ + int category = type_get_category(p_type); + switch (category) + { + case 1 : + { + struct type t = type_add_pointer(p_type, nullchecks_enabled); + t.type_qualifier_flags = ~128; + t.storage_class_specifier_flags = ~2048; + t.category = t.category; + return t; + } + break; + case 2 : + { + struct type t = get_array_item_type(p_type); + struct type t2 = type_add_pointer(&t, nullchecks_enabled); + type_remove_qualifiers(&t2); + type_destroy(&t); + t2.storage_class_specifier_flags = ~2048; + return t2; + } + break; + case 3 : + break; + case 0 : + default: + break; + } + struct type t = type_dup(p_type); + type_remove_qualifiers(&t); + t.storage_class_specifier_flags = ~2048; + t.category = type_get_category(&t); + return t; +} + +unsigned char type_is_nullptr_t(struct type * p_type); +struct type make_void_ptr_type(); +char *strdup(char * src); + +struct type type_convert_to(struct type * p_type, int target) +{ + if (target < 0 && type_is_nullptr_t(p_type)) + { + struct type t = make_void_ptr_type(); + ; + if (p_type->name_opt) + { + t.name_opt = strdup(p_type->name_opt); + } + return t; + } + return type_dup(p_type); +} + +void ss_swap(struct osstream * a, struct osstream * b); +void ss_close(struct osstream * stream); +void print_type(struct osstream * ss, struct type * type); + +void print_type_core(struct osstream * ss, struct type * p_type, unsigned char onlydeclarator, unsigned char printname) +{ + struct type * p = p_type; + while (p) + { + if (onlydeclarator && p->next == ((void *)0)) + { + break; + } + switch (p->category) + { + case 0 : + { + struct osstream local = {0}; + unsigned char first = 1; + print_type_qualifier_flags(&local, &first, p->type_qualifier_flags); + if (p->struct_or_union_specifier) + { + ss_fprintf(&local, "struct %s", p->struct_or_union_specifier->tag_name); + } + else + { + if (p->enum_specifier) + { + if (p->enum_specifier->tag_token) + { + ss_fprintf(&local, "enum %s", p->enum_specifier->tag_token->lexeme); + } + else + { + ss_fprintf(&local, "enum "); + } + } + else + { + print_type_specifier_flags(&local, &first, p->type_specifier_flags); + } + } + if (printname && p->name_opt) + { + if (first) + { + ss_fprintf(ss, " "); + first = 0; + } + ss_fprintf(ss, "%s", p->name_opt); + } + struct osstream local2 = {0}; + if (ss->c_str) + { + ss_fprintf(&local2, "%s %s", local.c_str, ss->c_str); + } + else + { + ss_fprintf(&local2, "%s", local.c_str); + } + ss_swap(ss, &local2); + ss_close(&local); + ss_close(&local2); + } + break; + case 2 : + if (printname && p->name_opt) + { + ss_fprintf(ss, "%s", p->name_opt); + } + ss_fprintf(ss, "["); + unsigned char b = 1; + if (p->static_array) + { + ss_fprintf(ss, "static"); + b = 0; + } + print_type_qualifier_flags(ss, &b, p->type_qualifier_flags); + if (p->num_of_elements > 0) + { + if ( !b) + { + ss_fprintf(ss, " "); + } + ss_fprintf(ss, "%d", p->num_of_elements); + } + ss_fprintf(ss, "]"); + break; + case 1 : + if (printname && p->name_opt) + { + ss_fprintf(ss, "%s", p->name_opt); + } + ss_fprintf(ss, "("); + struct param * pa = p->params.head; + while (pa) + { + struct osstream sslocal = {0}; + print_type(&sslocal, &pa->type); + ss_fprintf(ss, "%s", sslocal.c_str); + if (pa->next) + { + ss_fprintf(ss, ","); + } + ss_close(&sslocal); + pa = pa->next; + } + ss_fprintf(ss, ")"); + break; + case 3 : + { + struct osstream local = {0}; + if (p->next && ((p->next->category == 1 || p->next->category == 2))) + { + ss_fprintf(&local, "("); + } + ss_fprintf(&local, "*"); + unsigned char first = 0; + print_type_qualifier_flags(&local, &first, p->type_qualifier_flags); + if (printname && p->name_opt) + { + if ( !first) + { + ss_fprintf(ss, " "); + } + ss_fprintf(ss, "%s", p->name_opt); + first = 0; + } + if (ss->c_str) + { + ss_fprintf(&local, "%s", ss->c_str); + } + if (p->next && (p->next->category == 1 || p->next->category == 2)) + { + ss_fprintf(&local, ")", ss->c_str); + } + ss_swap(ss, &local); + ss_close(&local); + } + break; + } + p = p->next; + } +} + +void print_type(struct osstream * ss, struct type * p_type) +{ + print_type_core(ss, p_type, 0, 1); +} + +void print_type_no_names(struct osstream * ss, struct type * p_type) +{ + print_type_core(ss, p_type, 0, 0); +} + +void print_type_declarator(struct osstream * ss, struct type * p_type) +{ + print_type_core(ss, p_type, 1, 1); +} + + + +int __stdio_common_vfprintf(unsigned __int64 _Options, struct _iobuf * _Stream, char * _Format, struct __crt_locale_pointers * _Locale, char * _ArgList); + +inline unsigned __int64 *__local_stdio_printf_options(void) +{ + static unsigned __int64 _OptionsStorage; + return &_OptionsStorage; +} +inline int _vfprintf_l(struct _iobuf * _Stream, char * _Format, struct __crt_locale_pointers * _Locale, char * _ArgList) +{ + return __stdio_common_vfprintf(( *__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList); +} +struct _iobuf *__acrt_iob_func(unsigned int _Ix); +inline int printf(char * _Format, ...) +{ + int _Result; + char * _ArgList; + ((void)(_ArgList = (char *)(&(_Format)) + ((sizeof (_Format) + sizeof (int) - 1) & ~(sizeof (int) - 1)))); + _Result = _vfprintf_l((__acrt_iob_func(1)), _Format, ((void *)0), _ArgList); + ((void)(_ArgList = (char *)0)); + return _Result; +} + +void type_print(struct type * a) +{ + struct osstream ss = {0}; + print_type(&ss, a); + printf("%s", ss.c_str); + ss_close(&ss); +} + +int puts(char * _Buffer); + +void type_println(struct type * a) +{ + type_print(a); + puts("\n"); +} + +int type_get_category(struct type * p_type) +{ + return p_type->category; +} + +void param_list_add(struct param_list * list, struct param * p_item) +{ + if (list->head == ((void *)0)) + { + list->head = p_item; + } + else + { + ; + ; + list->tail->next = p_item; + } + list->tail = p_item; +} + +void free(void * ptr); + +void param_list_destroy(struct param_list * p) +{ + struct param * item = p->head; + while (item) + { + struct param * next = item->next; + type_destroy(&item->type); + free(item); + item = next; + } +} + +void type_destroy_one(struct type * p_type) +{ + free((void *)p_type->name_opt); + param_list_destroy(&p_type->params); + ; +} + +void type_destroy(struct type * p_type) +{ + free((void *)p_type->name_opt); + param_list_destroy(&p_type->params); + struct type * item = p_type->next; + while (item) + { + struct type * next = item->next; + item->next = ((void *)0); + type_destroy_one(item); + free(item); + item = next; + } +} + +void type_delete(struct type * p_type) +{ + if (p_type) + { + type_destroy(p_type); + free(p_type); + } +} + +struct struct_or_union_specifier *get_complete_struct_or_union_specifier(struct struct_or_union_specifier * p_struct_or_union_specifier); +struct enum_specifier *get_complete_enum_specifier(struct enum_specifier * p_enum_specifier); + +unsigned char type_has_attribute(struct type * p_type, int attributes) +{ + if (p_type->attributes_flags & attributes) + { + return 1; + } + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt = ((void *)0); + if (p_type->struct_or_union_specifier) + { + p_attribute_specifier_sequence_opt = p_type->struct_or_union_specifier->attribute_specifier_sequence_opt; + struct struct_or_union_specifier * p_complete = get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); + if (p_attribute_specifier_sequence_opt == ((void *)0) && p_complete) + { + p_attribute_specifier_sequence_opt = p_complete->attribute_specifier_sequence_opt; + } + } + else + { + if (p_type->enum_specifier) + { + struct enum_specifier * p_complete_enum_specifier = get_complete_enum_specifier(p_type->enum_specifier); + p_attribute_specifier_sequence_opt = p_type->enum_specifier->attribute_specifier_sequence_opt; + if (p_attribute_specifier_sequence_opt == ((void *)0) && p_complete_enum_specifier) + { + p_attribute_specifier_sequence_opt = p_complete_enum_specifier->attribute_specifier_sequence_opt; + } + } + } + if (p_attribute_specifier_sequence_opt && p_attribute_specifier_sequence_opt->attributes_flags & attributes) + { + return 1; + } + return 0; +} + +unsigned char type_is_maybe_unused(struct type * p_type) +{ + return type_has_attribute(p_type, 4); +} + +unsigned char type_is_deprecated(struct type * p_type) +{ + return type_has_attribute(p_type, 1); +} + +unsigned char type_is_nodiscard(struct type * p_type) +{ + return type_has_attribute(p_type, 8); +} + +unsigned char type_is_array(struct type * p_type) +{ + return type_get_category(p_type) == 2; +} + +unsigned char type_is_owner(struct type * p_type); + +unsigned char type_is_any_owner(struct type * p_type) +{ + if (type_is_owner(p_type)) + { + return 1; + } + return p_type->type_qualifier_flags & 32; +} + +unsigned char type_is_pointer_to_owner(struct type * p_type) +{ + if (p_type->next == ((void *)0)) + { + return 0; + } + return type_is_owner(p_type->next); +} + +unsigned char type_is_obj_owner(struct type * p_type) +{ + return p_type->type_qualifier_flags & 32; +} + +unsigned char type_is_owner(struct type * p_type) +{ + if (p_type->struct_or_union_specifier) + { + if (p_type->type_qualifier_flags & 64) + { + return 0; + } + struct struct_or_union_specifier * p_complete = get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); + if (p_complete && p_complete->is_owner) + { + return 1; + } + } + return p_type->type_qualifier_flags & 16; +} + +unsigned char type_is_nullable(struct type * p_type, unsigned char nullable_enabled) +{ + if (nullable_enabled) + { + return p_type->type_qualifier_flags & 128; + } + return 1; +} + +unsigned char type_is_view(struct type * p_type) +{ + return p_type->type_qualifier_flags & 64; +} + +unsigned char type_is_out(struct type * p_type) +{ + return p_type->type_qualifier_flags & 512; +} + +unsigned char type_is_const(struct type * p_type) +{ + return p_type->type_qualifier_flags & 1; +} + +unsigned char type_is_pointer_to_const(struct type * p_type) +{ + if (p_type->category == 3) + { + if (p_type->next) + { + return p_type->next->type_qualifier_flags & 1; + } + } + return 0; +} + +unsigned char type_is_void_ptr(struct type * p_type) +{ + if (p_type->category == 3) + { + if (p_type->next) + { + return p_type->next->type_specifier_flags & 1; + } + } + return 0; +} + +unsigned char type_is_void(struct type * p_type) +{ + if (p_type->category == 0) + { + return p_type->type_specifier_flags & 1; + } + return 0; +} + +unsigned char type_is_nullptr_t(struct type * p_type) +{ + if (p_type->category == 0) + { + return p_type->type_specifier_flags & 16777216; + } + return 0; +} + +unsigned char type_is_pointer_to_out(struct type * p_type) +{ + if (p_type->next == ((void *)0)) + { + return 0; + } + if (p_type->category == 3) + { + return p_type->next->type_qualifier_flags & 512; + } + return 0; +} + +unsigned char type_is_pointer(struct type * p_type) +{ + return p_type->category == 3; +} + +unsigned char type_is_essential_bool(struct type * p_type) +{ + return p_type->attributes_flags & 33554432; +} + +unsigned char type_is_essential_char(struct type * p_type) +{ + return p_type->attributes_flags & 67108864; +} + +unsigned char type_is_enum(struct type * p_type) +{ + return type_get_category(p_type) == 0 && p_type->type_specifier_flags & 65536; +} + +unsigned char type_is_struct_or_union(struct type * p_type) +{ + return type_get_category(p_type) == 0 && p_type->type_specifier_flags & 32768; +} + +unsigned char type_is_union(struct type * p_type) +{ + if (type_get_category(p_type) != 0) + { + return 0; + } + if (p_type->struct_or_union_specifier == ((void *)0)) + { + return 0; + } + return p_type->struct_or_union_specifier->first_token->type == 9038; +} + +unsigned char type_is_character(struct type * p_type) +{ + return type_get_category(p_type) == 0 && p_type->type_specifier_flags & 2; +} + +unsigned char object_has_constant_value(struct object * a); + +unsigned char type_is_vla(struct type * p_type) +{ + struct type * it = p_type; + while (it && type_is_array(it)) + { + if (it->array_num_elements_expression) + { + if ( !object_has_constant_value(&it->array_num_elements_expression->object)) + { + return 1; + } + } + it = it->next; + } + return 0; +} + +unsigned char type_is_decimal128(struct type * p_type) +{ + return type_get_category(p_type) == 0 && p_type->type_specifier_flags & 8192; +} + +unsigned char type_is_decimal64(struct type * p_type) +{ + return type_get_category(p_type) == 0 && p_type->type_specifier_flags & 4096; +} + +unsigned char type_is_decimal32(struct type * p_type) +{ + return type_get_category(p_type) == 0 && p_type->type_specifier_flags & 2048; +} + +unsigned char type_is_long_double(struct type * p_type) +{ + if (type_get_category(p_type) != 0) + { + return 0; + } + if (p_type->type_specifier_flags & 64) + { + if (p_type->type_specifier_flags & 16) + { + return 1; + } + } + return 0; +} + +unsigned char type_is_double(struct type * p_type) +{ + if (type_get_category(p_type) != 0) + { + return 0; + } + if (p_type->type_specifier_flags & 64) + { + if ( !(p_type->type_specifier_flags & 16)) + { + return 1; + } + } + return 0; +} + +unsigned char type_is_int(struct type * p_type) +{ + if (type_get_category(p_type) != 0) + { + return 0; + } + if ((p_type->type_specifier_flags == (8 | 128)) || (p_type->type_specifier_flags == 8)) + { + return 1; + } + return 0; +} + +unsigned char type_is_unsigned_int(struct type * p_type) +{ + if (type_get_category(p_type) != 0) + { + return 0; + } + if (p_type->type_specifier_flags == (8 | 256)) + { + return 1; + } + return 0; +} + +unsigned char type_is_float(struct type * p_type) +{ + if (type_get_category(p_type) != 0) + { + return 0; + } + if (p_type->type_specifier_flags & 32) + { + return 1; + } + return 0; +} + +unsigned char type_is_bool(struct type * p_type) +{ + return type_get_category(p_type) == 0 && p_type->type_specifier_flags & 512; +} + +unsigned char type_is_floating_point(struct type * p_type) +{ + if (type_get_category(p_type) != 0) + { + return 0; + } + return p_type->type_specifier_flags & (64 | 32); +} + +unsigned char type_is_integer(struct type * p_type); + +unsigned char type_is_unsigned_integer(struct type * p_type) +{ + if (type_is_integer(p_type) && (p_type->type_specifier_flags & 256)) + { + return 1; + } + return 0; +} + +unsigned char type_is_signed_integer(struct type * p_type) +{ + if (type_is_integer(p_type) && !(p_type->type_specifier_flags & 256)) + { + return 1; + } + return 0; +} + +unsigned char type_is_array_of_char(struct type * p_type) +{ + if (p_type->category != 2) + { + return 0; + } + return p_type->next->type_specifier_flags & 2; +} + +unsigned char type_is_char(struct type * p_type) +{ + if (type_get_category(p_type) != 0) + { + return 0; + } + return p_type->type_specifier_flags & 2; +} + +unsigned char type_is_integer(struct type * p_type) +{ + if (type_get_category(p_type) != 0) + { + return 0; + } + if (p_type->type_specifier_flags & 64) + { + return 0; + } + if (p_type->type_specifier_flags & 65536) + { + return 1; + } + return p_type->type_specifier_flags & (2 | 4 | 8 | 524288 | 1048576 | 2097152 | 8 | 16 | 128 | 256 | 262144 | 524288 | 2097152 | 4194304 | 512); +} + +unsigned char type_is_arithmetic(struct type * p_type) +{ + return type_is_integer(p_type) || type_is_floating_point(p_type); +} + +unsigned char type_is_scalar(struct type * p_type) +{ + if (type_is_arithmetic(p_type)) + { + return 1; + } + if (type_is_pointer(p_type)) + { + return 1; + } + if (type_get_category(p_type) != 0) + { + return 0; + } + if (p_type->type_specifier_flags & 65536) + { + return 1; + } + if (p_type->type_specifier_flags & 16777216) + { + return 1; + } + if (p_type->type_specifier_flags & 512) + { + return 1; + } + return 0; +} + +struct param_list *type_get_func_or_func_ptr_params(struct type * p_type) +{ + if (p_type->category == 1) + { + return &p_type->params; + } + else + { + if (p_type->category == 3) + { + if (p_type->next && p_type->next->category == 1) + { + return &p_type->next->params; + } + } + } + return ((void *)0); +} + +unsigned char compiler_diagnostic_message(int w, struct parser_ctx * ctx, struct token * p_token, struct marker * p_marker, char * fmt, ...); +unsigned char expression_is_null_pointer_constant(struct expression * expression); +struct type type_remove_pointer(struct type * p_type); + +void check_ownership_qualifiers_of_argument_and_parameter(struct parser_ctx * ctx, struct argument_expression * current_argument, struct type * paramer_type, int param_num) +{ + unsigned char paramer_is_obj_owner = type_is_obj_owner(paramer_type); + unsigned char paramer_is_owner = type_is_owner(paramer_type); + unsigned char paramer_is_view = !paramer_is_obj_owner && !paramer_is_owner; + struct type * argument_type = ¤t_argument->expression->type; + unsigned char argument_is_owner = type_is_owner(¤t_argument->expression->type); + unsigned char argument_is_obj_owner = type_is_obj_owner(¤t_argument->expression->type); + unsigned char argument_is_view = !argument_is_owner && !argument_is_obj_owner; + if (argument_is_owner && paramer_is_owner) + { + } + else + { + if (argument_is_owner && paramer_is_obj_owner) + { + } + else + { + if (argument_is_owner && paramer_is_view) + { + if (current_argument->expression->type.storage_class_specifier_flags & 8192) + { + compiler_diagnostic_message(22, ctx, current_argument->expression->first_token, ((void *)0), "passing a temporary owner to a view"); + } + } + else + { + if (argument_is_obj_owner && paramer_is_owner) + { + compiler_diagnostic_message(23, ctx, current_argument->expression->first_token, ((void *)0), "cannot move _Obj_owner to _Owner"); + } + else + { + if (argument_is_obj_owner && paramer_is_obj_owner) + { + } + else + { + if (argument_is_obj_owner && paramer_is_view) + { + if (current_argument->expression->type.storage_class_specifier_flags & 8192) + { + compiler_diagnostic_message(22, ctx, current_argument->expression->first_token, ((void *)0), "passing a temporary owner to a view"); + } + } + else + { + if (argument_is_view && paramer_is_owner) + { + if ( !expression_is_null_pointer_constant(current_argument->expression)) + { + compiler_diagnostic_message(23, ctx, current_argument->expression->first_token, ((void *)0), "passing a _View argument to a _Owner parameter"); + } + } + else + { + if (argument_is_view && paramer_is_obj_owner) + { + if (type_is_pointer(argument_type)) + { + struct type t2 = type_remove_pointer(argument_type); + if ( !type_is_owner(&t2)) + { + compiler_diagnostic_message(23, ctx, current_argument->expression->first_token, ((void *)0), "pointed object is not _Owner"); + } + else + { + if ( !argument_type->address_of) + { + compiler_diagnostic_message(18, ctx, current_argument->expression->first_token, ((void *)0), "_Obj_owner pointer must be created using address of operator &"); + } + } + type_destroy(&t2); + } + else + { + if ( !expression_is_null_pointer_constant(current_argument->expression)) + { + compiler_diagnostic_message(23, ctx, current_argument->expression->first_token, ((void *)0), "passing a _View argument to a _Obj_owner parameter"); + } + } + } + else + { + if (argument_is_view && paramer_is_view) + { + } + } + } + } + } + } + } + } + } +} + +unsigned char expression_is_subjected_to_lvalue_conversion(struct expression *); +unsigned char type_is_same(struct type * a, struct type * b, unsigned char compare_qualifiers); +unsigned char type_is_pointer_or_array(struct type * p_type); + +void check_argument_and_parameter(struct parser_ctx * ctx, struct argument_expression * current_argument, struct type * paramer_type, int param_num) +{ + if (type_is_any_owner(paramer_type)) + { + if (type_is_obj_owner(paramer_type)) + { + if (current_argument->expression->type.category == 3) + { + if (type_is_pointer(¤t_argument->expression->type) && !type_is_pointer_to_owner(¤t_argument->expression->type)) + { + compiler_diagnostic_message(21, ctx, current_argument->expression->first_token, ((void *)0), "parameter %d requires a pointer to _Owner object", param_num); + } + } + else + { + compiler_diagnostic_message(21, ctx, current_argument->expression->first_token, ((void *)0), "parameter %d requires a pointer to _Owner type", param_num); + } + } + } + struct type * argument_type = ¤t_argument->expression->type; + unsigned char is_null_pointer_constant = expression_is_null_pointer_constant(current_argument->expression); + struct type parameter_type_converted = (type_is_array(paramer_type)) ? type_lvalue_conversion(paramer_type, ctx->options.null_checks_enabled) : type_dup(paramer_type); + struct type argument_type_converted = expression_is_subjected_to_lvalue_conversion(current_argument->expression) ? type_lvalue_conversion(argument_type, ctx->options.null_checks_enabled) : type_dup(argument_type); + if (type_is_enum(argument_type) && type_is_enum(paramer_type)) + { + if ( !type_is_same(argument_type, paramer_type, 0)) + { + compiler_diagnostic_message(950, ctx, current_argument->expression->first_token, ((void *)0), " incompatible types at argument %d", param_num); + } + check_ownership_qualifiers_of_argument_and_parameter(ctx, current_argument, paramer_type, param_num); + type_destroy(¶meter_type_converted); + type_destroy(&argument_type_converted); + return; + } + if (type_is_arithmetic(argument_type) && type_is_arithmetic(paramer_type)) + { + check_ownership_qualifiers_of_argument_and_parameter(ctx, current_argument, paramer_type, param_num); + type_destroy(¶meter_type_converted); + type_destroy(&argument_type_converted); + return; + } + if (is_null_pointer_constant && type_is_pointer(paramer_type)) + { + check_ownership_qualifiers_of_argument_and_parameter(ctx, current_argument, paramer_type, param_num); + type_destroy(¶meter_type_converted); + type_destroy(&argument_type_converted); + return; + } + if (is_null_pointer_constant && type_is_array(paramer_type)) + { + compiler_diagnostic_message(27, ctx, current_argument->expression->first_token, ((void *)0), " passing null as array"); + check_ownership_qualifiers_of_argument_and_parameter(ctx, current_argument, paramer_type, param_num); + type_destroy(¶meter_type_converted); + type_destroy(&argument_type_converted); + return; + } + if (type_is_pointer_or_array(argument_type) && type_is_pointer_or_array(paramer_type)) + { + if (type_is_void_ptr(argument_type)) + { + check_ownership_qualifiers_of_argument_and_parameter(ctx, current_argument, paramer_type, param_num); + type_destroy(¶meter_type_converted); + type_destroy(&argument_type_converted); + return; + } + if (type_is_void_ptr(paramer_type)) + { + check_ownership_qualifiers_of_argument_and_parameter(ctx, current_argument, paramer_type, param_num); + type_destroy(¶meter_type_converted); + type_destroy(&argument_type_converted); + return; + } + if (type_is_array(paramer_type)) + { + int parameter_array_size = paramer_type->num_of_elements; + if (type_is_array(argument_type)) + { + int argument_array_size = argument_type->num_of_elements; + if (parameter_array_size != 0 && argument_array_size < parameter_array_size) + { + compiler_diagnostic_message(1130, ctx, current_argument->expression->first_token, ((void *)0), " 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(argument_type)) + { + compiler_diagnostic_message(38, ctx, current_argument->expression->first_token, ((void *)0), " passing null as array"); + } + } + } + if ( !type_is_same(&argument_type_converted, ¶meter_type_converted, 0)) + { + type_print(&argument_type_converted); + type_print(¶meter_type_converted); + compiler_diagnostic_message(950, ctx, current_argument->expression->first_token, ((void *)0), " incompatible types at argument %d", param_num); + } + if (type_is_pointer(&argument_type_converted) && type_is_pointer(¶meter_type_converted)) + { + struct type argument_pointer_to = type_remove_pointer(&argument_type_converted); + struct type parameter_pointer_to = type_remove_pointer(¶meter_type_converted); + if (type_is_const(&argument_pointer_to) && !type_is_const(¶meter_pointer_to) && !type_is_any_owner(¶meter_pointer_to)) + { + compiler_diagnostic_message(14, ctx, current_argument->expression->first_token, ((void *)0), " discarding const at argument %d", param_num); + } + type_destroy(&argument_pointer_to); + type_destroy(¶meter_pointer_to); + } + } + check_ownership_qualifiers_of_argument_and_parameter(ctx, current_argument, paramer_type, param_num); + type_destroy(&argument_type_converted); + type_destroy(¶meter_type_converted); +} + +unsigned char type_is_function(struct type * p_type) +{ + return type_get_category(p_type) == 1; +} + +unsigned char type_is_function_or_function_pointer(struct type * p_type) +{ + if (type_is_function(p_type)) + { + return 1; + } + if (type_is_pointer(p_type)) + { + struct type t = type_remove_pointer(p_type); + unsigned char r = type_is_function(&t); + type_destroy(&t); + return r; + } + return 0; +} + +unsigned char type_is_empty(struct type * p_type) +{ + return p_type->type_specifier_flags == 0; +} + +void *calloc(int nmemb, unsigned int size); + +struct type type_add_pointer(struct type * p_type, unsigned char null_checks_enabled) +{ + struct type r = type_dup(p_type); + if (1) + { + struct type * p = calloc(1, sizeof (struct type)); + if (p == ((void *)0)) + { + goto _catch_label_1; + } + *p = r; + struct type __cmp_lt_0 = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + r = __cmp_lt_0; + r.next = p; + r.category = 3; + r.storage_class_specifier_flags = p_type->storage_class_specifier_flags; + } + else _catch_label_1: + { + } + return r; +} + +struct type type_remove_pointer(struct type * p_type) +{ + struct type r = type_dup(p_type); + if ( !type_is_pointer(p_type)) + { + return r; + } + if (r.next) + { + struct type next = *r.next; + free(r.next); + r.next = ((void *)0); + type_destroy_one(&r); + r = next; + } + else + { + ; + } + ; + r.storage_class_specifier_flags = p_type->next->storage_class_specifier_flags; + r.type_qualifier_flags = p_type->next->type_qualifier_flags; + return r; +} + +struct type get_array_item_type(struct type * p_type) +{ + struct type r = type_dup(p_type); + if (r.next) + { + struct type r2 = *r.next; + free(r.next); + free((void *)r.name_opt); + param_list_destroy(&r.params); + return r2; + } + return r; +} + +struct type type_param_array_to_pointer(struct type * p_type, unsigned char null_checks_enabled) +{ + ; + struct type t = get_array_item_type(p_type); + struct type t2 = type_add_pointer(&t, null_checks_enabled); + if (p_type->type_qualifier_flags & 1) + { + t2.type_qualifier_flags = 1; + } + type_destroy(&t); + t2.storage_class_specifier_flags = ~2048; + return t2; +} + +unsigned char type_is_pointer_or_array(struct type * p_type) +{ + int category = type_get_category(p_type); + if (category == 3 || category == 2) + { + return 1; + } + if (category == 0 && p_type->type_specifier_flags == 16777216) + { + return 1; + } + return 0; +} + +int type_get_integer_rank(struct type * p_type1) +{ + if (type_is_pointer_or_array(p_type1)) + { + ; + return 40; + } + if ((p_type1->type_specifier_flags & 4194304) || (p_type1->type_specifier_flags & 2097152)) + { + return 80; + } + else + { + if ((p_type1->type_specifier_flags & 16777216)) + { + return 50; + } + else + { + if ((p_type1->type_specifier_flags & 16) || (p_type1->type_specifier_flags & 1048576)) + { + return 50; + } + else + { + if ((p_type1->type_specifier_flags & 8) || (p_type1->type_specifier_flags & 65536)) + { + return 40; + } + else + { + if ((p_type1->type_specifier_flags & 4) || (p_type1->type_specifier_flags & 524288)) + { + return 30; + } + else + { + if ((p_type1->type_specifier_flags & 2) || (p_type1->type_specifier_flags & 262144)) + { + return 20; + } + else + { + if ((p_type1->type_specifier_flags & 512)) + { + return 10; + } + } + } + } + } + } + } + return 0; +} + +struct type type_make_int(); + +struct type type_get_enum_underlying_type(struct type * p) +{ + struct type r = type_make_int(); + return r; +} + +void type_swap(struct type * a, struct type * b); +unsigned int type_get_sizeof(struct type * p_type); + +struct type type_common(struct type * p_type1, struct type * p_type2) +{ + if (type_is_decimal128(p_type1)) + { + return type_dup(p_type1); + } + if (type_is_decimal128(p_type2)) + { + return type_dup(p_type2); + } + if (type_is_decimal64(p_type1)) + { + return type_dup(p_type1); + } + if (type_is_decimal64(p_type2)) + { + return type_dup(p_type2); + } + if (type_is_decimal32(p_type1)) + { + return type_dup(p_type1); + } + if (type_is_decimal32(p_type2)) + { + return type_dup(p_type2); + } + if (type_is_long_double(p_type1)) + { + return type_dup(p_type1); + } + if (type_is_long_double(p_type2)) + { + return type_dup(p_type2); + } + if (type_is_double(p_type1)) + { + return type_dup(p_type1); + } + if (type_is_double(p_type2)) + { + return type_dup(p_type2); + } + if (type_is_float(p_type1)) + { + return type_dup(p_type1); + } + if (type_is_float(p_type2)) + { + return type_dup(p_type2); + } + struct type promoted_a = {0}; + struct type promoted_b = {0}; + if (type_is_enum(p_type1)) + { + promoted_a = type_get_enum_underlying_type(p_type1); + } + else + { + promoted_a = type_dup(p_type1); + } + if (type_is_enum(p_type2)) + { + promoted_b = type_get_enum_underlying_type(p_type2); + } + else + { + promoted_b = type_dup(p_type2); + } + type_integer_promotion(&promoted_a); + type_integer_promotion(&promoted_b); + if (type_is_same(&promoted_a, &promoted_b, 0)) + { + type_destroy(&promoted_b); + return promoted_a; + } + if (type_is_signed_integer(&promoted_a) == type_is_signed_integer(&promoted_b)) + { + if (type_get_integer_rank(&promoted_a) > type_get_integer_rank(&promoted_b)) + { + type_destroy(&promoted_b); + return promoted_a; + } + type_destroy(&promoted_a); + return promoted_b; + } + struct type * p_signed_promoted = type_is_signed_integer(&promoted_a) ? &promoted_a : &promoted_b; + struct type * p_unsigned_promoted = type_is_unsigned_integer(&promoted_a) ? &promoted_a : &promoted_b; + ; + if (type_get_integer_rank(p_unsigned_promoted) >= type_get_integer_rank(p_signed_promoted)) + { + struct type r = {0}; + type_swap(&r, p_unsigned_promoted); + type_destroy(&promoted_a); + type_destroy(&promoted_b); + return r; + } + if (type_get_sizeof(p_signed_promoted) > type_get_sizeof(p_unsigned_promoted)) + { + struct type r = {0}; + type_swap(&r, p_signed_promoted); + type_destroy(&promoted_a); + type_destroy(&promoted_b); + return r; + } + struct type r = {0}; + type_swap(&r, p_signed_promoted); + r.type_specifier_flags = 256; + type_destroy(&promoted_a); + type_destroy(&promoted_b); + return r; +} + +void type_set(struct type * a, struct type * b) +{ + struct type t = type_dup(b); + type_swap(&t, a); + type_destroy(&t); +} + +void type_list_destroy(struct type_list * p_type_list); +void type_list_push_back(struct type_list * books, struct type * new_book); + +struct type type_dup(struct type * p_type) +{ + if (1) + { + struct type_list l = {0}; + struct type * p = p_type; + while (p) + { + struct type * p_new = calloc(1, sizeof (struct type)); + if (p_new == ((void *)0)) + { + type_list_destroy(&l); + goto _catch_label_1; + } + *p_new = *p; + p_new->next = ((void *)0); + if (p->name_opt) + { + p_new->name_opt = strdup(p->name_opt); + } + if (p->category == 1) + { + p_new->params.head = ((void *)0); + p_new->params.tail = ((void *)0); + struct param * p_param = p->params.head; + while (p_param) + { + struct param * p_new_param = calloc(1, sizeof *p_new_param); + if (p_new_param == ((void *)0)) + { + type_list_destroy(&l); + type_delete(p_new); + goto _catch_label_1; + } + p_new_param->type = type_dup(&p_param->type); + param_list_add(&p_new->params, p_new_param); + p_param = p_param->next; + } + } + type_list_push_back(&l, p_new); + p = p->next; + } + if (l.head == ((void *)0)) + { + goto _catch_label_1; + } + struct type r = *l.head; + free(l.head); + return r; + } + else _catch_label_1: + { + } + struct type empty = {0}; + return empty; +} + +unsigned int type_get_alignof(struct type * p_type); + +int get_sizeof_struct(struct struct_or_union_specifier * complete_struct_or_union_specifier) +{ + unsigned char is_union = (complete_struct_or_union_specifier->first_token->type == 9038); + int maxalign = 0; + int size = 0; + struct member_declaration * d = complete_struct_or_union_specifier->member_declaration_list.head; + while (d) + { + if (d->member_declarator_list_opt) + { + struct member_declarator * md = d->member_declarator_list_opt->head; + while (md) + { + int align = 1; + if (md->declarator) + { + align = type_get_alignof(&md->declarator->type); + if (align > maxalign) + { + maxalign = align; + } + if (size % align != 0) + { + size = align - (size % align); + } + int item_size = type_get_sizeof(&md->declarator->type); + if (is_union) + { + if (item_size > size) + { + size = item_size; + } + } + else + { + size = item_size; + } + } + else + { + ; + } + md = md->next; + } + } + else + { + if (d->specifier_qualifier_list) + { + if (d->specifier_qualifier_list->struct_or_union_specifier) + { + struct type t = {0}; + t.category = 0; + t.struct_or_union_specifier = d->specifier_qualifier_list->struct_or_union_specifier; + t.type_specifier_flags = 32768; + int align = type_get_alignof(&t); + if (align > maxalign) + { + maxalign = align; + } + if (size % align != 0) + { + size = align - (size % align); + } + int item_size = type_get_sizeof(&t); + if (is_union) + { + if (item_size > size) + { + size = item_size; + } + } + else + { + size = item_size; + } + type_destroy(&t); + } + else + { + ; + } + } + } + d = d->next; + } + if (maxalign != 0) + { + if (size % maxalign != 0) + { + size = maxalign - (size % maxalign); + } + } + else + { + ; + } + return size; +} + +unsigned int get_alignof_struct(struct struct_or_union_specifier * complete_struct_or_union_specifier) +{ + int align = 0; + struct member_declaration * d = complete_struct_or_union_specifier->member_declaration_list.head; + while (d) + { + if (d->member_declarator_list_opt) + { + struct member_declarator * md = d->member_declarator_list_opt->head; + while (md) + { + if (md->declarator) + { + int temp_align = type_get_alignof(&md->declarator->type); + if (temp_align > align) + { + align = temp_align; + } + } + else + { + ; + } + md = md->next; + } + } + else + { + if (d->specifier_qualifier_list) + { + struct type type = {0}; + type.type_specifier_flags = d->specifier_qualifier_list->type_specifier_flags; + type.enum_specifier = d->specifier_qualifier_list->enum_specifier; + type.struct_or_union_specifier = d->specifier_qualifier_list->struct_or_union_specifier; + int temp_align = type_get_alignof(&type); + if (temp_align > align) + { + align = temp_align; + } + type_destroy(&type); + } + else + { + } + } + d = d->next; + } + ; + return align; +} + +unsigned int type_get_alignof(struct type * p_type) +{ + int align = 0; + int category = type_get_category(p_type); + if (category == 3) + { + align = 4U; + } + else + { + if (category == 1) + { + align = -1; + } + else + { + if (category == 0) + { + if (p_type->type_specifier_flags & 2) + { + align = 1U; + } + else + { + if (p_type->type_specifier_flags & 512) + { + align = 1U; + } + else + { + if (p_type->type_specifier_flags & 4) + { + align = 2U; + } + else + { + if (p_type->type_specifier_flags & 65536) + { + align = 4U; + } + else + { + if (p_type->type_specifier_flags & 16) + { + align = 4U; + } + else + { + if (p_type->type_specifier_flags & 4194304) + { + align = 8U; + } + else + { + if (p_type->type_specifier_flags & 8) + { + align = 4U; + } + else + { + if (p_type->type_specifier_flags & 2097152) + { + align = 8U; + } + else + { + if (p_type->type_specifier_flags & 1048576) + { + align = 4U; + } + else + { + if (p_type->type_specifier_flags & 524288) + { + align = 2U; + } + else + { + if (p_type->type_specifier_flags & 262144) + { + align = 1U; + } + else + { + if (p_type->type_specifier_flags & 32) + { + align = 4U; + } + else + { + if (p_type->type_specifier_flags & 64) + { + align = 8U; + } + else + { + if (p_type->type_specifier_flags & 32768) + { + if (p_type->struct_or_union_specifier) + { + struct struct_or_union_specifier * p_complete = get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); + align = 1; + if (p_complete) + { + align = get_alignof_struct(p_complete); + } + else + { + align = -2; + } + } + else + { + align = -2; + ; + } + } + else + { + if (p_type->type_specifier_flags & 65536) + { + align = 4U; + } + else + { + if (p_type->type_specifier_flags == 0) + { + align = -3; + } + else + { + if (p_type->type_specifier_flags == 1) + { + align = 1; + } + else + { + ; + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + } + else + { + if (category == 2) + { + struct type type = get_array_item_type(p_type); + align = type_get_alignof(&type); + type_destroy(&type); + } + } + } + } + ; + return align; +} + +unsigned int type_get_sizeof(struct type * p_type) +{ + int category = type_get_category(p_type); + if (category == 3) + { + return (int)sizeof (void *); + } + if (category == 1) + { + return (unsigned int) -1; + } + if (category == 2) + { + if (p_type->storage_class_specifier_flags & 2048) + { + return sizeof (void *); + } + else + { + if (type_is_vla(p_type)) + { + return (unsigned int) -3; + } + int arraysize = p_type->num_of_elements; + struct type type = get_array_item_type(p_type); + int sz = type_get_sizeof(&type); + int size = sz * arraysize; + type_destroy(&type); + return size; + } + } + ; + if (p_type->type_specifier_flags & 2) + { + return (int)sizeof (char); + } + if (p_type->type_specifier_flags & 512) + { + return (int)sizeof (unsigned char ); + } + if (p_type->type_specifier_flags & 4) + { + return (int)sizeof (short); + } + if (p_type->type_specifier_flags & 65536) + { + return (int)sizeof (int); + } + if (p_type->type_specifier_flags & 16) + { + return (int)sizeof (long); + } + if (p_type->type_specifier_flags & 4194304) + { + return (int)sizeof (long long); + } + if (p_type->type_specifier_flags & 8) + { + return (int)sizeof (int); + } + if (p_type->type_specifier_flags & 2097152) + { + return (int)sizeof (long long); + } + if (p_type->type_specifier_flags & 1048576) + { + return 4; + } + if (p_type->type_specifier_flags & 524288) + { + return 2; + } + if (p_type->type_specifier_flags & 262144) + { + return 1; + } + if (p_type->type_specifier_flags & 32) + { + return (int)sizeof (float); + } + if (p_type->type_specifier_flags & 64) + { + return (int)sizeof (double); + } + if (p_type->type_specifier_flags & 32768) + { + if (p_type->struct_or_union_specifier == ((void *)0)) + { + return (unsigned int) -2; + } + struct struct_or_union_specifier * p_complete = get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); + if (p_complete == ((void *)0)) + { + return (unsigned int) -2; + } + return get_sizeof_struct(p_complete); + } + if (p_type->type_specifier_flags & 65536) + { + return (int)sizeof (int); + } + if (p_type->type_specifier_flags == 0) + { + return (unsigned int) -3; + } + if (p_type->type_specifier_flags == 1) + { + return 1; + } + if (p_type->type_specifier_flags == 16777216) + { + return sizeof (void *); + } + if (p_type->type_specifier_flags == 2048) + { + return 4; + } + if (p_type->type_specifier_flags == 4096) + { + return 8; + } + if (p_type->type_specifier_flags == 8192) + { + return 16; + } + ; + return (unsigned int) -1; +} + +void type_set_attributes(struct type * p_type, struct declarator * pdeclarator) +{ + if (pdeclarator->declaration_specifiers) + { + p_type->attributes_flags = pdeclarator->declaration_specifiers->attributes_flags; + } + else + { + if (pdeclarator->specifier_qualifier_list) + { + } + } +} + +struct type get_function_return_type(struct type * p_type) +{ + if (1) + { + if (p_type->next == ((void *)0)) + { + goto _catch_label_1; + } + if (type_is_pointer(p_type)) + { + if (p_type->next->next == ((void *)0)) + { + goto _catch_label_1; + } + struct type r = type_dup(p_type->next->next); + return r; + } + struct type r = type_dup(p_type->next); + return r; + } + else _catch_label_1: + { + } + struct type empty = {0}; + return empty; +} + +void type_set_int(struct type * p_type) +{ + p_type->type_specifier_flags = 8; + p_type->type_qualifier_flags = 0; + p_type->category = 0; +} + +struct type type_make_enumerator(struct enum_specifier * enum_specifier) +{ + struct type t = {0}; + t.type_specifier_flags = 65536; + t.enum_specifier = enum_specifier; + t.category = 0; + return t; +} + +struct type type_get_enum_type(struct type * p_type) +{ + if (1) + { + if (p_type->enum_specifier == ((void *)0)) + { + goto _catch_label_1; + } + struct enum_specifier * p_complete_enum_specifier = get_complete_enum_specifier(p_type->enum_specifier); + if (p_complete_enum_specifier && p_complete_enum_specifier->specifier_qualifier_list) + { + struct type t = {0}; + t.type_qualifier_flags = p_complete_enum_specifier->specifier_qualifier_list->type_qualifier_flags; + t.type_specifier_flags = p_complete_enum_specifier->specifier_qualifier_list->type_specifier_flags; + return t; + } + struct type t = {0}; + t.type_specifier_flags = 8; + return t; + } + else _catch_label_1: + { + } + struct type empty = {0}; + return empty; +} + +struct type type_make_long_double() +{ + struct type t = {0}; + t.type_specifier_flags = 16 | 64; + t.category = 0; + return t; +} + +struct type type_make_double() +{ + struct type t = {0}; + t.type_specifier_flags = 64; + t.category = 0; + return t; +} + +struct type type_make_float() +{ + struct type t = {0}; + t.type_specifier_flags = 32; + t.category = 0; + return t; +} + +struct type type_make_size_t() +{ + struct type t = {0}; + t.type_specifier_flags = 256 | 8; + t.category = 0; + return t; +} + +struct type make_void_ptr_type() +{ + struct type t = {0}; + if (1) + { + struct type * p = calloc(1, sizeof *p); + if (p == ((void *)0)) + { + goto _catch_label_1; + } + t.category = 3; + p->category = 0; + p->type_specifier_flags = 1; + t.next = p; + } + else _catch_label_1: + { + } + return t; +} + +struct type make_void_type() +{ + struct type t = {0}; + t.type_specifier_flags = 1; + t.category = 0; + return t; +} + +struct type type_make_int_bool_like() +{ + struct type t = {0}; + t.type_specifier_flags = 8; + t.attributes_flags = 33554432; + t.category = 0; + return t; +} + +struct type make_size_t_type() +{ + struct type t = {0}; + t.type_specifier_flags = (256 | 8); + t.category = 0; + return t; +} + +struct type type_make_int() +{ + struct type t = {0}; + t.type_specifier_flags = 8; + t.category = 0; + return t; +} + +struct type type_make_literal_string(int size_in_bytes, int chartype) +{ + struct type t = {0}; + if (1) + { + struct type * p2 = calloc(1, sizeof (struct type)); + if (p2 == ((void *)0)) + { + goto _catch_label_1; + } + struct type char_type = {0}; + char_type.category = 0; + char_type.type_specifier_flags = chartype; + int char_size = type_get_sizeof(&char_type); + if (char_size == 0) + { + char_size = 1; + } + type_destroy(&char_type); + t.category = 2; + t.num_of_elements = size_in_bytes / char_size; + p2->category = 0; + p2->type_specifier_flags = chartype; + t.next = p2; + } + else _catch_label_1: + { + } + return t; +} + +int strcmp(char * _Str1, char * _Str2); + +unsigned char struct_or_union_specifier_is_same(struct struct_or_union_specifier * a, struct struct_or_union_specifier * b) +{ + if (a && b) + { + struct struct_or_union_specifier * p_complete_a = get_complete_struct_or_union_specifier(a); + struct struct_or_union_specifier * p_complete_b = get_complete_struct_or_union_specifier(b); + if (p_complete_a != ((void *)0) && p_complete_b != ((void *)0)) + { + if (p_complete_a != p_complete_b) + { + return 0; + } + return 1; + } + else + { + if (a->tagtoken != ((void *)0) && b->tagtoken != ((void *)0)) + { + if (strcmp(a->tagtoken->lexeme, b->tagtoken->lexeme) == 0) + { + return 1; + } + } + } + return p_complete_a == ((void *)0) && p_complete_b == ((void *)0); + } + return a == ((void *)0) && b == ((void *)0); +} + +unsigned char enum_specifier_is_same(struct enum_specifier * a, struct enum_specifier * b) +{ + if (a && b) + { + if (get_complete_enum_specifier(a) && get_complete_enum_specifier(b)) + { + if (get_complete_enum_specifier(a) != get_complete_enum_specifier(b)) + { + return 0; + } + return 1; + } + return get_complete_enum_specifier(a) == ((void *)0) && get_complete_enum_specifier(b) == ((void *)0); + } + return a == ((void *)0) && b == ((void *)0); +} + +unsigned char type_is_same(struct type * a, struct type * b, unsigned char compare_qualifiers) +{ + struct type * pa = a; + struct type * pb = b; + while (pa && pb) + { + if (pa->num_of_elements != pb->num_of_elements) + { + return 0; + } + if (pa->category != pb->category) + { + return 0; + } + if (pa->enum_specifier && pb->enum_specifier && get_complete_enum_specifier(pa->enum_specifier) != get_complete_enum_specifier(pb->enum_specifier)) + { + return 0; + } + if (pa->enum_specifier && !pb->enum_specifier) + { + } + if ( !pa->enum_specifier && pb->enum_specifier) + { + } + if (pa->static_array != pb->static_array) + { + return 0; + } + if (pa->category == 1) + { + if (pa->params.is_var_args != pb->params.is_var_args) + { + return 0; + } + if (pa->params.is_void != pb->params.is_void) + { + return 0; + } + struct param * p_param_a = pa->params.head; + struct param * p_param_b = pb->params.head; + while (p_param_a && p_param_b) + { + if ( !type_is_same(&p_param_a->type, &p_param_b->type, 1)) + { + return 0; + } + p_param_a = p_param_a->next; + p_param_b = p_param_b->next; + } + return p_param_a == ((void *)0) && p_param_b == ((void *)0); + } + if (pa->struct_or_union_specifier && pb->struct_or_union_specifier) + { + if (pa->struct_or_union_specifier->complete_struct_or_union_specifier_indirection != pb->struct_or_union_specifier->complete_struct_or_union_specifier_indirection) + { + } + if (strcmp(pa->struct_or_union_specifier->tag_name, pb->struct_or_union_specifier->tag_name) != 0) + { + return 0; + } + } + if (compare_qualifiers && pa->type_qualifier_flags != pb->type_qualifier_flags) + { + return 0; + } + if (pa->type_specifier_flags != pb->type_specifier_flags) + { + return 0; + } + pa = pa->next; + pb = pb->next; + } + return pa == ((void *)0) && pb == ((void *)0); +} + +void type_clear(struct type * a) +{ + struct type tmp = {0}; + type_swap(&tmp, a); + type_destroy(&tmp); +} + +void type_swap(struct type * a, struct type * b) +{ + struct type temp = *a; + *a = *b; + *b = temp; +} + +void type_visit_to_mark_anonymous(struct type * p_type) +{ + if (p_type->struct_or_union_specifier != ((void *)0) && p_type->struct_or_union_specifier->has_anonymous_tag) + { + if (p_type->struct_or_union_specifier->complete_struct_or_union_specifier_indirection) + { + p_type->struct_or_union_specifier->complete_struct_or_union_specifier_indirection->show_anonymous_tag = 1; + } + p_type->struct_or_union_specifier->show_anonymous_tag = 1; + } +} + +void type_merge_qualifiers_using_declarator(struct type * p_type, struct declarator * pdeclarator) +{ + int type_qualifier_flags = 0; + if (pdeclarator->declaration_specifiers) + { + type_qualifier_flags = pdeclarator->declaration_specifiers->type_qualifier_flags; + } + else + { + if (pdeclarator->specifier_qualifier_list) + { + type_qualifier_flags = pdeclarator->specifier_qualifier_list->type_qualifier_flags; + } + } + p_type->type_qualifier_flags = type_qualifier_flags; +} + +void type_set_qualifiers_using_declarator(struct type * p_type, struct declarator * pdeclarator) +{ + int type_qualifier_flags = 0; + if (pdeclarator->declaration_specifiers) + { + type_qualifier_flags = pdeclarator->declaration_specifiers->type_qualifier_flags; + } + else + { + if (pdeclarator->specifier_qualifier_list) + { + type_qualifier_flags = pdeclarator->specifier_qualifier_list->type_qualifier_flags; + } + } + p_type->type_qualifier_flags = type_qualifier_flags; +} + +void type_set_storage_specifiers_using_declarator(struct type * p_type, struct declarator * pdeclarator) +{ + if (pdeclarator->declaration_specifiers) + { + p_type->storage_class_specifier_flags = pdeclarator->declaration_specifiers->storage_class_specifier_flags; + } + else + { + } +} + +void type_set_specifiers_using_declarator(struct type * p_type, struct declarator * pdeclarator) +{ + if (pdeclarator->declaration_specifiers) + { + p_type->type_specifier_flags = pdeclarator->declaration_specifiers->type_specifier_flags; + p_type->enum_specifier = pdeclarator->declaration_specifiers->enum_specifier; + p_type->struct_or_union_specifier = pdeclarator->declaration_specifiers->struct_or_union_specifier; + } + else + { + if (pdeclarator->specifier_qualifier_list) + { + p_type->type_specifier_flags = pdeclarator->specifier_qualifier_list->type_specifier_flags; + p_type->enum_specifier = pdeclarator->specifier_qualifier_list->enum_specifier; + p_type->struct_or_union_specifier = pdeclarator->specifier_qualifier_list->struct_or_union_specifier; + } + } +} + +void type_set_attributes_using_declarator(struct type * p_type, struct declarator * pdeclarator) +{ + if (pdeclarator->declaration_specifiers) + { + if (pdeclarator->declaration_specifiers->attributes_flags & 8) + { + p_type->storage_class_specifier_flags = 16384; + } + p_type->attributes_flags = pdeclarator->declaration_specifiers->attributes_flags; + } + else + { + if (pdeclarator->specifier_qualifier_list) + { + } + } +} + +void type_list_push_front(struct type_list * books, struct type * new_book) +{ + ; + if (books->head == ((void *)0)) + { + books->head = new_book; + books->tail = new_book; + } + else + { + new_book->next = books->head; + books->head = new_book; + } +} + +void type_list_destroy(struct type_list * p_type_list) +{ + struct type * item = p_type_list->head; + while (item) + { + struct type * next = item->next; + item->next = ((void *)0); + type_destroy_one(item); + free(item); + item = next; + } +} + +void type_list_push_back(struct type_list * type_list, struct type * new_book) +{ + if (type_list->tail == ((void *)0)) + { + ; + type_list->head = new_book; + } + else + { + ; + type_list->tail->next = new_book; + } + type_list->tail = new_book; +} + +void make_type_using_declarator_core(struct parser_ctx * ctx, struct declarator * pdeclarator, char ** ppname, struct type_list * list); +unsigned long long array_declarator_get_size(struct array_declarator * p_array_declarator); + +void make_type_using_direct_declarator(struct parser_ctx * ctx, struct direct_declarator * pdirectdeclarator, char ** ppname, struct type_list * list) +{ + if (1) + { + if (pdirectdeclarator->declarator) + { + make_type_using_declarator_core(ctx, pdirectdeclarator->declarator, ppname, list); + } + else + { + if (pdirectdeclarator->function_declarator) + { + if (pdirectdeclarator->function_declarator->direct_declarator) + { + make_type_using_direct_declarator(ctx, pdirectdeclarator->function_declarator->direct_declarator, ppname, list); + } + struct type * p_func = calloc(1, sizeof (struct type)); + if (p_func == ((void *)0)) + { + goto _catch_label_1; + } + p_func->category = 1; + if (pdirectdeclarator->function_declarator->parameter_type_list_opt && pdirectdeclarator->function_declarator->parameter_type_list_opt->parameter_list) + { + struct parameter_declaration * p = pdirectdeclarator->function_declarator->parameter_type_list_opt->parameter_list->head; + p_func->params.is_var_args = pdirectdeclarator->function_declarator->parameter_type_list_opt->is_var_args; + p_func->params.is_void = pdirectdeclarator->function_declarator->parameter_type_list_opt->is_void; + while (p) + { + if (p->declarator == ((void *)0)) + { + type_delete(p_func); + goto _catch_label_1; + } + struct param * p_new_param = calloc(1, sizeof (struct param)); + if (p_new_param == ((void *)0)) + { + type_delete(p_func); + goto _catch_label_1; + } + p_new_param->type = type_dup(&p->declarator->type); + param_list_add(&p_func->params, p_new_param); + p = p->next; + } + } + type_list_push_back(list, p_func); + } + else + { + if (pdirectdeclarator->array_declarator) + { + if (pdirectdeclarator->array_declarator->direct_declarator) + { + make_type_using_direct_declarator(ctx, pdirectdeclarator->array_declarator->direct_declarator, ppname, list); + } + struct type * p = calloc(1, sizeof (struct type)); + if (p == ((void *)0)) + { + goto _catch_label_1; + } + p->category = 2; + p->num_of_elements = (int)array_declarator_get_size(pdirectdeclarator->array_declarator); + p->array_num_elements_expression = pdirectdeclarator->array_declarator->assignment_expression; + if (pdirectdeclarator->array_declarator->static_token_opt) + { + p->static_array = 1; + } + if (pdirectdeclarator->array_declarator->type_qualifier_list_opt) + { + p->type_qualifier_flags = pdirectdeclarator->array_declarator->type_qualifier_list_opt->flags; + } + type_list_push_back(list, p); + } + } + } + if (pdirectdeclarator->name_opt) + { + *ppname = pdirectdeclarator->name_opt->lexeme; + } + } + else _catch_label_1: + { + } +} + +void make_type_using_declarator_core(struct parser_ctx * ctx, struct declarator * pdeclarator, char ** ppname, struct type_list * list) +{ + if (1) + { + struct type_list pointers = {0}; + struct pointer * pointer = pdeclarator->pointer; + while (pointer) + { + struct type * p_flat = calloc(1, sizeof (struct type)); + if (p_flat == ((void *)0)) + { + type_list_destroy(&pointers); + goto _catch_label_1; + } + if (pointer->type_qualifier_list_opt) + { + p_flat->type_qualifier_flags = pointer->type_qualifier_list_opt->flags; + } + if (pointer->attribute_specifier_sequence_opt) + { + p_flat->attributes_flags = pointer->attribute_specifier_sequence_opt->attributes_flags; + } + p_flat->category = 3; + type_list_push_front(&pointers, p_flat); + pointer = pointer->pointer; + } + if (pdeclarator->direct_declarator) + { + make_type_using_direct_declarator(ctx, pdeclarator->direct_declarator, ppname, list); + if (list->head && list->head->category == 1) + { + if (pointers.head) + { + pointers.head->storage_class_specifier_flags = 8192; + } + } + } + while (pointers.head) + { + struct type * p = pointers.head; + pointers.head = p->next; + p->next = ((void *)0); + type_list_push_back(list, p); + } + } + else _catch_label_1: + { + } +} + +struct enum_specifier *declarator_get_enum_specifier(struct declarator * pdeclarator) +{ + if (pdeclarator->declaration_specifiers && pdeclarator->declaration_specifiers->enum_specifier) + { + return pdeclarator->declaration_specifiers->enum_specifier; + } + if (pdeclarator->specifier_qualifier_list && pdeclarator->specifier_qualifier_list->enum_specifier) + { + return pdeclarator->specifier_qualifier_list->enum_specifier; + } + return ((void *)0); +} + +struct struct_or_union_specifier *declarator_get_struct_or_union_specifier(struct declarator * pdeclarator) +{ + if (pdeclarator->declaration_specifiers && pdeclarator->declaration_specifiers->struct_or_union_specifier) + { + return pdeclarator->declaration_specifiers->struct_or_union_specifier; + } + if (pdeclarator->specifier_qualifier_list && pdeclarator->specifier_qualifier_list->struct_or_union_specifier) + { + return pdeclarator->specifier_qualifier_list->struct_or_union_specifier; + } + return ((void *)0); +} + +struct typeof_specifier *declarator_get_typeof_specifier(struct declarator * pdeclarator) +{ + if (pdeclarator->declaration_specifiers) + { + return pdeclarator->declaration_specifiers->typeof_specifier; + } + else + { + if (pdeclarator->specifier_qualifier_list) + { + return pdeclarator->specifier_qualifier_list->typeof_specifier; + } + } + return ((void *)0); +} + +struct declarator *declarator_get_typedef_declarator(struct declarator * pdeclarator) +{ + if (pdeclarator->declaration_specifiers) + { + return pdeclarator->declaration_specifiers->typedef_declarator; + } + else + { + if (pdeclarator->specifier_qualifier_list) + { + return pdeclarator->specifier_qualifier_list->typedef_declarator; + } + } + return ((void *)0); +} + +struct type make_type_using_declarator(struct parser_ctx * ctx, struct declarator * pdeclarator) +{ + if (1) + { + struct type_list list = {0}; + char * name = ((void *)0); + make_type_using_declarator_core(ctx, pdeclarator, &name, &list); + if (declarator_get_typeof_specifier(pdeclarator)) + { + struct type * p_nt = calloc(1, sizeof (struct type)); + if (p_nt == ((void *)0)) + { + type_list_destroy(&list); + goto _catch_label_1; + } + struct type nt = type_dup(&declarator_get_typeof_specifier(pdeclarator)->type); + *p_nt = nt; + if (list.head != ((void *)0)) + { + type_set_qualifiers_using_declarator(list.head, pdeclarator); + } + if (list.tail) + { + ; + list.tail->next = p_nt; + } + else + { + type_list_push_back(&list, p_nt); + } + } + else + { + if (declarator_get_typedef_declarator(pdeclarator)) + { + struct declarator * p_typedef_declarator = declarator_get_typedef_declarator(pdeclarator); + if (p_typedef_declarator == ((void *)0)) + { + type_list_destroy(&list); + goto _catch_label_1; + } + struct type nt = type_dup(&p_typedef_declarator->type); + struct type * p_nt = calloc(1, sizeof (struct type)); + if (p_nt == ((void *)0)) + { + type_list_destroy(&list); + type_destroy(&nt); + goto _catch_label_1; + } + *p_nt = nt; + type_merge_qualifiers_using_declarator(p_nt, pdeclarator); + if (list.tail) + { + ; + list.tail->next = p_nt; + } + else + { + type_list_push_back(&list, p_nt); + } + } + else + { + struct type * p = calloc(1, sizeof (struct type)); + if (p == ((void *)0)) + { + type_list_destroy(&list); + goto _catch_label_1; + } + p->category = 0; + type_set_specifiers_using_declarator(p, pdeclarator); + type_set_attributes_using_declarator(p, pdeclarator); + type_set_qualifiers_using_declarator(p, pdeclarator); + if (list.tail && list.tail->category == 1) + { + p->storage_class_specifier_flags = 8192; + } + type_list_push_back(&list, p); + if (list.head) + { + type_set_storage_specifiers_using_declarator(list.head, pdeclarator); + } + } + } + if (list.head == ((void *)0)) + { + goto _catch_label_1; + } + if (pdeclarator->name_opt) + { + char * temp = strdup(pdeclarator->name_opt->lexeme); + if (temp == ((void *)0)) + { + type_list_destroy(&list); + goto _catch_label_1; + } + free((void *)list.head->name_opt); + list.head->name_opt = temp; + } + struct type r = *list.head; + free(list.head); + type_set_storage_specifiers_using_declarator(&r, pdeclarator); + return r; + } + else _catch_label_1: + { + } + struct type empty = {0}; + return empty; +} + +void type_remove_names(struct type * p_type) +{ + struct type * p = p_type; + while (p) + { + if (p->name_opt) + { + free((void *)p->name_opt); + p->name_opt = ((void *)0); + } + p = p->next; + } +} + +struct type *type_get_specifer_part(struct type * p_type) +{ + struct type * p = p_type; + while (p->next) + p = p->next; + return p; +} + diff --git a/out/src/visit_defer.c b/out/src/visit_defer.c new file mode 100644 index 0000000..90be647 --- /dev/null +++ b/out/src/visit_defer.c @@ -0,0 +1,1689 @@ +struct init_declarator_list { + struct init_declarator * head; + struct init_declarator * tail; +}; + +struct simple_declaration { + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt; + struct declaration_specifiers * p_declaration_specifiers; + struct init_declarator_list init_declarator_list; + struct token * first_token; + struct token * last_token; +}; + +struct labeled_statement { + struct label * label; + struct statement * statement; +}; + +struct flow_objects_view { + struct flow_object ** data; + int size; + int capacity; +}; + +struct flow_object_state { + char * dbg_name; + int state_number; + struct flow_object * pointed; + int state; + struct flow_objects_view alternatives; + struct flow_object_state * next; +}; + +struct flow_object { + unsigned int visit_number; + struct flow_object * parent; + struct declarator * p_declarator_origin; + struct expression * p_expression_origin; + struct flow_objects_view members; + struct flow_object_state current; + int id; + unsigned char is_temporary; +}; + +struct balanced_token { + struct token * token; + struct balanced_token * next; +}; + +struct init_declarator { + unsigned char has_shared_ownership; + struct declarator * p_declarator; + struct initializer * initializer; + struct init_declarator * next; +}; + +struct param_list { + unsigned char is_var_args; + unsigned char is_void; + struct param * head; + struct param * tail; +}; + +struct defer_list { + struct defer_list_item * head; + struct defer_list_item * tail; +}; + +struct declaration { + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt; + struct static_assert_declaration * static_assert_declaration; + struct pragma_declaration * pragma_declaration; + struct declaration_specifiers * declaration_specifiers; + struct init_declarator_list init_declarator_list; + struct compound_statement * function_body; + struct defer_list defer_list; + struct declarator * contract_declarator; + struct token * first_token; + struct token * last_token; + struct declaration * next; +}; + +struct attribute { + int attributes_flags; + struct attribute_token * attribute_token; + struct attribute_argument_clause * attribute_argument_clause; + struct attribute * next; +}; + +struct atomic_type_specifier { + struct token * token; + struct type_name * type_name; +}; + +struct designation { + struct designator_list * designator_list; + struct token * token; +}; + +struct direct_declarator { + struct token * name_opt; + struct declarator * declarator; + struct array_declarator * array_declarator; + struct function_declarator * function_declarator; + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt; +}; + +struct attribute_specifier_sequence { + struct token * first_token; + struct token * last_token; + int attributes_flags; + struct attribute_specifier * head; + struct attribute_specifier * tail; +}; + +struct switch_value_list { + struct switch_value * head; + struct switch_value * tail; + struct switch_value * p_default; +}; + +struct selection_statement { + struct init_statement * p_init_statement; + struct condition * condition; + struct secondary_block * secondary_block; + struct secondary_block * else_secondary_block_opt; + struct token * open_parentesis_token; + struct token * close_parentesis_token; + struct token * first_token; + struct token * last_token; + struct token * else_token_opt; + struct defer_list defer_list; +}; + +struct macro; +struct type { + int category; + int attributes_flags; + int type_specifier_flags; + int type_qualifier_flags; + int storage_class_specifier_flags; + char * name_opt; + struct struct_or_union_specifier * struct_or_union_specifier; + struct enum_specifier * enum_specifier; + struct expression * array_num_elements_expression; + int num_of_elements; + unsigned char static_array; + unsigned char address_of; + struct param_list params; + struct type * next; +}; + +struct generic_assoc_list { + struct generic_association * head; + struct generic_association * tail; +}; + +struct declaration_specifiers { + int attributes_flags; + int type_specifier_flags; + int type_qualifier_flags; + int storage_class_specifier_flags; + int function_specifier_flags; + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt; + struct struct_or_union_specifier * struct_or_union_specifier; + struct enum_specifier * enum_specifier; + struct declarator * typedef_declarator; + struct typeof_specifier * typeof_specifier; + struct token * first_token; + struct token * last_token; + struct declaration_specifier * head; + struct declaration_specifier * tail; +}; + +struct try_statement { + struct secondary_block * secondary_block; + struct secondary_block * catch_secondary_block_opt; + struct token * first_token; + struct token * last_token; + struct token * catch_token_opt; + int try_catch_block_index; +}; + +struct type_specifier { + int flags; + struct token * token; + struct struct_or_union_specifier * struct_or_union_specifier; + struct typeof_specifier * typeof_specifier; + struct enum_specifier * enum_specifier; + struct declarator * typedef_declarator; + struct atomic_type_specifier * atomic_type_specifier; +}; + +struct switch_value { + long long value; + struct label * p_label; + struct switch_value * next; +}; + +struct type_specifier_qualifier { + struct type_specifier * type_specifier; + struct type_qualifier * type_qualifier; + struct alignment_specifier * alignment_specifier; + struct type_specifier_qualifier * next; +}; + +struct member_declarator_list { + struct member_declarator * head; + struct member_declarator * tail; +}; + +struct pointer { + struct attribute_specifier_sequence * attribute_specifier_sequence_opt; + struct type_qualifier_list * type_qualifier_list_opt; + struct pointer * pointer; +}; + +struct block_item { + struct token * first_token; + struct declaration * declaration; + struct unlabeled_statement * unlabeled_statement; + struct label * label; + struct block_item * next; +}; + +struct generic_selection { + struct expression * expression; + struct type_name * type_name; + struct expression * p_view_selected_expression; + struct generic_assoc_list generic_assoc_list; + struct token * first_token; + struct token * last_token; +}; + +struct diagnostic { + unsigned long long errors; + unsigned long long warnings; + unsigned long long notes; +}; + +struct diagnostic_stack { + int top_index; + struct diagnostic stack[10]; +}; + +struct options { + int input; + int target; + struct diagnostic_stack diagnostic_stack; + int style; + unsigned char show_includes; + unsigned char disable_assert; + unsigned char flow_analysis; + unsigned char test_mode; + unsigned char null_checks_enabled; + unsigned char ownership_enabled; + unsigned char preprocess_only; + unsigned char clear_error_at_end; + unsigned char sarif_output; + unsigned char no_output; + unsigned char visual_studio_ouput_format; + unsigned char dump_tokens; + unsigned char dump_pptokens; + unsigned char auto_config; + char output[200]; + char sarifpath[200]; +}; + +struct scope_list { + struct scope * head; + struct scope * tail; +}; + +struct token_list { + struct token * head; + struct token * tail; +}; + +struct parser_ctx { + struct options options; + struct scope_list scopes; + struct declaration * p_current_function_opt; + struct try_statement * p_current_try_statement_opt; + struct selection_statement * p_current_selection_statement; + struct switch_value_list * p_switch_value_list; + struct _iobuf * sarif_file; + unsigned int sarif_entries; + struct token_list input_list; + struct token * current; + struct token * previous; + int try_catch_block_index; + unsigned char evaluation_is_disabled; + unsigned char inside_generic_association; + struct report * p_report; +}; + +struct type_qualifier { + int flags; + struct token * token; + struct type_qualifier * next; +}; + +struct storage_class_specifier { + int flags; + struct token * token; +}; + +struct iteration_statement { + struct token * first_token; + struct token * second_token; + struct secondary_block * secondary_block; + struct expression * expression1; + struct expression * expression2; + struct expression * expression0; + struct declaration * declaration; + struct defer_list defer_list; +}; + +struct initializer { + struct token * first_token; + struct braced_initializer * braced_initializer; + struct expression * assignment_expression; +}; + +struct block_item_list { + struct block_item * head; + struct block_item * tail; +}; + +struct hash_map { + struct map_entry ** table; + int capacity; + int size; +}; + +struct _iobuf { + void * _Placeholder; +}; + +struct declaration_specifier { + struct storage_class_specifier * storage_class_specifier; + struct type_specifier_qualifier * type_specifier_qualifier; + struct function_specifier * function_specifier; + struct declaration_specifier * next; +}; + +struct primary_block { + struct compound_statement * compound_statement; + struct selection_statement * selection_statement; + struct iteration_statement * iteration_statement; + struct defer_statement * defer_statement; + struct try_statement * try_statement; +}; + +struct braced_initializer { + struct token * first_token; + struct token * last_token; + struct initializer_list * initializer_list; +}; + +union _struct_tag_1 { + unsigned char bool_value; + signed char signed_char_value; + unsigned char unsigned_char_value; + signed short signed_short_value; + unsigned short unsigned_short_value; + signed int signed_int_value; + unsigned int unsigned_int_value; + signed long signed_long_value; + unsigned long unsigned_long_value; + signed long long signed_long_long_value; + unsigned long long unsigned_long_long_value; + float float_value; + double double_value; + long double long_double_value; +}; + +struct object { + int state; + int value_type; + struct type type2; + char * debug_name; + union _struct_tag_1 value; + struct object * parent; + struct expression * p_init_expression; + struct object * members; + struct object * next; +}; + +struct argument_expression_list { + struct argument_expression * head; + struct argument_expression * tail; +}; + +struct expression { + int expression_type; + struct type type; + struct object object; + struct type_name * type_name; + struct braced_initializer * braced_initializer; + struct compound_statement * compound_statement; + struct generic_selection * generic_selection; + struct token * first_token; + struct token * last_token; + struct declarator * declarator; + int member_index; + struct argument_expression_list argument_expression_list; + struct expression * condition_expr; + struct expression * left; + struct expression * right; + unsigned char is_assignment_expression; +}; + +struct member_declaration { + struct specifier_qualifier_list * specifier_qualifier_list; + struct member_declarator_list * member_declarator_list_opt; + struct static_assert_declaration * static_assert_declaration; + struct pragma_declaration * pragma_declaration; + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt; + struct member_declaration * next; +}; + +struct generic_association { + struct type type; + struct type_name * p_type_name; + struct expression * expression; + struct token * first_token; + struct token * last_token; + struct generic_association * next; +}; + +struct declaration_list { + struct declaration * head; + struct declaration * tail; +}; + +struct function_specifier { + int flags; + struct token * token; +}; + +struct label { + struct expression * constant_expression; + struct token * p_identifier_opt; + struct token * p_first_token; +}; + +struct type_qualifier_list { + int flags; + struct type_qualifier * head; + struct type_qualifier * tail; +}; + +struct parameter_declaration { + struct attribute_specifier_sequence * attribute_specifier_sequence_opt; + struct declaration_specifiers * declaration_specifiers; + struct declarator * declarator; + struct parameter_declaration * next; +}; + +struct scope { + int scope_level; + struct hash_map tags; + struct hash_map variables; + struct scope * next; + struct scope * previous; +}; + +struct init_statement { + struct expression_statement * p_expression_statement; + struct simple_declaration * p_simple_declaration; +}; + +struct static_assert_declaration { + struct token * first_token; + struct token * last_token; + struct expression * constant_expression; + struct token * string_literal_opt; +}; + +struct param { + struct type type; + struct param * next; +}; + +struct designator { + struct expression * constant_expression_opt; + struct token * token; + struct designator * next; +}; + +struct ast { + struct token_list token_list; + struct declaration_list declaration_list; +}; + +struct defer_statement { + struct token * first_token; + struct token * last_token; + struct secondary_block * secondary_block; +}; + +struct pragma_declaration { + struct token * first_token; + struct token * last_token; +}; + +struct array_declarator { + struct direct_declarator * direct_declarator; + struct expression * assignment_expression; + struct expression * expression; + struct type_qualifier_list * type_qualifier_list_opt; + struct token * token; + struct token * static_token_opt; +}; + +struct compound_statement { + struct token * first_token; + struct token * last_token; + struct block_item_list block_item_list; + struct diagnostic diagnostic_flags; + struct defer_list defer_list; +}; + +struct secondary_block { + struct token * first_token; + struct token * last_token; + struct statement * statement; +}; + +struct defer_list_item { + struct declarator * declarator; + struct defer_statement * defer_statement; + struct defer_list_item * next; +}; + +struct defer_visit_ctx { + struct secondary_block * catch_secondary_block_opt; + struct parser_ctx * ctx; + struct ast ast; + struct defer_defer_scope * tail_block; + int parameter_list; +}; + +struct jump_statement { + struct token * label; + struct token * first_token; + struct token * last_token; + struct expression * expression_opt; + int try_catch_block_index; + struct defer_list defer_list; +}; + +struct attribute_token { + int attributes_flags; + struct token * token; +}; + +struct parameter_list { + struct parameter_declaration * head; + struct parameter_declaration * tail; +}; + +struct enumerator_list { + struct enumerator * head; + struct enumerator * tail; +}; + +struct enum_specifier { + unsigned char has_shared_ownership; + struct attribute_specifier_sequence * attribute_specifier_sequence_opt; + struct specifier_qualifier_list * specifier_qualifier_list; + char tag_name[200]; + struct enumerator_list enumerator_list; + struct token * tag_token; + struct token * first_token; + struct enum_specifier * complete_enum_specifier2; +}; + +struct alignment_specifier { + struct type_name * type_name; + struct expression * constant_expression; + struct token * token; +}; + +struct typeof_specifier_argument { + struct expression * expression; + struct type_name * type_name; +}; + +struct argument_expression { + struct expression * expression; + struct argument_expression * next; + unsigned char set_unkown; +}; + +union _struct_tag_0 { + unsigned int number; + struct enum_specifier * p_enum_specifier; + struct enumerator * p_enumerator; + struct struct_or_union_specifier * p_struct_or_union_specifier; + struct declarator * p_declarator; + struct init_declarator * p_init_declarator; + struct macro * p_macro; + struct struct_entry * p_struct_entry; +}; + +struct map_entry { + struct map_entry * next; + unsigned int hash; + char * key; + int type; + union _struct_tag_0 data; +}; + +struct report { + int no_files; + double cpu_time_used_sec; + int error_count; + int warnings_count; + int info_count; + unsigned char test_mode; + int test_failed; + int test_succeeded; + int last_diagnostics_ids[2]; + int fatal_error_expected; + unsigned char ignore_this_report; +}; + +struct specifier_qualifier_list { + int type_specifier_flags; + int type_qualifier_flags; + struct struct_or_union_specifier * struct_or_union_specifier; + struct enum_specifier * enum_specifier; + struct typeof_specifier * typeof_specifier; + struct declarator * typedef_declarator; + struct type_specifier_qualifier * head; + struct type_specifier_qualifier * tail; + struct token * first_token; + struct token * last_token; + struct attribute_specifier_sequence * p_attribute_specifier_sequence; +}; + +struct expression_statement { + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt; + struct expression * expression_opt; +}; + +struct enumerator { + unsigned char has_shared_ownership; + struct token * token; + struct attribute_specifier_sequence * attribute_specifier_sequence_opt; + struct expression * constant_expression_opt; + struct enum_specifier * enum_specifier; + struct enumerator * next; + struct object value; +}; + +struct token { + int type; + char * lexeme; + char * original; + int line; + int col; + int level; + int flags; + struct token * token_origin; + struct token * next; + struct token * prev; +}; + +struct attribute_specifier { + struct token * first_token; + struct token * last_token; + struct attribute_list * attribute_list; + struct attribute_specifier * next; +}; + +struct initializer_list_item { + struct designation * designation; + struct initializer * initializer; + struct initializer_list_item * next; +}; + +struct statement { + struct labeled_statement * labeled_statement; + struct unlabeled_statement * unlabeled_statement; +}; + +struct function_declarator { + struct direct_declarator * direct_declarator; + struct scope parameters_scope; + struct parameter_type_list * parameter_type_list_opt; +}; + +struct designator_list { + struct designator * head; + struct designator * tail; +}; + +struct initializer_list { + struct token * first_token; + struct initializer_list_item * head; + struct initializer_list_item * tail; + int size; +}; + +struct unlabeled_statement { + struct expression_statement * expression_statement; + struct primary_block * primary_block; + struct jump_statement * jump_statement; +}; + +struct defer_defer_scope { + struct declarator * declarator; + struct defer_statement * defer_statement; + struct try_statement * p_try_statement; + struct selection_statement * p_selection_statement; + struct iteration_statement * p_iteration_statement; + 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 defer_defer_scope * last_child; + struct defer_defer_scope * previous; +}; + +struct balanced_token_sequence { + struct balanced_token * head; + struct balanced_token * tail; +}; + +struct member_declarator { + struct declarator * declarator; + struct expression * constant_expression; + struct member_declarator * next; +}; + +struct struct_entry; +struct declarator { + unsigned char has_shared_ownership; + struct token * first_token_opt; + struct token * last_token_opt; + struct pointer * pointer; + struct direct_declarator * direct_declarator; + struct declaration_specifiers * declaration_specifiers; + struct specifier_qualifier_list * specifier_qualifier_list; + struct token * name_opt; + struct compound_statement * function_body; + int num_uses; + struct object object; + struct flow_object * p_object; + struct type type; +}; + +struct type_name { + struct token * first_token; + struct token * last_token; + struct specifier_qualifier_list * specifier_qualifier_list; + struct declarator * abstract_declarator; + struct type type; +}; + +struct typeof_specifier { + struct token * first_token; + struct token * last_token; + struct typeof_specifier_argument * typeof_specifier_argument; + struct type type; +}; + +struct condition { + struct expression * expression; + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt; + struct declaration_specifiers * p_declaration_specifiers; + struct init_declarator * p_init_declarator; + struct token * first_token; + struct token * last_token; +}; + +struct member_declaration_list { + struct token * first_token; + struct token * last_token; + struct member_declaration * head; + struct member_declaration * tail; +}; + +struct struct_or_union_specifier { + unsigned char has_shared_ownership; + struct attribute_specifier_sequence * attribute_specifier_sequence_opt; + struct member_declaration_list member_declaration_list; + struct token * first_token; + struct token * last_token; + unsigned char is_owner; + struct token * tagtoken; + char tag_name[200]; + unsigned char has_anonymous_tag; + unsigned char show_anonymous_tag; + int scope_level; + int visit_moved; + struct struct_or_union_specifier * complete_struct_or_union_specifier_indirection; +}; + +struct attribute_list { + int attributes_flags; + struct attribute * head; + struct attribute * tail; +}; + +struct attribute_argument_clause { + struct balanced_token_sequence * p_balanced_token_sequence; + struct token * token; +}; + +struct parameter_type_list { + unsigned char is_var_args; + unsigned char is_void; + struct parameter_list * parameter_list; +}; + + +void *calloc(int nmemb, unsigned int size); + +static struct defer_defer_scope *defer_visit_ctx_push_tail_block(struct defer_visit_ctx * ctx) +{ + struct defer_defer_scope * p_block = calloc(1, sizeof *p_block); + if (p_block) + { + p_block->previous = ctx->tail_block; + ctx->tail_block = p_block; + } + else + { + } + return ctx->tail_block; +} + +static struct defer_defer_scope *defer_visit_ctx_push_child(struct defer_visit_ctx * ctx) +{ + if (ctx->tail_block == ((void *)0)) + { + return ((void *)0); + } + struct defer_defer_scope * child = calloc(1, sizeof *child); + if (child) + { + child->previous = ctx->tail_block->last_child; + ctx->tail_block->last_child = child; + } + else + { + } + return ctx->tail_block->last_child; +} + +void free(void * ptr); + +static void defer_defer_scope_delete_one(struct defer_defer_scope * p) +{ + struct defer_defer_scope * p_block = p; + struct defer_defer_scope * child = p_block->last_child; + while (child != ((void *)0)) + { + struct defer_defer_scope * previous = child->previous; + child->previous = ((void *)0); + defer_defer_scope_delete_one(child); + child = previous; + } + ; + free(p_block); +} + +static void defer_visit_ctx_pop_tail_block(struct defer_visit_ctx * ctx) +{ + if (ctx->tail_block) + { + struct defer_defer_scope * previous = ctx->tail_block->previous; + ctx->tail_block->previous = ((void *)0); + defer_defer_scope_delete_one(ctx->tail_block); + ctx->tail_block = previous; + } +} + +void defer_list_add(struct defer_list * list, struct defer_list_item * p_item); +static void defer_visit_secondary_block(struct defer_visit_ctx * ctx, struct secondary_block * p_secondary_block); + +static void defer_exit_block_visit(struct defer_visit_ctx * ctx, struct defer_defer_scope * deferblock, struct token * position_token, struct defer_list * p_defer_list) +{ + if (1) + { + struct defer_defer_scope * deferchild = deferblock->last_child; + while (deferchild != ((void *)0)) + { + if (deferchild->defer_statement) + { + struct defer_list_item * p_item = calloc(1, sizeof *p_item); + if (p_item == ((void *)0)) + { + goto _catch_label_1; + } + p_item->defer_statement = deferchild->defer_statement; + defer_list_add(p_defer_list, p_item); + defer_visit_secondary_block(ctx, deferchild->defer_statement->secondary_block); + } + else + { + if (deferchild->declarator) + { + struct defer_list_item * p_item = calloc(1, sizeof *p_item); + if (p_item == ((void *)0)) + { + goto _catch_label_1; + } + p_item->declarator = deferchild->declarator; + defer_list_add(p_defer_list, p_item); + } + } + deferchild = deferchild->previous; + } + } + else _catch_label_1: + { + } +} + +static void defer_check_all_defer_until_try(struct defer_visit_ctx * ctx, struct defer_defer_scope * deferblock, struct token * position_token, struct defer_list * p_defer_list) +{ + struct defer_defer_scope * p_defer = deferblock; + while (p_defer != ((void *)0)) + { + defer_exit_block_visit(ctx, p_defer, position_token, p_defer_list); + if (p_defer->p_try_statement) + { + break; + } + p_defer = p_defer->previous; + } +} + +int strcmp(char * _Str1, char * _Str2); +static unsigned char defer_find_label_unlabeled_statement(struct defer_visit_ctx * ctx, struct unlabeled_statement * p_unlabeled_statement, char * label); + +static unsigned char defer_find_label_block_item_list(struct defer_visit_ctx * ctx, struct block_item_list * p_block_item, char * label) +{ + struct block_item * block_item = p_block_item->head; + while (block_item) + { + if (block_item->label && block_item->label->p_identifier_opt && strcmp(block_item->label->p_identifier_opt->lexeme, label) == 0) + { + return 1; + } + else + { + if (block_item->unlabeled_statement) + { + if (defer_find_label_unlabeled_statement(ctx, block_item->unlabeled_statement, label)) + { + return 1; + } + } + } + block_item = block_item->next; + } + return 0; +} + +static unsigned char defer_find_label_statement(struct defer_visit_ctx * ctx, struct statement * statement, char * label); + +static unsigned char defer_find_label_unlabeled_statement(struct defer_visit_ctx * ctx, struct unlabeled_statement * p_unlabeled_statement, char * label) +{ + if (p_unlabeled_statement->primary_block) + { + if (p_unlabeled_statement->primary_block->compound_statement) + { + if (defer_find_label_block_item_list(ctx, &p_unlabeled_statement->primary_block->compound_statement->block_item_list, label)) + { + return 1; + } + } + else + { + if (p_unlabeled_statement->primary_block->selection_statement) + { + if (defer_find_label_statement(ctx, p_unlabeled_statement->primary_block->selection_statement->secondary_block->statement, label)) + { + return 1; + } + if (p_unlabeled_statement->primary_block->selection_statement->else_secondary_block_opt) + { + if (defer_find_label_statement(ctx, p_unlabeled_statement->primary_block->selection_statement->else_secondary_block_opt->statement, label)) + { + return 1; + } + } + } + else + { + if (p_unlabeled_statement->primary_block->try_statement) + { + if (defer_find_label_statement(ctx, p_unlabeled_statement->primary_block->try_statement->secondary_block->statement, label)) + { + return 1; + } + if (p_unlabeled_statement->primary_block->try_statement->catch_secondary_block_opt) + { + if (defer_find_label_statement(ctx, p_unlabeled_statement->primary_block->try_statement->catch_secondary_block_opt->statement, label)) + { + return 1; + } + } + } + else + { + if (p_unlabeled_statement->primary_block->iteration_statement) + { + if (defer_find_label_statement(ctx, p_unlabeled_statement->primary_block->iteration_statement->secondary_block->statement, label)) + { + return 1; + } + } + } + } + } + } + return 0; +} + +static unsigned char defer_find_label_statement(struct defer_visit_ctx * ctx, struct statement * statement, char * label) +{ + if (statement->labeled_statement && statement->labeled_statement->label->p_identifier_opt) + { + if (strcmp(statement->labeled_statement->label->p_identifier_opt->lexeme, label) == 0) + { + return 1; + } + } + else + { + if (statement->unlabeled_statement) + { + if (defer_find_label_unlabeled_statement(ctx, statement->unlabeled_statement, label)) + { + return 1; + } + } + } + return 0; +} + +static unsigned char defer_find_label_scope(struct defer_visit_ctx * ctx, struct defer_defer_scope * deferblock, char * label) +{ + if (deferblock->p_iteration_statement) + { + if (defer_find_label_statement(ctx, deferblock->p_iteration_statement->secondary_block->statement, label)) + { + return 1; + } + } + else + { + if (deferblock->p_selection_statement) + { + if (defer_find_label_statement(ctx, deferblock->p_selection_statement->secondary_block->statement, label)) + { + return 1; + } + if (deferblock->p_selection_statement->else_secondary_block_opt) + { + if (defer_find_label_statement(ctx, deferblock->p_selection_statement->else_secondary_block_opt->statement, label)) + { + return 1; + } + } + } + else + { + if (deferblock->p_try_statement) + { + if (defer_find_label_statement(ctx, deferblock->p_try_statement->secondary_block->statement, label)) + { + return 1; + } + if (deferblock->p_try_statement->catch_secondary_block_opt) + { + if (defer_find_label_statement(ctx, deferblock->p_try_statement->catch_secondary_block_opt->statement, label)) + { + return 1; + } + } + } + else + { + if (deferblock->p_statement) + { + if (defer_find_label_statement(ctx, deferblock->p_statement, label)) + { + return 1; + } + } + else + { + if (deferblock->p_function_body) + { + if (defer_find_label_block_item_list(ctx, &deferblock->p_function_body->block_item_list, label)) + { + return 1; + } + } + else + { + if (deferblock->p_compound_statement) + { + if (defer_find_label_block_item_list(ctx, &deferblock->p_compound_statement->block_item_list, label)) + { + return 1; + } + } + } + } + } + } + } + return 0; +} + +static void defer_check_all_defer_until_label(struct defer_visit_ctx * ctx, struct defer_defer_scope * deferblock, char * label, struct token * position_token, struct defer_list * p_defer_list) +{ + struct defer_defer_scope * p_defer = deferblock; + while (p_defer != ((void *)0)) + { + if ( !defer_find_label_scope(ctx, p_defer, label)) + { + defer_exit_block_visit(ctx, p_defer, position_token, p_defer_list); + } + else + { + break; + } + p_defer = p_defer->previous; + } +} + +static void defer_check_all_defer_until_iter(struct defer_visit_ctx * ctx, struct defer_defer_scope * deferblock, struct token * position_token, struct defer_list * p_defer_list) +{ + struct defer_defer_scope * p_defer = deferblock; + while (p_defer != ((void *)0)) + { + defer_exit_block_visit(ctx, p_defer, position_token, p_defer_list); + if (p_defer->p_iteration_statement) + { + break; + } + p_defer = p_defer->previous; + } +} + +static void defer_exit_iteration_or_switch_statement_visit(struct defer_visit_ctx * ctx, struct defer_defer_scope * deferblock, struct token * position_token, struct defer_list * p_defer_list) +{ + struct defer_defer_scope * p_defer = deferblock; + while (p_defer != ((void *)0)) + { + defer_exit_block_visit(ctx, p_defer, position_token, p_defer_list); + if (p_defer->p_iteration_statement) + { + break; + } + if (p_defer->p_selection_statement && p_defer->p_selection_statement->first_token->type == 9034) + { + break; + } + p_defer = p_defer->previous; + } +} + +static void defer_exit_function_visit(struct defer_visit_ctx * ctx, struct defer_defer_scope * deferblock, struct token * position_token, struct defer_list * p_defer_list) +{ + struct defer_defer_scope * p_defer = deferblock; + while (p_defer != ((void *)0)) + { + defer_exit_block_visit(ctx, p_defer, position_token, p_defer_list); + p_defer = p_defer->previous; + } +} + +static void defer_visit_statement(struct defer_visit_ctx * ctx, struct statement * p_statement); + +static void defer_visit_secondary_block(struct defer_visit_ctx * ctx, struct secondary_block * p_secondary_block) +{ + defer_visit_statement(ctx, p_secondary_block->statement); +} + +static void defer_visit_defer_statement(struct defer_visit_ctx * ctx, struct defer_statement * p_defer_statement) +{ + struct defer_defer_scope * p_defer = defer_visit_ctx_push_child(ctx); + if (p_defer) + { + p_defer->defer_statement = p_defer_statement; + } +} + +static void defer_visit_declarator(struct defer_visit_ctx * ctx, struct declarator * p_declarator); + +static void defer_visit_init_declarator(struct defer_visit_ctx * ctx, struct init_declarator * p_init_declarator) +{ + defer_visit_declarator(ctx, p_init_declarator->p_declarator); +} + +static void defer_visit_init_declarator_list(struct defer_visit_ctx * ctx, struct init_declarator_list * p_init_declarator_list); + +static void defer_visit_simple_declaration(struct defer_visit_ctx * ctx, struct simple_declaration * p_simple_declaration) +{ + defer_visit_init_declarator_list(ctx, &p_simple_declaration->init_declarator_list); +} + +static void defer_visit_if_statement(struct defer_visit_ctx * ctx, struct selection_statement * p_selection_statement) +{ + struct defer_defer_scope * p_defer = defer_visit_ctx_push_tail_block(ctx); + if (p_defer == ((void *)0)) + { + return; + } + p_defer->p_selection_statement = p_selection_statement; + if (p_selection_statement->p_init_statement && p_selection_statement->p_init_statement->p_simple_declaration) + { + defer_visit_simple_declaration(ctx, p_selection_statement->p_init_statement->p_simple_declaration); + } + if (p_selection_statement->condition && p_selection_statement->condition->p_init_declarator) + { + defer_visit_init_declarator(ctx, p_selection_statement->condition->p_init_declarator); + } + ; + defer_visit_secondary_block(ctx, p_selection_statement->secondary_block); + if (p_selection_statement->else_secondary_block_opt) + { + defer_visit_secondary_block(ctx, p_selection_statement->else_secondary_block_opt); + } + defer_exit_block_visit(ctx, p_defer, p_selection_statement->last_token, &p_selection_statement->defer_list); + defer_visit_ctx_pop_tail_block(ctx); +} + +static void defer_visit_try_statement(struct defer_visit_ctx * ctx, struct try_statement * p_try_statement) +{ + if (1) + { + struct secondary_block * catch_secondary_block_old = ctx->catch_secondary_block_opt; + ctx->catch_secondary_block_opt = p_try_statement->catch_secondary_block_opt; + struct defer_defer_scope * p_defer = defer_visit_ctx_push_tail_block(ctx); + if (p_defer == ((void *)0)) + { + goto _catch_label_1; + } + p_defer->p_try_statement = p_try_statement; + defer_visit_secondary_block(ctx, p_try_statement->secondary_block); + if (p_try_statement->catch_secondary_block_opt) + { + defer_visit_secondary_block(ctx, p_try_statement->catch_secondary_block_opt); + } + defer_visit_ctx_pop_tail_block(ctx); + ctx->catch_secondary_block_opt = catch_secondary_block_old; + } + else _catch_label_1: + { + } +} + +static void defer_visit_switch_statement(struct defer_visit_ctx * ctx, struct selection_statement * p_selection_statement) +{ + struct defer_defer_scope * p_defer = defer_visit_ctx_push_tail_block(ctx); + if (p_defer == ((void *)0)) + { + return; + } + p_defer->p_selection_statement = p_selection_statement; + defer_visit_secondary_block(ctx, p_selection_statement->secondary_block); + defer_exit_block_visit(ctx, p_defer, p_selection_statement->secondary_block->last_token, &p_selection_statement->defer_list); + defer_visit_ctx_pop_tail_block(ctx); +} + +static void defer_visit_selection_statement(struct defer_visit_ctx * ctx, struct selection_statement * p_selection_statement) +{ + if (p_selection_statement->first_token->type == 9017) + { + defer_visit_if_statement(ctx, p_selection_statement); + } + else + { + if (p_selection_statement->first_token->type == 9034) + { + defer_visit_switch_statement(ctx, p_selection_statement); + } + else + { + ; + } + } +} + +static void defer_visit_bracket_initializer_list(struct defer_visit_ctx * ctx, struct braced_initializer * p_bracket_initializer_list) +{ + if (p_bracket_initializer_list->initializer_list == ((void *)0)) + { + } + else + { + } +} + +static void defer_visit_block_item(struct defer_visit_ctx * ctx, struct block_item * p_block_item); + +static void defer_visit_block_item_list(struct defer_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) + { + defer_visit_block_item(ctx, p_block_item); + p_block_item = p_block_item->next; + } +} + +static void defer_visit_compound_statement(struct defer_visit_ctx * ctx, struct compound_statement * p_compound_statement) +{ + struct defer_defer_scope * p_defer = defer_visit_ctx_push_tail_block(ctx); + if (p_defer == ((void *)0)) + { + return; + } + p_defer->p_compound_statement = p_compound_statement; + defer_visit_block_item_list(ctx, &p_compound_statement->block_item_list); + defer_exit_block_visit(ctx, p_defer, p_compound_statement->last_token, &p_compound_statement->defer_list); + defer_visit_ctx_pop_tail_block(ctx); +} + +static void defer_visit_do_while_statement(struct defer_visit_ctx * ctx, struct iteration_statement * p_iteration_statement) +{ + ; + if (1) + { + struct defer_defer_scope * p_defer = defer_visit_ctx_push_tail_block(ctx); + if (p_defer == ((void *)0)) + { + goto _catch_label_1; + } + p_defer->p_iteration_statement = p_iteration_statement; + defer_visit_secondary_block(ctx, p_iteration_statement->secondary_block); + defer_exit_block_visit(ctx, p_defer, p_iteration_statement->secondary_block->last_token, &p_iteration_statement->defer_list); + defer_visit_ctx_pop_tail_block(ctx); + } + else _catch_label_1: + { + } +} + +static void defer_visit_while_statement(struct defer_visit_ctx * ctx, struct iteration_statement * p_iteration_statement) +{ + ; + if (p_iteration_statement->expression1 == ((void *)0)) + { + return; + } + struct defer_defer_scope * p_defer = defer_visit_ctx_push_tail_block(ctx); + if (p_defer == ((void *)0)) + { + return; + } + p_defer->p_iteration_statement = p_iteration_statement; + defer_visit_secondary_block(ctx, p_iteration_statement->secondary_block); + defer_visit_secondary_block(ctx, p_iteration_statement->secondary_block); + defer_exit_block_visit(ctx, p_defer, p_iteration_statement->secondary_block->last_token, &p_iteration_statement->defer_list); + defer_visit_ctx_pop_tail_block(ctx); +} + +unsigned char secondary_block_ends_with_jump(struct secondary_block * p_secondary_block); + +static void defer_visit_for_statement(struct defer_visit_ctx * ctx, struct iteration_statement * p_iteration_statement) +{ + ; + if (1) + { + if (p_iteration_statement->declaration && p_iteration_statement->declaration->init_declarator_list.head) + { + defer_visit_init_declarator_list(ctx, &p_iteration_statement->declaration->init_declarator_list); + } + struct defer_defer_scope * p_defer = defer_visit_ctx_push_tail_block(ctx); + if (p_defer == ((void *)0)) + { + goto _catch_label_1; + } + p_defer->p_iteration_statement = p_iteration_statement; + defer_visit_secondary_block(ctx, p_iteration_statement->secondary_block); + defer_visit_ctx_pop_tail_block(ctx); + unsigned char b_secondary_block_ends_with_jump = secondary_block_ends_with_jump(p_iteration_statement->secondary_block); + if ( !b_secondary_block_ends_with_jump) + { + struct defer_defer_scope * p_defer2 = defer_visit_ctx_push_tail_block(ctx); + if (p_defer2 == ((void *)0)) + { + goto _catch_label_1; + } + p_defer2->p_iteration_statement = p_iteration_statement; + defer_visit_secondary_block(ctx, p_iteration_statement->secondary_block); + defer_exit_block_visit(ctx, p_defer2, p_iteration_statement->secondary_block->last_token, &p_iteration_statement->defer_list); + defer_visit_ctx_pop_tail_block(ctx); + } + } + else _catch_label_1: + { + } +} + +static void defer_visit_iteration_statement(struct defer_visit_ctx * ctx, struct iteration_statement * p_iteration_statement) +{ + switch (p_iteration_statement->first_token->type) + { + case 9042 : + defer_visit_while_statement(ctx, p_iteration_statement); + break; + case 9008 : + defer_visit_do_while_statement(ctx, p_iteration_statement); + break; + case 9015 : + defer_visit_for_statement(ctx, p_iteration_statement); + break; + default: + ; + break; + } +} + +static void defer_visit_jump_statement(struct defer_visit_ctx * ctx, struct jump_statement * p_jump_statement) +{ + ; + if (1) + { + if (p_jump_statement->first_token->type == 9037) + { + defer_check_all_defer_until_try(ctx, ctx->tail_block, p_jump_statement->first_token, &p_jump_statement->defer_list); + } + else + { + if (p_jump_statement->first_token->type == 9027) + { + defer_exit_function_visit(ctx, ctx->tail_block, p_jump_statement->first_token, &p_jump_statement->defer_list); + } + else + { + if (p_jump_statement->first_token->type == 9005) + { + defer_check_all_defer_until_iter(ctx, ctx->tail_block, p_jump_statement->first_token, &p_jump_statement->defer_list); + } + else + { + if (p_jump_statement->first_token->type == 9000) + { + defer_exit_iteration_or_switch_statement_visit(ctx, ctx->tail_block, p_jump_statement->first_token, &p_jump_statement->defer_list); + } + else + { + if (p_jump_statement->first_token->type == 9016) + { + defer_check_all_defer_until_label(ctx, ctx->tail_block, p_jump_statement->label->lexeme, p_jump_statement->first_token, &p_jump_statement->defer_list); + } + else + { + ; + } + } + } + } + } + } + else _catch_label_1: + { + } +} + +static void defer_visit_labeled_statement(struct defer_visit_ctx * ctx, struct labeled_statement * p_labeled_statement) +{ + defer_visit_statement(ctx, p_labeled_statement->statement); +} + +static void defer_visit_primary_block(struct defer_visit_ctx * ctx, struct primary_block * p_primary_block) +{ + if (p_primary_block->defer_statement) + { + defer_visit_defer_statement(ctx, p_primary_block->defer_statement); + } + else + { + if (p_primary_block->compound_statement) + { + defer_visit_compound_statement(ctx, p_primary_block->compound_statement); + } + else + { + if (p_primary_block->iteration_statement) + { + defer_visit_iteration_statement(ctx, p_primary_block->iteration_statement); + } + else + { + if (p_primary_block->selection_statement) + { + defer_visit_selection_statement(ctx, p_primary_block->selection_statement); + } + else + { + if (p_primary_block->try_statement) + { + defer_visit_try_statement(ctx, p_primary_block->try_statement); + } + } + } + } + } +} + +static void defer_visit_unlabeled_statement(struct defer_visit_ctx * ctx, struct unlabeled_statement * p_unlabeled_statement) +{ + if (p_unlabeled_statement->primary_block) + { + defer_visit_primary_block(ctx, p_unlabeled_statement->primary_block); + } + else + { + if (p_unlabeled_statement->expression_statement) + { + } + else + { + if (p_unlabeled_statement->jump_statement) + { + defer_visit_jump_statement(ctx, p_unlabeled_statement->jump_statement); + } + else + { + ; + } + } + } +} + +static void defer_visit_statement(struct defer_visit_ctx * ctx, struct statement * p_statement) +{ + if (p_statement->labeled_statement) + { + defer_visit_labeled_statement(ctx, p_statement->labeled_statement); + } + else + { + if (p_statement->unlabeled_statement) + { + defer_visit_unlabeled_statement(ctx, p_statement->unlabeled_statement); + } + } +} + +void defer_visit_declaration(struct defer_visit_ctx * ctx, struct declaration * p_declaration); + +static void defer_visit_block_item(struct defer_visit_ctx * ctx, struct block_item * p_block_item) +{ + if (p_block_item->declaration) + { + defer_visit_declaration(ctx, p_block_item->declaration); + } + else + { + if (p_block_item->unlabeled_statement) + { + defer_visit_unlabeled_statement(ctx, p_block_item->unlabeled_statement); + } + else + { + if (p_block_item->label) + { + } + } + } +} + +static void defer_visit_direct_declarator(struct defer_visit_ctx * ctx, struct direct_declarator * p_direct_declarator) +{ + if (p_direct_declarator->function_declarator) + { + struct parameter_declaration * parameter = ((void *)0); + if (p_direct_declarator->function_declarator->parameter_type_list_opt && p_direct_declarator->function_declarator->parameter_type_list_opt->parameter_list) + { + parameter = p_direct_declarator->function_declarator->parameter_type_list_opt->parameter_list->head; + } + ctx->parameter_list++; + while (parameter) + { + if (parameter->declarator) + { + defer_visit_declarator(ctx, parameter->declarator); + } + parameter = parameter->next; + } + ctx->parameter_list--; + } + else + { + if (p_direct_declarator->array_declarator) + { + } + } +} + +static void defer_visit_declarator(struct defer_visit_ctx * ctx, struct declarator * p_declarator) +{ + if (1) + { + if (ctx->tail_block && p_declarator->type.category != 1) + { + if (ctx->parameter_list > 1) + { + return; + } + struct defer_defer_scope * p_defer = defer_visit_ctx_push_child(ctx); + if (p_defer == ((void *)0)) + { + goto _catch_label_1; + } + p_defer->declarator = p_declarator; + } + if (p_declarator->direct_declarator) + { + defer_visit_direct_declarator(ctx, p_declarator->direct_declarator); + } + } + else _catch_label_1: + { + } +} + +static void defer_visit_init_declarator_list(struct defer_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) + { + defer_visit_init_declarator(ctx, p_init_declarator); + p_init_declarator = p_init_declarator->next; + } +} + +void defer_visit_declaration(struct defer_visit_ctx * ctx, struct declaration * p_declaration) +{ + if (p_declaration->init_declarator_list.head) + { + defer_visit_init_declarator_list(ctx, &p_declaration->init_declarator_list); + } + if (p_declaration->function_body) + { + defer_visit_compound_statement(ctx, p_declaration->function_body); + } +} + +void defer_start_visit_declaration(struct defer_visit_ctx * ctx, struct declaration * p_declaration) +{ + if (p_declaration->function_body) + { + ; + struct defer_defer_scope * p_defer = defer_visit_ctx_push_tail_block(ctx); + if (p_defer == ((void *)0)) + { + return; + } + p_defer->p_function_body = p_declaration->function_body; + defer_visit_declaration(ctx, p_declaration); + ; + defer_exit_block_visit(ctx, ctx->tail_block, p_declaration->function_body->last_token, &p_declaration->defer_list); + defer_visit_ctx_pop_tail_block(ctx); + } + else + { + struct defer_defer_scope * p_defer = defer_visit_ctx_push_tail_block(ctx); + if (p_defer == ((void *)0)) + { + return; + } + defer_visit_declaration(ctx, p_declaration); + defer_visit_ctx_pop_tail_block(ctx); + } +} + +void defer_visit_ctx_destroy(struct defer_visit_ctx * p) +{ + ; +} + diff --git a/out/src/visit_flow.c b/out/src/visit_flow.c new file mode 100644 index 0000000..e8562a4 --- /dev/null +++ b/out/src/visit_flow.c @@ -0,0 +1,3891 @@ +struct designator { + struct expression * constant_expression_opt; + struct token * token; + struct designator * next; +}; + +struct declaration_list { + struct declaration * head; + struct declaration * tail; +}; + +struct token { + int type; + char * lexeme; + char * original; + int line; + int col; + int level; + int flags; + struct token * token_origin; + struct token * next; + struct token * prev; +}; + +struct switch_value { + long long value; + struct label * p_label; + struct switch_value * next; +}; + +struct enumerator_list { + struct enumerator * head; + struct enumerator * tail; +}; + +struct enum_specifier { + unsigned char has_shared_ownership; + struct attribute_specifier_sequence * attribute_specifier_sequence_opt; + struct specifier_qualifier_list * specifier_qualifier_list; + char tag_name[200]; + struct enumerator_list enumerator_list; + struct token * tag_token; + struct token * first_token; + struct enum_specifier * complete_enum_specifier2; +}; + +struct block_item_list { + struct block_item * head; + struct block_item * tail; +}; + +struct init_declarator { + unsigned char has_shared_ownership; + struct declarator * p_declarator; + struct initializer * initializer; + struct init_declarator * next; +}; + +struct member_declaration_list { + struct token * first_token; + struct token * last_token; + struct member_declaration * head; + struct member_declaration * tail; +}; + +struct macro; +struct unlabeled_statement { + struct expression_statement * expression_statement; + struct primary_block * primary_block; + struct jump_statement * jump_statement; +}; + +struct param_list { + unsigned char is_var_args; + unsigned char is_void; + struct param * head; + struct param * tail; +}; + +struct type { + int category; + int attributes_flags; + int type_specifier_flags; + int type_qualifier_flags; + int storage_class_specifier_flags; + char * name_opt; + struct struct_or_union_specifier * struct_or_union_specifier; + struct enum_specifier * enum_specifier; + struct expression * array_num_elements_expression; + int num_of_elements; + unsigned char static_array; + unsigned char address_of; + struct param_list params; + struct type * next; +}; + +union _struct_tag_1 { + unsigned char bool_value; + signed char signed_char_value; + unsigned char unsigned_char_value; + signed short signed_short_value; + unsigned short unsigned_short_value; + signed int signed_int_value; + unsigned int unsigned_int_value; + signed long signed_long_value; + unsigned long unsigned_long_value; + signed long long signed_long_long_value; + unsigned long long unsigned_long_long_value; + float float_value; + double double_value; + long double long_double_value; +}; + +struct object { + int state; + int value_type; + struct type type2; + char * debug_name; + union _struct_tag_1 value; + struct object * parent; + struct expression * p_init_expression; + struct object * members; + struct object * next; +}; + +struct enumerator { + unsigned char has_shared_ownership; + struct token * token; + struct attribute_specifier_sequence * attribute_specifier_sequence_opt; + struct expression * constant_expression_opt; + struct enum_specifier * enum_specifier; + struct enumerator * next; + struct object value; +}; + +struct attribute { + int attributes_flags; + struct attribute_token * attribute_token; + struct attribute_argument_clause * attribute_argument_clause; + struct attribute * next; +}; + +struct primary_block { + struct compound_statement * compound_statement; + struct selection_statement * selection_statement; + struct iteration_statement * iteration_statement; + struct defer_statement * defer_statement; + struct try_statement * try_statement; +}; + +struct member_declarator_list { + struct member_declarator * head; + struct member_declarator * tail; +}; + +struct attribute_token { + int attributes_flags; + struct token * token; +}; + +struct diagnostic { + unsigned long long errors; + unsigned long long warnings; + unsigned long long notes; +}; + +struct defer_list { + struct defer_list_item * head; + struct defer_list_item * tail; +}; + +struct compound_statement { + struct token * first_token; + struct token * last_token; + struct block_item_list block_item_list; + struct diagnostic diagnostic_flags; + struct defer_list defer_list; +}; + +struct report { + int no_files; + double cpu_time_used_sec; + int error_count; + int warnings_count; + int info_count; + unsigned char test_mode; + int test_failed; + int test_succeeded; + int last_diagnostics_ids[2]; + int fatal_error_expected; + unsigned char ignore_this_report; +}; + +struct initializer_list { + struct token * first_token; + struct initializer_list_item * head; + struct initializer_list_item * tail; + int size; +}; + +struct type_specifier { + int flags; + struct token * token; + struct struct_or_union_specifier * struct_or_union_specifier; + struct typeof_specifier * typeof_specifier; + struct enum_specifier * enum_specifier; + struct declarator * typedef_declarator; + struct atomic_type_specifier * atomic_type_specifier; +}; + +struct parameter_type_list { + unsigned char is_var_args; + unsigned char is_void; + struct parameter_list * parameter_list; +}; + +struct array_declarator { + struct direct_declarator * direct_declarator; + struct expression * assignment_expression; + struct expression * expression; + struct type_qualifier_list * type_qualifier_list_opt; + struct token * token; + struct token * static_token_opt; +}; + +struct member_declaration { + struct specifier_qualifier_list * specifier_qualifier_list; + struct member_declarator_list * member_declarator_list_opt; + struct static_assert_declaration * static_assert_declaration; + struct pragma_declaration * pragma_declaration; + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt; + struct member_declaration * next; +}; + +struct flow_objects_view { + struct flow_object ** data; + int size; + int capacity; +}; + +struct parameter_declaration { + struct attribute_specifier_sequence * attribute_specifier_sequence_opt; + struct declaration_specifiers * declaration_specifiers; + struct declarator * declarator; + struct parameter_declaration * next; +}; + +struct type_name { + struct token * first_token; + struct token * last_token; + struct specifier_qualifier_list * specifier_qualifier_list; + struct declarator * abstract_declarator; + struct type type; +}; + +struct param { + struct type type; + struct param * next; +}; + +struct specifier_qualifier_list { + int type_specifier_flags; + int type_qualifier_flags; + struct struct_or_union_specifier * struct_or_union_specifier; + struct enum_specifier * enum_specifier; + struct typeof_specifier * typeof_specifier; + struct declarator * typedef_declarator; + struct type_specifier_qualifier * head; + struct type_specifier_qualifier * tail; + struct token * first_token; + struct token * last_token; + struct attribute_specifier_sequence * p_attribute_specifier_sequence; +}; + +struct try_statement { + struct secondary_block * secondary_block; + struct secondary_block * catch_secondary_block_opt; + struct token * first_token; + struct token * last_token; + struct token * catch_token_opt; + int try_catch_block_index; +}; + +struct pragma_declaration { + struct token * first_token; + struct token * last_token; +}; + +struct static_assert_declaration { + struct token * first_token; + struct token * last_token; + struct expression * constant_expression; + struct token * string_literal_opt; +}; + +struct diagnostic_stack { + int top_index; + struct diagnostic stack[10]; +}; + +struct options { + int input; + int target; + struct diagnostic_stack diagnostic_stack; + int style; + unsigned char show_includes; + unsigned char disable_assert; + unsigned char flow_analysis; + unsigned char test_mode; + unsigned char null_checks_enabled; + unsigned char ownership_enabled; + unsigned char preprocess_only; + unsigned char clear_error_at_end; + unsigned char sarif_output; + unsigned char no_output; + unsigned char visual_studio_ouput_format; + unsigned char dump_tokens; + unsigned char dump_pptokens; + unsigned char auto_config; + char output[200]; + char sarifpath[200]; +}; + +struct parameter_list { + struct parameter_declaration * head; + struct parameter_declaration * tail; +}; + +struct condition { + struct expression * expression; + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt; + struct declaration_specifiers * p_declaration_specifiers; + struct init_declarator * p_init_declarator; + struct token * first_token; + struct token * last_token; +}; + +struct scope_list { + struct scope * head; + struct scope * tail; +}; + +struct token_list { + struct token * head; + struct token * tail; +}; + +struct parser_ctx { + struct options options; + struct scope_list scopes; + struct declaration * p_current_function_opt; + struct try_statement * p_current_try_statement_opt; + struct selection_statement * p_current_selection_statement; + struct switch_value_list * p_switch_value_list; + struct _iobuf * sarif_file; + unsigned int sarif_entries; + struct token_list input_list; + struct token * current; + struct token * previous; + int try_catch_block_index; + unsigned char evaluation_is_disabled; + unsigned char inside_generic_association; + struct report * p_report; +}; + +struct init_declarator_list { + struct init_declarator * head; + struct init_declarator * tail; +}; + +struct flow_objects { + struct flow_object ** data; + int size; + int capacity; +}; + +struct type_qualifier_list { + int flags; + struct type_qualifier * head; + struct type_qualifier * tail; +}; + +struct block_item { + struct token * first_token; + struct declaration * declaration; + struct unlabeled_statement * unlabeled_statement; + struct label * label; + struct block_item * next; +}; + +struct ast { + struct token_list token_list; + struct declaration_list declaration_list; +}; + +struct label_state { + char * label_name; + int state_number; +}; + +struct flow_visit_ctx { + struct secondary_block * catch_secondary_block_opt; + struct parser_ctx * ctx; + struct ast ast; + struct type * p_return_type; + int parameter_list; + int state_number_generator; + unsigned char expression_is_not_evaluated; + unsigned char inside_assert; + int throw_join_state; + int break_join_state; + int initial_state; + struct flow_objects arena; + struct label_state labels[100]; + int labels_size; +}; + +struct braced_initializer { + struct token * first_token; + struct token * last_token; + struct initializer_list * initializer_list; +}; + +struct hash_map { + struct map_entry ** table; + int capacity; + int size; +}; + +struct scope { + int scope_level; + struct hash_map tags; + struct hash_map variables; + struct scope * next; + struct scope * previous; +}; + +struct function_declarator { + struct direct_declarator * direct_declarator; + struct scope parameters_scope; + struct parameter_type_list * parameter_type_list_opt; +}; + +struct true_false_set_item { + struct expression * p_expression; + int true_branch_state; + int false_branch_state; +}; + +struct iteration_statement { + struct token * first_token; + struct token * second_token; + struct secondary_block * secondary_block; + struct expression * expression1; + struct expression * expression2; + struct expression * expression0; + struct declaration * declaration; + struct defer_list defer_list; +}; + +struct flow_object_state { + char * dbg_name; + int state_number; + struct flow_object * pointed; + int state; + struct flow_objects_view alternatives; + struct flow_object_state * next; +}; + +struct type_qualifier { + int flags; + struct token * token; + struct type_qualifier * next; +}; + +struct __crt_locale_pointers { + struct __crt_locale_data * locinfo; + struct __crt_multibyte_data * mbcinfo; +}; + +struct initializer_list_item { + struct designation * designation; + struct initializer * initializer; + struct initializer_list_item * next; +}; + +struct attribute_list { + int attributes_flags; + struct attribute * head; + struct attribute * tail; +}; + +struct labeled_statement { + struct label * label; + struct statement * statement; +}; + +struct generic_assoc_list { + struct generic_association * head; + struct generic_association * tail; +}; + +struct flow_object { + unsigned int visit_number; + struct flow_object * parent; + struct declarator * p_declarator_origin; + struct expression * p_expression_origin; + struct flow_objects_view members; + struct flow_object_state current; + int id; + unsigned char is_temporary; +}; + +struct generic_selection { + struct expression * expression; + struct type_name * type_name; + struct expression * p_view_selected_expression; + struct generic_assoc_list generic_assoc_list; + struct token * first_token; + struct token * last_token; +}; + +struct declaration { + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt; + struct static_assert_declaration * static_assert_declaration; + struct pragma_declaration * pragma_declaration; + struct declaration_specifiers * declaration_specifiers; + struct init_declarator_list init_declarator_list; + struct compound_statement * function_body; + struct defer_list defer_list; + struct declarator * contract_declarator; + struct token * first_token; + struct token * last_token; + struct declaration * next; +}; + +struct direct_declarator { + struct token * name_opt; + struct declarator * declarator; + struct array_declarator * array_declarator; + struct function_declarator * function_declarator; + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt; +}; + +struct declaration_specifier { + struct storage_class_specifier * storage_class_specifier; + struct type_specifier_qualifier * type_specifier_qualifier; + struct function_specifier * function_specifier; + struct declaration_specifier * next; +}; + +struct argument_expression_list { + struct argument_expression * head; + struct argument_expression * tail; +}; + +struct member_declarator { + struct declarator * declarator; + struct expression * constant_expression; + struct member_declarator * next; +}; + +struct init_statement { + struct expression_statement * p_expression_statement; + struct simple_declaration * p_simple_declaration; +}; + +struct true_false_set { + struct true_false_set_item * data; + int size; + int capacity; +}; + +struct function_specifier { + int flags; + struct token * token; +}; + +struct initializer { + struct token * first_token; + struct braced_initializer * braced_initializer; + struct expression * assignment_expression; +}; + +struct label { + struct expression * constant_expression; + struct token * p_identifier_opt; + struct token * p_first_token; +}; + +struct simple_declaration { + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt; + struct declaration_specifiers * p_declaration_specifiers; + struct init_declarator_list init_declarator_list; + struct token * first_token; + struct token * last_token; +}; + +struct struct_entry; +struct __crt_multibyte_data; +struct __crt_locale_data; +struct struct_or_union_specifier { + unsigned char has_shared_ownership; + struct attribute_specifier_sequence * attribute_specifier_sequence_opt; + struct member_declaration_list member_declaration_list; + struct token * first_token; + struct token * last_token; + unsigned char is_owner; + struct token * tagtoken; + char tag_name[200]; + unsigned char has_anonymous_tag; + unsigned char show_anonymous_tag; + int scope_level; + int visit_moved; + struct struct_or_union_specifier * complete_struct_or_union_specifier_indirection; +}; + +struct pointer { + struct attribute_specifier_sequence * attribute_specifier_sequence_opt; + struct type_qualifier_list * type_qualifier_list_opt; + struct pointer * pointer; +}; + +struct attribute_specifier_sequence { + struct token * first_token; + struct token * last_token; + int attributes_flags; + struct attribute_specifier * head; + struct attribute_specifier * tail; +}; + +struct argument_expression { + struct expression * expression; + struct argument_expression * next; + unsigned char set_unkown; +}; + +struct secondary_block { + struct token * first_token; + struct token * last_token; + struct statement * statement; +}; + +struct defer_list_item { + struct declarator * declarator; + struct defer_statement * defer_statement; + struct defer_list_item * next; +}; + +struct alignment_specifier { + struct type_name * type_name; + struct expression * constant_expression; + struct token * token; +}; + +struct _iobuf { + void * _Placeholder; +}; + +struct declarator { + unsigned char has_shared_ownership; + struct token * first_token_opt; + struct token * last_token_opt; + struct pointer * pointer; + struct direct_declarator * direct_declarator; + struct declaration_specifiers * declaration_specifiers; + struct specifier_qualifier_list * specifier_qualifier_list; + struct token * name_opt; + struct compound_statement * function_body; + int num_uses; + struct object object; + struct flow_object * p_object; + struct type type; +}; + +struct balanced_token { + struct token * token; + struct balanced_token * next; +}; + +struct defer_statement { + struct token * first_token; + struct token * last_token; + struct secondary_block * secondary_block; +}; + +union _struct_tag_0 { + unsigned int number; + struct enum_specifier * p_enum_specifier; + struct enumerator * p_enumerator; + struct struct_or_union_specifier * p_struct_or_union_specifier; + struct declarator * p_declarator; + struct init_declarator * p_init_declarator; + struct macro * p_macro; + struct struct_entry * p_struct_entry; +}; + +struct map_entry { + struct map_entry * next; + unsigned int hash; + char * key; + int type; + union _struct_tag_0 data; +}; + +struct switch_value_list { + struct switch_value * head; + struct switch_value * tail; + struct switch_value * p_default; +}; + +struct attribute_argument_clause { + struct balanced_token_sequence * p_balanced_token_sequence; + struct token * token; +}; + +struct generic_association { + struct type type; + struct type_name * p_type_name; + struct expression * expression; + struct token * first_token; + struct token * last_token; + struct generic_association * next; +}; + +struct expression { + int expression_type; + struct type type; + struct object object; + struct type_name * type_name; + struct braced_initializer * braced_initializer; + struct compound_statement * compound_statement; + struct generic_selection * generic_selection; + struct token * first_token; + struct token * last_token; + struct declarator * declarator; + int member_index; + struct argument_expression_list argument_expression_list; + struct expression * condition_expr; + struct expression * left; + struct expression * right; + unsigned char is_assignment_expression; +}; + +struct type_specifier_qualifier { + struct type_specifier * type_specifier; + struct type_qualifier * type_qualifier; + struct alignment_specifier * alignment_specifier; + struct type_specifier_qualifier * next; +}; + +struct typeof_specifier { + struct token * first_token; + struct token * last_token; + struct typeof_specifier_argument * typeof_specifier_argument; + struct type type; +}; + +struct designator_list { + struct designator * head; + struct designator * tail; +}; + +struct typeof_specifier_argument { + struct expression * expression; + struct type_name * type_name; +}; + +struct marker { + char * file; + int line; + int start_col; + int end_col; + struct token * p_token_caret; + struct token * p_token_begin; + struct token * p_token_end; +}; + +struct declaration_specifiers { + int attributes_flags; + int type_specifier_flags; + int type_qualifier_flags; + int storage_class_specifier_flags; + int function_specifier_flags; + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt; + struct struct_or_union_specifier * struct_or_union_specifier; + struct enum_specifier * enum_specifier; + struct declarator * typedef_declarator; + struct typeof_specifier * typeof_specifier; + struct token * first_token; + struct token * last_token; + struct declaration_specifier * head; + struct declaration_specifier * tail; +}; + +struct expression_statement { + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt; + struct expression * expression_opt; +}; + +struct balanced_token_sequence { + struct balanced_token * head; + struct balanced_token * tail; +}; + +struct atomic_type_specifier { + struct token * token; + struct type_name * type_name; +}; + +struct storage_class_specifier { + int flags; + struct token * token; +}; + +struct attribute_specifier { + struct token * first_token; + struct token * last_token; + struct attribute_list * attribute_list; + struct attribute_specifier * next; +}; + +struct jump_statement { + struct token * label; + struct token * first_token; + struct token * last_token; + struct expression * expression_opt; + int try_catch_block_index; + struct defer_list defer_list; +}; + +struct designation { + struct designator_list * designator_list; + struct token * token; +}; + +struct selection_statement { + struct init_statement * p_init_statement; + struct condition * condition; + struct secondary_block * secondary_block; + struct secondary_block * else_secondary_block_opt; + struct token * open_parentesis_token; + struct token * close_parentesis_token; + struct token * first_token; + struct token * last_token; + struct token * else_token_opt; + struct defer_list defer_list; +}; + +struct statement { + struct labeled_statement * labeled_statement; + struct unlabeled_statement * unlabeled_statement; +}; + + +void free(void * ptr); + +void true_false_set_clear(struct true_false_set * p) +{ + free(p->data); + p->data = ((void *)0); + p->size = 0; + p->capacity = 0; +} + +void true_false_set_destroy(struct true_false_set * p) +{ + free(p->data); +} + +void *realloc(void * ptr, unsigned int size); + +int true_false_set_reserve(struct true_false_set * p, int n) +{ + if (n > p->capacity) + { + if ((unsigned int)n > (4294967295U / (sizeof (p->data[0])))) + { + return 132; + } + void * pnew = realloc(p->data, n * sizeof (p->data[0])); + if (pnew == ((void *)0)) + { + return 12; + } + p->data = pnew; + p->capacity = n; + } + return 0; +} + +int true_false_set_push_back(struct true_false_set * p, struct true_false_set_item * book) +{ + if (p->size == 2147483647) + { + return 132; + } + if (p->size + 1 > p->capacity) + { + int new_capacity = 0; + if (p->capacity > (2147483647 - p->capacity / 2)) + { + new_capacity = 2147483647; + } + else + { + new_capacity = p->capacity + p->capacity / 2; + if (new_capacity < p->size + 1) + { + new_capacity = p->size + 1; + } + } + int error = true_false_set_reserve(p, new_capacity); + if (error != 0) + { + return error; + } + } + p->data[p->size] = *book; + p->size++; + return 0; +} + +static void true_false_set_invert(struct true_false_set * true_false_set) +{ + { + int i = 0; + for (; i < true_false_set->size; i++) + { + int temp = true_false_set->data[i].true_branch_state; + true_false_set->data[i].true_branch_state = true_false_set->data[i].false_branch_state; + true_false_set->data[i].false_branch_state = temp; + } + } +} + +static void true_false_set_swap(struct true_false_set * a, struct true_false_set * b) +{ + struct true_false_set temp = *a; + *a = *b; + *b = temp; +} + +static int find_item_index_by_expression(struct true_false_set * a, struct expression * p_expression) +{ + { + int i = 0; + for (; i < a->size; i++) + { + if (a->data[i].p_expression == p_expression) + { + return i; + } + } + } + return -1; +} + +void true_false_set_merge(struct true_false_set * result, struct true_false_set * a, struct true_false_set * b, int options_true, int options_false) +{ + { + int i = 0; + for (; i < a->size; i++) + { + struct true_false_set_item * p_item_a = &a->data[i]; + struct true_false_set_item new_item = {0}; + new_item.p_expression = p_item_a->p_expression; + if (options_true & 1) + { + new_item.true_branch_state = p_item_a->true_branch_state; + } + if (options_true & 2) + { + new_item.true_branch_state = p_item_a->false_branch_state; + } + if (options_false & 1) + { + new_item.false_branch_state = p_item_a->true_branch_state; + } + if (options_false & 2) + { + new_item.true_branch_state = p_item_a->false_branch_state; + } + true_false_set_push_back(result, &new_item); + } + } + { + int k = 0; + for (; k < b->size; k++) + { + struct true_false_set_item * p_item_b = &b->data[k]; + int index = find_item_index_by_expression(result, p_item_b->p_expression); + if (index == -1) + { + index = result->size; + struct true_false_set_item item2 = {0}; + item2.p_expression = p_item_b->p_expression; + true_false_set_push_back(result, &item2); + } + struct true_false_set_item * p_item_result = &result->data[index]; + if (options_true & 4) + { + p_item_result->true_branch_state = p_item_b->true_branch_state; + } + if (options_true & 8) + { + p_item_result->true_branch_state = p_item_b->false_branch_state; + } + if (options_false & 4) + { + p_item_result->false_branch_state = p_item_b->true_branch_state; + } + if (options_false & 8) + { + p_item_result->true_branch_state = p_item_b->false_branch_state; + } + } + } +} + +struct flow_object *expression_get_flow_object(struct flow_visit_ctx * ctx, struct expression * p_expression, unsigned char nullable_enabled); + +static void true_false_set_set_objects_to_core_branch(struct flow_visit_ctx * ctx, struct true_false_set * a, unsigned char nullable_enabled, unsigned char true_branch) +{ + { + int i = 0; + for (; i < a->size; i++) + { + if (a->data[i].p_expression != ((void *)0)) + { + struct flow_object * p_object = expression_get_flow_object(ctx, a->data[i].p_expression, nullable_enabled); + if (p_object) + { + if (p_object->current.state == 4 || p_object->current.state == 2 || p_object->current.state == 8 || p_object->current.state == 32 || p_object->current.state == 64 || p_object->current.state == 128) + { + continue; + } + int flag = true_branch ? a->data[i].true_branch_state : a->data[i].false_branch_state; + if ((flag & 1) && (flag & 2)) + { + } + else + { + if (flag & 2) + { + p_object->current.state = ~4; + p_object->current.state = ~8; + } + else + { + if (flag & 1) + { + p_object->current.state = ~2; + p_object->current.state = ~32; + } + } + } + } + } + } + } +} + +static void true_false_set_set_objects_to_true_branch(struct flow_visit_ctx * ctx, struct true_false_set * a, unsigned char nullable_enabled) +{ + true_false_set_set_objects_to_core_branch(ctx, a, nullable_enabled, 1); +} + +static void true_false_set_set_objects_to_false_branch(struct flow_visit_ctx * ctx, struct true_false_set * a, unsigned char nullable_enabled) +{ + true_false_set_set_objects_to_core_branch(ctx, a, nullable_enabled, 0); +} + +static void flow_visit_secondary_block(struct flow_visit_ctx * ctx, struct secondary_block * p_secondary_block); +unsigned char compiler_diagnostic_message(int w, struct parser_ctx * ctx, struct token * p_token, struct marker * p_marker, char * fmt, ...); +void flow_end_of_block_visit(struct flow_visit_ctx * ctx, struct type * p_type, unsigned char type_is_view, struct flow_object * p_object, struct token * position_token, char * previous_names); +unsigned char type_is_view(struct type * p_type); + +static void flow_exit_block_visit_defer_item(struct flow_visit_ctx * ctx, struct defer_list_item * p_item, struct token * position_token) +{ + if (p_item->defer_statement) + { + int error_count = ctx->ctx->p_report->error_count; + int warnings_count = ctx->ctx->p_report->warnings_count; + int info_count = ctx->ctx->p_report->info_count; + flow_visit_secondary_block(ctx, p_item->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(62, ctx->ctx, position_token, ((void *)0), "defer end of scope"); + } + } + else + { + if (p_item->declarator) + { + struct declarator * p_declarator = p_item->declarator; + char * name = p_declarator->name_opt ? p_declarator->name_opt->lexeme : "?"; + if (p_declarator->p_object) + { + flow_end_of_block_visit(ctx, &p_declarator->type, type_is_view(&p_declarator->type), p_declarator->p_object, position_token, name); + } + else + { + ; + } + } + } +} + +static void flow_exit_block_visit_defer_list(struct flow_visit_ctx * ctx, struct defer_list * p_defer_list, struct token * position_token) +{ + struct defer_list_item * p_item = p_defer_list->head; + while (p_item) + { + flow_exit_block_visit_defer_item(ctx, p_item, position_token); + p_item = p_item->next; + } +} + +void flow_object_set_end_of_lifetime(struct type * p_type, struct flow_object * p_object); + +static void flow_defer_item_set_end_of_lifetime(struct flow_visit_ctx * ctx, struct defer_list_item * p_item, struct token * position_token) +{ + if (p_item->defer_statement) + { + } + else + { + if (p_item->declarator) + { + struct declarator * p_declarator = p_item->declarator; + if (p_declarator->p_object) + { + flow_object_set_end_of_lifetime(&p_declarator->type, p_declarator->p_object); + } + else + { + ; + } + } + } +} + +static void flow_defer_list_set_end_of_lifetime(struct flow_visit_ctx * ctx, struct defer_list * p_defer_list, struct token * position_token) +{ + struct defer_list_item * p_item = p_defer_list->head; + while (p_item) + { + flow_defer_item_set_end_of_lifetime(ctx, p_item, position_token); + p_item = p_item->next; + } +} + +static void flow_visit_statement(struct flow_visit_ctx * ctx, struct statement * p_statement); + +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); +} + +static void flow_visit_defer_statement(struct flow_visit_ctx * ctx, struct defer_statement * p_defer_statement) +{ +} + +void flow_object_add_new_state_as_a_copy_of_current_state(struct flow_object * object, char * name, int state_number); + +static int arena_add_copy_of_current_state(struct flow_visit_ctx * ctx, char * name) +{ + int state_number = ctx->state_number_generator; + ctx->state_number_generator++; + { + int i = 0; + for (; i < ctx->arena.size; i++) + { + flow_object_add_new_state_as_a_copy_of_current_state(ctx->arena.data[i], name, state_number); + } + } + return state_number; +} + +void *calloc(int nmemb, unsigned int size); +int flow_object_add_state(struct flow_object * p, struct flow_object_state * pnew); + +static int arena_add_empty_state(struct flow_visit_ctx * ctx, char * name) +{ + int state_number = ctx->state_number_generator; + ctx->state_number_generator++; + { + int i = 0; + for (; i < ctx->arena.size; i++) + { + struct flow_object * p_object = ctx->arena.data[i]; + struct flow_object_state * p_flow_object_state = calloc(1, sizeof *p_flow_object_state); + if (p_flow_object_state) + { + p_flow_object_state->dbg_name = name; + p_flow_object_state->state_number = state_number; + flow_object_add_state(p_object, p_flow_object_state); + } + } + } + return state_number; +} + +void flow_object_state_copy(struct flow_object_state * to, struct flow_object_state * from); + +void flow_object_set_state_from_current(struct flow_object * object, int state_number) +{ + struct flow_object_state * p_flow_object_state = object->current.next; + while (p_flow_object_state) + { + if (p_flow_object_state->state_number == state_number) + { + flow_object_state_copy(p_flow_object_state, &object->current); + break; + } + p_flow_object_state = p_flow_object_state->next; + } +} + +static void arena_set_state_from_current(struct flow_visit_ctx * ctx, int number_state) +{ + { + int i = 0; + for (; i < ctx->arena.size; i++) + { + struct flow_object * p_object = ctx->arena.data[i]; + flow_object_set_state_from_current(p_object, number_state); + } + } +} + +struct flow_object *arena_new_object(struct flow_visit_ctx * ctx); +int objects_view_push_back(struct flow_objects_view * p, struct flow_object * p_object); + +static int flow_object_merge_current_with_state(struct flow_visit_ctx * ctx, struct flow_object * object, int state_number) +{ + if (1) + { + struct flow_object_state * it = object->current.next; + while (it) + { + if (it->state_number == state_number) + { + it->state = object->current.state; + if (object->current.pointed == ((void *)0) && it->pointed == ((void *)0)) + { + } + else + { + if (object->current.pointed == ((void *)0) && it->pointed != ((void *)0)) + { + } + else + { + if (object->current.pointed != ((void *)0) && it->pointed == ((void *)0)) + { + it->pointed = object->current.pointed; + } + else + { + if (object->current.pointed != it->pointed) + { + ; + ; + struct flow_object * p_new_object = arena_new_object(ctx); + if (p_new_object == ((void *)0)) + { + goto _catch_label_1; + } + struct flow_object_state * p_new_state = calloc(1, sizeof *p_new_state); + if (p_new_state == ((void *)0)) + { + goto _catch_label_1; + } + p_new_state->dbg_name = "merged"; + p_new_state->state_number = state_number; + objects_view_push_back(&p_new_state->alternatives, object->current.pointed); + objects_view_push_back(&p_new_state->alternatives, it->pointed); + flow_object_add_state(p_new_object, p_new_state); + int n_childs_1 = object->current.pointed->members.size; + int n_childs_2 = it->pointed->members.size; + if (n_childs_1 == n_childs_2) + { + { + int j = 0; + for (; j < n_childs_1; j++) + { + struct flow_object * p_new_child = arena_new_object(ctx); + if (p_new_child == ((void *)0)) + { + goto _catch_label_1; + } + p_new_child->parent = p_new_object; + struct flow_object * child1 = object->current.pointed->members.data[j]; + struct flow_object * child2 = it->pointed->members.data[j]; + struct flow_object_state * p_child_new_state = calloc(1, sizeof *p_child_new_state); + if (p_child_new_state == ((void *)0)) + { + goto _catch_label_1; + } + p_child_new_state->dbg_name = "merged"; + p_child_new_state->state_number = state_number; + p_child_new_state->state = child1->current.state | it->state; + objects_view_push_back(&p_child_new_state->alternatives, child1); + objects_view_push_back(&p_child_new_state->alternatives, child2); + flow_object_add_state(p_new_child, p_child_new_state); + objects_view_push_back(&p_new_object->members, p_new_child); + } + } + } + else + { + } + it->pointed = p_new_object; + } + } + } + } + break; + } + it = it->next; + } + } + else _catch_label_1: + { + } + return 0; +} + +static void arena_merge_current_state_with_state_number(struct flow_visit_ctx * ctx, int number_state) +{ + { + int i = 0; + for (; i < ctx->arena.size; i++) + { + flow_object_merge_current_with_state(ctx, ctx->arena.data[i], number_state); + } + } +} + +static void object_restore_current_state_from2(struct flow_visit_ctx * ctx, struct flow_object * object, int state_number) +{ + struct flow_object_state * it = object->current.next; + while (it) + { + if (it->state_number == state_number) + { + flow_object_state_copy(&object->current, it); + break; + } + it = it->next; + } +} + +static void arena_restore_current_state_from(struct flow_visit_ctx * ctx, int number_state) +{ + { + int i = 0; + for (; i < ctx->arena.size; i++) + { + object_restore_current_state_from2(ctx, ctx->arena.data[i], number_state); + } + } +} + +void flow_object_remove_state(struct flow_object * object, int state_number); + +static void arena_remove_state(struct flow_visit_ctx * ctx, int state_number) +{ + { + int i = 0; + for (; i < ctx->arena.size; i++) + { + flow_object_remove_state(ctx->arena.data[i], state_number); + } + } +} + +void flow_object_set_zero(struct type * p_type, struct flow_object * p_object); + +static void braced_initializer_set_object(struct braced_initializer * p, struct type * type, struct flow_object * object) +{ + if (p->initializer_list == ((void *)0)) + { + } + flow_object_set_zero(type, object); +} + +static void flow_visit_declarator(struct flow_visit_ctx * ctx, struct declarator * p_declarator); +static void flow_visit_expression(struct flow_visit_ctx * ctx, struct expression * p_expression, struct true_false_set * a); +static void flow_visit_bracket_initializer_list(struct flow_visit_ctx * ctx, struct braced_initializer * p_bracket_initializer_list); +void flow_check_assignment(struct flow_visit_ctx * ctx, struct token * error_position, struct marker * p_a_marker, struct marker * p_b_marker, int assigment_type, unsigned char check_uninitialized_b, unsigned char a_type_is_view, unsigned char a_type_is_nullable, struct type * p_a_type, struct flow_object * p_a_object, struct type * p_b_type, struct flow_object * p_b_object, unsigned char * set_argument_to_unkown); +unsigned char type_is_nullable(struct type * p_type, unsigned char nullable_enabled); +unsigned char expression_is_malloc(struct expression * p); +struct type type_remove_pointer(struct type * p_type); +struct flow_object *make_flow_object(struct flow_visit_ctx * ctx, struct type * p_type, struct declarator * p_declarator_opt, struct expression * p_expression_origin); +void object_set_pointer(struct flow_object * p_object, struct flow_object * p_object2); +void type_destroy(struct type * p_type); +unsigned char expression_is_calloc(struct expression * p); +void flow_object_set_uninitialized(struct type * p_type, struct flow_object * p_object); + +static void flow_visit_init_declarator(struct flow_visit_ctx * ctx, struct init_declarator * p_init_declarator) +{ + unsigned char nullable_enabled = ctx->ctx->options.null_checks_enabled; + if (1) + { + flow_visit_declarator(ctx, p_init_declarator->p_declarator); + if (p_init_declarator->initializer) + { + if (p_init_declarator->initializer->assignment_expression) + { + struct true_false_set a = {0}; + flow_visit_expression(ctx, p_init_declarator->initializer->assignment_expression, &a); + true_false_set_destroy(&a); + } + else + { + if (p_init_declarator->initializer->braced_initializer) + { + flow_visit_bracket_initializer_list(ctx, p_init_declarator->initializer->braced_initializer); + } + else + { + ; + } + } + } + if (p_init_declarator->p_declarator->type.category != 1) + { + if (p_init_declarator->initializer && p_init_declarator->initializer->assignment_expression) + { + struct flow_object * p_right_object = expression_get_flow_object(ctx, p_init_declarator->initializer->assignment_expression, nullable_enabled); + if (p_right_object) + { + struct marker a_marker = {0, 0, 0, 0, 0, 0, 0}; + a_marker.p_token_begin = p_init_declarator->p_declarator->first_token_opt; + a_marker.p_token_end = p_init_declarator->p_declarator->last_token_opt; + struct marker b_marker = {0, 0, 0, 0, 0, 0, 0}; + b_marker.p_token_begin = p_init_declarator->initializer->assignment_expression->first_token; + b_marker.p_token_end = p_init_declarator->initializer->assignment_expression->last_token; + ; + flow_check_assignment(ctx, p_init_declarator->initializer->assignment_expression->first_token, &a_marker, &b_marker, 2, 0, type_is_view(&p_init_declarator->p_declarator->type), type_is_nullable(&p_init_declarator->p_declarator->type, ctx->ctx->options.null_checks_enabled), &p_init_declarator->p_declarator->type, p_init_declarator->p_declarator->p_object, &p_init_declarator->initializer->assignment_expression->type, p_right_object, ((void *)0)); + } + if (expression_is_malloc(p_init_declarator->initializer->assignment_expression)) + { + struct type t = type_remove_pointer(&p_init_declarator->p_declarator->type); + struct flow_object * po = make_flow_object(ctx, &t, p_init_declarator->p_declarator, ((void *)0)); + object_set_pointer(p_init_declarator->p_declarator->p_object, po); + type_destroy(&t); + p_init_declarator->p_declarator->p_object->current.state = 4 | 2; + } + else + { + if (expression_is_calloc(p_init_declarator->initializer->assignment_expression)) + { + struct type t = type_remove_pointer(&p_init_declarator->p_declarator->type); + struct flow_object * po = make_flow_object(ctx, &t, p_init_declarator->p_declarator, ((void *)0)); + if (po == ((void *)0)) + { + type_destroy(&t); + goto _catch_label_1; + } + flow_object_set_zero(&t, po); + object_set_pointer(p_init_declarator->p_declarator->p_object, po); + type_destroy(&t); + p_init_declarator->p_declarator->p_object->current.state = 4 | 2; + } + } + } + else + { + if (p_init_declarator->initializer && p_init_declarator->initializer->braced_initializer) + { + struct flow_object * po = make_flow_object(ctx, &p_init_declarator->p_declarator->type, p_init_declarator->p_declarator, ((void *)0)); + if (po == ((void *)0)) + { + goto _catch_label_1; + } + braced_initializer_set_object(p_init_declarator->initializer->braced_initializer, &p_init_declarator->p_declarator->type, po); + struct marker a_marker = {0, 0, 0, 0, 0, 0, 0}; + a_marker.p_token_begin = p_init_declarator->p_declarator->first_token_opt; + a_marker.p_token_end = p_init_declarator->p_declarator->last_token_opt; + struct marker b_marker = {0, 0, 0, 0, 0, 0, 0}; + b_marker.p_token_begin = p_init_declarator->initializer->braced_initializer->first_token; + b_marker.p_token_end = p_init_declarator->initializer->braced_initializer->last_token; + struct flow_object * p_right_object = po; + flow_check_assignment(ctx, p_init_declarator->p_declarator->first_token_opt, &a_marker, &b_marker, 2, 0, type_is_view(&p_init_declarator->p_declarator->type), type_is_nullable(&p_init_declarator->p_declarator->type, ctx->ctx->options.null_checks_enabled), &p_init_declarator->p_declarator->type, p_init_declarator->p_declarator->p_object, &p_init_declarator->p_declarator->type, p_right_object, ((void *)0)); + } + else + { + if (p_init_declarator->p_declarator->declaration_specifiers && ((p_init_declarator->p_declarator->declaration_specifiers->storage_class_specifier_flags & 2) || (p_init_declarator->p_declarator->declaration_specifiers->storage_class_specifier_flags & 4))) + { + flow_object_set_zero(&p_init_declarator->p_declarator->type, p_init_declarator->p_declarator->p_object); + } + else + { + flow_object_set_uninitialized(&p_init_declarator->p_declarator->type, p_init_declarator->p_declarator->p_object); + } + } + } + } + } + else _catch_label_1: + { + } +} + +static void flow_visit_declaration_specifiers(struct flow_visit_ctx * ctx, struct declaration_specifiers * p_declaration_specifiers, struct type * p_type); +static void flow_visit_init_declarator_list(struct flow_visit_ctx * ctx, struct init_declarator_list * p_init_declarator_list); + +static void flow_visit_simple_declaration(struct flow_visit_ctx * ctx, struct simple_declaration * p_simple_declaration) +{ + flow_visit_declaration_specifiers(ctx, p_simple_declaration->p_declaration_specifiers, ((void *)0)); + flow_visit_init_declarator_list(ctx, &p_simple_declaration->init_declarator_list); +} + + + +int __stdio_common_vfprintf(unsigned __int64 _Options, struct _iobuf * _Stream, char * _Format, struct __crt_locale_pointers * _Locale, char * _ArgList); + +inline unsigned __int64 *__local_stdio_printf_options(void) +{ + static unsigned __int64 _OptionsStorage; + return &_OptionsStorage; +} +inline int _vfprintf_l(struct _iobuf * _Stream, char * _Format, struct __crt_locale_pointers * _Locale, char * _ArgList) +{ + return __stdio_common_vfprintf(( *__local_stdio_printf_options()), _Stream, _Format, _Locale, _ArgList); +} +struct _iobuf *__acrt_iob_func(unsigned int _Ix); +inline int printf(char * _Format, ...) +{ + int _Result; + char * _ArgList; + ((void)(_ArgList = (char *)(&(_Format)) + ((sizeof (_Format) + sizeof (int) - 1) & ~(sizeof (int) - 1)))); + _Result = _vfprintf_l((__acrt_iob_func(1)), _Format, ((void *)0), _ArgList); + ((void)(_ArgList = (char *)0)); + return _Result; +} +void print_object_line(struct flow_object * p_object, int cols); + +void print_arena(struct flow_visit_ctx * ctx) +{ + int extra_cols = 0; + { + int i = 0; + for (; i < ctx->arena.size; i++) + { + struct flow_object * p_object = ctx->arena.data[i]; + struct flow_object_state * p_state = p_object->current.next; + int count = 0; + while (p_state) + { + count++; + p_state = p_state->next; + } + if (count > extra_cols) + { + extra_cols = count; + } + } + } + printf("\n"); + printf("\xe2\x94\x8c\xe2\x94\x80\xe2\x94\x80\xe2\x94\xac\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\xac\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80"); + if (extra_cols > 0) + { + { + int i = 0; + for (; i < extra_cols; i++) + { + if (i < extra_cols - 1) + { + printf("\xe2\x94\xac\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80"); + } + else + { + printf("\xe2\x94\xac\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80"); + } + } + } + } + printf("\xe2\x94\x90"); + printf("\n"); + { + int i = 0; + for (; i < ctx->arena.size; i++) + { + struct flow_object * p = ctx->arena.data[i]; + print_object_line(p, extra_cols); + } + } + printf("\xe2\x94\x94\xe2\x94\x80\xe2\x94\x80\xe2\x94\xb4\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\xb4\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80"); + if (extra_cols > 0) + { + { + int i = 0; + for (; i < extra_cols; i++) + { + if (i < extra_cols - 1) + { + printf("\xe2\x94\xb4\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80"); + } + else + { + printf("\xe2\x94\xb4\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80\xe2\x94\x80"); + } + } + } + } + printf("\xe2\x94\x98"); + printf("\n"); + printf("\n"); +} + +static void flow_visit_expression_statement(struct flow_visit_ctx * ctx, struct expression_statement * p_expression_statement); +static void flow_check_pointer_used_as_bool(struct flow_visit_ctx * ctx, struct expression * p_expression); +unsigned char secondary_block_ends_with_jump(struct secondary_block * p_secondary_block); + +static void flow_visit_if_statement(struct flow_visit_ctx * ctx, struct selection_statement * p_selection_statement) +{ + unsigned char nullable_enabled = ctx->ctx->options.null_checks_enabled; + if (p_selection_statement->p_init_statement && p_selection_statement->p_init_statement->p_expression_statement) + { + flow_visit_expression_statement(ctx, p_selection_statement->p_init_statement->p_expression_statement); + } + if (p_selection_statement->p_init_statement && p_selection_statement->p_init_statement->p_simple_declaration) + { + flow_visit_simple_declaration(ctx, p_selection_statement->p_init_statement->p_simple_declaration); + } + struct true_false_set true_false_set = {0}; + if (p_selection_statement->condition && p_selection_statement->condition->expression) + { + flow_check_pointer_used_as_bool(ctx, p_selection_statement->condition->expression); + flow_visit_expression(ctx, p_selection_statement->condition->expression, &true_false_set); + } + if (p_selection_statement->condition && p_selection_statement->condition->p_init_declarator) + { + flow_visit_init_declarator(ctx, p_selection_statement->condition->p_init_declarator); + } + ; + int before_if_state_number = arena_add_copy_of_current_state(ctx, "before-if"); + true_false_set_set_objects_to_true_branch(ctx, &true_false_set, nullable_enabled); + flow_visit_secondary_block(ctx, p_selection_statement->secondary_block); + unsigned char true_branch_ends_with_jump = secondary_block_ends_with_jump(p_selection_statement->secondary_block); + int left_true_branch_state_number = arena_add_copy_of_current_state(ctx, "left-true-branch"); + arena_restore_current_state_from(ctx, before_if_state_number); + if (p_selection_statement->else_secondary_block_opt) + { + true_false_set_set_objects_to_false_branch(ctx, &true_false_set, nullable_enabled); + flow_visit_secondary_block(ctx, p_selection_statement->else_secondary_block_opt); + } + else + { + true_false_set_set_objects_to_false_branch(ctx, &true_false_set, nullable_enabled); + } + unsigned char else_ends_with_jump = p_selection_statement->else_secondary_block_opt ? secondary_block_ends_with_jump(p_selection_statement->else_secondary_block_opt) : 0; + if (true_branch_ends_with_jump) + { + if (else_ends_with_jump) + { + } + else + { + } + } + else + { + if (else_ends_with_jump) + { + arena_restore_current_state_from(ctx, left_true_branch_state_number); + } + else + { + arena_merge_current_state_with_state_number(ctx, left_true_branch_state_number); + arena_restore_current_state_from(ctx, left_true_branch_state_number); + } + } + flow_exit_block_visit_defer_list(ctx, &p_selection_statement->defer_list, p_selection_statement->last_token); + flow_defer_list_set_end_of_lifetime(ctx, &p_selection_statement->defer_list, p_selection_statement->last_token); + arena_remove_state(ctx, before_if_state_number); + arena_remove_state(ctx, left_true_branch_state_number); + true_false_set_destroy(&true_false_set); +} + +static void flow_visit_try_statement(struct flow_visit_ctx * ctx, struct try_statement * p_try_statement) +{ + if (1) + { + int throw_join_state_old = ctx->throw_join_state; + struct secondary_block * catch_secondary_block_old = ctx->catch_secondary_block_opt; + ctx->catch_secondary_block_opt = p_try_statement->catch_secondary_block_opt; + ctx->throw_join_state = arena_add_empty_state(ctx, "try"); + int original_state_number = arena_add_copy_of_current_state(ctx, "original"); + flow_visit_secondary_block(ctx, p_try_statement->secondary_block); + arena_set_state_from_current(ctx, original_state_number); + if (p_try_statement->catch_secondary_block_opt) + { + arena_restore_current_state_from(ctx, ctx->throw_join_state); + flow_visit_secondary_block(ctx, p_try_statement->catch_secondary_block_opt); + } + unsigned char try_reached_the_end = !secondary_block_ends_with_jump(p_try_statement->secondary_block); + unsigned char catch_reached_the_end = !secondary_block_ends_with_jump(p_try_statement->catch_secondary_block_opt); + if (try_reached_the_end && catch_reached_the_end) + { + arena_merge_current_state_with_state_number(ctx, original_state_number); + arena_restore_current_state_from(ctx, original_state_number); + } + else + { + if (try_reached_the_end) + { + arena_restore_current_state_from(ctx, original_state_number); + } + else + { + if (catch_reached_the_end) + { + } + } + } + arena_remove_state(ctx, original_state_number); + arena_remove_state(ctx, ctx->throw_join_state); + ctx->throw_join_state = throw_join_state_old; + ctx->catch_secondary_block_opt = catch_secondary_block_old; + } + else _catch_label_1: + { + } +} + +static void flow_visit_switch_statement(struct flow_visit_ctx * ctx, struct selection_statement * p_selection_statement) +{ + int old_initial_state = ctx->initial_state; + int old_break_join_state = ctx->break_join_state; + ctx->initial_state = arena_add_copy_of_current_state(ctx, "original"); + ctx->break_join_state = arena_add_empty_state(ctx, "break join"); + flow_visit_secondary_block(ctx, p_selection_statement->secondary_block); + unsigned char reached_the_end = !secondary_block_ends_with_jump(p_selection_statement->secondary_block); + if ( !reached_the_end) + { + arena_restore_current_state_from(ctx, ctx->break_join_state); + } + flow_exit_block_visit_defer_list(ctx, &p_selection_statement->defer_list, p_selection_statement->secondary_block->last_token); + flow_defer_list_set_end_of_lifetime(ctx, &p_selection_statement->defer_list, p_selection_statement->secondary_block->last_token); + arena_remove_state(ctx, ctx->initial_state); + arena_remove_state(ctx, ctx->break_join_state); + ctx->initial_state = old_initial_state; + ctx->break_join_state = old_break_join_state; +} + +static void flow_visit_selection_statement(struct flow_visit_ctx * ctx, struct selection_statement * p_selection_statement) +{ + if (p_selection_statement->first_token->type == 9017) + { + flow_visit_if_statement(ctx, p_selection_statement); + } + else + { + if (p_selection_statement->first_token->type == 9034) + { + flow_visit_switch_statement(ctx, p_selection_statement); + } + else + { + ; + } + } +} + +static void flow_visit_initializer_list(struct flow_visit_ctx * ctx, struct initializer_list * p_initializer_list); + +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 == ((void *)0)) + { + } + 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) +{ +} + +static void flow_visit_initializer(struct flow_visit_ctx * ctx, struct initializer * p_initializer); + +static void flow_visit_initializer_list_item(struct flow_visit_ctx * ctx, struct initializer_list_item * p_initializer) +{ + if (p_initializer->designation) + { + flow_visit_designation(ctx, p_initializer->designation); + } + if (p_initializer->initializer) + { + flow_visit_initializer(ctx, p_initializer->initializer); + } +} + +static void flow_visit_initializer(struct flow_visit_ctx * ctx, struct initializer * p_initializer) +{ + if (p_initializer->assignment_expression) + { + struct true_false_set a = {0}; + flow_visit_expression(ctx, p_initializer->assignment_expression, &a); + true_false_set_destroy(&a); + } + 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_list_item * p_initializer = p_initializer_list->head; + while (p_initializer) + { + flow_visit_initializer_list_item(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) +{ +} + +static void flow_visit_type_specifier(struct flow_visit_ctx * ctx, struct type_specifier * p_type_specifier); + +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_qualifier) + { + flow_visit_type_qualifier(ctx, p_specifier_qualifier->type_qualifier); + } +} + +static void flow_visit_struct_or_union_specifier(struct flow_visit_ctx * ctx, struct struct_or_union_specifier * p_struct_or_union_specifier); +static void flow_visit_enum_specifier(struct flow_visit_ctx * ctx, struct enum_specifier * p_enum_specifier); + +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 == ((void *)0)) + { + 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) + { + } + 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_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->abstract_declarator); +} + +static void flow_visit_generic_selection(struct flow_visit_ctx * ctx, struct generic_selection * p_generic_selection) +{ + if (p_generic_selection->expression) + { + struct true_false_set a = {0}; + flow_visit_expression(ctx, p_generic_selection->expression, &a); + true_false_set_destroy(&a); + } + else + { + if (p_generic_selection->type_name) + { + flow_visit_type_name(ctx, p_generic_selection->type_name); + } + } +} + +struct param_list *type_get_func_or_func_ptr_params(struct type * p_type); +void diagnostic_remove(struct diagnostic * d, int w); +void checked_read_object(struct flow_visit_ctx * ctx, struct type * p_type, unsigned char is_nullable, struct flow_object * p_object, struct token * position_token, struct marker * p_marker, unsigned char check_pointed_object); +unsigned char type_is_pointer(struct type * p_type); +void flow_object_set_unknown(struct type * p_type, unsigned char t_is_nullable, struct flow_object * p_object, unsigned char nullable_enabled); + +static void compare_function_arguments3(struct flow_visit_ctx * ctx, struct type * p_type, struct argument_expression_list * p_argument_expression_list) +{ + if (1) + { + unsigned char nullable_enabled = ctx->ctx->options.null_checks_enabled; + struct param_list * p_param_list = type_get_func_or_func_ptr_params(p_type); + if (p_param_list == ((void *)0)) + { + goto _catch_label_1; + } + struct param * p_current_parameter_type = p_param_list->head; + struct argument_expression * p_current_argument = p_argument_expression_list->head; + while (p_current_argument && p_current_parameter_type) + { + struct true_false_set a = {0}; + struct diagnostic temp = ctx->ctx->options.diagnostic_stack.stack[ctx->ctx->options.diagnostic_stack.top_index]; + diagnostic_remove(&ctx->ctx->options.diagnostic_stack.stack[ctx->ctx->options.diagnostic_stack.top_index], 29); + flow_visit_expression(ctx, p_current_argument->expression, &a); + ctx->ctx->options.diagnostic_stack.stack[ctx->ctx->options.diagnostic_stack.top_index] = temp; + true_false_set_destroy(&a); + struct flow_object * p_argument_object = expression_get_flow_object(ctx, p_current_argument->expression, nullable_enabled); + if (p_argument_object) + { + struct flow_object * parameter_object = make_flow_object(ctx, &p_current_parameter_type->type, ((void *)0), p_current_argument->expression); + if (parameter_object == ((void *)0)) + { + goto _catch_label_1; + } + flow_object_set_uninitialized(&p_current_parameter_type->type, parameter_object); + struct marker a_marker = {0, 0, 0, 0, 0, 0, 0}; + a_marker.p_token_begin = p_current_argument->expression->first_token; + a_marker.p_token_end = p_current_argument->expression->last_token; + struct marker b_marker = {0, 0, 0, 0, 0, 0, 0}; + b_marker.p_token_begin = p_current_argument->expression->first_token; + b_marker.p_token_end = p_current_argument->expression->last_token; + flow_check_assignment(ctx, p_current_argument->expression->first_token, &a_marker, &b_marker, 1, 1, type_is_view(&p_current_parameter_type->type), type_is_nullable(&p_current_parameter_type->type, ctx->ctx->options.null_checks_enabled), &p_current_parameter_type->type, parameter_object, &p_current_argument->expression->type, p_argument_object, &p_current_argument->set_unkown); + } + p_current_argument = p_current_argument->next; + p_current_parameter_type = p_current_parameter_type->next; + } + while (p_current_argument) + { + struct flow_object * p_argument_object = expression_get_flow_object(ctx, p_current_argument->expression, nullable_enabled); + if (p_argument_object) + { + struct marker marker = {0, 0, 0, 0, 0, 0, 0}; + marker.p_token_begin = p_current_argument->expression->first_token; + marker.p_token_end = p_current_argument->expression->last_token; + checked_read_object(ctx, &p_current_argument->expression->type, type_is_nullable(&p_current_argument->expression->type, ctx->ctx->options.null_checks_enabled), p_argument_object, p_current_argument->expression->first_token, &marker, 0); + } + else + { + } + p_current_argument = p_current_argument->next; + } + p_current_parameter_type = p_param_list->head; + p_current_argument = p_argument_expression_list->head; + while (p_current_argument && p_current_parameter_type) + { + if (p_current_argument->set_unkown && type_is_pointer(&p_current_argument->expression->type)) + { + struct type pointed_type = type_remove_pointer(&p_current_argument->expression->type); + struct flow_object * p_argument_object = expression_get_flow_object(ctx, p_current_argument->expression, nullable_enabled); + if (p_argument_object) + { + unsigned char argument_type_is_nullable = type_is_nullable(&pointed_type, ctx->ctx->options.null_checks_enabled); + if (p_argument_object->current.pointed) + { + flow_object_set_unknown(&pointed_type, argument_type_is_nullable, p_argument_object->current.pointed, ctx->ctx->options.null_checks_enabled); + } + else + { + } + } + type_destroy(&pointed_type); + } + p_current_argument = p_current_argument->next; + p_current_parameter_type = p_current_parameter_type->next; + } + while (p_current_argument) + { + struct flow_object * p_argument_object = expression_get_flow_object(ctx, p_current_argument->expression, nullable_enabled); + if (p_argument_object) + { + } + else + { + } + p_current_argument = p_current_argument->next; + } + } + else _catch_label_1: + { + } +} + +unsigned char type_is_function(struct type * p_type); +unsigned char type_is_void(struct type * p_type); +unsigned char type_is_nullptr_t(struct type * p_type); + +static void check_uninitialized(struct flow_visit_ctx * ctx, struct expression * p_expression) +{ + if (p_expression->is_assignment_expression) + { + return; + } + unsigned char nullable_enabled = ctx->ctx->options.null_checks_enabled; + if (type_is_function(&p_expression->type) || type_is_void(&p_expression->type) || type_is_nullptr_t(&p_expression->type)) + { + return; + } + struct flow_object * p_object = expression_get_flow_object(ctx, p_expression, nullable_enabled); + if ( !ctx->expression_is_not_evaluated) + { + if (p_object && p_object->current.state == 1) + { + if (p_expression->expression_type == 2 && p_expression->declarator && p_expression->declarator->name_opt) + { + compiler_diagnostic_message(29, ctx->ctx, p_expression->first_token, ((void *)0), "using a uninitialized object '%s'", p_expression->declarator->name_opt->lexeme); + } + else + { + compiler_diagnostic_message(29, ctx->ctx, p_expression->first_token, ((void *)0), "using a uninitialized object"); + } + } + else + { + if (p_object && p_object->current.state & 1) + { + if (ctx->ctx->options.ownership_enabled) + { + if (p_expression->declarator && p_expression->declarator->name_opt) + { + compiler_diagnostic_message(29, ctx->ctx, p_expression->first_token, ((void *)0), "object '%s' can be uninitialized ", p_expression->declarator->name_opt->lexeme); + } + else + { + compiler_diagnostic_message(29, ctx->ctx, p_expression->first_token, ((void *)0), "maybe using a uninitialized object"); + } + } + } + } + } +} + +void flow_object_push_states_from(struct flow_object * p_object_from, struct flow_object * p_object_to) +{ + struct flow_object_state * it_from = p_object_from->current.next; + while (it_from) + { + it_from = it_from->next; + } + { + int i = 0; + for (; i < p_object_to->members.size; i++) + { + flow_object_push_states_from(p_object_from, p_object_to->members.data[i]); + } + } +} + +unsigned char flow_object_is_null(struct flow_object * p); +unsigned char flow_object_is_not_null(struct flow_object * p); + +static void flow_check_pointer_used_as_bool(struct flow_visit_ctx * ctx, struct expression * p_expression) +{ + unsigned char nullable_enabled = ctx->ctx->options.null_checks_enabled; + if (type_is_pointer(&p_expression->type)) + { + struct flow_object * p_object = expression_get_flow_object(ctx, p_expression, nullable_enabled); + if (p_object) + { + struct marker marker = {0, 0, 0, 0, 0, 0, 0}; + marker.p_token_begin = p_expression->first_token; + marker.p_token_end = p_expression->last_token; + if (flow_object_is_null(p_object)) + { + compiler_diagnostic_message(27, ctx->ctx, ((void *)0), &marker, "pointer is always null"); + } + else + { + if (flow_object_is_not_null(p_object)) + { + compiler_diagnostic_message(27, ctx->ctx, ((void *)0), &marker, "pointer is always not-null"); + } + } + } + } +} + +void flow_object_update_current(struct flow_object * p); + +static void arena_broadcast_change(struct flow_visit_ctx * ctx, struct flow_object * p) +{ + { + int i = 0; + for (; i < ctx->arena.size; i++) + { + struct flow_object * p_obj = ctx->arena.data[i]; + if (p_obj) + { + { + int j = 0; + for (; j < p_obj->current.alternatives.size; j++) + { + if (p_obj->current.alternatives.data[j] == p) + { + flow_object_update_current(p_obj); + break; + } + } + } + } + } + } +} + +unsigned char flow_object_can_be_null(struct flow_object * p); +unsigned char flow_object_can_be_uninitialized(struct flow_object * p); +unsigned char flow_object_can_have_its_lifetime_ended(struct flow_object * p); +unsigned char flow_object_is_zero(struct flow_object * p); +static void flow_visit_compound_statement(struct flow_visit_ctx * ctx, struct compound_statement * p_compound_statement); +void flow_object_swap(struct flow_object * a, struct flow_object * b); +unsigned char flow_object_can_be_zero(struct flow_object * p); +unsigned char object_has_constant_value(struct object * a); +signed long long object_to_signed_long_long(struct object * a); +unsigned char flow_object_is_not_zero(struct flow_object * p); + +static void flow_visit_expression(struct flow_visit_ctx * ctx, struct expression * p_expression, struct true_false_set * expr_true_false_set) +{ + true_false_set_clear(expr_true_false_set); + unsigned char nullable_enabled = ctx->ctx->options.null_checks_enabled; + switch (p_expression->expression_type) + { + case 0 : + ; + break; + case 4 : + break; + case 1 : + break; + case 2 : + { + struct true_false_set_item item = {0}; + item.p_expression = p_expression; + item.true_branch_state = 1; + item.false_branch_state = 2; + true_false_set_push_back(expr_true_false_set, &item); + check_uninitialized(ctx, p_expression); + } + break; + case 9 : + ; + flow_visit_expression(ctx, p_expression->right, expr_true_false_set); + break; + case 3 : + case 5 : + case 8 : + case 6 : + break; + case 7 : + ; + flow_visit_generic_selection(ctx, p_expression->generic_selection); + break; + case 14 : + { + ; + struct true_false_set left_set = {0}; + flow_visit_expression(ctx, p_expression->left, &left_set); + true_false_set_destroy(&left_set); + struct true_false_set_item item; + item.p_expression = p_expression; + item.true_branch_state = 1; + item.false_branch_state = 2; + true_false_set_push_back(expr_true_false_set, &item); + } + break; + case 15 : + { + ; + struct true_false_set left_set = {0}; + flow_visit_expression(ctx, p_expression->left, &left_set); + true_false_set_destroy(&left_set); + struct flow_object * p_object = expression_get_flow_object(ctx, p_expression->left, nullable_enabled); + if (p_object != ((void *)0)) + { + if (flow_object_can_be_null(p_object)) + { + if (ctx->expression_is_not_evaluated) + { + } + else + { + struct marker marker = {0}; + marker.p_token_begin = p_expression->left->first_token; + marker.p_token_end = p_expression->left->last_token; + compiler_diagnostic_message(32, ctx->ctx, ((void *)0), &marker, "pointer may be null"); + } + } + else + { + if (flow_object_can_be_uninitialized(p_object)) + { + if (ctx->expression_is_not_evaluated) + { + } + else + { + compiler_diagnostic_message(32, ctx->ctx, p_expression->left->first_token, ((void *)0), "object is possibly uninitialized"); + } + } + else + { + if (flow_object_can_have_its_lifetime_ended(p_object)) + { + if (ctx->expression_is_not_evaluated) + { + } + else + { + compiler_diagnostic_message(30, ctx->ctx, p_expression->left->first_token, ((void *)0), "object lifetime ended"); + } + } + } + } + } + if ( !ctx->expression_is_not_evaluated) + { + struct flow_object * p_object2 = expression_get_flow_object(ctx, p_expression, nullable_enabled); + if (p_object2 && flow_object_can_have_its_lifetime_ended(p_object2)) + { + struct marker marker = {0, 0, 0, 0, 0, 0, 0}; + marker.p_token_begin = p_expression->first_token; + marker.p_token_end = p_expression->last_token; + compiler_diagnostic_message(30, ctx->ctx, ((void *)0), &marker, "object lifetime ended"); + } + } + struct true_false_set_item item; + item.p_expression = p_expression; + item.true_branch_state = 1; + item.false_branch_state = 2; + true_false_set_push_back(expr_true_false_set, &item); + } + break; + case 16 : + case 17 : + { + ; + struct flow_object * p_object = expression_get_flow_object(ctx, p_expression->left, nullable_enabled); + if (p_object) + { + if (flow_object_is_null(p_object)) + { + p_object->current.state = 4; + } + else + { + if (flow_object_is_zero(p_object)) + { + p_object->current.state = 64; + } + } + } + flow_visit_expression(ctx, p_expression->left, expr_true_false_set); + } + break; + case 13 : + { + ; + ; + flow_visit_expression(ctx, p_expression->left, expr_true_false_set); + flow_visit_expression(ctx, p_expression->right, expr_true_false_set); + true_false_set_clear(expr_true_false_set); + struct true_false_set_item item; + item.p_expression = p_expression; + item.true_branch_state = 1; + item.false_branch_state = 2; + true_false_set_push_back(expr_true_false_set, &item); + } + break; + case 12 : + { + ; + struct true_false_set left_local = {0}; + flow_visit_expression(ctx, p_expression->left, &left_local); + compare_function_arguments3(ctx, &p_expression->left->type, &p_expression->argument_expression_list); + true_false_set_destroy(&left_local); + } + break; + case 10 : + ; + flow_visit_compound_statement(ctx, p_expression->compound_statement); + break; + case 11 : + ; + ; + ; + ; + flow_visit_type_name(ctx, p_expression->type_name); + flow_visit_bracket_initializer_list(ctx, p_expression->braced_initializer); + struct flow_object * temp2 = make_flow_object(ctx, &p_expression->type, ((void *)0), p_expression); + if (temp2 == ((void *)0)) + { + return; + } + if (p_expression->type_name->abstract_declarator->p_object) + { + flow_object_swap(temp2, p_expression->type_name->abstract_declarator->p_object); + flow_object_set_zero(&p_expression->type, p_expression->type_name->abstract_declarator->p_object); + } + break; + case 24 : + if (p_expression->right) + { + flow_visit_expression(ctx, p_expression->right, expr_true_false_set); + } + if (p_expression->type_name) + { + flow_visit_type_name(ctx, p_expression->type_name); + } + break; + case 25 : + if (p_expression->right) + { + struct true_false_set true_false_set4 = {0}; + unsigned char old = ctx->inside_assert; + ctx->inside_assert = 1; + flow_visit_expression(ctx, p_expression->right, &true_false_set4); + ctx->inside_assert = old; + true_false_set_set_objects_to_true_branch(ctx, &true_false_set4, nullable_enabled); + true_false_set_destroy(&true_false_set4); + } + break; + case 18 : + if (p_expression->right) + { + unsigned char t2 = ctx->expression_is_not_evaluated; + ctx->expression_is_not_evaluated = 1; + flow_visit_expression(ctx, p_expression->right, expr_true_false_set); + ctx->expression_is_not_evaluated = t2; + } + if (p_expression->type_name) + { + flow_visit_type_name(ctx, p_expression->type_name); + } + break; + case 30 : + case 31 : + ; + flow_visit_expression(ctx, p_expression->right, expr_true_false_set); + break; + case 28 : + ; + flow_check_pointer_used_as_bool(ctx, p_expression->right); + flow_visit_expression(ctx, p_expression->right, expr_true_false_set); + true_false_set_invert(expr_true_false_set); + break; + case 19 : + case 20 : + case 26 : + case 27 : + case 29 : + case 33 : + { + if (p_expression->type_name) + { + flow_visit_type_name(ctx, p_expression->type_name); + } + } + break; + case 32 : + { + ; + struct flow_object * p_object0 = expression_get_flow_object(ctx, p_expression->right, nullable_enabled); + if (p_object0 && p_object0->current.state == 1) + { + if ( !ctx->expression_is_not_evaluated) + { + struct marker marker = {0}; + marker.p_token_begin = p_expression->right->first_token; + marker.p_token_end = p_expression->right->last_token; + compiler_diagnostic_message(29, ctx->ctx, ((void *)0), &marker, "using a uninitialized object"); + } + } + else + { + if (p_object0 && flow_object_can_be_null(p_object0)) + { + if ( !ctx->expression_is_not_evaluated) + { + compiler_diagnostic_message(32, ctx->ctx, p_expression->right->first_token, ((void *)0), "dereference a NULL object"); + } + } + } + struct true_false_set local_true_false = {0}; + flow_visit_expression(ctx, p_expression->right, &local_true_false); + true_false_set_destroy(&local_true_false); + } + break; + case 53 : + { + ; + ; + struct true_false_set left_set = {0}; + flow_visit_expression(ctx, p_expression->left, &left_set); + true_false_set_swap(expr_true_false_set, &left_set); + true_false_set_destroy(&left_set); + struct true_false_set right_set = {0}; + flow_visit_expression(ctx, p_expression->right, &right_set); + true_false_set_destroy(&right_set); + struct flow_object * p_right_object = expression_get_flow_object(ctx, p_expression->right, nullable_enabled); + struct flow_object * p_dest_object = expression_get_flow_object(ctx, p_expression->left, nullable_enabled); + if (p_dest_object == ((void *)0) || p_right_object == ((void *)0)) + { + return; + } + struct marker a_marker = {0, 0, 0, 0, 0, 0, 0}; + a_marker.p_token_begin = p_expression->left->first_token; + a_marker.p_token_end = p_expression->left->last_token; + struct marker b_marker = {0, 0, 0, 0, 0, 0, 0}; + b_marker.p_token_begin = p_expression->right->first_token; + b_marker.p_token_end = p_expression->right->last_token; + flow_check_assignment(ctx, p_expression->left->first_token, &a_marker, &b_marker, 2, 1, type_is_view(&p_expression->left->type), type_is_nullable(&p_expression->left->type, ctx->ctx->options.null_checks_enabled), &p_expression->left->type, p_dest_object, &p_expression->right->type, p_right_object, ((void *)0)); + arena_broadcast_change(ctx, p_dest_object); + if (expression_is_malloc(p_expression->right)) + { + struct type t = type_remove_pointer(&p_expression->left->type); + struct flow_object * po = make_flow_object(ctx, &t, ((void *)0), p_expression->left); + if (po == ((void *)0)) + { + type_destroy(&t); + return; + } + object_set_pointer(p_dest_object, po); + type_destroy(&t); + p_dest_object->current.state = 4 | 2; + } + else + { + if (expression_is_calloc(p_expression->right)) + { + struct type t = type_remove_pointer(&p_expression->left->type); + struct flow_object * po = make_flow_object(ctx, &t, ((void *)0), p_expression->left); + if (po == ((void *)0)) + { + type_destroy(&t); + return; + } + flow_object_set_zero(&t, po); + object_set_pointer(p_dest_object, po); + type_destroy(&t); + p_dest_object->current.state = 4 | 2; + } + } + } + break; + case 36 : + { + ; + ; + struct true_false_set left_set = {0}; + struct true_false_set right_set = {0}; + flow_visit_expression(ctx, p_expression->left, &left_set); + struct flow_object * p_object = expression_get_flow_object(ctx, p_expression->right, ctx->ctx->options.null_checks_enabled); + if (p_object) + { + if (flow_object_can_be_zero(p_object)) + { + compiler_diagnostic_message(35, ctx->ctx, p_expression->right->first_token, ((void *)0), "possible division by zero"); + } + } + flow_visit_expression(ctx, p_expression->right, &right_set); + true_false_set_merge(expr_true_false_set, &left_set, &right_set, 1 | 4, 1 | 4); + true_false_set_destroy(&left_set); + true_false_set_destroy(&right_set); + } + break; + case 34 : + case 35 : + case 37 : + case 38 : + case 39 : + case 40 : + case 41 : + { + if (p_expression->left) + { + struct true_false_set left_set = {0}; + flow_visit_expression(ctx, p_expression->left, &left_set); + true_false_set_destroy(&left_set); + } + if (p_expression->right) + { + struct true_false_set right_set = {0}; + flow_visit_expression(ctx, p_expression->right, &right_set); + true_false_set_destroy(&right_set); + } + } + break; + case 44 : + case 45 : + case 42 : + case 43 : + { + ; + ; + unsigned char left_is_constant = object_has_constant_value(&p_expression->left->object); + unsigned char right_is_constant = object_has_constant_value(&p_expression->right->object); + if (left_is_constant) + { + long long left_value = object_to_signed_long_long(&p_expression->left->object); + struct true_false_set true_false_set_right = {0}; + flow_visit_expression(ctx, p_expression->right, &true_false_set_right); + if (left_value == 0) + { + true_false_set_swap(expr_true_false_set, &true_false_set_right); + { + int i = 0; + for (; i < expr_true_false_set->size; i++) + { + struct true_false_set_item * item = &expr_true_false_set->data[i]; + item->false_branch_state = item->true_branch_state; + } + } + if (p_expression->expression_type == 44 || p_expression->expression_type == 45) + { + true_false_set_invert(expr_true_false_set); + } + } + true_false_set_destroy(&true_false_set_right); + } + else + { + if (right_is_constant) + { + long long right_value = object_to_signed_long_long(&p_expression->right->object); + struct true_false_set true_false_set_left3 = {0}; + flow_visit_expression(ctx, p_expression->left, &true_false_set_left3); + if (right_value == 0) + { + true_false_set_swap(expr_true_false_set, &true_false_set_left3); + { + int i = 0; + for (; i < expr_true_false_set->size; i++) + { + struct true_false_set_item * item = &expr_true_false_set->data[i]; + item->false_branch_state = item->true_branch_state; + } + } + if (p_expression->expression_type == 44 || p_expression->expression_type == 45) + { + true_false_set_invert(expr_true_false_set); + } + } + true_false_set_destroy(&true_false_set_left3); + } + else + { + struct true_false_set true_false_set = {0}; + flow_visit_expression(ctx, p_expression->left, &true_false_set); + flow_visit_expression(ctx, p_expression->right, &true_false_set); + true_false_set_destroy(&true_false_set); + } + } + } + break; + case 47 : + case 46 : + { + ; + ; + long long value = 0; + struct expression * p_comp_expression = ((void *)0); + if (object_has_constant_value(&p_expression->left->object) && !object_has_constant_value(&p_expression->right->object)) + { + value = object_to_signed_long_long(&p_expression->left->object); + p_comp_expression = p_expression->right; + } + else + { + if (object_has_constant_value(&p_expression->right->object) && !object_has_constant_value(&p_expression->left->object)) + { + value = object_to_signed_long_long(&p_expression->right->object); + p_comp_expression = p_expression->left; + } + } + if (p_comp_expression) + { + struct true_false_set true_false_set = {0}; + flow_visit_expression(ctx, p_comp_expression, &true_false_set); + struct flow_object * p_object = expression_get_flow_object(ctx, p_comp_expression, nullable_enabled); + if (p_object) + { + struct marker marker = {0, 0, 0, 0, 0, 0, 0}; + marker.p_token_begin = p_comp_expression->first_token; + marker.p_token_end = p_comp_expression->last_token; + if ((flow_object_is_null(p_object) || flow_object_is_zero(p_object)) && value == 0) + { + if (p_expression->expression_type == 46) + { + if (ctx->inside_assert) + { + } + else + { + if (type_is_pointer(&p_comp_expression->type)) + { + compiler_diagnostic_message(27, ctx->ctx, ((void *)0), &marker, "pointer is always null"); + } + else + { + compiler_diagnostic_message(27, ctx->ctx, ((void *)0), &marker, "value is always zero"); + } + } + } + else + { + if (p_expression->expression_type == 47) + { + if (type_is_pointer(&p_comp_expression->type)) + { + compiler_diagnostic_message(27, ctx->ctx, ((void *)0), &marker, "pointer is always null"); + } + else + { + compiler_diagnostic_message(27, ctx->ctx, ((void *)0), &marker, "value is always zero"); + } + } + } + } + else + { + if ((flow_object_is_not_null(p_object) || flow_object_is_not_zero(p_object)) && value == 0) + { + if (p_expression->expression_type == 46) + { + if (type_is_pointer(&p_comp_expression->type)) + { + compiler_diagnostic_message(27, ctx->ctx, ((void *)0), &marker, "pointer is always non-null"); + } + else + { + compiler_diagnostic_message(27, ctx->ctx, ((void *)0), &marker, "value is always non-zero"); + } + } + else + { + if (p_expression->expression_type == 47) + { + if (ctx->inside_assert) + { + } + else + { + if (type_is_pointer(&p_comp_expression->type)) + { + compiler_diagnostic_message(27, ctx->ctx, ((void *)0), &marker, "pointer is always non-null"); + } + else + { + compiler_diagnostic_message(27, ctx->ctx, ((void *)0), &marker, "value is always non-zero"); + } + } + } + } + } + } + } + true_false_set_swap(expr_true_false_set, &true_false_set); + if (p_expression->expression_type == 46 && value == 0) + { + true_false_set_invert(expr_true_false_set); + } + else + { + if (p_expression->expression_type == 47 && value != 0) + { + true_false_set_invert(expr_true_false_set); + } + } + true_false_set_destroy(&true_false_set); + } + else + { + struct true_false_set true_false_set = {0}; + flow_visit_expression(ctx, p_expression->left, &true_false_set); + flow_visit_expression(ctx, p_expression->right, &true_false_set); + true_false_set_destroy(&true_false_set); + } + } + break; + case 51 : + { + ; + ; + flow_check_pointer_used_as_bool(ctx, p_expression->left); + flow_check_pointer_used_as_bool(ctx, p_expression->right); + int original_state_number = arena_add_copy_of_current_state(ctx, "original"); + struct true_false_set left_set = {0}; + flow_visit_expression(ctx, p_expression->left, &left_set); + true_false_set_set_objects_to_false_branch(ctx, &left_set, nullable_enabled); + struct true_false_set right_set = {0}; + flow_visit_expression(ctx, p_expression->right, &right_set); + { + int i = 0; + for (; i < left_set.size; i++) + { + struct true_false_set_item item5; + item5.p_expression = left_set.data[i].p_expression; + item5.true_branch_state = (left_set.data[i].true_branch_state | left_set.data[i].false_branch_state); + item5.false_branch_state = left_set.data[i].false_branch_state; + true_false_set_push_back(expr_true_false_set, &item5); + } + } + { + int k = 0; + for (; k < right_set.size; k++) + { + int index = find_item_index_by_expression(expr_true_false_set, right_set.data[k].p_expression); + if (index == -1) + { + index = expr_true_false_set->size; + struct true_false_set_item item4 = {0}; + true_false_set_push_back(expr_true_false_set, &item4); + } + expr_true_false_set->data[index].p_expression = right_set.data[k].p_expression; + expr_true_false_set->data[index].false_branch_state = right_set.data[k].false_branch_state; + expr_true_false_set->data[index].true_branch_state = (1 | 2); + } + } + arena_restore_current_state_from(ctx, original_state_number); + arena_remove_state(ctx, original_state_number); + true_false_set_destroy(&left_set); + true_false_set_destroy(&right_set); + } + break; + case 52 : + { + ; + ; + flow_check_pointer_used_as_bool(ctx, p_expression->left); + flow_check_pointer_used_as_bool(ctx, p_expression->right); + int original_state_number = arena_add_copy_of_current_state(ctx, "original"); + struct true_false_set left_set = {0}; + flow_visit_expression(ctx, p_expression->left, &left_set); + true_false_set_set_objects_to_true_branch(ctx, &left_set, nullable_enabled); + struct true_false_set right_set = {0}; + flow_visit_expression(ctx, p_expression->right, &right_set); + { + int i = 0; + for (; i < left_set.size; i++) + { + struct true_false_set_item * p_item_left = &left_set.data[i]; + struct true_false_set_item left_and_right = {0}; + left_and_right.p_expression = p_item_left->p_expression; + left_and_right.true_branch_state = p_item_left->true_branch_state; + left_and_right.false_branch_state = p_item_left->true_branch_state | p_item_left->false_branch_state; + true_false_set_push_back(expr_true_false_set, &left_and_right); + } + } + { + int k = 0; + for (; k < right_set.size; k++) + { + struct true_false_set_item * p_item_right = &right_set.data[k]; + int index = find_item_index_by_expression(expr_true_false_set, p_item_right->p_expression); + if (index == -1) + { + index = expr_true_false_set->size; + struct true_false_set_item item2 = {0}; + true_false_set_push_back(expr_true_false_set, &item2); + } + expr_true_false_set->data[index].p_expression = p_item_right->p_expression; + expr_true_false_set->data[index].true_branch_state = p_item_right->true_branch_state; + expr_true_false_set->data[index].false_branch_state = p_item_right->false_branch_state; + expr_true_false_set->data[index].false_branch_state = (1 | 2); + } + } + arena_restore_current_state_from(ctx, original_state_number); + arena_remove_state(ctx, original_state_number); + true_false_set_destroy(&left_set); + true_false_set_destroy(&right_set); + } + break; + case 50 : + { + ; + ; + struct true_false_set true_false_set = {0}; + flow_visit_expression(ctx, p_expression->left, &true_false_set); + flow_visit_expression(ctx, p_expression->right, &true_false_set); + true_false_set_destroy(&true_false_set); + } + break; + case 48 : + case 49 : + ; + ; + flow_visit_expression(ctx, p_expression->left, expr_true_false_set); + flow_visit_expression(ctx, p_expression->right, expr_true_false_set); + break; + case 21 : + { + } + break; + case 22 : + break; + case 23 : + break; + case 55 : + { + ; + ; + ; + struct true_false_set true_false_set = {0}; + flow_check_pointer_used_as_bool(ctx, p_expression->condition_expr); + flow_visit_expression(ctx, p_expression->condition_expr, &true_false_set); + int before_if_state_number = arena_add_copy_of_current_state(ctx, "before-if"); + true_false_set_set_objects_to_true_branch(ctx, &true_false_set, nullable_enabled); + struct true_false_set set = {0}; + flow_visit_expression(ctx, p_expression->left, &set); + true_false_set_destroy(&set); + int left_true_branch_state_number = arena_add_copy_of_current_state(ctx, "left-true-branch"); + arena_restore_current_state_from(ctx, before_if_state_number); + true_false_set_set_objects_to_false_branch(ctx, &true_false_set, nullable_enabled); + struct true_false_set set2 = {0}; + flow_visit_expression(ctx, p_expression->right, &set2); + true_false_set_destroy(&set2); + arena_merge_current_state_with_state_number(ctx, left_true_branch_state_number); + arena_restore_current_state_from(ctx, left_true_branch_state_number); + arena_remove_state(ctx, before_if_state_number); + arena_remove_state(ctx, left_true_branch_state_number); + true_false_set_destroy(&true_false_set); + } + break; + } +} + +static void flow_visit_expression_statement(struct flow_visit_ctx * ctx, struct expression_statement * p_expression_statement) +{ + struct true_false_set d = {0}; + if (p_expression_statement->expression_opt) + { + flow_visit_expression(ctx, p_expression_statement->expression_opt, &d); + } + true_false_set_destroy(&d); +} + +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) +{ + flow_visit_block_item_list(ctx, &p_compound_statement->block_item_list); + flow_exit_block_visit_defer_list(ctx, &p_compound_statement->defer_list, p_compound_statement->last_token); + flow_defer_list_set_end_of_lifetime(ctx, &p_compound_statement->defer_list, p_compound_statement->last_token); +} + +static void flow_visit_do_while_statement(struct flow_visit_ctx * ctx, struct iteration_statement * p_iteration_statement) +{ + ; + unsigned char nullable_enabled = ctx->ctx->options.null_checks_enabled; + struct true_false_set true_false_set = {0}; + if (1) + { + if (p_iteration_statement->expression1) + { + flow_visit_expression(ctx, p_iteration_statement->expression1, &true_false_set); + } + flow_visit_secondary_block(ctx, p_iteration_statement->secondary_block); + flow_exit_block_visit_defer_list(ctx, &p_iteration_statement->defer_list, p_iteration_statement->secondary_block->last_token); + flow_defer_list_set_end_of_lifetime(ctx, &p_iteration_statement->defer_list, p_iteration_statement->secondary_block->last_token); + unsigned char was_last_statement_inside_true_branch_return = secondary_block_ends_with_jump(p_iteration_statement->secondary_block); + if (was_last_statement_inside_true_branch_return) + { + } + else + { + true_false_set_set_objects_to_false_branch(ctx, &true_false_set, nullable_enabled); + } + } + else _catch_label_1: + { + } + true_false_set_destroy(&true_false_set); +} + +int diagnostic_stack_push_empty(struct diagnostic_stack * diagnostic_stack); +void diagnostic_stack_pop(struct diagnostic_stack * diagnostic_stack); + +static void flow_visit_while_statement(struct flow_visit_ctx * ctx, struct iteration_statement * p_iteration_statement) +{ + ; + if (p_iteration_statement->expression1 == ((void *)0)) + { + return; + } + unsigned char nullable_enabled = ctx->ctx->options.null_checks_enabled; + int old_initial_state = ctx->initial_state; + int old_break_join_state = ctx->break_join_state; + ctx->initial_state = arena_add_copy_of_current_state(ctx, "original"); + ctx->break_join_state = arena_add_empty_state(ctx, "break join"); + struct true_false_set true_false_set = {0}; + diagnostic_stack_push_empty(&ctx->ctx->options.diagnostic_stack); + flow_visit_expression(ctx, p_iteration_statement->expression1, &true_false_set); + true_false_set_set_objects_to_true_branch(ctx, &true_false_set, nullable_enabled); + flow_visit_secondary_block(ctx, p_iteration_statement->secondary_block); + diagnostic_stack_pop(&ctx->ctx->options.diagnostic_stack); + struct true_false_set true_false_set2 = {0}; + flow_visit_expression(ctx, p_iteration_statement->expression1, &true_false_set2); + true_false_set_destroy(&true_false_set2); + true_false_set_set_objects_to_true_branch(ctx, &true_false_set, nullable_enabled); + flow_visit_secondary_block(ctx, p_iteration_statement->secondary_block); + flow_exit_block_visit_defer_list(ctx, &p_iteration_statement->defer_list, p_iteration_statement->secondary_block->last_token); + unsigned char was_last_statement_inside_true_branch_return = secondary_block_ends_with_jump(p_iteration_statement->secondary_block); + if (was_last_statement_inside_true_branch_return) + { + arena_restore_current_state_from(ctx, ctx->initial_state); + true_false_set_set_objects_to_false_branch(ctx, &true_false_set, nullable_enabled); + } + else + { + true_false_set_set_objects_to_false_branch(ctx, &true_false_set, nullable_enabled); + arena_merge_current_state_with_state_number(ctx, ctx->break_join_state); + arena_restore_current_state_from(ctx, ctx->break_join_state); + } + flow_defer_list_set_end_of_lifetime(ctx, &p_iteration_statement->defer_list, p_iteration_statement->secondary_block->last_token); + arena_remove_state(ctx, ctx->initial_state); + arena_remove_state(ctx, ctx->break_join_state); + ctx->initial_state = old_initial_state; + ctx->break_join_state = old_break_join_state; + true_false_set_destroy(&true_false_set); +} + +static void flow_visit_for_statement(struct flow_visit_ctx * ctx, struct iteration_statement * p_iteration_statement) +{ + ; + struct true_false_set d = {0}; + if (1) + { + if (p_iteration_statement->declaration && p_iteration_statement->declaration->init_declarator_list.head) + { + flow_visit_init_declarator_list(ctx, &p_iteration_statement->declaration->init_declarator_list); + } + if (p_iteration_statement->expression0) + { + flow_visit_expression(ctx, p_iteration_statement->expression0, &d); + } + if (p_iteration_statement->expression1) + { + flow_check_pointer_used_as_bool(ctx, p_iteration_statement->expression1); + flow_visit_expression(ctx, p_iteration_statement->expression1, &d); + } + diagnostic_stack_push_empty(&ctx->ctx->options.diagnostic_stack); + flow_visit_secondary_block(ctx, p_iteration_statement->secondary_block); + diagnostic_stack_pop(&ctx->ctx->options.diagnostic_stack); + if (p_iteration_statement->expression2) + { + flow_visit_expression(ctx, p_iteration_statement->expression2, &d); + } + unsigned char b_secondary_block_ends_with_jump = secondary_block_ends_with_jump(p_iteration_statement->secondary_block); + if ( !b_secondary_block_ends_with_jump) + { + flow_visit_secondary_block(ctx, p_iteration_statement->secondary_block); + flow_exit_block_visit_defer_list(ctx, &p_iteration_statement->defer_list, p_iteration_statement->secondary_block->last_token); + flow_defer_list_set_end_of_lifetime(ctx, &p_iteration_statement->defer_list, p_iteration_statement->secondary_block->last_token); + } + } + else _catch_label_1: + { + } + true_false_set_destroy(&d); +} + +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 9042 : + flow_visit_while_statement(ctx, p_iteration_statement); + break; + case 9008 : + flow_visit_do_while_statement(ctx, p_iteration_statement); + break; + case 9015 : + flow_visit_for_statement(ctx, p_iteration_statement); + break; + default: + ; + break; + } +} + +static void flow_visit_jump_statement(struct flow_visit_ctx * ctx, struct jump_statement * p_jump_statement) +{ + unsigned char nullable_enabled = ctx->ctx->options.null_checks_enabled; + if (1) + { + if (p_jump_statement->first_token->type == 9037) + { + arena_merge_current_state_with_state_number(ctx, ctx->throw_join_state); + flow_exit_block_visit_defer_list(ctx, &p_jump_statement->defer_list, p_jump_statement->first_token); + } + else + { + if (p_jump_statement->first_token->type == 9027) + { + if (ctx->p_return_type == ((void *)0)) + { + goto _catch_label_1; + } + if (p_jump_statement->expression_opt) + { + struct true_false_set d = {0}; + flow_visit_expression(ctx, p_jump_statement->expression_opt, &d); + true_false_set_destroy(&d); + } + if (p_jump_statement->expression_opt) + { + struct flow_object * p_object = expression_get_flow_object(ctx, p_jump_statement->expression_opt, nullable_enabled); + if (p_object) + { + ; + struct flow_object * p_dest_object = make_flow_object(ctx, ctx->p_return_type, ((void *)0), p_jump_statement->expression_opt); + if (p_dest_object == ((void *)0)) + { + goto _catch_label_1; + } + ; + flow_object_set_zero(ctx->p_return_type, p_dest_object); + struct marker a_marker = {0, 0, 0, 0, 0, 0, 0}; + a_marker.p_token_begin = p_jump_statement->expression_opt->first_token; + a_marker.p_token_end = p_jump_statement->expression_opt->last_token; + struct marker b_marker = {0, 0, 0, 0, 0, 0, 0}; + b_marker.p_token_begin = p_jump_statement->expression_opt->first_token; + b_marker.p_token_end = p_jump_statement->expression_opt->last_token; + ; + flow_check_assignment(ctx, p_jump_statement->expression_opt->first_token, &a_marker, &b_marker, 0, 1, type_is_view(ctx->p_return_type), type_is_nullable(ctx->p_return_type, ctx->ctx->options.null_checks_enabled), ctx->p_return_type, p_dest_object, &p_jump_statement->expression_opt->type, p_object, ((void *)0)); + int state_before_return = arena_add_copy_of_current_state(ctx, "before-return"); + flow_defer_list_set_end_of_lifetime(ctx, &p_jump_statement->defer_list, p_jump_statement->first_token); + checked_read_object(ctx, ctx->p_return_type, type_is_nullable(ctx->p_return_type, ctx->ctx->options.null_checks_enabled), p_dest_object, ((void *)0), &a_marker, 1); + arena_restore_current_state_from(ctx, state_before_return); + } + if (p_object && p_object->is_temporary) + { + p_object->current.state = 128; + } + } + flow_exit_block_visit_defer_list(ctx, &p_jump_statement->defer_list, p_jump_statement->first_token); + } + else + { + if (p_jump_statement->first_token->type == 9005) + { + flow_exit_block_visit_defer_list(ctx, &p_jump_statement->defer_list, p_jump_statement->first_token); + } + else + { + if (p_jump_statement->first_token->type == 9000) + { + arena_merge_current_state_with_state_number(ctx, ctx->break_join_state); + flow_exit_block_visit_defer_list(ctx, &p_jump_statement->defer_list, p_jump_statement->first_token); + } + else + { + if (p_jump_statement->first_token->type == 9016) + { + ; + int label_state_number = -1; + { + int i = 0; + for (; i < ctx->labels_size; i++) + { + if (ctx->labels[i].state_number == label_state_number) + { + break; + } + } + } + if (label_state_number == -1) + { + label_state_number = arena_add_empty_state(ctx, p_jump_statement->label->lexeme); + ctx->labels[ctx->labels_size].state_number = label_state_number; + ctx->labels[ctx->labels_size].label_name = p_jump_statement->label->lexeme; + ctx->labels_size++; + } + arena_merge_current_state_with_state_number(ctx, label_state_number); + flow_exit_block_visit_defer_list(ctx, &p_jump_statement->defer_list, p_jump_statement->first_token); + } + else + { + ; + } + } + } + } + } + } + else _catch_label_1: + { + } +} + +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) +{ + flow_visit_label(ctx, p_labeled_statement->label); + 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); + } + } + } + } + } +} + +static void flow_visit_unlabeled_statement(struct flow_visit_ctx * ctx, struct unlabeled_statement * p_unlabeled_statement) +{ + 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 + { + ; + } + } + } +} + +static void flow_visit_statement(struct flow_visit_ctx * ctx, struct statement * p_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); + } + } +} + +int strcmp(char * _Str1, char * _Str2); + +static void flow_visit_label(struct flow_visit_ctx * ctx, struct label * p_label) +{ + if (p_label->p_identifier_opt) + { + { + int i = 0; + for (; i < ctx->labels_size; i++) + { + if (strcmp(ctx->labels[i].label_name, p_label->p_identifier_opt->lexeme) == 0) + { + arena_restore_current_state_from(ctx, ctx->labels[i].state_number); + break; + } + } + } + } + else + { + arena_restore_current_state_from(ctx, ctx->initial_state); + } +} + +void flow_visit_declaration(struct flow_visit_ctx * ctx, struct declaration * p_declaration); + +static void flow_visit_block_item(struct flow_visit_ctx * ctx, struct block_item * p_block_item) +{ + 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; + } +} + +int isalpha(int _C); +int strncmp(char * _Str1, char * _Str2, unsigned int _MaxCount); + +static int parse_string_state(char * s, unsigned char * invalid) +{ + *invalid = 0; + int e = 0; + char * p = s; + while ( *p) + { + if (isalpha( *p)) + { + int sz = 0; + char * start = p; + while (isalpha( *p) || *p == 45) + { + sz++; + p++; + } + if (strncmp(start, "moved", sz) == 0) + { + e = 8; + } + else + { + if (strncmp(start, "null", sz) == 0) + { + e = 2; + } + else + { + if (strncmp(start, "not-null", sz) == 0) + { + e = 4; + } + else + { + if (strncmp(start, "maybe-null", sz) == 0) + { + e = (4 | 2); + } + else + { + if (strncmp(start, "uninitialized", sz) == 0) + { + e = 1; + } + else + { + if (strncmp(start, "zero", sz) == 0) + { + e = 32; + } + else + { + if (strncmp(start, "not-zero", sz) == 0) + { + e = 64; + } + else + { + if (strncmp(start, "any", sz) == 0) + { + e = (64 | 32); + } + else + { + *invalid = 1; + return 0; + } + } + } + } + } + } + } + } + } + else + { + p++; + } + } + return e; +} + +void execute_pragma(struct parser_ctx * ctx, struct pragma_declaration * p_pragma, unsigned char on_flow_analysis); + +static void flow_visit_pragma_declaration(struct flow_visit_ctx * ctx, struct pragma_declaration * p_pragma_declaration) +{ + execute_pragma(ctx->ctx, p_pragma_declaration, 1); +} + +void print_flow_object(struct type * p_type, struct flow_object * p_object, unsigned char short_version); +void flow_object_print_state(struct flow_object * p); + +static void flow_visit_static_assert_declaration(struct flow_visit_ctx * ctx, struct static_assert_declaration * p_static_assert_declaration) +{ + unsigned char t2 = ctx->expression_is_not_evaluated; + ctx->expression_is_not_evaluated = 1; + unsigned char nullable_enabled = ctx->ctx->options.null_checks_enabled; + struct true_false_set a = {0}; + flow_visit_expression(ctx, p_static_assert_declaration->constant_expression, &a); + ctx->expression_is_not_evaluated = t2; + if (p_static_assert_declaration->first_token->type == 9069 || p_static_assert_declaration->first_token->type == 9070) + { + unsigned char ex = p_static_assert_declaration->first_token->type == 9070; + compiler_diagnostic_message(62, ctx->ctx, p_static_assert_declaration->first_token, ((void *)0), "static_debug"); + struct flow_object * p_obj = expression_get_flow_object(ctx, p_static_assert_declaration->constant_expression, nullable_enabled); + if (p_obj) + { + print_flow_object(&p_static_assert_declaration->constant_expression->type, p_obj, !ex); + if (p_obj->is_temporary) + { + p_obj->current.state = 128; + } + } + if (ex) + { + print_arena(ctx); + } + } + else + { + if (p_static_assert_declaration->first_token->type == 9071) + { + unsigned char is_invalid = 0; + int e = 0; + if (p_static_assert_declaration->string_literal_opt) + { + e = parse_string_state(p_static_assert_declaration->string_literal_opt->lexeme, &is_invalid); + } + if (is_invalid) + { + compiler_diagnostic_message(1080, ctx->ctx, p_static_assert_declaration->first_token, ((void *)0), "invalid parameter %s", p_static_assert_declaration->string_literal_opt->lexeme); + } + else + { + struct flow_object * p_obj = expression_get_flow_object(ctx, p_static_assert_declaration->constant_expression, nullable_enabled); + if (p_obj) + { + if (e != p_obj->current.state) + { + compiler_diagnostic_message(1080, ctx->ctx, p_static_assert_declaration->first_token, ((void *)0), "static_state failed"); + if (p_static_assert_declaration->string_literal_opt) + { + printf("expected :%s\n", p_static_assert_declaration->string_literal_opt->lexeme); + } + printf("current :"); + flow_object_print_state(p_obj); + printf("\n"); + } + } + else + { + if (e != 0) + { + compiler_diagnostic_message(1080, ctx->ctx, p_static_assert_declaration->first_token, ((void *)0), "static_state failed"); + } + } + if (p_obj && p_obj->is_temporary) + { + p_obj->current.state = 128; + } + } + } + else + { + if (p_static_assert_declaration->first_token->type == 9072) + { + struct flow_object * p_obj = expression_get_flow_object(ctx, p_static_assert_declaration->constant_expression, nullable_enabled); + if (p_obj) + { + if (p_static_assert_declaration->string_literal_opt) + { + char * lexeme = p_static_assert_declaration->string_literal_opt->lexeme; + if (strcmp(lexeme, "\"zero\"") == 0) + { + flow_object_set_zero(&p_static_assert_declaration->constant_expression->type, p_obj); + } + else + { + unsigned char is_invalid = 0; + int e = parse_string_state(p_static_assert_declaration->string_literal_opt->lexeme, &is_invalid); + if ( !is_invalid) + { + if (p_obj->members.size > 0) + { + compiler_diagnostic_message(1070, ctx->ctx, p_static_assert_declaration->first_token, ((void *)0), "use only for non agregates"); + } + p_obj->current.state = e; + } + else + { + compiler_diagnostic_message(1070, ctx->ctx, p_static_assert_declaration->first_token, ((void *)0), "invalid parameter %s", p_static_assert_declaration->string_literal_opt->lexeme); + } + } + } + } + if (p_obj && p_obj->is_temporary) + { + p_obj->current.state = 128; + } + } + } + } + true_false_set_destroy(&a); +} + +static void flow_visit_attribute_specifier_sequence(struct flow_visit_ctx * ctx, struct attribute_specifier_sequence * p_visit_attribute_specifier_sequence); + +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 = ((void *)0); + if (p_direct_declarator->function_declarator->parameter_type_list_opt && p_direct_declarator->function_declarator->parameter_type_list_opt->parameter_list) + { + parameter = p_direct_declarator->function_declarator->parameter_type_list_opt->parameter_list->head; + } + ctx->parameter_list++; + 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); + if (parameter->declarator) + { + flow_visit_declarator(ctx, parameter->declarator); + } + parameter = parameter->next; + } + ctx->parameter_list--; + } + else + { + if (p_direct_declarator->array_declarator) + { + if (p_direct_declarator->array_declarator->assignment_expression) + { + struct true_false_set a = {0}; + flow_visit_expression(ctx, p_direct_declarator->array_declarator->assignment_expression, &a); + true_false_set_destroy(&a); + } + } + } +} + +unsigned char type_is_pointer_to_out(struct type * p_type); +unsigned char type_is_any_owner(struct type * p_type); +unsigned char type_is_struct_or_union(struct type * p_type); +unsigned char type_is_array(struct type * p_type); + +static void flow_visit_declarator(struct flow_visit_ctx * ctx, struct declarator * p_declarator) +{ + unsigned char nullable_enabled = ctx->ctx->options.null_checks_enabled; + if (1) + { + if (p_declarator->type.category != 1) + { + if (ctx->parameter_list > 1) + { + return; + } + p_declarator->p_object = make_flow_object(ctx, &p_declarator->type, p_declarator, ((void *)0)); + if (p_declarator->p_object == ((void *)0)) + { + goto _catch_label_1; + } + flow_object_set_uninitialized(&p_declarator->type, p_declarator->p_object); + if (p_declarator->declaration_specifiers && p_declarator->declaration_specifiers->storage_class_specifier_flags & 2048) + { + if (type_is_pointer(&p_declarator->type)) + { + if (type_is_nullable(&p_declarator->type, ctx->ctx->options.null_checks_enabled)) + { + p_declarator->p_object->current.state = 4 | 2; + } + else + { + p_declarator->p_object->current.state = 4; + } + if (type_is_pointer_to_out(&p_declarator->type)) + { + struct type t = type_remove_pointer(&p_declarator->type); + struct flow_object * po = make_flow_object(ctx, &t, p_declarator, ((void *)0)); + if (po == ((void *)0)) + { + type_destroy(&t); + goto _catch_label_1; + } + flow_object_set_uninitialized(&t, po); + object_set_pointer(p_declarator->p_object, po); + type_destroy(&t); + } + else + { + if (type_is_any_owner(&p_declarator->type)) + { + struct type t = type_remove_pointer(&p_declarator->type); + struct flow_object * po = make_flow_object(ctx, &t, p_declarator, ((void *)0)); + if (po == ((void *)0)) + { + type_destroy(&t); + goto _catch_label_1; + } + unsigned char t_is_nullable = type_is_nullable(&t, ctx->ctx->options.null_checks_enabled); + flow_object_set_unknown(&t, t_is_nullable, po, nullable_enabled); + object_set_pointer(p_declarator->p_object, po); + type_destroy(&t); + } + } + } + else + { + if (type_is_struct_or_union(&p_declarator->type)) + { + unsigned char is_nullable = type_is_nullable(&p_declarator->type, nullable_enabled); + flow_object_set_unknown(&p_declarator->type, is_nullable, p_declarator->p_object, nullable_enabled); + } + else + { + if (type_is_array(&p_declarator->type)) + { + p_declarator->p_object->current.state = 64; + } + else + { + p_declarator->p_object->current.state = 32 | 64; + } + } + } + } + } + if (p_declarator->direct_declarator) + { + flow_visit_direct_declarator(ctx, p_declarator->direct_declarator); + } + } + else _catch_label_1: + { + } +} + +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) + { + flow_visit_init_declarator(ctx, p_init_declarator); + p_init_declarator = p_init_declarator->next; + } +} + +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); + } +} + +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; + } +} + +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); + } + 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; + } +} + +static void flow_visit_attribute_specifier(struct flow_visit_ctx * ctx, struct attribute_specifier * p_attribute_specifier) +{ +} + +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; + } +} + +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); + } + 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) +{ + struct true_false_set a = {0}; + if (p_enumerator->constant_expression_opt) + { + flow_visit_expression(ctx, p_enumerator->constant_expression_opt, &a); + } + true_false_set_destroy(&a); +} + +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; + } +} + +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); + } + 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) +{ +} + +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->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->atomic_type_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) + { + } + } + } +} + +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 & 16) + { + } +} + +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->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); + } +} + +static void flow_visit_declaration_specifiers(struct flow_visit_ctx * ctx, struct declaration_specifiers * p_declaration_specifiers, struct type * p_type_opt) +{ + 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; + } +} + +static unsigned char 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 == 9027) + { + return 1; + } + return 0; +} + +struct type get_function_return_type(struct type * p_type); + +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->pragma_declaration) + { + flow_visit_pragma_declaration(ctx, p_declaration->pragma_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->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, ((void *)0)); + } + } + 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) + { + ; + struct type type = get_function_return_type(&p_declaration->init_declarator_list.head->p_declarator->type); + ctx->p_return_type = &type; + flow_visit_compound_statement(ctx, p_declaration->function_body); + type_destroy(&type); + ctx->p_return_type = ((void *)0); + } +} + +void flow_objects_clear(struct flow_objects * p); + +void flow_start_visit_declaration(struct flow_visit_ctx * ctx, struct declaration * p_declaration) +{ + ctx->labels_size = 0; + flow_objects_clear(&ctx->arena); + ctx->state_number_generator = 1; + if (p_declaration->function_body) + { + flow_visit_declaration(ctx, p_declaration); + ; + if ( !flow_is_last_item_return(p_declaration->function_body)) + { + flow_exit_block_visit_defer_list(ctx, &p_declaration->defer_list, p_declaration->function_body->last_token); + } + } + else + { + flow_visit_declaration(ctx, p_declaration); + } + flow_objects_clear(&ctx->arena); +} + +int flow_objects_push_back(struct flow_objects * p, struct flow_object * p_object); + +struct flow_object *arena_new_object(struct flow_visit_ctx * ctx) +{ + struct flow_object * p = calloc(1, sizeof *p); + if (p != ((void *)0)) + { + p->current.dbg_name = "current"; + p->id = ctx->arena.size + 1; + if (flow_objects_push_back(&ctx->arena, p) != 0) + { + p = ((void *)0); + } + } + return (struct flow_object *)p; +} + +void flow_objects_destroy(struct flow_objects * p); + +void flow_visit_ctx_destroy(struct flow_visit_ctx * p) +{ + flow_objects_destroy(&p->arena); +} + +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; + } +} + diff --git a/out/src/visit_il.c b/out/src/visit_il.c new file mode 100644 index 0000000..ba09ac1 --- /dev/null +++ b/out/src/visit_il.c @@ -0,0 +1,2700 @@ +struct member_declaration_list { + struct token * first_token; + struct token * last_token; + struct member_declaration * head; + struct member_declaration * tail; +}; + +struct declaration_list { + struct declaration * head; + struct declaration * tail; +}; + +struct param_list { + unsigned char is_var_args; + unsigned char is_void; + struct param * head; + struct param * tail; +}; + +struct type { + int category; + int attributes_flags; + int type_specifier_flags; + int type_qualifier_flags; + int storage_class_specifier_flags; + char * name_opt; + struct struct_or_union_specifier * struct_or_union_specifier; + struct enum_specifier * enum_specifier; + struct expression * array_num_elements_expression; + int num_of_elements; + unsigned char static_array; + unsigned char address_of; + struct param_list params; + struct type * next; +}; + +struct type_name { + struct token * first_token; + struct token * last_token; + struct specifier_qualifier_list * specifier_qualifier_list; + struct declarator * abstract_declarator; + struct type type; +}; + +struct pragma_declaration { + struct token * first_token; + struct token * last_token; +}; + +struct pointer { + struct attribute_specifier_sequence * attribute_specifier_sequence_opt; + struct type_qualifier_list * type_qualifier_list_opt; + struct pointer * pointer; +}; + +struct attribute_list { + int attributes_flags; + struct attribute * head; + struct attribute * tail; +}; + +struct alignment_specifier { + struct type_name * type_name; + struct expression * constant_expression; + struct token * token; +}; + +struct designator { + struct expression * constant_expression_opt; + struct token * token; + struct designator * next; +}; + +union _struct_tag_6 { + unsigned char bool_value; + signed char signed_char_value; + unsigned char unsigned_char_value; + signed short signed_short_value; + unsigned short unsigned_short_value; + signed int signed_int_value; + unsigned int unsigned_int_value; + signed long signed_long_value; + unsigned long unsigned_long_value; + signed long long signed_long_long_value; + unsigned long long unsigned_long_long_value; + float float_value; + double double_value; + long double long_double_value; +}; + +struct object { + int state; + int value_type; + struct type type2; + char * debug_name; + union _struct_tag_6 value; + struct object * parent; + struct expression * p_init_expression; + struct object * members; + struct object * next; +}; + +struct declarator { + unsigned char has_shared_ownership; + struct token * first_token_opt; + struct token * last_token_opt; + struct pointer * pointer; + struct direct_declarator * direct_declarator; + struct declaration_specifiers * declaration_specifiers; + struct specifier_qualifier_list * specifier_qualifier_list; + struct token * name_opt; + struct compound_statement * function_body; + int num_uses; + struct object object; + struct flow_object * p_object; + struct type type; +}; + +struct typeof_specifier { + struct token * first_token; + struct token * last_token; + struct typeof_specifier_argument * typeof_specifier_argument; + struct type type; +}; + +struct unlabeled_statement { + struct expression_statement * expression_statement; + struct primary_block * primary_block; + struct jump_statement * jump_statement; +}; + +struct attribute_specifier { + struct token * first_token; + struct token * last_token; + struct attribute_list * attribute_list; + struct attribute_specifier * next; +}; + +struct token_list { + struct token * head; + struct token * tail; +}; + +struct ast { + struct token_list token_list; + struct declaration_list declaration_list; +}; + +struct attribute_token { + int attributes_flags; + struct token * token; +}; + +struct balanced_token_sequence { + struct balanced_token * head; + struct balanced_token * tail; +}; + +struct initializer { + struct token * first_token; + struct braced_initializer * braced_initializer; + struct expression * assignment_expression; +}; + +struct hash_map { + struct map_entry ** table; + int capacity; + int size; +}; + +struct osstream { + char * c_str; + int size; + int capacity; +}; + +struct d_visit_ctx { + int indentation; + int locals_count; + int extern_count; + int tag_name_count; + struct hash_map tag_names; + struct hash_map structs_map; + struct hash_map function_map; + struct osstream add_this_before; + struct osstream add_this_before_external_decl; + struct osstream data_types; + struct osstream function_types; + struct ast ast; +}; + +struct attribute_specifier_sequence { + struct token * first_token; + struct token * last_token; + int attributes_flags; + struct attribute_specifier * head; + struct attribute_specifier * tail; +}; + +struct defer_list { + struct defer_list_item * head; + struct defer_list_item * tail; +}; + +struct selection_statement { + struct init_statement * p_init_statement; + struct condition * condition; + struct secondary_block * secondary_block; + struct secondary_block * else_secondary_block_opt; + struct token * open_parentesis_token; + struct token * close_parentesis_token; + struct token * first_token; + struct token * last_token; + struct token * else_token_opt; + struct defer_list defer_list; +}; + +struct try_statement { + struct secondary_block * secondary_block; + struct secondary_block * catch_secondary_block_opt; + struct token * first_token; + struct token * last_token; + struct token * catch_token_opt; + int try_catch_block_index; +}; + +struct argument_expression_list { + struct argument_expression * head; + struct argument_expression * tail; +}; + +struct generic_assoc_list { + struct generic_association * head; + struct generic_association * tail; +}; + +struct generic_selection { + struct expression * expression; + struct type_name * type_name; + struct expression * p_view_selected_expression; + struct generic_assoc_list generic_assoc_list; + struct token * first_token; + struct token * last_token; +}; + +struct secondary_block { + struct token * first_token; + struct token * last_token; + struct statement * statement; +}; + +struct defer_statement { + struct token * first_token; + struct token * last_token; + struct secondary_block * secondary_block; +}; + +struct init_declarator_list { + struct init_declarator * head; + struct init_declarator * tail; +}; + +struct declaration { + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt; + struct static_assert_declaration * static_assert_declaration; + struct pragma_declaration * pragma_declaration; + struct declaration_specifiers * declaration_specifiers; + struct init_declarator_list init_declarator_list; + struct compound_statement * function_body; + struct defer_list defer_list; + struct declarator * contract_declarator; + struct token * first_token; + struct token * last_token; + struct declaration * next; +}; + +struct hash_item_set { + unsigned int number; + struct enum_specifier * p_enum_specifier; + struct enumerator * p_enumerator; + struct struct_or_union_specifier * p_struct_or_union_specifier; + struct declarator * p_declarator; + struct init_declarator * p_init_declarator; + struct macro0 * p_macro; + struct struct_entry * p_struct_entry; +}; + +struct attribute_argument_clause { + struct balanced_token_sequence * p_balanced_token_sequence; + struct token * token; +}; + +struct flow_objects_view { + struct flow_object ** data; + int size; + int capacity; +}; + +struct flow_object_state { + char * dbg_name; + int state_number; + struct flow_object * pointed; + int state; + struct flow_objects_view alternatives; + struct flow_object_state * next; +}; + +struct block_item_list { + struct block_item * head; + struct block_item * tail; +}; + +struct flow_object { + unsigned int visit_number; + struct flow_object * parent; + struct declarator * p_declarator_origin; + struct expression * p_expression_origin; + struct flow_objects_view members; + struct flow_object_state current; + int id; + unsigned char is_temporary; +}; + +struct typeof_specifier_argument { + struct expression * expression; + struct type_name * type_name; +}; + +struct diagnostic { + unsigned long long errors; + unsigned long long warnings; + unsigned long long notes; +}; + +struct compound_statement { + struct token * first_token; + struct token * last_token; + struct block_item_list block_item_list; + struct diagnostic diagnostic_flags; + struct defer_list defer_list; +}; + +struct simple_declaration { + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt; + struct declaration_specifiers * p_declaration_specifiers; + struct init_declarator_list init_declarator_list; + struct token * first_token; + struct token * last_token; +}; + +struct attribute { + int attributes_flags; + struct attribute_token * attribute_token; + struct attribute_argument_clause * attribute_argument_clause; + struct attribute * next; +}; + +struct macro; +struct expression { + int expression_type; + struct type type; + struct object object; + struct type_name * type_name; + struct braced_initializer * braced_initializer; + struct compound_statement * compound_statement; + struct generic_selection * generic_selection; + struct token * first_token; + struct token * last_token; + struct declarator * declarator; + int member_index; + struct argument_expression_list argument_expression_list; + struct expression * condition_expr; + struct expression * left; + struct expression * right; + unsigned char is_assignment_expression; +}; + +struct struct_entry_list { + struct struct_entry ** data; + int size; + int capacity; +}; + +struct struct_entry { + unsigned char done; + struct struct_or_union_specifier * p_struct_or_union_specifier; + struct struct_entry_list dependencies; + struct struct_entry * next; +}; + +struct type_qualifier { + int flags; + struct token * token; + struct type_qualifier * next; +}; + +struct initializer_list_item { + struct designation * designation; + struct initializer * initializer; + struct initializer_list_item * next; +}; + +struct type_specifier_qualifier { + struct type_specifier * type_specifier; + struct type_qualifier * type_qualifier; + struct alignment_specifier * alignment_specifier; + struct type_specifier_qualifier * next; +}; + +struct labeled_statement { + struct label * label; + struct statement * statement; +}; + +struct braced_initializer { + struct token * first_token; + struct token * last_token; + struct initializer_list * initializer_list; +}; + +struct direct_declarator { + struct token * name_opt; + struct declarator * declarator; + struct array_declarator * array_declarator; + struct function_declarator * function_declarator; + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt; +}; + +struct init_declarator { + unsigned char has_shared_ownership; + struct declarator * p_declarator; + struct initializer * initializer; + struct init_declarator * next; +}; + +struct token { + int type; + char * lexeme; + char * original; + int line; + int col; + int level; + int flags; + struct token * token_origin; + struct token * next; + struct token * prev; +}; + +struct type_specifier { + int flags; + struct token * token; + struct struct_or_union_specifier * struct_or_union_specifier; + struct typeof_specifier * typeof_specifier; + struct enum_specifier * enum_specifier; + struct declarator * typedef_declarator; + struct atomic_type_specifier * atomic_type_specifier; +}; + +struct member_declarator { + struct declarator * declarator; + struct expression * constant_expression; + struct member_declarator * next; +}; + +struct condition { + struct expression * expression; + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt; + struct declaration_specifiers * p_declaration_specifiers; + struct init_declarator * p_init_declarator; + struct token * first_token; + struct token * last_token; +}; + +struct enumerator_list { + struct enumerator * head; + struct enumerator * tail; +}; + +struct enum_specifier { + unsigned char has_shared_ownership; + struct attribute_specifier_sequence * attribute_specifier_sequence_opt; + struct specifier_qualifier_list * specifier_qualifier_list; + char tag_name[200]; + struct enumerator_list enumerator_list; + struct token * tag_token; + struct token * first_token; + struct enum_specifier * complete_enum_specifier2; +}; + +struct label { + struct expression * constant_expression; + struct token * p_identifier_opt; + struct token * p_first_token; +}; + +struct atomic_type_specifier { + struct token * token; + struct type_name * type_name; +}; + +struct jump_statement { + struct token * label; + struct token * first_token; + struct token * last_token; + struct expression * expression_opt; + int try_catch_block_index; + struct defer_list defer_list; +}; + +struct struct_or_union_specifier { + unsigned char has_shared_ownership; + struct attribute_specifier_sequence * attribute_specifier_sequence_opt; + struct member_declaration_list member_declaration_list; + struct token * first_token; + struct token * last_token; + unsigned char is_owner; + struct token * tagtoken; + char tag_name[200]; + unsigned char has_anonymous_tag; + unsigned char show_anonymous_tag; + int scope_level; + int visit_moved; + struct struct_or_union_specifier * complete_struct_or_union_specifier_indirection; +}; + +struct parameter_type_list { + unsigned char is_var_args; + unsigned char is_void; + struct parameter_list * parameter_list; +}; + +struct primary_block { + struct compound_statement * compound_statement; + struct selection_statement * selection_statement; + struct iteration_statement * iteration_statement; + struct defer_statement * defer_statement; + struct try_statement * try_statement; +}; + +struct defer_list_item { + struct declarator * declarator; + struct defer_statement * defer_statement; + struct defer_list_item * next; +}; + +struct declaration_specifiers { + int attributes_flags; + int type_specifier_flags; + int type_qualifier_flags; + int storage_class_specifier_flags; + int function_specifier_flags; + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt; + struct struct_or_union_specifier * struct_or_union_specifier; + struct enum_specifier * enum_specifier; + struct declarator * typedef_declarator; + struct typeof_specifier * typeof_specifier; + struct token * first_token; + struct token * last_token; + struct declaration_specifier * head; + struct declaration_specifier * tail; +}; + +struct macro0; +struct function_specifier { + int flags; + struct token * token; +}; + +struct statement { + struct labeled_statement * labeled_statement; + struct unlabeled_statement * unlabeled_statement; +}; + +struct init_statement { + struct expression_statement * p_expression_statement; + struct simple_declaration * p_simple_declaration; +}; + +struct argument_expression { + struct expression * expression; + struct argument_expression * next; + unsigned char set_unkown; +}; + +struct scope { + int scope_level; + struct hash_map tags; + struct hash_map variables; + struct scope * next; + struct scope * previous; +}; + +union _struct_tag_5 { + unsigned int number; + struct enum_specifier * p_enum_specifier; + struct enumerator * p_enumerator; + struct struct_or_union_specifier * p_struct_or_union_specifier; + struct declarator * p_declarator; + struct init_declarator * p_init_declarator; + struct macro * p_macro; + struct struct_entry * p_struct_entry; +}; + +struct map_entry { + struct map_entry * next; + unsigned int hash; + char * key; + int type; + union _struct_tag_5 data; +}; + +struct expression_statement { + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt; + struct expression * expression_opt; +}; + +struct balanced_token { + struct token * token; + struct balanced_token * next; +}; + +struct static_assert_declaration { + struct token * first_token; + struct token * last_token; + struct expression * constant_expression; + struct token * string_literal_opt; +}; + +struct param { + struct type type; + struct param * next; +}; + +struct parameter_declaration { + struct attribute_specifier_sequence * attribute_specifier_sequence_opt; + struct declaration_specifiers * declaration_specifiers; + struct declarator * declarator; + struct parameter_declaration * next; +}; + +struct enumerator { + unsigned char has_shared_ownership; + struct token * token; + struct attribute_specifier_sequence * attribute_specifier_sequence_opt; + struct expression * constant_expression_opt; + struct enum_specifier * enum_specifier; + struct enumerator * next; + struct object value; +}; + +struct iteration_statement { + struct token * first_token; + struct token * second_token; + struct secondary_block * secondary_block; + struct expression * expression1; + struct expression * expression2; + struct expression * expression0; + struct declaration * declaration; + struct defer_list defer_list; +}; + +struct initializer_list { + struct token * first_token; + struct initializer_list_item * head; + struct initializer_list_item * tail; + int size; +}; + +struct designation { + struct designator_list * designator_list; + struct token * token; +}; + +struct designator_list { + struct designator * head; + struct designator * tail; +}; + +struct block_item { + struct token * first_token; + struct declaration * declaration; + struct unlabeled_statement * unlabeled_statement; + struct label * label; + struct block_item * next; +}; + +struct generic_association { + struct type type; + struct type_name * p_type_name; + struct expression * expression; + struct token * first_token; + struct token * last_token; + struct generic_association * next; +}; + +struct function_declarator { + struct direct_declarator * direct_declarator; + struct scope parameters_scope; + struct parameter_type_list * parameter_type_list_opt; +}; + +struct specifier_qualifier_list { + int type_specifier_flags; + int type_qualifier_flags; + struct struct_or_union_specifier * struct_or_union_specifier; + struct enum_specifier * enum_specifier; + struct typeof_specifier * typeof_specifier; + struct declarator * typedef_declarator; + struct type_specifier_qualifier * head; + struct type_specifier_qualifier * tail; + struct token * first_token; + struct token * last_token; + struct attribute_specifier_sequence * p_attribute_specifier_sequence; +}; + +struct declaration_specifier { + struct storage_class_specifier * storage_class_specifier; + struct type_specifier_qualifier * type_specifier_qualifier; + struct function_specifier * function_specifier; + struct declaration_specifier * next; +}; + +struct member_declarator_list { + struct member_declarator * head; + struct member_declarator * tail; +}; + +struct storage_class_specifier { + int flags; + struct token * token; +}; + +struct member_declaration { + struct specifier_qualifier_list * specifier_qualifier_list; + struct member_declarator_list * member_declarator_list_opt; + struct static_assert_declaration * static_assert_declaration; + struct pragma_declaration * pragma_declaration; + struct attribute_specifier_sequence * p_attribute_specifier_sequence_opt; + struct member_declaration * next; +}; + +struct array_declarator { + struct direct_declarator * direct_declarator; + struct expression * assignment_expression; + struct expression * expression; + struct type_qualifier_list * type_qualifier_list_opt; + struct token * token; + struct token * static_token_opt; +}; + +struct type_qualifier_list { + int flags; + struct type_qualifier * head; + struct type_qualifier * tail; +}; + +struct parameter_list { + struct parameter_declaration * head; + struct parameter_declaration * tail; +}; + + +struct struct_or_union_specifier *get_complete_struct_or_union_specifier(struct struct_or_union_specifier * p_struct_or_union_specifier); + +struct struct_or_union_specifier *get_complete_struct_or_union_specifier2(struct 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); + if (p_complete == ((void *)0)) + { + p_complete = p_struct_or_union_specifier; + } + return p_complete; +} + +void *realloc(void * ptr, unsigned int size); + +int struct_entry_list_reserve(struct struct_entry_list * p, int n) +{ + if (n > p->capacity) + { + if ((unsigned int)n > (4294967295U / (sizeof (p->data[0])))) + { + return 132; + } + void * pnew = realloc(p->data, n * sizeof (p->data[0])); + if (pnew == ((void *)0)) + { + return 12; + } + p->data = pnew; + p->capacity = n; + } + return 0; +} + +int struct_entry_list_push_back(struct struct_entry_list * p, struct struct_entry * book) +{ + if (p->size == 2147483647) + { + return 132; + } + if (p->size + 1 > p->capacity) + { + int new_capacity = 0; + if (p->capacity > (2147483647 - p->capacity / 2)) + { + new_capacity = 2147483647; + } + else + { + new_capacity = p->capacity + p->capacity / 2; + if (new_capacity < p->size + 1) + { + new_capacity = p->size + 1; + } + } + int error = struct_entry_list_reserve(p, new_capacity); + if (error != 0) + { + return error; + } + } + p->data[p->size] = book; + p->size++; + return 0; +} + +int ss_fprintf(struct osstream * stream, char * fmt, ...); + +static void print_identation_core(struct osstream * ss, int indentation) +{ + { + int i = 0; + for (; i < indentation; i++) + { + ss_fprintf(ss, " "); + } + } +} + +static void print_identation(struct d_visit_ctx * ctx, struct osstream * oss) +{ + { + int i = 0; + for (; i < ctx->indentation; i++) + { + ss_fprintf(oss, " "); + } + } +} + +static void d_visit_secondary_block(struct d_visit_ctx * ctx, struct osstream * oss, struct secondary_block * p_secondary_block); + +static void il_print_defer_new(struct d_visit_ctx * ctx, struct osstream * oss, struct defer_list_item * p_item) +{ + if (p_item->defer_statement == ((void *)0)) + { + return; + } + d_visit_secondary_block(ctx, oss, p_item->defer_statement->secondary_block); +} + +static int il_defer_count(struct defer_list * p_defer_list) +{ + int count = 0; + struct defer_list_item * p_item = p_defer_list->head; + while (p_item) + { + if (p_item->defer_statement) + { + count++; + } + p_item = p_item->next; + } + return count; +} + +static void il_print_defer_list(struct d_visit_ctx * ctx, struct osstream * oss, struct defer_list * p_defer_list) +{ + struct defer_list_item * p_item = p_defer_list->head; + while (p_item) + { + il_print_defer_new(ctx, oss, p_item); + p_item = p_item->next; + } +} + +struct object *object_get_referenced(struct object * p_object); + +static void object_print_value(struct osstream * ss, struct object * a) +{ + a = object_get_referenced(a); + switch (a->value_type) + { + case 2 : + ss_fprintf(ss, "%d", a->value.bool_value ? 1 : 0); + break; + case 3 : + ss_fprintf(ss, "%d", (int)a->value.signed_char_value); + break; + case 4 : + ss_fprintf(ss, "%d", (int)a->value.unsigned_char_value); + break; + case 5 : + ss_fprintf(ss, "%d", a->value.signed_short_value); + break; + case 6 : + ss_fprintf(ss, "%d", a->value.unsigned_short_value); + break; + case 0 : + ss_fprintf(ss, "%d", a->value.signed_int_value); + break; + case 1 : + ss_fprintf(ss, "%u", a->value.unsigned_int_value); + ss_fprintf(ss, "U"); + break; + case 7 : + ss_fprintf(ss, "%ld", a->value.signed_long_value); + ss_fprintf(ss, "L"); + break; + case 8 : + ss_fprintf(ss, "%lu", a->value.unsigned_long_value); + ss_fprintf(ss, "UL"); + break; + case 9 : + ss_fprintf(ss, "%lld", a->value.signed_long_long_value); + ss_fprintf(ss, "LL"); + break; + case 10 : + ss_fprintf(ss, "%llu", a->value.unsigned_long_long_value); + ss_fprintf(ss, "ULL"); + break; + case 11 : + ss_fprintf(ss, "%f", a->value.float_value); + ss_fprintf(ss, "f"); + break; + case 12 : + ss_fprintf(ss, "%lf", a->value.double_value); + break; + case 13 : + ss_fprintf(ss, "%Lf", a->value.long_double_value); + ss_fprintf(ss, "L"); + break; + } +} + +int snprintf(char * _Buffer, unsigned int _BufferCount, char * _Format, ...); + +static struct member_declarator *find_member_declarator_by_index2(struct member_declaration_list * list, int member_index, char name[100], int * p_count) +{ + if (list->head == ((void *)0)) + { + return ((void *)0); + } + int no_name_index = 0; + struct member_declaration * p_member_declaration = list->head; + while (p_member_declaration) + { + struct member_declarator * p_member_declarator = ((void *)0); + if (p_member_declaration->member_declarator_list_opt) + { + p_member_declarator = p_member_declaration->member_declarator_list_opt->head; + while (p_member_declarator) + { + if (p_member_declarator->declarator) + { + if (member_index == *p_count) + { + snprintf(name, 100, "%s", p_member_declarator->declarator->name_opt->lexeme); + return p_member_declarator; + } + } + ( *p_count)++; + p_member_declarator = p_member_declarator->next; + } + } + else + { + if (p_member_declaration->specifier_qualifier_list) + { + if (p_member_declaration->specifier_qualifier_list->struct_or_union_specifier) + { + struct struct_or_union_specifier * p_complete = get_complete_struct_or_union_specifier(p_member_declaration->specifier_qualifier_list->struct_or_union_specifier); + if (p_complete) + { + char mname[100]; + p_member_declarator = find_member_declarator_by_index2(&p_complete->member_declaration_list, member_index, mname, p_count); + if (p_member_declarator) + { + snprintf(name, 100, "__m%d.%s", no_name_index++, mname); + return p_member_declarator; + } + } + } + } + } + p_member_declaration = p_member_declaration->next; + } + return ((void *)0); +} + +unsigned char type_is_struct_or_union(struct type * p_type); + +int find_member_name(struct type * p_type, int index, char name[100]) +{ + if ( !type_is_struct_or_union(p_type)) + { + return 1; + } + struct struct_or_union_specifier * p_complete = get_complete_struct_or_union_specifier(p_type->struct_or_union_specifier); + if (p_complete) + { + int count = 0; + struct member_declarator * p = find_member_declarator_by_index2(&p_complete->member_declaration_list, index, name, &count); + if (p) + { + return 0; + } + } + return 1; +} + +static int il_visit_literal_string(struct token * current, struct osstream * oss) +{ + unsigned char has_u8_prefix = current->lexeme[0] == 117 && current->lexeme[1] == 56; + unsigned char * psz = (unsigned char *)(current->lexeme + 0); + if (has_u8_prefix) + { + psz = (unsigned char *)(current->lexeme + 2); + } + while ( *psz) + { + if ( *psz >= 128) + { + ss_fprintf(oss, "\\x%x", *psz); + } + else + { + ss_fprintf(oss, "%c", *psz); + } + psz++; + } + return 0; +} + +unsigned char type_is_function(struct type * p_type); +struct map_entry *hashmap_find(struct hash_map * map, char * key); +int hashmap_set(struct hash_map * map, char * key, struct hash_item_set * item); +static void d_print_type(struct d_visit_ctx * ctx, struct osstream * ss, struct type * p_type, char * name_opt); +static void d_visit_compound_statement(struct d_visit_ctx * ctx, struct osstream * oss, struct compound_statement * p_compound_statement); +void ss_close(struct osstream * stream); +struct type type_remove_pointer(struct type * p_type); +void type_destroy(struct type * p_type); +static void object_print_constant_initialization(struct d_visit_ctx * ctx, struct osstream * ss, struct object * object, unsigned char * first); +static void object_print_non_constant_initialization(struct d_visit_ctx * ctx, struct osstream * ss, struct object * object, char * declarator_name); + +static void d_visit_expression(struct d_visit_ctx * ctx, struct osstream * oss, struct expression * p_expression) +{ + switch (p_expression->expression_type) + { + case 0 : + ; + break; + case 4 : + break; + case 2 : + { + ss_fprintf(oss, "%s", p_expression->declarator->name_opt->lexeme); + if (type_is_function(&p_expression->declarator->type) || (p_expression->type.storage_class_specifier_flags & 2)) + { + char * func_name = ((void *)0); + func_name = p_expression->first_token->lexeme; + struct map_entry * p = hashmap_find(&ctx->function_map, func_name); + if (p == ((void *)0)) + { + struct hash_item_set i = {0}; + i.number = 1; + hashmap_set(&ctx->function_map, func_name, &i); + struct osstream ss = {0}; + d_print_type(ctx, &ss, &p_expression->type, func_name); + if (type_is_function(&p_expression->declarator->type)) + { + if (p_expression->declarator->function_body && p_expression->declarator->declaration_specifiers && p_expression->declarator->declaration_specifiers->function_specifier_flags & 1) + { + ss_fprintf(&ctx->function_types, "\n"); + struct osstream copy = *oss; + oss->c_str = 0; + oss->capacity = 0; + oss->size = 0; + int i2 = ctx->indentation; + ctx->indentation = 0; + d_visit_compound_statement(ctx, oss, p_expression->declarator->function_body); + ctx->indentation = i2; + ss_fprintf(&ctx->function_types, "inline %s\n", ss.c_str); + ss_fprintf(&ctx->function_types, "%s", oss->c_str); + ss_close(oss); + *oss = copy; + } + else + { + ss_fprintf(&ctx->function_types, "%s;\n", ss.c_str); + } + } + else + { + ss_fprintf(&ctx->function_types, "%s;\n", ss.c_str); + } + ss_close(&ss); + } + } + } + break; + case 3 : + il_visit_literal_string(p_expression->first_token, oss); + break; + case 1 : + case 5 : + case 8 : + case 6 : + object_print_value(oss, &p_expression->object); + break; + case 9 : + ; + ss_fprintf(oss, "("); + d_visit_expression(ctx, oss, p_expression->right); + ss_fprintf(oss, ")"); + break; + case 7 : + ; + if (p_expression->generic_selection->p_view_selected_expression) + { + d_visit_expression(ctx, oss, p_expression->generic_selection->p_view_selected_expression); + } + break; + case 14 : + { + d_visit_expression(ctx, oss, p_expression->left); + char name[100]; + int r = find_member_name(&p_expression->left->type, p_expression->member_index, name); + if (r == 0) + { + ss_fprintf(oss, ".%s", name); + } + } + break; + case 15 : + { + d_visit_expression(ctx, oss, p_expression->left); + { + struct type t = type_remove_pointer(&p_expression->left->type); + char name[100]; + int r = find_member_name(&t, p_expression->member_index, name); + if (r == 0) + { + ss_fprintf(oss, "->%s", name); + } + type_destroy(&t); + } + } + break; + case 16 : + d_visit_expression(ctx, oss, p_expression->left); + ss_fprintf(oss, "++"); + break; + case 17 : + d_visit_expression(ctx, oss, p_expression->left); + ss_fprintf(oss, "--"); + break; + case 13 : + d_visit_expression(ctx, oss, p_expression->left); + ss_fprintf(oss, "["); + d_visit_expression(ctx, oss, p_expression->right); + ss_fprintf(oss, "]"); + break; + case 12 : + { + d_visit_expression(ctx, oss, p_expression->left); + ss_fprintf(oss, "("); + struct argument_expression * arg = p_expression->argument_expression_list.head; + while (arg) + { + d_visit_expression(ctx, oss, arg->expression); + if (arg->next) + { + ss_fprintf(oss, ", "); + } + arg = arg->next; + } + ss_fprintf(oss, ")"); + } + break; + case 33 : + ss_fprintf(oss, "&"); + d_visit_expression(ctx, oss, p_expression->right); + break; + case 10 : + { + char name[100]; + snprintf(name, sizeof (name), "_lambda_%d", ctx->extern_count++); + print_identation_core(&ctx->add_this_before, ctx->indentation); + struct osstream lambda = {0}; + ss_fprintf(&lambda, "static "); + d_print_type(ctx, &lambda, &p_expression->type, name); + ss_fprintf(&lambda, "\n"); + int current_indentation = ctx->indentation; + ctx->indentation = 0; + d_visit_compound_statement(ctx, &lambda, p_expression->compound_statement); + ctx->indentation = current_indentation; + ss_fprintf(&ctx->add_this_before_external_decl, "%s\n", lambda.c_str); + ss_fprintf(oss, "%s", name); + } + break; + case 11 : + { + char name[100]; + snprintf(name, sizeof (name), "__cmp_lt_%d", ctx->locals_count++); + struct osstream local = {0}; + print_identation_core(&local, ctx->indentation); + d_print_type(ctx, &local, &p_expression->type, name); + unsigned char first = 1; + ss_fprintf(&local, " = {"); + object_print_constant_initialization(ctx, &local, &p_expression->object, &first); + ss_fprintf(&local, "};\n"); + object_print_non_constant_initialization(ctx, &local, &p_expression->object, name); + ss_fprintf(&ctx->add_this_before, "%s", local.c_str); + ss_close(&local); + ss_fprintf(oss, "%s", name); + } + break; + case 18 : + ss_fprintf(oss, "sizeof "); + d_visit_expression(ctx, oss, p_expression->right); + break; + case 19 : + { + struct osstream local0 = {0}; + d_print_type(ctx, &local0, &p_expression->type_name->type, 0); + ss_fprintf(oss, "sizeof (%s)", local0.c_str); + ss_close(&local0); + } + break; + case 24 : + case 20 : + object_print_value(oss, &p_expression->object); + break; + case 26 : + d_visit_expression(ctx, oss, p_expression->right); + ss_fprintf(oss, " ++"); + break; + case 27 : + d_visit_expression(ctx, oss, p_expression->right); + ss_fprintf(oss, " --"); + break; + case 28 : + ss_fprintf(oss, " !"); + d_visit_expression(ctx, oss, p_expression->right); + break; + case 29 : + ss_fprintf(oss, " ~"); + d_visit_expression(ctx, oss, p_expression->right); + break; + case 30 : + ss_fprintf(oss, " -"); + d_visit_expression(ctx, oss, p_expression->right); + break; + case 31 : + ss_fprintf(oss, " +"); + d_visit_expression(ctx, oss, p_expression->right); + break; + case 32 : + ss_fprintf(oss, " *"); + d_visit_expression(ctx, oss, p_expression->right); + break; + case 25 : + break; + case 39 : + d_visit_expression(ctx, oss, p_expression->left); + ss_fprintf(oss, " - "); + d_visit_expression(ctx, oss, p_expression->right); + break; + case 38 : + d_visit_expression(ctx, oss, p_expression->left); + ss_fprintf(oss, " + "); + d_visit_expression(ctx, oss, p_expression->right); + break; + case 35 : + d_visit_expression(ctx, oss, p_expression->left); + ss_fprintf(oss, " * "); + d_visit_expression(ctx, oss, p_expression->right); + break; + case 36 : + d_visit_expression(ctx, oss, p_expression->left); + ss_fprintf(oss, " / "); + d_visit_expression(ctx, oss, p_expression->right); + break; + case 37 : + d_visit_expression(ctx, oss, p_expression->left); + ss_fprintf(oss, "%s", " % "); + d_visit_expression(ctx, oss, p_expression->right); + break; + case 54 : + d_visit_expression(ctx, oss, p_expression->left); + ss_fprintf(oss, ", "); + d_visit_expression(ctx, oss, p_expression->right); + break; + case 53 : + d_visit_expression(ctx, oss, p_expression->left); + ss_fprintf(oss, " = "); + d_visit_expression(ctx, oss, p_expression->right); + break; + case 34 : + { + struct osstream local2 = {0}; + d_print_type(ctx, &local2, &p_expression->type, ((void *)0)); + ss_fprintf(oss, "(%s)", local2.c_str); + ss_close(&local2); + d_visit_expression(ctx, oss, p_expression->left); + } + break; + case 40 : + d_visit_expression(ctx, oss, p_expression->left); + ss_fprintf(oss, " >> "); + d_visit_expression(ctx, oss, p_expression->right); + break; + case 41 : + d_visit_expression(ctx, oss, p_expression->left); + ss_fprintf(oss, " << "); + d_visit_expression(ctx, oss, p_expression->right); + break; + case 42 : + d_visit_expression(ctx, oss, p_expression->left); + ss_fprintf(oss, " > "); + d_visit_expression(ctx, oss, p_expression->right); + break; + case 43 : + d_visit_expression(ctx, oss, p_expression->left); + ss_fprintf(oss, " < "); + d_visit_expression(ctx, oss, p_expression->right); + break; + case 46 : + d_visit_expression(ctx, oss, p_expression->left); + ss_fprintf(oss, " == "); + d_visit_expression(ctx, oss, p_expression->right); + break; + case 47 : + d_visit_expression(ctx, oss, p_expression->left); + ss_fprintf(oss, " != "); + d_visit_expression(ctx, oss, p_expression->right); + break; + case 48 : + d_visit_expression(ctx, oss, p_expression->left); + ss_fprintf(oss, " & "); + d_visit_expression(ctx, oss, p_expression->right); + break; + case 49 : + d_visit_expression(ctx, oss, p_expression->left); + ss_fprintf(oss, " ^ "); + d_visit_expression(ctx, oss, p_expression->right); + break; + case 50 : + d_visit_expression(ctx, oss, p_expression->left); + ss_fprintf(oss, " | "); + d_visit_expression(ctx, oss, p_expression->right); + break; + case 45 : + d_visit_expression(ctx, oss, p_expression->left); + ss_fprintf(oss, " <= "); + d_visit_expression(ctx, oss, p_expression->right); + break; + case 44 : + d_visit_expression(ctx, oss, p_expression->left); + ss_fprintf(oss, " >= "); + d_visit_expression(ctx, oss, p_expression->right); + break; + case 52 : + d_visit_expression(ctx, oss, p_expression->left); + ss_fprintf(oss, " && "); + d_visit_expression(ctx, oss, p_expression->right); + break; + case 51 : + d_visit_expression(ctx, oss, p_expression->left); + ss_fprintf(oss, " || "); + d_visit_expression(ctx, oss, p_expression->right); + break; + case 21 : + case 22 : + case 23 : + break; + case 55 : + d_visit_expression(ctx, oss, p_expression->condition_expr); + ss_fprintf(oss, " ? "); + d_visit_expression(ctx, oss, p_expression->left); + ss_fprintf(oss, " : "); + d_visit_expression(ctx, oss, p_expression->right); + break; + } +} + +static void d_visit_declarator(struct d_visit_ctx * ctx, struct osstream * oss, struct declarator * p_declarator) +{ +} + +void ss_clear(struct osstream * stream); + +static void d_visit_expression_statement(struct d_visit_ctx * ctx, struct osstream * oss, struct expression_statement * p_expression_statement) +{ + ss_clear(&ctx->add_this_before); + struct osstream local = {0}; + print_identation(ctx, &local); + if (p_expression_statement->expression_opt) + { + d_visit_expression(ctx, &local, p_expression_statement->expression_opt); + } + if (ctx->add_this_before.size > 0) + { + ss_fprintf(oss, "%s", ctx->add_this_before.c_str); + ss_clear(&ctx->add_this_before); + } + ss_fprintf(oss, "%s;\n", local.c_str); + ss_close(&local); +} + +unsigned char object_has_constant_value(struct object * a); + +static void d_visit_jump_statement(struct d_visit_ctx * ctx, struct osstream * oss, struct jump_statement * p_jump_statement) +{ + if (p_jump_statement->first_token->type == 9037) + { + il_print_defer_list(ctx, oss, &p_jump_statement->defer_list); + print_identation(ctx, oss); + ss_fprintf(oss, "goto _catch_label_%d;\n", p_jump_statement->try_catch_block_index); + } + else + { + if (p_jump_statement->first_token->type == 9027) + { + unsigned char constant_expression_or_void = p_jump_statement->expression_opt == ((void *)0) || object_has_constant_value(&p_jump_statement->expression_opt->object) || il_defer_count(&p_jump_statement->defer_list) == 0; + if (constant_expression_or_void) + { + il_print_defer_list(ctx, oss, &p_jump_statement->defer_list); + print_identation(ctx, oss); + ss_fprintf(oss, "return"); + if (p_jump_statement->expression_opt) + { + ss_fprintf(oss, " "); + d_visit_expression(ctx, oss, p_jump_statement->expression_opt); + } + ss_fprintf(oss, ";\n"); + } + else + { + char name[100] = {0}; + snprintf(name, sizeof name, "__ck%d", ctx->locals_count++); + print_identation(ctx, oss); + d_print_type(ctx, oss, &p_jump_statement->expression_opt->type, name); + ss_fprintf(oss, " = "); + if (p_jump_statement->expression_opt) + { + d_visit_expression(ctx, oss, p_jump_statement->expression_opt); + } + ss_fprintf(oss, ";\n"); + il_print_defer_list(ctx, oss, &p_jump_statement->defer_list); + print_identation(ctx, oss); + ss_fprintf(oss, "return %s;\n", name); + } + } + else + { + if (p_jump_statement->first_token->type == 9000 || p_jump_statement->first_token->type == 9005) + { + il_print_defer_list(ctx, oss, &p_jump_statement->defer_list); + print_identation(ctx, oss); + if (p_jump_statement->first_token->type == 9000) + { + ss_fprintf(oss, "break;\n"); + } + else + { + ss_fprintf(oss, "continue;\n"); + } + } + else + { + if (p_jump_statement->first_token->type == 9016) + { + il_print_defer_list(ctx, oss, &p_jump_statement->defer_list); + print_identation(ctx, oss); + ss_fprintf(oss, "goto %s;\n", p_jump_statement->label->lexeme); + } + else + { + ; + } + } + } + } +} + +static void d_visit_statement(struct d_visit_ctx * ctx, struct osstream * oss, struct statement * p_statement); + +static void d_visit_labeled_statement(struct d_visit_ctx * ctx, struct osstream * oss, struct labeled_statement * p_labeled_statement) +{ + if (p_labeled_statement->label) + { + } + d_visit_statement(ctx, oss, p_labeled_statement->statement); +} + +static void d_visit_unlabeled_statement(struct d_visit_ctx * ctx, struct osstream * oss, struct unlabeled_statement * p_unlabeled_statement); + +static void d_visit_statement(struct d_visit_ctx * ctx, struct osstream * oss, struct statement * p_statement) +{ + if (p_statement->labeled_statement) + { + d_visit_labeled_statement(ctx, oss, p_statement->labeled_statement); + } + else + { + if (p_statement->unlabeled_statement) + { + d_visit_unlabeled_statement(ctx, oss, p_statement->unlabeled_statement); + } + } +} + +static void d_visit_secondary_block(struct d_visit_ctx * ctx, struct osstream * oss, struct secondary_block * p_secondary_block) +{ + d_visit_statement(ctx, oss, p_secondary_block->statement); +} + +static void d_visit_declaration(struct d_visit_ctx * ctx, struct osstream * oss, struct declaration * p_declaration); + +static void d_visit_iteration_statement(struct d_visit_ctx * ctx, struct osstream * oss, struct iteration_statement * p_iteration_statement) +{ + print_identation(ctx, oss); + if (p_iteration_statement->first_token->type == 9042) + { + ss_fprintf(oss, "while ("); + if (p_iteration_statement->expression1) + { + d_visit_expression(ctx, oss, p_iteration_statement->expression1); + } + ss_fprintf(oss, ")\n"); + d_visit_secondary_block(ctx, oss, p_iteration_statement->secondary_block); + } + else + { + if (p_iteration_statement->first_token->type == 9008) + { + ss_fprintf(oss, "do\n"); + d_visit_secondary_block(ctx, oss, p_iteration_statement->secondary_block); + print_identation(ctx, oss); + ss_fprintf(oss, "while ("); + d_visit_expression(ctx, oss, p_iteration_statement->expression1); + ss_fprintf(oss, ");\n"); + } + else + { + if (p_iteration_statement->first_token->type == 9015) + { + if (p_iteration_statement->declaration) + { + ss_fprintf(oss, "{\n"); + ctx->indentation++; + d_visit_declaration(ctx, oss, p_iteration_statement->declaration); + print_identation(ctx, oss); + ss_fprintf(oss, "for ("); + } + else + { + if (p_iteration_statement->expression0) + { + ss_fprintf(oss, "for ("); + d_visit_expression(ctx, oss, p_iteration_statement->expression0); + } + else + { + ss_fprintf(oss, "for ("); + } + } + ss_fprintf(oss, "; "); + if (p_iteration_statement->expression1) + { + d_visit_expression(ctx, oss, p_iteration_statement->expression1); + } + ss_fprintf(oss, "; "); + if (p_iteration_statement->expression2) + { + d_visit_expression(ctx, oss, p_iteration_statement->expression2); + } + ss_fprintf(oss, ")\n"); + d_visit_secondary_block(ctx, oss, p_iteration_statement->secondary_block); + if (p_iteration_statement->declaration) + { + ctx->indentation--; + print_identation(ctx, oss); + ss_fprintf(oss, "}\n"); + } + } + } + } +} + +static void d_visit_init_declarator_list(struct d_visit_ctx * ctx, struct osstream * oss, struct init_declarator_list * p_init_declarator_list, unsigned char binline); + +static void d_visit_simple_declaration(struct d_visit_ctx * ctx, struct osstream * oss, struct simple_declaration * p_simple_declaration) +{ + d_visit_init_declarator_list(ctx, oss, &p_simple_declaration->init_declarator_list, 0); +} + +static void d_visit_init_statement(struct d_visit_ctx * ctx, struct osstream * oss, struct init_statement * p_init_statement) +{ + if (p_init_statement->p_expression_statement) + { + d_visit_expression_statement(ctx, oss, p_init_statement->p_expression_statement); + } + if (p_init_statement->p_simple_declaration) + { + d_visit_simple_declaration(ctx, oss, p_init_statement->p_simple_declaration); + } +} + +static void d_visit_init_declarator(struct d_visit_ctx * ctx, struct osstream * oss, struct init_declarator * p_init_declarator, unsigned char binline); + +static void d_visit_condition(struct d_visit_ctx * ctx, struct osstream * oss, struct condition * p_condition) +{ + if (p_condition->p_init_declarator) + { + d_visit_init_declarator(ctx, oss, p_condition->p_init_declarator, 0); + } + if (p_condition->expression) + { + d_visit_expression(ctx, oss, p_condition->expression); + } +} + +static unsigned char is_compound_statement(struct secondary_block * p_secondary_block) +{ + if (p_secondary_block->statement && p_secondary_block->statement->unlabeled_statement && p_secondary_block->statement->unlabeled_statement->primary_block && p_secondary_block->statement->unlabeled_statement->primary_block->compound_statement) + { + return 1; + } + return 0; +} + +static void d_visit_selection_statement(struct d_visit_ctx * ctx, struct osstream * oss, struct selection_statement * p_selection_statement) +{ + print_identation(ctx, oss); + if (p_selection_statement->first_token->type == 9034) + { + ss_fprintf(oss, "switch ("); + d_visit_condition(ctx, oss, p_selection_statement->condition); + ss_fprintf(oss, ")\n"); + d_visit_secondary_block(ctx, oss, p_selection_statement->secondary_block); + } + else + { + if (p_selection_statement->first_token->type == 9017) + { + unsigned char addclose = 0; + if (p_selection_statement->p_init_statement) + { + ss_fprintf(oss, "{\n"); + addclose = 1; + ctx->indentation++; + d_visit_init_statement(ctx, oss, p_selection_statement->p_init_statement); + print_identation(ctx, oss); + } + if (p_selection_statement->condition) + { + if (p_selection_statement->condition->p_init_declarator) + { + ss_fprintf(oss, "{\n"); + ctx->indentation++; + addclose = 1; + d_visit_init_declarator(ctx, oss, p_selection_statement->condition->p_init_declarator, 0); + print_identation(ctx, oss); + ss_fprintf(oss, "if ("); + ss_fprintf(oss, "%s", p_selection_statement->condition->p_init_declarator->p_declarator->name_opt->lexeme); + ss_fprintf(oss, ")\n"); + } + else + { + if (p_selection_statement->condition->expression) + { + ss_fprintf(oss, "if ("); + d_visit_expression(ctx, oss, p_selection_statement->condition->expression); + ss_fprintf(oss, ")\n"); + } + } + } + if (p_selection_statement->secondary_block) + { + if (is_compound_statement(p_selection_statement->secondary_block)) + { + d_visit_secondary_block(ctx, oss, p_selection_statement->secondary_block); + } + else + { + print_identation(ctx, oss); + ss_fprintf(oss, "{\n"); + ctx->indentation++; + d_visit_secondary_block(ctx, oss, p_selection_statement->secondary_block); + ctx->indentation--; + print_identation(ctx, oss); + ss_fprintf(oss, "}\n"); + } + } + if (p_selection_statement->else_secondary_block_opt) + { + print_identation(ctx, oss); + ss_fprintf(oss, "else\n"); + if (is_compound_statement(p_selection_statement->else_secondary_block_opt)) + { + d_visit_secondary_block(ctx, oss, p_selection_statement->else_secondary_block_opt); + } + else + { + print_identation(ctx, oss); + ss_fprintf(oss, "{\n"); + ctx->indentation++; + d_visit_secondary_block(ctx, oss, p_selection_statement->else_secondary_block_opt); + ctx->indentation--; + print_identation(ctx, oss); + ss_fprintf(oss, "}\n"); + } + } + if (addclose) + { + ctx->indentation--; + print_identation(ctx, oss); + ss_fprintf(oss, "}\n"); + } + } + } +} + +static void d_visit_try_statement(struct d_visit_ctx * ctx, struct osstream * oss, struct try_statement * p_try_statement) +{ + print_identation(ctx, oss); + ss_fprintf(oss, "if (1)\n"); + d_visit_secondary_block(ctx, oss, p_try_statement->secondary_block); + print_identation(ctx, oss); + ss_fprintf(oss, "else _catch_label_%d:\n", p_try_statement->try_catch_block_index); + if (p_try_statement->catch_secondary_block_opt) + { + d_visit_secondary_block(ctx, oss, p_try_statement->catch_secondary_block_opt); + } +} + +static void d_visit_primary_block(struct d_visit_ctx * ctx, struct osstream * oss, struct primary_block * p_primary_block) +{ + if (p_primary_block->defer_statement) + { + } + else + { + if (p_primary_block->compound_statement) + { + d_visit_compound_statement(ctx, oss, p_primary_block->compound_statement); + } + else + { + if (p_primary_block->iteration_statement) + { + d_visit_iteration_statement(ctx, oss, p_primary_block->iteration_statement); + } + else + { + if (p_primary_block->selection_statement) + { + d_visit_selection_statement(ctx, oss, p_primary_block->selection_statement); + } + else + { + if (p_primary_block->try_statement) + { + d_visit_try_statement(ctx, oss, p_primary_block->try_statement); + } + } + } + } + } +} + +static void d_visit_unlabeled_statement(struct d_visit_ctx * ctx, struct osstream * oss, struct unlabeled_statement * p_unlabeled_statement) +{ + if (p_unlabeled_statement->primary_block) + { + d_visit_primary_block(ctx, oss, p_unlabeled_statement->primary_block); + } + else + { + if (p_unlabeled_statement->expression_statement) + { + d_visit_expression_statement(ctx, oss, p_unlabeled_statement->expression_statement); + } + else + { + if (p_unlabeled_statement->jump_statement) + { + d_visit_jump_statement(ctx, oss, p_unlabeled_statement->jump_statement); + } + else + { + ; + } + } + } +} + +static void d_visit_label(struct d_visit_ctx * ctx, struct osstream * oss, struct label * p_label) +{ + if (p_label->p_first_token->type == 9001) + { + print_identation(ctx, oss); + ss_fprintf(oss, "case "); + object_print_value(oss, &p_label->constant_expression->object); + ss_fprintf(oss, " :\n"); + } + else + { + if (p_label->p_first_token->type == 8996) + { + print_identation(ctx, oss); + ss_fprintf(oss, "%s:\n", p_label->p_first_token->lexeme); + } + else + { + if (p_label->p_first_token->type == 9007) + { + print_identation(ctx, oss); + ss_fprintf(oss, "default:\n"); + } + } + } +} + +void ss_swap(struct osstream * a, struct osstream * b); + +static void d_visit_block_item(struct d_visit_ctx * ctx, struct osstream * oss, struct block_item * p_block_item) +{ + struct osstream ss0 = {0}; + ss_swap(oss, &ss0); + ss_clear(&ctx->add_this_before); + if (p_block_item->declaration) + { + d_visit_declaration(ctx, oss, p_block_item->declaration); + } + else + { + if (p_block_item->unlabeled_statement) + { + d_visit_unlabeled_statement(ctx, oss, p_block_item->unlabeled_statement); + } + else + { + if (p_block_item->label) + { + d_visit_label(ctx, oss, p_block_item->label); + } + } + } + if (ctx->add_this_before.size > 0) + { + ss_fprintf(&ss0, "%s", ctx->add_this_before.c_str); + ss_clear(&ctx->add_this_before); + } + if (oss->c_str) + { + ss_fprintf(&ss0, "%s", oss->c_str); + } + ss_swap(oss, &ss0); + ss_close(&ss0); +} + +static void d_visit_block_item_list(struct d_visit_ctx * ctx, struct osstream * oss, struct block_item_list * p_block_item_list) +{ + struct block_item * p_block_item = p_block_item_list->head; + while (p_block_item) + { + d_visit_block_item(ctx, oss, p_block_item); + p_block_item = p_block_item->next; + } +} + +static void d_visit_compound_statement(struct d_visit_ctx * ctx, struct osstream * oss, struct compound_statement * p_compound_statement) +{ + print_identation(ctx, oss); + ss_fprintf(oss, "{\n"); + ctx->indentation++; + d_visit_block_item_list(ctx, oss, &p_compound_statement->block_item_list); + unsigned char ends_with_jump = 0; + if (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 != ((void *)0)) + { + ends_with_jump = 1; + } + if ( !ends_with_jump) + { + il_print_defer_list(ctx, oss, &p_compound_statement->defer_list); + } + ctx->indentation--; + print_identation(ctx, oss); + ss_fprintf(oss, "}\n"); +} + +void *calloc(int nmemb, unsigned int size); +unsigned char type_is_array(struct type * p_type); +struct type get_array_item_type(struct type * p_type); + +static void register_struct_types_and_functions(struct d_visit_ctx * ctx, struct type * p_type0) +{ + if (1) + { + struct type * p_type = p_type0; + while (p_type) + { + switch (p_type->category) + { + case 0 : + { + if (p_type->struct_or_union_specifier) + { + struct struct_or_union_specifier * p_complete = get_complete_struct_or_union_specifier2(p_type->struct_or_union_specifier); + if (p_complete) + { + char name[100]; + snprintf(name, sizeof name, "%p", (void *)p_complete); + struct map_entry * p = hashmap_find(&ctx->structs_map, name); + if (p == ((void *)0)) + { + struct map_entry * p_name = hashmap_find(&ctx->tag_names, p_complete->tag_name); + if (p_name != ((void *)0)) + { + char new_name[100]; + snprintf(new_name, sizeof name, "%s%d", p_complete->tag_name, ctx->tag_name_count++); + snprintf(p_complete->tag_name, sizeof p_complete->tag_name, "%s", new_name); + struct hash_item_set i = {0}; + i.number = 1; + hashmap_set(&ctx->tag_names, new_name, &i); + } + else + { + struct hash_item_set i = {0}; + i.number = 1; + hashmap_set(&ctx->tag_names, p_complete->tag_name, &i); + } + struct struct_entry * p_struct_entry = calloc(1, sizeof *p_struct_entry); + if (p_struct_entry == ((void *)0)) + { + goto _catch_label_1; + } + p_struct_entry->p_struct_or_union_specifier = p_complete; + struct hash_item_set i = {0}; + i.p_struct_entry = p_struct_entry; + hashmap_set(&ctx->structs_map, name, &i); + struct member_declaration * member_declaration = p_complete->member_declaration_list.head; + while (member_declaration) + { + struct member_declarator * member_declarator = ((void *)0); + if (member_declaration->member_declarator_list_opt) + { + member_declarator = member_declaration->member_declarator_list_opt->head; + while (member_declarator) + { + if (type_is_struct_or_union(&member_declarator->declarator->type)) + { + struct struct_or_union_specifier * p_complete_member = p_complete_member = get_complete_struct_or_union_specifier(member_declarator->declarator->type.struct_or_union_specifier); + char name2[100]; + snprintf(name2, sizeof name2, "%p", (void *)p_complete_member); + register_struct_types_and_functions(ctx, &member_declarator->declarator->type); + struct map_entry * p2 = hashmap_find(&ctx->structs_map, name2); + if (p2 != ((void *)0)) + { + struct_entry_list_push_back(&p_struct_entry->dependencies, p2->data.p_struct_entry); + } + } + if (type_is_array(&member_declarator->declarator->type)) + { + struct type t = get_array_item_type(&member_declarator->declarator->type); + if (type_is_struct_or_union(&t)) + { + struct struct_or_union_specifier * p_complete_member = p_complete_member = get_complete_struct_or_union_specifier(t.struct_or_union_specifier); + char name2[100]; + snprintf(name2, sizeof name2, "%p", (void *)p_complete_member); + register_struct_types_and_functions(ctx, &t); + struct map_entry * p2 = hashmap_find(&ctx->structs_map, name2); + if (p2 != ((void *)0)) + { + struct_entry_list_push_back(&p_struct_entry->dependencies, p2->data.p_struct_entry); + } + } + else + { + register_struct_types_and_functions(ctx, &member_declarator->declarator->type); + } + type_destroy(&t); + } + else + { + register_struct_types_and_functions(ctx, &member_declarator->declarator->type); + } + member_declarator = member_declarator->next; + } + } + else + { + if (member_declaration->specifier_qualifier_list != ((void *)0)) + { + if (member_declaration->specifier_qualifier_list->struct_or_union_specifier) + { + struct type t = {0}; + t.category = 0; + t.struct_or_union_specifier = member_declaration->specifier_qualifier_list->struct_or_union_specifier; + t.type_specifier_flags = 32768; + if (type_is_struct_or_union(&t)) + { + struct struct_or_union_specifier * p_complete_member = p_complete_member = get_complete_struct_or_union_specifier(t.struct_or_union_specifier); + char name2[100]; + snprintf(name2, sizeof name2, "%p", (void *)p_complete_member); + register_struct_types_and_functions(ctx, &t); + struct map_entry * p2 = hashmap_find(&ctx->structs_map, name2); + if (p2 != ((void *)0)) + { + struct_entry_list_push_back(&p_struct_entry->dependencies, p2->data.p_struct_entry); + } + } + if (type_is_array(&t)) + { + struct type t = get_array_item_type(&t); + if (type_is_struct_or_union(&t)) + { + struct struct_or_union_specifier * p_complete_member = p_complete_member = get_complete_struct_or_union_specifier(t.struct_or_union_specifier); + char name2[100]; + snprintf(name2, sizeof name2, "%p", (void *)p_complete_member); + register_struct_types_and_functions(ctx, &t); + struct map_entry * p2 = hashmap_find(&ctx->structs_map, name2); + if (p2 != ((void *)0)) + { + struct_entry_list_push_back(&p_struct_entry->dependencies, p2->data.p_struct_entry); + } + } + else + { + register_struct_types_and_functions(ctx, &t); + } + type_destroy(&t); + } + else + { + register_struct_types_and_functions(ctx, &t); + } + type_destroy(&t); + } + } + } + member_declaration = member_declaration->next; + } + } + } + } + else + { + } + } + break; + case 1 : + { + struct param * pa = p_type->params.head; + while (pa) + { + register_struct_types_and_functions(ctx, &pa->type); + pa = pa->next; + } + } + break; + case 2 : + case 3 : + break; + } + p_type = p_type->next; + } + } + else _catch_label_1: + { + } +} + +unsigned char struct_or_union_specifier_is_union(struct struct_or_union_specifier * p); +struct enum_specifier *get_complete_enum_specifier(struct enum_specifier * p_enum_specifier); +unsigned char print_type_specifier_flags(struct osstream * ss, unsigned char * first, int e_type_specifier_flags); + +static void d_print_type_core(struct d_visit_ctx * ctx, struct osstream * ss, struct type * p_type0, char * name_opt) +{ + struct type * p_type = p_type0; + unsigned char previous_was_pointer_to = 0; + while (p_type) + { + switch (p_type->category) + { + case 0 : + { + struct osstream local = {0}; + unsigned char first = 1; + if (p_type->struct_or_union_specifier) + { + if (struct_or_union_specifier_is_union(p_type->struct_or_union_specifier)) + { + ss_fprintf(&local, "union %s", p_type->struct_or_union_specifier->tag_name); + } + else + { + ss_fprintf(&local, "struct %s", p_type->struct_or_union_specifier->tag_name); + } + } + else + { + if (p_type->enum_specifier) + { + struct enum_specifier * p_enum_specifier = get_complete_enum_specifier(p_type->enum_specifier); + if (p_enum_specifier && p_enum_specifier->specifier_qualifier_list) + { + print_type_specifier_flags(&local, &first, p_enum_specifier->specifier_qualifier_list->type_specifier_flags); + } + else + { + ss_fprintf(&local, "int "); + } + } + else + { + if (p_type->type_specifier_flags & 512) + { + ss_fprintf(&local, "unsigned char "); + } + else + { + print_type_specifier_flags(&local, &first, p_type->type_specifier_flags); + } + } + } + if (name_opt) + { + if (first) + { + ss_fprintf(ss, " "); + first = 0; + } + ss_fprintf(ss, "%s", name_opt); + name_opt = ((void *)0); + } + struct osstream local2 = {0}; + if (ss->c_str) + { + ss_fprintf(&local2, "%s %s", local.c_str, ss->c_str); + } + else + { + ss_fprintf(&local2, "%s", local.c_str); + } + ss_swap(ss, &local2); + ss_close(&local2); + } + previous_was_pointer_to = 0; + break; + case 2 : + if (name_opt) + { + ss_fprintf(ss, "%s", name_opt); + name_opt = ((void *)0); + } + ss_fprintf(ss, "["); + unsigned char b = 1; + if (p_type->num_of_elements > 0) + { + if ( !b) + { + ss_fprintf(ss, " "); + } + ss_fprintf(ss, "%d", p_type->num_of_elements); + } + ss_fprintf(ss, "]"); + previous_was_pointer_to = 0; + break; + case 1 : + if (name_opt) + { + ss_fprintf(ss, "%s", name_opt); + name_opt = ((void *)0); + } + ss_fprintf(ss, "("); + struct param * pa = p_type->params.head; + while (pa) + { + struct osstream sslocal = {0}; + struct osstream local2 = {0}; + d_print_type_core(ctx, &local2, &pa->type, pa->type.name_opt); + ss_fprintf(&sslocal, "%s", local2.c_str); + ss_fprintf(ss, "%s", sslocal.c_str); + if (pa->next) + { + ss_fprintf(ss, ", "); + } + ss_close(&sslocal); + pa = pa->next; + } + if (p_type->params.is_var_args) + { + if (p_type->params.head) + { + ss_fprintf(ss, ", "); + } + ss_fprintf(ss, "..."); + } + ss_fprintf(ss, ")"); + previous_was_pointer_to = 0; + break; + case 3 : + { + struct osstream local = {0}; + if (p_type->next && ((p_type->next->category == 1 || p_type->next->category == 2))) + { + ss_fprintf(&local, "("); + } + ss_fprintf(&local, "*"); + unsigned char first = 0; + if (name_opt) + { + if ( !first) + { + ss_fprintf(ss, " "); + } + ss_fprintf(ss, "%s", name_opt); + name_opt = ((void *)0); + first = 0; + } + if (ss->c_str) + { + ss_fprintf(&local, "%s", ss->c_str); + } + if (p_type->next && (p_type->next->category == 1 || p_type->next->category == 2)) + { + ss_fprintf(&local, ")", ss->c_str); + } + ss_swap(ss, &local); + ss_close(&local); + previous_was_pointer_to = 1; + } + break; + } + p_type = p_type->next; + } +} + +static void d_print_type(struct d_visit_ctx * ctx, struct osstream * ss, struct type * p_type, char * name_opt) +{ + register_struct_types_and_functions(ctx, p_type); + struct osstream local = {0}; + d_print_type_core(ctx, &local, p_type, name_opt); + if (p_type->storage_class_specifier_flags & 2) + { + ss_fprintf(ss, "extern "); + } + if (p_type->storage_class_specifier_flags & 4) + { + ss_fprintf(ss, "static "); + } + ss_fprintf(ss, "%s", local.c_str); + ss_close(&local); +} + +unsigned char object_is_reference(struct object * p_object); + +static unsigned char is_all_zero(struct object * object) +{ + if (object_is_reference(object)) + { + object = object_get_referenced(object); + } + if (object->members != ((void *)0)) + { + struct object * member = object->members; + while (member) + { + if ( !is_all_zero(member)) + { + return 0; + } + member = member->next; + } + } + if (object->p_init_expression) + { + if (object_has_constant_value(&object->p_init_expression->object)) + { + if (object->p_init_expression->object.value.bool_value != 0) + { + return 0; + } + } + else + { + return 0; + } + } + return 1; +} + +unsigned char type_is_union(struct type * p_type); + +static void object_print_constant_initialization(struct d_visit_ctx * ctx, struct osstream * ss, struct object * object, unsigned char * first) +{ + if (object_is_reference(object)) + { + object = object_get_referenced(object); + } + if (object->p_init_expression && object->p_init_expression->expression_type == 3) + { + if ( !( *first)) + { + ss_fprintf(ss, ", "); + } + *first = 0; + il_visit_literal_string(object->p_init_expression->first_token, ss); + return; + } + if (object->members != ((void *)0)) + { + if (type_is_union(&object->type2)) + { + struct object * member = object->members; + object_print_constant_initialization(ctx, ss, member, first); + } + else + { + struct object * member = object->members; + while (member) + { + object_print_constant_initialization(ctx, ss, member, first); + member = member->next; + } + } + } + else + { + if ( !( *first)) + { + ss_fprintf(ss, ", "); + } + *first = 0; + if (object->p_init_expression) + { + if (object_has_constant_value(&object->p_init_expression->object)) + { + object_print_value(ss, &object->p_init_expression->object); + } + else + { + if (object->p_init_expression->expression_type == 3) + { + il_visit_literal_string(object->p_init_expression->first_token, ss); + } + else + { + ss_fprintf(ss, "0"); + } + } + } + else + { + ss_fprintf(ss, "0"); + } + } +} + +static void object_print_non_constant_initialization(struct d_visit_ctx * ctx, struct osstream * ss, struct object * object, char * declarator_name) +{ + if (object_is_reference(object)) + { + object = object_get_referenced(object); + } + if (object->members != ((void *)0)) + { + if (type_is_union(&object->type2)) + { + struct object * member = object->members; + if (member->p_init_expression && object_has_constant_value(&member->p_init_expression->object)) + { + } + else + { + while (member) + { + if (member->p_init_expression) + { + print_identation_core(ss, ctx->indentation); + ss_fprintf(ss, "%s%s = ", declarator_name, member->debug_name); + struct osstream local = {0}; + d_visit_expression(ctx, &local, member->p_init_expression); + ss_fprintf(ss, "%s", local.c_str); + ss_fprintf(ss, ";\n"); + ss_close(&local); + break; + } + member = member->next; + } + } + } + else + { + struct object * member = object->members; + while (member) + { + object_print_non_constant_initialization(ctx, ss, member, declarator_name); + member = member->next; + } + } + } + else + { + if (object->p_init_expression) + { + if (object->p_init_expression->expression_type == 3) + { + } + else + { + if ( !object_has_constant_value(&object->p_init_expression->object)) + { + print_identation_core(ss, ctx->indentation); + ss_fprintf(ss, "%s%s = ", declarator_name, object->debug_name); + struct osstream local = {0}; + d_visit_expression(ctx, &local, object->p_init_expression); + ss_fprintf(ss, "%s", local.c_str); + ss_fprintf(ss, ";\n"); + ss_close(&local); + } + } + } + } +} + +static void d_visit_init_declarator(struct d_visit_ctx * ctx, struct osstream * oss, struct init_declarator * p_init_declarator, unsigned char binline) +{ + if (type_is_function(&p_init_declarator->p_declarator->type) && p_init_declarator->p_declarator->function_body == ((void *)0)) + { + } + else + { + if ((p_init_declarator->p_declarator->declaration_specifiers->storage_class_specifier_flags & 2) || (p_init_declarator->p_declarator->declaration_specifiers->storage_class_specifier_flags & 1)) + { + } + else + { + print_identation(ctx, oss); + if (binline) + { + ss_fprintf(oss, "__inline "); + } + struct osstream ss = {0}; + d_print_type(ctx, &ss, &p_init_declarator->p_declarator->type, p_init_declarator->p_declarator->name_opt->lexeme); + ss_fprintf(oss, "%s", ss.c_str); + if (p_init_declarator->initializer) + { + ss_fprintf(oss, " = "); + if (p_init_declarator->initializer->assignment_expression) + { + d_visit_expression(ctx, oss, p_init_declarator->initializer->assignment_expression); + ss_fprintf(oss, ";\n"); + } + else + { + if (p_init_declarator->initializer->braced_initializer) + { + if (p_init_declarator->initializer->braced_initializer->initializer_list && p_init_declarator->initializer->braced_initializer->initializer_list->head) + { + if (is_all_zero(&p_init_declarator->p_declarator->object)) + { + ss_fprintf(oss, "{0};\n"); + } + else + { + unsigned char first = 1; + ss_fprintf(oss, "{"); + object_print_constant_initialization(ctx, oss, &p_init_declarator->p_declarator->object, &first); + ss_fprintf(oss, "}"); + ss_fprintf(oss, ";\n"); + object_print_non_constant_initialization(ctx, oss, &p_init_declarator->p_declarator->object, p_init_declarator->p_declarator->name_opt->lexeme); + } + } + else + { + ss_fprintf(oss, "{0};\n"); + } + } + } + } + else + { + if (p_init_declarator->p_declarator->function_body == ((void *)0)) + { + ss_fprintf(oss, ";\n"); + } + } + if (p_init_declarator->p_declarator->function_body) + { + struct hash_item_set i = {0}; + i.number = 1; + hashmap_set(&ctx->function_map, p_init_declarator->p_declarator->name_opt->lexeme, &i); + ss_fprintf(oss, "\n"); + d_visit_compound_statement(ctx, oss, p_init_declarator->p_declarator->function_body); + ss_fprintf(oss, "\n"); + } + } + } +} + +static void d_visit_init_declarator_list(struct d_visit_ctx * ctx, struct osstream * oss, struct init_declarator_list * p_init_declarator_list, unsigned char binline) +{ + struct init_declarator * p_init_declarator = p_init_declarator_list->head; + while (p_init_declarator) + { + d_visit_init_declarator(ctx, oss, p_init_declarator, binline); + p_init_declarator = p_init_declarator->next; + } +} + +static void d_visit_declaration(struct d_visit_ctx * ctx, struct osstream * oss, struct declaration * p_declaration) +{ + unsigned char binline = 0; + if (p_declaration->declaration_specifiers && p_declaration->declaration_specifiers->head) + { + struct declaration_specifier * p = p_declaration->declaration_specifiers->head; + while (p) + { + if (p->function_specifier && p->function_specifier->token->type == 9018) + { + binline = 1; + } + p = p->next; + } + } + if (p_declaration->init_declarator_list.head) + { + if ( !binline) + { + d_visit_init_declarator_list(ctx, oss, &p_declaration->init_declarator_list, binline); + } + } +} + +void print_complete_struct(struct d_visit_ctx * ctx, struct osstream * ss, struct struct_or_union_specifier * p_struct_or_union_specifier) +{ + struct struct_or_union_specifier * p_complete = get_complete_struct_or_union_specifier2(p_struct_or_union_specifier); + struct member_declaration * member_declaration = p_complete->member_declaration_list.head; + if (struct_or_union_specifier_is_union(p_complete)) + { + ss_fprintf(ss, "union %s", p_complete->tag_name); + } + else + { + ss_fprintf(ss, "struct %s", p_complete->tag_name); + } + if (p_complete->member_declaration_list.head) + { + ss_fprintf(ss, " "); + ss_fprintf(ss, "{\n"); + } + int no_name_index = 0; + while (member_declaration) + { + struct member_declarator * member_declarator = ((void *)0); + if (member_declaration->member_declarator_list_opt) + { + member_declarator = member_declaration->member_declarator_list_opt->head; + while (member_declarator) + { + if (member_declarator->declarator->name_opt) + { + ss_fprintf(ss, " "); + d_print_type(ctx, ss, &member_declarator->declarator->type, member_declarator->declarator->name_opt->lexeme); + ss_fprintf(ss, ";\n"); + } + member_declarator = member_declarator->next; + } + } + else + { + if (member_declaration->specifier_qualifier_list != ((void *)0)) + { + if (member_declaration->specifier_qualifier_list->struct_or_union_specifier) + { + struct type t = {0}; + t.category = 0; + t.struct_or_union_specifier = member_declaration->specifier_qualifier_list->struct_or_union_specifier; + t.type_specifier_flags = 32768; + char name[100]; + snprintf(name, sizeof name, "__m%d", no_name_index++); + ss_fprintf(ss, " "); + d_print_type(ctx, ss, &t, name); + ss_fprintf(ss, ";\n"); + type_destroy(&t); + } + } + } + member_declaration = member_declaration->next; + } + if (p_complete->member_declaration_list.head) + { + ss_fprintf(ss, "};\n\n"); + } + else + { + ss_fprintf(ss, ";\n"); + } +} + +void print_complete_structs(struct d_visit_ctx * ctx, struct osstream * ss, struct struct_entry * p_struct_entry) +{ + if (p_struct_entry->done) + { + return; + } + { + int i = 0; + for (; i < p_struct_entry->dependencies.size; i++) + { + struct struct_entry * p_struct_entry_item = p_struct_entry->dependencies.data[i]; + print_complete_structs(ctx, ss, p_struct_entry_item); + p_struct_entry_item = p_struct_entry_item->next; + } + } + if ( !p_struct_entry->done) + { + p_struct_entry->done = 1; + struct osstream local = {0}; + print_complete_struct(ctx, &local, p_struct_entry->p_struct_or_union_specifier); + ss_fprintf(ss, local.c_str); + ss_close(&local); + } +} + +void d_visit(struct d_visit_ctx * ctx, struct osstream * oss) +{ + struct osstream declarations = {0}; + ctx->indentation = 0; + struct declaration * p_declaration = ctx->ast.declaration_list.head; + while (p_declaration) + { + ss_clear(&ctx->add_this_before_external_decl); + ss_clear(&ctx->function_types); + struct osstream declaration = {0}; + d_visit_declaration(ctx, &declaration, p_declaration); + if (ctx->function_types.size > 0) + { + ss_fprintf(&declarations, "%s\n", ctx->function_types.c_str); + ss_clear(&ctx->function_types); + } + if (ctx->add_this_before.size > 0) + { + ss_fprintf(oss, "%s", ctx->add_this_before.c_str); + ss_clear(&ctx->add_this_before); + } + if (ctx->add_this_before_external_decl.size > 0) + { + ss_fprintf(&declarations, "%s", ctx->add_this_before_external_decl.c_str); + ss_clear(&ctx->add_this_before_external_decl); + } + if (declaration.size > 0) + { + ss_fprintf(&declarations, "%s", declaration.c_str); + } + ss_close(&declaration); + p_declaration = p_declaration->next; + } + if (ctx->data_types.c_str) + { + ss_fprintf(oss, "%s", ctx->data_types.c_str); + ss_fprintf(oss, "\n"); + } + { + int i = 0; + for (; i < ctx->structs_map.capacity; i++) + { + struct map_entry * entry = ctx->structs_map.table[i]; + while (entry) + { + print_complete_structs(ctx, oss, entry->data.p_struct_entry); + entry = entry->next; + } + } + } + ss_fprintf(oss, "\n"); + if (declarations.c_str) + { + ss_fprintf(oss, "%s", declarations.c_str); + } + ss_close(&declarations); +} + diff --git a/src/file.c b/src/file.c index f80536d..1a55aa0 100644 --- a/src/file.c +++ b/src/file.c @@ -1,9 +1,8 @@ -union U { - unsigned int _[2]; - int i; - double d; +struct X { + int i; }; -constexpr union U u1 = {1, 2}; /*1.2*/ -static_assert(u1._[0] == 1); -static_assert(u1._[1] == 2); +int main(){ + struct X x = {}; + x = (struct X){}; +} diff --git a/src/lib.c b/src/lib.c index b0293a1..cd9f5d7 100644 --- a/src/lib.c +++ b/src/lib.c @@ -3121,6 +3121,9 @@ void c_clrscr() #include +#include + + #include @@ -3143,6 +3146,9 @@ void c_clrscr() #include + +#include + #ifdef __CAKE__ #pragma cake diagnostic push #pragma cake diagnostic ignored "-Wstyle" @@ -11115,43 +11121,815 @@ char* _Owner _Opt read_file(const char* const path, bool append_newline) static const char file_assert_h[] = { -#include "include\assert.h.include" + +47,42,10,32,42,32,32,84,104,105,115,32,102,105,108,101,32,105,115,32,112,97,114,116,32 +,111,102,32,99,97,107,101,32,99,111,109,112,105,108,101,114,10,32,42,32,32,104,116,116,112 +,115,58,47,47,103,105,116,104,117,98,46,99,111,109,47,116,104,114,97,100,97,109,115,47,99 +,97,107,101,10,42,47,10,10,35,105,102,100,101,102,32,78,68,69,66,85,71,10,35,100,101 +,102,105,110,101,32,97,115,115,101,114,116,40,46,46,46,41,32,40,40,118,111,105,100,41,48 +,41,10,35,101,108,115,101,10,35,100,101,102,105,110,101,32,97,115,115,101,114,116,40,46,46 +,46,41,32,97,115,115,101,114,116,40,95,95,86,65,95,65,82,71,83,95,95,41,10,35,101 +,110,100,105,102,10 }; static const char file_stdio_h[] = { -#include "include\stdio.h.include" + +47,42,10,32,42,32,32,84,104,105,115,32,102,105,108,101,32,105,115,32,112,97,114,116,32 +,111,102,32,99,97,107,101,32,99,111,109,112,105,108,101,114,10,32,42,32,32,104,116,116,112 +,115,58,47,47,103,105,116,104,117,98,46,99,111,109,47,116,104,114,97,100,97,109,115,47,99 +,97,107,101,10,42,47,10,10,35,112,114,97,103,109,97,32,111,110,99,101,10,35,100,101,102 +,105,110,101,32,95,73,79,70,66,70,32,48,120,48,48,48,48,10,35,100,101,102,105,110,101 +,32,95,73,79,76,66,70,32,48,120,48,48,52,48,10,35,100,101,102,105,110,101,32,95,73 +,79,78,66,70,32,48,120,48,48,48,52,10,10,35,100,101,102,105,110,101,32,66,85,70,83 +,73,90,32,32,53,49,50,10,10,35,100,101,102,105,110,101,32,69,79,70,32,32,32,32,40 +,45,49,41,10,10,35,100,101,102,105,110,101,32,70,73,76,69,78,65,77,69,95,77,65,88 +,32,32,32,32,50,54,48,10,35,100,101,102,105,110,101,32,70,79,80,69,78,95,77,65,88 +,32,32,32,32,32,32,32,50,48,10,10,35,100,101,102,105,110,101,32,76,95,116,109,112,110 +,97,109,32,32,32,50,54,48,32,47,47,32,95,77,65,88,95,80,65,84,72,10,10,47,42 +,32,83,101,101,107,32,109,101,116,104,111,100,32,99,111,110,115,116,97,110,116,115,32,42,47 +,10,10,35,100,101,102,105,110,101,32,83,69,69,75,95,67,85,82,32,32,32,32,49,10,35 +,100,101,102,105,110,101,32,83,69,69,75,95,69,78,68,32,32,32,32,50,10,35,100,101,102 +,105,110,101,32,83,69,69,75,95,83,69,84,32,32,32,32,48,10,10,10,35,100,101,102,105 +,110,101,32,84,77,80,95,77,65,88,32,32,32,32,32,32,32,32,32,50,49,52,55,52,56 +,51,54,52,55,10,10,10,10,116,121,112,101,100,101,102,32,108,111,110,103,32,108,111,110,103 +,32,102,112,111,115,95,116,59,10,116,121,112,101,100,101,102,32,105,110,116,32,70,73,76,69 +,59,10,10,101,120,116,101,114,110,32,70,73,76,69,42,32,115,116,100,105,110,59,10,101,120 +,116,101,114,110,32,70,73,76,69,42,32,115,116,100,111,117,116,59,10,101,120,116,101,114,110 +,32,70,73,76,69,42,32,115,116,100,101,114,114,59,10,10,116,121,112,101,100,101,102,32,105 +,110,116,32,115,105,122,101,95,116,59,10,116,121,112,101,100,101,102,32,118,111,105,100,42,32 +,118,97,95,108,105,115,116,59,10,105,110,116,32,114,101,109,111,118,101,40,99,111,110,115,116 +,32,99,104,97,114,42,32,102,105,108,101,110,97,109,101,41,59,10,105,110,116,32,114,101,110 +,97,109,101,40,99,111,110,115,116,32,99,104,97,114,42,32,111,108,100,44,32,99,111,110,115 +,116,32,99,104,97,114,42,32,110,101,119,115,41,59,10,70,73,76,69,42,32,95,79,112,116 +,32,116,109,112,102,105,108,101,40,118,111,105,100,41,59,10,99,104,97,114,42,32,116,109,112 +,110,97,109,40,99,104,97,114,42,32,115,41,59,10,35,105,102,32,100,101,102,105,110,101,100 +,40,95,95,83,84,68,67,95,79,87,78,69,82,83,72,73,80,95,95,41,32,10,105,110,116 +,32,102,99,108,111,115,101,40,70,73,76,69,42,32,95,79,119,110,101,114,32,115,116,114,101 +,97,109,41,59,10,35,101,108,115,101,10,105,110,116,32,102,99,108,111,115,101,40,70,73,76 +,69,42,32,115,116,114,101,97,109,41,59,10,35,101,110,100,105,102,10,105,110,116,32,102,102 +,108,117,115,104,40,70,73,76,69,42,32,115,116,114,101,97,109,41,59,10,35,105,102,32,100 +,101,102,105,110,101,100,40,95,95,83,84,68,67,95,79,87,78,69,82,83,72,73,80,95,95 +,41,32,10,70,73,76,69,42,32,95,79,119,110,101,114,32,95,79,112,116,32,102,111,112,101 +,110,40,99,111,110,115,116,32,99,104,97,114,42,32,114,101,115,116,114,105,99,116,32,102,105 +,108,101,110,97,109,101,44,32,99,111,110,115,116,32,99,104,97,114,42,32,114,101,115,116,114 +,105,99,116,32,109,111,100,101,41,59,10,70,73,76,69,42,32,95,79,119,110,101,114,32,95 +,79,112,116,32,102,114,101,111,112,101,110,40,99,111,110,115,116,32,99,104,97,114,42,32,114 +,101,115,116,114,105,99,116,32,102,105,108,101,110,97,109,101,44,32,99,111,110,115,116,32,99 +,104,97,114,42,32,114,101,115,116,114,105,99,116,32,109,111,100,101,44,32,70,73,76,69,42 +,32,114,101,115,116,114,105,99,116,32,115,116,114,101,97,109,41,59,10,35,101,108,115,101,10 +,70,73,76,69,42,32,102,111,112,101,110,40,99,111,110,115,116,32,99,104,97,114,42,32,114 +,101,115,116,114,105,99,116,32,102,105,108,101,110,97,109,101,44,32,99,111,110,115,116,32,99 +,104,97,114,42,32,114,101,115,116,114,105,99,116,32,109,111,100,101,41,59,10,70,73,76,69 +,42,32,102,114,101,111,112,101,110,40,99,111,110,115,116,32,99,104,97,114,42,32,114,101,115 +,116,114,105,99,116,32,102,105,108,101,110,97,109,101,44,32,99,111,110,115,116,32,99,104,97 +,114,42,32,114,101,115,116,114,105,99,116,32,109,111,100,101,44,32,70,73,76,69,42,32,114 +,101,115,116,114,105,99,116,32,115,116,114,101,97,109,41,59,10,35,101,110,100,105,102,10,118 +,111,105,100,32,115,101,116,98,117,102,40,70,73,76,69,42,32,114,101,115,116,114,105,99,116 +,32,115,116,114,101,97,109,44,32,99,104,97,114,42,32,114,101,115,116,114,105,99,116,32,98 +,117,102,41,59,10,105,110,116,32,115,101,116,118,98,117,102,40,70,73,76,69,42,32,114,101 +,115,116,114,105,99,116,32,115,116,114,101,97,109,44,32,99,104,97,114,42,32,114,101,115,116 +,114,105,99,116,32,98,117,102,44,32,105,110,116,32,109,111,100,101,44,32,115,105,122,101,95 +,116,32,115,105,122,101,41,59,10,105,110,116,32,102,112,114,105,110,116,102,40,70,73,76,69 +,42,32,114,101,115,116,114,105,99,116,32,115,116,114,101,97,109,44,32,99,111,110,115,116,32 +,99,104,97,114,42,32,114,101,115,116,114,105,99,116,32,102,111,114,109,97,116,44,32,46,46 +,46,41,59,10,105,110,116,32,102,115,99,97,110,102,40,70,73,76,69,42,32,114,101,115,116 +,114,105,99,116,32,115,116,114,101,97,109,44,32,99,111,110,115,116,32,99,104,97,114,42,32 +,114,101,115,116,114,105,99,116,32,102,111,114,109,97,116,44,32,46,46,46,41,59,10,105,110 +,116,32,112,114,105,110,116,102,40,99,111,110,115,116,32,99,104,97,114,42,32,114,101,115,116 +,114,105,99,116,32,102,111,114,109,97,116,44,32,46,46,46,41,59,10,105,110,116,32,115,99 +,97,110,102,40,99,111,110,115,116,32,99,104,97,114,42,32,114,101,115,116,114,105,99,116,32 +,102,111,114,109,97,116,44,32,46,46,46,41,59,10,105,110,116,32,115,110,112,114,105,110,116 +,102,40,99,104,97,114,42,32,114,101,115,116,114,105,99,116,32,115,44,32,115,105,122,101,95 +,116,32,110,44,32,99,111,110,115,116,32,99,104,97,114,42,32,114,101,115,116,114,105,99,116 +,32,102,111,114,109,97,116,44,32,46,46,46,41,59,10,105,110,116,32,115,112,114,105,110,116 +,102,40,99,104,97,114,42,32,114,101,115,116,114,105,99,116,32,115,44,32,99,111,110,115,116 +,32,99,104,97,114,42,32,114,101,115,116,114,105,99,116,32,102,111,114,109,97,116,44,32,46 +,46,46,41,59,10,105,110,116,32,115,115,99,97,110,102,40,99,111,110,115,116,32,99,104,97 +,114,42,32,114,101,115,116,114,105,99,116,32,115,44,32,99,111,110,115,116,32,99,104,97,114 +,42,32,114,101,115,116,114,105,99,116,32,102,111,114,109,97,116,44,32,46,46,46,41,59,10 +,105,110,116,32,118,102,112,114,105,110,116,102,40,70,73,76,69,42,32,114,101,115,116,114,105 +,99,116,32,115,116,114,101,97,109,44,32,99,111,110,115,116,32,99,104,97,114,42,32,114,101 +,115,116,114,105,99,116,32,102,111,114,109,97,116,44,32,118,97,95,108,105,115,116,32,97,114 +,103,41,59,10,105,110,116,32,118,102,115,99,97,110,102,40,70,73,76,69,42,32,114,101,115 +,116,114,105,99,116,32,115,116,114,101,97,109,44,32,99,111,110,115,116,32,99,104,97,114,42 +,32,114,101,115,116,114,105,99,116,32,102,111,114,109,97,116,44,32,118,97,95,108,105,115,116 +,32,97,114,103,41,59,10,105,110,116,32,118,112,114,105,110,116,102,40,99,111,110,115,116,32 +,99,104,97,114,42,32,114,101,115,116,114,105,99,116,32,102,111,114,109,97,116,44,32,118,97 +,95,108,105,115,116,32,97,114,103,41,59,10,105,110,116,32,118,115,99,97,110,102,40,99,111 +,110,115,116,32,99,104,97,114,42,32,114,101,115,116,114,105,99,116,32,102,111,114,109,97,116 +,44,32,118,97,95,108,105,115,116,32,97,114,103,41,59,10,105,110,116,32,112,117,116,115,40 +,99,111,110,115,116,32,99,104,97,114,42,32,115,116,114,41,59,10,105,110,116,32,102,112,117 +,116,115,40,99,111,110,115,116,32,99,104,97,114,42,32,114,101,115,116,114,105,99,116,32,115 +,44,32,70,73,76,69,42,32,114,101,115,116,114,105,99,116,32,115,116,114,101,97,109,41,59 +,10,105,110,116,32,103,101,116,99,40,70,73,76,69,42,32,115,116,114,101,97,109,41,59,10 +,105,110,116,32,103,101,116,99,104,97,114,40,118,111,105,100,41,59,10,105,110,116,32,112,117 +,116,99,40,105,110,116,32,99,44,32,70,73,76,69,42,32,115,116,114,101,97,109,41,59,10 +,105,110,116,32,112,117,116,99,104,97,114,40,105,110,116,32,99,41,59,10,105,110,116,32,112 +,117,116,115,40,99,111,110,115,116,32,99,104,97,114,42,32,115,41,59,10,105,110,116,32,117 +,110,103,101,116,99,40,105,110,116,32,99,44,32,70,73,76,69,42,32,115,116,114,101,97,109 +,41,59,10,105,110,116,32,102,103,101,116,99,40,70,73,76,69,42,32,115,116,114,101,97,109 +,41,59,10,115,105,122,101,95,116,32,102,114,101,97,100,40,118,111,105,100,42,32,114,101,115 +,116,114,105,99,116,32,112,116,114,44,32,115,105,122,101,95,116,32,115,105,122,101,44,32,115 +,105,122,101,95,116,32,110,109,101,109,98,44,32,70,73,76,69,42,32,114,101,115,116,114,105 +,99,116,32,115,116,114,101,97,109,41,59,10,115,105,122,101,95,116,32,102,119,114,105,116,101 +,40,99,111,110,115,116,32,118,111,105,100,42,32,114,101,115,116,114,105,99,116,32,112,116,114 +,44,32,115,105,122,101,95,116,32,115,105,122,101,44,32,115,105,122,101,95,116,32,110,109,101 +,109,98,44,32,70,73,76,69,42,32,114,101,115,116,114,105,99,116,32,115,116,114,101,97,109 +,41,59,10,105,110,116,32,102,103,101,116,112,111,115,40,70,73,76,69,42,32,114,101,115,116 +,114,105,99,116,32,115,116,114,101,97,109,44,32,102,112,111,115,95,116,42,32,114,101,115,116 +,114,105,99,116,32,112,111,115,41,59,10,105,110,116,32,102,115,101,101,107,40,70,73,76,69 +,42,32,115,116,114,101,97,109,44,32,108,111,110,103,32,105,110,116,32,111,102,102,115,101,116 +,44,32,105,110,116,32,119,104,101,110,99,101,41,59,10,105,110,116,32,102,115,101,116,112,111 +,115,40,70,73,76,69,42,32,115,116,114,101,97,109,44,32,99,111,110,115,116,32,102,112,111 +,115,95,116,42,32,112,111,115,41,59,10,108,111,110,103,32,105,110,116,32,102,116,101,108,108 +,40,70,73,76,69,42,32,115,116,114,101,97,109,41,59,10,118,111,105,100,32,114,101,119,105 +,110,100,40,70,73,76,69,42,32,115,116,114,101,97,109,41,59,10,118,111,105,100,32,99,108 +,101,97,114,101,114,114,40,70,73,76,69,42,32,115,116,114,101,97,109,41,59,10,105,110,116 +,32,102,101,111,102,40,70,73,76,69,42,32,115,116,114,101,97,109,41,59,10,105,110,116,32 +,102,101,114,114,111,114,40,70,73,76,69,42,32,115,116,114,101,97,109,41,59,10,118,111,105 +,100,32,112,101,114,114,111,114,40,99,111,110,115,116,32,99,104,97,114,42,32,115,41,59,10 +,10,10,10,35,105,102,110,100,101,102,32,78,85,76,76,10,35,100,101,102,105,110,101,32,78 +,85,76,76,32,40,40,118,111,105,100,42,41,48,41,10,35,101,110,100,105,102,10 }; static const char file_errno_h[] = { -#include "include\errno.h.include" + +47,42,10,32,42,32,32,84,104,105,115,32,102,105,108,101,32,105,115,32,112,97,114,116,32 +,111,102,32,99,97,107,101,32,99,111,109,112,105,108,101,114,10,32,42,32,32,104,116,116,112 +,115,58,47,47,103,105,116,104,117,98,46,99,111,109,47,116,104,114,97,100,97,109,115,47,99 +,97,107,101,10,42,47,10,10,35,112,114,97,103,109,97,32,111,110,99,101,10,10,105,110,116 +,42,32,95,101,114,114,110,111,40,118,111,105,100,41,59,10,35,100,101,102,105,110,101,32,101 +,114,114,110,111,32,40,42,95,101,114,114,110,111,40,41,41,10,10,10,35,100,101,102,105,110 +,101,32,69,80,69,82,77,32,32,32,32,32,32,32,32,32,32,32,49,10,35,100,101,102,105 +,110,101,32,69,78,79,69,78,84,32,32,32,32,32,32,32,32,32,32,50,10,35,100,101,102 +,105,110,101,32,69,83,82,67,72,32,32,32,32,32,32,32,32,32,32,32,51,10,35,100,101 +,102,105,110,101,32,69,73,78,84,82,32,32,32,32,32,32,32,32,32,32,32,52,10,35,100 +,101,102,105,110,101,32,69,73,79,32,32,32,32,32,32,32,32,32,32,32,32,32,53,10,35 +,100,101,102,105,110,101,32,69,78,88,73,79,32,32,32,32,32,32,32,32,32,32,32,54,10 +,35,100,101,102,105,110,101,32,69,50,66,73,71,32,32,32,32,32,32,32,32,32,32,32,55 +,10,35,100,101,102,105,110,101,32,69,78,79,69,88,69,67,32,32,32,32,32,32,32,32,32 +,56,10,35,100,101,102,105,110,101,32,69,66,65,68,70,32,32,32,32,32,32,32,32,32,32 +,32,57,10,35,100,101,102,105,110,101,32,69,67,72,73,76,68,32,32,32,32,32,32,32,32 +,32,32,49,48,10,35,100,101,102,105,110,101,32,69,65,71,65,73,78,32,32,32,32,32,32 +,32,32,32,32,49,49,10,35,100,101,102,105,110,101,32,69,78,79,77,69,77,32,32,32,32 +,32,32,32,32,32,32,49,50,10,35,100,101,102,105,110,101,32,69,65,67,67,69,83,32,32 +,32,32,32,32,32,32,32,32,49,51,10,35,100,101,102,105,110,101,32,69,70,65,85,76,84 +,32,32,32,32,32,32,32,32,32,32,49,52,10,35,100,101,102,105,110,101,32,69,66,85,83 +,89,32,32,32,32,32,32,32,32,32,32,32,49,54,10,35,100,101,102,105,110,101,32,69,69 +,88,73,83,84,32,32,32,32,32,32,32,32,32,32,49,55,10,35,100,101,102,105,110,101,32 +,69,88,68,69,86,32,32,32,32,32,32,32,32,32,32,32,49,56,10,35,100,101,102,105,110 +,101,32,69,78,79,68,69,86,32,32,32,32,32,32,32,32,32,32,49,57,10,35,100,101,102 +,105,110,101,32,69,78,79,84,68,73,82,32,32,32,32,32,32,32,32,32,50,48,10,35,100 +,101,102,105,110,101,32,69,73,83,68,73,82,32,32,32,32,32,32,32,32,32,32,50,49,10 +,35,100,101,102,105,110,101,32,69,78,70,73,76,69,32,32,32,32,32,32,32,32,32,32,50 +,51,10,35,100,101,102,105,110,101,32,69,77,70,73,76,69,32,32,32,32,32,32,32,32,32 +,32,50,52,10,35,100,101,102,105,110,101,32,69,78,79,84,84,89,32,32,32,32,32,32,32 +,32,32,32,50,53,10,35,100,101,102,105,110,101,32,69,70,66,73,71,32,32,32,32,32,32 +,32,32,32,32,32,50,55,10,35,100,101,102,105,110,101,32,69,78,79,83,80,67,32,32,32 +,32,32,32,32,32,32,32,50,56,10,35,100,101,102,105,110,101,32,69,83,80,73,80,69,32 +,32,32,32,32,32,32,32,32,32,50,57,10,35,100,101,102,105,110,101,32,69,82,79,70,83 +,32,32,32,32,32,32,32,32,32,32,32,51,48,10,35,100,101,102,105,110,101,32,69,77,76 +,73,78,75,32,32,32,32,32,32,32,32,32,32,51,49,10,35,100,101,102,105,110,101,32,69 +,80,73,80,69,32,32,32,32,32,32,32,32,32,32,32,51,50,10,35,100,101,102,105,110,101 +,32,69,68,79,77,32,32,32,32,32,32,32,32,32,32,32,32,51,51,10,35,100,101,102,105 +,110,101,32,69,68,69,65,68,76,75,32,32,32,32,32,32,32,32,32,51,54,10,35,100,101 +,102,105,110,101,32,69,78,65,77,69,84,79,79,76,79,78,71,32,32,32,32,51,56,10,35 +,100,101,102,105,110,101,32,69,78,79,76,67,75,32,32,32,32,32,32,32,32,32,32,51,57 +,10,35,100,101,102,105,110,101,32,69,78,79,83,89,83,32,32,32,32,32,32,32,32,32,32 +,52,48,10,35,100,101,102,105,110,101,32,69,78,79,84,69,77,80,84,89,32,32,32,32,32 +,32,32,52,49,10,10,10,47,47,32,83,117,112,112,111,114,116,32,69,68,69,65,68,76,79 +,67,75,32,102,111,114,32,99,111,109,112,97,116,105,98,105,108,105,116,121,32,119,105,116,104 +,32,111,108,100,101,114,32,77,105,99,114,111,115,111,102,116,32,67,32,118,101,114,115,105,111 +,110,115,10,35,100,101,102,105,110,101,32,69,68,69,65,68,76,79,67,75,32,32,32,32,32 +,32,32,69,68,69,65,68,76,75,10,10,35,100,101,102,105,110,101,32,69,65,68,68,82,73 +,78,85,83,69,32,32,32,32,32,32,49,48,48,10,35,100,101,102,105,110,101,32,69,65,68 +,68,82,78,79,84,65,86,65,73,76,32,32,32,49,48,49,10,35,100,101,102,105,110,101,32 +,69,65,70,78,79,83,85,80,80,79,82,84,32,32,32,32,49,48,50,10,35,100,101,102,105 +,110,101,32,69,65,76,82,69,65,68,89,32,32,32,32,32,32,32,32,49,48,51,10,35,100 +,101,102,105,110,101,32,69,66,65,68,77,83,71,32,32,32,32,32,32,32,32,32,49,48,52 +,10,35,100,101,102,105,110,101,32,69,67,65,78,67,69,76,69,68,32,32,32,32,32,32,32 +,49,48,53,10,35,100,101,102,105,110,101,32,69,67,79,78,78,65,66,79,82,84,69,68,32 +,32,32,32,49,48,54,10,35,100,101,102,105,110,101,32,69,67,79,78,78,82,69,70,85,83 +,69,68,32,32,32,32,49,48,55,10,35,100,101,102,105,110,101,32,69,67,79,78,78,82,69 +,83,69,84,32,32,32,32,32,32,49,48,56,10,35,100,101,102,105,110,101,32,69,68,69,83 +,84,65,68,68,82,82,69,81,32,32,32,32,49,48,57,10,35,100,101,102,105,110,101,32,69 +,72,79,83,84,85,78,82,69,65,67,72,32,32,32,32,49,49,48,10,35,100,101,102,105,110 +,101,32,69,73,68,82,77,32,32,32,32,32,32,32,32,32,32,32,49,49,49,10,35,100,101 +,102,105,110,101,32,69,73,78,80,82,79,71,82,69,83,83,32,32,32,32,32,49,49,50,10 +,35,100,101,102,105,110,101,32,69,73,83,67,79,78,78,32,32,32,32,32,32,32,32,32,49 +,49,51,10,35,100,101,102,105,110,101,32,69,76,79,79,80,32,32,32,32,32,32,32,32,32 +,32,32,49,49,52,10,35,100,101,102,105,110,101,32,69,77,83,71,83,73,90,69,32,32,32 +,32,32,32,32,32,49,49,53,10,35,100,101,102,105,110,101,32,69,78,69,84,68,79,87,78 +,32,32,32,32,32,32,32,32,49,49,54,10,35,100,101,102,105,110,101,32,69,78,69,84,82 +,69,83,69,84,32,32,32,32,32,32,32,49,49,55,10,35,100,101,102,105,110,101,32,69,78 +,69,84,85,78,82,69,65,67,72,32,32,32,32,32,49,49,56,10,35,100,101,102,105,110,101 +,32,69,78,79,66,85,70,83,32,32,32,32,32,32,32,32,32,49,49,57,10,35,100,101,102 +,105,110,101,32,69,78,79,68,65,84,65,32,32,32,32,32,32,32,32,32,49,50,48,10,35 +,100,101,102,105,110,101,32,69,78,79,76,73,78,75,32,32,32,32,32,32,32,32,32,49,50 +,49,10,35,100,101,102,105,110,101,32,69,78,79,77,83,71,32,32,32,32,32,32,32,32,32 +,32,49,50,50,10,35,100,101,102,105,110,101,32,69,78,79,80,82,79,84,79,79,80,84,32 +,32,32,32,32,49,50,51,10,35,100,101,102,105,110,101,32,69,78,79,83,82,32,32,32,32 +,32,32,32,32,32,32,32,49,50,52,10,35,100,101,102,105,110,101,32,69,78,79,83,84,82 +,32,32,32,32,32,32,32,32,32,32,49,50,53,10,35,100,101,102,105,110,101,32,69,78,79 +,84,67,79,78,78,32,32,32,32,32,32,32,32,49,50,54,10,35,100,101,102,105,110,101,32 +,69,78,79,84,82,69,67,79,86,69,82,65,66,76,69,32,49,50,55,10,35,100,101,102,105 +,110,101,32,69,78,79,84,83,79,67,75,32,32,32,32,32,32,32,32,49,50,56,10,35,100 +,101,102,105,110,101,32,69,78,79,84,83,85,80,32,32,32,32,32,32,32,32,32,49,50,57 +,10,35,100,101,102,105,110,101,32,69,79,80,78,79,84,83,85,80,80,32,32,32,32,32,32 +,49,51,48,10,35,100,101,102,105,110,101,32,69,79,84,72,69,82,32,32,32,32,32,32,32 +,32,32,32,49,51,49,10,35,100,101,102,105,110,101,32,69,79,86,69,82,70,76,79,87,32 +,32,32,32,32,32,32,49,51,50,10,35,100,101,102,105,110,101,32,69,79,87,78,69,82,68 +,69,65,68,32,32,32,32,32,32,49,51,51,10,35,100,101,102,105,110,101,32,69,80,82,79 +,84,79,32,32,32,32,32,32,32,32,32,32,49,51,52,10,35,100,101,102,105,110,101,32,69 +,80,82,79,84,79,78,79,83,85,80,80,79,82,84,32,49,51,53,10,35,100,101,102,105,110 +,101,32,69,80,82,79,84,79,84,89,80,69,32,32,32,32,32,32,49,51,54,10,35,100,101 +,102,105,110,101,32,69,84,73,77,69,32,32,32,32,32,32,32,32,32,32,32,49,51,55,10 +,35,100,101,102,105,110,101,32,69,84,73,77,69,68,79,85,84,32,32,32,32,32,32,32,49 +,51,56,10,35,100,101,102,105,110,101,32,69,84,88,84,66,83,89,32,32,32,32,32,32,32 +,32,32,49,51,57,10,35,100,101,102,105,110,101,32,69,87,79,85,76,68,66,76,79,67,75 +,32,32,32,32,32,49,52,48,10,10 }; static const char file_string_h[] = { -#include "include\string.h.include" + +32,10,116,121,112,101,100,101,102,32,105,110,116,32,101,114,114,110,111,95,116,59,10,116,121 +,112,101,100,101,102,32,117,110,115,105,103,110,101,100,32,108,111,110,103,32,108,111,110,103,32 +,115,105,122,101,95,116,59,10,116,121,112,101,100,101,102,32,117,110,115,105,103,110,101,100,32 +,108,111,110,103,32,108,111,110,103,32,114,115,105,122,101,95,116,59,10,116,121,112,101,100,101 +,102,32,117,110,115,105,103,110,101,100,32,115,104,111,114,116,32,119,99,104,97,114,95,116,59 +,10,118,111,105,100,42,32,109,101,109,99,104,114,40,118,111,105,100,32,99,111,110,115,116,42 +,32,95,66,117,102,44,32,105,110,116,32,95,86,97,108,44,32,115,105,122,101,95,116,32,95 +,77,97,120,67,111,117,110,116,41,59,10,105,110,116,32,109,101,109,99,109,112,40,118,111,105 +,100,32,99,111,110,115,116,42,32,95,66,117,102,49,44,32,118,111,105,100,32,99,111,110,115 +,116,42,32,95,66,117,102,50,44,32,115,105,122,101,95,116,32,95,83,105,122,101,41,59,10 +,118,111,105,100,42,32,109,101,109,99,112,121,40,118,111,105,100,42,32,95,68,115,116,44,32 +,118,111,105,100,32,99,111,110,115,116,42,32,95,83,114,99,44,32,115,105,122,101,95,116,32 +,95,83,105,122,101,41,59,10,118,111,105,100,42,32,109,101,109,109,111,118,101,40,118,111,105 +,100,42,32,95,68,115,116,44,32,118,111,105,100,32,99,111,110,115,116,42,32,95,83,114,99 +,44,32,115,105,122,101,95,116,32,95,83,105,122,101,41,59,10,118,111,105,100,42,32,109,101 +,109,115,101,116,40,118,111,105,100,42,32,95,68,115,116,44,32,105,110,116,32,95,86,97,108 +,44,32,115,105,122,101,95,116,32,95,83,105,122,101,41,59,10,99,104,97,114,42,32,115,116 +,114,99,104,114,40,99,104,97,114,32,99,111,110,115,116,42,32,95,83,116,114,44,32,105,110 +,116,32,95,86,97,108,41,59,10,99,104,97,114,32,42,115,116,114,99,112,121,40,95,79,117 +,116,32,99,104,97,114,32,42,114,101,115,116,114,105,99,116,32,100,101,115,116,44,32,99,111 +,110,115,116,32,99,104,97,114,32,42,114,101,115,116,114,105,99,116,32,115,114,99,32,41,59 +,10,99,104,97,114,42,32,115,116,114,114,99,104,114,40,99,104,97,114,32,99,111,110,115,116 +,42,32,95,83,116,114,44,32,105,110,116,32,95,67,104,41,59,10,99,104,97,114,42,32,115 +,116,114,115,116,114,40,99,104,97,114,32,99,111,110,115,116,42,32,95,83,116,114,44,32,99 +,104,97,114,32,99,111,110,115,116,42,32,95,83,117,98,83,116,114,41,59,10,119,99,104,97 +,114,95,116,42,32,119,99,115,99,104,114,40,119,99,104,97,114,95,116,32,99,111,110,115,116 +,42,32,95,83,116,114,44,32,119,99,104,97,114,95,116,32,95,67,104,41,59,10,119,99,104 +,97,114,95,116,42,32,119,99,115,114,99,104,114,40,119,99,104,97,114,95,116,32,99,111,110 +,115,116,42,32,95,83,116,114,44,32,119,99,104,97,114,95,116,32,95,67,104,41,59,10,119 +,99,104,97,114,95,116,42,32,119,99,115,115,116,114,40,119,99,104,97,114,95,116,32,99,111 +,110,115,116,42,32,95,83,116,114,44,32,119,99,104,97,114,95,116,32,99,111,110,115,116,42 +,32,95,83,117,98,83,116,114,41,59,10,115,116,97,116,105,99,32,105,110,108,105,110,101,32 +,101,114,114,110,111,95,116,32,109,101,109,99,112,121,95,115,40,118,111,105,100,42,32,99,111 +,110,115,116,32,95,68,101,115,116,105,110,97,116,105,111,110,44,32,114,115,105,122,101,95,116 +,32,99,111,110,115,116,32,95,68,101,115,116,105,110,97,116,105,111,110,83,105,122,101,44,32 +,118,111,105,100,32,99,111,110,115,116,42,32,99,111,110,115,116,32,95,83,111,117,114,99,101 +,44,32,114,115,105,122,101,95,116,32,99,111,110,115,116,32,95,83,111,117,114,99,101,83,105 +,122,101,41,59,10,115,116,97,116,105,99,32,105,110,108,105,110,101,32,101,114,114,110,111,95 +,116,32,109,101,109,109,111,118,101,95,115,40,118,111,105,100,42,32,99,111,110,115,116,32,95 +,68,101,115,116,105,110,97,116,105,111,110,44,32,114,115,105,122,101,95,116,32,99,111,110,115 +,116,32,95,68,101,115,116,105,110,97,116,105,111,110,83,105,122,101,44,32,118,111,105,100,32 +,99,111,110,115,116,42,32,99,111,110,115,116,32,95,83,111,117,114,99,101,44,32,114,115,105 +,122,101,95,116,32,99,111,110,115,116,32,95,83,111,117,114,99,101,83,105,122,101,41,59,10 +,105,110,116,32,95,109,101,109,105,99,109,112,40,118,111,105,100,32,99,111,110,115,116,42,32 +,95,66,117,102,49,44,32,118,111,105,100,32,99,111,110,115,116,42,32,95,66,117,102,50,44 +,32,115,105,122,101,95,116,32,95,83,105,122,101,41,59,10,118,111,105,100,42,32,109,101,109 +,99,99,112,121,40,118,111,105,100,42,32,95,68,115,116,44,32,118,111,105,100,32,99,111,110 +,115,116,42,32,95,83,114,99,44,32,105,110,116,32,95,86,97,108,44,32,115,105,122,101,95 +,116,32,95,83,105,122,101,41,59,10,105,110,116,32,109,101,109,105,99,109,112,40,118,111,105 +,100,32,99,111,110,115,116,42,32,95,66,117,102,49,44,32,118,111,105,100,32,99,111,110,115 +,116,42,32,95,66,117,102,50,44,32,115,105,122,101,95,116,32,95,83,105,122,101,41,59,10 +,101,114,114,110,111,95,116,32,119,99,115,99,97,116,95,115,40,119,99,104,97,114,95,116,42 +,32,95,68,101,115,116,105,110,97,116,105,111,110,44,32,114,115,105,122,101,95,116,32,95,83 +,105,122,101,73,110,87,111,114,100,115,44,32,119,99,104,97,114,95,116,32,99,111,110,115,116 +,42,32,95,83,111,117,114,99,101,41,59,10,101,114,114,110,111,95,116,32,119,99,115,99,112 +,121,95,115,40,119,99,104,97,114,95,116,42,32,95,68,101,115,116,105,110,97,116,105,111,110 +,44,32,114,115,105,122,101,95,116,32,95,83,105,122,101,73,110,87,111,114,100,115,44,32,119 +,99,104,97,114,95,116,32,99,111,110,115,116,42,32,95,83,111,117,114,99,101,41,59,10,101 +,114,114,110,111,95,116,32,119,99,115,110,99,97,116,95,115,40,119,99,104,97,114,95,116,42 +,32,95,68,101,115,116,105,110,97,116,105,111,110,44,32,114,115,105,122,101,95,116,32,95,83 +,105,122,101,73,110,87,111,114,100,115,44,32,119,99,104,97,114,95,116,32,99,111,110,115,116 +,42,32,95,83,111,117,114,99,101,44,32,114,115,105,122,101,95,116,32,95,77,97,120,67,111 +,117,110,116,41,59,10,101,114,114,110,111,95,116,32,119,99,115,110,99,112,121,95,115,40,119 +,99,104,97,114,95,116,42,32,95,68,101,115,116,105,110,97,116,105,111,110,44,32,114,115,105 +,122,101,95,116,32,95,83,105,122,101,73,110,87,111,114,100,115,44,32,119,99,104,97,114,95 +,116,32,99,111,110,115,116,42,32,95,83,111,117,114,99,101,44,32,114,115,105,122,101,95,116 +,32,95,77,97,120,67,111,117,110,116,41,59,10,119,99,104,97,114,95,116,42,32,119,99,115 +,116,111,107,95,115,40,119,99,104,97,114,95,116,42,32,95,83,116,114,105,110,103,44,32,119 +,99,104,97,114,95,116,32,99,111,110,115,116,42,32,95,68,101,108,105,109,105,116,101,114,44 +,32,119,99,104,97,114,95,116,42,42,32,95,67,111,110,116,101,120,116,41,59,10,119,99,104 +,97,114,95,116,42,32,95,119,99,115,100,117,112,40,119,99,104,97,114,95,116,32,99,111,110 +,115,116,42,32,95,83,116,114,105,110,103,41,59,10,119,99,104,97,114,95,116,42,32,119,99 +,115,99,97,116,40,119,99,104,97,114,95,116,42,32,95,68,101,115,116,105,110,97,116,105,111 +,110,44,32,119,99,104,97,114,95,116,32,99,111,110,115,116,42,32,95,83,111,117,114,99,101 +,41,59,32,105,110,116,32,119,99,115,99,109,112,40,119,99,104,97,114,95,116,32,99,111,110 +,115,116,42,32,95,83,116,114,105,110,103,49,44,32,119,99,104,97,114,95,116,32,99,111,110 +,115,116,42,32,95,83,116,114,105,110,103,50,41,59,10,119,99,104,97,114,95,116,42,32,119 +,99,115,99,112,121,40,119,99,104,97,114,95,116,42,32,95,68,101,115,116,105,110,97,116,105 +,111,110,44,32,119,99,104,97,114,95,116,32,99,111,110,115,116,42,32,95,83,111,117,114,99 +,101,41,59,32,115,105,122,101,95,116,32,119,99,115,99,115,112,110,40,119,99,104,97,114,95 +,116,32,99,111,110,115,116,42,32,95,83,116,114,105,110,103,44,32,119,99,104,97,114,95,116 +,32,99,111,110,115,116,42,32,95,67,111,110,116,114,111,108,41,59,10,115,105,122,101,95,116 +,32,119,99,115,108,101,110,40,119,99,104,97,114,95,116,32,99,111,110,115,116,42,32,95,83 +,116,114,105,110,103,41,59,10,115,105,122,101,95,116,32,119,99,115,110,108,101,110,40,119,99 +,104,97,114,95,116,32,99,111,110,115,116,42,32,95,83,111,117,114,99,101,44,32,115,105,122 +,101,95,116,32,95,77,97,120,67,111,117,110,116,41,59,10,115,116,97,116,105,99,32,105,110 +,108,105,110,101,32,115,105,122,101,95,116,32,119,99,115,110,108,101,110,95,115,40,119,99,104 +,97,114,95,116,32,99,111,110,115,116,42,32,95,83,111,117,114,99,101,44,32,115,105,122,101 +,95,116,32,95,77,97,120,67,111,117,110,116,41,59,10,119,99,104,97,114,95,116,42,32,119 +,99,115,110,99,97,116,40,119,99,104,97,114,95,116,42,32,95,68,101,115,116,105,110,97,116 +,105,111,110,44,32,119,99,104,97,114,95,116,32,99,111,110,115,116,42,32,95,83,111,117,114 +,99,101,44,32,115,105,122,101,95,116,32,95,67,111,117,110,116,41,59,10,105,110,116,32,119 +,99,115,110,99,109,112,40,119,99,104,97,114,95,116,32,99,111,110,115,116,42,32,95,83,116 +,114,105,110,103,49,44,32,119,99,104,97,114,95,116,32,99,111,110,115,116,42,32,95,83,116 +,114,105,110,103,50,44,32,115,105,122,101,95,116,32,95,77,97,120,67,111,117,110,116,41,59 +,10,119,99,104,97,114,95,116,42,32,119,99,115,110,99,112,121,40,119,99,104,97,114,95,116 +,42,32,95,68,101,115,116,105,110,97,116,105,111,110,44,32,119,99,104,97,114,95,116,32,99 +,111,110,115,116,42,32,95,83,111,117,114,99,101,44,32,115,105,122,101,95,116,32,95,67,111 +,117,110,116,41,59,10,119,99,104,97,114,95,116,42,32,119,99,115,112,98,114,107,40,119,99 +,104,97,114,95,116,32,99,111,110,115,116,42,32,95,83,116,114,105,110,103,44,32,119,99,104 +,97,114,95,116,32,99,111,110,115,116,42,32,95,67,111,110,116,114,111,108,41,59,10,115,105 +,122,101,95,116,32,119,99,115,115,112,110,40,119,99,104,97,114,95,116,32,99,111,110,115,116 +,42,32,95,83,116,114,105,110,103,44,32,119,99,104,97,114,95,116,32,99,111,110,115,116,42 +,32,95,67,111,110,116,114,111,108,41,59,10,119,99,104,97,114,95,116,42,32,119,99,115,116 +,111,107,40,119,99,104,97,114,95,116,42,32,95,83,116,114,105,110,103,44,32,119,99,104,97 +,114,95,116,32,99,111,110,115,116,42,32,95,68,101,108,105,109,105,116,101,114,44,32,119,99 +,104,97,114,95,116,42,42,32,95,67,111,110,116,101,120,116,41,59,10,115,105,122,101,95,116 +,32,119,99,115,120,102,114,109,40,119,99,104,97,114,95,116,42,32,95,68,101,115,116,105,110 +,97,116,105,111,110,44,32,119,99,104,97,114,95,116,32,99,111,110,115,116,42,32,95,83,111 +,117,114,99,101,44,32,115,105,122,101,95,116,32,95,77,97,120,67,111,117,110,116,41,59,10 +,105,110,116,32,119,99,115,99,111,108,108,40,119,99,104,97,114,95,116,32,99,111,110,115,116 +,42,32,95,83,116,114,105,110,103,49,44,32,119,99,104,97,114,95,116,32,99,111,110,115,116 +,42,32,95,83,116,114,105,110,103,50,41,59,10,119,99,104,97,114,95,116,42,32,119,99,115 +,100,117,112,40,119,99,104,97,114,95,116,32,99,111,110,115,116,42,32,95,83,116,114,105,110 +,103,41,59,10,105,110,116,32,119,99,115,105,99,109,112,40,119,99,104,97,114,95,116,32,99 +,111,110,115,116,42,32,95,83,116,114,105,110,103,49,44,32,119,99,104,97,114,95,116,32,99 +,111,110,115,116,42,32,95,83,116,114,105,110,103,50,41,59,10,105,110,116,32,119,99,115,110 +,105,99,109,112,40,119,99,104,97,114,95,116,32,99,111,110,115,116,42,32,95,83,116,114,105 +,110,103,49,44,32,119,99,104,97,114,95,116,32,99,111,110,115,116,42,32,95,83,116,114,105 +,110,103,50,44,32,115,105,122,101,95,116,32,95,77,97,120,67,111,117,110,116,41,59,10,119 +,99,104,97,114,95,116,42,32,119,99,115,110,115,101,116,40,119,99,104,97,114,95,116,42,32 +,95,83,116,114,105,110,103,44,32,119,99,104,97,114,95,116,32,95,86,97,108,117,101,44,32 +,115,105,122,101,95,116,32,95,77,97,120,67,111,117,110,116,41,59,10,119,99,104,97,114,95 +,116,42,32,119,99,115,114,101,118,40,119,99,104,97,114,95,116,42,32,95,83,116,114,105,110 +,103,41,59,10,119,99,104,97,114,95,116,42,32,119,99,115,115,101,116,40,119,99,104,97,114 +,95,116,42,32,95,83,116,114,105,110,103,44,32,119,99,104,97,114,95,116,32,95,86,97,108 +,117,101,41,59,10,119,99,104,97,114,95,116,42,32,119,99,115,108,119,114,40,119,99,104,97 +,114,95,116,42,32,95,83,116,114,105,110,103,41,59,32,119,99,104,97,114,95,116,42,32,119 +,99,115,117,112,114,40,119,99,104,97,114,95,116,42,32,95,83,116,114,105,110,103,41,59,10 +,105,110,116,32,119,99,115,105,99,111,108,108,40,119,99,104,97,114,95,116,32,99,111,110,115 +,116,42,32,95,83,116,114,105,110,103,49,44,32,119,99,104,97,114,95,116,32,99,111,110,115 +,116,42,32,95,83,116,114,105,110,103,50,41,59,10,99,104,97,114,42,32,115,116,114,116,111 +,107,95,115,40,99,104,97,114,42,32,95,83,116,114,105,110,103,44,32,99,104,97,114,32,99 +,111,110,115,116,42,32,95,68,101,108,105,109,105,116,101,114,44,32,99,104,97,114,42,42,32 +,95,67,111,110,116,101,120,116,41,59,10,118,111,105,100,42,32,95,109,101,109,99,99,112,121 +,40,118,111,105,100,42,32,95,68,115,116,44,32,118,111,105,100,32,99,111,110,115,116,42,32 +,95,83,114,99,44,32,105,110,116,32,95,86,97,108,44,32,115,105,122,101,95,116,32,95,77 +,97,120,67,111,117,110,116,41,59,10,99,104,97,114,42,32,115,116,114,99,97,116,40,99,104 +,97,114,42,32,95,68,101,115,116,105,110,97,116,105,111,110,44,32,99,104,97,114,32,99,111 +,110,115,116,42,32,95,83,111,117,114,99,101,41,59,10,105,110,116,32,115,116,114,99,109,112 +,40,99,104,97,114,32,99,111,110,115,116,42,32,95,83,116,114,49,44,32,99,104,97,114,32 +,99,111,110,115,116,42,32,95,83,116,114,50,41,59,10,105,110,116,32,115,116,114,99,111,108 +,108,40,99,104,97,114,32,99,111,110,115,116,42,32,95,83,116,114,105,110,103,49,44,32,99 +,104,97,114,32,99,111,110,115,116,42,32,95,83,116,114,105,110,103,50,41,59,10,99,104,97 +,114,42,32,115,116,114,101,114,114,111,114,40,105,110,116,32,95,69,114,114,111,114,77,101,115 +,115,97,103,101,41,59,10,115,105,122,101,95,116,32,115,116,114,108,101,110,40,99,104,97,114 +,32,99,111,110,115,116,42,32,95,83,116,114,41,59,10,99,104,97,114,42,32,115,116,114,110 +,99,97,116,40,99,104,97,114,42,32,95,68,101,115,116,105,110,97,116,105,111,110,44,32,99 +,104,97,114,32,99,111,110,115,116,42,32,95,83,111,117,114,99,101,44,32,115,105,122,101,95 +,116,32,95,67,111,117,110,116,41,59,10,105,110,116,32,115,116,114,110,99,109,112,40,99,104 +,97,114,32,99,111,110,115,116,42,32,95,83,116,114,49,44,32,99,104,97,114,32,99,111,110 +,115,116,42,32,95,83,116,114,50,44,32,115,105,122,101,95,116,32,95,77,97,120,67,111,117 +,110,116,41,59,10,99,104,97,114,42,32,115,116,114,110,99,112,121,40,99,104,97,114,42,32 +,95,68,101,115,116,105,110,97,116,105,111,110,44,32,99,104,97,114,32,99,111,110,115,116,42 +,32,95,83,111,117,114,99,101,44,32,115,105,122,101,95,116,32,95,67,111,117,110,116,41,59 +,10,115,105,122,101,95,116,32,115,116,114,110,108,101,110,40,99,104,97,114,32,99,111,110,115 +,116,42,32,95,83,116,114,105,110,103,44,32,115,105,122,101,95,116,32,95,77,97,120,67,111 +,117,110,116,41,59,10,115,116,97,116,105,99,32,105,110,108,105,110,101,32,115,105,122,101,95 +,116,32,115,116,114,110,108,101,110,95,115,40,99,104,97,114,32,99,111,110,115,116,42,32,95 +,83,116,114,105,110,103,44,32,115,105,122,101,95,116,32,95,77,97,120,67,111,117,110,116,41 +,59,10,99,104,97,114,42,32,115,116,114,112,98,114,107,40,99,104,97,114,32,99,111,110,115 +,116,42,32,95,83,116,114,44,32,99,104,97,114,32,99,111,110,115,116,42,32,95,67,111,110 +,116,114,111,108,41,59,10,115,105,122,101,95,116,32,115,116,114,115,112,110,40,99,104,97,114 +,32,99,111,110,115,116,42,32,95,83,116,114,44,32,99,104,97,114,32,99,111,110,115,116,42 +,32,95,67,111,110,116,114,111,108,41,59,10,99,104,97,114,42,32,115,116,114,116,111,107,40 +,99,104,97,114,42,32,95,83,116,114,105,110,103,44,32,99,104,97,114,32,99,111,110,115,116 +,42,32,95,68,101,108,105,109,105,116,101,114,41,59,10,10,35,105,102,32,100,101,102,105,110 +,101,100,40,95,95,83,84,68,67,95,79,87,78,69,82,83,72,73,80,95,95,41,32,10,99 +,104,97,114,42,32,95,79,119,110,101,114,32,95,79,112,116,32,115,116,114,100,117,112,40,99 +,104,97,114,32,99,111,110,115,116,42,32,95,83,116,114,105,110,103,41,59,10,35,101,108,115 +,101,10,99,104,97,114,42,32,115,116,114,100,117,112,40,99,104,97,114,32,99,111,110,115,116 +,42,32,95,83,116,114,105,110,103,41,59,10,35,101,110,100,105,102,10,10,105,110,116,32,115 +,116,114,99,109,112,105,40,99,104,97,114,32,99,111,110,115,116,42,32,95,83,116,114,105,110 +,103,49,44,32,99,104,97,114,32,99,111,110,115,116,42,32,95,83,116,114,105,110,103,50,41 +,59,10,105,110,116,32,115,116,114,105,99,109,112,40,99,104,97,114,32,99,111,110,115,116,42 +,32,95,83,116,114,105,110,103,49,44,32,99,104,97,114,32,99,111,110,115,116,42,32,95,83 +,116,114,105,110,103,50,41,59,10,99,104,97,114,42,32,115,116,114,108,119,114,40,99,104,97 +,114,42,32,95,83,116,114,105,110,103,41,59,10,105,110,116,32,115,116,114,110,105,99,109,112 +,40,99,104,97,114,32,99,111,110,115,116,42,32,95,83,116,114,105,110,103,49,44,32,99,104 +,97,114,32,99,111,110,115,116,42,32,95,83,116,114,105,110,103,50,44,32,115,105,122,101,95 +,116,32,95,77,97,120,67,111,117,110,116,41,59,10,99,104,97,114,42,32,115,116,114,110,115 +,101,116,40,99,104,97,114,42,32,95,83,116,114,105,110,103,44,32,105,110,116,32,95,86,97 +,108,117,101,44,32,115,105,122,101,95,116,32,95,77,97,120,67,111,117,110,116,41,59,10,99 +,104,97,114,42,32,115,116,114,114,101,118,40,99,104,97,114,42,32,95,83,116,114,105,110,103 +,41,59,10,99,104,97,114,42,32,115,116,114,115,101,116,40,99,104,97,114,42,32,95,83,116 +,114,105,110,103,44,32,105,110,116,32,95,86,97,108,117,101,41,59,32,99,104,97,114,42,32 +,115,116,114,117,112,114,40,99,104,97,114,42,32,95,83,116,114,105,110,103,41,59 }; static const char file_math_h[] = { -#include "include\math.h.include" + +47,42,10,32,42,32,32,84,104,105,115,32,102,105,108,101,32,105,115,32,112,97,114,116,32 +,111,102,32,99,97,107,101,32,99,111,109,112,105,108,101,114,10,32,42,32,32,104,116,116,112 +,115,58,47,47,103,105,116,104,117,98,46,99,111,109,47,116,104,114,97,100,97,109,115,47,99 +,97,107,101,10,42,47,10,10,35,112,114,97,103,109,97,32,111,110,99,101,10,10,100,111,117 +,98,108,101,32,97,99,111,115,40,100,111,117,98,108,101,32,95,95,120,41,59,10,100,111,117 +,98,108,101,32,97,115,105,110,40,100,111,117,98,108,101,32,95,95,120,41,59,10,100,111,117 +,98,108,101,32,97,116,97,110,40,100,111,117,98,108,101,32,95,95,120,41,59,10,100,111,117 +,98,108,101,32,97,116,97,110,50,40,100,111,117,98,108,101,32,95,95,121,44,32,100,111,117 +,98,108,101,32,95,95,120,41,59,10,100,111,117,98,108,101,32,99,111,115,40,100,111,117,98 +,108,101,32,95,95,120,41,59,10,100,111,117,98,108,101,32,115,105,110,40,100,111,117,98,108 +,101,32,95,95,120,41,59,10,100,111,117,98,108,101,32,116,97,110,40,100,111,117,98,108,101 +,32,95,95,120,41,59,10,100,111,117,98,108,101,32,99,111,115,104,40,100,111,117,98,108,101 +,32,95,95,120,41,59,10,100,111,117,98,108,101,32,115,105,110,104,40,100,111,117,98,108,101 +,32,95,95,120,41,59,10,100,111,117,98,108,101,32,116,97,110,104,40,100,111,117,98,108,101 +,32,95,95,120,41,59,10,100,111,117,98,108,101,32,97,99,111,115,104,40,100,111,117,98,108 +,101,32,95,95,120,41,59,10,100,111,117,98,108,101,32,97,115,105,110,104,40,100,111,117,98 +,108,101,32,95,95,120,41,59,10,100,111,117,98,108,101,32,97,116,97,110,104,40,100,111,117 +,98,108,101,32,95,95,120,41,59,10,100,111,117,98,108,101,32,101,120,112,40,100,111,117,98 +,108,101,32,95,95,120,41,59,10,100,111,117,98,108,101,32,102,114,101,120,112,40,100,111,117 +,98,108,101,32,95,95,120,44,32,105,110,116,42,32,95,95,101,120,112,111,110,101,110,116,41 +,59,10,100,111,117,98,108,101,32,108,100,101,120,112,40,100,111,117,98,108,101,32,95,95,120 +,44,32,105,110,116,32,95,95,101,120,112,111,110,101,110,116,41,59,10,100,111,117,98,108,101 +,32,108,111,103,40,100,111,117,98,108,101,32,95,95,120,41,59,10,100,111,117,98,108,101,32 +,108,111,103,49,48,40,100,111,117,98,108,101,32,95,95,120,41,59,10,100,111,117,98,108,101 +,32,109,111,100,102,40,100,111,117,98,108,101,32,95,95,120,44,32,100,111,117,98,108,101,42 +,32,95,95,105,112,116,114,41,59,10,100,111,117,98,108,101,32,101,120,112,109,49,40,100,111 +,117,98,108,101,32,95,95,120,41,59,10,100,111,117,98,108,101,32,108,111,103,49,112,40,100 +,111,117,98,108,101,32,95,95,120,41,59,10,100,111,117,98,108,101,32,108,111,103,98,40,100 +,111,117,98,108,101,32,95,95,120,41,59,10,100,111,117,98,108,101,32,101,120,112,50,40,100 +,111,117,98,108,101,32,95,95,120,41,59,10,100,111,117,98,108,101,32,108,111,103,50,40,100 +,111,117,98,108,101,32,95,95,120,41,59,10,100,111,117,98,108,101,32,112,111,119,40,100,111 +,117,98,108,101,32,95,95,120,44,32,100,111,117,98,108,101,32,95,95,121,41,59,10,100,111 +,117,98,108,101,32,115,113,114,116,40,100,111,117,98,108,101,32,95,95,120,41,59,10,100,111 +,117,98,108,101,32,104,121,112,111,116,40,100,111,117,98,108,101,32,95,95,120,44,32,100,111 +,117,98,108,101,32,95,95,121,41,59,10,100,111,117,98,108,101,32,99,98,114,116,40,100,111 +,117,98,108,101,32,95,95,120,41,59,10,100,111,117,98,108,101,32,99,101,105,108,40,100,111 +,117,98,108,101,32,95,95,120,41,59,10,100,111,117,98,108,101,32,102,97,98,115,40,100,111 +,117,98,108,101,32,95,95,120,41,59,10,100,111,117,98,108,101,32,102,108,111,111,114,40,100 +,111,117,98,108,101,32,95,95,120,41,59,10,100,111,117,98,108,101,32,102,109,111,100,40,100 +,111,117,98,108,101,32,95,95,120,44,32,100,111,117,98,108,101,32,95,95,121,41,59,10,105 +,110,116,32,105,115,105,110,102,40,100,111,117,98,108,101,32,95,95,118,97,108,117,101,41,59 +,10,105,110,116,32,102,105,110,105,116,101,40,100,111,117,98,108,101,32,95,95,118,97,108,117 +,101,41,59,10,100,111,117,98,108,101,32,100,114,101,109,40,100,111,117,98,108,101,32,95,95 +,120,44,32,100,111,117,98,108,101,32,95,95,121,41,59,10,100,111,117,98,108,101,32,115,105 +,103,110,105,102,105,99,97,110,100,40,100,111,117,98,108,101,32,95,95,120,41,59,10,100,111 +,117,98,108,101,32,99,111,112,121,115,105,103,110,40,100,111,117,98,108,101,32,95,95,120,44 +,32,100,111,117,98,108,101,32,95,95,121,41,59,10,100,111,117,98,108,101,32,110,97,110,40 +,99,111,110,115,116,32,99,104,97,114,42,32,95,95,116,97,103,98,41,59,10,105,110,116,32 +,105,115,110,97,110,40,100,111,117,98,108,101,32,95,95,118,97,108,117,101,41,59,10,100,111 +,117,98,108,101,32,106,48,40,100,111,117,98,108,101,41,59,10,100,111,117,98,108,101,32,106 +,49,40,100,111,117,98,108,101,41,59,10,100,111,117,98,108,101,32,106,110,40,105,110,116,44 +,32,100,111,117,98,108,101,41,59,10,100,111,117,98,108,101,32,121,48,40,100,111,117,98,108 +,101,41,59,10,100,111,117,98,108,101,32,121,49,40,100,111,117,98,108,101,41,59,10,100,111 +,117,98,108,101,32,121,110,40,105,110,116,44,32,100,111,117,98,108,101,41,59,10,100,111,117 +,98,108,101,32,101,114,102,40,100,111,117,98,108,101,41,59,10,100,111,117,98,108,101,32,101 +,114,102,99,40,100,111,117,98,108,101,41,59,10,100,111,117,98,108,101,32,108,103,97,109,109 +,97,40,100,111,117,98,108,101,41,59,10,100,111,117,98,108,101,32,116,103,97,109,109,97,40 +,100,111,117,98,108,101,41,59,10,100,111,117,98,108,101,32,103,97,109,109,97,40,100,111,117 +,98,108,101,41,59,10,100,111,117,98,108,101,32,108,103,97,109,109,97,95,114,40,100,111,117 +,98,108,101,44,32,105,110,116,42,32,95,95,115,105,103,110,103,97,109,112,41,59,10,100,111 +,117,98,108,101,32,114,105,110,116,40,100,111,117,98,108,101,32,95,95,120,41,59,10,100,111 +,117,98,108,101,32,110,101,120,116,97,102,116,101,114,40,100,111,117,98,108,101,32,95,95,120 +,44,32,100,111,117,98,108,101,32,95,95,121,41,59,10,100,111,117,98,108,101,32,110,101,120 +,116,116,111,119,97,114,100,40,100,111,117,98,108,101,32,95,95,120,44,32,108,111,110,103,32 +,100,111,117,98,108,101,32,95,95,121,41,59,10,100,111,117,98,108,101,32,114,101,109,97,105 +,110,100,101,114,40,100,111,117,98,108,101,32,95,95,120,44,32,100,111,117,98,108,101,32,95 +,95,121,41,59,10,100,111,117,98,108,101,32,115,99,97,108,98,110,40,100,111,117,98,108,101 +,32,95,95,120,44,32,105,110,116,32,95,95,110,41,59,10,105,110,116,32,105,108,111,103,98 +,40,100,111,117,98,108,101,32,95,95,120,41,59,10,100,111,117,98,108,101,32,115,99,97,108 +,98,108,110,40,100,111,117,98,108,101,32,95,95,120,44,32,108,111,110,103,32,105,110,116,32 +,95,95,110,41,59,10,100,111,117,98,108,101,32,110,101,97,114,98,121,105,110,116,40,100,111 +,117,98,108,101,32,95,95,120,41,59,10,100,111,117,98,108,101,32,114,111,117,110,100,40,100 +,111,117,98,108,101,32,95,95,120,41,59,10,100,111,117,98,108,101,32,116,114,117,110,99,40 +,100,111,117,98,108,101,32,95,95,120,41,59,10,100,111,117,98,108,101,32,114,101,109,113,117 +,111,40,100,111,117,98,108,101,32,95,95,120,44,32,100,111,117,98,108,101,32,95,95,121,44 +,32,105,110,116,42,32,95,95,113,117,111,41,59,10,108,111,110,103,32,105,110,116,32,108,114 +,105,110,116,40,100,111,117,98,108,101,32,95,95,120,41,59,10,108,111,110,103,32,108,111,110 +,103,32,105,110,116,32,108,108,114,111,117,110,100,40,100,111,117,98,108,101,32,95,95,120,41 +,59,10,100,111,117,98,108,101,32,102,100,105,109,40,100,111,117,98,108,101,32,95,95,120,44 +,32,100,111,117,98,108,101,32,95,95,121,41,59,10,100,111,117,98,108,101,32,102,109,97,120 +,40,100,111,117,98,108,101,32,95,95,120,44,32,100,111,117,98,108,101,32,95,95,121,41,59 +,10,100,111,117,98,108,101,32,102,109,105,110,40,100,111,117,98,108,101,32,95,95,120,44,32 +,100,111,117,98,108,101,32,95,95,121,41,59,10,100,111,117,98,108,101,32,102,109,97,40,100 +,111,117,98,108,101,32,95,95,120,44,32,100,111,117,98,108,101,32,95,95,121,44,32,100,111 +,117,98,108,101,32,95,95,122,41,59,10,100,111,117,98,108,101,32,115,99,97,108,98,40,100 +,111,117,98,108,101,32,95,95,120,44,32,100,111,117,98,108,101,32,95,95,110,41,59,10,102 +,108,111,97,116,32,97,99,111,115,102,40,102,108,111,97,116,32,95,95,120,41,59,10,102,108 +,111,97,116,32,97,115,105,110,102,40,102,108,111,97,116,32,95,95,120,41,59,10,102,108,111 +,97,116,32,97,116,97,110,102,40,102,108,111,97,116,32,95,95,120,41,59,10,102,108,111,97 +,116,32,97,116,97,110,50,102,40,102,108,111,97,116,32,95,95,121,44,32,102,108,111,97,116 +,32,95,95,120,41,59,10,102,108,111,97,116,32,99,111,115,102,40,102,108,111,97,116,32,95 +,95,120,41,59,10,102,108,111,97,116,32,115,105,110,102,40,102,108,111,97,116,32,95,95,120 +,41,59,10,102,108,111,97,116,32,116,97,110,102,40,102,108,111,97,116,32,95,95,120,41,59 +,10,102,108,111,97,116,32,99,111,115,104,102,40,102,108,111,97,116,32,95,95,120,41,59,10 +,102,108,111,97,116,32,115,105,110,104,102,40,102,108,111,97,116,32,95,95,120,41,59,10,102 +,108,111,97,116,32,116,97,110,104,102,40,102,108,111,97,116,32,95,95,120,41,59,10,102,108 +,111,97,116,32,97,99,111,115,104,102,40,102,108,111,97,116,32,95,95,120,41,59,10,102,108 +,111,97,116,32,97,115,105,110,104,102,40,102,108,111,97,116,32,95,95,120,41,59,10,102,108 +,111,97,116,32,97,116,97,110,104,102,40,102,108,111,97,116,32,95,95,120,41,59,10,102,108 +,111,97,116,32,101,120,112,102,40,102,108,111,97,116,32,95,95,120,41,59,10,102,108,111,97 +,116,32,102,114,101,120,112,102,40,102,108,111,97,116,32,95,95,120,44,32,105,110,116,42,32 +,95,95,101,120,112,111,110,101,110,116,41,59,10,102,108,111,97,116,32,108,100,101,120,112,102 +,40,102,108,111,97,116,32,95,95,120,44,32,105,110,116,32,95,95,101,120,112,111,110,101,110 +,116,41,59,10,102,108,111,97,116,32,108,111,103,102,40,102,108,111,97,116,32,95,95,120,41 +,59,10,102,108,111,97,116,32,108,111,103,49,48,102,40,102,108,111,97,116,32,95,95,120,41 +,59,32,102,108,111,97,116,32,95,95,108,111,103,49,48,102,40,102,108,111,97,116,32,95,95 +,120,41,59,10,102,108,111,97,116,32,109,111,100,102,102,40,102,108,111,97,116,32,95,95,120 +,44,32,102,108,111,97,116,42,32,95,95,105,112,116,114,41,59,10,102,108,111,97,116,32,101 +,120,112,109,49,102,40,102,108,111,97,116,32,95,95,120,41,59,10,102,108,111,97,116,32,108 +,111,103,49,112,102,40,102,108,111,97,116,32,95,95,120,41,59,10,102,108,111,97,116,32,108 +,111,103,98,102,40,102,108,111,97,116,32,95,95,120,41,59,10,102,108,111,97,116,32,101,120 +,112,50,102,40,102,108,111,97,116,32,95,95,120,41,59,10,102,108,111,97,116,32,108,111,103 +,50,102,40,102,108,111,97,116,32,95,95,120,41,59,10,102,108,111,97,116,32,112,111,119,102 +,40,102,108,111,97,116,32,95,95,120,44,32,102,108,111,97,116,32,95,95,121,41,59,10,102 +,108,111,97,116,32,115,113,114,116,102,40,102,108,111,97,116,32,95,95,120,41,59,10,102,108 +,111,97,116,32,104,121,112,111,116,102,40,102,108,111,97,116,32,95,95,120,44,32,102,108,111 +,97,116,32,95,95,121,41,59,10,102,108,111,97,116,32,99,98,114,116,102,40,102,108,111,97 +,116,32,95,95,120,41,59,10,102,108,111,97,116,32,99,101,105,108,102,40,102,108,111,97,116 +,32,95,95,120,41,59,10,102,108,111,97,116,32,102,97,98,115,102,40,102,108,111,97,116,32 +,95,95,120,41,59,10,102,108,111,97,116,32,102,108,111,111,114,102,40,102,108,111,97,116,32 +,95,95,120,41,59,10,102,108,111,97,116,32,102,109,111,100,102,40,102,108,111,97,116,32,95 +,95,120,44,32,102,108,111,97,116,32,95,95,121,41,59,10,105,110,116,32,105,115,105,110,102 +,102,40,102,108,111,97,116,32,95,95,118,97,108,117,101,41,59,10,105,110,116,32,102,105,110 +,105,116,101,102,40,102,108,111,97,116,32,95,95,118,97,108,117,101,41,59,10,102,108,111,97 +,116,32,100,114,101,109,102,40,102,108,111,97,116,32,95,95,120,44,32,102,108,111,97,116,32 +,95,95,121,41,59,10,102,108,111,97,116,32,115,105,103,110,105,102,105,99,97,110,100,102,40 +,102,108,111,97,116,32,95,95,120,41,59,10,102,108,111,97,116,32,99,111,112,121,115,105,103 +,110,102,40,102,108,111,97,116,32,95,95,120,44,32,102,108,111,97,116,32,95,95,121,41,59 +,10,102,108,111,97,116,32,110,97,110,102,40,99,111,110,115,116,32,99,104,97,114,42,32,95 +,95,116,97,103,98,41,59,10,105,110,116,32,105,115,110,97,110,102,40,102,108,111,97,116,32 +,95,95,118,97,108,117,101,41,59,10,102,108,111,97,116,32,106,48,102,40,102,108,111,97,116 +,41,59,10,102,108,111,97,116,32,106,49,102,40,102,108,111,97,116,41,59,10,102,108,111,97 +,116,32,106,110,102,40,105,110,116,44,32,102,108,111,97,116,41,59,10,102,108,111,97,116,32 +,121,48,102,40,102,108,111,97,116,41,59,10,102,108,111,97,116,32,121,49,102,40,102,108,111 +,97,116,41,59,10,102,108,111,97,116,32,121,110,102,40,105,110,116,44,32,102,108,111,97,116 +,41,59,10,102,108,111,97,116,32,101,114,102,102,40,102,108,111,97,116,41,59,10,102,108,111 +,97,116,32,101,114,102,99,102,40,102,108,111,97,116,41,59,10,102,108,111,97,116,32,108,103 +,97,109,109,97,102,40,102,108,111,97,116,41,59,10,102,108,111,97,116,32,116,103,97,109,109 +,97,102,40,102,108,111,97,116,41,59,10,102,108,111,97,116,32,103,97,109,109,97,102,40,102 +,108,111,97,116,41,59,10,102,108,111,97,116,32,108,103,97,109,109,97,102,95,114,40,102,108 +,111,97,116,44,32,105,110,116,42,32,95,95,115,105,103,110,103,97,109,112,41,59,10,102,108 +,111,97,116,32,114,105,110,116,102,40,102,108,111,97,116,32,95,95,120,41,59,10,102,108,111 +,97,116,32,110,101,120,116,97,102,116,101,114,102,40,102,108,111,97,116,32,95,95,120,44,32 +,102,108,111,97,116,32,95,95,121,41,59,10,102,108,111,97,116,32,110,101,120,116,116,111,119 +,97,114,100,102,40,102,108,111,97,116,32,95,95,120,44,32,108,111,110,103,32,100,111,117,98 +,108,101,32,95,95,121,41,59,10,102,108,111,97,116,32,114,101,109,97,105,110,100,101,114,102 +,40,102,108,111,97,116,32,95,95,120,44,32,102,108,111,97,116,32,95,95,121,41,59,10,102 +,108,111,97,116,32,115,99,97,108,98,110,102,40,102,108,111,97,116,32,95,95,120,44,32,105 +,110,116,32,95,95,110,41,59,10,105,110,116,32,105,108,111,103,98,102,40,102,108,111,97,116 +,32,95,95,120,41,59,10,102,108,111,97,116,32,115,99,97,108,98,108,110,102,40,102,108,111 +,97,116,32,95,95,120,44,32,108,111,110,103,32,105,110,116,32,95,95,110,41,59,10,102,108 +,111,97,116,32,110,101,97,114,98,121,105,110,116,102,40,102,108,111,97,116,32,95,95,120,41 +,59,10,102,108,111,97,116,32,114,111,117,110,100,102,40,102,108,111,97,116,32,95,95,120,41 +,59,10,102,108,111,97,116,32,116,114,117,110,99,102,40,102,108,111,97,116,32,95,95,120,41 +,59,10,102,108,111,97,116,32,114,101,109,113,117,111,102,40,102,108,111,97,116,32,95,95,120 +,44,32,102,108,111,97,116,32,95,95,121,44,32,105,110,116,42,32,95,95,113,117,111,41,59 +,10,108,111,110,103,32,105,110,116,32,108,114,105,110,116,102,40,102,108,111,97,116,32,95,95 +,120,41,59,10,108,111,110,103,32,108,111,110,103,32,105,110,116,32,108,108,114,111,117,110,100 +,102,40,102,108,111,97,116,32,95,95,120,41,59,10,102,108,111,97,116,32,102,100,105,109,102 +,40,102,108,111,97,116,32,95,95,120,44,32,102,108,111,97,116,32,95,95,121,41,59,10,102 +,108,111,97,116,32,102,109,97,120,102,40,102,108,111,97,116,32,95,95,120,44,32,102,108,111 +,97,116,32,95,95,121,41,59,10,102,108,111,97,116,32,102,109,105,110,102,40,102,108,111,97 +,116,32,95,95,120,44,32,102,108,111,97,116,32,95,95,121,41,59,10,102,108,111,97,116,32 +,102,109,97,102,40,102,108,111,97,116,32,95,95,120,44,32,102,108,111,97,116,32,95,95,121 +,44,32,102,108,111,97,116,32,95,95,122,41,59,10,102,108,111,97,116,32,115,99,97,108,98 +,102,40,102,108,111,97,116,32,95,95,120,44,32,102,108,111,97,116,32,95,95,110,41,59,10 +,108,111,110,103,32,100,111,117,98,108,101,32,97,99,111,115,108,40,108,111,110,103,32,100,111 +,117,98,108,101,32,95,95,120,41,59,10,108,111,110,103,32,100,111,117,98,108,101,32,97,115 +,105,110,108,40,108,111,110,103,32,100,111,117,98,108,101,32,95,95,120,41,59,10,108,111,110 +,103,32,100,111,117,98,108,101,32,97,116,97,110,108,40,108,111,110,103,32,100,111,117,98,108 +,101,32,95,95,120,41,59,10,108,111,110,103,32,100,111,117,98,108,101,32,97,116,97,110,50 +,108,40,108,111,110,103,32,100,111,117,98,108,101,32,95,95,121,44,32,108,111,110,103,32,100 +,111,117,98,108,101,32,95,95,120,41,59,10,108,111,110,103,32,100,111,117,98,108,101,32,99 +,111,115,108,40,108,111,110,103,32,100,111,117,98,108,101,32,95,95,120,41,59,10,108,111,110 +,103,32,100,111,117,98,108,101,32,115,105,110,108,40,108,111,110,103,32,100,111,117,98,108,101 +,32,95,95,120,41,59,10,108,111,110,103,32,100,111,117,98,108,101,32,116,97,110,108,40,108 +,111,110,103,32,100,111,117,98,108,101,32,95,95,120,41,59,10,108,111,110,103,32,100,111,117 +,98,108,101,32,99,111,115,104,108,40,108,111,110,103,32,100,111,117,98,108,101,32,95,95,120 +,41,59,10,108,111,110,103,32,100,111,117,98,108,101,32,115,105,110,104,108,40,108,111,110,103 +,32,100,111,117,98,108,101,32,95,95,120,41,59,10,108,111,110,103,32,100,111,117,98,108,101 +,32,116,97,110,104,108,40,108,111,110,103,32,100,111,117,98,108,101,32,95,95,120,41,59,10 +,108,111,110,103,32,100,111,117,98,108,101,32,97,99,111,115,104,108,40,108,111,110,103,32,100 +,111,117,98,108,101,32,95,95,120,41,59,10,108,111,110,103,32,100,111,117,98,108,101,32,97 +,115,105,110,104,108,40,108,111,110,103,32,100,111,117,98,108,101,32,95,95,120,41,59,10,108 +,111,110,103,32,100,111,117,98,108,101,32,97,116,97,110,104,108,40,108,111,110,103,32,100,111 +,117,98,108,101,32,95,95,120,41,59,10,108,111,110,103,32,100,111,117,98,108,101,32,101,120 +,112,108,40,108,111,110,103,32,100,111,117,98,108,101,32,95,95,120,41,59,10,108,111,110,103 +,32,100,111,117,98,108,101,32,102,114,101,120,112,108,40,108,111,110,103,32,100,111,117,98,108 +,101,32,95,95,120,44,32,105,110,116,42,32,95,95,101,120,112,111,110,101,110,116,41,59,10 +,108,111,110,103,32,100,111,117,98,108,101,32,108,100,101,120,112,108,40,108,111,110,103,32,100 +,111,117,98,108,101,32,95,95,120,44,32,105,110,116,32,95,95,101,120,112,111,110,101,110,116 +,41,59,10,108,111,110,103,32,100,111,117,98,108,101,32,108,111,103,108,40,108,111,110,103,32 +,100,111,117,98,108,101,32,95,95,120,41,59,10,108,111,110,103,32,100,111,117,98,108,101,32 +,108,111,103,49,48,108,40,108,111,110,103,32,100,111,117,98,108,101,32,95,95,120,41,59,10 +,108,111,110,103,32,100,111,117,98,108,101,32,109,111,100,102,108,40,108,111,110,103,32,100,111 +,117,98,108,101,32,95,95,120,44,32,108,111,110,103,32,100,111,117,98,108,101,42,32,95,95 +,105,112,116,114,41,59,10,108,111,110,103,32,100,111,117,98,108,101,32,101,120,112,109,49,108 +,40,108,111,110,103,32,100,111,117,98,108,101,32,95,95,120,41,59,10,108,111,110,103,32,100 +,111,117,98,108,101,32,108,111,103,49,112,108,40,108,111,110,103,32,100,111,117,98,108,101,32 +,95,95,120,41,59,10,108,111,110,103,32,100,111,117,98,108,101,32,108,111,103,98,108,40,108 +,111,110,103,32,100,111,117,98,108,101,32,95,95,120,41,59,10,108,111,110,103,32,100,111,117 +,98,108,101,32,101,120,112,50,108,40,108,111,110,103,32,100,111,117,98,108,101,32,95,95,120 +,41,59,10,108,111,110,103,32,100,111,117,98,108,101,32,108,111,103,50,108,40,108,111,110,103 +,32,100,111,117,98,108,101,32,95,95,120,41,59,10,108,111,110,103,32,100,111,117,98,108,101 +,32,112,111,119,108,40,108,111,110,103,32,100,111,117,98,108,101,32,95,95,120,44,32,108,111 +,110,103,32,100,111,117,98,108,101,32,95,95,121,41,59,10,108,111,110,103,32,100,111,117,98 +,108,101,32,115,113,114,116,108,40,108,111,110,103,32,100,111,117,98,108,101,32,95,95,120,41 +,59,10,108,111,110,103,32,100,111,117,98,108,101,32,104,121,112,111,116,108,40,108,111,110,103 +,32,100,111,117,98,108,101,32,95,95,120,44,32,108,111,110,103,32,100,111,117,98,108,101,32 +,95,95,121,41,59,10,108,111,110,103,32,100,111,117,98,108,101,32,99,98,114,116,108,40,108 +,111,110,103,32,100,111,117,98,108,101,32,95,95,120,41,59,10,108,111,110,103,32,100,111,117 +,98,108,101,32,99,101,105,108,108,40,108,111,110,103,32,100,111,117,98,108,101,32,95,95,120 +,41,59,10,108,111,110,103,32,100,111,117,98,108,101,32,102,97,98,115,108,40,108,111,110,103 +,32,100,111,117,98,108,101,32,95,95,120,41,59,10,108,111,110,103,32,100,111,117,98,108,101 +,32,102,108,111,111,114,108,40,108,111,110,103,32,100,111,117,98,108,101,32,95,95,120,41,59 +,10,108,111,110,103,32,100,111,117,98,108,101,32,102,109,111,100,108,40,108,111,110,103,32,100 +,111,117,98,108,101,32,95,95,120,44,32,108,111,110,103,32,100,111,117,98,108,101,32,95,95 +,121,41,59,10,105,110,116,32,105,115,105,110,102,108,40,108,111,110,103,32,100,111,117,98,108 +,101,32,95,95,118,97,108,117,101,41,59,10,105,110,116,32,102,105,110,105,116,101,108,40,108 +,111,110,103,32,100,111,117,98,108,101,32,95,95,118,97,108,117,101,41,59,10,108,111,110,103 +,32,100,111,117,98,108,101,32,100,114,101,109,108,40,108,111,110,103,32,100,111,117,98,108,101 +,32,95,95,120,44,32,108,111,110,103,32,100,111,117,98,108,101,32,95,95,121,41,59,10,108 +,111,110,103,32,100,111,117,98,108,101,32,115,105,103,110,105,102,105,99,97,110,100,108,40,108 +,111,110,103,32,100,111,117,98,108,101,32,95,95,120,41,59,10,108,111,110,103,32,100,111,117 +,98,108,101,32,99,111,112,121,115,105,103,110,108,40,108,111,110,103,32,100,111,117,98,108,101 +,32,95,95,120,44,32,108,111,110,103,32,100,111,117,98,108,101,32,95,95,121,41,59,10,108 +,111,110,103,32,100,111,117,98,108,101,32,110,97,110,108,40,99,111,110,115,116,32,99,104,97 +,114,42,32,95,95,116,97,103,98,41,59,10,105,110,116,32,105,115,110,97,110,108,40,108,111 +,110,103,32,100,111,117,98,108,101,32,95,95,118,97,108,117,101,41,59,10,108,111,110,103,32 +,100,111,117,98,108,101,32,106,48,108,40,108,111,110,103,32,100,111,117,98,108,101,41,59,10 +,108,111,110,103,32,100,111,117,98,108,101,32,106,49,108,40,108,111,110,103,32,100,111,117,98 +,108,101,41,59,10,108,111,110,103,32,100,111,117,98,108,101,32,106,110,108,40,105,110,116,44 +,32,108,111,110,103,32,100,111,117,98,108,101,41,59,10,108,111,110,103,32,100,111,117,98,108 +,101,32,121,48,108,40,108,111,110,103,32,100,111,117,98,108,101,41,59,10,108,111,110,103,32 +,100,111,117,98,108,101,32,121,49,108,40,108,111,110,103,32,100,111,117,98,108,101,41,59,10 +,108,111,110,103,32,100,111,117,98,108,101,32,121,110,108,40,105,110,116,44,32,108,111,110,103 +,32,100,111,117,98,108,101,41,59,10,108,111,110,103,32,100,111,117,98,108,101,32,101,114,102 +,108,40,108,111,110,103,32,100,111,117,98,108,101,41,59,10,108,111,110,103,32,100,111,117,98 +,108,101,32,101,114,102,99,108,40,108,111,110,103,32,100,111,117,98,108,101,41,59,10,108,111 +,110,103,32,100,111,117,98,108,101,32,108,103,97,109,109,97,108,40,108,111,110,103,32,100,111 +,117,98,108,101,41,59,10,108,111,110,103,32,100,111,117,98,108,101,32,116,103,97,109,109,97 +,108,40,108,111,110,103,32,100,111,117,98,108,101,41,59,10,108,111,110,103,32,100,111,117,98 +,108,101,32,103,97,109,109,97,108,40,108,111,110,103,32,100,111,117,98,108,101,41,59,10,108 +,111,110,103,32,100,111,117,98,108,101,32,108,103,97,109,109,97,108,95,114,40,108,111,110,103 +,32,100,111,117,98,108,101,44,32,105,110,116,42,32,95,95,115,105,103,110,103,97,109,112,41 +,59,10,108,111,110,103,32,100,111,117,98,108,101,32,114,105,110,116,108,40,108,111,110,103,32 +,100,111,117,98,108,101,32,95,95,120,41,59,10,108,111,110,103,32,100,111,117,98,108,101,32 +,110,101,120,116,97,102,116,101,114,108,40,108,111,110,103,32,100,111,117,98,108,101,32,95,95 +,120,44,32,108,111,110,103,32,100,111,117,98,108,101,32,95,95,121,41,59,10,108,111,110,103 +,32,100,111,117,98,108,101,32,110,101,120,116,116,111,119,97,114,100,108,40,108,111,110,103,32 +,100,111,117,98,108,101,32,95,95,120,44,32,108,111,110,103,32,100,111,117,98,108,101,32,95 +,95,121,41,59,10,108,111,110,103,32,100,111,117,98,108,101,32,114,101,109,97,105,110,100,101 +,114,108,40,108,111,110,103,32,100,111,117,98,108,101,32,95,95,120,44,32,108,111,110,103,32 +,100,111,117,98,108,101,32,95,95,121,41,59,10,108,111,110,103,32,100,111,117,98,108,101,32 +,115,99,97,108,98,110,108,40,108,111,110,103,32,100,111,117,98,108,101,32,95,95,120,44,32 +,105,110,116,32,95,95,110,41,59,10,105,110,116,32,105,108,111,103,98,108,40,108,111,110,103 +,32,100,111,117,98,108,101,32,95,95,120,41,59,10,108,111,110,103,32,100,111,117,98,108,101 +,32,115,99,97,108,98,108,110,108,40,108,111,110,103,32,100,111,117,98,108,101,32,95,95,120 +,44,32,108,111,110,103,32,105,110,116,32,95,95,110,41,59,10,108,111,110,103,32,100,111,117 +,98,108,101,32,110,101,97,114,98,121,105,110,116,108,40,108,111,110,103,32,100,111,117,98,108 +,101,32,95,95,120,41,59,10,108,111,110,103,32,100,111,117,98,108,101,32,114,111,117,110,100 +,108,40,108,111,110,103,32,100,111,117,98,108,101,32,95,95,120,41,59,10,108,111,110,103,32 +,100,111,117,98,108,101,32,116,114,117,110,99,108,40,108,111,110,103,32,100,111,117,98,108,101 +,32,95,95,120,41,59,10,108,111,110,103,32,100,111,117,98,108,101,32,114,101,109,113,117,111 +,108,40,108,111,110,103,32,100,111,117,98,108,101,32,95,95,120,44,32,108,111,110,103,32,100 +,111,117,98,108,101,32,95,95,121,44,32,105,110,116,42,32,95,95,113,117,111,41,59,10,108 +,111,110,103,32,105,110,116,32,108,114,105,110,116,108,40,108,111,110,103,32,100,111,117,98,108 +,101,32,95,95,120,41,59,10,108,111,110,103,32,108,111,110,103,32,105,110,116,32,108,108,114 +,111,117,110,100,108,40,108,111,110,103,32,100,111,117,98,108,101,32,95,95,120,41,59,10,108 +,111,110,103,32,100,111,117,98,108,101,32,102,100,105,109,108,40,108,111,110,103,32,100,111,117 +,98,108,101,32,95,95,120,44,32,108,111,110,103,32,100,111,117,98,108,101,32,95,95,121,41 +,59,10,108,111,110,103,32,100,111,117,98,108,101,32,102,109,97,120,108,40,108,111,110,103,32 +,100,111,117,98,108,101,32,95,95,120,44,32,108,111,110,103,32,100,111,117,98,108,101,32,95 +,95,121,41,59,10,108,111,110,103,32,100,111,117,98,108,101,32,102,109,105,110,108,40,108,111 +,110,103,32,100,111,117,98,108,101,32,95,95,120,44,32,108,111,110,103,32,100,111,117,98,108 +,101,32,95,95,121,41,59,10,108,111,110,103,32,100,111,117,98,108,101,32,102,109,97,108,40 +,108,111,110,103,32,100,111,117,98,108,101,32,95,95,120,44,32,108,111,110,103,32,100,111,117 +,98,108,101,32,95,95,121,44,32,108,111,110,103,32,100,111,117,98,108,101,32,95,95,122,41 +,59,10,108,111,110,103,32,100,111,117,98,108,101,32,115,99,97,108,98,108,40,108,111,110,103 +,32,100,111,117,98,108,101,32,95,95,120,44,32,108,111,110,103,32,100,111,117,98,108,101,32 +,95,95,110,41,59,10 }; static const char file_stdlib_h[] = { -#include "include\stdlib.h.include" + +47,42,10,32,42,32,32,84,104,105,115,32,102,105,108,101,32,105,115,32,112,97,114,116,32 +,111,102,32,99,97,107,101,32,99,111,109,112,105,108,101,114,10,32,42,32,32,104,116,116,112 +,115,58,47,47,103,105,116,104,117,98,46,99,111,109,47,116,104,114,97,100,97,109,115,47,99 +,97,107,101,10,42,47,10,10,116,121,112,101,100,101,102,32,108,111,110,103,32,108,111,110,103 +,32,102,112,111,115,95,116,59,10,116,121,112,101,100,101,102,32,117,110,115,105,103,110,101,100 +,32,115,105,122,101,95,116,59,10,10,35,100,101,102,105,110,101,32,69,88,73,84,95,83,85 +,67,67,69,83,83,32,48,10,35,100,101,102,105,110,101,32,69,88,73,84,95,70,65,73,76 +,85,82,69,32,49,10,35,100,101,102,105,110,101,32,78,85,76,76,32,40,40,118,111,105,100 +,42,41,48,41,10,10,116,121,112,101,100,101,102,32,105,110,116,32,119,99,104,97,114,95,116 +,59,10,91,91,110,111,100,105,115,99,97,114,100,93,93,32,100,111,117,98,108,101,32,97,116 +,111,102,40,99,111,110,115,116,32,99,104,97,114,42,32,110,112,116,114,41,59,10,91,91,110 +,111,100,105,115,99,97,114,100,93,93,32,105,110,116,32,97,116,111,105,40,99,111,110,115,116 +,32,99,104,97,114,42,32,110,112,116,114,41,59,10,91,91,110,111,100,105,115,99,97,114,100 +,93,93,32,108,111,110,103,32,105,110,116,32,97,116,111,108,40,99,111,110,115,116,32,99,104 +,97,114,42,32,110,112,116,114,41,59,10,91,91,110,111,100,105,115,99,97,114,100,93,93,32 +,108,111,110,103,32,108,111,110,103,32,105,110,116,32,97,116,111,108,108,40,99,111,110,115,116 +,32,99,104,97,114,42,32,110,112,116,114,41,59,10,100,111,117,98,108,101,32,115,116,114,116 +,111,100,40,99,111,110,115,116,32,99,104,97,114,42,32,114,101,115,116,114,105,99,116,32,110 +,112,116,114,44,32,99,104,97,114,42,42,32,114,101,115,116,114,105,99,116,32,101,110,100,112 +,116,114,41,59,10,102,108,111,97,116,32,115,116,114,116,111,102,40,99,111,110,115,116,32,99 +,104,97,114,42,32,114,101,115,116,114,105,99,116,32,110,112,116,114,44,32,99,104,97,114,42 +,42,32,114,101,115,116,114,105,99,116,32,101,110,100,112,116,114,41,59,10,108,111,110,103,32 +,100,111,117,98,108,101,32,115,116,114,116,111,108,100,40,99,111,110,115,116,32,99,104,97,114 +,42,32,114,101,115,116,114,105,99,116,32,110,112,116,114,44,32,99,104,97,114,42,42,32,114 +,101,115,116,114,105,99,116,32,101,110,100,112,116,114,41,59,10,108,111,110,103,32,105,110,116 +,32,115,116,114,116,111,108,40,99,111,110,115,116,32,99,104,97,114,42,32,114,101,115,116,114 +,105,99,116,32,110,112,116,114,44,32,99,104,97,114,42,42,32,114,101,115,116,114,105,99,116 +,32,101,110,100,112,116,114,44,32,105,110,116,32,98,97,115,101,41,59,10,108,111,110,103,32 +,108,111,110,103,32,105,110,116,32,115,116,114,116,111,108,108,40,99,111,110,115,116,32,99,104 +,97,114,42,32,114,101,115,116,114,105,99,116,32,110,112,116,114,44,32,99,104,97,114,42,42 +,32,114,101,115,116,114,105,99,116,32,101,110,100,112,116,114,44,32,105,110,116,32,98,97,115 +,101,41,59,10,117,110,115,105,103,110,101,100,32,108,111,110,103,32,105,110,116,32,115,116,114 +,116,111,117,108,40,99,111,110,115,116,32,99,104,97,114,42,32,114,101,115,116,114,105,99,116 +,32,110,112,116,114,44,32,99,104,97,114,42,42,32,114,101,115,116,114,105,99,116,32,101,110 +,100,112,116,114,44,32,105,110,116,32,98,97,115,101,41,59,10,117,110,115,105,103,110,101,100 +,32,108,111,110,103,32,108,111,110,103,32,105,110,116,32,115,116,114,116,111,117,108,108,40,99 +,111,110,115,116,32,99,104,97,114,42,32,114,101,115,116,114,105,99,116,32,110,112,116,114,44 +,32,99,104,97,114,42,42,32,114,101,115,116,114,105,99,116,32,101,110,100,112,116,114,44,32 +,105,110,116,32,98,97,115,101,41,59,10,105,110,116,32,114,97,110,100,40,118,111,105,100,41 +,59,10,118,111,105,100,32,115,114,97,110,100,40,117,110,115,105,103,110,101,100,32,105,110,116 +,32,115,101,101,100,41,59,10,118,111,105,100,42,32,97,108,105,103,110,101,100,95,97,108,108 +,111,99,40,115,105,122,101,95,116,32,97,108,105,103,110,109,101,110,116,44,32,115,105,122,101 +,95,116,32,115,105,122,101,41,59,10,10,35,105,102,32,100,101,102,105,110,101,100,40,95,95 +,83,84,68,67,95,79,87,78,69,82,83,72,73,80,95,95,41,32,10,91,91,110,111,100,105 +,115,99,97,114,100,93,93,32,118,111,105,100,42,32,95,79,119,110,101,114,32,95,79,112,116 +,32,99,97,108,108,111,99,40,115,105,122,101,95,116,32,110,109,101,109,98,44,32,115,105,122 +,101,95,116,32,115,105,122,101,41,59,10,118,111,105,100,32,102,114,101,101,40,118,111,105,100 +,42,32,95,79,119,110,101,114,32,95,79,112,116,32,112,116,114,41,59,10,91,91,110,111,100 +,105,115,99,97,114,100,93,93,32,118,111,105,100,42,32,95,79,119,110,101,114,32,95,79,112 +,116,32,109,97,108,108,111,99,40,115,105,122,101,95,116,32,115,105,122,101,41,59,10,91,91 +,110,111,100,105,115,99,97,114,100,93,93,32,118,111,105,100,42,32,95,79,119,110,101,114,32 +,95,79,112,116,32,114,101,97,108,108,111,99,40,118,111,105,100,42,32,95,79,112,116,32,112 +,116,114,44,32,115,105,122,101,95,116,32,115,105,122,101,41,59,10,35,101,108,115,101,10,91 +,91,110,111,100,105,115,99,97,114,100,93,93,32,118,111,105,100,42,32,99,97,108,108,111,99 +,40,115,105,122,101,95,116,32,110,109,101,109,98,44,32,115,105,122,101,95,116,32,115,105,122 +,101,41,59,10,118,111,105,100,32,102,114,101,101,40,118,111,105,100,42,32,112,116,114,41,59 +,10,91,91,110,111,100,105,115,99,97,114,100,93,93,32,118,111,105,100,42,32,109,97,108,108 +,111,99,40,115,105,122,101,95,116,32,115,105,122,101,41,59,10,91,91,110,111,100,105,115,99 +,97,114,100,93,93,32,118,111,105,100,42,32,114,101,97,108,108,111,99,40,118,111,105,100,42 +,32,112,116,114,44,32,115,105,122,101,95,116,32,115,105,122,101,41,59,10,35,101,110,100,105 +,102,10,10,91,91,110,111,114,101,116,117,114,110,93,93,32,118,111,105,100,32,97,98,111,114 +,116,40,118,111,105,100,41,59,10,105,110,116,32,97,116,101,120,105,116,40,118,111,105,100,32 +,40,42,102,117,110,99,41,40,118,111,105,100,41,41,59,10,105,110,116,32,97,116,95,113,117 +,105,99,107,95,101,120,105,116,40,118,111,105,100,32,40,42,102,117,110,99,41,40,118,111,105 +,100,41,41,59,10,91,91,110,111,114,101,116,117,114,110,93,93,32,118,111,105,100,32,101,120 +,105,116,40,105,110,116,32,115,116,97,116,117,115,41,59,10,91,91,110,111,114,101,116,117,114 +,110,93,93,32,118,111,105,100,32,95,69,120,105,116,40,105,110,116,32,115,116,97,116,117,115 +,41,59,10,99,104,97,114,42,32,103,101,116,101,110,118,40,99,111,110,115,116,32,99,104,97 +,114,42,32,110,97,109,101,41,59,10,91,91,110,111,114,101,116,117,114,110,93,93,32,118,111 +,105,100,32,113,117,105,99,107,95,101,120,105,116,40,105,110,116,32,115,116,97,116,117,115,41 +,59,10,105,110,116,32,115,121,115,116,101,109,40,99,111,110,115,116,32,99,104,97,114,42,32 +,115,116,114,105,110,103,41,59,10 }; static const char file_stddef_h[] = { -#include "include\stddef.h.include" + +47,42,10,32,42,32,32,84,104,105,115,32,102,105,108,101,32,105,115,32,112,97,114,116,32 +,111,102,32,99,97,107,101,32,99,111,109,112,105,108,101,114,10,32,42,32,32,104,116,116,112 +,115,58,47,47,103,105,116,104,117,98,46,99,111,109,47,116,104,114,97,100,97,109,115,47,99 +,97,107,101,10,42,47,10,10,35,100,101,102,105,110,101,32,117,110,114,101,97,99,104,97,98 +,108,101,40,41,32,100,111,32,123,125,32,119,104,105,108,101,40,48,41,32,10,116,121,112,101 +,100,101,102,32,108,111,110,103,32,105,110,116,32,112,116,114,100,105,102,102,95,116,59,10,116 +,121,112,101,100,101,102,32,108,111,110,103,32,117,110,115,105,103,110,101,100,32,105,110,116,32 +,115,105,122,101,95,116,59,10,116,121,112,101,100,101,102,32,105,110,116,32,119,99,104,97,114 +,95,116,59,10,116,121,112,101,100,101,102,32,115,116,114,117,99,116,32,123,10,32,32,108,111 +,110,103,32,108,111,110,103,32,95,95,109,97,120,95,97,108,105,103,110,95,108,108,59,10,32 +,32,108,111,110,103,32,100,111,117,98,108,101,32,95,95,109,97,120,95,97,108,105,103,110,95 +,108,100,59,10,125,32,109,97,120,95,97,108,105,103,110,95,116,59,10,10,116,121,112,101,100 +,101,102,32,116,121,112,101,111,102,40,110,117,108,108,112,116,114,41,32,110,117,108,108,112,116 +,114,95,116,59,10,10 }; static const char file_limits_h[] = { @@ -11161,7 +11939,58 @@ static const char file_limits_h[] = { static const char file_locale_h[] = { -#include "include\locale.h.include" + +47,42,10,32,42,32,32,84,104,105,115,32,102,105,108,101,32,105,115,32,112,97,114,116,32 +,111,102,32,99,97,107,101,32,99,111,109,112,105,108,101,114,10,32,42,32,32,104,116,116,112 +,115,58,47,47,103,105,116,104,117,98,46,99,111,109,47,116,104,114,97,100,97,109,115,47,99 +,97,107,101,10,42,47,10,10,35,112,114,97,103,109,97,32,111,110,99,101,10,116,121,112,101 +,100,101,102,32,105,110,116,32,119,99,104,97,114,95,116,59,10,47,47,32,76,111,99,97,108 +,101,32,99,97,116,101,103,111,114,105,101,115,10,35,100,101,102,105,110,101,32,76,67,95,65 +,76,76,32,32,32,32,32,32,32,32,32,32,48,10,35,100,101,102,105,110,101,32,76,67,95 +,67,79,76,76,65,84,69,32,32,32,32,32,32,49,10,35,100,101,102,105,110,101,32,76,67 +,95,67,84,89,80,69,32,32,32,32,32,32,32,32,50,10,35,100,101,102,105,110,101,32,76 +,67,95,77,79,78,69,84,65,82,89,32,32,32,32,32,51,10,35,100,101,102,105,110,101,32 +,76,67,95,78,85,77,69,82,73,67,32,32,32,32,32,32,52,10,35,100,101,102,105,110,101 +,32,76,67,95,84,73,77,69,32,32,32,32,32,32,32,32,32,53,10,10,35,100,101,102,105 +,110,101,32,76,67,95,77,73,78,32,32,32,32,32,32,32,32,32,32,76,67,95,65,76,76 +,10,35,100,101,102,105,110,101,32,76,67,95,77,65,88,32,32,32,32,32,32,32,32,32,32 +,76,67,95,84,73,77,69,10,10,47,47,32,76,111,99,97,108,101,32,99,111,110,118,101,110 +,116,105,111,110,32,115,116,114,117,99,116,117,114,101,10,115,116,114,117,99,116,32,108,99,111 +,110,118,10,123,10,32,32,32,32,99,104,97,114,42,32,100,101,99,105,109,97,108,95,112,111 +,105,110,116,59,10,32,32,32,32,99,104,97,114,42,32,116,104,111,117,115,97,110,100,115,95 +,115,101,112,59,10,32,32,32,32,99,104,97,114,42,32,103,114,111,117,112,105,110,103,59,10 +,32,32,32,32,99,104,97,114,42,32,105,110,116,95,99,117,114,114,95,115,121,109,98,111,108 +,59,10,32,32,32,32,99,104,97,114,42,32,99,117,114,114,101,110,99,121,95,115,121,109,98 +,111,108,59,10,32,32,32,32,99,104,97,114,42,32,109,111,110,95,100,101,99,105,109,97,108 +,95,112,111,105,110,116,59,10,32,32,32,32,99,104,97,114,42,32,109,111,110,95,116,104,111 +,117,115,97,110,100,115,95,115,101,112,59,10,32,32,32,32,99,104,97,114,42,32,109,111,110 +,95,103,114,111,117,112,105,110,103,59,10,32,32,32,32,99,104,97,114,42,32,112,111,115,105 +,116,105,118,101,95,115,105,103,110,59,10,32,32,32,32,99,104,97,114,42,32,110,101,103,97 +,116,105,118,101,95,115,105,103,110,59,10,32,32,32,32,99,104,97,114,32,32,32,32,32,105 +,110,116,95,102,114,97,99,95,100,105,103,105,116,115,59,10,32,32,32,32,99,104,97,114,32 +,32,32,32,32,102,114,97,99,95,100,105,103,105,116,115,59,10,32,32,32,32,99,104,97,114 +,32,32,32,32,32,112,95,99,115,95,112,114,101,99,101,100,101,115,59,10,32,32,32,32,99 +,104,97,114,32,32,32,32,32,112,95,115,101,112,95,98,121,95,115,112,97,99,101,59,10,32 +,32,32,32,99,104,97,114,32,32,32,32,32,110,95,99,115,95,112,114,101,99,101,100,101,115 +,59,10,32,32,32,32,99,104,97,114,32,32,32,32,32,110,95,115,101,112,95,98,121,95,115 +,112,97,99,101,59,10,32,32,32,32,99,104,97,114,32,32,32,32,32,112,95,115,105,103,110 +,95,112,111,115,110,59,10,32,32,32,32,99,104,97,114,32,32,32,32,32,110,95,115,105,103 +,110,95,112,111,115,110,59,10,32,32,32,32,119,99,104,97,114,95,116,42,32,95,87,95,100 +,101,99,105,109,97,108,95,112,111,105,110,116,59,10,32,32,32,32,119,99,104,97,114,95,116 +,42,32,95,87,95,116,104,111,117,115,97,110,100,115,95,115,101,112,59,10,32,32,32,32,119 +,99,104,97,114,95,116,42,32,95,87,95,105,110,116,95,99,117,114,114,95,115,121,109,98,111 +,108,59,10,32,32,32,32,119,99,104,97,114,95,116,42,32,95,87,95,99,117,114,114,101,110 +,99,121,95,115,121,109,98,111,108,59,10,32,32,32,32,119,99,104,97,114,95,116,42,32,95 +,87,95,109,111,110,95,100,101,99,105,109,97,108,95,112,111,105,110,116,59,10,32,32,32,32 +,119,99,104,97,114,95,116,42,32,95,87,95,109,111,110,95,116,104,111,117,115,97,110,100,115 +,95,115,101,112,59,10,32,32,32,32,119,99,104,97,114,95,116,42,32,95,87,95,112,111,115 +,105,116,105,118,101,95,115,105,103,110,59,10,32,32,32,32,119,99,104,97,114,95,116,42,32 +,95,87,95,110,101,103,97,116,105,118,101,95,115,105,103,110,59,10,125,59,10,10,115,116,114 +,117,99,116,32,116,109,59,10,10,99,104,97,114,42,32,115,101,116,108,111,99,97,108,101,40 +,10,32,32,32,32,105,110,116,32,32,32,32,32,32,32,32,32,95,67,97,116,101,103,111,114 +,121,44,10,32,32,32,32,99,104,97,114,32,99,111,110,115,116,42,32,95,76,111,99,97,108 +,101,10,41,59,10,10,115,116,114,117,99,116,32,108,99,111,110,118,42,32,108,111,99,97,108 +,101,99,111,110,118,40,118,111,105,100,41,59,10 }; const char file_wchar_h[] = { @@ -12204,7 +13033,7 @@ enum object_value_state struct object { enum object_value_state state; enum object_value_type value_type; - struct type type2; //TODO to be removed + struct type type; //TODO to be removed const char* _Opt _Owner debug_name; //TODO we can remove this passing tthe type to print function @@ -15686,7 +16515,7 @@ void object_default_initialization(struct object* p_object, bool is_constant) p_object->value.unsigned_long_long_value = 0; } - if (type_is_union(&p_object->type2)) + if (type_is_union(&p_object->type)) { struct object* _Opt p = p_object->members; if (p) @@ -15816,7 +16645,7 @@ struct object* _Owner _Opt make_object_ptr_core(const struct type* p_type, const if (p_object == NULL) throw; p_object->debug_name = strdup(name); - p_object->type2 = type_dup(p_type); + p_object->type = type_dup(p_type); return p_object; } @@ -15830,7 +16659,7 @@ struct object* _Owner _Opt make_object_ptr_core(const struct type* p_type, const p_object->state = CONSTANT_VALUE_STATE_UNINITIALIZED; assert(p_object->debug_name == NULL); p_object->debug_name = strdup(name); - p_object->type2 = type_dup(p_type); + p_object->type = type_dup(p_type); return p_object; } @@ -15840,7 +16669,7 @@ struct object* _Owner _Opt make_object_ptr_core(const struct type* p_type, const p_object = calloc(1, sizeof * p_object); if (p_object == NULL) throw; - p_object->type2 = type_dup(p_type); + p_object->type = type_dup(p_type); p_object->debug_name = strdup(name); if (p_type->num_of_elements > 0) @@ -15891,7 +16720,7 @@ struct object* _Owner _Opt make_object_ptr_core(const struct type* p_type, const p_object->value_type = type_to_object_type(p_type); p_object->value.signed_long_long_value = -1; p_object->debug_name = strdup(name); - p_object->type2 = type_dup(p_type); + p_object->type = type_dup(p_type); return p_object; } @@ -15911,7 +16740,7 @@ struct object* _Owner _Opt make_object_ptr_core(const struct type* p_type, const throw; p_object->debug_name = strdup(name); - p_object->type2 = type_dup(p_type); + p_object->type = type_dup(p_type); struct object* _Opt p_last_member_obj = NULL; @@ -16156,7 +16985,7 @@ void object_print_to_debug_core(const struct object* object, int n) if (object->members != NULL) { - type_print(&object->type2); + type_print(&object->type); printf(" {\n"); @@ -16175,7 +17004,7 @@ void object_print_to_debug_core(const struct object* object, int n) - type_print(&object->type2); + type_print(&object->type); printf(" = "); @@ -27080,7 +27909,7 @@ void defer_start_visit_declaration(struct defer_visit_ctx* ctx, struct declarati //#pragma once -#define CAKE_VERSION "0.9.39" +#define CAKE_VERSION "0.9.40" @@ -27110,11 +27939,13 @@ struct d_visit_ctx struct hash_map structs_map; struct hash_map function_map; + struct osstream local_declarators; struct osstream add_this_before; struct osstream add_this_before_external_decl; - + bool is_local; struct osstream data_types; struct osstream function_types; + bool zero_mem_used; _View struct ast ast; }; @@ -37595,12 +38426,12 @@ static struct object* _Opt find_first_subobject_old(struct type* p_type_not_used if (p_object->members == NULL) { *sub_object_of_union = false; - *p_type_out = type_dup(&p_object->type2); + *p_type_out = type_dup(&p_object->type); return p_object; //tODO } - *sub_object_of_union = type_is_union(&p_object->type2); - *p_type_out = type_dup(&p_object->members->type2); + *sub_object_of_union = type_is_union(&p_object->type); + *p_type_out = type_dup(&p_object->members->type); return p_object->members; //tODO } @@ -37615,7 +38446,7 @@ static struct object* _Opt find_last_suboject_of_suboject_old(struct type* p_typ if (p_object->members == NULL) { - *p_type_out = type_dup(&p_object->type2); + *p_type_out = type_dup(&p_object->type); return p_object; //tODO } @@ -37629,7 +38460,7 @@ static struct object* _Opt find_last_suboject_of_suboject_old(struct type* p_typ it = it->next; } - *p_type_out = type_dup(&p_object->type2); + *p_type_out = type_dup(&p_object->type); return p_object; } @@ -37653,10 +38484,10 @@ static struct object* find_next_subobject_old(struct type* p_top_object_not_used if (it->members) { - *sub_object_of_union = type_is_union(&it->type2); + *sub_object_of_union = type_is_union(&it->type); it = it->members; - *p_type_out = type_dup(&it->type2); + *p_type_out = type_dup(&it->type); return it; } @@ -37671,7 +38502,7 @@ static struct object* find_next_subobject_old(struct type* p_top_object_not_used if (next != NULL) { if (it->parent) - *sub_object_of_union = type_is_union(&it->parent->type2); + *sub_object_of_union = type_is_union(&it->parent->type); it = next; break; } @@ -37679,7 +38510,7 @@ static struct object* find_next_subobject_old(struct type* p_top_object_not_used it = it->parent; } if (it != NULL) - *p_type_out = type_dup(&it->type2); + *p_type_out = type_dup(&it->type); return it; } @@ -38223,11 +39054,11 @@ static int braced_initializer_new(struct parser_ctx* ctx, { struct type t = { 0 }; is_subobject_of_union = true; - p_subobject = find_last_suboject_of_suboject(&p_subobject->parent->type2, p_subobject->parent, &t); + p_subobject = find_last_suboject_of_suboject(&p_subobject->parent->type, p_subobject->parent, &t); type_swap(&t, &subobject_type); type_destroy(&t); if (p_subobject) - subobject_type = type_dup(&p_subobject->type2); + subobject_type = type_dup(&p_subobject->type); } else if (entire_object_initialized) @@ -38238,7 +39069,7 @@ static int braced_initializer_new(struct parser_ctx* ctx, type_swap(&t, &subobject_type); type_destroy(&t); if (p_subobject) - subobject_type = type_dup(&p_subobject->type2); + subobject_type = type_dup(&p_subobject->type); } } p_initializer_list_item = p_initializer_list_item->next; @@ -38256,7 +39087,7 @@ static int braced_initializer_new(struct parser_ctx* ctx, } if (compute_array_size) { - current_object->type2.num_of_elements = array_to_expand_max_index + 1; + current_object->type.num_of_elements = array_to_expand_max_index + 1; p_current_object_type->num_of_elements = array_to_expand_max_index + 1; } @@ -39333,7 +40164,7 @@ static void d_visit_init_declarator_list(struct d_visit_ctx* ctx, struct osstrea static void d_visit_compound_statement(struct d_visit_ctx* ctx, struct osstream* oss, struct compound_statement* p_compound_statement); static void d_visit_statement(struct d_visit_ctx* ctx, struct osstream* oss, struct statement* p_statement); static void d_visit_unlabeled_statement(struct d_visit_ctx* ctx, struct osstream* oss, struct unlabeled_statement* p_unlabeled_statement); -static void object_print_non_constant_initialization(struct d_visit_ctx* ctx, struct osstream* ss, const struct object* object, const char* declarator_name); +static void object_print_non_constant_initialization(struct d_visit_ctx* ctx, struct osstream* ss, const struct object* object, const char* declarator_name, bool all); static void d_print_type_core(struct d_visit_ctx* ctx, struct osstream* ss, const struct type* p_type0, const char* name_opt); static void d_print_type(struct d_visit_ctx* ctx, @@ -39763,34 +40594,57 @@ static void d_visit_expression(struct d_visit_ctx* ctx, struct osstream* oss, st char name[100]; snprintf(name, sizeof(name), "__cmp_lt_%d", ctx->locals_count++); - struct osstream local = { 0 }; - print_identation_core(&local, ctx->indentation); - d_print_type(ctx, &local, &p_expression->type, name); - bool first = true; - ss_fprintf(&local, " = {"); - object_print_constant_initialization(ctx, &local, &p_expression->object, &first); - ss_fprintf(&local, "};\n"); - object_print_non_constant_initialization(ctx, &local, &p_expression->object, name); - ss_fprintf(&ctx->add_this_before, "%s", local.c_str); - ss_close(&local); + if (ctx->is_local) + { + struct osstream local = { 0 }; + ss_swap(&ctx->local_declarators, &local); + print_identation_core(&local, ctx->indentation); + d_print_type(ctx, &local, &p_expression->type, name); + ss_fprintf(&local, ";\n", name); + ss_fprintf(&ctx->local_declarators, "%s", local.c_str); - ss_fprintf(oss, "%s", name); + ss_clear(&local); + + //bool first = true; + object_print_non_constant_initialization(ctx, &local, &p_expression->object, name, true); + ss_fprintf(&ctx->add_this_before, "%s", local.c_str); + ss_close(&local); + ss_fprintf(oss, "%s", name); + } + else + { + struct osstream local = { 0 }; + print_identation_core(&local, ctx->indentation); + d_print_type(ctx, &local, &p_expression->type, name); + bool first = true; + ss_fprintf(&local, " = {"); + object_print_constant_initialization(ctx, &local, &p_expression->object, &first); + ss_fprintf(&local, "};\n"); + ss_fprintf(&ctx->add_this_before, "%s", local.c_str); + ss_close(&local); + ss_fprintf(oss, "%s", name); + + } } break; case UNARY_EXPRESSION_SIZEOF_EXPRESSION: - ss_fprintf(oss, "sizeof "); - d_visit_expression(ctx, oss, p_expression->right); + + object_print_value(oss, &p_expression->object); + + //ss_fprintf(oss, "sizeof "); + //d_visit_expression(ctx, oss, p_expression->right); break; case UNARY_EXPRESSION_SIZEOF_TYPE: { - struct osstream local0 = { 0 }; - d_print_type(ctx, &local0, &p_expression->type_name->type, false); - ss_fprintf(oss, "sizeof (%s)", local0.c_str); - ss_close(&local0); + object_print_value(oss, &p_expression->object); + //struct osstream local0 = { 0 }; + //d_print_type(ctx, &local0, &p_expression->type_name->type, false); + //ss_fprintf(oss, "sizeof (%s)", local0.c_str); + //ss_close(&local0); } break; @@ -40152,7 +41006,17 @@ static void d_visit_iteration_statement(struct d_visit_ctx* ctx, struct osstream ss_fprintf(oss, "{\n"); ctx->indentation++; - d_visit_declaration(ctx, oss, p_iteration_statement->declaration); + struct osstream local_declarators = { 0 }; + ss_swap(&local_declarators, &ctx->local_declarators); + + struct osstream local = { 0 }; + d_visit_declaration(ctx, &local, p_iteration_statement->declaration); + + ss_fprintf(oss, "%s", ctx->local_declarators.c_str); + ss_fprintf(oss, "%s", local.c_str); + + ss_swap(&local_declarators, &ctx->local_declarators); + print_identation(ctx, oss); ss_fprintf(oss, "for ("); @@ -40245,8 +41109,17 @@ static void d_visit_selection_statement(struct d_visit_ctx* ctx, struct osstream ss_fprintf(oss, "{\n"); addclose = true; ctx->indentation++; - d_visit_init_statement(ctx, oss, p_selection_statement->p_init_statement); + struct osstream local_declarators = { 0 }; + ss_swap(&local_declarators, &ctx->local_declarators); + + struct osstream local2 = { 0 }; + d_visit_init_statement(ctx, &local2, p_selection_statement->p_init_statement); + ss_fprintf(oss, "%s", ctx->local_declarators.c_str); + ss_fprintf(oss, "\n"); + ss_fprintf(oss, "%s", local2.c_str); + ss_close(&local2); print_identation(ctx, oss); + ss_swap(&local_declarators, &ctx->local_declarators); } if (p_selection_statement->condition) @@ -40256,7 +41129,17 @@ static void d_visit_selection_statement(struct d_visit_ctx* ctx, struct osstream ss_fprintf(oss, "{\n"); ctx->indentation++; addclose = true; - d_visit_init_declarator(ctx, oss, p_selection_statement->condition->p_init_declarator, false); + struct osstream local_declarators = { 0 }; + ss_swap(&local_declarators, &ctx->local_declarators); + + struct osstream local2 = { 0 }; + d_visit_init_declarator(ctx, &local2, p_selection_statement->condition->p_init_declarator, false); + ss_fprintf(oss, "%s", ctx->local_declarators.c_str); + ss_fprintf(oss, "\n"); + ss_fprintf(oss, "%s", local2.c_str); + ss_close(&local2); + ss_swap(&local_declarators, &ctx->local_declarators); + print_identation(ctx, oss); ss_fprintf(oss, "if ("); ss_fprintf(oss, "%s", p_selection_statement->condition->p_init_declarator->p_declarator->name_opt->lexeme); @@ -40456,10 +41339,19 @@ static void d_visit_block_item_list(struct d_visit_ctx* ctx, struct osstream* os static void d_visit_compound_statement(struct d_visit_ctx* ctx, struct osstream* oss, struct compound_statement* p_compound_statement) { - print_identation(ctx, oss); - ss_fprintf(oss, "{\n"); + bool is_local = ctx->is_local; + ctx->is_local = true; + //ss_clear(&ctx->local_declarators); + + struct osstream local_declarators = { 0 }; + ss_swap(&ctx->local_declarators, &local_declarators); + + struct osstream local = { 0 }; + + + //ss_fprintf(oss, "{\n"); ctx->indentation++; - d_visit_block_item_list(ctx, oss, &p_compound_statement->block_item_list); + d_visit_block_item_list(ctx, &local, &p_compound_statement->block_item_list); bool ends_with_jump = false; @@ -40472,11 +41364,26 @@ static void d_visit_compound_statement(struct d_visit_ctx* ctx, struct osstream* } if (!ends_with_jump) - il_print_defer_list(ctx, oss, &p_compound_statement->defer_list); + il_print_defer_list(ctx, &local, &p_compound_statement->defer_list); ctx->indentation--; + + print_identation(ctx, oss); + ss_fprintf(oss, "{\n"); + + if (ctx->local_declarators.c_str) + { + ss_fprintf(oss, "%s", ctx->local_declarators.c_str); + ss_fprintf(oss, "\n"); + } + + if (local.c_str) + ss_fprintf(oss, "%s", local.c_str); + print_identation(ctx, oss); ss_fprintf(oss, "}\n"); + ctx->is_local = is_local; //restore + ss_swap(&ctx->local_declarators, &local_declarators); } //struct struct_entry @@ -40977,13 +41884,13 @@ static void object_print_constant_initialization(struct d_visit_ctx* ctx, struct if (object->members != NULL) { - if (type_is_union(&object->type2)) + if (type_is_union(&object->type)) { //In c89 only the first member can be initialized //we could make the first member be array of unsigned int //then initialize it struct object* _Opt member = object->members; - object_print_constant_initialization(ctx, ss, member, first); + object_print_constant_initialization(ctx, ss, member, first); } else { @@ -41028,7 +41935,8 @@ static void object_print_constant_initialization(struct d_visit_ctx* ctx, struct static void object_print_non_constant_initialization(struct d_visit_ctx* ctx, struct osstream* ss, const struct object* object, - const char* declarator_name) + const char* declarator_name, + bool all) { if (object_is_reference(object)) @@ -41038,13 +41946,14 @@ static void object_print_non_constant_initialization(struct d_visit_ctx* ctx, if (object->members != NULL) { - if (type_is_union(&object->type2)) + if (type_is_union(&object->type)) { //In c89 only the first member can be initialized struct object* _Opt member = object->members; if (member->p_init_expression && - object_has_constant_value(&member->p_init_expression->object)) + object_has_constant_value(&member->p_init_expression->object) && + !all) { //already initialized } @@ -41067,6 +41976,11 @@ static void object_print_non_constant_initialization(struct d_visit_ctx* ctx, ss_close(&local); break; } + else if (all) + { + print_identation_core(ss, ctx->indentation); + ss_fprintf(ss, "%s%s = 0;\n", declarator_name, member->debug_name); + } member = member->next; } } @@ -41076,7 +41990,7 @@ static void object_print_non_constant_initialization(struct d_visit_ctx* ctx, struct object* _Opt member = object->members; while (member) { - object_print_non_constant_initialization(ctx, ss, member, declarator_name); + object_print_non_constant_initialization(ctx, ss, member, declarator_name, all); member = member->next; } } @@ -41085,11 +41999,24 @@ static void object_print_non_constant_initialization(struct d_visit_ctx* ctx, { if (object->p_init_expression) { - if (object->p_init_expression->expression_type == PRIMARY_EXPRESSION_STRING_LITERAL) + if (!all) { - //skip + if (object->p_init_expression->expression_type == PRIMARY_EXPRESSION_STRING_LITERAL) + { + //skip + } + else if (!object_has_constant_value(&object->p_init_expression->object)) + { + print_identation_core(ss, ctx->indentation); + ss_fprintf(ss, "%s%s = ", declarator_name, object->debug_name); + struct osstream local = { 0 }; + d_visit_expression(ctx, &local, object->p_init_expression); + ss_fprintf(ss, "%s", local.c_str); + ss_fprintf(ss, ";\n"); + ss_close(&local); + } } - else if (!object_has_constant_value(&object->p_init_expression->object)) + else { print_identation_core(ss, ctx->indentation); ss_fprintf(ss, "%s%s = ", declarator_name, object->debug_name); @@ -41100,6 +42027,11 @@ static void object_print_non_constant_initialization(struct d_visit_ctx* ctx, ss_close(&local); } } + else if (all) + { + print_identation_core(ss, ctx->indentation); + ss_fprintf(ss, "%s%s = 0;\n", declarator_name, object->debug_name); + } } } @@ -41117,25 +42049,62 @@ static void d_visit_init_declarator(struct d_visit_ctx* ctx, struct osstream* os } else { - print_identation(ctx, oss); + //print_identation(ctx, oss); if (binline) ss_fprintf(oss, "__inline "); struct osstream ss = { 0 }; - d_print_type(ctx, &ss, - &p_init_declarator->p_declarator->type, - p_init_declarator->p_declarator->name_opt->lexeme); - ss_fprintf(oss, "%s", ss.c_str); + if (ctx->is_local) + { + d_print_type(ctx, &ss, + &p_init_declarator->p_declarator->type, + p_init_declarator->p_declarator->name_opt->lexeme); + + print_identation(ctx, &ctx->local_declarators); + + ss_fprintf(&ctx->local_declarators, "%s;\n", ss.c_str); + ss_clear(&ss); + } + else + { + d_print_type(ctx, &ss, + &p_init_declarator->p_declarator->type, + p_init_declarator->p_declarator->name_opt->lexeme); + + + if (p_init_declarator->initializer == NULL && + p_init_declarator->p_declarator->function_body == NULL) + { + ss_fprintf(oss, "%s;\n", ss.c_str); + } + else + ss_fprintf(oss, "%s", ss.c_str); + } if (p_init_declarator->initializer) { - ss_fprintf(oss, " = "); + bool is_local = p_init_declarator->p_declarator->type.storage_class_specifier_flags & STORAGE_SPECIFIER_AUTOMATIC_STORAGE; + + if (p_init_declarator->initializer->assignment_expression) { - d_visit_expression(ctx, oss, p_init_declarator->initializer->assignment_expression); - ss_fprintf(oss, ";\n"); + if (is_local) + { + //ss_fprintf(oss, ";\n"); + print_identation_core(oss, ctx->indentation); + ss_fprintf(oss, "%s%s = ", p_init_declarator->p_declarator->name_opt->lexeme, ""); + d_visit_expression(ctx, oss, p_init_declarator->initializer->assignment_expression); + ss_fprintf(oss, ";\n"); + } + else + { + print_identation_core(oss, ctx->indentation); + ss_fprintf(oss, "%s%s = ", p_init_declarator->p_declarator->name_opt->lexeme, ""); + d_visit_expression(ctx, oss, p_init_declarator->initializer->assignment_expression); + ss_fprintf(oss, ";\n"); + } } else { @@ -41146,29 +42115,67 @@ static void d_visit_init_declarator(struct d_visit_ctx* ctx, struct osstream* os { if (is_all_zero(&p_init_declarator->p_declarator->object)) { - ss_fprintf(oss, "{0};\n"); + if (is_local) + { + int sz = type_get_sizeof(&p_init_declarator->p_declarator->type); + // ss_fprintf(oss, ";\n"); + print_identation_core(oss, ctx->indentation); + ss_fprintf(oss, "_zmem(&%s, %d);\n", + p_init_declarator->p_declarator->name_opt->lexeme, + sz); + ctx->zero_mem_used = true; + } + else + { + ss_fprintf(oss, " = "); + ss_fprintf(oss, "{0};\n"); + } } else { + bool first = true; - ss_fprintf(oss, "{"); - object_print_constant_initialization(ctx, oss, &p_init_declarator->p_declarator->object, &first); - ss_fprintf(oss, "}"); - ss_fprintf(oss, ";\n"); - object_print_non_constant_initialization(ctx, oss, &p_init_declarator->p_declarator->object, p_init_declarator->p_declarator->name_opt->lexeme); + if (!is_local) + { + ss_fprintf(oss, " = "); + ss_fprintf(oss, "{"); + object_print_constant_initialization(ctx, oss, &p_init_declarator->p_declarator->object, &first); + ss_fprintf(oss, "}"); + ss_fprintf(oss, ";\n"); + } + else + { + //ss_fprintf(oss, ";\n"); + object_print_non_constant_initialization(ctx, oss, &p_init_declarator->p_declarator->object, p_init_declarator->p_declarator->name_opt->lexeme, true); + } } } else { - ss_fprintf(oss, "{0};\n"); + if (is_local) + { + int sz = type_get_sizeof(&p_init_declarator->p_declarator->type); + //ss_fprintf(oss, ";\n"); + print_identation_core(oss, ctx->indentation); + ss_fprintf(oss, "_zmem(&%s, %d);\n", + p_init_declarator->p_declarator->name_opt->lexeme, + sz); + ctx->zero_mem_used = true; + } + else + { + ss_fprintf(oss, " = "); + ss_fprintf(oss, "{0};\n"); + } + //ss_fprintf(oss, "{0};\n"); } } } } else { - if (p_init_declarator->p_declarator->function_body == NULL) - ss_fprintf(oss, ";\n"); + //if (p_init_declarator->p_declarator->function_body == NULL) + // ss_fprintf(oss, ";\n"); } if (p_init_declarator->p_declarator->function_body) @@ -41386,6 +42393,17 @@ void d_visit(struct d_visit_ctx* ctx, struct osstream* oss) } ss_fprintf(oss, "\n"); + if (ctx->zero_mem_used) + { + const char* str = + "static void _zmem(void *dest, register unsigned int len)\n" + "{\n" + " register unsigned char *ptr = (unsigned char*)dest;\n" + " while (len-- > 0) *ptr++ = 0;\n" + "}\n\n"; + ss_fprintf(oss, "%s", str); + } + if (declarations.c_str) { ss_fprintf(oss, "%s", declarations.c_str); diff --git a/src/object.c b/src/object.c index 09384ee..f3c083f 100644 --- a/src/object.c +++ b/src/object.c @@ -1349,7 +1349,7 @@ void object_default_initialization(struct object* p_object, bool is_constant) p_object->value.unsigned_long_long_value = 0; } - if (type_is_union(&p_object->type2)) + if (type_is_union(&p_object->type)) { struct object* _Opt p = p_object->members; if (p) @@ -1479,7 +1479,7 @@ struct object* _Owner _Opt make_object_ptr_core(const struct type* p_type, const if (p_object == NULL) throw; p_object->debug_name = strdup(name); - p_object->type2 = type_dup(p_type); + p_object->type = type_dup(p_type); return p_object; } @@ -1493,7 +1493,7 @@ struct object* _Owner _Opt make_object_ptr_core(const struct type* p_type, const p_object->state = CONSTANT_VALUE_STATE_UNINITIALIZED; assert(p_object->debug_name == NULL); p_object->debug_name = strdup(name); - p_object->type2 = type_dup(p_type); + p_object->type = type_dup(p_type); return p_object; } @@ -1503,7 +1503,7 @@ struct object* _Owner _Opt make_object_ptr_core(const struct type* p_type, const p_object = calloc(1, sizeof * p_object); if (p_object == NULL) throw; - p_object->type2 = type_dup(p_type); + p_object->type = type_dup(p_type); p_object->debug_name = strdup(name); if (p_type->num_of_elements > 0) @@ -1554,7 +1554,7 @@ struct object* _Owner _Opt make_object_ptr_core(const struct type* p_type, const p_object->value_type = type_to_object_type(p_type); p_object->value.signed_long_long_value = -1; p_object->debug_name = strdup(name); - p_object->type2 = type_dup(p_type); + p_object->type = type_dup(p_type); return p_object; } @@ -1574,7 +1574,7 @@ struct object* _Owner _Opt make_object_ptr_core(const struct type* p_type, const throw; p_object->debug_name = strdup(name); - p_object->type2 = type_dup(p_type); + p_object->type = type_dup(p_type); struct object* _Opt p_last_member_obj = NULL; @@ -1819,7 +1819,7 @@ void object_print_to_debug_core(const struct object* object, int n) if (object->members != NULL) { - type_print(&object->type2); + type_print(&object->type); printf(" {\n"); @@ -1838,7 +1838,7 @@ void object_print_to_debug_core(const struct object* object, int n) - type_print(&object->type2); + type_print(&object->type); printf(" = "); diff --git a/src/object.h b/src/object.h index eb958a1..2ade0b1 100644 --- a/src/object.h +++ b/src/object.h @@ -59,7 +59,7 @@ enum object_value_state struct object { enum object_value_state state; enum object_value_type value_type; - struct type type2; //TODO to be removed + struct type type; //TODO to be removed const char* _Opt _Owner debug_name; //TODO we can remove this passing tthe type to print function diff --git a/src/parser.c b/src/parser.c index ea64677..1d05abb 100644 --- a/src/parser.c +++ b/src/parser.c @@ -10510,12 +10510,12 @@ static struct object* _Opt find_first_subobject_old(struct type* p_type_not_used if (p_object->members == NULL) { *sub_object_of_union = false; - *p_type_out = type_dup(&p_object->type2); + *p_type_out = type_dup(&p_object->type); return p_object; //tODO } - *sub_object_of_union = type_is_union(&p_object->type2); - *p_type_out = type_dup(&p_object->members->type2); + *sub_object_of_union = type_is_union(&p_object->type); + *p_type_out = type_dup(&p_object->members->type); return p_object->members; //tODO } @@ -10530,7 +10530,7 @@ static struct object* _Opt find_last_suboject_of_suboject_old(struct type* p_typ if (p_object->members == NULL) { - *p_type_out = type_dup(&p_object->type2); + *p_type_out = type_dup(&p_object->type); return p_object; //tODO } @@ -10544,7 +10544,7 @@ static struct object* _Opt find_last_suboject_of_suboject_old(struct type* p_typ it = it->next; } - *p_type_out = type_dup(&p_object->type2); + *p_type_out = type_dup(&p_object->type); return p_object; } @@ -10568,10 +10568,10 @@ static struct object* find_next_subobject_old(struct type* p_top_object_not_used if (it->members) { - *sub_object_of_union = type_is_union(&it->type2); + *sub_object_of_union = type_is_union(&it->type); it = it->members; - *p_type_out = type_dup(&it->type2); + *p_type_out = type_dup(&it->type); return it; } @@ -10586,7 +10586,7 @@ static struct object* find_next_subobject_old(struct type* p_top_object_not_used if (next != NULL) { if (it->parent) - *sub_object_of_union = type_is_union(&it->parent->type2); + *sub_object_of_union = type_is_union(&it->parent->type); it = next; break; } @@ -10594,7 +10594,7 @@ static struct object* find_next_subobject_old(struct type* p_top_object_not_used it = it->parent; } if (it != NULL) - *p_type_out = type_dup(&it->type2); + *p_type_out = type_dup(&it->type); return it; } @@ -11138,11 +11138,11 @@ static int braced_initializer_new(struct parser_ctx* ctx, { struct type t = { 0 }; is_subobject_of_union = true; - p_subobject = find_last_suboject_of_suboject(&p_subobject->parent->type2, p_subobject->parent, &t); + p_subobject = find_last_suboject_of_suboject(&p_subobject->parent->type, p_subobject->parent, &t); type_swap(&t, &subobject_type); type_destroy(&t); if (p_subobject) - subobject_type = type_dup(&p_subobject->type2); + subobject_type = type_dup(&p_subobject->type); } else if (entire_object_initialized) @@ -11153,7 +11153,7 @@ static int braced_initializer_new(struct parser_ctx* ctx, type_swap(&t, &subobject_type); type_destroy(&t); if (p_subobject) - subobject_type = type_dup(&p_subobject->type2); + subobject_type = type_dup(&p_subobject->type); } } p_initializer_list_item = p_initializer_list_item->next; @@ -11171,7 +11171,7 @@ static int braced_initializer_new(struct parser_ctx* ctx, } if (compute_array_size) { - current_object->type2.num_of_elements = array_to_expand_max_index + 1; + current_object->type.num_of_elements = array_to_expand_max_index + 1; p_current_object_type->num_of_elements = array_to_expand_max_index + 1; } diff --git a/src/version.h b/src/version.h index f600bd1..73690fb 100644 --- a/src/version.h +++ b/src/version.h @@ -5,6 +5,6 @@ #pragma once -#define CAKE_VERSION "0.9.39" +#define CAKE_VERSION "0.9.40" diff --git a/src/visit_il.c b/src/visit_il.c index 4f23c19..8def06b 100644 --- a/src/visit_il.c +++ b/src/visit_il.c @@ -131,7 +131,7 @@ static void d_visit_init_declarator_list(struct d_visit_ctx* ctx, struct osstrea static void d_visit_compound_statement(struct d_visit_ctx* ctx, struct osstream* oss, struct compound_statement* p_compound_statement); static void d_visit_statement(struct d_visit_ctx* ctx, struct osstream* oss, struct statement* p_statement); static void d_visit_unlabeled_statement(struct d_visit_ctx* ctx, struct osstream* oss, struct unlabeled_statement* p_unlabeled_statement); -static void object_print_non_constant_initialization(struct d_visit_ctx* ctx, struct osstream* ss, const struct object* object, const char* declarator_name); +static void object_print_non_constant_initialization(struct d_visit_ctx* ctx, struct osstream* ss, const struct object* object, const char* declarator_name, bool all); static void d_print_type_core(struct d_visit_ctx* ctx, struct osstream* ss, const struct type* p_type0, const char* name_opt); static void d_print_type(struct d_visit_ctx* ctx, @@ -561,34 +561,57 @@ static void d_visit_expression(struct d_visit_ctx* ctx, struct osstream* oss, st char name[100]; snprintf(name, sizeof(name), "__cmp_lt_%d", ctx->locals_count++); - struct osstream local = { 0 }; - print_identation_core(&local, ctx->indentation); - d_print_type(ctx, &local, &p_expression->type, name); - bool first = true; - ss_fprintf(&local, " = {"); - object_print_constant_initialization(ctx, &local, &p_expression->object, &first); - ss_fprintf(&local, "};\n"); - object_print_non_constant_initialization(ctx, &local, &p_expression->object, name); - ss_fprintf(&ctx->add_this_before, "%s", local.c_str); - ss_close(&local); + if (ctx->is_local) + { + struct osstream local = { 0 }; + ss_swap(&ctx->local_declarators, &local); + print_identation_core(&local, ctx->indentation); + d_print_type(ctx, &local, &p_expression->type, name); + ss_fprintf(&local, ";\n", name); + ss_fprintf(&ctx->local_declarators, "%s", local.c_str); - ss_fprintf(oss, "%s", name); + ss_clear(&local); + + //bool first = true; + object_print_non_constant_initialization(ctx, &local, &p_expression->object, name, true); + ss_fprintf(&ctx->add_this_before, "%s", local.c_str); + ss_close(&local); + ss_fprintf(oss, "%s", name); + } + else + { + struct osstream local = { 0 }; + print_identation_core(&local, ctx->indentation); + d_print_type(ctx, &local, &p_expression->type, name); + bool first = true; + ss_fprintf(&local, " = {"); + object_print_constant_initialization(ctx, &local, &p_expression->object, &first); + ss_fprintf(&local, "};\n"); + ss_fprintf(&ctx->add_this_before, "%s", local.c_str); + ss_close(&local); + ss_fprintf(oss, "%s", name); + + } } break; case UNARY_EXPRESSION_SIZEOF_EXPRESSION: - ss_fprintf(oss, "sizeof "); - d_visit_expression(ctx, oss, p_expression->right); + + object_print_value(oss, &p_expression->object); + + //ss_fprintf(oss, "sizeof "); + //d_visit_expression(ctx, oss, p_expression->right); break; case UNARY_EXPRESSION_SIZEOF_TYPE: { - struct osstream local0 = { 0 }; - d_print_type(ctx, &local0, &p_expression->type_name->type, false); - ss_fprintf(oss, "sizeof (%s)", local0.c_str); - ss_close(&local0); + object_print_value(oss, &p_expression->object); + //struct osstream local0 = { 0 }; + //d_print_type(ctx, &local0, &p_expression->type_name->type, false); + //ss_fprintf(oss, "sizeof (%s)", local0.c_str); + //ss_close(&local0); } break; @@ -950,7 +973,17 @@ static void d_visit_iteration_statement(struct d_visit_ctx* ctx, struct osstream ss_fprintf(oss, "{\n"); ctx->indentation++; - d_visit_declaration(ctx, oss, p_iteration_statement->declaration); + struct osstream local_declarators = { 0 }; + ss_swap(&local_declarators, &ctx->local_declarators); + + struct osstream local = { 0 }; + d_visit_declaration(ctx, &local, p_iteration_statement->declaration); + + ss_fprintf(oss, "%s", ctx->local_declarators.c_str); + ss_fprintf(oss, "%s", local.c_str); + + ss_swap(&local_declarators, &ctx->local_declarators); + print_identation(ctx, oss); ss_fprintf(oss, "for ("); @@ -1043,8 +1076,17 @@ static void d_visit_selection_statement(struct d_visit_ctx* ctx, struct osstream ss_fprintf(oss, "{\n"); addclose = true; ctx->indentation++; - d_visit_init_statement(ctx, oss, p_selection_statement->p_init_statement); + struct osstream local_declarators = { 0 }; + ss_swap(&local_declarators, &ctx->local_declarators); + + struct osstream local2 = { 0 }; + d_visit_init_statement(ctx, &local2, p_selection_statement->p_init_statement); + ss_fprintf(oss, "%s", ctx->local_declarators.c_str); + ss_fprintf(oss, "\n"); + ss_fprintf(oss, "%s", local2.c_str); + ss_close(&local2); print_identation(ctx, oss); + ss_swap(&local_declarators, &ctx->local_declarators); } if (p_selection_statement->condition) @@ -1054,7 +1096,17 @@ static void d_visit_selection_statement(struct d_visit_ctx* ctx, struct osstream ss_fprintf(oss, "{\n"); ctx->indentation++; addclose = true; - d_visit_init_declarator(ctx, oss, p_selection_statement->condition->p_init_declarator, false); + struct osstream local_declarators = { 0 }; + ss_swap(&local_declarators, &ctx->local_declarators); + + struct osstream local2 = { 0 }; + d_visit_init_declarator(ctx, &local2, p_selection_statement->condition->p_init_declarator, false); + ss_fprintf(oss, "%s", ctx->local_declarators.c_str); + ss_fprintf(oss, "\n"); + ss_fprintf(oss, "%s", local2.c_str); + ss_close(&local2); + ss_swap(&local_declarators, &ctx->local_declarators); + print_identation(ctx, oss); ss_fprintf(oss, "if ("); ss_fprintf(oss, "%s", p_selection_statement->condition->p_init_declarator->p_declarator->name_opt->lexeme); @@ -1254,10 +1306,19 @@ static void d_visit_block_item_list(struct d_visit_ctx* ctx, struct osstream* os static void d_visit_compound_statement(struct d_visit_ctx* ctx, struct osstream* oss, struct compound_statement* p_compound_statement) { - print_identation(ctx, oss); - ss_fprintf(oss, "{\n"); + bool is_local = ctx->is_local; + ctx->is_local = true; + //ss_clear(&ctx->local_declarators); + + struct osstream local_declarators = { 0 }; + ss_swap(&ctx->local_declarators, &local_declarators); + + struct osstream local = { 0 }; + + + //ss_fprintf(oss, "{\n"); ctx->indentation++; - d_visit_block_item_list(ctx, oss, &p_compound_statement->block_item_list); + d_visit_block_item_list(ctx, &local, &p_compound_statement->block_item_list); bool ends_with_jump = false; @@ -1270,11 +1331,26 @@ static void d_visit_compound_statement(struct d_visit_ctx* ctx, struct osstream* } if (!ends_with_jump) - il_print_defer_list(ctx, oss, &p_compound_statement->defer_list); + il_print_defer_list(ctx, &local, &p_compound_statement->defer_list); ctx->indentation--; + + print_identation(ctx, oss); + ss_fprintf(oss, "{\n"); + + if (ctx->local_declarators.c_str) + { + ss_fprintf(oss, "%s", ctx->local_declarators.c_str); + ss_fprintf(oss, "\n"); + } + + if (local.c_str) + ss_fprintf(oss, "%s", local.c_str); + print_identation(ctx, oss); ss_fprintf(oss, "}\n"); + ctx->is_local = is_local; //restore + ss_swap(&ctx->local_declarators, &local_declarators); } //struct struct_entry @@ -1775,13 +1851,13 @@ static void object_print_constant_initialization(struct d_visit_ctx* ctx, struct if (object->members != NULL) { - if (type_is_union(&object->type2)) + if (type_is_union(&object->type)) { //In c89 only the first member can be initialized //we could make the first member be array of unsigned int //then initialize it struct object* _Opt member = object->members; - object_print_constant_initialization(ctx, ss, member, first); + object_print_constant_initialization(ctx, ss, member, first); } else { @@ -1826,7 +1902,8 @@ static void object_print_constant_initialization(struct d_visit_ctx* ctx, struct static void object_print_non_constant_initialization(struct d_visit_ctx* ctx, struct osstream* ss, const struct object* object, - const char* declarator_name) + const char* declarator_name, + bool all) { if (object_is_reference(object)) @@ -1836,13 +1913,14 @@ static void object_print_non_constant_initialization(struct d_visit_ctx* ctx, if (object->members != NULL) { - if (type_is_union(&object->type2)) + if (type_is_union(&object->type)) { //In c89 only the first member can be initialized struct object* _Opt member = object->members; if (member->p_init_expression && - object_has_constant_value(&member->p_init_expression->object)) + object_has_constant_value(&member->p_init_expression->object) && + !all) { //already initialized } @@ -1865,6 +1943,11 @@ static void object_print_non_constant_initialization(struct d_visit_ctx* ctx, ss_close(&local); break; } + else if (all) + { + print_identation_core(ss, ctx->indentation); + ss_fprintf(ss, "%s%s = 0;\n", declarator_name, member->debug_name); + } member = member->next; } } @@ -1874,7 +1957,7 @@ static void object_print_non_constant_initialization(struct d_visit_ctx* ctx, struct object* _Opt member = object->members; while (member) { - object_print_non_constant_initialization(ctx, ss, member, declarator_name); + object_print_non_constant_initialization(ctx, ss, member, declarator_name, all); member = member->next; } } @@ -1883,11 +1966,24 @@ static void object_print_non_constant_initialization(struct d_visit_ctx* ctx, { if (object->p_init_expression) { - if (object->p_init_expression->expression_type == PRIMARY_EXPRESSION_STRING_LITERAL) + if (!all) { - //skip + if (object->p_init_expression->expression_type == PRIMARY_EXPRESSION_STRING_LITERAL) + { + //skip + } + else if (!object_has_constant_value(&object->p_init_expression->object)) + { + print_identation_core(ss, ctx->indentation); + ss_fprintf(ss, "%s%s = ", declarator_name, object->debug_name); + struct osstream local = { 0 }; + d_visit_expression(ctx, &local, object->p_init_expression); + ss_fprintf(ss, "%s", local.c_str); + ss_fprintf(ss, ";\n"); + ss_close(&local); + } } - else if (!object_has_constant_value(&object->p_init_expression->object)) + else { print_identation_core(ss, ctx->indentation); ss_fprintf(ss, "%s%s = ", declarator_name, object->debug_name); @@ -1898,6 +1994,11 @@ static void object_print_non_constant_initialization(struct d_visit_ctx* ctx, ss_close(&local); } } + else if (all) + { + print_identation_core(ss, ctx->indentation); + ss_fprintf(ss, "%s%s = 0;\n", declarator_name, object->debug_name); + } } } @@ -1915,25 +2016,62 @@ static void d_visit_init_declarator(struct d_visit_ctx* ctx, struct osstream* os } else { - print_identation(ctx, oss); + //print_identation(ctx, oss); if (binline) ss_fprintf(oss, "__inline "); struct osstream ss = { 0 }; - d_print_type(ctx, &ss, - &p_init_declarator->p_declarator->type, - p_init_declarator->p_declarator->name_opt->lexeme); - ss_fprintf(oss, "%s", ss.c_str); + if (ctx->is_local) + { + d_print_type(ctx, &ss, + &p_init_declarator->p_declarator->type, + p_init_declarator->p_declarator->name_opt->lexeme); + + print_identation(ctx, &ctx->local_declarators); + + ss_fprintf(&ctx->local_declarators, "%s;\n", ss.c_str); + ss_clear(&ss); + } + else + { + d_print_type(ctx, &ss, + &p_init_declarator->p_declarator->type, + p_init_declarator->p_declarator->name_opt->lexeme); + + + if (p_init_declarator->initializer == NULL && + p_init_declarator->p_declarator->function_body == NULL) + { + ss_fprintf(oss, "%s;\n", ss.c_str); + } + else + ss_fprintf(oss, "%s", ss.c_str); + } if (p_init_declarator->initializer) { - ss_fprintf(oss, " = "); + bool is_local = p_init_declarator->p_declarator->type.storage_class_specifier_flags & STORAGE_SPECIFIER_AUTOMATIC_STORAGE; + + if (p_init_declarator->initializer->assignment_expression) { - d_visit_expression(ctx, oss, p_init_declarator->initializer->assignment_expression); - ss_fprintf(oss, ";\n"); + if (is_local) + { + //ss_fprintf(oss, ";\n"); + print_identation_core(oss, ctx->indentation); + ss_fprintf(oss, "%s%s = ", p_init_declarator->p_declarator->name_opt->lexeme, ""); + d_visit_expression(ctx, oss, p_init_declarator->initializer->assignment_expression); + ss_fprintf(oss, ";\n"); + } + else + { + print_identation_core(oss, ctx->indentation); + ss_fprintf(oss, "%s%s = ", p_init_declarator->p_declarator->name_opt->lexeme, ""); + d_visit_expression(ctx, oss, p_init_declarator->initializer->assignment_expression); + ss_fprintf(oss, ";\n"); + } } else { @@ -1944,29 +2082,67 @@ static void d_visit_init_declarator(struct d_visit_ctx* ctx, struct osstream* os { if (is_all_zero(&p_init_declarator->p_declarator->object)) { - ss_fprintf(oss, "{0};\n"); + if (is_local) + { + int sz = type_get_sizeof(&p_init_declarator->p_declarator->type); + // ss_fprintf(oss, ";\n"); + print_identation_core(oss, ctx->indentation); + ss_fprintf(oss, "_zmem(&%s, %d);\n", + p_init_declarator->p_declarator->name_opt->lexeme, + sz); + ctx->zero_mem_used = true; + } + else + { + ss_fprintf(oss, " = "); + ss_fprintf(oss, "{0};\n"); + } } else { + bool first = true; - ss_fprintf(oss, "{"); - object_print_constant_initialization(ctx, oss, &p_init_declarator->p_declarator->object, &first); - ss_fprintf(oss, "}"); - ss_fprintf(oss, ";\n"); - object_print_non_constant_initialization(ctx, oss, &p_init_declarator->p_declarator->object, p_init_declarator->p_declarator->name_opt->lexeme); + if (!is_local) + { + ss_fprintf(oss, " = "); + ss_fprintf(oss, "{"); + object_print_constant_initialization(ctx, oss, &p_init_declarator->p_declarator->object, &first); + ss_fprintf(oss, "}"); + ss_fprintf(oss, ";\n"); + } + else + { + //ss_fprintf(oss, ";\n"); + object_print_non_constant_initialization(ctx, oss, &p_init_declarator->p_declarator->object, p_init_declarator->p_declarator->name_opt->lexeme, true); + } } } else { - ss_fprintf(oss, "{0};\n"); + if (is_local) + { + int sz = type_get_sizeof(&p_init_declarator->p_declarator->type); + //ss_fprintf(oss, ";\n"); + print_identation_core(oss, ctx->indentation); + ss_fprintf(oss, "_zmem(&%s, %d);\n", + p_init_declarator->p_declarator->name_opt->lexeme, + sz); + ctx->zero_mem_used = true; + } + else + { + ss_fprintf(oss, " = "); + ss_fprintf(oss, "{0};\n"); + } + //ss_fprintf(oss, "{0};\n"); } } } } else { - if (p_init_declarator->p_declarator->function_body == NULL) - ss_fprintf(oss, ";\n"); + //if (p_init_declarator->p_declarator->function_body == NULL) + // ss_fprintf(oss, ";\n"); } if (p_init_declarator->p_declarator->function_body) @@ -2184,6 +2360,17 @@ void d_visit(struct d_visit_ctx* ctx, struct osstream* oss) } ss_fprintf(oss, "\n"); + if (ctx->zero_mem_used) + { + const char* str = + "static void _zmem(void *dest, register unsigned int len)\n" + "{\n" + " register unsigned char *ptr = (unsigned char*)dest;\n" + " while (len-- > 0) *ptr++ = 0;\n" + "}\n\n"; + ss_fprintf(oss, "%s", str); + } + if (declarations.c_str) { ss_fprintf(oss, "%s", declarations.c_str); diff --git a/src/visit_il.h b/src/visit_il.h index 6acba78..45df8b2 100644 --- a/src/visit_il.h +++ b/src/visit_il.h @@ -22,11 +22,13 @@ struct d_visit_ctx struct hash_map structs_map; struct hash_map function_map; + struct osstream local_declarators; struct osstream add_this_before; struct osstream add_this_before_external_decl; - + bool is_local; struct osstream data_types; struct osstream function_types; + bool zero_mem_used; _View struct ast ast; }; diff --git a/src/web/cake.js b/src/web/cake.js index 1cf2c1a..6deb78b 100644 --- a/src/web/cake.js +++ b/src/web/cake.js @@ -399,9 +399,9 @@ function Table(ret) { } } function initActiveSegments(imports) { - base64DecodeToExistingUint8Array(bufferView, 65536, "4pSYAOKUkAAlLTE4c+KUggAlLTI1c+KUggAlLTIwc+KUggDilIIlLTJk4pSCAOKUlOKUgOKUgOKUtOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUtOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgOKUgADilIzilIDilIDilKzilIDilIDilIDilIDilIDilIDilIDilIDilIDilIDilIDilIDilIDilIDilIDilIDilIDilIDilKzilIDilIDilIDilIDilIDilIDilIDilIDilIDilIDilIDilIDilIDilIDilIDilIDilIDilIDilIDilIDilIDilIDilIDilIDilIAAIH4Aey4uLn0Abm90IGZvbGxvd2luZyBjb3JyZWN0IGNsb3NlIGJyYWNlIHN0eWxlIH0AICUqcyB8ACAlcyB8AG5vdCBmb2xsb3dpbmcgY29ycmVjdCBicmFjZSBzdHlsZSB7ACA9IHsAdG9rZW5fbGlzdF9pc19lbXB0eQBwb2ludGVkIG9iamVjdCBtYXkgYmUgbm90IGVtcHR5AG9iamVjdCAnJXMnIG1heSBub3QgYmUgZW1wdHkAaW5maW5pdHkAc2FmZXR5AHRyeQBfSW1hZ2luYXJ5AGRlZmVyX3Zpc2l0X2N0eF9kZXN0cm95AGhhc2htYXBfZGVzdHJveQBzd2l0Y2hfdmFsdWVfZGVzdHJveQBhbnkAX2lzX2FycmF5AG51bGwtYXMtYXJyYXkAIHBhc3NpbmcgbnVsbCBhcyBhcnJheQB1c2luZyBpbmRpcmVjdGlvbiAnLT4nIGluIGFycmF5AGFyZ3VtZW50IG9mIF9MZW5ndGhvZiBtdXN0IGJlIGFuIGFycmF5AGluZGV4ICVk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29sdW1uIjogJWQKABtbOTdtY2FrZSAlcyBtYWluLmMKACBbJXNdCgAgICAgICAgICBdCgAgICAgICAibG9jYXRpb25zIjogWwoAICAgICAgICAgImxvZ2ljYWxMb2NhdGlvbnMiOiBbCgB7MH07CgBnb3RvICVzOwoAcmV0dXJuICVzOwoAYnJlYWs7CgBjb250aW51ZTsKAGdvdG8gX2NhdGNoX2xhYmVsXyVkOwoAKTsKAGRlZmF1bHQ6CgAlczoKAGVsc2UgX2NhdGNoX2xhYmVsXyVkOgoAIDoKACAgICAgICAgICAgICAgfSwKACAgICAgICAgICAgICAgICAgICJzdGFydENvbHVtbiI6ICVkLAoAICAgICAgICAgICAgICAgICAgInN0YXJ0TGluZSI6ICVkLAoAICAgICAgICAgICAgICAgICAgImVuZExpbmUiOiAlZCwKACAgICAgInJ1bGVJZCI6IiVzIiwKACAgICAgICAgICAgICAgImRlY29yYXRlZE5hbWUiOiAiJXMiLAoAICAgICAgICAgICAgICAiZnVsbHlRdWFsaWZpZWROYW1lIjogIiVzIiwKACAgICAgImxldmVsIjoiZXJyb3IiLAoAICAgICAibGV2ZWwiOiJ3YXJuaW5nIiwKACAgICAgImxldmVsIjoibm90ZSIsCgAgICAsCgBpZiAoMSkKACAgICAgICAgICAgICAgICAgInVyaSI6ICJmaWxlOi8vLyVzIgoAICAgICAgICAgICAgInRleHQiOiAiJXMiCgAgICAgICAgICAgICAgICJraW5kIjogIiVzIgoAI2RlZmluZSBfX1RJTUVfXyAiJTAyZDolMDJkOiUwMmQiCgAjZGVmaW5lIF9fREFURV9fICIlcyAlMmQgJWQiCgBleHBlY3RlZCBFT0YgCgB9OwoKACNkZWZpbmUgX19DQUtFX18gMjAyMzExTAojZGVmaW5lIF9fU1REQ19WRVJTSU9OX18gMjAyMzExTAojZGVmaW5lIF9fRklMRV9fICJfX0ZJTEVfXyIKI2RlZmluZSBfX0xJTkVfXyAwCiNkZWZpbmUgX19DT1VOVEVSX18gMAojZGVmaW5lIF9DT05TT0xFCi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lnbl9sZDsKfSBtYXhfYWxpZ25fdDsKCnR5cGVkZWYgdHlwZW9mKG51bGxwdHIpIG51bGxwdHJfdDsKCgAAAAAALyoKICogIFRoaXMgZmlsZSBpcyBwYXJ0IG9mIGNha2UgY29tcGlsZXIKICogIGh0dHBzOi8vZ2l0aHViLmNvbS90aHJhZGFtcy9jYWtlCiovCgojcHJhZ21hIG9uY2UKCmRvdWJsZSBhY29zKGRvdWJsZSBfX3gpOwpkb3VibGUgYXNpbihkb3VibGUgX194KTsKZG91YmxlIGF0YW4oZG91YmxlIF9feCk7CmRvdWJsZSBhdGFuMihkb3VibGUgX195LCBkb3VibGUgX194KTsKZG91YmxlIGNvcyhkb3VibGUgX194KTsKZG91YmxlIHNpbihkb3VibGUgX194KTsKZG91YmxlIHRhbihkb3VibGUgX194KTsKZG91YmxlIGNvc2goZG91YmxlIF9feCk7CmRvdWJsZSBzaW5oKGRvdWJsZSBfX3gpOwpkb3VibGUgdGFuaChkb3VibGUgX194KTsKZG91YmxlIGFjb3NoKGRvdWJsZSBfX3gpOwpkb3VibGUgYXNpbmgoZG91YmxlIF9feCk7CmRvdWJsZSBhdGFuaChkb3VibGUgX194KTsKZG91YmxlIGV4cChkb3VibGUgX194KTsKZG91YmxlIGZyZXhwKGRvdWJsZSBfX3gsIGludCogX19leHBvbmVudCk7CmRvdWJsZSBsZGV4cChkb3VibGUgX194LCBpbnQgX19leHBvbmVudCk7CmRvdWJsZSBsb2coZG91YmxlIF9feCk7CmRvdWJsZSBsb2cxMChkb3VibGUgX194KTsKZG91YmxlIG1vZGYoZG91YmxlIF9feCwgZG91YmxlKiBfX2lwdHIpOwpkb3VibGUgZXhwbTEoZG91YmxlIF9feCk7CmRvdWJsZSBsb2cxcChkb3VibGUgX194KTsKZG91YmxlIGxvZ2IoZG91YmxlIF9feCk7CmRvdWJsZSBleHAyKGRvdWJsZSBfX3gpOwpkb3VibGUgbG9nMihkb3VibGUgX194KTsKZG91YmxlIHBvdyhkb3VibGUgX194L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gpOwpsb25nIGRvdWJsZSB0cnVuY2wobG9uZyBkb3VibGUgX194KTsKbG9uZyBkb3VibGUgcmVtcXVvbChsb25nIGRvdWJsZSBfX3gsIGxvbmcgZG91YmxlIF9feSwgaW50KiBfX3F1byk7CmxvbmcgaW50IGxyaW50bChsb25nIGRvdWJsZSBfX3gpOwpsb25nIGxvbmcgaW50IGxscm91bmRsKGxvbmcgZG91YmxlIF9feCk7CmxvbmcgZG91YmxlIGZkaW1sKGxvbmcgZG91YmxlIF9feCwgbG9uZyBkb3VibGUgX195KTsKbG9uZyBkb3VibGUgZm1heGwobG9uZyBkb3VibGUgX194LCBsb25nIGRvdWJsZSBfX3kpOwpsb25nIGRvdWJsZSBmbWlubChsb25nIGRvdWJsZSBfX3gsIGxvbmcgZG91YmxlIF9feSk7CmxvbmcgZG91YmxlIGZtYWwobG9uZyBkb3VibGUgX194LCBsb25nIGRvdWJsZSBfX3ksIGxvbmcgZG91YmxlIF9feik7CmxvbmcgZG91YmxlIHNjYWxibChsb25nIGRvdWJsZSBfX3gsIGxvbmcgZG91YmxlIF9fbik7CgAALyoKICogIFRoaXMgZmlsZSBpcyBwYXJ0IG9mIGNha2UgY29tcGlsZXIKICogIGh0dHBzOi8vZ2l0aHViLmNvbS90aHJhZGFtcy9jYWtlCiovCgojcHJhZ21hIG9uY2UKCmludCogX2Vycm5vKHZvaWQpOwojZGVmaW5lIGVycm5vICgqX2Vycm5vKCkpCgoKI2RlZmluZSBFUEVSTSAgICAgICAgICAgMQojZGVmaW5lIEVOT0VOVCAgICAgICAgICAyCiNkZWZpbmUgRVNSQ0ggICAgICAgICAgIDMKI2RlZmluZSBFSU5UUiAgICAgICAgICAgNAojZGVmaW5lIEVJTyAgICAgICAgICAgICA1CiNkZWZpbmUgRU5YSU8gICAgICAgICAgIDYKI2RlZmluZSBFMkJJRyAgICAgICAgICAgNwojZGVmaW5lIEVOT0VYRUMgICAgICAgICA4CiNkZWZpbmUgRUJBREYgICAgICAgICAgIDkKI2RlZmluZSBFQ0hJTEQgICAgICAgICAgMTAKI2RlZmluZSBFQUdBSU4gICAgICAgICAgMTEKI2RlZmluZSBFTk9NRU0gICAgICAgICAgMTIKI2RlZmluZSBFQUNDRVMgICAgICAgICAgMTMKI2RlZmluZSBFRkFVTFQgICAgICAgICAgMTQKI2RlZmluZSBFQlVTWSAgICAgICAgICAgMTYKI2RlZmluZSBFRVhJU1QgICAgICAgICAgMTcKI2RlZmluZSBFWERFViAgICAgICAgICAgMTgKI2RlZmluZSBFTk9ERVYgICAgICAgICAgMTkKI2RlZmluZSBFTk9URElSICAgICAgICAgMjAKI2RlZmluZSBFSVNESVIgICAgICAgICAgMjEKI2RlZmluZSBFTkZJTEUgICAgICAgICAgMjMKI2RlZmluZSBFTUZJTEUgICAgICAgICAgMjQKI2RlZmluZSBFTk9UVFkgICAgICAgICAgMjUKI2RlZmluZSBFRkJJRyAgICAgICAgICAgMjcKI2RlZmluZSBFTk9TUEMgICAgICAgICAgMjgKI2RlZmluZSBFU1BJUEUgICAgICAgICAgMjkKI2RlZmluZSBFUk9GUyAgICAgICAgICAgMzAKI2RlZmluZSBFTUxJTksgICAgICAgICAgMzEKI2RlZmluZSBFUElQRSAgICAgICAgICAgMzIKI2RlZmluZSBFRE9NICAgICAgICAgICAgMzMKI2RlZmluZSBFREVBRExLICAgICAgICAgMzYKI2RlZmluZSBFTkFNRVRPT0xPTkcgICAgMzgKI2RlZmluZSBFTk9MQ0sgICAgICAgICAgMzkKI2RlZmluZSBFTk9TWVMgICAgICAgICAgNDAKI2RlZmluZSBFTk9URU1QVFkgICAgICAgNDEKCgovLyBTdXBwb3J0IEVERUFETE9DSyBmb3IgY29tcGF0aWJpbGl0eSB3aXRoIG9sZGVyIE1pY3Jvc29mdCBDIHZlcnNpb25zCiNkZWZpbmUgRURFQURMT0NLICAgICAgIEVERUFETEsKCiNkZWZpbmUgRUFERFJJTlVTRSAgICAgIDEwMAojZGVmaW5lIEVBRERSTk9UQVZBSUwgICAxMDEKI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AkUAAAAAAAUAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABYAAAAAAAAAAAAAABUAAAAAFQAAAAAJFgAAAAAAFgAAFgAAMDEyMzQ1Njc4OUFCQ0RFRg=="); - base64DecodeToExistingUint8Array(bufferView, 116768, "SmFuAEZlYgBNYXIAQXByAE1heQBKdW4ASnVsAEF1ZwBTZXAAT2N0AE5vdgBEZWMAAAAAAAAAAADd+///+v//fwAAAAAAAAAAAAAAAAAAAAABAAAAyykBAAIAAABgLAEAAwAAAHobAQAEAAAAugoBAAUAAACPEgEABgAAALAPAQAHAAAAfhIBAAgAAAAwDQEACQAAALwiAQAKAAAAFCkBAAsAAACmBQEADAAAACUhAQAsAAAAcx8BAC0AAAArHQEADgAAAIMLAQAQAAAAWisBABEAAAB6FgEAJAAAACYXAQAlAAAArSIBAC4AAAAjBQEADQAAAAohAQAPAAAAYyUBABQAAADyFAEAFQAAAOQTAQAWAAAA7hMBABcAAABGIgEAGAAAAC4iAQAZAAAAOBQBABoAAABGIgEAIwAAACEXAQAbAAAA5xwBABwAAAAzDwEAHwAAACYJAQAdAAAAKisBACAAAAAtKgEAIQAAABEgAQAeAAAAiS0BACIAAACyKQEAEgAAAMUhAQAmAAAAdAIBACcAAADOGwEAKAAAANAWAQATAAAAGhgBACkAAABUDgEAKgAAADkFAQArAAAA3AcBAC8AAAA3CAEAMAAAAIobAQAxAAAABx4BADIAAAB2AwEAMwAAACMiAQA0AAAAzAcBADUAAABWDQEAAQAAAAAAAAAFAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAwAAANjLAQAABAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAA/////woAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgygEA8NEBAA=="); - base64DecodeToExistingUint8Array(bufferView, 117440, "AAAAAAAAAAAAAAAAAAAAAAAAA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IGZhaWxlZCAlcwoAZXJyb3I6ICVzCgB3YXJuaW5nOiAlcwoAbm90ZTogJXMKAGRvCgB0b28gbWFueSBhcmd1bWVudHMgcHJvdmlkZWQgdG8gZnVuY3Rpb24tbGlrZSBtYWNybyBpbnZvY2F0aW9uCgB0b28gZmV3IGFyZ3VtZW50cyBwcm92aWRlZCB0byBmdW5jdGlvbi1saWtlIG1hY3JvIGludm9jYXRpb24KABtbOTdtQ2FrZSAwLjkuNDAbWzBtCgBlbHNlCgAgICAgICAgICAgICAgICAgICAiZW5kQ29sdW1uIjogJWQKABtbOTdtY2FrZSAlcyBtYWluLmMKACBbJXNdCgAgICAgICAgICBdCgAgICAgICAibG9jYXRpb25zIjogWwoAICAgICAgICAgImxvZ2ljYWxMb2NhdGlvbnMiOiBbCgB7MH07CgBnb3RvICVzOwoAcmV0dXJuICVzOwoAYnJlYWs7CgBjb250aW51ZTsKAGdvdG8gX2NhdGNoX2xhYmVsXyVkOwoAJXMlcyA9IDA7CgBfem1lbSgmJXMsICVkKTsKAGRlZmF1bHQ6CgAlczoKAGVsc2UgX2NhdGNoX2xhYmVsXyVkOgoAIDoKACAgICAgICAgICAgICAgfSwKACAgICAgICAgICAgICAgICAgICJzdGFydENvbHVtbiI6ICVkLAoAICAgICAgICAgICAgICAgICAgInN0YXJ0TGluZSI6ICVkLAoAICAgICAgICAgICAgICAgICAgImVuZExpbmUiOiAlZCwKACAgICAgInJ1bGVJZCI6IiVzIiwKACAgICAgICAgICAgICAgImRlY29yYXRlZE5hbWUiOiAiJXMiLAoAICAgICAgICAgICAgICAiZnVsbHlRdWFsaWZpZWROYW1lIjogIiVzIiwKACAgICAgImxldmVsIjoiZXJyb3IiLAoAICAgICAibGV2ZWwiOiJ3YXJuaW5nIiwKACAgICAgImxldmVsIjoibm90ZSIsCgAgICAsCgBpZiAoMSkKACAgICAgICAgICAgICAgICAgInVyaSI6ICJmaWxlOi8vLyVzIgoAICAgICAgICAgICAgInRleHQiOiAiJXMiCgAgIC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dWJsZSBqMShkb3VibGUpOwpkb3VibGUgam4oaW50LCBkb3VibGUpOwpkb3VibGUgeTAoZG91YmxlKTsKZG91YmxlIHkxKGRvdWJsZSk7CmRvdWJsZSB5bihpbnQsIGRvdWJsZSk7CmRvdWJsZSBlcmYoZG91YmxlKTsKZG91YmxlIGVyZmMoZG91YmxlKTsKZG91YmxlIGxnYW1tYShkb3VibGUpOwpkb3VibGUgdGdhbW1hKGRvdWJsZSk7CmRvdWJsZSBnYW1tYShkb3VibGUpOwpkb3VibGUgbGdhbW1hX3IoZG91YmxlLCBpbnQqIF9fc2lnbmdhbXApOwpkb3VibGUgcmludChkb3VibGUgX194KTsKZG91YmxlIG5leHRhZnRlcihkb3VibGUgX194LCBkb3VibGUgX195KTsKZG91YmxlIG5leHR0b3dhcmQoZG91YmxlIF9feCwgbG9uZyBkb3VibGUgX195KTsKZG91YmxlIHJlbWFpbmRlcihkb3VibGUgX194LCBkb3VibGUgX195KTsKZG91YmxlIHNjYWxibihkb3VibGUgX194LCBpbnQgX19uKTsKaW50IGlsb2diKGRvdWJsZSBfX3gpOwpkb3VibGUgc2NhbGJsbihkb3VibGUgX194LCBsb25nIGludCBfX24pOwpkb3VibGUgbmVhcmJ5aW50KGRvdWJsZSBfX3gpOwpkb3VibGUgcm91bmQoZG91YmxlIF9feCk7CmRvdWJsZSB0cnVuYyhkb3VibGUgX194KTsKZG91YmxlIHJlbXF1byhkb3VibGUgX194LCBkb3VibGUgX195LCBpbnQqIF9fcXVvKTsKbG9uZyBpbnQgbHJpbnQoZG91YmxlIF9feCk7CmxvbmcgbG9uZyBpbnQgbGxyb3VuZChkb3VibGUgX194KTsKZG91YmxlIGZkaW0oZG91YmxlIF9feCwgZG91YmxlIF9feSk7CmRvdWJsZSBmbWF4KGRvdWJsZSBfX3gsIGRvdWJsZSBfX3kpOwpkb3VibGUgZm1pbihkb3VibGUgX194LCBkb3VibGUgX195KTsKZG91YmxlIGZtYShkb3VibGUgX194LCBkb3VibGUgX195LC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kb3VibGUgX194KTsKbG9uZyBkb3VibGUgYXNpbmhsKGxvbmcgZG91YmxlIF9feCk7CmxvbmcgZG91YmxlIGF0YW5obChsb25nIGRvdWJsZSBfX3gpOwpsb25nIGRvdWJsZSBleHBsKGxvbmcgZG91YmxlIF9feCk7CmxvbmcgZG91YmxlIGZyZXhwbChsb25nIGRvdWJsZSBfX3gsIGludCogX19leHBvbmVudCk7CmxvbmcgZG91YmxlIGxkZXhwbChsb25nIGRvdWJsZSBfX3gsIGludCBfX2V4cG9uZW50KTsKbG9uZyBkb3VibGUgbG9nbChsb25nIGRvdWJsZSBfX3gpOwpsb25nIGRvdWJsZSBsb2cxMGwobG9uZyBkb3VibGUgX194KTsKbG9uZyBkb3VibGUgbW9kZmwobG9uZyBkb3VibGUgX194LCBsb25nIGRvdWJsZSogX19pcHRyKTsKbG9uZyBkb3VibGUgZXhwbTFsKGxvbmcgZG91YmxlIF9feCk7CmxvbmcgZG91YmxlIGxvZzFwbChsb25nIGRvdWJsZSBfX3gpOwpsb25nIGRvdWJsZSBsb2dibChsb25nIGRvdWJsZSBfX3gpOwpsb25nIGRvdWJsZSBleHAybChsb25nIGRvdWJsZSBfX3gpOwpsb25nIGRvdWJsZSBsb2cybChsb25nIGRvdWJsZSBfX3gpOwpsb25nIGRvdWJsZSBwb3dsKGxvbmcgZG91YmxlIF9feCwgbG9uZyBkb3VibGUgX195KTsKbG9uZyBkb3VibGUgc3FydGwobG9uZyBkb3VibGUgX194KTsKbG9uZyBkb3VibGUgaHlwb3RsKGxvbmcgZG91YmxlIF9feCwgbG9uZyBkb3VibGUgX195KTsKbG9uZyBkb3VibGUgY2JydGwobG9uZyBkb3VibGUgX194KTsKbG9uZyBkb3VibGUgY2VpbGwobG9uZyBkb3VibGUgX194KTsKbG9uZyBkb3VibGUgZmFic2wobG9uZyBkb3VibGUgX194KTsKbG9uZyBkb3VibGUgZmxvb3JsKGxvbmcgZG91YmxlIF9feCk7CmxvbmcgZG91YmxlIGZtb2RsKG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bG9uZyBkb3VibGUgbmV4dHRvd2FyZGwobG9uZyBkb3VibGUgX194LCBsb25nIGRvdWJsZSBfX3kpOwpsb25nIGRvdWJsZSByZW1haW5kZXJsKGxvbmcgZG91YmxlIF9feCwgbG9uZyBkb3VibGUgX195KTsKbG9uZyBkb3VibGUgc2NhbGJubChsb25nIGRvdWJsZSBfX3gsIGludCBfX24pOwppbnQgaWxvZ2JsKGxvbmcgZG91YmxlIF9feCk7CmxvbmcgZG91YmxlIHNjYWxibG5sKGxvbmcgZG91YmxlIF9feCwgbG9uZyBpbnQgX19uKTsKbG9uZyBkb3VibGUgbmVhcmJ5aW50bChsb25nIGRvdWJsZSBfX3gpOwpsb25nIGRvdWJsZSByb3VuZGwobG9uZyBkb3VibGUgX194KTsKbG9uZyBkb3VibGUgdHJ1bmNsKGxvbmcgZG91YmxlIF9feCk7CmxvbmcgZG91YmxlIHJlbXF1b2wobG9uZyBkb3VibGUgX194LCBsb25nIGRvdWJsZSBfX3ksIGludCogX19xdW8pOwpsb25nIGludCBscmludGwobG9uZyBkb3VibGUgX194KTsKbG9uZyBsb25nIGludCBsbHJvdW5kbChsb25nIGRvdWJsZSBfX3gpOwpsb25nIGRvdWJsZSBmZGltbChsb25nIGRvdWJsZSBfX3gsIGxvbmcgZG91YmxlIF9feSk7CmxvbmcgZG91YmxlIGZtYXhsKGxvbmcgZG91YmxlIF9feCwgbG9uZyBkb3VibGUgX195KTsKbG9uZyBkb3VibGUgZm1pbmwobG9uZyBkb3VibGUgX194LCBsb25nIGRvdWJsZSBfX3kpOwpsb25nIGRvdWJsZSBmbWFsKGxvbmcgZG91YmxlIF9feCwgbG9uZyBkb3VibGUgX195LCBsb25nIGRvdWJsZSBfX3opOwpsb25nIGRvdWJsZSBzY2FsYmwobG9uZyBkb3VibGUgX194LCBsb25nIGRvdWJsZSBfX24pOwoAAC8qCiAqICBUaGlzIGZpbGUgaXMgcGFydCBvZiBjYWtlIGNvbXBpbGVyCiAqICBodHRwczovL2dpdGh1Yi5jb20vdGhyYWRhbXMvY2FrZQoqLwoKI3ByYWdtYSBvbmNlCgppbnQqIF9lcnJubyh2b2lkKTsKI2RlZmluZSBlcnJubyAoKl9lcnJubygpKQoKCiNkZWZpbmUgRVBFUk0gICAgICAgICAgIDEKI2RlZmluZSBFTk9FTlQgICAgICAgICAgMgojZGVmaW5lIEVTUkNIICAgICAgICAgICAzCiNkZWZpbmUgRUlOVFIgICAgICAgICAgIDQKI2RlZmluZSBFSU8gICAgICAgICAgICAgNQojZGVmaW5lIEVOWElPICAgICAgICAgICA2CiNkZWZpbmUgRTJCSUcgICAgICAgICAgIDcKI2RlZmluZSBFTk9FWEVDICAgICAgICAgOAojZGVmaW5lIEVCQURGICAgICAgICAgICA5CiNkZWZpbmUgRUNISUxEICAgICAgICAgIDEwCiNkZWZpbmUgRUFHQUlOICAgICAgICAgIDExCiNkZWZpbmUgRU5PTUVNICAgICAgICAgIDEyCiNkZWZpbmUgRUFDQ0VTICAgICAgICAgIDEzCiNkZWZpbmUgRUZBVUxUICAgICAgICAgIDE0CiNkZWZpbmUgRUJVU1kgICAgICAgICAgIDE2CiNkZWZpbmUgRUVYSVNUICAgICAgICAgIDE3CiNkZWZpbmUgRVhERVYgICAgICAgICAgIDE4CiNkZWZpbmUgRU5PREVWICAgICAgICAgIDE5CiNkZWZpbmUgRU5PVERJUiAgICAgICAgIDIwCiNkZWZpbmUgRUlTRElSICAgICAgICAgIDIxCiNkZWZpbmUgRU5GSUxFICAgICAgICAgIDIzCiNkZWZpbmUgRU1GSUxFICAgICAgICAgIDI0CiNkZWZpbmUgRU5PVFRZICAgICAgICAgIDI1CiNkZWZpbmUgRUZCSUcgICAgICAgICAgIDI3CiNkZWZpbmUgRU5PU1BDICAgICAgICAgIDI4CiNkZWZpbmUgRVNQSVBFICAgICAgICAgIDI5CiNkZWZpbmUgRVJPRlMgICAgICAgICAgIDMwCiNkZWZpbmUgRU1MSU5LICAgICAgICAgIDMxCiNkZWZpbmUgRVBJUEUgIC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[($4_1 + 44 | 0) >> 2] | 0) >> 2] | 0; @@ -774,7 +774,7 @@ function asmFunc(imports) { if (!((HEAPU8[($4_1 + 23 | 0) >> 0] | 0) & 1 | 0)) { break label$5 } - $11($4_1 + 24 | 0 | 0, 87464 | 0, 0 | 0) | 0; + $11($4_1 + 24 | 0 | 0, 87449 | 0, 0 | 0) | 0; } HEAP32[($4_1 + 12 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 16 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; label$6 : { @@ -788,7 +788,7 @@ 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 } - $11($4_1 + 24 | 0 | 0, 87043 | 0, 0 | 0) | 0; + $11($4_1 + 24 | 0 | 0, 87036 | 0, 0 | 0) | 0; break label$8; } $69_1 = 24; @@ -813,7 +813,7 @@ function asmFunc(imports) { if (!((HEAPU8[($4_1 + 43 | 0) >> 0] | 0) & 1 | 0)) { break label$11 } - $11($4_1 + 24 | 0 | 0, 87044 | 0, 0 | 0) | 0; + $11($4_1 + 24 | 0 | 0, 87037 | 0, 0 | 0) | 0; } HEAP32[($4_1 + 8 | 0) >> 2] = HEAP32[($4_1 + 24 | 0) >> 2] | 0; HEAP32[($4_1 + 24 | 0) >> 2] = 0; @@ -934,7 +934,7 @@ function asmFunc(imports) { $27_1 = HEAP32[($8_1 + 132 | 0) >> 2] | 0; break label$1; } - $27_1 = 88909; + $27_1 = 89067; } HEAP32[$18_1 >> 2] = $27_1; HEAP32[($8_1 + 96 | 0) >> 2] = 0; @@ -1352,7 +1352,7 @@ function asmFunc(imports) { $19($8_1 + 100 | 0 | 0); } $70_1 = 0; - HEAP16[($8_1 + 22 | 0) >> 1] = HEAPU8[($70_1 + 88908 | 0) >> 0] | 0 | ((HEAPU8[($70_1 + 88909 | 0) >> 0] | 0) << 8 | 0) | 0; + HEAP16[($8_1 + 22 | 0) >> 1] = HEAPU8[($70_1 + 89066 | 0) >> 0] | 0 | ((HEAPU8[($70_1 + 89067 | 0) >> 0] | 0) << 8 | 0) | 0; HEAP32[($8_1 + 16 | 0) >> 2] = $15($8_1 + 22 | 0 | 0, ($8_1 + 22 | 0) + 1 | 0 | 0, 10 | 0) | 0; label$44 : { if (!((HEAP32[($8_1 + 16 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { @@ -2206,11 +2206,11 @@ function asmFunc(imports) { break label$2 } HEAP32[$6_1 >> 2] = $6_1 + 32 | 0; - $917(87771 | 0, $6_1 | 0) | 0; + $917(87756 | 0, $6_1 | 0) | 0; break label$1; } HEAP32[($6_1 + 16 | 0) >> 2] = $6_1 + 32 | 0; - $917(87639 | 0, $6_1 + 16 | 0 | 0) | 0; + $917(87624 | 0, $6_1 + 16 | 0 | 0) | 0; } global$0 = $6_1 + 256 | 0; return; @@ -2240,11 +2240,11 @@ function asmFunc(imports) { break label$2 } HEAP32[$6_1 >> 2] = $6_1 + 32 | 0; - $917(87760 | 0, $6_1 | 0) | 0; + $917(87745 | 0, $6_1 | 0) | 0; break label$1; } HEAP32[($6_1 + 16 | 0) >> 2] = $6_1 + 32 | 0; - $917(87618 | 0, $6_1 + 16 | 0 | 0) | 0; + $917(87603 | 0, $6_1 + 16 | 0 | 0) | 0; } global$0 = $6_1 + 256 | 0; return; @@ -2964,7 +2964,7 @@ function asmFunc(imports) { break label$1 } } - fimport$0(86151 | 0, 77943 | 0, 1749 | 0, 65977 | 0); + fimport$0(86144 | 0, 77943 | 0, 1749 | 0, 65977 | 0); wasm2js_trap(); } $47_1 = (HEAP32[(HEAP32[($3_1 + 12 | 0) >> 2] | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0; @@ -4047,7 +4047,7 @@ function asmFunc(imports) { 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; - $917(87376 | 0, $6_1 | 0) | 0; + $917(87361 | 0, $6_1 | 0) | 0; break label$1; } label$5 : { @@ -4064,7 +4064,7 @@ function asmFunc(imports) { 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; - $917(87360 | 0, $6_1 + 16 | 0 | 0) | 0; + $917(87345 | 0, $6_1 + 16 | 0 | 0) | 0; } global$0 = $6_1 + 48 | 0; return; @@ -4236,7 +4236,7 @@ function asmFunc(imports) { break label$28 } $211_1 = 24; - $923(((HEAPU8[(HEAP32[($4_1 + 68 | 0) >> 2] | 0) >> 0] | 0) << $211_1 | 0) >> $211_1 | 0 | 0, HEAP32[(0 + 116200 | 0) >> 2] | 0 | 0) | 0; + $923(((HEAPU8[(HEAP32[($4_1 + 68 | 0) >> 2] | 0) >> 0] | 0) << $211_1 | 0) >> $211_1 | 0 | 0, HEAP32[(0 + 116360 | 0) >> 2] | 0 | 0) | 0; HEAP32[($4_1 + 68 | 0) >> 2] = (HEAP32[($4_1 + 68 | 0) >> 2] | 0) + 1 | 0; continue label$29; }; @@ -4268,10 +4268,10 @@ function asmFunc(imports) { if (!((HEAP32[($4_1 + 72 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$33 } - $917(88908 | 0, 0 | 0) | 0; + $917(89066 | 0, 0 | 0) | 0; } $248_1 = HEAP32[($4_1 + 92 | 0) >> 2] | 0; - HEAP32[($4_1 + 4 | 0) >> 2] = 87464; + HEAP32[($4_1 + 4 | 0) >> 2] = 87449; HEAP32[$4_1 >> 2] = $248_1; $917(65923 | 0, $4_1 | 0) | 0; HEAP8[($4_1 + 67 | 0) >> 0] = 0; @@ -4317,11 +4317,11 @@ function asmFunc(imports) { if (!((HEAPU8[($4_1 + 55 | 0) >> 0] | 0) & 1 | 0)) { break label$43 } - $923(126 | 0, HEAP32[(0 + 116200 | 0) >> 2] | 0 | 0) | 0; + $923(126 | 0, HEAP32[(0 + 116360 | 0) >> 2] | 0 | 0) | 0; HEAP32[($4_1 + 56 | 0) >> 2] = (HEAP32[($4_1 + 56 | 0) >> 2] | 0) + 1 | 0; break label$42; } - $923(32 | 0, HEAP32[(0 + 116200 | 0) >> 2] | 0 | 0) | 0; + $923(32 | 0, HEAP32[(0 + 116360 | 0) >> 2] | 0 | 0) | 0; label$44 : { if ((HEAPU8[($4_1 + 67 | 0) >> 0] | 0) & 1 | 0) { break label$44 @@ -4363,7 +4363,7 @@ function asmFunc(imports) { } $917(72903 | 0, 0 | 0) | 0; } - $917(88908 | 0, 0 | 0) | 0; + $917(89066 | 0, 0 | 0) | 0; HEAP32[((HEAP32[($4_1 + 140 | 0) >> 2] | 0) + 8 | 0) >> 2] = HEAP32[($4_1 + 60 | 0) >> 2] | 0; HEAP32[((HEAP32[($4_1 + 140 | 0) >> 2] | 0) + 12 | 0) >> 2] = HEAP32[($4_1 + 56 | 0) >> 2] | 0; if (!(0 & 1 | 0)) { @@ -5064,7 +5064,7 @@ function asmFunc(imports) { HEAP32[($5_1 + 12 | 0) >> 2] = HEAP32[($5_1 + 44 | 0) >> 2] | 0; HEAP32[($5_1 + 16 | 0) >> 2] = 1; HEAP32[($5_1 + 20 | 0) >> 2] = 1; - HEAP32[($5_1 + 28 | 0) >> 2] = 88909; + HEAP32[($5_1 + 28 | 0) >> 2] = 89067; $20_1 = $43($5_1 + 8 | 0 | 0, HEAP32[($5_1 + 40 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 36 | 0) >> 2] | 0 | 0) | 0; global$0 = $5_1 + 48 | 0; return $20_1 | 0; @@ -5604,7 +5604,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$3 } - fimport$0(80167 | 0, 77943 | 0, 32469 | 0, 74681 | 0); + fimport$0(80167 | 0, 77943 | 0, 32471 | 0, 74681 | 0); wasm2js_trap(); } $67(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); @@ -5666,7 +5666,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$3 } - fimport$0(80167 | 0, 77943 | 0, 30315 | 0, 74699 | 0); + fimport$0(80167 | 0, 77943 | 0, 30317 | 0, 74699 | 0); wasm2js_trap(); } $988(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); @@ -6662,7 +6662,7 @@ function asmFunc(imports) { break label$15 } HEAP32[$7_1 >> 2] = $7_1 + 96 | 0; - $917(87771 | 0, $7_1 | 0) | 0; + $917(87756 | 0, $7_1 | 0) | 0; break label$14; } label$16 : { @@ -6671,7 +6671,7 @@ function asmFunc(imports) { break label$17 } HEAP32[($7_1 + 16 | 0) >> 2] = $7_1 + 96 | 0; - $917(87771 | 0, $7_1 + 16 | 0 | 0) | 0; + $917(87756 | 0, $7_1 + 16 | 0 | 0) | 0; break label$16; } label$18 : { @@ -6679,7 +6679,7 @@ function asmFunc(imports) { break label$18 } HEAP32[($7_1 + 32 | 0) >> 2] = $7_1 + 96 | 0; - $917(87784 | 0, $7_1 + 32 | 0 | 0) | 0; + $917(87769 | 0, $7_1 + 32 | 0 | 0) | 0; } } } @@ -6692,7 +6692,7 @@ function asmFunc(imports) { break label$20 } HEAP32[($7_1 + 48 | 0) >> 2] = $7_1 + 96 | 0; - $917(87618 | 0, $7_1 + 48 | 0 | 0) | 0; + $917(87603 | 0, $7_1 + 48 | 0 | 0) | 0; break label$19; } label$21 : { @@ -6701,7 +6701,7 @@ function asmFunc(imports) { break label$22 } HEAP32[($7_1 + 64 | 0) >> 2] = $7_1 + 96 | 0; - $917(87639 | 0, $7_1 + 64 | 0 | 0) | 0; + $917(87624 | 0, $7_1 + 64 | 0 | 0) | 0; break label$21; } label$23 : { @@ -6709,7 +6709,7 @@ function asmFunc(imports) { break label$23 } HEAP32[($7_1 + 80 | 0) >> 2] = $7_1 + 96 | 0; - $917(87662 | 0, $7_1 + 80 | 0 | 0) | 0; + $917(87647 | 0, $7_1 + 80 | 0 | 0) | 0; } } } @@ -7009,70 +7009,70 @@ function asmFunc(imports) { if ($933(HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 73663 | 0) | 0) { break label$2 } - HEAP32[($4_1 + 12 | 0) >> 2] = $936(94384 | 0) | 0; + HEAP32[($4_1 + 12 | 0) >> 2] = $936(94544 | 0) | 0; break label$1; } label$3 : { if ($933(HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 73720 | 0) | 0) { break label$3 } - HEAP32[($4_1 + 12 | 0) >> 2] = $936(97296 | 0) | 0; + HEAP32[($4_1 + 12 | 0) >> 2] = $936(97456 | 0) | 0; break label$1; } label$4 : { if ($933(HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 73696 | 0) | 0) { break label$4 } - HEAP32[($4_1 + 12 | 0) >> 2] = $936(99088 | 0) | 0; + HEAP32[($4_1 + 12 | 0) >> 2] = $936(99248 | 0) | 0; break label$1; } label$5 : { if ($933(HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 73674 | 0) | 0) { break label$5 } - HEAP32[($4_1 + 12 | 0) >> 2] = $936(99424 | 0) | 0; + HEAP32[($4_1 + 12 | 0) >> 2] = $936(99584 | 0) | 0; break label$1; } label$6 : { if ($933(HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 73652 | 0) | 0) { break label$6 } - HEAP32[($4_1 + 12 | 0) >> 2] = $936(106432 | 0) | 0; + HEAP32[($4_1 + 12 | 0) >> 2] = $936(106592 | 0) | 0; break label$1; } label$7 : { if ($933(HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 73684 | 0) | 0) { break label$7 } - HEAP32[($4_1 + 12 | 0) >> 2] = $936(108768 | 0) | 0; + HEAP32[($4_1 + 12 | 0) >> 2] = $936(108928 | 0) | 0; break label$1; } label$8 : { if ($933(HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 73617 | 0) | 0) { break label$8 } - HEAP32[($4_1 + 12 | 0) >> 2] = $936(113440 | 0) | 0; + HEAP32[($4_1 + 12 | 0) >> 2] = $936(113600 | 0) | 0; break label$1; } label$9 : { if ($933(HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 73629 | 0) | 0) { break label$9 } - HEAP32[($4_1 + 12 | 0) >> 2] = $936(113632 | 0) | 0; + HEAP32[($4_1 + 12 | 0) >> 2] = $936(113792 | 0) | 0; break label$1; } label$10 : { if ($933(HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 73708 | 0) | 0) { break label$10 } - HEAP32[($4_1 + 12 | 0) >> 2] = $936(114928 | 0) | 0; + HEAP32[($4_1 + 12 | 0) >> 2] = $936(115088 | 0) | 0; break label$1; } label$11 : { if ($933(HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 73641 | 0) | 0) { break label$11 } - HEAP32[($4_1 + 12 | 0) >> 2] = $936(88912 | 0) | 0; + HEAP32[($4_1 + 12 | 0) >> 2] = $936(89072 | 0) | 0; break label$1; } HEAP32[($4_1 + 12 | 0) >> 2] = 0; @@ -7260,7 +7260,7 @@ function asmFunc(imports) { $16(); break label$2; } - HEAP32[($4_1 + 4 | 0) >> 2] = $936(88909 | 0) | 0; + HEAP32[($4_1 + 4 | 0) >> 2] = $936(89067 | 0) | 0; label$5 : { if (!((HEAP32[($4_1 + 4 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$5 @@ -7513,7 +7513,7 @@ function asmFunc(imports) { HEAP32[($3_1 + 20 | 0) >> 2] = HEAP32[($3_1 + 44 | 0) >> 2] | 0; HEAP32[($3_1 + 24 | 0) >> 2] = 1; HEAP32[($3_1 + 28 | 0) >> 2] = 1; - HEAP32[($3_1 + 36 | 0) >> 2] = 88909; + HEAP32[($3_1 + 36 | 0) >> 2] = 89067; HEAP32[($3_1 + 12 | 0) >> 2] = 0; HEAP32[($3_1 + 8 | 0) >> 2] = $105(HEAP32[($3_1 + 44 | 0) >> 2] | 0 | 0) | 0; $18_1 = 24; @@ -7677,7 +7677,7 @@ function asmFunc(imports) { break label$9 } $15_1 = 0; - HEAP16[($8_1 + 86 | 0) >> 1] = HEAPU8[($15_1 + 88908 | 0) >> 0] | 0 | ((HEAPU8[($15_1 + 88909 | 0) >> 0] | 0) << 8 | 0) | 0; + HEAP16[($8_1 + 86 | 0) >> 1] = HEAPU8[($15_1 + 89066 | 0) >> 0] | 0 | ((HEAPU8[($15_1 + 89067 | 0) >> 0] | 0) << 8 | 0) | 0; HEAP32[($8_1 + 80 | 0) >> 2] = $15($8_1 + 86 | 0 | 0, ($8_1 + 86 | 0) + 1 | 0 | 0, 10 | 0) | 0; label$10 : { if (!((HEAP32[($8_1 + 80 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { @@ -7732,7 +7732,7 @@ function asmFunc(imports) { } $988(HEAP32[($8_1 + 100 | 0) >> 2] | 0 | 0); $16_1 = 0; - HEAP16[($8_1 + 38 | 0) >> 1] = HEAPU8[($16_1 + 88908 | 0) >> 0] | 0 | ((HEAPU8[($16_1 + 88909 | 0) >> 0] | 0) << 8 | 0) | 0; + HEAP16[($8_1 + 38 | 0) >> 1] = HEAPU8[($16_1 + 89066 | 0) >> 0] | 0 | ((HEAPU8[($16_1 + 89067 | 0) >> 0] | 0) << 8 | 0) | 0; HEAP32[($8_1 + 32 | 0) >> 2] = $15($8_1 + 38 | 0 | 0, ($8_1 + 38 | 0) + 1 | 0 | 0, 10 | 0) | 0; label$12 : { if (!((HEAP32[($8_1 + 32 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { @@ -8270,7 +8270,7 @@ function asmFunc(imports) { HEAP32[$7_1 >> 2] = $230_1; $917(77949 | 0, $7_1 | 0) | 0; HEAP32[($7_1 + 16 | 0) >> 2] = $7_1 + 2320 | 0; - $917(87790 | 0, $7_1 + 16 | 0 | 0) | 0; + $917(87775 | 0, $7_1 + 16 | 0 | 0) | 0; } $892($7_1 + 1624 | 0 | 0, 0 | 0, 688 | 0) | 0; $14($7_1 + 1616 | 0 | 0, $7_1 + 1624 | 0 | 0, HEAP32[($7_1 + 2312 | 0) >> 2] | 0 | 0, $7_1 + 2320 | 0 | 0, (HEAP32[($7_1 + 2944 | 0) >> 2] | 0) + 1 | 0 | 0, 0 | 0); @@ -8299,7 +8299,7 @@ function asmFunc(imports) { $300_1 = HEAP32[($7_1 + 2956 | 0) >> 2] | 0; $301_1 = HEAP32[($0_1 + 4 | 0) >> 2] | 0; HEAP32[($7_1 + 32 | 0) >> 2] = HEAP32[(HEAP32[($7_1 + 1604 | 0) >> 2] | 0) >> 2] | 0; - $89(63 | 0, $300_1 | 0, $301_1 | 0, 86716 | 0, $7_1 + 32 | 0 | 0) | 0; + $89(63 | 0, $300_1 | 0, $301_1 | 0, 86709 | 0, $7_1 + 32 | 0 | 0) | 0; HEAP32[($7_1 + 1604 | 0) >> 2] = HEAP32[((HEAP32[($7_1 + 1604 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; continue label$24; }; @@ -8325,7 +8325,7 @@ function asmFunc(imports) { break label$27 } HEAP32[($7_1 + 1588 | 0) >> 2] = $7_1 + 1592 | 0; - HEAP32[($7_1 + 1584 | 0) >> 2] = $936(87464 | 0) | 0; + HEAP32[($7_1 + 1584 | 0) >> 2] = $936(87449 | 0) | 0; label$28 : { if (!((HEAP32[($7_1 + 1584 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$28 @@ -8661,7 +8661,7 @@ function asmFunc(imports) { $892($7_1 + 408 | 0 | 0, 0 | 0, 688 | 0) | 0; $889_1 = (HEAP32[($7_1 + 1148 | 0) >> 2] | 0) + 4 | 0; $898_1 = 0; - $14($7_1 + 400 | 0 | 0, $7_1 + 408 | 0 | 0, 86131 | 0, $898_1 | 0, HEAP32[($7_1 + 2944 | 0) >> 2] | 0 | 0, $898_1 | 0); + $14($7_1 + 400 | 0 | 0, $7_1 + 408 | 0 | 0, 86124 | 0, $898_1 | 0, HEAP32[($7_1 + 2944 | 0) >> 2] | 0 | 0, $898_1 | 0); i64toi32_i32$2 = $7_1; i64toi32_i32$0 = HEAP32[($7_1 + 400 | 0) >> 2] | 0; i64toi32_i32$1 = HEAP32[($7_1 + 404 | 0) >> 2] | 0; @@ -9483,7 +9483,7 @@ function asmFunc(imports) { if (!((HEAP32[(HEAP32[(HEAP32[($7_1 + 104 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) == (130 | 0) & 1 | 0)) { break label$41 } - $89(63 | 0, HEAP32[($7_1 + 108 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($7_1 + 104 | 0) >> 2] | 0) >> 2] | 0 | 0, 87003 | 0, 0 | 0) | 0; + $89(63 | 0, HEAP32[($7_1 + 108 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($7_1 + 104 | 0) >> 2] | 0) >> 2] | 0 | 0, 86996 | 0, 0 | 0) | 0; break label$40; } label$42 : { @@ -9823,7 +9823,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$16 } - $89(1160 | 0, HEAP32[($5_1 + 780 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($5_1 + 776 | 0) >> 2] | 0) >> 2] | 0 | 0, 86366 | 0, 0 | 0) | 0; + $89(1160 | 0, HEAP32[($5_1 + 780 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($5_1 + 776 | 0) >> 2] | 0) >> 2] | 0 | 0, 86359 | 0, 0 | 0) | 0; $16(); break label$2; } @@ -10164,7 +10164,7 @@ function asmFunc(imports) { if (!(($39($0_1 | 0) | 0) & 1 | 0)) { break label$18 } - fimport$0(86337 | 0, 77943 | 0, 5688 | 0, 68463 | 0); + fimport$0(86330 | 0, 77943 | 0, 5688 | 0, 68463 | 0); wasm2js_trap(); } if (!(0 & 1 | 0)) { @@ -10633,10 +10633,10 @@ function asmFunc(imports) { $52_1 = $40(HEAP32[($7_1 + 20 | 0) >> 2] | 0 | 0) | 0; HEAP32[($7_1 + 4 | 0) >> 2] = $40(HEAP32[(HEAP32[(HEAP32[($7_1 + 24 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) | 0; HEAP32[$7_1 >> 2] = $52_1; - $89(970 | 0, $48_1 | 0, $50_1 | 0, 87698 | 0, $7_1 | 0) | 0; + $89(970 | 0, $48_1 | 0, $50_1 | 0, 87683 | 0, $7_1 | 0) | 0; break label$7; } - $89(970 | 0, HEAP32[($7_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($7_1 + 28 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 88665 | 0, 0 | 0) | 0; + $89(970 | 0, HEAP32[($7_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($7_1 + 28 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 88674 | 0, 0 | 0) | 0; } $16(); break label$2; @@ -11436,7 +11436,7 @@ function asmFunc(imports) { break label$1; } label$3 : { - if (!($933(HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 86413 | 0) | 0)) { + if (!($933(HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 86406 | 0) | 0)) { break label$3 } HEAP8[($3_1 + 15 | 0) >> 0] = 0 & 1 | 0; @@ -11451,7 +11451,7 @@ function asmFunc(imports) { break label$1; } label$5 : { - if (!($933(HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 86413 | 0) | 0)) { + if (!($933(HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 86406 | 0) | 0)) { break label$5 } HEAP8[($3_1 + 15 | 0) >> 0] = 0 & 1 | 0; @@ -11481,7 +11481,7 @@ function asmFunc(imports) { break label$1; } label$9 : { - if (!($933(HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 86385 | 0) | 0)) { + if (!($933(HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 86378 | 0) | 0)) { break label$9 } HEAP8[($3_1 + 15 | 0) >> 0] = 0 & 1 | 0; @@ -11511,7 +11511,7 @@ function asmFunc(imports) { break label$1; } label$13 : { - if (!($933(HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 86385 | 0) | 0)) { + if (!($933(HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 86378 | 0) | 0)) { break label$13 } HEAP8[($3_1 + 15 | 0) >> 0] = 0 & 1 | 0; @@ -11611,7 +11611,7 @@ function asmFunc(imports) { if ((((HEAPU8[(HEAP32[($3_1 + 20 | 0) >> 2] | 0) >> 0] | 0) << $42_1 | 0) >> $42_1 | 0 | 0) == (45 | 0) & 1 | 0) { break label$4 } - fimport$0(86893 | 0, 77943 | 0, 12261 | 0, 73287 | 0); + fimport$0(86886 | 0, 77943 | 0, 12261 | 0, 73287 | 0); wasm2js_trap(); } HEAP32[($3_1 + 8 | 0) >> 2] = 0; @@ -11622,7 +11622,7 @@ function asmFunc(imports) { break label$6 } label$8 : { - if ($938(HEAP32[((116848 + ((HEAP32[($3_1 + 8 | 0) >> 2] | 0) << 3 | 0) | 0) + 4 | 0) >> 2] | 0 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0, $937(HEAP32[((116848 + ((HEAP32[($3_1 + 8 | 0) >> 2] | 0) << 3 | 0) | 0) + 4 | 0) >> 2] | 0 | 0) | 0 | 0) | 0) { + if ($938(HEAP32[((117008 + ((HEAP32[($3_1 + 8 | 0) >> 2] | 0) << 3 | 0) | 0) + 4 | 0) >> 2] | 0 | 0, HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0, $937(HEAP32[((117008 + ((HEAP32[($3_1 + 8 | 0) >> 2] | 0) << 3 | 0) | 0) + 4 | 0) >> 2] | 0 | 0) | 0 | 0) | 0) { break label$8 } i64toi32_i32$0 = 0; @@ -11633,7 +11633,7 @@ function asmFunc(imports) { i64toi32_i32$0 = $246$hi; i64toi32_i32$2 = 1; i64toi32_i32$1 = $90$hi; - i64toi32_i32$3 = HEAP32[(116848 + ((HEAP32[($3_1 + 8 | 0) >> 2] | 0) << 3 | 0) | 0) >> 2] | 0; + i64toi32_i32$3 = HEAP32[(117008 + ((HEAP32[($3_1 + 8 | 0) >> 2] | 0) << 3 | 0) | 0) >> 2] | 0; i64toi32_i32$4 = i64toi32_i32$3 & 31 | 0; if (32 >>> 0 <= (i64toi32_i32$3 & 63 | 0) >>> 0) { i64toi32_i32$1 = i64toi32_i32$2 << i64toi32_i32$4 | 0; @@ -11749,14 +11749,14 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($8_1 + 36 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) & 8 | 0)) { break label$5 } - fimport$0(86284 | 0, 77943 | 0, 7705 | 0, 71961 | 0); + fimport$0(86277 | 0, 77943 | 0, 7705 | 0, 71961 | 0); wasm2js_trap(); } label$6 : { if (!(($1(HEAP32[($8_1 + 36 | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { break label$6 } - fimport$0(86100 | 0, 77943 | 0, 7706 | 0, 71961 | 0); + fimport$0(86093 | 0, 77943 | 0, 7706 | 0, 71961 | 0); wasm2js_trap(); } HEAP32[($8_1 + 32 | 0) >> 2] = 0; @@ -11874,7 +11874,7 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($8_1 + 36 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) & 8 | 0)) { break label$20 } - fimport$0(86284 | 0, 77943 | 0, 7788 | 0, 71961 | 0); + fimport$0(86277 | 0, 77943 | 0, 7788 | 0, 71961 | 0); wasm2js_trap(); } $119($0_1 | 0, $8_1 + 36 | 0 | 0); @@ -11915,7 +11915,7 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[(HEAP32[($5_1 + 760 | 0) >> 2] | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) & 8 | 0)) { break label$5 } - fimport$0(86228 | 0, 77943 | 0, 7375 | 0, 75124 | 0); + fimport$0(86221 | 0, 77943 | 0, 7375 | 0, 75124 | 0); wasm2js_trap(); } label$6 : { @@ -11927,7 +11927,7 @@ function asmFunc(imports) { if (!((HEAP32[($0_1 + 4 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$8 } - $89(1210 | 0, HEAP32[($5_1 + 764 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($5_1 + 760 | 0) >> 2] | 0) >> 2] | 0 | 0, 85894 | 0, 0 | 0) | 0; + $89(1210 | 0, HEAP32[($5_1 + 764 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($5_1 + 760 | 0) >> 2] | 0) >> 2] | 0 | 0, 85887 | 0, 0 | 0) | 0; break label$3; } $5(HEAP32[($5_1 + 760 | 0) >> 2] | 0 | 0); @@ -12002,7 +12002,7 @@ function asmFunc(imports) { $16(); break label$2; } - HEAP32[($5_1 + 24 | 0) >> 2] = $936(88909 | 0) | 0; + HEAP32[($5_1 + 24 | 0) >> 2] = $936(89067 | 0) | 0; label$17 : { if (!((HEAP32[($5_1 + 24 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$17 @@ -12177,7 +12177,7 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($7_1 + 56 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$12 } - $89(1191 | 0, HEAP32[($7_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 44 | 0) >> 2] | 0 | 0, 87798 | 0, 0 | 0) | 0; + $89(1191 | 0, HEAP32[($7_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 44 | 0) >> 2] | 0 | 0, 87783 | 0, 0 | 0) | 0; $16(); break label$3; } @@ -12260,7 +12260,7 @@ function asmFunc(imports) { HEAP32[($7_1 + 20 | 0) >> 2] = 0; break label$23; } - $89(1190 | 0, HEAP32[($7_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 44 | 0) >> 2] | 0 | 0, 87861 | 0, 0 | 0) | 0; + $89(1190 | 0, HEAP32[($7_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 44 | 0) >> 2] | 0 | 0, 87846 | 0, 0 | 0) | 0; $16(); break label$3; } @@ -12303,7 +12303,7 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($7_1 + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$32 } - $89(1191 | 0, HEAP32[($7_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[($0_1 + 4 | 0) >> 2] | 0 | 0, 87798 | 0, 0 | 0) | 0; + $89(1191 | 0, HEAP32[($7_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[($0_1 + 4 | 0) >> 2] | 0 | 0, 87783 | 0, 0 | 0) | 0; $97(HEAP32[($7_1 + 20 | 0) >> 2] | 0 | 0); HEAP32[($7_1 + 20 | 0) >> 2] = 0; $16(); @@ -12375,7 +12375,7 @@ function asmFunc(imports) { if (!(($147(HEAP32[($9_1 + 72 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($9_1 + 68 | 0) >> 2] | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { break label$1 } - fimport$0(85999 | 0, 77943 | 0, 7989 | 0, 71555 | 0); + fimport$0(85992 | 0, 77943 | 0, 7989 | 0, 71555 | 0); wasm2js_trap(); } i64toi32_i32$0 = 0; @@ -12479,7 +12479,7 @@ function asmFunc(imports) { HEAP32[$6_1 >> 2] = HEAP32[((HEAP32[($6_1 + 2532 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0; $929($6_1 + 1776 | 0 | 0, 50 | 0, 77800 | 0, $6_1 | 0) | 0; $51_1 = 0; - $14($0_1 | 0, $6_1 + 1840 | 0 | 0, $6_1 + 1776 | 0 | 0, 88909 | 0, $51_1 | 0, $51_1 | 0); + $14($0_1 | 0, $6_1 + 1840 | 0 | 0, $6_1 + 1776 | 0 | 0, 89067 | 0, $51_1 | 0, $51_1 | 0); $5($0_1 | 0); label$4 : { if (!((HEAP32[$0_1 >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { @@ -12501,7 +12501,7 @@ function asmFunc(imports) { } $892($6_1 + 784 | 0 | 0, 0 | 0, 688 | 0) | 0; $94_1 = 0; - $14($0_1 | 0, $6_1 + 784 | 0 | 0, $6_1 + 1472 | 0 | 0, 88909 | 0, $94_1 | 0, $94_1 | 0); + $14($0_1 | 0, $6_1 + 784 | 0 | 0, $6_1 + 1472 | 0 | 0, 89067 | 0, $94_1 | 0, $94_1 | 0); $5($0_1 | 0); label$7 : { if (!((HEAP32[$0_1 >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { @@ -12542,7 +12542,7 @@ function asmFunc(imports) { $929($6_1 + 720 | 0 | 0, 50 | 0, 77800 | 0, $6_1 + 16 | 0 | 0) | 0; $892($6_1 + 32 | 0 | 0, 0 | 0, 688 | 0) | 0; $143_1 = 0; - $14($0_1 | 0, $6_1 + 32 | 0 | 0, $6_1 + 720 | 0 | 0, 88909 | 0, $143_1 | 0, $143_1 | 0); + $14($0_1 | 0, $6_1 + 32 | 0 | 0, $6_1 + 720 | 0 | 0, 89067 | 0, $143_1 | 0, $143_1 | 0); $5($0_1 | 0); label$9 : { if (!((HEAP32[$0_1 >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { @@ -12587,14 +12587,14 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[(HEAP32[($8_1 + 84 | 0) >> 2] | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) & 8 | 0)) { break label$5 } - fimport$0(86228 | 0, 77943 | 0, 7514 | 0, 68161 | 0); + fimport$0(86221 | 0, 77943 | 0, 7514 | 0, 68161 | 0); wasm2js_trap(); } label$6 : { if (!(($1(HEAP32[(HEAP32[($8_1 + 84 | 0) >> 2] | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { break label$6 } - fimport$0(86066 | 0, 77943 | 0, 7515 | 0, 68161 | 0); + fimport$0(86059 | 0, 77943 | 0, 7515 | 0, 68161 | 0); wasm2js_trap(); } label$7 : { @@ -12604,7 +12604,7 @@ function asmFunc(imports) { if (!(($1(HEAP32[($0_1 + 4 | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { break label$7 } - fimport$0(85852 | 0, 77943 | 0, 7516 | 0, 68161 | 0); + fimport$0(85845 | 0, 77943 | 0, 7516 | 0, 68161 | 0); wasm2js_trap(); } HEAP32[($8_1 + 72 | 0) >> 2] = 0; @@ -13098,12 +13098,12 @@ function asmFunc(imports) { HEAP32[($3_1 + 988 | 0) >> 2] = $913($3_1 + 992 | 0 | 0) | 0; $892($3_1 + 296 | 0 | 0, 0 | 0, 688 | 0) | 0; $892($3_1 + 192 | 0 | 0, 0 | 0, 100 | 0) | 0; - $69_1 = 116768 + ((HEAP32[((HEAP32[($3_1 + 988 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) << 2 | 0) | 0; + $69_1 = 116928 + ((HEAP32[((HEAP32[($3_1 + 988 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) << 2 | 0) | 0; $71_1 = HEAP32[((HEAP32[($3_1 + 988 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0; HEAP32[($3_1 + 8 | 0) >> 2] = (HEAP32[((HEAP32[($3_1 + 988 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0) + 1900 | 0; HEAP32[($3_1 + 4 | 0) >> 2] = $71_1; HEAP32[$3_1 >> 2] = $69_1; - $929($3_1 + 192 | 0 | 0, 100 | 0, 88635 | 0, $3_1 | 0) | 0; + $929($3_1 + 192 | 0 | 0, 100 | 0, 88644 | 0, $3_1 | 0) | 0; $88_1 = 0; $14($3_1 + 184 | 0 | 0, $3_1 + 296 | 0 | 0, $3_1 + 192 | 0 | 0, 72038 | 0, $88_1 | 0, $88_1 | 0); $126($3_1 + 176 | 0 | 0, HEAP32[($3_1 + 1052 | 0) >> 2] | 0 | 0, $3_1 + 184 | 0 | 0, 0 | 0); @@ -13115,13 +13115,13 @@ function asmFunc(imports) { HEAP32[($3_1 + 24 | 0) >> 2] = HEAP32[(HEAP32[($3_1 + 988 | 0) >> 2] | 0) >> 2] | 0; HEAP32[($3_1 + 20 | 0) >> 2] = $113_1; HEAP32[($3_1 + 16 | 0) >> 2] = $111_1; - $929($3_1 + 64 | 0 | 0, 100 | 0, 88600 | 0, $3_1 + 16 | 0 | 0) | 0; + $929($3_1 + 64 | 0 | 0, 100 | 0, 88609 | 0, $3_1 + 16 | 0 | 0) | 0; $130_1 = 0; $14($3_1 + 56 | 0 | 0, $3_1 + 296 | 0 | 0, $3_1 + 64 | 0 | 0, 72063 | 0, $130_1 | 0, $130_1 | 0); $126($3_1 + 48 | 0 | 0, HEAP32[($3_1 + 1052 | 0) >> 2] | 0 | 0, $3_1 + 56 | 0 | 0, 0 | 0); $9($3_1 + 48 | 0 | 0); $9($3_1 + 56 | 0 | 0); - HEAP32[($3_1 + 44 | 0) >> 2] = 88685; + HEAP32[($3_1 + 44 | 0) >> 2] = 88843; $154_1 = 0; $14($3_1 + 36 | 0 | 0, $3_1 + 296 | 0 | 0, HEAP32[($3_1 + 44 | 0) >> 2] | 0 | 0, 72012 | 0, $154_1 | 0, $154_1 | 0); $126($3_1 + 28 | 0 | 0, HEAP32[($3_1 + 1052 | 0) >> 2] | 0 | 0, $3_1 + 36 | 0 | 0, 0 | 0); @@ -13167,7 +13167,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] = $936(85845 | 0) | 0; + HEAP32[($3_1 + 44 | 0) >> 2] = $936(85838 | 0) | 0; break label$1; } HEAP32[($3_1 + 32 | 0) >> 2] = 0; @@ -13196,14 +13196,14 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($3_1 + 20 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) & 8 | 0)) { break label$10 } - $11($3_1 + 24 | 0 | 0, 88908 | 0, 0 | 0) | 0; + $11($3_1 + 24 | 0 | 0, 89066 | 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 } - $11($3_1 + 24 | 0 | 0, 87464 | 0, 0 | 0) | 0; + $11($3_1 + 24 | 0 | 0, 87449 | 0, 0 | 0) | 0; } } break label$7; @@ -13216,7 +13216,7 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($3_1 + 20 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) & 4 | 0)) { break label$13 } - $11($3_1 + 24 | 0 | 0, 87464 | 0, 0 | 0) | 0; + $11($3_1 + 24 | 0 | 0, 87449 | 0, 0 | 0) | 0; } } } @@ -13986,10 +13986,10 @@ function asmFunc(imports) { break label$5 } label$7 : { - if ($938(HEAP32[((116848 + ((HEAP32[($3_1 + 4 | 0) >> 2] | 0) << 3 | 0) | 0) + 4 | 0) >> 2] | 0 | 0, (HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 2 | 0 | 0, $937(HEAP32[((116848 + ((HEAP32[($3_1 + 4 | 0) >> 2] | 0) << 3 | 0) | 0) + 4 | 0) >> 2] | 0 | 0) | 0 | 0) | 0) { + if ($938(HEAP32[((117008 + ((HEAP32[($3_1 + 4 | 0) >> 2] | 0) << 3 | 0) | 0) + 4 | 0) >> 2] | 0 | 0, (HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 2 | 0 | 0, $937(HEAP32[((117008 + ((HEAP32[($3_1 + 4 | 0) >> 2] | 0) << 3 | 0) | 0) + 4 | 0) >> 2] | 0 | 0) | 0 | 0) | 0) { break label$7 } - HEAP32[($3_1 + 12 | 0) >> 2] = HEAP32[(116848 + ((HEAP32[($3_1 + 4 | 0) >> 2] | 0) << 3 | 0) | 0) >> 2] | 0; + HEAP32[($3_1 + 12 | 0) >> 2] = HEAP32[(117008 + ((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; @@ -14038,12 +14038,12 @@ function asmFunc(imports) { break label$4 } label$6 : { - if (!((HEAP32[(116848 + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 3 | 0) | 0) >> 2] | 0 | 0) == (HEAP32[($5_1 + 40 | 0) >> 2] | 0 | 0) & 1 | 0)) { + if (!((HEAP32[(117008 + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 3 | 0) | 0) >> 2] | 0 | 0) == (HEAP32[($5_1 + 40 | 0) >> 2] | 0 | 0) & 1 | 0)) { break label$6 } $30_1 = HEAP32[($5_1 + 32 | 0) >> 2] | 0; $31_1 = HEAP32[($5_1 + 36 | 0) >> 2] | 0; - HEAP32[$5_1 >> 2] = HEAP32[((116848 + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 3 | 0) | 0) + 4 | 0) >> 2] | 0; + HEAP32[$5_1 >> 2] = HEAP32[((117008 + ((HEAP32[($5_1 + 28 | 0) >> 2] | 0) << 3 | 0) | 0) + 4 | 0) >> 2] | 0; $929($30_1 | 0, $31_1 | 0, 69293 | 0, $5_1 | 0) | 0; HEAP32[($5_1 + 44 | 0) >> 2] = 0; break label$1; @@ -14078,14 +14078,14 @@ function asmFunc(imports) { HEAP32[($5_1 + 64 | 0) >> 2] = $2_1; $10_1 = ((HEAP32[($5_1 + 72 | 0) >> 2] | 0) + 8 | 0) + 8 | 0; i64toi32_i32$2 = 0; - i64toi32_i32$0 = HEAP32[(i64toi32_i32$2 + 116816 | 0) >> 2] | 0; - i64toi32_i32$1 = HEAP32[(i64toi32_i32$2 + 116820 | 0) >> 2] | 0; + i64toi32_i32$0 = HEAP32[(i64toi32_i32$2 + 116976 | 0) >> 2] | 0; + i64toi32_i32$1 = HEAP32[(i64toi32_i32$2 + 116980 | 0) >> 2] | 0; $531_1 = i64toi32_i32$0; i64toi32_i32$0 = $10_1; HEAP32[i64toi32_i32$0 >> 2] = $531_1; HEAP32[(i64toi32_i32$0 + 4 | 0) >> 2] = i64toi32_i32$1; $12_1 = 16; - $14_1 = 116816; + $14_1 = 116976; i64toi32_i32$2 = $14_1 + $12_1 | 0; i64toi32_i32$1 = HEAP32[i64toi32_i32$2 >> 2] | 0; i64toi32_i32$0 = HEAP32[(i64toi32_i32$2 + 4 | 0) >> 2] | 0; @@ -14404,7 +14404,7 @@ function asmFunc(imports) { break label$38 } HEAP32[$5_1 >> 2] = HEAP32[((HEAP32[($5_1 + 64 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 60 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0; - $917(86614 | 0, $5_1 | 0) | 0; + $917(86607 | 0, $5_1 | 0) | 0; HEAP32[($5_1 + 76 | 0) >> 2] = 1; break label$1; } @@ -14532,7 +14532,7 @@ function asmFunc(imports) { break label$4; } HEAP32[($5_1 + 16 | 0) >> 2] = HEAP32[((HEAP32[($5_1 + 64 | 0) >> 2] | 0) + ((HEAP32[($5_1 + 60 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0; - $917(86564 | 0, $5_1 + 16 | 0 | 0) | 0; + $917(86557 | 0, $5_1 + 16 | 0 | 0) | 0; HEAP32[($5_1 + 76 | 0) >> 2] = 1; break label$1; } @@ -21643,14 +21643,14 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$3 } - fimport$0(82686 | 0, 77943 | 0, 46893 | 0, 77570 | 0); + fimport$0(82686 | 0, 77943 | 0, 47082 | 0, 77570 | 0); wasm2js_trap(); } label$4 : { if ((HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 60 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$4 } - fimport$0(80188 | 0, 77943 | 0, 46894 | 0, 77570 | 0); + fimport$0(80188 | 0, 77943 | 0, 47083 | 0, 77570 | 0); wasm2js_trap(); } HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 60 | 0) >> 2] = HEAP32[($4_1 + 8 | 0) >> 2] | 0; @@ -21677,7 +21677,7 @@ function asmFunc(imports) { if ((HEAP32[(HEAP32[($4_1 + 12 | 0) >> 2] | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$3 } - fimport$0(81180 | 0, 77943 | 0, 49301 | 0, 73407 | 0); + fimport$0(81180 | 0, 77943 | 0, 49490 | 0, 73407 | 0); wasm2js_trap(); } HEAP32[(HEAP32[($4_1 + 12 | 0) >> 2] | 0) >> 2] = HEAP32[($4_1 + 8 | 0) >> 2] | 0; @@ -21687,7 +21687,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 56 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$4 } - fimport$0(80183 | 0, 77943 | 0, 49306 | 0, 73407 | 0); + fimport$0(80183 | 0, 77943 | 0, 49495 | 0, 73407 | 0); wasm2js_trap(); } HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 56 | 0) >> 2] = HEAP32[($4_1 + 8 | 0) >> 2] | 0; @@ -21732,7 +21732,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 56 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$1 } - fimport$0(80312 | 0, 77943 | 0, 46916 | 0, 75770 | 0); + fimport$0(80312 | 0, 77943 | 0, 47105 | 0, 75770 | 0); wasm2js_trap(); } global$0 = $3_1 + 16 | 0; @@ -21870,7 +21870,7 @@ function asmFunc(imports) { $3_1 = global$0 - 16 | 0; global$0 = $3_1; HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; - $6_1 = $218(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0, 88909 | 0) | 0; + $6_1 = $218(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0, 89067 | 0) | 0; global$0 = $3_1 + 16 | 0; return $6_1 | 0; } @@ -21883,7 +21883,7 @@ 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] = $218(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, 88909 | 0) | 0; + HEAP32[($4_1 + 4 | 0) >> 2] = $218(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, 89067 | 0) | 0; label$1 : { if (!((HEAP32[($4_1 + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$1 @@ -22862,7 +22862,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($5_1 + 148 | 0) >> 2] | 0) + 56 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$9 } - fimport$0(80265 | 0, 77943 | 0, 49575 | 0, 69509 | 0); + fimport$0(80265 | 0, 77943 | 0, 49764 | 0, 69509 | 0); wasm2js_trap(); } HEAP32[((HEAP32[($5_1 + 148 | 0) >> 2] | 0) + 56 | 0) >> 2] = HEAP32[($5_1 + 136 | 0) >> 2] | 0; @@ -22965,7 +22965,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($5_1 + 148 | 0) >> 2] | 0) + 56 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$16 } - fimport$0(84915 | 0, 77943 | 0, 49616 | 0, 69509 | 0); + fimport$0(84915 | 0, 77943 | 0, 49805 | 0, 69509 | 0); wasm2js_trap(); } HEAP32[((HEAP32[($5_1 + 148 | 0) >> 2] | 0) + 56 | 0) >> 2] = HEAP32[($5_1 + 8 | 0) >> 2] | 0; @@ -23431,21 +23431,21 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 688 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$22 } - fimport$0(83028 | 0, 77943 | 0, 28346 | 0, 76263 | 0); + fimport$0(83028 | 0, 77943 | 0, 28348 | 0, 76263 | 0); wasm2js_trap(); } label$23 : { if ((HEAP32[((HEAP32[((HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 688 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$23 } - fimport$0(82097 | 0, 77943 | 0, 28347 | 0, 76263 | 0); + fimport$0(82097 | 0, 77943 | 0, 28349 | 0, 76263 | 0); wasm2js_trap(); } label$24 : { if ((HEAP32[((HEAP32[((HEAP32[((HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 688 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$24 } - fimport$0(81405 | 0, 77943 | 0, 28348 | 0, 76263 | 0); + fimport$0(81405 | 0, 77943 | 0, 28350 | 0, 76263 | 0); wasm2js_trap(); } HEAP32[($8_1 + 784 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[((HEAP32[((HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 688 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; @@ -23467,7 +23467,7 @@ function asmFunc(imports) { if (!((HEAPU8[($8_1 + 791 | 0) >> 0] | 0) & 1 | 0)) { break label$28 } - $917(87335 | 0, 0 | 0) | 0; + $917(87320 | 0, 0 | 0) | 0; break label$27; } label$29 : { @@ -23475,21 +23475,21 @@ function asmFunc(imports) { if (!((HEAPU8[($8_1 + 790 | 0) >> 0] | 0) & 1 | 0)) { break label$30 } - $917(87343 | 0, 0 | 0) | 0; + $917(87328 | 0, 0 | 0) | 0; break label$29; } label$31 : { if (!((HEAPU8[($8_1 + 789 | 0) >> 0] | 0) & 1 | 0)) { break label$31 } - $917(87353 | 0, 0 | 0) | 0; + $917(87338 | 0, 0 | 0) | 0; } } } HEAP32[($8_1 + 160 | 0) >> 2] = $8_1 + 576 | 0; $917(69406 | 0, $8_1 + 160 | 0 | 0) | 0; HEAP32[($8_1 + 176 | 0) >> 2] = $8_1 + 464 | 0; - $917(88007 | 0, $8_1 + 176 | 0 | 0) | 0; + $917(87992 | 0, $8_1 + 176 | 0 | 0) | 0; break label$25; } label$32 : { @@ -23544,20 +23544,20 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 708 | 0) >> 2] | 0) >>> 0 > 0 >>> 0 & 1 | 0)) { break label$40 } - $900(HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0 | 0, 88494 | 0, 0 | 0) | 0; + $900(HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0 | 0, 88503 | 0, 0 | 0) | 0; } $439_1 = HEAP32[($8_1 + 836 | 0) >> 2] | 0; HEAP32[($439_1 + 708 | 0) >> 2] = (HEAP32[($439_1 + 708 | 0) >> 2] | 0) + 1 | 0; - $900(HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0 | 0, 87612 | 0, 0 | 0) | 0; + $900(HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0 | 0, 87597 | 0, 0 | 0) | 0; $448_1 = HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0; HEAP32[($8_1 + 144 | 0) >> 2] = $8_1 + 464 | 0; - $900($448_1 | 0, 88322 | 0, $8_1 + 144 | 0 | 0) | 0; + $900($448_1 | 0, 88331 | 0, $8_1 + 144 | 0 | 0) | 0; label$41 : { label$42 : { if (!((HEAPU8[($8_1 + 791 | 0) >> 0] | 0) & 1 | 0)) { break label$42 } - $900(HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0 | 0, 88424 | 0, 0 | 0) | 0; + $900(HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0 | 0, 88433 | 0, 0 | 0) | 0; break label$41; } label$43 : { @@ -23565,61 +23565,61 @@ function asmFunc(imports) { if (!((HEAPU8[($8_1 + 790 | 0) >> 0] | 0) & 1 | 0)) { break label$44 } - $900(HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0 | 0, 88447 | 0, 0 | 0) | 0; + $900(HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0 | 0, 88456 | 0, 0 | 0) | 0; break label$43; } label$45 : { if (!((HEAPU8[($8_1 + 789 | 0) >> 0] | 0) & 1 | 0)) { break label$45 } - $900(HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0 | 0, 88472 | 0, 0 | 0) | 0; + $900(HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0 | 0, 88481 | 0, 0 | 0) | 0; } } } - $900(HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0 | 0, 87586 | 0, 0 | 0) | 0; + $900(HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0 | 0, 87571 | 0, 0 | 0) | 0; $481_1 = HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0; HEAP32[$8_1 >> 2] = $8_1 + 256 | 0; - $900($481_1 | 0, 88546 | 0, $8_1 | 0) | 0; - $900(HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0 | 0, 88204 | 0, 0 | 0) | 0; - $900(HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0 | 0, 88026 | 0, 0 | 0) | 0; - $900(HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0 | 0, 87608 | 0, 0 | 0) | 0; - $900(HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0 | 0, 87529 | 0, 0 | 0) | 0; - $900(HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0 | 0, 87493 | 0, 0 | 0) | 0; + $900($481_1 | 0, 88555 | 0, $8_1 | 0) | 0; + $900(HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0 | 0, 88213 | 0, 0 | 0) | 0; + $900(HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0 | 0, 88011 | 0, 0 | 0) | 0; + $900(HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0 | 0, 87593 | 0, 0 | 0) | 0; + $900(HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0 | 0, 87514 | 0, 0 | 0) | 0; + $900(HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0 | 0, 87478 | 0, 0 | 0) | 0; $507_1 = HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0; HEAP32[($8_1 + 16 | 0) >> 2] = HEAP32[($8_1 + 792 | 0) >> 2] | 0; - $900($507_1 | 0, 88508 | 0, $8_1 + 16 | 0 | 0) | 0; - $900(HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0 | 0, 88196 | 0, 0 | 0) | 0; - $900(HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0 | 0, 87559 | 0, 0 | 0) | 0; + $900($507_1 | 0, 88517 | 0, $8_1 + 16 | 0 | 0) | 0; + $900(HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0 | 0, 88205 | 0, 0 | 0) | 0; + $900(HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0 | 0, 87544 | 0, 0 | 0) | 0; $521_1 = HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0; HEAP32[($8_1 + 32 | 0) >> 2] = HEAP32[($8_1 + 796 | 0) >> 2] | 0; - $900($521_1 | 0, 88252 | 0, $8_1 + 32 | 0 | 0) | 0; + $900($521_1 | 0, 88261 | 0, $8_1 + 32 | 0 | 0) | 0; $527_1 = HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0; HEAP32[($8_1 + 48 | 0) >> 2] = HEAP32[($8_1 + 800 | 0) >> 2] | 0; - $900($527_1 | 0, 88214 | 0, $8_1 + 48 | 0 | 0) | 0; + $900($527_1 | 0, 88223 | 0, $8_1 + 48 | 0 | 0) | 0; $533_1 = HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0; HEAP32[($8_1 + 64 | 0) >> 2] = HEAP32[($8_1 + 796 | 0) >> 2] | 0; - $900($533_1 | 0, 88288 | 0, $8_1 + 64 | 0 | 0) | 0; + $900($533_1 | 0, 88297 | 0, $8_1 + 64 | 0 | 0) | 0; $539_1 = HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0; HEAP32[($8_1 + 80 | 0) >> 2] = HEAP32[($8_1 + 804 | 0) >> 2] | 0; - $900($539_1 | 0, 87951 | 0, $8_1 + 80 | 0 | 0) | 0; - $900(HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0 | 0, 87466 | 0, 0 | 0) | 0; - $900(HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0 | 0, 88201 | 0, 0 | 0) | 0; - $900(HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0 | 0, 88048 | 0, 0 | 0) | 0; - $900(HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0 | 0, 87605 | 0, 0 | 0) | 0; + $900($539_1 | 0, 87936 | 0, $8_1 + 80 | 0 | 0) | 0; + $900(HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0 | 0, 87451 | 0, 0 | 0) | 0; + $900(HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0 | 0, 88210 | 0, 0 | 0) | 0; + $900(HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0 | 0, 88033 | 0, 0 | 0) | 0; + $900(HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0 | 0, 87590 | 0, 0 | 0) | 0; $561_1 = HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0; HEAP32[($8_1 + 96 | 0) >> 2] = HEAP32[($8_1 + 784 | 0) >> 2] | 0; - $900($561_1 | 0, 88381 | 0, $8_1 + 96 | 0 | 0) | 0; + $900($561_1 | 0, 88390 | 0, $8_1 + 96 | 0 | 0) | 0; $567_1 = HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0; HEAP32[($8_1 + 112 | 0) >> 2] = HEAP32[($8_1 + 784 | 0) >> 2] | 0; - $900($567_1 | 0, 88343 | 0, $8_1 + 112 | 0 | 0) | 0; + $900($567_1 | 0, 88352 | 0, $8_1 + 112 | 0 | 0) | 0; $573_1 = HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0; HEAP32[($8_1 + 128 | 0) >> 2] = 71686; - $900($573_1 | 0, 88572 | 0, $8_1 + 128 | 0 | 0) | 0; - $900(HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0 | 0, 87471 | 0, 0 | 0) | 0; - $900(HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0 | 0, 88014 | 0, 0 | 0) | 0; - $900(HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0 | 0, 87474 | 0, 0 | 0) | 0; - $900(HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0 | 0, 88018 | 0, 0 | 0) | 0; - $900(HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0 | 0, 87478 | 0, 0 | 0) | 0; + $900($573_1 | 0, 88581 | 0, $8_1 + 128 | 0 | 0) | 0; + $900(HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0 | 0, 87456 | 0, 0 | 0) | 0; + $900(HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0 | 0, 87999 | 0, 0 | 0) | 0; + $900(HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0 | 0, 87459 | 0, 0 | 0) | 0; + $900(HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0 | 0, 88003 | 0, 0 | 0) | 0; + $900(HEAP32[((HEAP32[($8_1 + 836 | 0) >> 2] | 0) + 704 | 0) >> 2] | 0 | 0, 87463 | 0, 0 | 0) | 0; } HEAP8[($8_1 + 847 | 0) >> 0] = 1 & 1 | 0; } @@ -24169,7 +24169,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 40 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$24 } - fimport$0(81113 | 0, 77943 | 0, 32071 | 0, 66572 | 0); + fimport$0(81113 | 0, 77943 | 0, 32073 | 0, 66572 | 0); wasm2js_trap(); } $178_1 = $520(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0; @@ -25594,7 +25594,7 @@ function asmFunc(imports) { HEAP32[($6_1 + 528 | 0) >> 2] = HEAP32[((HEAP32[($6_1 + 548 | 0) >> 2] | 0) + 184 | 0) >> 2] | 0; HEAP32[($6_1 + 532 | 0) >> 2] = HEAP32[((HEAP32[($6_1 + 548 | 0) >> 2] | 0) + 184 | 0) >> 2] | 0; $78_1 = 0; - $251(48 | 0, HEAP32[($6_1 + 556 | 0) >> 2] | 0 | 0, $78_1 | 0, $6_1 + 508 | 0 | 0, 86815 | 0, $78_1 | 0) | 0; + $251(48 | 0, HEAP32[($6_1 + 556 | 0) >> 2] | 0 | 0, $78_1 | 0, $6_1 + 508 | 0 | 0, 86808 | 0, $78_1 | 0) | 0; } HEAP32[($6_1 + 504 | 0) >> 2] = 0; i64toi32_i32$0 = 0; @@ -25879,7 +25879,7 @@ function asmFunc(imports) { break label$24 } $375_1 = 0; - $251(39 | 0, HEAP32[($6_1 + 556 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($6_1 + 548 | 0) >> 2] | 0) + 184 | 0) >> 2] | 0 | 0, $375_1 | 0, 87094 | 0, $375_1 | 0) | 0; + $251(39 | 0, HEAP32[($6_1 + 556 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($6_1 + 548 | 0) >> 2] | 0) + 184 | 0) >> 2] | 0 | 0, $375_1 | 0, 87087 | 0, $375_1 | 0) | 0; } $74($6_1 + 448 | 0 | 0); $74($6_1 + 384 | 0 | 0); @@ -26129,7 +26129,7 @@ function asmFunc(imports) { break label$40 } $674_1 = 0; - $251(14 | 0, HEAP32[($6_1 + 556 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($6_1 + 548 | 0) >> 2] | 0) + 184 | 0) >> 2] | 0 | 0, $674_1 | 0, 87063 | 0, $674_1 | 0) | 0; + $251(14 | 0, HEAP32[($6_1 + 556 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($6_1 + 548 | 0) >> 2] | 0) + 184 | 0) >> 2] | 0 | 0, $674_1 | 0, 87056 | 0, $674_1 | 0) | 0; } $74($6_1 + 76 | 0 | 0); $74($6_1 + 16 | 0 | 0); @@ -26200,14 +26200,14 @@ function asmFunc(imports) { fimport$0(82450 | 0, 77943 | 0, 21446 | 0, 68627 | 0); wasm2js_trap(); } - HEAP32[($7_1 + 248 | 0) >> 2] = 88909; + HEAP32[($7_1 + 248 | 0) >> 2] = 89067; label$7 : { if (!((HEAP32[((HEAP32[((HEAP32[($7_1 + 260 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0) + 220 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$7 } HEAP32[($7_1 + 248 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[((HEAP32[($7_1 + 260 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0) + 220 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; } - HEAP32[($7_1 + 244 | 0) >> 2] = 88909; + HEAP32[($7_1 + 244 | 0) >> 2] = 89067; label$8 : { if (!((HEAP32[((HEAP32[((HEAP32[($7_1 + 256 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0) + 220 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$8 @@ -26220,7 +26220,7 @@ function asmFunc(imports) { HEAP32[($7_1 + 8 | 0) >> 2] = HEAP32[($7_1 + 244 | 0) >> 2] | 0; HEAP32[($7_1 + 4 | 0) >> 2] = $111_1; HEAP32[$7_1 >> 2] = $110_1; - $929($7_1 + 32 | 0 | 0, 200 | 0, 85717 | 0, $7_1 | 0) | 0; + $929($7_1 + 32 | 0 | 0, 200 | 0, 85710 | 0, $7_1 | 0) | 0; $115_1 = HEAP32[($7_1 + 268 | 0) >> 2] | 0; $116_1 = HEAP32[($7_1 + 264 | 0) >> 2] | 0; $120_1 = HEAP32[($7_1 + 248 | 0) >> 2] | 0; @@ -28426,7 +28426,7 @@ function asmFunc(imports) { $365_1 = HEAP32[($3_1 + 760 | 0) >> 2] | 0; $367_1 = HEAP32[((HEAP32[($3_1 + 760 | 0) >> 2] | 0) + 720 | 0) >> 2] | 0; HEAP32[($3_1 + 16 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($3_1 + 760 | 0) >> 2] | 0) + 720 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $251(680 | 0, $365_1 | 0, $367_1 | 0, 0 | 0, 86681 | 0, $3_1 + 16 | 0 | 0) | 0; + $251(680 | 0, $365_1 | 0, $367_1 | 0, 0 | 0, 86674 | 0, $3_1 + 16 | 0 | 0) | 0; $16(); break label$4; } @@ -28965,7 +28965,7 @@ function asmFunc(imports) { break label$69 } } - fimport$0(85750 | 0, 77943 | 0, 18386 | 0, 72125 | 0); + fimport$0(85743 | 0, 77943 | 0, 18386 | 0, 72125 | 0); wasm2js_trap(); } HEAP32[($3_1 + 764 | 0) >> 2] = HEAP32[($3_1 + 756 | 0) >> 2] | 0; @@ -29424,7 +29424,7 @@ function asmFunc(imports) { if (!(HEAP32[($3_1 + 84 | 0) >> 2] | 0)) { break label$7 } - fimport$0(83506 | 0, 77943 | 0, 48633 | 0, 74158 | 0); + fimport$0(83506 | 0, 77943 | 0, 48822 | 0, 74158 | 0); wasm2js_trap(); } label$8 : { @@ -29589,7 +29589,7 @@ function asmFunc(imports) { HEAP32[($3_1 + 92 | 0) >> 2] = 16; break label$1; } - fimport$0(75141 | 0, 77943 | 0, 48751 | 0, 74158 | 0); + fimport$0(75141 | 0, 77943 | 0, 48940 | 0, 74158 | 0); wasm2js_trap(); } $209_1 = HEAP32[($3_1 + 92 | 0) >> 2] | 0; @@ -30575,14 +30575,14 @@ function asmFunc(imports) { $610_1 = HEAP32[((HEAP32[((HEAP32[($4_1 + 972 | 0) >> 2] | 0) + 720 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; HEAP32[($4_1 + 20 | 0) >> 2] = (HEAP32[($4_1 + 640 | 0) >> 2] | 0) + 40 | 0; HEAP32[($4_1 + 16 | 0) >> 2] = $610_1; - $251(720 | 0, $605_1 | 0, $607_1 | 0, 0 | 0, 86727 | 0, $4_1 + 16 | 0 | 0) | 0; + $251(720 | 0, $605_1 | 0, $607_1 | 0, 0 | 0, 86720 | 0, $4_1 + 16 | 0 | 0) | 0; } break label$36; } $619_1 = HEAP32[($4_1 + 972 | 0) >> 2] | 0; $621_1 = HEAP32[((HEAP32[($4_1 + 972 | 0) >> 2] | 0) + 720 | 0) >> 2] | 0; HEAP32[($4_1 + 32 | 0) >> 2] = (HEAP32[((HEAP32[((HEAP32[($4_1 + 644 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0) + 40 | 0; - $251(720 | 0, $619_1 | 0, $621_1 | 0, 0 | 0, 86635 | 0, $4_1 + 32 | 0 | 0) | 0; + $251(720 | 0, $619_1 | 0, $621_1 | 0, 0 | 0, 86628 | 0, $4_1 + 32 | 0 | 0) | 0; } label$46 : { if (!($252(HEAP32[($4_1 + 972 | 0) >> 2] | 0 | 0, 8996 | 0) | 0)) { @@ -30893,7 +30893,7 @@ function asmFunc(imports) { $963_1 = HEAP32[((HEAP32[((HEAP32[($4_1 + 972 | 0) >> 2] | 0) + 720 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; HEAP32[($4_1 + 52 | 0) >> 2] = (HEAP32[((HEAP32[((HEAP32[($4_1 + 964 | 0) >> 2] | 0) + 60 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 40 | 0; HEAP32[($4_1 + 48 | 0) >> 2] = $963_1; - $251(720 | 0, $958_1 | 0, $960_1 | 0, 0 | 0, 86493 | 0, $4_1 + 48 | 0 | 0) | 0; + $251(720 | 0, $958_1 | 0, $960_1 | 0, 0 | 0, 86486 | 0, $4_1 + 48 | 0 | 0) | 0; } break label$59; } @@ -31342,14 +31342,14 @@ function asmFunc(imports) { HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; break label$3; } - fimport$0(75141 | 0, 77943 | 0, 47890 | 0, 69822 | 0); + fimport$0(75141 | 0, 77943 | 0, 48079 | 0, 69822 | 0); wasm2js_trap(); } label$5 : { if ((HEAP32[((HEAP32[($4_1 + 60 | 0) >> 2] | 0) + 56 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$5 } - fimport$0(81369 | 0, 77943 | 0, 47893 | 0, 69822 | 0); + fimport$0(81369 | 0, 77943 | 0, 48082 | 0, 69822 | 0); wasm2js_trap(); } HEAP32[($0_1 + 16 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 60 | 0) >> 2] | 0) + 56 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0; @@ -31570,7 +31570,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$4 } - fimport$0(82293 | 0, 77943 | 0, 28688 | 0, 70946 | 0); + fimport$0(82293 | 0, 77943 | 0, 28690 | 0, 70946 | 0); wasm2js_trap(); } HEAP32[($4_1 + 20 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0; @@ -31912,7 +31912,7 @@ function asmFunc(imports) { if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 160 | 0) >> 2] | 0) + 184 | 0) >> 2] | 0) >> 2] | 0 | 0) == (40 | 0) & 1 | 0) { break label$6 } - fimport$0(86957 | 0, 77943 | 0, 19055 | 0, 75990 | 0); + fimport$0(86950 | 0, 77943 | 0, 19055 | 0, 75990 | 0); wasm2js_trap(); } HEAP32[((HEAP32[($4_1 + 160 | 0) >> 2] | 0) + 168 | 0) >> 2] = HEAP32[($4_1 + 164 | 0) >> 2] | 0; @@ -32135,7 +32135,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$4 } - fimport$0(82686 | 0, 77943 | 0, 28117 | 0, 73521 | 0); + fimport$0(82686 | 0, 77943 | 0, 28119 | 0, 73521 | 0); wasm2js_trap(); } HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 32 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; @@ -32176,7 +32176,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$3 } - fimport$0(82686 | 0, 77943 | 0, 28129 | 0, 71398 | 0); + fimport$0(82686 | 0, 77943 | 0, 28131 | 0, 71398 | 0); wasm2js_trap(); } HEAP32[($3_1 + 8 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; @@ -32198,7 +32198,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$7 } - fimport$0(82686 | 0, 77943 | 0, 28141 | 0, 71398 | 0); + fimport$0(82686 | 0, 77943 | 0, 28143 | 0, 71398 | 0); wasm2js_trap(); } HEAP32[((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 28 | 0) >> 2] = 0; @@ -32484,7 +32484,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($3_1 + 16 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$20 } - fimport$0(81995 | 0, 77943 | 0, 35830 | 0, 67422 | 0); + fimport$0(81995 | 0, 77943 | 0, 35832 | 0, 67422 | 0); wasm2js_trap(); } HEAP32[($3_1 + 8 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 16 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0; @@ -36587,7 +36587,7 @@ function asmFunc(imports) { if ((HEAP32[($5_1 + 4 | 0) >> 2] | 0 | 0) != (HEAP32[$5_1 >> 2] | 0 | 0) & 1 | 0) { break label$25 } - fimport$0(76799 | 0, 77943 | 0, 48181 | 0, 71647 | 0); + fimport$0(76799 | 0, 77943 | 0, 48370 | 0, 71647 | 0); wasm2js_trap(); } label$26 : { @@ -37029,7 +37029,7 @@ function asmFunc(imports) { break label$35; } HEAP32[($3_1 + 72 | 0) >> 2] = -2; - fimport$0(75141 | 0, 77943 | 0, 48566 | 0, 74122 | 0); + fimport$0(75141 | 0, 77943 | 0, 48755 | 0, 74122 | 0); wasm2js_trap(); } break label$33; @@ -37058,7 +37058,7 @@ function asmFunc(imports) { HEAP32[($3_1 + 72 | 0) >> 2] = 1; break label$43; } - fimport$0(75141 | 0, 77943 | 0, 48584 | 0, 74122 | 0); + fimport$0(75141 | 0, 77943 | 0, 48773 | 0, 74122 | 0); wasm2js_trap(); } } @@ -37094,7 +37094,7 @@ function asmFunc(imports) { if ((HEAP32[($3_1 + 72 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0) { break label$46 } - fimport$0(84905 | 0, 77943 | 0, 48594 | 0, 74122 | 0); + fimport$0(84905 | 0, 77943 | 0, 48783 | 0, 74122 | 0); wasm2js_trap(); } $170_1 = HEAP32[($3_1 + 72 | 0) >> 2] | 0; @@ -37436,7 +37436,7 @@ function asmFunc(imports) { if (!(($310(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { break label$1 } - fimport$0(75141 | 0, 77943 | 0, 47966 | 0, 73308 | 0); + fimport$0(75141 | 0, 77943 | 0, 48155 | 0, 73308 | 0); wasm2js_trap(); } label$2 : { @@ -37793,7 +37793,7 @@ function asmFunc(imports) { } break label$7; } - fimport$0(75141 | 0, 77943 | 0, 48348 | 0, 67824 | 0); + fimport$0(75141 | 0, 77943 | 0, 48537 | 0, 67824 | 0); wasm2js_trap(); } HEAP32[($3_1 + 88 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 88 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0; @@ -37870,7 +37870,7 @@ function asmFunc(imports) { $74($3_1 + 16 | 0 | 0); break label$15; } - fimport$0(75141 | 0, 77943 | 0, 48386 | 0, 67824 | 0); + fimport$0(75141 | 0, 77943 | 0, 48575 | 0, 67824 | 0); wasm2js_trap(); } } @@ -37892,7 +37892,7 @@ function asmFunc(imports) { } break label$22; } - fimport$0(75141 | 0, 77943 | 0, 48400 | 0, 67824 | 0); + fimport$0(75141 | 0, 77943 | 0, 48589 | 0, 67824 | 0); wasm2js_trap(); } $200_1 = HEAP32[($3_1 + 96 | 0) >> 2] | 0; @@ -37938,7 +37938,7 @@ function asmFunc(imports) { } break label$7; } - fimport$0(75141 | 0, 77943 | 0, 48428 | 0, 67805 | 0); + fimport$0(75141 | 0, 77943 | 0, 48617 | 0, 67805 | 0); wasm2js_trap(); } HEAP32[($3_1 + 80 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 80 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0; @@ -37999,7 +37999,7 @@ function asmFunc(imports) { if (HEAP32[($3_1 + 88 | 0) >> 2] | 0) { break label$13 } - fimport$0(85009 | 0, 77943 | 0, 48472 | 0, 67805 | 0); + fimport$0(85009 | 0, 77943 | 0, 48661 | 0, 67805 | 0); wasm2js_trap(); } $113_1 = HEAP32[($3_1 + 88 | 0) >> 2] | 0; @@ -38848,7 +38848,7 @@ function asmFunc(imports) { i64toi32_i32$2 = $6_1; HEAP32[($6_1 + 96 | 0) >> 2] = $4172; HEAP32[($6_1 + 100 | 0) >> 2] = i64toi32_i32$5; - $251(50 | 0, $876_1 | 0, 0 | 0, $6_1 + 8348 | 0 | 0, 87396 | 0, $6_1 + 96 | 0 | 0) | 0; + $251(50 | 0, $876_1 | 0, 0 | 0, $6_1 + 8348 | 0 | 0, 87381 | 0, $6_1 + 96 | 0 | 0) | 0; } i64toi32_i32$1 = $6_1; i64toi32_i32$5 = HEAP32[($6_1 + 5864 | 0) >> 2] | 0; @@ -39727,7 +39727,7 @@ function asmFunc(imports) { break label$145 } $1418 = 0; - $251(36 | 0, HEAP32[($6_1 + 8552 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($6_1 + 8548 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0) + 184 | 0) >> 2] | 0 | 0, $1418 | 0, 86415 | 0, $1418 | 0) | 0; + $251(36 | 0, HEAP32[($6_1 + 8552 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($6_1 + 8548 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0) + 184 | 0) >> 2] | 0 | 0, $1418 | 0, 86408 | 0, $1418 | 0) | 0; $16(); break label$7; } @@ -39847,7 +39847,7 @@ function asmFunc(imports) { break label$167 } $1619 = 0; - $251(36 | 0, HEAP32[($6_1 + 8552 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($6_1 + 8548 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0) + 184 | 0) >> 2] | 0 | 0, $1619 | 0, 86415 | 0, $1619 | 0) | 0; + $251(36 | 0, HEAP32[($6_1 + 8552 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($6_1 + 8548 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0) + 184 | 0) >> 2] | 0 | 0, $1619 | 0, 86408 | 0, $1619 | 0) | 0; $16(); break label$7; } @@ -40202,7 +40202,7 @@ function asmFunc(imports) { break label$189 } $1884 = 0; - $251(36 | 0, HEAP32[($6_1 + 8552 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($6_1 + 8548 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0) + 184 | 0) >> 2] | 0 | 0, $1884 | 0, 86415 | 0, $1884 | 0) | 0; + $251(36 | 0, HEAP32[($6_1 + 8552 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($6_1 + 8548 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0) + 184 | 0) >> 2] | 0 | 0, $1884 | 0, 86408 | 0, $1884 | 0) | 0; $16(); break label$7; } @@ -44050,7 +44050,7 @@ function asmFunc(imports) { global$0 = $3_1; HEAP32[($3_1 + 12 | 0) >> 2] = $0_1; HEAP8[($3_1 + 11 | 0) >> 0] = 1; - $917(87044 | 0, 0 | 0) | 0; + $917(87037 | 0, 0 | 0) | 0; label$1 : { if (!((HEAP32[($3_1 + 12 | 0) >> 2] | 0) & 1 | 0)) { break label$1 @@ -44063,7 +44063,7 @@ function asmFunc(imports) { HEAP8[($3_1 + 11 | 0) >> 0] = 0; break label$2; } - $917(87054 | 0, 0 | 0) | 0; + $917(87047 | 0, 0 | 0) | 0; } $917(76634 | 0, 0 | 0) | 0; } @@ -44079,7 +44079,7 @@ function asmFunc(imports) { HEAP8[($3_1 + 11 | 0) >> 0] = 0; break label$5; } - $917(87054 | 0, 0 | 0) | 0; + $917(87047 | 0, 0 | 0) | 0; } $917(72967 | 0, 0 | 0) | 0; } @@ -44095,7 +44095,7 @@ function asmFunc(imports) { HEAP8[($3_1 + 11 | 0) >> 0] = 0; break label$8; } - $917(87054 | 0, 0 | 0) | 0; + $917(87047 | 0, 0 | 0) | 0; } $917(73103 | 0, 0 | 0) | 0; } @@ -44111,7 +44111,7 @@ function asmFunc(imports) { HEAP8[($3_1 + 11 | 0) >> 0] = 0; break label$11; } - $917(87054 | 0, 0 | 0) | 0; + $917(87047 | 0, 0 | 0) | 0; } $917(71550 | 0, 0 | 0) | 0; } @@ -44127,7 +44127,7 @@ function asmFunc(imports) { HEAP8[($3_1 + 11 | 0) >> 0] = 0; break label$14; } - $917(87054 | 0, 0 | 0) | 0; + $917(87047 | 0, 0 | 0) | 0; } $917(71474 | 0, 0 | 0) | 0; } @@ -44143,7 +44143,7 @@ function asmFunc(imports) { HEAP8[($3_1 + 11 | 0) >> 0] = 0; break label$17; } - $917(87054 | 0, 0 | 0) | 0; + $917(87047 | 0, 0 | 0) | 0; } $917(77193 | 0, 0 | 0) | 0; } @@ -44159,11 +44159,11 @@ function asmFunc(imports) { HEAP8[($3_1 + 11 | 0) >> 0] = 0; break label$20; } - $917(87054 | 0, 0 | 0) | 0; + $917(87047 | 0, 0 | 0) | 0; } $917(76750 | 0, 0 | 0) | 0; } - $917(87044 | 0, 0 | 0) | 0; + $917(87037 | 0, 0 | 0) | 0; global$0 = $3_1 + 16 | 0; return; } @@ -44216,7 +44216,7 @@ function asmFunc(imports) { if (($310(HEAP32[($5_1 + 88 | 0) >> 2] | 0 | 0) | 0) & 1 | 0) { break label$1 } - fimport$0(85966 | 0, 77943 | 0, 24398 | 0, 69842 | 0); + fimport$0(85959 | 0, 77943 | 0, 24398 | 0, 69842 | 0); wasm2js_trap(); } label$2 : { @@ -44262,8 +44262,8 @@ function asmFunc(imports) { HEAP32[($6_1 + 20 | 0) >> 2] = $2_1; HEAP32[($6_1 + 16 | 0) >> 2] = $3_1; i64toi32_i32$2 = 0; - i64toi32_i32$1 = HEAP32[(i64toi32_i32$2 + 116196 | 0) >> 2] | 0; - HEAP32[($6_1 + 8 | 0) >> 2] = HEAP32[(i64toi32_i32$2 + 116192 | 0) >> 2] | 0; + i64toi32_i32$1 = HEAP32[(i64toi32_i32$2 + 116356 | 0) >> 2] | 0; + HEAP32[($6_1 + 8 | 0) >> 2] = HEAP32[(i64toi32_i32$2 + 116352 | 0) >> 2] | 0; HEAP32[($6_1 + 12 | 0) >> 2] = i64toi32_i32$1; HEAP32[($6_1 + 4 | 0) >> 2] = $418(HEAP32[($6_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 24 | 0) >> 2] | 0 | 0, $6_1 + 8 | 0 | 0, HEAP32[($6_1 + 20 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 16 | 0) >> 2] | 0 | 0) | 0; $16_1 = HEAP32[($6_1 + 4 | 0) >> 2] | 0; @@ -44290,8 +44290,8 @@ function asmFunc(imports) { HEAP32[($6_1 + 4 | 0) >> 2] = HEAP32[($6_1 + 28 | 0) >> 2] | 0; HEAP32[($6_1 + 8 | 0) >> 2] = HEAP32[($6_1 + 20 | 0) >> 2] | 0; $14_1 = HEAPU8[($6_1 + 27 | 0) >> 0] | 0; - $16_1 = HEAP32[(0 + 117272 | 0) >> 2] | 0; - HEAP32[(0 + 117272 | 0) >> 2] = $16_1 + 1 | 0; + $16_1 = HEAP32[(0 + 117432 | 0) >> 2] | 0; + HEAP32[(0 + 117432 | 0) >> 2] = $16_1 + 1 | 0; $419($6_1 | 0, $14_1 & 1 | 0 | 0, $16_1 | 0, (HEAPU8[($6_1 + 19 | 0) >> 0] | 0) & 1 | 0 | 0); global$0 = $6_1 + 32 | 0; return; @@ -45311,7 +45311,7 @@ function asmFunc(imports) { HEAP32[($8_1 + 48 | 0) >> 2] = $52_1; $917(77949 | 0, $8_1 + 48 | 0 | 0) | 0; HEAP32[($8_1 + 64 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($8_1 + 616 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 60 | 0) >> 2] | 0; - $917(87484 | 0, $8_1 + 64 | 0 | 0) | 0; + $917(87469 | 0, $8_1 + 64 | 0 | 0) | 0; HEAP32[($8_1 + 596 | 0) >> 2] = HEAP32[((HEAP32[($8_1 + 600 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0; label$6 : { label$7 : while (1) { @@ -45341,7 +45341,7 @@ function asmFunc(imports) { $111_1 = HEAP32[((HEAP32[((HEAP32[(HEAP32[($8_1 + 592 | 0) >> 2] | 0) >> 2] | 0) + 28 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; break label$13; } - $111_1 = 88909; + $111_1 = 89067; } HEAP32[($8_1 + 588 | 0) >> 2] = $111_1; $892($8_1 + 384 | 0 | 0, 0 | 0, 200 | 0) | 0; @@ -45427,7 +45427,7 @@ function asmFunc(imports) { HEAP32[($8_1 + 36 | 0) >> 2] = 32; HEAP32[($8_1 + 32 | 0) >> 2] = $243_1; $917(77949 | 0, $8_1 + 32 | 0 | 0) | 0; - $917(87481 | 0, 0 | 0) | 0; + $917(87466 | 0, 0 | 0) | 0; } break label$1; } @@ -45449,7 +45449,7 @@ function asmFunc(imports) { $270_1 = HEAP32[((HEAP32[((HEAP32[($8_1 + 616 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 60 | 0) >> 2] | 0; HEAP32[($8_1 + 100 | 0) >> 2] = HEAP32[($8_1 + 612 | 0) >> 2] | 0; HEAP32[($8_1 + 96 | 0) >> 2] = $270_1; - $917(87292 | 0, $8_1 + 96 | 0 | 0) | 0; + $917(87277 | 0, $8_1 + 96 | 0 | 0) | 0; $409(HEAP32[((HEAP32[($8_1 + 616 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); label$22 : { label$23 : { @@ -45465,7 +45465,7 @@ function asmFunc(imports) { } break label$24; } - $917(87268 | 0, 0 | 0) | 0; + $917(87253 | 0, 0 | 0) | 0; label$26 : { label$27 : { if (!((HEAP32[((HEAP32[((HEAP32[($8_1 + 616 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 36 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { @@ -45484,7 +45484,7 @@ function asmFunc(imports) { $308_1 = HEAP32[((HEAP32[($8_1 + 616 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0; HEAP32[($8_1 + 132 | 0) >> 2] = HEAP32[($8_1 + 612 | 0) >> 2] | 0; HEAP32[($8_1 + 128 | 0) >> 2] = $308_1; - $917(87282 | 0, $8_1 + 128 | 0 | 0) | 0; + $917(87267 | 0, $8_1 + 128 | 0 | 0) | 0; $917(65975 | 0, 0 | 0) | 0; HEAP32[($8_1 + 232 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($8_1 + 616 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 56 | 0) >> 2] | 0; label$28 : { @@ -45496,7 +45496,7 @@ function asmFunc(imports) { $328_1 = HEAP32[((HEAP32[($8_1 + 232 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; HEAP32[($8_1 + 116 | 0) >> 2] = HEAP32[(HEAP32[($8_1 + 232 | 0) >> 2] | 0) >> 2] | 0; HEAP32[($8_1 + 112 | 0) >> 2] = $328_1; - $917(85739 | 0, $8_1 + 112 | 0 | 0) | 0; + $917(85732 | 0, $8_1 + 112 | 0 | 0) | 0; $411(HEAP32[($8_1 + 232 | 0) >> 2] | 0 | 0); $917(72903 | 0, 0 | 0) | 0; $917(85656 | 0, 0 | 0) | 0; @@ -45510,7 +45510,7 @@ function asmFunc(imports) { $917(72903 | 0, 0 | 0) | 0; $917(65921 | 0, 0 | 0) | 0; } - $917(88908 | 0, 0 | 0) | 0; + $917(89066 | 0, 0 | 0) | 0; $74($8_1 + 236 | 0 | 0); break label$18; } @@ -45526,14 +45526,14 @@ function asmFunc(imports) { $366_1 = HEAP32[((HEAP32[((HEAP32[($8_1 + 616 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 60 | 0) >> 2] | 0; HEAP32[($8_1 + 164 | 0) >> 2] = HEAP32[($8_1 + 612 | 0) >> 2] | 0; HEAP32[($8_1 + 160 | 0) >> 2] = $366_1; - $917(87292 | 0, $8_1 + 160 | 0 | 0) | 0; + $917(87277 | 0, $8_1 + 160 | 0 | 0) | 0; $409(HEAP32[((HEAP32[($8_1 + 616 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); break label$30; } $374_1 = HEAP32[((HEAP32[($8_1 + 616 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0; HEAP32[($8_1 + 196 | 0) >> 2] = HEAP32[($8_1 + 612 | 0) >> 2] | 0; HEAP32[($8_1 + 192 | 0) >> 2] = $374_1; - $917(87282 | 0, $8_1 + 192 | 0 | 0) | 0; + $917(87267 | 0, $8_1 + 192 | 0 | 0) | 0; $917(65975 | 0, 0 | 0) | 0; HEAP32[($8_1 + 228 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($8_1 + 616 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 56 | 0) >> 2] | 0; label$32 : { @@ -45544,7 +45544,7 @@ function asmFunc(imports) { $392_1 = HEAP32[((HEAP32[($8_1 + 228 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; HEAP32[($8_1 + 180 | 0) >> 2] = HEAP32[(HEAP32[($8_1 + 228 | 0) >> 2] | 0) >> 2] | 0; HEAP32[($8_1 + 176 | 0) >> 2] = $392_1; - $917(85739 | 0, $8_1 + 176 | 0 | 0) | 0; + $917(85732 | 0, $8_1 + 176 | 0 | 0) | 0; $411(HEAP32[($8_1 + 228 | 0) >> 2] | 0 | 0); $917(85656 | 0, 0 | 0) | 0; HEAP32[($8_1 + 228 | 0) >> 2] = HEAP32[((HEAP32[($8_1 + 228 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0; @@ -45554,7 +45554,7 @@ function asmFunc(imports) { $409(HEAP32[((HEAP32[($8_1 + 616 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); $917(65921 | 0, 0 | 0) | 0; } - $917(88908 | 0, 0 | 0) | 0; + $917(89066 | 0, 0 | 0) | 0; } } global$0 = $8_1 + 624 | 0; @@ -45617,8 +45617,8 @@ function asmFunc(imports) { HEAP32[($5_1 + 8 | 0) >> 2] = HEAP32[($5_1 + 120 | 0) >> 2] | 0; $26_1 = $229(HEAP32[($5_1 + 124 | 0) >> 2] | 0 | 0) | 0; $27_1 = HEAPU8[($5_1 + 119 | 0) >> 0] | 0; - $29_1 = HEAP32[(0 + 117272 | 0) >> 2] | 0; - HEAP32[(0 + 117272 | 0) >> 2] = $29_1 + 1 | 0; + $29_1 = HEAP32[(0 + 117432 | 0) >> 2] | 0; + HEAP32[(0 + 117432 | 0) >> 2] = $29_1 + 1 | 0; $438(0 | 0, $5_1 | 0, $5_1 + 16 | 0 | 0, $26_1 & 1 | 0 | 0, $27_1 & 1 | 0 | 0, $29_1 | 0); global$0 = $5_1 + 128 | 0; return; @@ -45660,8 +45660,8 @@ function asmFunc(imports) { $42_1 = HEAP32[($6_1 + 28 | 0) >> 2] | 0; $43_1 = HEAP32[($6_1 + 36 | 0) >> 2] | 0; $44_1 = HEAP32[($6_1 + 32 | 0) >> 2] | 0; - $46_1 = HEAP32[(0 + 117272 | 0) >> 2] | 0; - HEAP32[(0 + 117272 | 0) >> 2] = $46_1 + 1 | 0; + $46_1 = HEAP32[(0 + 117432 | 0) >> 2] | 0; + HEAP32[(0 + 117432 | 0) >> 2] = $46_1 + 1 | 0; $442($39_1 | 0, $40_1 | 0, $41_1 | 0, $42_1 | 0, $43_1 | 0, $44_1 | 0, $46_1 | 0); break label$1; } @@ -45800,7 +45800,7 @@ function asmFunc(imports) { $99_1 = HEAP32[((HEAP32[((HEAP32[(HEAP32[($9_1 + 276 | 0) >> 2] | 0) >> 2] | 0) + 28 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; break label$12; } - $99_1 = 88909; + $99_1 = 89067; } HEAP32[($9_1 + 272 | 0) >> 2] = $99_1; $892($9_1 + 64 | 0 | 0, 0 | 0, 200 | 0) | 0; @@ -46073,7 +46073,7 @@ function asmFunc(imports) { $86_1 = HEAP32[((HEAP32[((HEAP32[(HEAP32[($7_1 + 252 | 0) >> 2] | 0) >> 2] | 0) + 28 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; break label$12; } - $86_1 = 88909; + $86_1 = 89067; } HEAP32[($7_1 + 248 | 0) >> 2] = $86_1; $892($7_1 + 48 | 0 | 0, 0 | 0, 200 | 0) | 0; @@ -46388,8 +46388,8 @@ function asmFunc(imports) { HEAP32[($4_1 + 8 | 0) >> 2] = $1_1; $5_1 = HEAP32[($4_1 + 12 | 0) >> 2] | 0; $6_1 = HEAP32[($4_1 + 8 | 0) >> 2] | 0; - $8_1 = HEAP32[(0 + 117272 | 0) >> 2] | 0; - HEAP32[(0 + 117272 | 0) >> 2] = $8_1 + 1 | 0; + $8_1 = HEAP32[(0 + 117432 | 0) >> 2] | 0; + HEAP32[(0 + 117432 | 0) >> 2] = $8_1 + 1 | 0; $454($5_1 | 0, $6_1 | 0, $8_1 | 0); global$0 = $4_1 + 16 | 0; return; @@ -46937,8 +46937,8 @@ function asmFunc(imports) { $30_1 = HEAP32[($9_1 + 236 | 0) >> 2] | 0; $31_1 = HEAP32[($9_1 + 232 | 0) >> 2] | 0; $32_1 = HEAPU8[($9_1 + 231 | 0) >> 0] | 0; - $37_1 = HEAP32[(0 + 117272 | 0) >> 2] | 0; - HEAP32[(0 + 117272 | 0) >> 2] = $37_1 + 1 | 0; + $37_1 = HEAP32[(0 + 117432 | 0) >> 2] | 0; + HEAP32[(0 + 117432 | 0) >> 2] = $37_1 + 1 | 0; $461($28_1 | 0, $9_1 | 0, $29_1 & 1 | 0 | 0, $30_1 | 0, $31_1 | 0, $32_1 & 1 | 0 | 0, $9_1 + 16 | 0 | 0, $37_1 | 0); $988(HEAP32[($9_1 + 224 | 0) >> 2] | 0 | 0); global$0 = $9_1 + 256 | 0; @@ -47189,7 +47189,7 @@ function asmFunc(imports) { $376_1 = HEAP32[($10_1 + 720 | 0) >> 2] | 0; $377_1 = HEAP32[($10_1 + 716 | 0) >> 2] | 0; HEAP32[($10_1 + 80 | 0) >> 2] = HEAP32[($10_1 + 708 | 0) >> 2] | 0; - $251(29 | 0, $375_1 | 0, $376_1 | 0, $377_1 | 0, 86538 | 0, $10_1 + 80 | 0 | 0) | 0; + $251(29 | 0, $375_1 | 0, $376_1 | 0, $377_1 | 0, 86531 | 0, $10_1 + 80 | 0 | 0) | 0; } } label$28 : { @@ -47200,7 +47200,7 @@ function asmFunc(imports) { $390_1 = HEAP32[($10_1 + 720 | 0) >> 2] | 0; $391_1 = HEAP32[($10_1 + 716 | 0) >> 2] | 0; HEAP32[($10_1 + 64 | 0) >> 2] = HEAP32[($10_1 + 708 | 0) >> 2] | 0; - $251(30 | 0, $389_1 | 0, $390_1 | 0, $391_1 | 0, 86696 | 0, $10_1 + 64 | 0 | 0) | 0; + $251(30 | 0, $389_1 | 0, $390_1 | 0, $391_1 | 0, 86689 | 0, $10_1 + 64 | 0 | 0) | 0; } } global$0 = $10_1 + 736 | 0; @@ -47233,8 +47233,8 @@ function asmFunc(imports) { $16_1 = HEAPU8[($8_1 + 39 | 0) >> 0] | 0; $17_1 = HEAP32[($8_1 + 28 | 0) >> 2] | 0; $18_1 = HEAP32[($8_1 + 24 | 0) >> 2] | 0; - $20_1 = HEAP32[(0 + 117272 | 0) >> 2] | 0; - HEAP32[(0 + 117272 | 0) >> 2] = $20_1 + 1 | 0; + $20_1 = HEAP32[(0 + 117432 | 0) >> 2] | 0; + HEAP32[(0 + 117432 | 0) >> 2] = $20_1 + 1 | 0; $463($15_1 | 0, $8_1 + 8 | 0 | 0, $16_1 & 1 | 0 | 0, $17_1 | 0, $18_1 | 0, $20_1 | 0); global$0 = $8_1 + 48 | 0; return; @@ -49217,7 +49217,7 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($3_1 + 284 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$2 } - $11($3_1 + 272 | 0 | 0, 87464 | 0, 0 | 0) | 0; + $11($3_1 + 272 | 0 | 0, 87449 | 0, 0 | 0) | 0; } HEAP32[($3_1 + 60 | 0) >> 2] = 0; label$3 : { @@ -49286,7 +49286,7 @@ function asmFunc(imports) { $60_1 = HEAP32[($4_1 + 196 | 0) >> 2] | 0; HEAP32[($4_1 + 100 | 0) >> 2] = HEAP32[($4_1 + 192 | 0) >> 2] | 0; HEAP32[($4_1 + 96 | 0) >> 2] = $60_1; - $11($4_1 + 200 | 0 | 0, 87238 | 0, $4_1 + 96 | 0 | 0) | 0; + $11($4_1 + 200 | 0 | 0, 87223 | 0, $4_1 + 96 | 0 | 0) | 0; HEAP32[($4_1 + 112 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 220 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; $11($4_1 + 200 | 0 | 0, 69406 | 0, $4_1 + 112 | 0 | 0) | 0; break label$5; @@ -49294,7 +49294,7 @@ function asmFunc(imports) { $76_1 = HEAP32[($4_1 + 196 | 0) >> 2] | 0; HEAP32[($4_1 + 132 | 0) >> 2] = HEAP32[($4_1 + 192 | 0) >> 2] | 0; HEAP32[($4_1 + 128 | 0) >> 2] = $76_1; - $11($4_1 + 200 | 0 | 0, 87238 | 0, $4_1 + 128 | 0 | 0) | 0; + $11($4_1 + 200 | 0 | 0, 87223 | 0, $4_1 + 128 | 0 | 0) | 0; HEAP32[($4_1 + 144 | 0) >> 2] = 84633; $11($4_1 + 200 | 0 | 0, 69406 | 0, $4_1 + 144 | 0 | 0) | 0; } @@ -49310,12 +49310,12 @@ function asmFunc(imports) { $105_1 = HEAP32[($4_1 + 196 | 0) >> 2] | 0; HEAP32[($4_1 + 164 | 0) >> 2] = HEAP32[($4_1 + 192 | 0) >> 2] | 0; HEAP32[($4_1 + 160 | 0) >> 2] = $105_1; - $11($4_1 + 200 | 0 | 0, 87238 | 0, $4_1 + 160 | 0 | 0) | 0; + $11($4_1 + 200 | 0 | 0, 87223 | 0, $4_1 + 160 | 0 | 0) | 0; HEAP32[($4_1 + 176 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 220 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 184 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; $11($4_1 + 200 | 0 | 0, 69406 | 0, $4_1 + 176 | 0 | 0) | 0; break label$7; } - $11($4_1 + 200 | 0 | 0, 87001 | 0, 0 | 0) | 0; + $11($4_1 + 200 | 0 | 0, 86994 | 0, 0 | 0) | 0; } } HEAP32[($4_1 + 64 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 220 | 0) >> 2] | 0) + 60 | 0) >> 2] | 0; @@ -49343,13 +49343,13 @@ function asmFunc(imports) { if (!((HEAP32[($4_1 + 180 | 0) >> 2] | 0 | 0) <= ((HEAP32[($4_1 + 216 | 0) >> 2] | 0) - (HEAP32[($4_1 + 188 | 0) >> 2] | 0) | 0 | 0) & 1 | 0)) { break label$11 } - HEAP32[$4_1 >> 2] = 87464; + HEAP32[$4_1 >> 2] = 87449; $917(65553 | 0, $4_1 | 0) | 0; HEAP32[($4_1 + 180 | 0) >> 2] = (HEAP32[($4_1 + 180 | 0) >> 2] | 0) + 1 | 0; continue label$12; }; } - $917(88908 | 0, 0 | 0) | 0; + $917(89066 | 0, 0 | 0) | 0; global$0 = $4_1 + 224 | 0; return; } @@ -49445,7 +49445,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$4 } - fimport$0(80037 | 0, 77943 | 0, 28163 | 0, 66129 | 0); + fimport$0(80037 | 0, 77943 | 0, 28165 | 0, 66129 | 0); wasm2js_trap(); } $988(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); @@ -49475,14 +49475,14 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$3 } - fimport$0(82686 | 0, 77943 | 0, 28177 | 0, 73498 | 0); + fimport$0(82686 | 0, 77943 | 0, 28179 | 0, 73498 | 0); wasm2js_trap(); } label$4 : { if ((HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$4 } - fimport$0(80188 | 0, 77943 | 0, 28178 | 0, 73498 | 0); + fimport$0(80188 | 0, 77943 | 0, 28180 | 0, 73498 | 0); wasm2js_trap(); } HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 12 | 0) >> 2] = HEAP32[($4_1 + 8 | 0) >> 2] | 0; @@ -49824,7 +49824,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$5 } - fimport$0(82411 | 0, 77943 | 0, 28663 | 0, 71067 | 0); + fimport$0(82411 | 0, 77943 | 0, 28665 | 0, 71067 | 0); wasm2js_trap(); } HEAP32[($4_1 + 16 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0; @@ -49871,7 +49871,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($5_1 + 12 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$4 } - fimport$0(81993 | 0, 77943 | 0, 28705 | 0, 69536 | 0); + fimport$0(81993 | 0, 77943 | 0, 28707 | 0, 69536 | 0); wasm2js_trap(); } HEAP32[($5_1 + 8 | 0) >> 2] = HEAP32[((HEAP32[($5_1 + 12 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0; @@ -51580,7 +51580,7 @@ function asmFunc(imports) { if ((HEAPU8[(HEAP32[($5_1 + 8 | 0) >> 2] | 0) >> 0] | 0) & 1 | 0) { break label$1 } - $11(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, 87464 | 0, 0 | 0) | 0; + $11(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, 87449 | 0, 0 | 0) | 0; } $13_1 = HEAP32[($5_1 + 12 | 0) >> 2] | 0; HEAP32[$5_1 >> 2] = HEAP32[($5_1 + 4 | 0) >> 2] | 0; @@ -52061,7 +52061,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(80167 | 0, 77943 | 0, 30243 | 0, 74797 | 0); + fimport$0(80167 | 0, 77943 | 0, 30245 | 0, 74797 | 0); wasm2js_trap(); } $988(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); @@ -52085,7 +52085,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(80167 | 0, 77943 | 0, 34773 | 0, 74826 | 0); + fimport$0(80167 | 0, 77943 | 0, 34775 | 0, 74826 | 0); wasm2js_trap(); } $988(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); @@ -52108,7 +52108,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(80167 | 0, 77943 | 0, 32111 | 0, 74765 | 0); + fimport$0(80167 | 0, 77943 | 0, 32113 | 0, 74765 | 0); wasm2js_trap(); } label$3 : { @@ -52119,7 +52119,7 @@ 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(80135 | 0, 77943 | 0, 32114 | 0, 74765 | 0); + fimport$0(80135 | 0, 77943 | 0, 32116 | 0, 74765 | 0); wasm2js_trap(); } $988(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); @@ -52152,14 +52152,14 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 52 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$3 } - fimport$0(82686 | 0, 77943 | 0, 29705 | 0, 77627 | 0); + fimport$0(82686 | 0, 77943 | 0, 29707 | 0, 77627 | 0); wasm2js_trap(); } label$4 : { if ((HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 52 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$4 } - fimport$0(80188 | 0, 77943 | 0, 29706 | 0, 77627 | 0); + fimport$0(80188 | 0, 77943 | 0, 29708 | 0, 77627 | 0); wasm2js_trap(); } HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 52 | 0) >> 2] | 0) + 12 | 0) >> 2] = HEAP32[($4_1 + 8 | 0) >> 2] | 0; @@ -52312,7 +52312,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($4_1 + 16 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$28 } - fimport$0(80505 | 0, 77943 | 0, 29811 | 0, 68504 | 0); + fimport$0(80505 | 0, 77943 | 0, 29813 | 0, 68504 | 0); wasm2js_trap(); } $206_1 = $520(HEAP32[($4_1 + 24 | 0) >> 2] | 0 | 0) | 0; @@ -52595,7 +52595,7 @@ function asmFunc(imports) { break label$6; }; } - fimport$0(75141 | 0, 77943 | 0, 30805 | 0, 70922 | 0); + fimport$0(75141 | 0, 77943 | 0, 30807 | 0, 70922 | 0); wasm2js_trap(); } $247(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); @@ -52676,7 +52676,7 @@ function asmFunc(imports) { } break label$10; } - fimport$0(75141 | 0, 77943 | 0, 32156 | 0, 70873 | 0); + fimport$0(75141 | 0, 77943 | 0, 32158 | 0, 70873 | 0); wasm2js_trap(); } } @@ -52850,14 +52850,14 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$3 } - fimport$0(82686 | 0, 77943 | 0, 34671 | 0, 77670 | 0); + fimport$0(82686 | 0, 77943 | 0, 34673 | 0, 77670 | 0); wasm2js_trap(); } label$4 : { if ((HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$4 } - fimport$0(80188 | 0, 77943 | 0, 34672 | 0, 77670 | 0); + fimport$0(80188 | 0, 77943 | 0, 34674 | 0, 77670 | 0); wasm2js_trap(); } HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + 12 | 0) >> 2] = HEAP32[($4_1 + 8 | 0) >> 2] | 0; @@ -53016,13 +53016,13 @@ function asmFunc(imports) { $159_1 = HEAP32[($8_1 + 56 | 0) >> 2] | 0; $161_1 = HEAP32[((HEAP32[($8_1 + 56 | 0) >> 2] | 0) + 720 | 0) >> 2] | 0; HEAP32[$8_1 >> 2] = HEAP32[((HEAP32[((HEAP32[($8_1 + 56 | 0) >> 2] | 0) + 720 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $251(860 | 0, $159_1 | 0, $161_1 | 0, 0 | 0, 86663 | 0, $8_1 | 0) | 0; + $251(860 | 0, $159_1 | 0, $161_1 | 0, 0 | 0, 86656 | 0, $8_1 | 0) | 0; break label$22; } $168_1 = HEAP32[($8_1 + 56 | 0) >> 2] | 0; $170_1 = HEAP32[((HEAP32[($8_1 + 56 | 0) >> 2] | 0) + 720 | 0) >> 2] | 0; HEAP32[($8_1 + 16 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($8_1 + 56 | 0) >> 2] | 0) + 720 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $251(990 | 0, $168_1 | 0, $170_1 | 0, 0 | 0, 86463 | 0, $8_1 + 16 | 0 | 0) | 0; + $251(990 | 0, $168_1 | 0, $170_1 | 0, 0 | 0, 86456 | 0, $8_1 + 16 | 0 | 0) | 0; } $247(HEAP32[($8_1 + 56 | 0) >> 2] | 0 | 0); } @@ -53155,7 +53155,7 @@ function asmFunc(imports) { $124_1 = HEAP32[($3_1 + 28 | 0) >> 2] | 0; $125_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; - $251(1060 | 0, $124_1 | 0, $125_1 | 0, 0 | 0, 87735 | 0, $3_1 | 0) | 0; + $251(1060 | 0, $124_1 | 0, $125_1 | 0, 0 | 0, 87720 | 0, $3_1 | 0) | 0; break label$16; } $135_1 = 0; @@ -53189,7 +53189,7 @@ function asmFunc(imports) { break label$1 } } - fimport$0(75141 | 0, 77943 | 0, 34534 | 0, 71895 | 0); + fimport$0(75141 | 0, 77943 | 0, 34536 | 0, 71895 | 0); wasm2js_trap(); } HEAP32[($3_1 + 8 | 0) >> 2] = $992(1 | 0, 8 | 0) | 0; @@ -53328,7 +53328,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 48 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$2 } - fimport$0(80167 | 0, 77943 | 0, 37078 | 0, 74889 | 0); + fimport$0(80167 | 0, 77943 | 0, 37080 | 0, 74889 | 0); wasm2js_trap(); } $988(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); @@ -53352,7 +53352,7 @@ function asmFunc(imports) { if (!((HEAP32[(HEAP32[($5_1 + 80 | 0) >> 2] | 0) >> 2] | 0 | 0) != (128 | 0) & 1 | 0)) { break label$1 } - fimport$0(75141 | 0, 77943 | 0, 34298 | 0, 77956 | 0); + fimport$0(75141 | 0, 77943 | 0, 34300 | 0, 77956 | 0); wasm2js_trap(); } HEAP32[($5_1 + 80 | 0) >> 2] = $632(HEAP32[($5_1 + 80 | 0) >> 2] | 0 | 0) | 0; @@ -54560,7 +54560,7 @@ function asmFunc(imports) { if (!(HEAP32[((HEAP32[((HEAP32[($4_1 + 372 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 156 | 0) >> 2] | 0)) { break label$8 } - fimport$0(84936 | 0, 77943 | 0, 30366 | 0, 69493 | 0); + fimport$0(84936 | 0, 77943 | 0, 30368 | 0, 69493 | 0); wasm2js_trap(); } $71_1 = (HEAP32[((HEAP32[($4_1 + 372 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 148 | 0; @@ -54627,14 +54627,14 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[((HEAP32[($4_1 + 372 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$9 } - fimport$0(81808 | 0, 77943 | 0, 30370 | 0, 69493 | 0); + fimport$0(81808 | 0, 77943 | 0, 30372 | 0, 69493 | 0); wasm2js_trap(); } label$10 : { if ((HEAP32[((HEAP32[($4_1 + 380 | 0) >> 2] | 0) + 684 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$10 } - fimport$0(82745 | 0, 77943 | 0, 30372 | 0, 69493 | 0); + fimport$0(82745 | 0, 77943 | 0, 30374 | 0, 69493 | 0); wasm2js_trap(); } label$11 : { @@ -54655,14 +54655,14 @@ function asmFunc(imports) { if ((HEAP32[($4_1 + 296 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$14 } - fimport$0(82880 | 0, 77943 | 0, 30391 | 0, 69493 | 0); + fimport$0(82880 | 0, 77943 | 0, 30393 | 0, 69493 | 0); wasm2js_trap(); } label$15 : { if ((HEAP32[((HEAP32[($4_1 + 380 | 0) >> 2] | 0) + 684 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$15 } - fimport$0(82745 | 0, 77943 | 0, 30392 | 0, 69493 | 0); + fimport$0(82745 | 0, 77943 | 0, 30394 | 0, 69493 | 0); wasm2js_trap(); } label$16 : { @@ -54760,7 +54760,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($4_1 + 372 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$26 } - fimport$0(80765 | 0, 77943 | 0, 30451 | 0, 69493 | 0); + fimport$0(80765 | 0, 77943 | 0, 30453 | 0, 69493 | 0); wasm2js_trap(); } $321_1 = $564(HEAP32[($4_1 + 380 | 0) >> 2] | 0 | 0) | 0; @@ -54842,7 +54842,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[((HEAP32[($4_1 + 372 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$39 } - fimport$0(81808 | 0, 77943 | 0, 30510 | 0, 69493 | 0); + fimport$0(81808 | 0, 77943 | 0, 30512 | 0, 69493 | 0); wasm2js_trap(); } label$40 : { @@ -54973,7 +54973,7 @@ function asmFunc(imports) { if ((HEAP32[($4_1 + 172 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$46 } - fimport$0(80486 | 0, 77943 | 0, 30543 | 0, 69493 | 0); + fimport$0(80486 | 0, 77943 | 0, 30545 | 0, 69493 | 0); wasm2js_trap(); } HEAP32[($4_1 + 172 | 0) >> 2] = $936(HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 372 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) | 0; @@ -55159,14 +55159,14 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$3 } - fimport$0(82686 | 0, 77943 | 0, 30696 | 0, 77327 | 0); + fimport$0(82686 | 0, 77943 | 0, 30698 | 0, 77327 | 0); wasm2js_trap(); } label$4 : { if ((HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$4 } - fimport$0(80188 | 0, 77943 | 0, 30697 | 0, 77327 | 0); + fimport$0(80188 | 0, 77943 | 0, 30699 | 0, 77327 | 0); wasm2js_trap(); } HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 12 | 0) >> 2] = HEAP32[($4_1 + 8 | 0) >> 2] | 0; @@ -55284,7 +55284,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($3_1 + 1832 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$9 } - fimport$0(83091 | 0, 77943 | 0, 30034 | 0, 71838 | 0); + fimport$0(83091 | 0, 77943 | 0, 30036 | 0, 71838 | 0); wasm2js_trap(); } HEAP32[($3_1 + 1820 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($3_1 + 1832 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; @@ -55359,7 +55359,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($3_1 + 1832 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$16 } - fimport$0(79962 | 0, 77943 | 0, 30067 | 0, 71838 | 0); + fimport$0(79962 | 0, 77943 | 0, 30069 | 0, 71838 | 0); wasm2js_trap(); } HEAP32[((HEAP32[($3_1 + 1832 | 0) >> 2] | 0) + 24 | 0) >> 2] = HEAP32[($3_1 + 1788 | 0) >> 2] | 0; @@ -55552,7 +55552,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$3 } - fimport$0(80909 | 0, 77943 | 0, 39997 | 0, 71808 | 0); + fimport$0(80909 | 0, 77943 | 0, 39999 | 0, 71808 | 0); wasm2js_trap(); } HEAP32[($4_1 + 4 | 0) >> 2] = $545(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0) | 0; @@ -55568,7 +55568,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$5 } - fimport$0(81307 | 0, 77943 | 0, 40006 | 0, 71808 | 0); + fimport$0(81307 | 0, 77943 | 0, 40008 | 0, 71808 | 0); wasm2js_trap(); } $547(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, (HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 28 | 0 | 0); @@ -55599,7 +55599,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$1 } - fimport$0(80933 | 0, 77943 | 0, 40036 | 0, 66089 | 0); + fimport$0(80933 | 0, 77943 | 0, 40038 | 0, 66089 | 0); wasm2js_trap(); } global$0 = $3_1 + 16 | 0; @@ -55627,7 +55627,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$3 } - fimport$0(81307 | 0, 77943 | 0, 45919 | 0, 71779 | 0); + fimport$0(81307 | 0, 77943 | 0, 46108 | 0, 71779 | 0); wasm2js_trap(); } label$4 : { @@ -55962,7 +55962,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($4_1 + 76 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$10 } - fimport$0(80955 | 0, 77943 | 0, 45893 | 0, 71756 | 0); + fimport$0(80955 | 0, 77943 | 0, 46082 | 0, 71756 | 0); wasm2js_trap(); } $313($4_1 + 12 | 0 | 0, (HEAP32[((HEAP32[((HEAP32[($4_1 + 72 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 148 | 0 | 0); @@ -56472,7 +56472,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($3_1 + 4 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$39 } - fimport$0(82174 | 0, 77943 | 0, 31215 | 0, 71140 | 0); + fimport$0(82174 | 0, 77943 | 0, 31217 | 0, 71140 | 0); wasm2js_trap(); } $247(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0); @@ -56931,7 +56931,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 720 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$8 } - fimport$0(81546 | 0, 77943 | 0, 33264 | 0, 66682 | 0); + fimport$0(81546 | 0, 77943 | 0, 33266 | 0, 66682 | 0); wasm2js_trap(); } label$9 : { @@ -57556,7 +57556,7 @@ function asmFunc(imports) { if (($272(HEAP32[($5_1 + 76 | 0) >> 2] | 0 | 0) | 0) & 1 | 0) { break label$1 } - fimport$0(85944 | 0, 77943 | 0, 47921 | 0, 69794 | 0); + fimport$0(85937 | 0, 77943 | 0, 48110 | 0, 69794 | 0); wasm2js_trap(); } $220($5_1 + 12 | 0 | 0, HEAP32[($5_1 + 76 | 0) >> 2] | 0 | 0); @@ -57753,7 +57753,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($3_1 + 160 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$15 } - fimport$0(82293 | 0, 77943 | 0, 31381 | 0, 71041 | 0); + fimport$0(82293 | 0, 77943 | 0, 31383 | 0, 71041 | 0); wasm2js_trap(); } HEAP32[($3_1 + 164 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 160 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0; @@ -57800,9 +57800,9 @@ function asmFunc(imports) { break label$9; } $173_1 = (HEAP32[($3_1 + 168 | 0) >> 2] | 0) + 40 | 0; - HEAP32[($3_1 + 48 | 0) >> 2] = HEAP32[(0 + 117440 | 0) >> 2] | 0; + HEAP32[($3_1 + 48 | 0) >> 2] = HEAP32[(0 + 117600 | 0) >> 2] | 0; $929($173_1 | 0, 200 | 0, 77767 | 0, $3_1 + 48 | 0 | 0) | 0; - HEAP32[(0 + 117440 | 0) >> 2] = (HEAP32[(0 + 117440 | 0) >> 2] | 0) + 1 | 0; + HEAP32[(0 + 117600 | 0) >> 2] = (HEAP32[(0 + 117600 | 0) >> 2] | 0) + 1 | 0; HEAP8[((HEAP32[($3_1 + 168 | 0) >> 2] | 0) + 240 | 0) >> 0] = 1; HEAP32[((HEAP32[($3_1 + 168 | 0) >> 2] | 0) + 244 | 0) >> 2] = HEAP32[(HEAP32[((HEAP32[($3_1 + 172 | 0) >> 2] | 0) + 684 | 0) >> 2] | 0) >> 2] | 0; i64toi32_i32$0 = 0; @@ -58014,9 +58014,9 @@ function asmFunc(imports) { break label$7; } $65_1 = (HEAP32[($3_1 + 104 | 0) >> 2] | 0) + 12 | 0; - HEAP32[($3_1 + 16 | 0) >> 2] = HEAP32[(0 + 117440 | 0) >> 2] | 0; + HEAP32[($3_1 + 16 | 0) >> 2] = HEAP32[(0 + 117600 | 0) >> 2] | 0; $929($65_1 | 0, 200 | 0, 77746 | 0, $3_1 + 16 | 0 | 0) | 0; - HEAP32[(0 + 117440 | 0) >> 2] = (HEAP32[(0 + 117440 | 0) >> 2] | 0) + 1 | 0; + HEAP32[(0 + 117600 | 0) >> 2] = (HEAP32[(0 + 117600 | 0) >> 2] | 0) + 1 | 0; } label$9 : { if (!((HEAP32[((HEAP32[($3_1 + 108 | 0) >> 2] | 0) + 720 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { @@ -58470,7 +58470,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$2 } - fimport$0(80167 | 0, 77943 | 0, 31745 | 0, 74882 | 0); + fimport$0(80167 | 0, 77943 | 0, 31747 | 0, 74882 | 0); wasm2js_trap(); } $66(HEAP32[(HEAP32[($3_1 + 12 | 0) >> 2] | 0) >> 2] | 0 | 0); @@ -58674,14 +58674,14 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$3 } - fimport$0(82686 | 0, 77943 | 0, 31686 | 0, 77507 | 0); + fimport$0(82686 | 0, 77943 | 0, 31688 | 0, 77507 | 0); wasm2js_trap(); } label$4 : { if ((HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$4 } - fimport$0(80188 | 0, 77943 | 0, 31687 | 0, 77507 | 0); + fimport$0(80188 | 0, 77943 | 0, 31689 | 0, 77507 | 0); wasm2js_trap(); } HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 20 | 0) >> 2] = HEAP32[($4_1 + 8 | 0) >> 2] | 0; @@ -58870,7 +58870,7 @@ 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(80167 | 0, 77943 | 0, 31595 | 0, 74722 | 0); + fimport$0(80167 | 0, 77943 | 0, 31597 | 0, 74722 | 0); wasm2js_trap(); } $62(HEAP32[(HEAP32[($3_1 + 12 | 0) >> 2] | 0) >> 2] | 0 | 0); @@ -58900,14 +58900,14 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$3 } - fimport$0(82686 | 0, 77943 | 0, 31609 | 0, 77352 | 0); + fimport$0(82686 | 0, 77943 | 0, 31611 | 0, 77352 | 0); wasm2js_trap(); } label$4 : { if ((HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$4 } - fimport$0(80188 | 0, 77943 | 0, 31610 | 0, 77352 | 0); + fimport$0(80188 | 0, 77943 | 0, 31612 | 0, 77352 | 0); wasm2js_trap(); } HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 8 | 0) >> 2] = HEAP32[($4_1 + 8 | 0) >> 2] | 0; @@ -59041,14 +59041,14 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$3 } - fimport$0(82686 | 0, 77943 | 0, 31959 | 0, 77439 | 0); + fimport$0(82686 | 0, 77943 | 0, 31961 | 0, 77439 | 0); wasm2js_trap(); } label$4 : { if ((HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$4 } - fimport$0(80188 | 0, 77943 | 0, 31960 | 0, 77439 | 0); + fimport$0(80188 | 0, 77943 | 0, 31962 | 0, 77439 | 0); wasm2js_trap(); } HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0) + 12 | 0) >> 2] = HEAP32[($4_1 + 8 | 0) >> 2] | 0; @@ -59193,7 +59193,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($5_1 + 48 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$9 } - fimport$0(80333 | 0, 77943 | 0, 32521 | 0, 69471 | 0); + fimport$0(80333 | 0, 77943 | 0, 32523 | 0, 69471 | 0); wasm2js_trap(); } $96_1 = $390(HEAP32[($5_1 + 60 | 0) >> 2] | 0 | 0, 1 & 1 | 0 | 0) | 0; @@ -59253,14 +59253,14 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$3 } - fimport$0(82686 | 0, 77943 | 0, 32377 | 0, 77307 | 0); + fimport$0(82686 | 0, 77943 | 0, 32379 | 0, 77307 | 0); wasm2js_trap(); } label$4 : { if ((HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$4 } - fimport$0(80188 | 0, 77943 | 0, 32378 | 0, 77307 | 0); + fimport$0(80188 | 0, 77943 | 0, 32380 | 0, 77307 | 0); wasm2js_trap(); } HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 20 | 0) >> 2] = HEAP32[($4_1 + 8 | 0) >> 2] | 0; @@ -59901,14 +59901,14 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$3 } - fimport$0(82686 | 0, 77943 | 0, 33305 | 0, 77468 | 0); + fimport$0(82686 | 0, 77943 | 0, 33307 | 0, 77468 | 0); wasm2js_trap(); } label$4 : { if ((HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$4 } - fimport$0(80188 | 0, 77943 | 0, 33306 | 0, 77468 | 0); + fimport$0(80188 | 0, 77943 | 0, 33308 | 0, 77468 | 0); wasm2js_trap(); } HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] = HEAP32[($4_1 + 8 | 0) >> 2] | 0; @@ -60016,7 +60016,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(80167 | 0, 77943 | 0, 33519 | 0, 74853 | 0); + fimport$0(80167 | 0, 77943 | 0, 33521 | 0, 74853 | 0); wasm2js_trap(); } $988(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); @@ -60161,7 +60161,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[((HEAP32[($3_1 + 104 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$9 } - fimport$0(81492 | 0, 77943 | 0, 33585 | 0, 71873 | 0); + fimport$0(81492 | 0, 77943 | 0, 33587 | 0, 71873 | 0); wasm2js_trap(); } $85((HEAP32[((HEAP32[($3_1 + 108 | 0) >> 2] | 0) + 684 | 0) >> 2] | 0) + 16 | 0 | 0, HEAP32[((HEAP32[((HEAP32[((HEAP32[($3_1 + 104 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, $3_1 | 0) | 0; @@ -60199,14 +60199,14 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$3 } - fimport$0(82686 | 0, 77943 | 0, 33434 | 0, 77420 | 0); + fimport$0(82686 | 0, 77943 | 0, 33436 | 0, 77420 | 0); wasm2js_trap(); } label$4 : { if ((HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$4 } - fimport$0(80188 | 0, 77943 | 0, 33435 | 0, 77420 | 0); + fimport$0(80188 | 0, 77943 | 0, 33437 | 0, 77420 | 0); wasm2js_trap(); } HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 12 | 0) >> 2] = HEAP32[($4_1 + 8 | 0) >> 2] | 0; @@ -60348,14 +60348,14 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$3 } - fimport$0(82686 | 0, 77943 | 0, 33983 | 0, 77399 | 0); + fimport$0(82686 | 0, 77943 | 0, 33985 | 0, 77399 | 0); wasm2js_trap(); } label$4 : { if ((HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$4 } - fimport$0(80188 | 0, 77943 | 0, 33984 | 0, 77399 | 0); + fimport$0(80188 | 0, 77943 | 0, 33986 | 0, 77399 | 0); wasm2js_trap(); } HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] = HEAP32[($4_1 + 8 | 0) >> 2] | 0; @@ -60385,14 +60385,14 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$3 } - fimport$0(82686 | 0, 77943 | 0, 33952 | 0, 77492 | 0); + fimport$0(82686 | 0, 77943 | 0, 33954 | 0, 77492 | 0); wasm2js_trap(); } label$4 : { if ((HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$4 } - fimport$0(80188 | 0, 77943 | 0, 33953 | 0, 77492 | 0); + fimport$0(80188 | 0, 77943 | 0, 33955 | 0, 77492 | 0); wasm2js_trap(); } HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 8 | 0) >> 2] = HEAP32[($4_1 + 8 | 0) >> 2] | 0; @@ -60511,7 +60511,7 @@ 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(80167 | 0, 77943 | 0, 34226 | 0, 74747 | 0); + fimport$0(80167 | 0, 77943 | 0, 34228 | 0, 74747 | 0); wasm2js_trap(); } $72(HEAP32[(HEAP32[($3_1 + 12 | 0) >> 2] | 0) >> 2] | 0 | 0); @@ -60616,14 +60616,14 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$3 } - fimport$0(82686 | 0, 77943 | 0, 34163 | 0, 77379 | 0); + fimport$0(82686 | 0, 77943 | 0, 34165 | 0, 77379 | 0); wasm2js_trap(); } label$4 : { if ((HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$4 } - fimport$0(80188 | 0, 77943 | 0, 34164 | 0, 77379 | 0); + fimport$0(80188 | 0, 77943 | 0, 34166 | 0, 77379 | 0); wasm2js_trap(); } HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 8 | 0) >> 2] = HEAP32[($4_1 + 8 | 0) >> 2] | 0; @@ -60926,14 +60926,14 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$3 } - fimport$0(82686 | 0, 77943 | 0, 34847 | 0, 77585 | 0); + fimport$0(82686 | 0, 77943 | 0, 34849 | 0, 77585 | 0); wasm2js_trap(); } label$4 : { if ((HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$4 } - fimport$0(80188 | 0, 77943 | 0, 34848 | 0, 77585 | 0); + fimport$0(80188 | 0, 77943 | 0, 34850 | 0, 77585 | 0); wasm2js_trap(); } HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 12 | 0) >> 2] = HEAP32[($4_1 + 8 | 0) >> 2] | 0; @@ -60959,7 +60959,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(80167 | 0, 77943 | 0, 34834 | 0, 74993 | 0); + fimport$0(80167 | 0, 77943 | 0, 34836 | 0, 74993 | 0); wasm2js_trap(); } $988(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); @@ -61334,14 +61334,14 @@ function asmFunc(imports) { break label$18 } $104_1 = 0; - $251(1090 | 0, HEAP32[($3_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 720 | 0) >> 2] | 0 | 0, $104_1 | 0, 86933 | 0, $104_1 | 0) | 0; + $251(1090 | 0, HEAP32[($3_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 720 | 0) >> 2] | 0 | 0, $104_1 | 0, 86926 | 0, $104_1 | 0) | 0; } label$19 : { if (!(HEAP32[($3_1 + 12 | 0) >> 2] | 0)) { break label$19 } $111_1 = 0; - $251(1090 | 0, HEAP32[($3_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 720 | 0) >> 2] | 0 | 0, $111_1 | 0, 86909 | 0, $111_1 | 0) | 0; + $251(1090 | 0, HEAP32[($3_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($3_1 + 28 | 0) >> 2] | 0) + 720 | 0) >> 2] | 0 | 0, $111_1 | 0, 86902 | 0, $111_1 | 0) | 0; } if (!(0 & 1 | 0)) { break label$1 @@ -61656,7 +61656,7 @@ function asmFunc(imports) { break label$15 } $127_1 = 0; - $251(8 | 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) + 184 | 0) >> 2] | 0 | 0, $127_1 | 0, 87158 | 0, $127_1 | 0) | 0; + $251(8 | 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) + 184 | 0) >> 2] | 0 | 0, $127_1 | 0, 87143 | 0, $127_1 | 0) | 0; } } } @@ -61837,12 +61837,12 @@ function asmFunc(imports) { i64toi32_i32$0 = $3_1; HEAP32[($3_1 + 16 | 0) >> 2] = $561_1; HEAP32[($3_1 + 20 | 0) >> 2] = i64toi32_i32$1; - $251(44 | 0, $108_1 | 0, $111_1 | 0, 0 | 0, 86865 | 0, $3_1 + 16 | 0 | 0) | 0; + $251(44 | 0, $108_1 | 0, $111_1 | 0, 0 | 0, 86858 | 0, $3_1 + 16 | 0 | 0) | 0; label$17 : { if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 52 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$17 } - fimport$0(82598 | 0, 77943 | 0, 35599 | 0, 73190 | 0); + fimport$0(82598 | 0, 77943 | 0, 35601 | 0, 73190 | 0); wasm2js_trap(); } $136_1 = 0; @@ -61929,7 +61929,7 @@ function asmFunc(imports) { i64toi32_i32$1 = $3_1; HEAP32[$3_1 >> 2] = $885_1; HEAP32[($3_1 + 4 | 0) >> 2] = i64toi32_i32$0; - $251(3 | 0, $269_1 | 0, $272_1 | 0, 0 | 0, 86764 | 0, $3_1 | 0) | 0; + $251(3 | 0, $269_1 | 0, $272_1 | 0, 0 | 0, 86757 | 0, $3_1 | 0) | 0; break label$26; } } @@ -62042,7 +62042,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 720 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$1 } - fimport$0(81546 | 0, 77943 | 0, 35230 | 0, 73330 | 0); + fimport$0(81546 | 0, 77943 | 0, 35232 | 0, 73330 | 0); wasm2js_trap(); } HEAP32[($3_1 + 8 | 0) >> 2] = $992(1 | 0, 20 | 0) | 0; @@ -62283,7 +62283,7 @@ function asmFunc(imports) { } break label$17; } - fimport$0(75141 | 0, 77943 | 0, 36846 | 0, 67116 | 0); + fimport$0(75141 | 0, 77943 | 0, 36848 | 0, 67116 | 0); wasm2js_trap(); } } @@ -62552,7 +62552,7 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[((HEAP32[(HEAP32[($3_1 + 68 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) != (HEAP32[((HEAP32[((HEAP32[(HEAP32[($3_1 + 68 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) & 1 | 0)) { break label$22 } - fimport$0(75141 | 0, 77943 | 0, 36329 | 0, 67174 | 0); + fimport$0(75141 | 0, 77943 | 0, 36331 | 0, 67174 | 0); wasm2js_trap(); } HEAP32[((HEAP32[((HEAP32[($3_1 + 68 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 12 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[(HEAP32[($3_1 + 68 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0; @@ -62616,7 +62616,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($3_1 + 68 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$27 } - fimport$0(80862 | 0, 77943 | 0, 36391 | 0, 67174 | 0); + fimport$0(80862 | 0, 77943 | 0, 36393 | 0, 67174 | 0); wasm2js_trap(); } HEAP32[((HEAP32[($3_1 + 68 | 0) >> 2] | 0) + 8 | 0) >> 2] = HEAP32[($3_1 + 36 | 0) >> 2] | 0; @@ -62692,7 +62692,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($3_1 + 68 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$36 } - fimport$0(80430 | 0, 77943 | 0, 36439 | 0, 67174 | 0); + fimport$0(80430 | 0, 77943 | 0, 36441 | 0, 67174 | 0); wasm2js_trap(); } HEAP32[($3_1 + 20 | 0) >> 2] = $670(HEAP32[($3_1 + 108 | 0) >> 2] | 0 | 0) | 0; @@ -63152,7 +63152,7 @@ function asmFunc(imports) { if ((HEAP32[(HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 720 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9036 | 0) & 1 | 0) { break label$5 } - fimport$0(78130 | 0, 77943 | 0, 36134 | 0, 66990 | 0); + fimport$0(78130 | 0, 77943 | 0, 36136 | 0, 66990 | 0); wasm2js_trap(); } HEAP32[($3_1 + 4 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 12 | 0) >> 2] | 0) + 692 | 0) >> 2] | 0; @@ -63195,7 +63195,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$10 } - fimport$0(80379 | 0, 77943 | 0, 36167 | 0, 66990 | 0); + fimport$0(80379 | 0, 77943 | 0, 36169 | 0, 66990 | 0); wasm2js_trap(); } $102_1 = $670(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0) | 0; @@ -63795,7 +63795,7 @@ 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(80167 | 0, 77943 | 0, 35945 | 0, 74975 | 0); + fimport$0(80167 | 0, 77943 | 0, 35947 | 0, 74975 | 0); wasm2js_trap(); } $988(HEAP32[($3_1 + 12 | 0) >> 2] | 0 | 0); @@ -64021,14 +64021,14 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$3 } - fimport$0(82686 | 0, 77943 | 0, 35881 | 0, 77550 | 0); + fimport$0(82686 | 0, 77943 | 0, 35883 | 0, 77550 | 0); wasm2js_trap(); } label$4 : { if ((HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$4 } - fimport$0(80188 | 0, 77943 | 0, 35882 | 0, 77550 | 0); + fimport$0(80188 | 0, 77943 | 0, 35884 | 0, 77550 | 0); wasm2js_trap(); } HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 16 | 0) >> 2] = HEAP32[($4_1 + 8 | 0) >> 2] | 0; @@ -64181,14 +64181,14 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$3 } - fimport$0(82686 | 0, 77943 | 0, 36925 | 0, 77514 | 0); + fimport$0(82686 | 0, 77943 | 0, 36927 | 0, 77514 | 0); wasm2js_trap(); } label$4 : { if ((HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 48 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$4 } - fimport$0(80188 | 0, 77943 | 0, 36926 | 0, 77514 | 0); + fimport$0(80188 | 0, 77943 | 0, 36928 | 0, 77514 | 0); wasm2js_trap(); } HEAP32[((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 48 | 0) >> 2] = HEAP32[($4_1 + 8 | 0) >> 2] | 0; @@ -64286,7 +64286,7 @@ function asmFunc(imports) { HEAP32[($6_1 + 56 | 0) >> 2] = $2_1; HEAP32[($6_1 + 52 | 0) >> 2] = $3_1; HEAP8[(HEAP32[($6_1 + 52 | 0) >> 2] | 0) >> 0] = 0; - HEAP32[(0 + 117440 | 0) >> 2] = 0; + HEAP32[(0 + 117600 | 0) >> 2] = 0; i64toi32_i32$0 = 0; i64toi32_i32$1 = $0_1; HEAP32[i64toi32_i32$1 >> 2] = 0; @@ -64398,7 +64398,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($3_1 + 20 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$11 } - fimport$0(81995 | 0, 77943 | 0, 37166 | 0, 75710 | 0); + fimport$0(81995 | 0, 77943 | 0, 37168 | 0, 75710 | 0); wasm2js_trap(); } HEAP32[($3_1 + 12 | 0) >> 2] = HEAP32[((HEAP32[($3_1 + 20 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0; @@ -64460,107 +64460,116 @@ function asmFunc(imports) { function $690($0_1, $1_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; - var $4_1 = 0, i64toi32_i32$0 = 0, $59_1 = 0, $110_1 = 0, $161_1 = 0; - $4_1 = global$0 - 144 | 0; + var $4_1 = 0, i64toi32_i32$0 = 0, $59_1 = 0, $110_1 = 0, $159_1 = 0, $171_1 = 0; + $4_1 = global$0 - 160 | 0; global$0 = $4_1; - HEAP32[($4_1 + 140 | 0) >> 2] = $0_1; - HEAP32[($4_1 + 136 | 0) >> 2] = $1_1; - HEAP32[($4_1 + 128 | 0) >> 2] = 0; + HEAP32[($4_1 + 156 | 0) >> 2] = $0_1; + HEAP32[($4_1 + 152 | 0) >> 2] = $1_1; + HEAP32[($4_1 + 144 | 0) >> 2] = 0; i64toi32_i32$0 = 0; - HEAP32[($4_1 + 120 | 0) >> 2] = 0; - HEAP32[($4_1 + 124 | 0) >> 2] = i64toi32_i32$0; - HEAP32[(HEAP32[($4_1 + 140 | 0) >> 2] | 0) >> 2] = 0; - HEAP32[($4_1 + 116 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 140 | 0) >> 2] | 0) + 108 | 0) >> 2] | 0; + HEAP32[($4_1 + 136 | 0) >> 2] = 0; + HEAP32[($4_1 + 140 | 0) >> 2] = i64toi32_i32$0; + HEAP32[(HEAP32[($4_1 + 156 | 0) >> 2] | 0) >> 2] = 0; + HEAP32[($4_1 + 132 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 156 | 0) >> 2] | 0) + 128 | 0) >> 2] | 0; label$1 : { label$2 : while (1) { - if (!((HEAP32[($4_1 + 116 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[($4_1 + 132 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$1 } - $158((HEAP32[($4_1 + 140 | 0) >> 2] | 0) + 64 | 0 | 0); - $158((HEAP32[($4_1 + 140 | 0) >> 2] | 0) + 88 | 0 | 0); - HEAP32[($4_1 + 112 | 0) >> 2] = 0; + $158((HEAP32[($4_1 + 156 | 0) >> 2] | 0) + 76 | 0 | 0); + $158((HEAP32[($4_1 + 156 | 0) >> 2] | 0) + 104 | 0 | 0); + HEAP32[($4_1 + 128 | 0) >> 2] = 0; i64toi32_i32$0 = 0; - HEAP32[($4_1 + 104 | 0) >> 2] = 0; - HEAP32[($4_1 + 108 | 0) >> 2] = i64toi32_i32$0; - $692(HEAP32[($4_1 + 140 | 0) >> 2] | 0 | 0, $4_1 + 104 | 0 | 0, HEAP32[($4_1 + 116 | 0) >> 2] | 0 | 0); + HEAP32[($4_1 + 120 | 0) >> 2] = 0; + HEAP32[($4_1 + 124 | 0) >> 2] = i64toi32_i32$0; + $692(HEAP32[($4_1 + 156 | 0) >> 2] | 0 | 0, $4_1 + 120 | 0 | 0, HEAP32[($4_1 + 132 | 0) >> 2] | 0 | 0); label$3 : { - if (!((HEAP32[((HEAP32[($4_1 + 140 | 0) >> 2] | 0) + 92 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 156 | 0) >> 2] | 0) + 108 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$3 } - HEAP32[($4_1 + 48 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 140 | 0) >> 2] | 0) + 88 | 0) >> 2] | 0; - $11($4_1 + 120 | 0 | 0, 87790 | 0, $4_1 + 48 | 0 | 0) | 0; - $158((HEAP32[($4_1 + 140 | 0) >> 2] | 0) + 88 | 0 | 0); + HEAP32[($4_1 + 48 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 156 | 0) >> 2] | 0) + 104 | 0) >> 2] | 0; + $11($4_1 + 136 | 0 | 0, 87775 | 0, $4_1 + 48 | 0 | 0) | 0; + $158((HEAP32[($4_1 + 156 | 0) >> 2] | 0) + 104 | 0 | 0); } label$4 : { - if (!((HEAP32[((HEAP32[($4_1 + 140 | 0) >> 2] | 0) + 56 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 156 | 0) >> 2] | 0) + 68 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$4 } - $59_1 = HEAP32[($4_1 + 136 | 0) >> 2] | 0; - HEAP32[($4_1 + 32 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 140 | 0) >> 2] | 0) + 52 | 0) >> 2] | 0; + $59_1 = HEAP32[($4_1 + 152 | 0) >> 2] | 0; + HEAP32[($4_1 + 32 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 156 | 0) >> 2] | 0) + 64 | 0) >> 2] | 0; $11($59_1 | 0, 69406 | 0, $4_1 + 32 | 0 | 0) | 0; - $158((HEAP32[($4_1 + 140 | 0) >> 2] | 0) + 52 | 0 | 0); + $158((HEAP32[($4_1 + 156 | 0) >> 2] | 0) + 64 | 0 | 0); } label$5 : { - if (!((HEAP32[((HEAP32[($4_1 + 140 | 0) >> 2] | 0) + 68 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 156 | 0) >> 2] | 0) + 80 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$5 } - HEAP32[($4_1 + 16 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 140 | 0) >> 2] | 0) + 64 | 0) >> 2] | 0; - $11($4_1 + 120 | 0 | 0, 69406 | 0, $4_1 + 16 | 0 | 0) | 0; - $158((HEAP32[($4_1 + 140 | 0) >> 2] | 0) + 64 | 0 | 0); + HEAP32[($4_1 + 16 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 156 | 0) >> 2] | 0) + 76 | 0) >> 2] | 0; + $11($4_1 + 136 | 0 | 0, 69406 | 0, $4_1 + 16 | 0 | 0) | 0; + $158((HEAP32[($4_1 + 156 | 0) >> 2] | 0) + 76 | 0 | 0); } label$6 : { - if (!((HEAP32[($4_1 + 108 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[($4_1 + 124 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$6 } - HEAP32[$4_1 >> 2] = HEAP32[($4_1 + 104 | 0) >> 2] | 0; - $11($4_1 + 120 | 0 | 0, 69406 | 0, $4_1 | 0) | 0; + HEAP32[$4_1 >> 2] = HEAP32[($4_1 + 120 | 0) >> 2] | 0; + $11($4_1 + 136 | 0 | 0, 69406 | 0, $4_1 | 0) | 0; } - $12($4_1 + 104 | 0 | 0); - HEAP32[($4_1 + 116 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 116 | 0) >> 2] | 0) + 48 | 0) >> 2] | 0; + $12($4_1 + 120 | 0 | 0); + HEAP32[($4_1 + 132 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 132 | 0) >> 2] | 0) + 48 | 0) >> 2] | 0; continue label$2; }; } label$7 : { - if (!((HEAP32[((HEAP32[($4_1 + 140 | 0) >> 2] | 0) + 76 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($4_1 + 156 | 0) >> 2] | 0) + 92 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$7 } - $110_1 = HEAP32[($4_1 + 136 | 0) >> 2] | 0; - HEAP32[($4_1 + 80 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 140 | 0) >> 2] | 0) + 76 | 0) >> 2] | 0; - $11($110_1 | 0, 69406 | 0, $4_1 + 80 | 0 | 0) | 0; - $11(HEAP32[($4_1 + 136 | 0) >> 2] | 0 | 0, 88908 | 0, 0 | 0) | 0; + $110_1 = HEAP32[($4_1 + 152 | 0) >> 2] | 0; + HEAP32[($4_1 + 96 | 0) >> 2] = HEAP32[((HEAP32[($4_1 + 156 | 0) >> 2] | 0) + 92 | 0) >> 2] | 0; + $11($110_1 | 0, 69406 | 0, $4_1 + 96 | 0 | 0) | 0; + $11(HEAP32[($4_1 + 152 | 0) >> 2] | 0 | 0, 89066 | 0, 0 | 0) | 0; } - HEAP32[($4_1 + 100 | 0) >> 2] = 0; + HEAP32[($4_1 + 116 | 0) >> 2] = 0; label$8 : { label$9 : while (1) { - if (!((HEAP32[($4_1 + 100 | 0) >> 2] | 0 | 0) < (HEAP32[((HEAP32[($4_1 + 140 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0 | 0) & 1 | 0)) { + if (!((HEAP32[($4_1 + 116 | 0) >> 2] | 0 | 0) < (HEAP32[((HEAP32[($4_1 + 156 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0 | 0) & 1 | 0)) { break label$8 } - HEAP32[($4_1 + 96 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 140 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0) + ((HEAP32[($4_1 + 100 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0; + HEAP32[($4_1 + 112 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 156 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0) + ((HEAP32[($4_1 + 116 | 0) >> 2] | 0) << 2 | 0) | 0) >> 2] | 0; label$10 : { label$11 : while (1) { - if (!((HEAP32[($4_1 + 96 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[($4_1 + 112 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$10 } - $693(HEAP32[($4_1 + 140 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 136 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 96 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0); - HEAP32[($4_1 + 96 | 0) >> 2] = HEAP32[(HEAP32[($4_1 + 96 | 0) >> 2] | 0) >> 2] | 0; + $693(HEAP32[($4_1 + 156 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 152 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 112 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0); + HEAP32[($4_1 + 112 | 0) >> 2] = HEAP32[(HEAP32[($4_1 + 112 | 0) >> 2] | 0) >> 2] | 0; continue label$11; }; } - HEAP32[($4_1 + 100 | 0) >> 2] = (HEAP32[($4_1 + 100 | 0) >> 2] | 0) + 1 | 0; + HEAP32[($4_1 + 116 | 0) >> 2] = (HEAP32[($4_1 + 116 | 0) >> 2] | 0) + 1 | 0; continue label$9; }; } - $11(HEAP32[($4_1 + 136 | 0) >> 2] | 0 | 0, 88908 | 0, 0 | 0) | 0; + $11(HEAP32[($4_1 + 152 | 0) >> 2] | 0 | 0, 89066 | 0, 0 | 0) | 0; label$12 : { - if (!((HEAP32[($4_1 + 120 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAPU8[((HEAP32[($4_1 + 156 | 0) >> 2] | 0) + 116 | 0) >> 0] | 0) & 1 | 0)) { break label$12 } - $161_1 = HEAP32[($4_1 + 136 | 0) >> 2] | 0; - HEAP32[($4_1 + 64 | 0) >> 2] = HEAP32[($4_1 + 120 | 0) >> 2] | 0; - $11($161_1 | 0, 69406 | 0, $4_1 + 64 | 0 | 0) | 0; + HEAP32[($4_1 + 108 | 0) >> 2] = 88689; + $159_1 = HEAP32[($4_1 + 152 | 0) >> 2] | 0; + HEAP32[($4_1 + 80 | 0) >> 2] = HEAP32[($4_1 + 108 | 0) >> 2] | 0; + $11($159_1 | 0, 69406 | 0, $4_1 + 80 | 0 | 0) | 0; } - $12($4_1 + 120 | 0 | 0); - global$0 = $4_1 + 144 | 0; + label$13 : { + if (!((HEAP32[($4_1 + 136 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + break label$13 + } + $171_1 = HEAP32[($4_1 + 152 | 0) >> 2] | 0; + HEAP32[($4_1 + 64 | 0) >> 2] = HEAP32[($4_1 + 136 | 0) >> 2] | 0; + $11($171_1 | 0, 69406 | 0, $4_1 + 64 | 0 | 0) | 0; + } + $12($4_1 + 136 | 0 | 0); + global$0 = $4_1 + 160 | 0; return; } @@ -64829,109 +64838,109 @@ function asmFunc(imports) { $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; var $5_1 = 0, i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, i64toi32_i32$2 = 0, $153_1 = 0, $72_1 = 0, $101_1 = 0, $128_1 = 0, $129_1 = 0, $365_1 = 0, $369_1 = 0, $411_1 = 0, $424_1 = 0, $150_1 = 0; - $5_1 = global$0 - 2928 | 0; + $5_1 = global$0 - 2960 | 0; global$0 = $5_1; - HEAP32[($5_1 + 2924 | 0) >> 2] = $0_1; - HEAP32[($5_1 + 2920 | 0) >> 2] = $1_1; - HEAP32[($5_1 + 2916 | 0) >> 2] = $2_1; - $892($5_1 + 2512 | 0 | 0, 0 | 0, 400 | 0) | 0; - $892($5_1 + 2304 | 0 | 0, 0 | 0, 200 | 0) | 0; - HEAP32[$5_1 >> 2] = HEAP32[($5_1 + 2924 | 0) >> 2] | 0; - $929($5_1 + 2304 | 0 | 0, 200 | 0, 69380 | 0, $5_1 | 0) | 0; - HEAP32[($5_1 + 2300 | 0) >> 2] = $695($5_1 + 2304 | 0 | 0, 10 | 0, $5_1 + 2512 | 0 | 0) | 0; - HEAP32[($5_1 + 2296 | 0) >> 2] = 0; - $892($5_1 + 1552 | 0 | 0, 0 | 0, 744 | 0) | 0; + HEAP32[($5_1 + 2956 | 0) >> 2] = $0_1; + HEAP32[($5_1 + 2952 | 0) >> 2] = $1_1; + HEAP32[($5_1 + 2948 | 0) >> 2] = $2_1; + $892($5_1 + 2544 | 0 | 0, 0 | 0, 400 | 0) | 0; + $892($5_1 + 2336 | 0 | 0, 0 | 0, 200 | 0) | 0; + HEAP32[$5_1 >> 2] = HEAP32[($5_1 + 2956 | 0) >> 2] | 0; + $929($5_1 + 2336 | 0 | 0, 200 | 0, 69380 | 0, $5_1 | 0) | 0; + HEAP32[($5_1 + 2332 | 0) >> 2] = $695($5_1 + 2336 | 0 | 0, 10 | 0, $5_1 + 2544 | 0 | 0) | 0; + HEAP32[($5_1 + 2328 | 0) >> 2] = 0; + $892($5_1 + 1584 | 0 | 0, 0 | 0, 744 | 0) | 0; i64toi32_i32$0 = 0; $153_1 = 0; - i64toi32_i32$1 = $5_1 + 1544 | 0; + i64toi32_i32$1 = $5_1 + 1576 | 0; HEAP32[i64toi32_i32$1 >> 2] = $153_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; i64toi32_i32$1 = $5_1; - HEAP32[($5_1 + 1536 | 0) >> 2] = $153_1; - HEAP32[($5_1 + 1540 | 0) >> 2] = i64toi32_i32$0; - $892($5_1 + 856 | 0 | 0, 0 | 0, 680 | 0) | 0; - HEAP32[($5_1 + 856 | 0) >> 2] = 2; + HEAP32[($5_1 + 1568 | 0) >> 2] = $153_1; + HEAP32[($5_1 + 1572 | 0) >> 2] = i64toi32_i32$0; + $892($5_1 + 888 | 0 | 0, 0 | 0, 680 | 0) | 0; + HEAP32[($5_1 + 888 | 0) >> 2] = 2; label$1 : { label$2 : { label$3 : { - if (!($171($5_1 + 856 | 0 | 0, HEAP32[($5_1 + 2300 | 0) >> 2] | 0 | 0, $5_1 + 2512 | 0 | 0) | 0)) { + if (!($171($5_1 + 888 | 0 | 0, HEAP32[($5_1 + 2332 | 0) >> 2] | 0 | 0, $5_1 + 2544 | 0 | 0) | 0)) { break label$3 } $16(); break label$2; } - $891($5_1 + 1552 | 0 | 0, $5_1 + 856 | 0 | 0, 680 | 0) | 0; - $155($5_1 + 1552 | 0 | 0); + $891($5_1 + 1584 | 0 | 0, $5_1 + 888 | 0 | 0, 680 | 0) | 0; + $155($5_1 + 1584 | 0 | 0); label$4 : { label$5 : { - if (!((HEAPU8[($5_1 + 1122 | 0) >> 0] | 0) & 1 | 0)) { + if (!((HEAPU8[($5_1 + 1154 | 0) >> 0] | 0) & 1 | 0)) { break label$5 } - $892($5_1 + 168 | 0 | 0, 0 | 0, 688 | 0) | 0; + $892($5_1 + 200 | 0 | 0, 0 | 0, 688 | 0) | 0; $72_1 = 0; - $14($5_1 + 160 | 0 | 0, $5_1 + 168 | 0 | 0, HEAP32[($5_1 + 2920 | 0) >> 2] | 0 | 0, 77933 | 0, $72_1 | 0, $72_1 | 0); - $126($5_1 + 152 | 0 | 0, $5_1 + 1552 | 0 | 0, $5_1 + 160 | 0 | 0, 0 | 0); + $14($5_1 + 192 | 0 | 0, $5_1 + 200 | 0 | 0, HEAP32[($5_1 + 2952 | 0) >> 2] | 0 | 0, 77933 | 0, $72_1 | 0, $72_1 | 0); + $126($5_1 + 184 | 0 | 0, $5_1 + 1584 | 0 | 0, $5_1 + 192 | 0 | 0, 0 | 0); label$6 : { - if (HEAP32[($5_1 + 2292 | 0) >> 2] | 0) { + if (HEAP32[($5_1 + 2324 | 0) >> 2] | 0) { break label$6 } - HEAP32[($5_1 + 2296 | 0) >> 2] = $156(HEAP32[($5_1 + 152 | 0) >> 2] | 0 | 0) | 0; + HEAP32[($5_1 + 2328 | 0) >> 2] = $156(HEAP32[($5_1 + 184 | 0) >> 2] | 0 | 0) | 0; } - $9($5_1 + 160 | 0 | 0); - $9($5_1 + 152 | 0 | 0); + $9($5_1 + 192 | 0 | 0); + $9($5_1 + 184 | 0 | 0); break label$4; } - $694($5_1 + 136 | 0 | 0, $5_1 + 856 | 0 | 0, 77933 | 0, HEAP32[($5_1 + 2920 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 2916 | 0) >> 2] | 0 | 0); + $694($5_1 + 168 | 0 | 0, $5_1 + 888 | 0 | 0, 77933 | 0, HEAP32[($5_1 + 2952 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 2948 | 0) >> 2] | 0 | 0); $101_1 = 8; - i64toi32_i32$2 = ($5_1 + 136 | 0) + $101_1 | 0; + i64toi32_i32$2 = ($5_1 + 168 | 0) + $101_1 | 0; i64toi32_i32$0 = HEAP32[i64toi32_i32$2 >> 2] | 0; i64toi32_i32$1 = HEAP32[(i64toi32_i32$2 + 4 | 0) >> 2] | 0; $365_1 = i64toi32_i32$0; - i64toi32_i32$0 = ($5_1 + 1536 | 0) + $101_1 | 0; + i64toi32_i32$0 = ($5_1 + 1568 | 0) + $101_1 | 0; HEAP32[i64toi32_i32$0 >> 2] = $365_1; HEAP32[(i64toi32_i32$0 + 4 | 0) >> 2] = i64toi32_i32$1; i64toi32_i32$2 = $5_1; - i64toi32_i32$1 = HEAP32[($5_1 + 136 | 0) >> 2] | 0; - i64toi32_i32$0 = HEAP32[($5_1 + 140 | 0) >> 2] | 0; + i64toi32_i32$1 = HEAP32[($5_1 + 168 | 0) >> 2] | 0; + i64toi32_i32$0 = HEAP32[($5_1 + 172 | 0) >> 2] | 0; $369_1 = i64toi32_i32$1; i64toi32_i32$1 = $5_1; - HEAP32[($5_1 + 1536 | 0) >> 2] = $369_1; - HEAP32[($5_1 + 1540 | 0) >> 2] = i64toi32_i32$0; + HEAP32[($5_1 + 1568 | 0) >> 2] = $369_1; + HEAP32[($5_1 + 1572 | 0) >> 2] = i64toi32_i32$0; label$7 : { - if (!((HEAP32[((HEAP32[($5_1 + 2916 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($5_1 + 2948 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$7 } $16(); break label$2; } label$8 : { - if (HEAP32[($5_1 + 860 | 0) >> 2] | 0) { + if (HEAP32[($5_1 + 892 | 0) >> 2] | 0) { break label$8 } - HEAP32[($5_1 + 128 | 0) >> 2] = 0; + HEAP32[($5_1 + 160 | 0) >> 2] = 0; i64toi32_i32$0 = 0; i64toi32_i32$1 = $5_1; - HEAP32[($5_1 + 120 | 0) >> 2] = 0; - HEAP32[($5_1 + 124 | 0) >> 2] = i64toi32_i32$0; - $892($5_1 + 4 | 0 | 0, 0 | 0, 116 | 0) | 0; - $128_1 = ($5_1 + 4 | 0) + 100 | 0; + HEAP32[($5_1 + 152 | 0) >> 2] = 0; + HEAP32[($5_1 + 156 | 0) >> 2] = i64toi32_i32$0; + $892($5_1 + 16 | 0 | 0, 0 | 0, 136 | 0) | 0; + $128_1 = ($5_1 + 16 | 0) + 120 | 0; i64toi32_i32$2 = $5_1; - i64toi32_i32$0 = HEAP32[($5_1 + 1536 | 0) >> 2] | 0; - i64toi32_i32$1 = HEAP32[($5_1 + 1540 | 0) >> 2] | 0; + i64toi32_i32$0 = HEAP32[($5_1 + 1568 | 0) >> 2] | 0; + i64toi32_i32$1 = HEAP32[($5_1 + 1572 | 0) >> 2] | 0; $411_1 = i64toi32_i32$0; i64toi32_i32$0 = $128_1; HEAP32[i64toi32_i32$0 >> 2] = $411_1; HEAP32[(i64toi32_i32$0 + 4 | 0) >> 2] = i64toi32_i32$1; $129_1 = 8; - i64toi32_i32$2 = ($5_1 + 1536 | 0) + $129_1 | 0; + i64toi32_i32$2 = ($5_1 + 1568 | 0) + $129_1 | 0; i64toi32_i32$1 = HEAP32[i64toi32_i32$2 >> 2] | 0; i64toi32_i32$0 = HEAP32[(i64toi32_i32$2 + 4 | 0) >> 2] | 0; $424_1 = i64toi32_i32$1; i64toi32_i32$1 = $128_1 + $129_1 | 0; HEAP32[i64toi32_i32$1 >> 2] = $424_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; - $690($5_1 + 4 | 0 | 0, $5_1 + 120 | 0 | 0); - HEAP32[($5_1 + 2296 | 0) >> 2] = HEAP32[($5_1 + 120 | 0) >> 2] | 0; + $690($5_1 + 16 | 0 | 0, $5_1 + 152 | 0 | 0); + HEAP32[($5_1 + 2328 | 0) >> 2] = HEAP32[($5_1 + 152 | 0) >> 2] | 0; } } if (!(0 & 1 | 0)) { @@ -64939,10 +64948,10 @@ function asmFunc(imports) { } } } - $87($5_1 + 1552 | 0 | 0); - $691($5_1 + 1536 | 0 | 0); - $150_1 = HEAP32[($5_1 + 2296 | 0) >> 2] | 0; - global$0 = $5_1 + 2928 | 0; + $87($5_1 + 1584 | 0 | 0); + $691($5_1 + 1568 | 0 | 0); + $150_1 = HEAP32[($5_1 + 2328 | 0) >> 2] | 0; + global$0 = $5_1 + 2960 | 0; return $150_1 | 0; } @@ -64954,9 +64963,9 @@ function asmFunc(imports) { global$0 = $4_1; HEAP32[($4_1 + 76 | 0) >> 2] = $0_1; HEAP32[($4_1 + 72 | 0) >> 2] = $1_1; - $917(87923 | 0, 0 | 0) | 0; + $917(87908 | 0, 0 | 0) | 0; HEAP32[$4_1 >> 2] = HEAP32[($4_1 + 76 | 0) >> 2] | 0; - $917(87986 | 0, $4_1 | 0) | 0; + $917(87971 | 0, $4_1 | 0) | 0; i64toi32_i32$0 = 0; $29_1 = 0; i64toi32_i32$1 = $4_1 + 64 | 0; @@ -65192,7 +65201,7 @@ function asmFunc(imports) { $172_1 = HEAP32[($8_1 + 196 | 0) >> 2] | 0; HEAP32[($8_1 + 4 | 0) >> 2] = (HEAP32[($8_1 + 208 | 0) >> 2] | 0) + 40 | 0; HEAP32[$8_1 >> 2] = $172_1; - $251(720 | 0, $169_1 | 0, $171_1 | 0, 0 | 0, 86584 | 0, $8_1 | 0) | 0; + $251(720 | 0, $169_1 | 0, $171_1 | 0, 0 | 0, 86577 | 0, $8_1 | 0) | 0; HEAP32[($8_1 + 236 | 0) >> 2] = 0; break label$1; } @@ -65588,7 +65597,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($3_1 + 8 | 0) >> 2] | 0) + 44 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$3 } - fimport$0(80648 | 0, 77943 | 0, 39227 | 0, 75787 | 0); + fimport$0(80648 | 0, 77943 | 0, 39229 | 0, 75787 | 0); wasm2js_trap(); } $988(HEAP32[($3_1 + 8 | 0) >> 2] | 0 | 0); @@ -65882,8 +65891,8 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($5_1 + 224 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$3 } - $11(HEAP32[($5_1 + 232 | 0) >> 2] | 0 | 0, 87464 | 0, 0 | 0) | 0; - $11(HEAP32[($5_1 + 232 | 0) >> 2] | 0 | 0, 87615 | 0, 0 | 0) | 0; + $11(HEAP32[($5_1 + 232 | 0) >> 2] | 0 | 0, 87449 | 0, 0 | 0) | 0; + $11(HEAP32[($5_1 + 232 | 0) >> 2] | 0 | 0, 87600 | 0, 0 | 0) | 0; } HEAP32[($5_1 + 216 | 0) >> 2] = 0; label$4 : { @@ -65907,9 +65916,9 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[(HEAP32[($5_1 + 212 | 0) >> 2] | 0) >> 2] | 0) + 28 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$10 } - $11(HEAP32[($5_1 + 232 | 0) >> 2] | 0 | 0, 87461 | 0, 0 | 0) | 0; + $11(HEAP32[($5_1 + 232 | 0) >> 2] | 0 | 0, 87446 | 0, 0 | 0) | 0; $717(HEAP32[($5_1 + 236 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 232 | 0) >> 2] | 0 | 0, (HEAP32[(HEAP32[($5_1 + 212 | 0) >> 2] | 0) >> 2] | 0) + 148 | 0 | 0, HEAP32[((HEAP32[((HEAP32[(HEAP32[($5_1 + 212 | 0) >> 2] | 0) >> 2] | 0) + 28 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - $11(HEAP32[($5_1 + 232 | 0) >> 2] | 0 | 0, 88151 | 0, 0 | 0) | 0; + $11(HEAP32[($5_1 + 232 | 0) >> 2] | 0 | 0, 88160 | 0, 0 | 0) | 0; } HEAP32[($5_1 + 212 | 0) >> 2] = HEAP32[((HEAP32[($5_1 + 212 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0; continue label$9; @@ -65956,9 +65965,9 @@ function asmFunc(imports) { HEAP32[($5_1 + 216 | 0) >> 2] = $136_1 + 1 | 0; HEAP32[$5_1 >> 2] = $136_1; $929($5_1 + 48 | 0 | 0, 100 | 0, 77721 | 0, $5_1 | 0) | 0; - $11(HEAP32[($5_1 + 232 | 0) >> 2] | 0 | 0, 87461 | 0, 0 | 0) | 0; + $11(HEAP32[($5_1 + 232 | 0) >> 2] | 0 | 0, 87446 | 0, 0 | 0) | 0; $717(HEAP32[($5_1 + 236 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 232 | 0) >> 2] | 0 | 0, $5_1 + 152 | 0 | 0, $5_1 + 48 | 0 | 0); - $11(HEAP32[($5_1 + 232 | 0) >> 2] | 0 | 0, 88151 | 0, 0 | 0) | 0; + $11(HEAP32[($5_1 + 232 | 0) >> 2] | 0 | 0, 88160 | 0, 0 | 0) | 0; $74($5_1 + 152 | 0 | 0); } } @@ -65972,10 +65981,10 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($5_1 + 224 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$14 } - $11(HEAP32[($5_1 + 232 | 0) >> 2] | 0 | 0, 88680 | 0, 0 | 0) | 0; + $11(HEAP32[($5_1 + 232 | 0) >> 2] | 0 | 0, 88838 | 0, 0 | 0) | 0; break label$13; } - $11(HEAP32[($5_1 + 232 | 0) >> 2] | 0 | 0, 88151 | 0, 0 | 0) | 0; + $11(HEAP32[($5_1 + 232 | 0) >> 2] | 0 | 0, 88160 | 0, 0 | 0) | 0; } global$0 = $5_1 + 240 | 0; return; @@ -66003,13 +66012,13 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($6_1 + 36 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) & 2 | 0)) { break label$1 } - $11(HEAP32[($6_1 + 40 | 0) >> 2] | 0 | 0, 87130 | 0, 0 | 0) | 0; + $11(HEAP32[($6_1 + 40 | 0) >> 2] | 0 | 0, 87123 | 0, 0 | 0) | 0; } label$2 : { if (!((HEAP32[((HEAP32[($6_1 + 36 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) & 4 | 0)) { break label$2 } - $11(HEAP32[($6_1 + 40 | 0) >> 2] | 0 | 0, 87247 | 0, 0 | 0) | 0; + $11(HEAP32[($6_1 + 40 | 0) >> 2] | 0 | 0, 87232 | 0, 0 | 0) | 0; } $32_1 = HEAP32[($6_1 + 40 | 0) >> 2] | 0; HEAP32[$6_1 >> 2] = HEAP32[($6_1 + 16 | 0) >> 2] | 0; @@ -66408,7 +66417,7 @@ function asmFunc(imports) { $509($6_1 + 280 | 0 | 0, $6_1 + 279 | 0 | 0, HEAP32[(HEAP32[((HEAP32[($6_1 + 272 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) >> 2] | 0 | 0) | 0; break label$14; } - $11($6_1 + 280 | 0 | 0, 87058 | 0, 0 | 0) | 0; + $11($6_1 + 280 | 0 | 0, 87051 | 0, 0 | 0) | 0; } break label$12; } @@ -66417,7 +66426,7 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($6_1 + 300 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) & 512 | 0)) { break label$17 } - $11($6_1 + 280 | 0 | 0, 87115 | 0, 0 | 0) | 0; + $11($6_1 + 280 | 0 | 0, 87108 | 0, 0 | 0) | 0; break label$16; } $509($6_1 + 280 | 0 | 0, $6_1 + 279 | 0 | 0, HEAP32[((HEAP32[($6_1 + 300 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) | 0; @@ -66432,7 +66441,7 @@ function asmFunc(imports) { if (!((HEAPU8[($6_1 + 279 | 0) >> 0] | 0) & 1 | 0)) { break label$19 } - $11(HEAP32[($6_1 + 312 | 0) >> 2] | 0 | 0, 87464 | 0, 0 | 0) | 0; + $11(HEAP32[($6_1 + 312 | 0) >> 2] | 0 | 0, 87449 | 0, 0 | 0) | 0; HEAP8[($6_1 + 279 | 0) >> 0] = 0; } $123_1 = HEAP32[($6_1 + 312 | 0) >> 2] | 0; @@ -66482,7 +66491,7 @@ function asmFunc(imports) { if ((HEAPU8[($6_1 + 255 | 0) >> 0] | 0) & 1 | 0) { break label$24 } - $11(HEAP32[($6_1 + 312 | 0) >> 2] | 0 | 0, 87464 | 0, 0 | 0) | 0; + $11(HEAP32[($6_1 + 312 | 0) >> 2] | 0 | 0, 87449 | 0, 0 | 0) | 0; } $191_1 = HEAP32[($6_1 + 312 | 0) >> 2] | 0; HEAP32[($6_1 + 80 | 0) >> 2] = HEAP32[((HEAP32[($6_1 + 300 | 0) >> 2] | 0) + 36 | 0) >> 2] | 0; @@ -66501,7 +66510,7 @@ function asmFunc(imports) { $11($208_1 | 0, 69406 | 0, $6_1 + 144 | 0 | 0) | 0; HEAP32[($6_1 + 304 | 0) >> 2] = 0; } - $11(HEAP32[($6_1 + 312 | 0) >> 2] | 0 | 0, 86413 | 0, 0 | 0) | 0; + $11(HEAP32[($6_1 + 312 | 0) >> 2] | 0 | 0, 86406 | 0, 0 | 0) | 0; HEAP32[($6_1 + 248 | 0) >> 2] = HEAP32[((HEAP32[($6_1 + 300 | 0) >> 2] | 0) + 48 | 0) >> 2] | 0; label$26 : { label$27 : while (1) { @@ -66526,7 +66535,7 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($6_1 + 248 | 0) >> 2] | 0) + 60 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$28 } - $11(HEAP32[($6_1 + 312 | 0) >> 2] | 0 | 0, 87437 | 0, 0 | 0) | 0; + $11(HEAP32[($6_1 + 312 | 0) >> 2] | 0 | 0, 87422 | 0, 0 | 0) | 0; } $12($6_1 + 232 | 0 | 0); HEAP32[($6_1 + 248 | 0) >> 2] = HEAP32[((HEAP32[($6_1 + 248 | 0) >> 2] | 0) + 60 | 0) >> 2] | 0; @@ -66541,11 +66550,11 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($6_1 + 300 | 0) >> 2] | 0) + 48 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$30 } - $11(HEAP32[($6_1 + 312 | 0) >> 2] | 0 | 0, 87437 | 0, 0 | 0) | 0; + $11(HEAP32[($6_1 + 312 | 0) >> 2] | 0 | 0, 87422 | 0, 0 | 0) | 0; } $11(HEAP32[($6_1 + 312 | 0) >> 2] | 0 | 0, 85523 | 0, 0 | 0) | 0; } - $11(HEAP32[($6_1 + 312 | 0) >> 2] | 0 | 0, 86385 | 0, 0 | 0) | 0; + $11(HEAP32[($6_1 + 312 | 0) >> 2] | 0 | 0, 86378 | 0, 0 | 0) | 0; HEAP8[($6_1 + 299 | 0) >> 0] = 0; break label$3; case 3: @@ -66570,7 +66579,7 @@ function asmFunc(imports) { break label$31 } } - $11($6_1 + 200 | 0 | 0, 86413 | 0, 0 | 0) | 0; + $11($6_1 + 200 | 0 | 0, 86406 | 0, 0 | 0) | 0; } $11($6_1 + 200 | 0 | 0, 85666 | 0, 0 | 0) | 0; HEAP8[($6_1 + 199 | 0) >> 0] = 0; @@ -66582,7 +66591,7 @@ function asmFunc(imports) { if ((HEAPU8[($6_1 + 199 | 0) >> 0] | 0) & 1 | 0) { break label$34 } - $11(HEAP32[($6_1 + 312 | 0) >> 2] | 0 | 0, 87464 | 0, 0 | 0) | 0; + $11(HEAP32[($6_1 + 312 | 0) >> 2] | 0 | 0, 87449 | 0, 0 | 0) | 0; } $339_1 = HEAP32[($6_1 + 312 | 0) >> 2] | 0; HEAP32[($6_1 + 192 | 0) >> 2] = HEAP32[($6_1 + 304 | 0) >> 2] | 0; @@ -66610,7 +66619,7 @@ function asmFunc(imports) { } } HEAP32[($6_1 + 160 | 0) >> 2] = HEAP32[(HEAP32[($6_1 + 312 | 0) >> 2] | 0) >> 2] | 0; - $11($6_1 + 200 | 0 | 0, 86385 | 0, $6_1 + 160 | 0 | 0) | 0; + $11($6_1 + 200 | 0 | 0, 86378 | 0, $6_1 + 160 | 0 | 0) | 0; } $157(HEAP32[($6_1 + 312 | 0) >> 2] | 0 | 0, $6_1 + 200 | 0 | 0); $12($6_1 + 200 | 0 | 0); @@ -66985,7 +66994,7 @@ function asmFunc(imports) { continue label$2; }; } - $917(88908 | 0, 0 | 0) | 0; + $917(89066 | 0, 0 | 0) | 0; $917(65727 | 0, 0 | 0) | 0; label$6 : { if (!((HEAP32[($3_1 + 40 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { @@ -67013,7 +67022,7 @@ function asmFunc(imports) { } } $917(65540 | 0, 0 | 0) | 0; - $917(88908 | 0, 0 | 0) | 0; + $917(89066 | 0, 0 | 0) | 0; HEAP32[($3_1 + 16 | 0) >> 2] = 0; label$11 : { label$12 : while (1) { @@ -67053,8 +67062,8 @@ function asmFunc(imports) { } } $917(65536 | 0, 0 | 0) | 0; - $917(88908 | 0, 0 | 0) | 0; - $917(88908 | 0, 0 | 0) | 0; + $917(89066 | 0, 0 | 0) | 0; + $917(89066 | 0, 0 | 0) | 0; global$0 = $3_1 + 48 | 0; return; } @@ -67151,11 +67160,11 @@ function asmFunc(imports) { break label$15 } HEAP32[($4_1 + 16 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 88 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $917(87684 | 0, $4_1 + 16 | 0 | 0) | 0; + $917(87669 | 0, $4_1 + 16 | 0 | 0) | 0; } $917(84665 | 0, 0 | 0) | 0; $409(HEAP32[($4_1 + 52 | 0) >> 2] | 0 | 0); - $917(88908 | 0, 0 | 0) | 0; + $917(89066 | 0, 0 | 0) | 0; } break label$12; } @@ -67195,7 +67204,7 @@ function asmFunc(imports) { HEAP32[($4_1 + 44 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($4_1 + 88 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; label$21 : { label$22 : { - if ($933(HEAP32[($4_1 + 44 | 0) >> 2] | 0 | 0, 87036 | 0) | 0) { + if ($933(HEAP32[($4_1 + 44 | 0) >> 2] | 0 | 0, 87029 | 0) | 0) { break label$22 } $456((HEAP32[((HEAP32[($4_1 + 88 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 4 | 0 | 0, HEAP32[($4_1 + 48 | 0) >> 2] | 0 | 0); @@ -67359,7 +67368,7 @@ function asmFunc(imports) { label$2 : { switch ($13_1 | 0) { case 0: - fimport$0(75141 | 0, 77943 | 0, 43797 | 0, 72234 | 0); + fimport$0(75141 | 0, 77943 | 0, 43986 | 0, 72234 | 0); wasm2js_trap(); case 4: break label$1; @@ -67382,7 +67391,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$36 } - fimport$0(81638 | 0, 77943 | 0, 43818 | 0, 72234 | 0); + fimport$0(81638 | 0, 77943 | 0, 44007 | 0, 72234 | 0); wasm2js_trap(); } $735(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 900 | 0) >> 2] | 0 | 0); @@ -67397,7 +67406,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 180 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$37 } - fimport$0(82558 | 0, 77943 | 0, 43829 | 0, 72234 | 0); + fimport$0(82558 | 0, 77943 | 0, 44018 | 0, 72234 | 0); wasm2js_trap(); } $827(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 180 | 0) >> 2] | 0 | 0); @@ -67407,7 +67416,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$38 } - fimport$0(81666 | 0, 77943 | 0, 43835 | 0, 72234 | 0); + fimport$0(81666 | 0, 77943 | 0, 44024 | 0, 72234 | 0); wasm2js_trap(); } HEAP32[($5_1 + 872 | 0) >> 2] = 0; @@ -67427,7 +67436,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$39 } - fimport$0(81666 | 0, 77943 | 0, 43852 | 0, 72234 | 0); + fimport$0(81666 | 0, 77943 | 0, 44041 | 0, 72234 | 0); wasm2js_trap(); } HEAP32[($5_1 + 848 | 0) >> 2] = 0; @@ -67542,7 +67551,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$54 } - fimport$0(81666 | 0, 77943 | 0, 43933 | 0, 72234 | 0); + fimport$0(81666 | 0, 77943 | 0, 44122 | 0, 72234 | 0); wasm2js_trap(); } HEAP32[($5_1 + 760 | 0) >> 2] = $466(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0, (HEAPU8[($5_1 + 899 | 0) >> 0] | 0) & 1 | 0 | 0) | 0; @@ -67573,14 +67582,14 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$59 } - fimport$0(81638 | 0, 77943 | 0, 43955 | 0, 72234 | 0); + fimport$0(81638 | 0, 77943 | 0, 44144 | 0, 72234 | 0); wasm2js_trap(); } label$60 : { if ((HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$60 } - fimport$0(81666 | 0, 77943 | 0, 43956 | 0, 72234 | 0); + fimport$0(81666 | 0, 77943 | 0, 44145 | 0, 72234 | 0); wasm2js_trap(); } $735(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 900 | 0) >> 2] | 0 | 0); @@ -67596,7 +67605,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$61 } - fimport$0(81666 | 0, 77943 | 0, 43973 | 0, 72234 | 0); + fimport$0(81666 | 0, 77943 | 0, 44162 | 0, 72234 | 0); wasm2js_trap(); } HEAP32[($5_1 + 744 | 0) >> 2] = 0; @@ -67613,7 +67622,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 176 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$62 } - fimport$0(81567 | 0, 77943 | 0, 43985 | 0, 72234 | 0); + fimport$0(81567 | 0, 77943 | 0, 44174 | 0, 72234 | 0); wasm2js_trap(); } $734(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 176 | 0) >> 2] | 0 | 0); @@ -67623,28 +67632,28 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$63 } - fimport$0(80621 | 0, 77943 | 0, 43992 | 0, 72234 | 0); + fimport$0(80621 | 0, 77943 | 0, 44181 | 0, 72234 | 0); wasm2js_trap(); } label$64 : { if ((HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$64 } - fimport$0(80593 | 0, 77943 | 0, 43993 | 0, 72234 | 0); + fimport$0(80593 | 0, 77943 | 0, 44182 | 0, 72234 | 0); wasm2js_trap(); } label$65 : { if ((HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 168 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$65 } - fimport$0(82898 | 0, 77943 | 0, 43994 | 0, 72234 | 0); + fimport$0(82898 | 0, 77943 | 0, 44183 | 0, 72234 | 0); wasm2js_trap(); } label$66 : { if ((HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 172 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$66 } - fimport$0(82252 | 0, 77943 | 0, 43995 | 0, 72234 | 0); + fimport$0(82252 | 0, 77943 | 0, 44184 | 0, 72234 | 0); wasm2js_trap(); } $829(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 168 | 0) >> 2] | 0 | 0); @@ -67719,7 +67728,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$74 } - fimport$0(81638 | 0, 77943 | 0, 44068 | 0, 72234 | 0); + fimport$0(81638 | 0, 77943 | 0, 44257 | 0, 72234 | 0); wasm2js_trap(); } $735(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 900 | 0) >> 2] | 0 | 0); @@ -67729,7 +67738,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$75 } - fimport$0(81638 | 0, 77943 | 0, 44073 | 0, 72234 | 0); + fimport$0(81638 | 0, 77943 | 0, 44262 | 0, 72234 | 0); wasm2js_trap(); } $832(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); @@ -67754,7 +67763,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$77 } - fimport$0(81638 | 0, 77943 | 0, 44100 | 0, 72234 | 0); + fimport$0(81638 | 0, 77943 | 0, 44289 | 0, 72234 | 0); wasm2js_trap(); } HEAP32[($5_1 + 712 | 0) >> 2] = $466(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0, (HEAPU8[($5_1 + 899 | 0) >> 0] | 0) & 1 | 0 | 0) | 0; @@ -67818,14 +67827,14 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$83 } - fimport$0(81638 | 0, 77943 | 0, 44139 | 0, 72234 | 0); + fimport$0(81638 | 0, 77943 | 0, 44328 | 0, 72234 | 0); wasm2js_trap(); } label$84 : { if ((HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$84 } - fimport$0(81666 | 0, 77943 | 0, 44140 | 0, 72234 | 0); + fimport$0(81666 | 0, 77943 | 0, 44329 | 0, 72234 | 0); wasm2js_trap(); } HEAP32[($5_1 + 656 | 0) >> 2] = 0; @@ -67916,14 +67925,14 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$92 } - fimport$0(81638 | 0, 77943 | 0, 44226 | 0, 72234 | 0); + fimport$0(81638 | 0, 77943 | 0, 44415 | 0, 72234 | 0); wasm2js_trap(); } label$93 : { if ((HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$93 } - fimport$0(81666 | 0, 77943 | 0, 44227 | 0, 72234 | 0); + fimport$0(81666 | 0, 77943 | 0, 44416 | 0, 72234 | 0); wasm2js_trap(); } HEAP32[($5_1 + 432 | 0) >> 2] = 0; @@ -67996,14 +68005,14 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$98 } - fimport$0(81638 | 0, 77943 | 0, 44287 | 0, 72234 | 0); + fimport$0(81638 | 0, 77943 | 0, 44476 | 0, 72234 | 0); wasm2js_trap(); } label$99 : { if ((HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$99 } - fimport$0(81666 | 0, 77943 | 0, 44288 | 0, 72234 | 0); + fimport$0(81666 | 0, 77943 | 0, 44477 | 0, 72234 | 0); wasm2js_trap(); } HEAP8[($5_1 + 375 | 0) >> 0] = ($179((HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0) + 64 | 0 | 0) | 0) & 1 | 0; @@ -68153,14 +68162,14 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$114 } - fimport$0(81638 | 0, 77943 | 0, 44364 | 0, 72234 | 0); + fimport$0(81638 | 0, 77943 | 0, 44553 | 0, 72234 | 0); wasm2js_trap(); } label$115 : { if ((HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$115 } - fimport$0(81666 | 0, 77943 | 0, 44365 | 0, 72234 | 0); + fimport$0(81666 | 0, 77943 | 0, 44554 | 0, 72234 | 0); wasm2js_trap(); } i64toi32_i32$3 = 0; @@ -68440,14 +68449,14 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$148 } - fimport$0(81638 | 0, 77943 | 0, 44492 | 0, 72234 | 0); + fimport$0(81638 | 0, 77943 | 0, 44681 | 0, 72234 | 0); wasm2js_trap(); } label$149 : { if ((HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$149 } - fimport$0(81666 | 0, 77943 | 0, 44493 | 0, 72234 | 0); + fimport$0(81666 | 0, 77943 | 0, 44682 | 0, 72234 | 0); wasm2js_trap(); } $832(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); @@ -68518,14 +68527,14 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$155 } - fimport$0(81638 | 0, 77943 | 0, 44559 | 0, 72234 | 0); + fimport$0(81638 | 0, 77943 | 0, 44748 | 0, 72234 | 0); wasm2js_trap(); } label$156 : { if ((HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$156 } - fimport$0(81666 | 0, 77943 | 0, 44560 | 0, 72234 | 0); + fimport$0(81666 | 0, 77943 | 0, 44749 | 0, 72234 | 0); wasm2js_trap(); } $832(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); @@ -68605,14 +68614,14 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$162 } - fimport$0(81638 | 0, 77943 | 0, 44629 | 0, 72234 | 0); + fimport$0(81638 | 0, 77943 | 0, 44818 | 0, 72234 | 0); wasm2js_trap(); } label$163 : { if ((HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$163 } - fimport$0(81666 | 0, 77943 | 0, 44630 | 0, 72234 | 0); + fimport$0(81666 | 0, 77943 | 0, 44819 | 0, 72234 | 0); wasm2js_trap(); } HEAP32[($5_1 + 56 | 0) >> 2] = 0; @@ -68630,14 +68639,14 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$164 } - fimport$0(81638 | 0, 77943 | 0, 44645 | 0, 72234 | 0); + fimport$0(81638 | 0, 77943 | 0, 44834 | 0, 72234 | 0); wasm2js_trap(); } label$165 : { if ((HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$165 } - fimport$0(81666 | 0, 77943 | 0, 44646 | 0, 72234 | 0); + fimport$0(81666 | 0, 77943 | 0, 44835 | 0, 72234 | 0); wasm2js_trap(); } $735(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 900 | 0) >> 2] | 0 | 0); @@ -68659,21 +68668,21 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 208 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$166 } - fimport$0(81921 | 0, 77943 | 0, 44668 | 0, 72234 | 0); + fimport$0(81921 | 0, 77943 | 0, 44857 | 0, 72234 | 0); wasm2js_trap(); } label$167 : { if ((HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$167 } - fimport$0(81638 | 0, 77943 | 0, 44669 | 0, 72234 | 0); + fimport$0(81638 | 0, 77943 | 0, 44858 | 0, 72234 | 0); wasm2js_trap(); } label$168 : { if ((HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$168 } - fimport$0(81666 | 0, 77943 | 0, 44670 | 0, 72234 | 0); + fimport$0(81666 | 0, 77943 | 0, 44859 | 0, 72234 | 0); wasm2js_trap(); } HEAP32[($5_1 + 40 | 0) >> 2] = 0; @@ -68920,7 +68929,7 @@ function asmFunc(imports) { $830(HEAP32[($4_1 + 284 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($4_1 + 280 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); break label$4; } - fimport$0(75141 | 0, 77943 | 0, 42854 | 0, 69482 | 0); + fimport$0(75141 | 0, 77943 | 0, 43043 | 0, 69482 | 0); wasm2js_trap(); } } @@ -68962,7 +68971,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[((HEAP32[($4_1 + 280 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 144 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$12 } - fimport$0(81693 | 0, 77943 | 0, 42879 | 0, 69482 | 0); + fimport$0(81693 | 0, 77943 | 0, 43068 | 0, 69482 | 0); wasm2js_trap(); } $467(HEAP32[($4_1 + 284 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 280 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 184 | 0) >> 2] | 0 | 0, $4_1 + 232 | 0 | 0, $4_1 + 204 | 0 | 0, 2 | 0, 0 & 1 | 0 | 0, ($464((HEAP32[((HEAP32[($4_1 + 280 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 148 | 0 | 0) | 0) & 1 | 0 | 0, ($385((HEAP32[((HEAP32[($4_1 + 280 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 148 | 0 | 0, (HEAPU8[((HEAP32[((HEAP32[($4_1 + 284 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 264 | 0) >> 0] | 0) & 1 | 0 | 0) | 0) & 1 | 0 | 0, (HEAP32[((HEAP32[($4_1 + 280 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 148 | 0 | 0, HEAP32[((HEAP32[((HEAP32[($4_1 + 280 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 144 | 0) >> 2] | 0 | 0, (HEAP32[((HEAP32[((HEAP32[($4_1 + 280 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 4 | 0 | 0, HEAP32[($4_1 + 260 | 0) >> 2] | 0 | 0, 0 | 0); @@ -69174,7 +69183,7 @@ function asmFunc(imports) { $462(HEAP32[($5_1 + 28 | 0) >> 2] | 0 | 0, (HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 148 | 0 | 0, ($464((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 148 | 0 | 0) | 0) & 1 | 0 | 0, HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 144 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 20 | 0) >> 2] | 0 | 0, HEAP32[$5_1 >> 2] | 0 | 0); break label$8; } - fimport$0(85018 | 0, 77943 | 0, 42568 | 0, 72672 | 0); + fimport$0(85018 | 0, 77943 | 0, 42757 | 0, 72672 | 0); wasm2js_trap(); } } @@ -69244,7 +69253,7 @@ function asmFunc(imports) { $11($6_1 + 240 | 0 | 0, 69372 | 0, $6_1 + 64 | 0 | 0) | 0; break label$13; } - $11($6_1 + 240 | 0 | 0, 87138 | 0, 0 | 0) | 0; + $11($6_1 + 240 | 0 | 0, 87131 | 0, 0 | 0) | 0; } break label$11; } @@ -69262,7 +69271,7 @@ function asmFunc(imports) { if (!((HEAPU8[($6_1 + 239 | 0) >> 0] | 0) & 1 | 0)) { break label$16 } - $11(HEAP32[($6_1 + 268 | 0) >> 2] | 0 | 0, 87464 | 0, 0 | 0) | 0; + $11(HEAP32[($6_1 + 268 | 0) >> 2] | 0 | 0, 87449 | 0, 0 | 0) | 0; HEAP8[($6_1 + 239 | 0) >> 0] = 0; } $116_1 = HEAP32[($6_1 + 268 | 0) >> 2] | 0; @@ -69321,7 +69330,7 @@ function asmFunc(imports) { if ((HEAPU8[($6_1 + 223 | 0) >> 0] | 0) & 1 | 0) { break label$22 } - $11(HEAP32[($6_1 + 268 | 0) >> 2] | 0 | 0, 87464 | 0, 0 | 0) | 0; + $11(HEAP32[($6_1 + 268 | 0) >> 2] | 0 | 0, 87449 | 0, 0 | 0) | 0; } $204_1 = HEAP32[($6_1 + 268 | 0) >> 2] | 0; HEAP32[($6_1 + 80 | 0) >> 2] = HEAP32[((HEAP32[($6_1 + 256 | 0) >> 2] | 0) + 36 | 0) >> 2] | 0; @@ -69341,7 +69350,7 @@ function asmFunc(imports) { HEAP32[($6_1 + 128 | 0) >> 2] = HEAP32[((HEAP32[($6_1 + 256 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0; $11($224_1 | 0, 69406 | 0, $6_1 + 128 | 0 | 0) | 0; } - $11(HEAP32[($6_1 + 268 | 0) >> 2] | 0 | 0, 86413 | 0, 0 | 0) | 0; + $11(HEAP32[($6_1 + 268 | 0) >> 2] | 0 | 0, 86406 | 0, 0 | 0) | 0; HEAP32[($6_1 + 216 | 0) >> 2] = HEAP32[((HEAP32[($6_1 + 256 | 0) >> 2] | 0) + 48 | 0) >> 2] | 0; label$24 : { label$25 : while (1) { @@ -69367,7 +69376,7 @@ function asmFunc(imports) { continue label$25; }; } - $11(HEAP32[($6_1 + 268 | 0) >> 2] | 0 | 0, 86385 | 0, 0 | 0) | 0; + $11(HEAP32[($6_1 + 268 | 0) >> 2] | 0 | 0, 86378 | 0, 0 | 0) | 0; break label$4; case 3: break label$5; @@ -69391,7 +69400,7 @@ function asmFunc(imports) { break label$27 } } - $11($6_1 + 184 | 0 | 0, 86413 | 0, 0 | 0) | 0; + $11($6_1 + 184 | 0 | 0, 86406 | 0, 0 | 0) | 0; } $11($6_1 + 184 | 0 | 0, 85666 | 0, 0 | 0) | 0; HEAP8[($6_1 + 183 | 0) >> 0] = 0; @@ -69407,7 +69416,7 @@ function asmFunc(imports) { if ((HEAPU8[($6_1 + 183 | 0) >> 0] | 0) & 1 | 0) { break label$30 } - $11(HEAP32[($6_1 + 268 | 0) >> 2] | 0 | 0, 87464 | 0, 0 | 0) | 0; + $11(HEAP32[($6_1 + 268 | 0) >> 2] | 0 | 0, 87449 | 0, 0 | 0) | 0; } $336_1 = HEAP32[($6_1 + 268 | 0) >> 2] | 0; HEAP32[($6_1 + 176 | 0) >> 2] = HEAP32[((HEAP32[($6_1 + 256 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0; @@ -69434,7 +69443,7 @@ function asmFunc(imports) { } } HEAP32[($6_1 + 144 | 0) >> 2] = HEAP32[(HEAP32[($6_1 + 268 | 0) >> 2] | 0) >> 2] | 0; - $11($6_1 + 184 | 0 | 0, 86385 | 0, $6_1 + 144 | 0 | 0) | 0; + $11($6_1 + 184 | 0 | 0, 86378 | 0, $6_1 + 144 | 0 | 0) | 0; } $157(HEAP32[($6_1 + 268 | 0) >> 2] | 0 | 0, $6_1 + 184 | 0 | 0); $12($6_1 + 184 | 0 | 0); @@ -69520,7 +69529,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 56 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0) { break label$1 } - fimport$0(80289 | 0, 77943 | 0, 49270 | 0, 66737 | 0); + fimport$0(80289 | 0, 77943 | 0, 49459 | 0, 66737 | 0); wasm2js_trap(); } label$2 : { @@ -71307,7 +71316,7 @@ function asmFunc(imports) { if (!((HEAP32[(HEAP32[((HEAP32[($4_1 + 348 | 0) >> 2] | 0) + 716 | 0) >> 2] | 0) >> 2] | 0 | 0) != (41 | 0) & 1 | 0)) { break label$12 } - $89(650 | 0, HEAP32[($4_1 + 348 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 348 | 0) >> 2] | 0) + 716 | 0) >> 2] | 0 | 0, 86376 | 0, 0 | 0) | 0; + $89(650 | 0, HEAP32[($4_1 + 348 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 348 | 0) >> 2] | 0) + 716 | 0) >> 2] | 0 | 0, 86369 | 0, 0 | 0) | 0; $16(); break label$2; } @@ -72770,7 +72779,7 @@ function asmFunc(imports) { $774(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(75141 | 0, 77943 | 0, 39874 | 0, 67472 | 0); + fimport$0(75141 | 0, 77943 | 0, 39876 | 0, 67472 | 0); wasm2js_trap(); } } @@ -72845,7 +72854,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$1 } - fimport$0(82829 | 0, 77943 | 0, 39792 | 0, 67081 | 0); + fimport$0(82829 | 0, 77943 | 0, 39794 | 0, 67081 | 0); wasm2js_trap(); } label$2 : { @@ -72888,7 +72897,7 @@ function asmFunc(imports) { $783(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 12 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[(HEAP32[($4_1 + 8 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, (HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 20 | 0 | 0); break label$10; } - fimport$0(75141 | 0, 77943 | 0, 39822 | 0, 67081 | 0); + fimport$0(75141 | 0, 77943 | 0, 39824 | 0, 67081 | 0); wasm2js_trap(); } } @@ -72954,7 +72963,7 @@ function asmFunc(imports) { $786(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0); break label$1; } - fimport$0(75141 | 0, 77943 | 0, 39785 | 0, 67225 | 0); + fimport$0(75141 | 0, 77943 | 0, 39787 | 0, 67225 | 0); wasm2js_trap(); } global$0 = $4_1 + 16 | 0; @@ -72985,7 +72994,7 @@ function asmFunc(imports) { $788(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0); break label$3; } - fimport$0(75141 | 0, 77943 | 0, 39649 | 0, 67162 | 0); + fimport$0(75141 | 0, 77943 | 0, 39651 | 0, 67162 | 0); wasm2js_trap(); } } @@ -73217,7 +73226,7 @@ function asmFunc(imports) { if ((HEAP32[(HEAP32[(HEAP32[($4_1 + 8 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) == (9042 | 0) & 1 | 0) { break label$1 } - fimport$0(84029 | 0, 77943 | 0, 39710 | 0, 67333 | 0); + fimport$0(84029 | 0, 77943 | 0, 39712 | 0, 67333 | 0); wasm2js_trap(); } label$2 : { @@ -73256,7 +73265,7 @@ function asmFunc(imports) { if ((HEAP32[(HEAP32[(HEAP32[($4_1 + 8 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) == (9008 | 0) & 1 | 0) { break label$1 } - fimport$0(79597 | 0, 77943 | 0, 39692 | 0, 67391 | 0); + fimport$0(79597 | 0, 77943 | 0, 39694 | 0, 67391 | 0); wasm2js_trap(); } HEAP32[($4_1 + 4 | 0) >> 2] = $545(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0) | 0; @@ -73294,7 +73303,7 @@ function asmFunc(imports) { if ((HEAP32[(HEAP32[(HEAP32[($4_1 + 24 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) == (9015 | 0) & 1 | 0) { break label$1 } - fimport$0(79240 | 0, 77943 | 0, 39732 | 0, 67029 | 0); + fimport$0(79240 | 0, 77943 | 0, 39734 | 0, 67029 | 0); wasm2js_trap(); } label$2 : { @@ -73385,7 +73394,7 @@ function asmFunc(imports) { if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9017 | 0) & 1 | 0) { break label$5 } - fimport$0(83539 | 0, 77943 | 0, 39579 | 0, 67281 | 0); + fimport$0(83539 | 0, 77943 | 0, 39581 | 0, 67281 | 0); wasm2js_trap(); } $709(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); @@ -73819,19 +73828,19 @@ 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$0 = 0, $214_1 = 0, $59_1 = 0; - $6_1 = global$0 - 80 | 0; + var $6_1 = 0, i64toi32_i32$1 = 0, i64toi32_i32$0 = 0, $354_1 = 0, $67_1 = 0, $104_1 = 0, $109_1 = 0, $148_1 = 0, $152_1 = 0, $166_1 = 0, $170_1 = 0, $231_1 = 0, $235_1 = 0, $297_1 = 0, $301_1 = 0; + $6_1 = global$0 - 192 | 0; global$0 = $6_1; - HEAP32[($6_1 + 76 | 0) >> 2] = $0_1; - HEAP32[($6_1 + 72 | 0) >> 2] = $1_1; - HEAP32[($6_1 + 68 | 0) >> 2] = $2_1; - HEAP8[($6_1 + 67 | 0) >> 0] = $3_1; + HEAP32[($6_1 + 188 | 0) >> 2] = $0_1; + HEAP32[($6_1 + 184 | 0) >> 2] = $1_1; + HEAP32[($6_1 + 180 | 0) >> 2] = $2_1; + HEAP8[($6_1 + 179 | 0) >> 0] = $3_1; label$1 : { label$2 : { - if (!(($271((HEAP32[((HEAP32[($6_1 + 68 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 148 | 0 | 0) | 0) & 1 | 0)) { + if (!(($271((HEAP32[((HEAP32[($6_1 + 180 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 148 | 0 | 0) | 0) & 1 | 0)) { break label$2 } - if (!((HEAP32[((HEAP32[((HEAP32[($6_1 + 68 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[((HEAP32[($6_1 + 180 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$2 } break label$1; @@ -73839,115 +73848,201 @@ function asmFunc(imports) { label$3 : { label$4 : { label$5 : { - if ((HEAP32[((HEAP32[((HEAP32[((HEAP32[($6_1 + 68 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) & 2 | 0) { + if ((HEAP32[((HEAP32[((HEAP32[((HEAP32[($6_1 + 180 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) & 2 | 0) { break label$5 } - if (!((HEAP32[((HEAP32[((HEAP32[((HEAP32[($6_1 + 68 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[((HEAP32[((HEAP32[($6_1 + 180 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) & 1 | 0)) { break label$4 } } break label$3; } - $797(HEAP32[($6_1 + 76 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 72 | 0) >> 2] | 0 | 0); label$6 : { - if (!((HEAPU8[($6_1 + 67 | 0) >> 0] | 0) & 1 | 0)) { + if (!((HEAPU8[($6_1 + 179 | 0) >> 0] | 0) & 1 | 0)) { break label$6 } - $11(HEAP32[($6_1 + 72 | 0) >> 2] | 0 | 0, 87194 | 0, 0 | 0) | 0; + $11(HEAP32[($6_1 + 184 | 0) >> 2] | 0 | 0, 87179 | 0, 0 | 0) | 0; } - HEAP32[($6_1 + 56 | 0) >> 2] = 0; + HEAP32[($6_1 + 168 | 0) >> 2] = 0; i64toi32_i32$0 = 0; i64toi32_i32$1 = $6_1; - HEAP32[($6_1 + 48 | 0) >> 2] = 0; - HEAP32[($6_1 + 52 | 0) >> 2] = i64toi32_i32$0; - $717(HEAP32[($6_1 + 76 | 0) >> 2] | 0 | 0, $6_1 + 48 | 0 | 0, (HEAP32[((HEAP32[($6_1 + 68 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 148 | 0 | 0, HEAP32[((HEAP32[((HEAP32[((HEAP32[($6_1 + 68 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - $59_1 = HEAP32[($6_1 + 72 | 0) >> 2] | 0; - HEAP32[$6_1 >> 2] = HEAP32[($6_1 + 48 | 0) >> 2] | 0; - $11($59_1 | 0, 69406 | 0, $6_1 | 0) | 0; + HEAP32[($6_1 + 160 | 0) >> 2] = 0; + HEAP32[($6_1 + 164 | 0) >> 2] = i64toi32_i32$0; label$7 : { label$8 : { - if (!((HEAP32[((HEAP32[($6_1 + 68 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAPU8[((HEAP32[($6_1 + 188 | 0) >> 2] | 0) + 88 | 0) >> 0] | 0) & 1 | 0)) { break label$8 } - $11(HEAP32[($6_1 + 72 | 0) >> 2] | 0 | 0, 87319 | 0, 0 | 0) | 0; - label$9 : { - label$10 : { - if (!((HEAP32[((HEAP32[((HEAP32[($6_1 + 68 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { - break label$10 + $717(HEAP32[($6_1 + 188 | 0) >> 2] | 0 | 0, $6_1 + 160 | 0 | 0, (HEAP32[((HEAP32[($6_1 + 180 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 148 | 0 | 0, HEAP32[((HEAP32[((HEAP32[((HEAP32[($6_1 + 180 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $797(HEAP32[($6_1 + 188 | 0) >> 2] | 0 | 0, (HEAP32[($6_1 + 188 | 0) >> 2] | 0) + 52 | 0 | 0); + $67_1 = (HEAP32[($6_1 + 188 | 0) >> 2] | 0) + 52 | 0; + HEAP32[($6_1 + 64 | 0) >> 2] = HEAP32[($6_1 + 160 | 0) >> 2] | 0; + $11($67_1 | 0, 88088 | 0, $6_1 + 64 | 0 | 0) | 0; + $158($6_1 + 160 | 0 | 0); + break label$7; + } + $717(HEAP32[($6_1 + 188 | 0) >> 2] | 0 | 0, $6_1 + 160 | 0 | 0, (HEAP32[((HEAP32[($6_1 + 180 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 148 | 0 | 0, HEAP32[((HEAP32[((HEAP32[((HEAP32[($6_1 + 180 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + label$9 : { + label$10 : { + if (!((HEAP32[((HEAP32[($6_1 + 180 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { + break label$10 + } + if (!((HEAP32[((HEAP32[((HEAP32[($6_1 + 180 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { + break label$10 + } + $104_1 = HEAP32[($6_1 + 184 | 0) >> 2] | 0; + HEAP32[($6_1 + 80 | 0) >> 2] = HEAP32[($6_1 + 160 | 0) >> 2] | 0; + $11($104_1 | 0, 88088 | 0, $6_1 + 80 | 0 | 0) | 0; + break label$9; + } + $109_1 = HEAP32[($6_1 + 184 | 0) >> 2] | 0; + HEAP32[($6_1 + 96 | 0) >> 2] = HEAP32[($6_1 + 160 | 0) >> 2] | 0; + $11($109_1 | 0, 69406 | 0, $6_1 + 96 | 0 | 0) | 0; + } + } + label$11 : { + label$12 : { + if (!((HEAP32[((HEAP32[($6_1 + 180 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + break label$12 + } + HEAP8[($6_1 + 159 | 0) >> 0] = ((HEAP32[((HEAP32[((HEAP32[($6_1 + 180 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 164 | 0) >> 2] | 0) & 4096 | 0 | 0) != (0 | 0) & 1 | 0; + label$13 : { + label$14 : { + if (!((HEAP32[((HEAP32[((HEAP32[($6_1 + 180 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + break label$14 } - $798(HEAP32[($6_1 + 76 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 72 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($6_1 + 68 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); - $11(HEAP32[($6_1 + 72 | 0) >> 2] | 0 | 0, 88151 | 0, 0 | 0) | 0; - break label$9; + label$15 : { + label$16 : { + if (!((HEAPU8[($6_1 + 159 | 0) >> 0] | 0) & 1 | 0)) { + break label$16 + } + $798(HEAP32[($6_1 + 184 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($6_1 + 188 | 0) >> 2] | 0) >> 2] | 0 | 0); + $148_1 = HEAP32[($6_1 + 184 | 0) >> 2] | 0; + $152_1 = HEAP32[((HEAP32[((HEAP32[((HEAP32[($6_1 + 180 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; + HEAP32[($6_1 + 4 | 0) >> 2] = 89067; + HEAP32[$6_1 >> 2] = $152_1; + $11($148_1 | 0, 87300 | 0, $6_1 | 0) | 0; + $799(HEAP32[($6_1 + 188 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 184 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($6_1 + 180 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); + $11(HEAP32[($6_1 + 184 | 0) >> 2] | 0 | 0, 88160 | 0, 0 | 0) | 0; + break label$15; + } + $798(HEAP32[($6_1 + 184 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($6_1 + 188 | 0) >> 2] | 0) >> 2] | 0 | 0); + $166_1 = HEAP32[($6_1 + 184 | 0) >> 2] | 0; + $170_1 = HEAP32[((HEAP32[((HEAP32[((HEAP32[($6_1 + 180 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; + HEAP32[($6_1 + 20 | 0) >> 2] = 89067; + HEAP32[($6_1 + 16 | 0) >> 2] = $170_1; + $11($166_1 | 0, 87300 | 0, $6_1 + 16 | 0 | 0) | 0; + $799(HEAP32[($6_1 + 188 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 184 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($6_1 + 180 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); + $11(HEAP32[($6_1 + 184 | 0) >> 2] | 0 | 0, 88160 | 0, 0 | 0) | 0; + } + break label$13; } - label$11 : { - if (!((HEAP32[((HEAP32[((HEAP32[($6_1 + 68 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { - break label$11 + label$17 : { + if (!((HEAP32[((HEAP32[((HEAP32[($6_1 + 180 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + break label$17 } - label$12 : { - label$13 : { - if (!((HEAP32[((HEAP32[((HEAP32[((HEAP32[($6_1 + 68 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { - break label$13 + label$18 : { + label$19 : { + if (!((HEAP32[((HEAP32[((HEAP32[((HEAP32[($6_1 + 180 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + break label$19 } - if (!((HEAP32[((HEAP32[((HEAP32[((HEAP32[((HEAP32[($6_1 + 68 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { - break label$13 + if (!((HEAP32[((HEAP32[((HEAP32[((HEAP32[((HEAP32[($6_1 + 180 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + break label$19 } - label$14 : { - label$15 : { - if (!(($799((HEAP32[((HEAP32[($6_1 + 68 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 40 | 0 | 0) | 0) & 1 | 0)) { - break label$15 + label$20 : { + label$21 : { + if (!(($800((HEAP32[((HEAP32[($6_1 + 180 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 40 | 0 | 0) | 0) & 1 | 0)) { + break label$21 } - $11(HEAP32[($6_1 + 72 | 0) >> 2] | 0 | 0, 88080 | 0, 0 | 0) | 0; - break label$14; + label$22 : { + label$23 : { + if (!((HEAPU8[($6_1 + 159 | 0) >> 0] | 0) & 1 | 0)) { + break label$23 + } + HEAP32[($6_1 + 152 | 0) >> 2] = $300((HEAP32[((HEAP32[($6_1 + 180 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 148 | 0 | 0) | 0; + $798(HEAP32[($6_1 + 184 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($6_1 + 188 | 0) >> 2] | 0) >> 2] | 0 | 0); + $231_1 = HEAP32[($6_1 + 184 | 0) >> 2] | 0; + $235_1 = HEAP32[((HEAP32[((HEAP32[((HEAP32[($6_1 + 180 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; + HEAP32[($6_1 + 36 | 0) >> 2] = HEAP32[($6_1 + 152 | 0) >> 2] | 0; + HEAP32[($6_1 + 32 | 0) >> 2] = $235_1; + $11($231_1 | 0, 88146 | 0, $6_1 + 32 | 0 | 0) | 0; + HEAP8[((HEAP32[($6_1 + 188 | 0) >> 2] | 0) + 116 | 0) >> 0] = 1; + break label$22; + } + $11(HEAP32[($6_1 + 184 | 0) >> 2] | 0 | 0, 87304 | 0, 0 | 0) | 0; + $11(HEAP32[($6_1 + 184 | 0) >> 2] | 0 | 0, 88065 | 0, 0 | 0) | 0; + } + break label$20; + } + HEAP8[($6_1 + 151 | 0) >> 0] = 1; + label$24 : { + label$25 : { + if ((HEAPU8[($6_1 + 159 | 0) >> 0] | 0) & 1 | 0) { + break label$25 + } + $11(HEAP32[($6_1 + 184 | 0) >> 2] | 0 | 0, 87304 | 0, 0 | 0) | 0; + $11(HEAP32[($6_1 + 184 | 0) >> 2] | 0 | 0, 65975 | 0, 0 | 0) | 0; + $801(HEAP32[($6_1 + 188 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 184 | 0) >> 2] | 0 | 0, (HEAP32[((HEAP32[($6_1 + 180 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 40 | 0 | 0, $6_1 + 151 | 0 | 0); + $11(HEAP32[($6_1 + 184 | 0) >> 2] | 0 | 0, 65921 | 0, 0 | 0) | 0; + $11(HEAP32[($6_1 + 184 | 0) >> 2] | 0 | 0, 88160 | 0, 0 | 0) | 0; + break label$24; + } + $802(HEAP32[($6_1 + 188 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 184 | 0) >> 2] | 0 | 0, (HEAP32[((HEAP32[($6_1 + 180 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 40 | 0 | 0, HEAP32[((HEAP32[((HEAP32[((HEAP32[($6_1 + 180 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, 1 & 1 | 0 | 0); } - HEAP8[($6_1 + 47 | 0) >> 0] = 1; - $11(HEAP32[($6_1 + 72 | 0) >> 2] | 0 | 0, 65975 | 0, 0 | 0) | 0; - $800(HEAP32[($6_1 + 76 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 72 | 0) >> 2] | 0 | 0, (HEAP32[((HEAP32[($6_1 + 68 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 40 | 0 | 0, $6_1 + 47 | 0 | 0); - $11(HEAP32[($6_1 + 72 | 0) >> 2] | 0 | 0, 65921 | 0, 0 | 0) | 0; - $11(HEAP32[($6_1 + 72 | 0) >> 2] | 0 | 0, 88151 | 0, 0 | 0) | 0; - $801(HEAP32[($6_1 + 76 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 72 | 0) >> 2] | 0 | 0, (HEAP32[((HEAP32[($6_1 + 68 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 40 | 0 | 0, HEAP32[((HEAP32[((HEAP32[((HEAP32[($6_1 + 68 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); } - break label$12; + break label$18; + } + label$26 : { + label$27 : { + if (!((HEAPU8[($6_1 + 159 | 0) >> 0] | 0) & 1 | 0)) { + break label$27 + } + HEAP32[($6_1 + 144 | 0) >> 2] = $300((HEAP32[((HEAP32[($6_1 + 180 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 148 | 0 | 0) | 0; + $798(HEAP32[($6_1 + 184 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($6_1 + 188 | 0) >> 2] | 0) >> 2] | 0 | 0); + $297_1 = HEAP32[($6_1 + 184 | 0) >> 2] | 0; + $301_1 = HEAP32[((HEAP32[((HEAP32[((HEAP32[($6_1 + 180 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; + HEAP32[($6_1 + 52 | 0) >> 2] = HEAP32[($6_1 + 144 | 0) >> 2] | 0; + HEAP32[($6_1 + 48 | 0) >> 2] = $301_1; + $11($297_1 | 0, 88146 | 0, $6_1 + 48 | 0 | 0) | 0; + HEAP8[((HEAP32[($6_1 + 188 | 0) >> 2] | 0) + 116 | 0) >> 0] = 1; + break label$26; + } + $11(HEAP32[($6_1 + 184 | 0) >> 2] | 0 | 0, 87304 | 0, 0 | 0) | 0; + $11(HEAP32[($6_1 + 184 | 0) >> 2] | 0 | 0, 88065 | 0, 0 | 0) | 0; } - $11(HEAP32[($6_1 + 72 | 0) >> 2] | 0 | 0, 88080 | 0, 0 | 0) | 0; } } } - break label$7; - } - label$16 : { - if (!((HEAP32[((HEAP32[((HEAP32[($6_1 + 68 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { - break label$16 - } - $11(HEAP32[($6_1 + 72 | 0) >> 2] | 0 | 0, 88151 | 0, 0 | 0) | 0; + break label$11; } } - label$17 : { - if (!((HEAP32[((HEAP32[((HEAP32[($6_1 + 68 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { - break label$17 + label$28 : { + if (!((HEAP32[((HEAP32[((HEAP32[($6_1 + 180 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + break label$28 } i64toi32_i32$0 = 0; - $214_1 = 0; - i64toi32_i32$1 = $6_1 + 32 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $214_1; + $354_1 = 0; + i64toi32_i32$1 = $6_1 + 136 | 0; + HEAP32[i64toi32_i32$1 >> 2] = $354_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; - i64toi32_i32$1 = $6_1 + 24 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $214_1; + i64toi32_i32$1 = $6_1 + 128 | 0; + HEAP32[i64toi32_i32$1 >> 2] = $354_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; - i64toi32_i32$1 = $6_1 + 16 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $214_1; + i64toi32_i32$1 = $6_1 + 120 | 0; + HEAP32[i64toi32_i32$1 >> 2] = $354_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; i64toi32_i32$1 = $6_1; - HEAP32[($6_1 + 8 | 0) >> 2] = $214_1; - HEAP32[($6_1 + 12 | 0) >> 2] = i64toi32_i32$0; - HEAP32[($6_1 + 8 | 0) >> 2] = 1; - $85((HEAP32[($6_1 + 76 | 0) >> 2] | 0) + 40 | 0 | 0, HEAP32[((HEAP32[((HEAP32[((HEAP32[($6_1 + 68 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, $6_1 + 8 | 0 | 0) | 0; - $11(HEAP32[($6_1 + 72 | 0) >> 2] | 0 | 0, 88908 | 0, 0 | 0) | 0; - $802(HEAP32[($6_1 + 76 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 72 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($6_1 + 68 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0 | 0); - $11(HEAP32[($6_1 + 72 | 0) >> 2] | 0 | 0, 88908 | 0, 0 | 0) | 0; + HEAP32[($6_1 + 112 | 0) >> 2] = $354_1; + HEAP32[($6_1 + 116 | 0) >> 2] = i64toi32_i32$0; + HEAP32[($6_1 + 112 | 0) >> 2] = 1; + $85((HEAP32[($6_1 + 188 | 0) >> 2] | 0) + 40 | 0 | 0, HEAP32[((HEAP32[((HEAP32[((HEAP32[($6_1 + 180 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0, $6_1 + 112 | 0 | 0) | 0; + $11(HEAP32[($6_1 + 184 | 0) >> 2] | 0 | 0, 89066 | 0, 0 | 0) | 0; + $803(HEAP32[($6_1 + 188 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 184 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($6_1 + 180 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0 | 0); + $11(HEAP32[($6_1 + 184 | 0) >> 2] | 0 | 0, 89066 | 0, 0 | 0) | 0; } } } - global$0 = $6_1 + 80 | 0; + global$0 = $6_1 + 192 | 0; return; } @@ -73965,7 +74060,7 @@ function asmFunc(imports) { if (!((HEAP32[($4_1 + 4 | 0) >> 2] | 0 | 0) < (HEAP32[(HEAP32[($4_1 + 12 | 0) >> 2] | 0) >> 2] | 0 | 0) & 1 | 0)) { break label$1 } - $11(HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 87461 | 0, 0 | 0) | 0; + $11(HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0, 87446 | 0, 0 | 0) | 0; HEAP32[($4_1 + 4 | 0) >> 2] = (HEAP32[($4_1 + 4 | 0) >> 2] | 0) + 1 | 0; continue label$2; }; @@ -73974,449 +74069,491 @@ function asmFunc(imports) { return; } - function $798($0_1, $1_1, $2_1) { + function $798($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; + HEAP32[($4_1 + 4 | 0) >> 2] = 0; + label$1 : { + label$2 : while (1) { + if (!((HEAP32[($4_1 + 4 | 0) >> 2] | 0 | 0) < (HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0) & 1 | 0)) { + break label$1 + } + $11(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, 87446 | 0, 0 | 0) | 0; + HEAP32[($4_1 + 4 | 0) >> 2] = (HEAP32[($4_1 + 4 | 0) >> 2] | 0) + 1 | 0; + continue label$2; + }; + } + global$0 = $4_1 + 16 | 0; + return; + } + + function $799($0_1, $1_1, $2_1) { $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, $833_1 = 0, $109_1 = 0, $7_1 = 0, $110_1 = 0, $148_1 = 0, $353_1 = 0, $354_1 = 0, $416_1 = 0, $417_1 = 0, $13_1 = 0, $1083 = 0, $135_1 = 0, $140_1 = 0, $1164 = 0, $156_1 = 0, $163_1 = 0, $241_1 = 0, $269_1 = 0, $401_1 = 0, $406_1 = 0, $473_1 = 0, $481_1 = 0, $507_1 = 0, $616_1 = 0, $658_1 = 0; - $5_1 = global$0 - 912 | 0; + var $5_1 = 0, i64toi32_i32$1 = 0, i64toi32_i32$0 = 0, $880_1 = 0, $109_1 = 0, $7_1 = 0, $110_1 = 0, $148_1 = 0, $353_1 = 0, $354_1 = 0, $416_1 = 0, $417_1 = 0, $13_1 = 0, $1130 = 0, $135_1 = 0, $140_1 = 0, $1211 = 0, $156_1 = 0, $163_1 = 0, $241_1 = 0, $269_1 = 0, $401_1 = 0, $406_1 = 0, $462_1 = 0, $485_1 = 0, $493_1 = 0, $539_1 = 0, $547_1 = 0, $663_1 = 0, $705_1 = 0; + $5_1 = global$0 - 960 | 0; global$0 = $5_1; - HEAP32[($5_1 + 908 | 0) >> 2] = $0_1; - HEAP32[($5_1 + 904 | 0) >> 2] = $1_1; - HEAP32[($5_1 + 900 | 0) >> 2] = $2_1; - $7_1 = HEAP32[(HEAP32[($5_1 + 900 | 0) >> 2] | 0) >> 2] | 0; + HEAP32[($5_1 + 956 | 0) >> 2] = $0_1; + HEAP32[($5_1 + 952 | 0) >> 2] = $1_1; + HEAP32[($5_1 + 948 | 0) >> 2] = $2_1; + $7_1 = HEAP32[(HEAP32[($5_1 + 948 | 0) >> 2] | 0) >> 2] | 0; label$1 : { label$2 : { switch ($7_1 | 0) { case 0: - fimport$0(75141 | 0, 77943 | 0, 40407 | 0, 72256 | 0); + fimport$0(75141 | 0, 77943 | 0, 40409 | 0, 72256 | 0); wasm2js_trap(); case 4: break label$1; case 2: - $13_1 = HEAP32[($5_1 + 904 | 0) >> 2] | 0; - HEAP32[($5_1 + 64 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 192 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; + $13_1 = HEAP32[($5_1 + 952 | 0) >> 2] | 0; + HEAP32[($5_1 + 64 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 192 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; $11($13_1 | 0, 69406 | 0, $5_1 + 64 | 0 | 0) | 0; label$52 : { label$53 : { - if (($271((HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 192 | 0) >> 2] | 0) + 148 | 0 | 0) | 0) & 1 | 0) { + if (($271((HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 192 | 0) >> 2] | 0) + 148 | 0 | 0) | 0) & 1 | 0) { break label$53 } - if (!((HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0) & 2 | 0)) { + if (!((HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0) & 2 | 0)) { break label$52 } } - HEAP32[($5_1 + 896 | 0) >> 2] = 0; - HEAP32[($5_1 + 896 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 184 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - HEAP32[($5_1 + 892 | 0) >> 2] = $81((HEAP32[($5_1 + 908 | 0) >> 2] | 0) + 40 | 0 | 0, HEAP32[($5_1 + 896 | 0) >> 2] | 0 | 0) | 0; + HEAP32[($5_1 + 944 | 0) >> 2] = 0; + HEAP32[($5_1 + 944 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 184 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; + HEAP32[($5_1 + 940 | 0) >> 2] = $81((HEAP32[($5_1 + 956 | 0) >> 2] | 0) + 40 | 0 | 0, HEAP32[($5_1 + 944 | 0) >> 2] | 0 | 0) | 0; label$54 : { - if (!((HEAP32[($5_1 + 892 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { + if (!((HEAP32[($5_1 + 940 | 0) >> 2] | 0 | 0) == (0 | 0) & 1 | 0)) { break label$54 } i64toi32_i32$0 = 0; - $833_1 = 0; - i64toi32_i32$1 = $5_1 + 880 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $833_1; + $880_1 = 0; + i64toi32_i32$1 = $5_1 + 928 | 0; + HEAP32[i64toi32_i32$1 >> 2] = $880_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; - i64toi32_i32$1 = $5_1 + 872 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $833_1; + i64toi32_i32$1 = $5_1 + 920 | 0; + HEAP32[i64toi32_i32$1 >> 2] = $880_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; - i64toi32_i32$1 = $5_1 + 864 | 0; - HEAP32[i64toi32_i32$1 >> 2] = $833_1; + i64toi32_i32$1 = $5_1 + 912 | 0; + HEAP32[i64toi32_i32$1 >> 2] = $880_1; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; i64toi32_i32$1 = $5_1; - HEAP32[($5_1 + 856 | 0) >> 2] = $833_1; - HEAP32[($5_1 + 860 | 0) >> 2] = i64toi32_i32$0; - HEAP32[($5_1 + 856 | 0) >> 2] = 1; - $85((HEAP32[($5_1 + 908 | 0) >> 2] | 0) + 40 | 0 | 0, HEAP32[($5_1 + 896 | 0) >> 2] | 0 | 0, $5_1 + 856 | 0 | 0) | 0; - HEAP32[($5_1 + 848 | 0) >> 2] = 0; + HEAP32[($5_1 + 904 | 0) >> 2] = $880_1; + HEAP32[($5_1 + 908 | 0) >> 2] = i64toi32_i32$0; + HEAP32[($5_1 + 904 | 0) >> 2] = 1; + $85((HEAP32[($5_1 + 956 | 0) >> 2] | 0) + 40 | 0 | 0, HEAP32[($5_1 + 944 | 0) >> 2] | 0 | 0, $5_1 + 904 | 0 | 0) | 0; + HEAP32[($5_1 + 896 | 0) >> 2] = 0; i64toi32_i32$0 = 0; i64toi32_i32$1 = $5_1; - HEAP32[($5_1 + 840 | 0) >> 2] = 0; - HEAP32[($5_1 + 844 | 0) >> 2] = i64toi32_i32$0; - $717(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, $5_1 + 840 | 0 | 0, (HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 4 | 0 | 0, HEAP32[($5_1 + 896 | 0) >> 2] | 0 | 0); + HEAP32[($5_1 + 888 | 0) >> 2] = 0; + HEAP32[($5_1 + 892 | 0) >> 2] = i64toi32_i32$0; + $717(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, $5_1 + 888 | 0 | 0, (HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 4 | 0 | 0, HEAP32[($5_1 + 944 | 0) >> 2] | 0 | 0); label$55 : { label$56 : { - if (!(($271((HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 192 | 0) >> 2] | 0) + 148 | 0 | 0) | 0) & 1 | 0)) { + if (!(($271((HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 192 | 0) >> 2] | 0) + 148 | 0 | 0) | 0) & 1 | 0)) { break label$56 } label$57 : { label$58 : { - if (!((HEAP32[((HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 192 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 192 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$58 } - if (!((HEAP32[((HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 192 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 192 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$58 } - if (!((HEAP32[((HEAP32[((HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 192 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[((HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 192 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0) & 1 | 0)) { break label$58 } - $11((HEAP32[($5_1 + 908 | 0) >> 2] | 0) + 88 | 0 | 0, 88908 | 0, 0 | 0) | 0; - $109_1 = HEAP32[($5_1 + 904 | 0) >> 2] | 0; + $11((HEAP32[($5_1 + 956 | 0) >> 2] | 0) + 104 | 0 | 0, 89066 | 0, 0 | 0) | 0; + $109_1 = HEAP32[($5_1 + 952 | 0) >> 2] | 0; $110_1 = 8; - HEAP32[(($5_1 + 824 | 0) + $110_1 | 0) >> 2] = HEAP32[($109_1 + $110_1 | 0) >> 2] | 0; + HEAP32[(($5_1 + 872 | 0) + $110_1 | 0) >> 2] = HEAP32[($109_1 + $110_1 | 0) >> 2] | 0; i64toi32_i32$0 = HEAP32[$109_1 >> 2] | 0; i64toi32_i32$1 = HEAP32[($109_1 + 4 | 0) >> 2] | 0; - $1083 = i64toi32_i32$0; + $1130 = i64toi32_i32$0; i64toi32_i32$0 = $5_1; - HEAP32[($5_1 + 824 | 0) >> 2] = $1083; - HEAP32[($5_1 + 828 | 0) >> 2] = i64toi32_i32$1; - HEAP32[(HEAP32[($5_1 + 904 | 0) >> 2] | 0) >> 2] = 0; - HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 8 | 0) >> 2] = 0; - HEAP32[((HEAP32[($5_1 + 904 | 0) >> 2] | 0) + 4 | 0) >> 2] = 0; - HEAP32[($5_1 + 820 | 0) >> 2] = HEAP32[(HEAP32[($5_1 + 908 | 0) >> 2] | 0) >> 2] | 0; - HEAP32[(HEAP32[($5_1 + 908 | 0) >> 2] | 0) >> 2] = 0; - $802(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 192 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0 | 0); - HEAP32[(HEAP32[($5_1 + 908 | 0) >> 2] | 0) >> 2] = HEAP32[($5_1 + 820 | 0) >> 2] | 0; - $135_1 = (HEAP32[($5_1 + 908 | 0) >> 2] | 0) + 88 | 0; - HEAP32[$5_1 >> 2] = HEAP32[($5_1 + 840 | 0) >> 2] | 0; - $11($135_1 | 0, 87724 | 0, $5_1 | 0) | 0; - $140_1 = (HEAP32[($5_1 + 908 | 0) >> 2] | 0) + 88 | 0; - HEAP32[($5_1 + 16 | 0) >> 2] = HEAP32[(HEAP32[($5_1 + 904 | 0) >> 2] | 0) >> 2] | 0; + HEAP32[($5_1 + 872 | 0) >> 2] = $1130; + HEAP32[($5_1 + 876 | 0) >> 2] = i64toi32_i32$1; + HEAP32[(HEAP32[($5_1 + 952 | 0) >> 2] | 0) >> 2] = 0; + HEAP32[((HEAP32[($5_1 + 952 | 0) >> 2] | 0) + 8 | 0) >> 2] = 0; + HEAP32[((HEAP32[($5_1 + 952 | 0) >> 2] | 0) + 4 | 0) >> 2] = 0; + HEAP32[($5_1 + 868 | 0) >> 2] = HEAP32[(HEAP32[($5_1 + 956 | 0) >> 2] | 0) >> 2] | 0; + HEAP32[(HEAP32[($5_1 + 956 | 0) >> 2] | 0) >> 2] = 0; + $803(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 192 | 0) >> 2] | 0) + 32 | 0) >> 2] | 0 | 0); + HEAP32[(HEAP32[($5_1 + 956 | 0) >> 2] | 0) >> 2] = HEAP32[($5_1 + 868 | 0) >> 2] | 0; + $135_1 = (HEAP32[($5_1 + 956 | 0) >> 2] | 0) + 104 | 0; + HEAP32[$5_1 >> 2] = HEAP32[($5_1 + 888 | 0) >> 2] | 0; + $11($135_1 | 0, 87709 | 0, $5_1 | 0) | 0; + $140_1 = (HEAP32[($5_1 + 956 | 0) >> 2] | 0) + 104 | 0; + HEAP32[($5_1 + 16 | 0) >> 2] = HEAP32[(HEAP32[($5_1 + 952 | 0) >> 2] | 0) >> 2] | 0; $11($140_1 | 0, 69406 | 0, $5_1 + 16 | 0 | 0) | 0; - $12(HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0); - i64toi32_i32$1 = HEAP32[($5_1 + 824 | 0) >> 2] | 0; - i64toi32_i32$0 = HEAP32[($5_1 + 828 | 0) >> 2] | 0; - $1164 = i64toi32_i32$1; - i64toi32_i32$1 = HEAP32[($5_1 + 904 | 0) >> 2] | 0; - HEAP32[i64toi32_i32$1 >> 2] = $1164; + $12(HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0); + i64toi32_i32$1 = HEAP32[($5_1 + 872 | 0) >> 2] | 0; + i64toi32_i32$0 = HEAP32[($5_1 + 876 | 0) >> 2] | 0; + $1211 = i64toi32_i32$1; + i64toi32_i32$1 = HEAP32[($5_1 + 952 | 0) >> 2] | 0; + HEAP32[i64toi32_i32$1 >> 2] = $1211; HEAP32[(i64toi32_i32$1 + 4 | 0) >> 2] = i64toi32_i32$0; $148_1 = 8; - HEAP32[(i64toi32_i32$1 + $148_1 | 0) >> 2] = HEAP32[(($5_1 + 824 | 0) + $148_1 | 0) >> 2] | 0; + HEAP32[(i64toi32_i32$1 + $148_1 | 0) >> 2] = HEAP32[(($5_1 + 872 | 0) + $148_1 | 0) >> 2] | 0; break label$57; } - $156_1 = (HEAP32[($5_1 + 908 | 0) >> 2] | 0) + 88 | 0; - HEAP32[($5_1 + 32 | 0) >> 2] = HEAP32[($5_1 + 840 | 0) >> 2] | 0; - $11($156_1 | 0, 88103 | 0, $5_1 + 32 | 0 | 0) | 0; + $156_1 = (HEAP32[($5_1 + 956 | 0) >> 2] | 0) + 104 | 0; + HEAP32[($5_1 + 32 | 0) >> 2] = HEAP32[($5_1 + 888 | 0) >> 2] | 0; + $11($156_1 | 0, 88088 | 0, $5_1 + 32 | 0 | 0) | 0; } break label$55; } - $163_1 = (HEAP32[($5_1 + 908 | 0) >> 2] | 0) + 88 | 0; - HEAP32[($5_1 + 48 | 0) >> 2] = HEAP32[($5_1 + 840 | 0) >> 2] | 0; - $11($163_1 | 0, 88103 | 0, $5_1 + 48 | 0 | 0) | 0; + $163_1 = (HEAP32[($5_1 + 956 | 0) >> 2] | 0) + 104 | 0; + HEAP32[($5_1 + 48 | 0) >> 2] = HEAP32[($5_1 + 888 | 0) >> 2] | 0; + $11($163_1 | 0, 88088 | 0, $5_1 + 48 | 0 | 0) | 0; } - $12($5_1 + 840 | 0 | 0); + $12($5_1 + 888 | 0 | 0); } } break label$1; case 3: - $803(HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 184 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0) | 0; + $804(HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 184 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0) | 0; break label$1; case 1: case 5: case 6: case 8: - $804(HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, (HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 64 | 0 | 0); + $805(HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, (HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 64 | 0 | 0); break label$1; case 9: label$59 : { - if ((HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { + if ((HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$59 } - fimport$0(81638 | 0, 77943 | 0, 40485 | 0, 72256 | 0); + fimport$0(81638 | 0, 77943 | 0, 40487 | 0, 72256 | 0); wasm2js_trap(); } - $11(HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, 86413 | 0, 0 | 0) | 0; - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); - $11(HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, 86385 | 0, 0 | 0) | 0; + $11(HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, 86406 | 0, 0 | 0) | 0; + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, 86378 | 0, 0 | 0) | 0; break label$1; case 7: label$60 : { - if ((HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 180 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { + if ((HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 180 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$60 } - fimport$0(82558 | 0, 77943 | 0, 40492 | 0, 72256 | 0); + fimport$0(82558 | 0, 77943 | 0, 40494 | 0, 72256 | 0); wasm2js_trap(); } label$61 : { - if (!((HEAP32[((HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 180 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 180 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$61 } - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 180 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 180 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); } break label$1; case 14: - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); - HEAP32[($5_1 + 716 | 0) >> 2] = $714((HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0) + 4 | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 196 | 0) >> 2] | 0 | 0, $5_1 + 720 | 0 | 0) | 0; + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); + HEAP32[($5_1 + 764 | 0) >> 2] = $714((HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0) + 4 | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 196 | 0) >> 2] | 0 | 0, $5_1 + 768 | 0 | 0) | 0; label$62 : { - if (HEAP32[($5_1 + 716 | 0) >> 2] | 0) { + if (HEAP32[($5_1 + 764 | 0) >> 2] | 0) { break label$62 } - $241_1 = HEAP32[($5_1 + 904 | 0) >> 2] | 0; - HEAP32[($5_1 + 80 | 0) >> 2] = $5_1 + 720 | 0; + $241_1 = HEAP32[($5_1 + 952 | 0) >> 2] | 0; + HEAP32[($5_1 + 80 | 0) >> 2] = $5_1 + 768 | 0; $11($241_1 | 0, 69322 | 0, $5_1 + 80 | 0 | 0) | 0; } break label$1; case 15: - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); - $311($5_1 + 656 | 0 | 0, (HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0) + 4 | 0 | 0); - HEAP32[($5_1 + 540 | 0) >> 2] = $714($5_1 + 656 | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 196 | 0) >> 2] | 0 | 0, $5_1 + 544 | 0 | 0) | 0; + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); + $311($5_1 + 704 | 0 | 0, (HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0) + 4 | 0 | 0); + HEAP32[($5_1 + 588 | 0) >> 2] = $714($5_1 + 704 | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 196 | 0) >> 2] | 0 | 0, $5_1 + 592 | 0 | 0) | 0; label$63 : { - if (HEAP32[($5_1 + 540 | 0) >> 2] | 0) { + if (HEAP32[($5_1 + 588 | 0) >> 2] | 0) { break label$63 } - $269_1 = HEAP32[($5_1 + 904 | 0) >> 2] | 0; - HEAP32[($5_1 + 96 | 0) >> 2] = $5_1 + 544 | 0; + $269_1 = HEAP32[($5_1 + 952 | 0) >> 2] | 0; + HEAP32[($5_1 + 96 | 0) >> 2] = $5_1 + 592 | 0; $11($269_1 | 0, 69300 | 0, $5_1 + 96 | 0 | 0) | 0; } - $74($5_1 + 656 | 0 | 0); + $74($5_1 + 704 | 0 | 0); break label$1; case 16: - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); - $11(HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, 85659 | 0, 0 | 0) | 0; + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, 85659 | 0, 0 | 0) | 0; break label$1; case 17: - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); - $11(HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, 85624 | 0, 0 | 0) | 0; + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, 85624 | 0, 0 | 0) | 0; break label$1; case 13: - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); - $11(HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, 78128 | 0, 0 | 0) | 0; - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); - $11(HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, 78126 | 0, 0 | 0) | 0; + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, 78128 | 0, 0 | 0) | 0; + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, 78126 | 0, 0 | 0) | 0; break label$1; case 12: - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); - $11(HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, 86413 | 0, 0 | 0) | 0; - HEAP32[($5_1 + 536 | 0) >> 2] = HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 200 | 0) >> 2] | 0; + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, 86406 | 0, 0 | 0) | 0; + HEAP32[($5_1 + 584 | 0) >> 2] = HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 200 | 0) >> 2] | 0; label$64 : { label$65 : while (1) { - if (!((HEAP32[($5_1 + 536 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[($5_1 + 584 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$64 } - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($5_1 + 536 | 0) >> 2] | 0) >> 2] | 0 | 0); + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($5_1 + 584 | 0) >> 2] | 0) >> 2] | 0 | 0); label$66 : { - if (!((HEAP32[((HEAP32[($5_1 + 536 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($5_1 + 584 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$66 } - $11(HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, 87437 | 0, 0 | 0) | 0; + $11(HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, 87422 | 0, 0 | 0) | 0; } - HEAP32[($5_1 + 536 | 0) >> 2] = HEAP32[((HEAP32[($5_1 + 536 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; + HEAP32[($5_1 + 584 | 0) >> 2] = HEAP32[((HEAP32[($5_1 + 584 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; continue label$65; }; } - $11(HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, 86385 | 0, 0 | 0) | 0; + $11(HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, 86378 | 0, 0 | 0) | 0; break label$1; case 33: - $11(HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, 87001 | 0, 0 | 0) | 0; - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, 86994 | 0, 0 | 0) | 0; + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); break label$1; case 10: - $353_1 = HEAP32[($5_1 + 908 | 0) >> 2] | 0; + $353_1 = HEAP32[($5_1 + 956 | 0) >> 2] | 0; $354_1 = HEAP32[($353_1 + 8 | 0) >> 2] | 0; HEAP32[($353_1 + 8 | 0) >> 2] = $354_1 + 1 | 0; HEAP32[($5_1 + 112 | 0) >> 2] = $354_1; - $929($5_1 + 432 | 0 | 0, 100 | 0, 77782 | 0, $5_1 + 112 | 0 | 0) | 0; - $805((HEAP32[($5_1 + 908 | 0) >> 2] | 0) + 52 | 0 | 0, HEAP32[(HEAP32[($5_1 + 908 | 0) >> 2] | 0) >> 2] | 0 | 0); - HEAP32[($5_1 + 424 | 0) >> 2] = 0; + $929($5_1 + 480 | 0 | 0, 100 | 0, 77782 | 0, $5_1 + 112 | 0 | 0) | 0; + $798((HEAP32[($5_1 + 956 | 0) >> 2] | 0) + 64 | 0 | 0, HEAP32[(HEAP32[($5_1 + 956 | 0) >> 2] | 0) >> 2] | 0 | 0); + HEAP32[($5_1 + 472 | 0) >> 2] = 0; i64toi32_i32$0 = 0; i64toi32_i32$1 = $5_1; - HEAP32[($5_1 + 416 | 0) >> 2] = 0; - HEAP32[($5_1 + 420 | 0) >> 2] = i64toi32_i32$0; - $11($5_1 + 416 | 0 | 0, 87247 | 0, 0 | 0) | 0; - $717(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, $5_1 + 416 | 0 | 0, (HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 4 | 0 | 0, $5_1 + 432 | 0 | 0); - $11($5_1 + 416 | 0 | 0, 88908 | 0, 0 | 0) | 0; - HEAP32[($5_1 + 412 | 0) >> 2] = HEAP32[(HEAP32[($5_1 + 908 | 0) >> 2] | 0) >> 2] | 0; - HEAP32[(HEAP32[($5_1 + 908 | 0) >> 2] | 0) >> 2] = 0; - $802(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, $5_1 + 416 | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 176 | 0) >> 2] | 0 | 0); - HEAP32[(HEAP32[($5_1 + 908 | 0) >> 2] | 0) >> 2] = HEAP32[($5_1 + 412 | 0) >> 2] | 0; - $401_1 = (HEAP32[($5_1 + 908 | 0) >> 2] | 0) + 64 | 0; - HEAP32[($5_1 + 128 | 0) >> 2] = HEAP32[($5_1 + 416 | 0) >> 2] | 0; - $11($401_1 | 0, 87790 | 0, $5_1 + 128 | 0 | 0) | 0; - $406_1 = HEAP32[($5_1 + 904 | 0) >> 2] | 0; - HEAP32[($5_1 + 144 | 0) >> 2] = $5_1 + 432 | 0; + HEAP32[($5_1 + 464 | 0) >> 2] = 0; + HEAP32[($5_1 + 468 | 0) >> 2] = i64toi32_i32$0; + $11($5_1 + 464 | 0 | 0, 87232 | 0, 0 | 0) | 0; + $717(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, $5_1 + 464 | 0 | 0, (HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 4 | 0 | 0, $5_1 + 480 | 0 | 0); + $11($5_1 + 464 | 0 | 0, 89066 | 0, 0 | 0) | 0; + HEAP32[($5_1 + 460 | 0) >> 2] = HEAP32[(HEAP32[($5_1 + 956 | 0) >> 2] | 0) >> 2] | 0; + HEAP32[(HEAP32[($5_1 + 956 | 0) >> 2] | 0) >> 2] = 0; + $803(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, $5_1 + 464 | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 176 | 0) >> 2] | 0 | 0); + HEAP32[(HEAP32[($5_1 + 956 | 0) >> 2] | 0) >> 2] = HEAP32[($5_1 + 460 | 0) >> 2] | 0; + $401_1 = (HEAP32[($5_1 + 956 | 0) >> 2] | 0) + 76 | 0; + HEAP32[($5_1 + 128 | 0) >> 2] = HEAP32[($5_1 + 464 | 0) >> 2] | 0; + $11($401_1 | 0, 87775 | 0, $5_1 + 128 | 0 | 0) | 0; + $406_1 = HEAP32[($5_1 + 952 | 0) >> 2] | 0; + HEAP32[($5_1 + 144 | 0) >> 2] = $5_1 + 480 | 0; $11($406_1 | 0, 69406 | 0, $5_1 + 144 | 0 | 0) | 0; break label$1; case 11: - $416_1 = HEAP32[($5_1 + 908 | 0) >> 2] | 0; + $416_1 = HEAP32[($5_1 + 956 | 0) >> 2] | 0; $417_1 = HEAP32[($416_1 + 4 | 0) >> 2] | 0; HEAP32[($416_1 + 4 | 0) >> 2] = $417_1 + 1 | 0; - HEAP32[($5_1 + 160 | 0) >> 2] = $417_1; - $929($5_1 + 304 | 0 | 0, 100 | 0, 77734 | 0, $5_1 + 160 | 0 | 0) | 0; - HEAP32[($5_1 + 296 | 0) >> 2] = 0; - i64toi32_i32$0 = 0; - i64toi32_i32$1 = $5_1; - HEAP32[($5_1 + 288 | 0) >> 2] = 0; - HEAP32[($5_1 + 292 | 0) >> 2] = i64toi32_i32$0; - $805($5_1 + 288 | 0 | 0, HEAP32[(HEAP32[($5_1 + 908 | 0) >> 2] | 0) >> 2] | 0 | 0); - $717(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, $5_1 + 288 | 0 | 0, (HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 4 | 0 | 0, $5_1 + 304 | 0 | 0); - HEAP8[($5_1 + 287 | 0) >> 0] = 1; - $11($5_1 + 288 | 0 | 0, 65972 | 0, 0 | 0) | 0; - $800(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, $5_1 + 288 | 0 | 0, (HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 64 | 0 | 0, $5_1 + 287 | 0 | 0); - $11($5_1 + 288 | 0 | 0, 88082 | 0, 0 | 0) | 0; - $801(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, $5_1 + 288 | 0 | 0, (HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 64 | 0 | 0, $5_1 + 304 | 0 | 0); - $473_1 = (HEAP32[($5_1 + 908 | 0) >> 2] | 0) + 52 | 0; - HEAP32[($5_1 + 176 | 0) >> 2] = HEAP32[($5_1 + 288 | 0) >> 2] | 0; - $11($473_1 | 0, 69406 | 0, $5_1 + 176 | 0 | 0) | 0; - $12($5_1 + 288 | 0 | 0); - $481_1 = HEAP32[($5_1 + 904 | 0) >> 2] | 0; - HEAP32[($5_1 + 192 | 0) >> 2] = $5_1 + 304 | 0; - $11($481_1 | 0, 69406 | 0, $5_1 + 192 | 0 | 0) | 0; + HEAP32[($5_1 + 256 | 0) >> 2] = $417_1; + $929($5_1 + 352 | 0 | 0, 100 | 0, 77734 | 0, $5_1 + 256 | 0 | 0) | 0; + label$67 : { + label$68 : { + if (!((HEAPU8[((HEAP32[($5_1 + 956 | 0) >> 2] | 0) + 88 | 0) >> 0] | 0) & 1 | 0)) { + break label$68 + } + HEAP32[($5_1 + 344 | 0) >> 2] = 0; + i64toi32_i32$0 = 0; + i64toi32_i32$1 = $5_1; + HEAP32[($5_1 + 336 | 0) >> 2] = 0; + HEAP32[($5_1 + 340 | 0) >> 2] = i64toi32_i32$0; + $157((HEAP32[($5_1 + 956 | 0) >> 2] | 0) + 52 | 0 | 0, $5_1 + 336 | 0 | 0); + $798($5_1 + 336 | 0 | 0, HEAP32[(HEAP32[($5_1 + 956 | 0) >> 2] | 0) >> 2] | 0 | 0); + $717(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, $5_1 + 336 | 0 | 0, (HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 4 | 0 | 0, $5_1 + 352 | 0 | 0); + HEAP32[($5_1 + 160 | 0) >> 2] = $5_1 + 352 | 0; + $11($5_1 + 336 | 0 | 0, 88160 | 0, $5_1 + 160 | 0 | 0) | 0; + $462_1 = (HEAP32[($5_1 + 956 | 0) >> 2] | 0) + 52 | 0; + HEAP32[($5_1 + 176 | 0) >> 2] = HEAP32[($5_1 + 336 | 0) >> 2] | 0; + $11($462_1 | 0, 69406 | 0, $5_1 + 176 | 0 | 0) | 0; + $158($5_1 + 336 | 0 | 0); + $802(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, $5_1 + 336 | 0 | 0, (HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 64 | 0 | 0, $5_1 + 352 | 0 | 0, 1 & 1 | 0 | 0); + $485_1 = (HEAP32[($5_1 + 956 | 0) >> 2] | 0) + 64 | 0; + HEAP32[($5_1 + 192 | 0) >> 2] = HEAP32[($5_1 + 336 | 0) >> 2] | 0; + $11($485_1 | 0, 69406 | 0, $5_1 + 192 | 0 | 0) | 0; + $12($5_1 + 336 | 0 | 0); + $493_1 = HEAP32[($5_1 + 952 | 0) >> 2] | 0; + HEAP32[($5_1 + 208 | 0) >> 2] = $5_1 + 352 | 0; + $11($493_1 | 0, 69406 | 0, $5_1 + 208 | 0 | 0) | 0; + break label$67; + } + HEAP32[($5_1 + 328 | 0) >> 2] = 0; + i64toi32_i32$0 = 0; + i64toi32_i32$1 = $5_1; + HEAP32[($5_1 + 320 | 0) >> 2] = 0; + HEAP32[($5_1 + 324 | 0) >> 2] = i64toi32_i32$0; + $798($5_1 + 320 | 0 | 0, HEAP32[(HEAP32[($5_1 + 956 | 0) >> 2] | 0) >> 2] | 0 | 0); + $717(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, $5_1 + 320 | 0 | 0, (HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 4 | 0 | 0, $5_1 + 352 | 0 | 0); + HEAP8[($5_1 + 319 | 0) >> 0] = 1; + $11($5_1 + 320 | 0 | 0, 65972 | 0, 0 | 0) | 0; + $801(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, $5_1 + 320 | 0 | 0, (HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 64 | 0 | 0, $5_1 + 319 | 0 | 0); + $11($5_1 + 320 | 0 | 0, 88067 | 0, 0 | 0) | 0; + $539_1 = (HEAP32[($5_1 + 956 | 0) >> 2] | 0) + 64 | 0; + HEAP32[($5_1 + 224 | 0) >> 2] = HEAP32[($5_1 + 320 | 0) >> 2] | 0; + $11($539_1 | 0, 69406 | 0, $5_1 + 224 | 0 | 0) | 0; + $12($5_1 + 320 | 0 | 0); + $547_1 = HEAP32[($5_1 + 952 | 0) >> 2] | 0; + HEAP32[($5_1 + 240 | 0) >> 2] = $5_1 + 352 | 0; + $11($547_1 | 0, 69406 | 0, $5_1 + 240 | 0 | 0) | 0; + } break label$1; case 18: - $11(HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, 87144 | 0, 0 | 0) | 0; - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); + $805(HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, (HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 64 | 0 | 0); break label$1; case 19: - HEAP32[($5_1 + 280 | 0) >> 2] = 0; - i64toi32_i32$0 = 0; - i64toi32_i32$1 = $5_1; - HEAP32[($5_1 + 272 | 0) >> 2] = 0; - HEAP32[($5_1 + 276 | 0) >> 2] = i64toi32_i32$0; - $717(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, $5_1 + 272 | 0 | 0, (HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 168 | 0) >> 2] | 0) + 16 | 0 | 0, 0 | 0); - $507_1 = HEAP32[($5_1 + 904 | 0) >> 2] | 0; - HEAP32[($5_1 + 208 | 0) >> 2] = HEAP32[($5_1 + 272 | 0) >> 2] | 0; - $11($507_1 | 0, 85705 | 0, $5_1 + 208 | 0 | 0) | 0; - $12($5_1 + 272 | 0 | 0); + $805(HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, (HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 64 | 0 | 0); break label$1; case 20: case 24: - $804(HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, (HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 64 | 0 | 0); + $805(HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, (HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 64 | 0 | 0); break label$1; case 26: - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); - $11(HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, 85658 | 0, 0 | 0) | 0; + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, 85658 | 0, 0 | 0) | 0; break label$1; case 27: - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); - $11(HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, 85623 | 0, 0 | 0) | 0; + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, 85623 | 0, 0 | 0) | 0; break label$1; case 28: - $11(HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, 87046 | 0, 0 | 0) | 0; - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, 87039 | 0, 0 | 0) | 0; + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); break label$1; case 29: - $11(HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, 65872 | 0, 0 | 0) | 0; - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, 65872 | 0, 0 | 0) | 0; + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); break label$1; case 30: - $11(HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, 85653 | 0, 0 | 0) | 0; - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, 85653 | 0, 0 | 0) | 0; + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); break label$1; case 31: - $11(HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, 85662 | 0, 0 | 0) | 0; - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, 85662 | 0, 0 | 0) | 0; + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); break label$1; case 32: - $11(HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, 85665 | 0, 0 | 0) | 0; - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, 85665 | 0, 0 | 0) | 0; + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); break label$1; case 25: break label$1; case 39: - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); - $11(HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, 87433 | 0, 0 | 0) | 0; - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, 87418 | 0, 0 | 0) | 0; + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); break label$1; case 38: - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); - $11(HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, 87440 | 0, 0 | 0) | 0; - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, 87425 | 0, 0 | 0) | 0; + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); break label$1; case 35: - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); - $11(HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, 87444 | 0, 0 | 0) | 0; - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, 87429 | 0, 0 | 0) | 0; + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); break label$1; case 36: - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); - $11(HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, 87392 | 0, 0 | 0) | 0; - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, 87377 | 0, 0 | 0) | 0; + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); break label$1; case 37: - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); - $616_1 = HEAP32[($5_1 + 904 | 0) >> 2] | 0; - HEAP32[($5_1 + 224 | 0) >> 2] = 87457; - $11($616_1 | 0, 69406 | 0, $5_1 + 224 | 0 | 0) | 0; - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); + $663_1 = HEAP32[($5_1 + 952 | 0) >> 2] | 0; + HEAP32[($5_1 + 272 | 0) >> 2] = 87442; + $11($663_1 | 0, 69406 | 0, $5_1 + 272 | 0 | 0) | 0; + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); break label$1; case 54: - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); - $11(HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, 87437 | 0, 0 | 0) | 0; - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, 87422 | 0, 0 | 0) | 0; + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); break label$1; case 53: - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); - $11(HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, 87319 | 0, 0 | 0) | 0; - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, 87304 | 0, 0 | 0) | 0; + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); break label$1; case 34: - HEAP32[($5_1 + 264 | 0) >> 2] = 0; + HEAP32[($5_1 + 312 | 0) >> 2] = 0; i64toi32_i32$0 = 0; i64toi32_i32$1 = $5_1; - HEAP32[($5_1 + 256 | 0) >> 2] = 0; - HEAP32[($5_1 + 260 | 0) >> 2] = i64toi32_i32$0; - $717(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, $5_1 + 256 | 0 | 0, (HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 4 | 0 | 0, 0 | 0); - $658_1 = HEAP32[($5_1 + 904 | 0) >> 2] | 0; - HEAP32[($5_1 + 240 | 0) >> 2] = HEAP32[($5_1 + 256 | 0) >> 2] | 0; - $11($658_1 | 0, 85712 | 0, $5_1 + 240 | 0 | 0) | 0; - $12($5_1 + 256 | 0 | 0); - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); + HEAP32[($5_1 + 304 | 0) >> 2] = 0; + HEAP32[($5_1 + 308 | 0) >> 2] = i64toi32_i32$0; + $717(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, $5_1 + 304 | 0 | 0, (HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 4 | 0 | 0, 0 | 0); + $705_1 = HEAP32[($5_1 + 952 | 0) >> 2] | 0; + HEAP32[($5_1 + 288 | 0) >> 2] = HEAP32[($5_1 + 304 | 0) >> 2] | 0; + $11($705_1 | 0, 85705 | 0, $5_1 + 288 | 0 | 0) | 0; + $12($5_1 + 304 | 0 | 0); + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); break label$1; case 40: - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); - $11(HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, 87263 | 0, 0 | 0) | 0; - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, 87248 | 0, 0 | 0) | 0; + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); break label$1; case 41: - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); - $11(HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, 87323 | 0, 0 | 0) | 0; - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, 87308 | 0, 0 | 0) | 0; + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); break label$1; case 42: - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); - $11(HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, 87273 | 0, 0 | 0) | 0; - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, 87258 | 0, 0 | 0) | 0; + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); break label$1; case 43: - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); - $11(HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, 87328 | 0, 0 | 0) | 0; - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, 87313 | 0, 0 | 0) | 0; + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); break label$1; case 46: - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); - $11(HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, 87300 | 0, 0 | 0) | 0; - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, 87285 | 0, 0 | 0) | 0; + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); break label$1; case 47: - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); - $11(HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, 87310 | 0, 0 | 0) | 0; - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, 87295 | 0, 0 | 0) | 0; + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); break label$1; case 48: - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); - $11(HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, 87453 | 0, 0 | 0) | 0; - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, 87438 | 0, 0 | 0) | 0; + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); break label$1; case 49: - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); - $11(HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, 87255 | 0, 0 | 0) | 0; - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, 87240 | 0, 0 | 0) | 0; + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); break label$1; case 50: - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); - $11(HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, 87054 | 0, 0 | 0) | 0; - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, 87047 | 0, 0 | 0) | 0; + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); break label$1; case 45: - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); - $11(HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, 87305 | 0, 0 | 0) | 0; - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, 87290 | 0, 0 | 0) | 0; + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); break label$1; case 44: - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); - $11(HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, 87277 | 0, 0 | 0) | 0; - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, 87262 | 0, 0 | 0) | 0; + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); break label$1; case 52: - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); - $11(HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, 87448 | 0, 0 | 0) | 0; - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, 87433 | 0, 0 | 0) | 0; + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); break label$1; case 51: - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); - $11(HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, 87049 | 0, 0 | 0) | 0; - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, 87042 | 0, 0 | 0) | 0; + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); break label$1; case 21: case 22: @@ -74428,17 +74565,17 @@ function asmFunc(imports) { break label$1; }; } - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 208 | 0) >> 2] | 0 | 0); - $11(HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, 87259 | 0, 0 | 0) | 0; - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); - $11(HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, 87388 | 0, 0 | 0) | 0; - $798(HEAP32[($5_1 + 908 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 904 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 900 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 208 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, 87244 | 0, 0 | 0) | 0; + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 212 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, 87373 | 0, 0 | 0) | 0; + $799(HEAP32[($5_1 + 956 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 952 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 948 | 0) >> 2] | 0) + 216 | 0) >> 2] | 0 | 0); } - global$0 = $5_1 + 912 | 0; + global$0 = $5_1 + 960 | 0; return; } - function $799($0_1) { + function $800($0_1) { $0_1 = $0_1 | 0; var $3_1 = 0, $67_1 = 0; $3_1 = global$0 - 16 | 0; @@ -74462,7 +74599,7 @@ function asmFunc(imports) { break label$4 } label$6 : { - if (($799(HEAP32[($3_1 + 4 | 0) >> 2] | 0 | 0) | 0) & 1 | 0) { + if (($800(HEAP32[($3_1 + 4 | 0) >> 2] | 0 | 0) | 0) & 1 | 0) { break label$6 } HEAP8[($3_1 + 15 | 0) >> 0] = 0 & 1 | 0; @@ -74502,7 +74639,7 @@ function asmFunc(imports) { return $67_1 | 0; } - function $800($0_1, $1_1, $2_1, $3_1) { + function $801($0_1, $1_1, $2_1, $3_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; @@ -74532,10 +74669,10 @@ function asmFunc(imports) { if ((HEAPU8[(HEAP32[($6_1 + 16 | 0) >> 2] | 0) >> 0] | 0) & 1 | 0) { break label$4 } - $11(HEAP32[($6_1 + 24 | 0) >> 2] | 0 | 0, 87437 | 0, 0 | 0) | 0; + $11(HEAP32[($6_1 + 24 | 0) >> 2] | 0 | 0, 87422 | 0, 0 | 0) | 0; } HEAP8[(HEAP32[($6_1 + 16 | 0) >> 2] | 0) >> 0] = 0; - $803(HEAP32[((HEAP32[((HEAP32[($6_1 + 20 | 0) >> 2] | 0) + 92 | 0) >> 2] | 0) + 184 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 24 | 0) >> 2] | 0 | 0) | 0; + $804(HEAP32[((HEAP32[((HEAP32[($6_1 + 20 | 0) >> 2] | 0) + 92 | 0) >> 2] | 0) + 184 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 24 | 0) >> 2] | 0 | 0) | 0; break label$2; } label$5 : { @@ -74548,7 +74685,7 @@ function asmFunc(imports) { break label$7 } HEAP32[($6_1 + 12 | 0) >> 2] = HEAP32[((HEAP32[($6_1 + 20 | 0) >> 2] | 0) + 96 | 0) >> 2] | 0; - $800(HEAP32[($6_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 24 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 16 | 0) >> 2] | 0 | 0); + $801(HEAP32[($6_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 24 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 16 | 0) >> 2] | 0 | 0); break label$6; } HEAP32[($6_1 + 8 | 0) >> 2] = HEAP32[((HEAP32[($6_1 + 20 | 0) >> 2] | 0) + 96 | 0) >> 2] | 0; @@ -74557,7 +74694,7 @@ function asmFunc(imports) { if (!((HEAP32[($6_1 + 8 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$8 } - $800(HEAP32[($6_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 24 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 16 | 0) >> 2] | 0 | 0); + $801(HEAP32[($6_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 24 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 16 | 0) >> 2] | 0 | 0); HEAP32[($6_1 + 8 | 0) >> 2] = HEAP32[((HEAP32[($6_1 + 8 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0; continue label$9; }; @@ -74569,7 +74706,7 @@ function asmFunc(imports) { if ((HEAPU8[(HEAP32[($6_1 + 16 | 0) >> 2] | 0) >> 0] | 0) & 1 | 0) { break label$10 } - $11(HEAP32[($6_1 + 24 | 0) >> 2] | 0 | 0, 87437 | 0, 0 | 0) | 0; + $11(HEAP32[($6_1 + 24 | 0) >> 2] | 0 | 0, 87422 | 0, 0 | 0) | 0; } HEAP8[(HEAP32[($6_1 + 16 | 0) >> 2] | 0) >> 0] = 0; label$11 : { @@ -74582,7 +74719,7 @@ function asmFunc(imports) { if (!(($179((HEAP32[((HEAP32[($6_1 + 20 | 0) >> 2] | 0) + 92 | 0) >> 2] | 0) + 64 | 0 | 0) | 0) & 1 | 0)) { break label$14 } - $804(HEAP32[($6_1 + 24 | 0) >> 2] | 0 | 0, (HEAP32[((HEAP32[($6_1 + 20 | 0) >> 2] | 0) + 92 | 0) >> 2] | 0) + 64 | 0 | 0); + $805(HEAP32[($6_1 + 24 | 0) >> 2] | 0 | 0, (HEAP32[((HEAP32[($6_1 + 20 | 0) >> 2] | 0) + 92 | 0) >> 2] | 0) + 64 | 0 | 0); break label$13; } label$15 : { @@ -74590,7 +74727,7 @@ function asmFunc(imports) { if (!((HEAP32[(HEAP32[((HEAP32[($6_1 + 20 | 0) >> 2] | 0) + 92 | 0) >> 2] | 0) >> 2] | 0 | 0) == (3 | 0) & 1 | 0)) { break label$16 } - $803(HEAP32[((HEAP32[((HEAP32[($6_1 + 20 | 0) >> 2] | 0) + 92 | 0) >> 2] | 0) + 184 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 24 | 0) >> 2] | 0 | 0) | 0; + $804(HEAP32[((HEAP32[((HEAP32[($6_1 + 20 | 0) >> 2] | 0) + 92 | 0) >> 2] | 0) + 184 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 24 | 0) >> 2] | 0 | 0) | 0; break label$15; } $11(HEAP32[($6_1 + 24 | 0) >> 2] | 0 | 0, 85018 | 0, 0 | 0) | 0; @@ -74605,175 +74742,259 @@ function asmFunc(imports) { return; } - function $801($0_1, $1_1, $2_1, $3_1) { + function $802($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; $3_1 = $3_1 | 0; - var $6_1 = 0, i64toi32_i32$0 = 0, $62_1 = 0, $63_1 = 0, $76_1 = 0, $131_1 = 0, $132_1 = 0, $147_1 = 0; - $6_1 = global$0 - 112 | 0; - global$0 = $6_1; - HEAP32[($6_1 + 108 | 0) >> 2] = $0_1; - HEAP32[($6_1 + 104 | 0) >> 2] = $1_1; - HEAP32[($6_1 + 100 | 0) >> 2] = $2_1; - HEAP32[($6_1 + 96 | 0) >> 2] = $3_1; + $4_1 = $4_1 | 0; + var $7_1 = 0, i64toi32_i32$0 = 0, $67_1 = 0, $68_1 = 0, $81_1 = 0, $98_1 = 0, $99_1 = 0, $155_1 = 0, $156_1 = 0, $171_1 = 0, $185_1 = 0, $186_1 = 0, $201_1 = 0, $218_1 = 0, $219_1 = 0; + $7_1 = global$0 - 192 | 0; + global$0 = $7_1; + HEAP32[($7_1 + 188 | 0) >> 2] = $0_1; + HEAP32[($7_1 + 184 | 0) >> 2] = $1_1; + HEAP32[($7_1 + 180 | 0) >> 2] = $2_1; + HEAP32[($7_1 + 176 | 0) >> 2] = $3_1; + HEAP8[($7_1 + 175 | 0) >> 0] = $4_1; label$1 : { - if (!(($215(HEAP32[($6_1 + 100 | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { + if (!(($215(HEAP32[($7_1 + 180 | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { break label$1 } - HEAP32[($6_1 + 100 | 0) >> 2] = $180(HEAP32[($6_1 + 100 | 0) >> 2] | 0 | 0) | 0; + HEAP32[($7_1 + 180 | 0) >> 2] = $180(HEAP32[($7_1 + 180 | 0) >> 2] | 0 | 0) | 0; } label$2 : { label$3 : { - if (!((HEAP32[((HEAP32[($6_1 + 100 | 0) >> 2] | 0) + 96 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($7_1 + 180 | 0) >> 2] | 0) + 96 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$3 } label$4 : { label$5 : { - if (!(($212((HEAP32[($6_1 + 100 | 0) >> 2] | 0) + 8 | 0 | 0) | 0) & 1 | 0)) { + if (!(($212((HEAP32[($7_1 + 180 | 0) >> 2] | 0) + 8 | 0 | 0) | 0) & 1 | 0)) { break label$5 } - HEAP32[($6_1 + 92 | 0) >> 2] = HEAP32[((HEAP32[($6_1 + 100 | 0) >> 2] | 0) + 96 | 0) >> 2] | 0; + HEAP32[($7_1 + 168 | 0) >> 2] = HEAP32[((HEAP32[($7_1 + 180 | 0) >> 2] | 0) + 96 | 0) >> 2] | 0; label$6 : { label$7 : { - if (!((HEAP32[((HEAP32[($6_1 + 92 | 0) >> 2] | 0) + 92 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($7_1 + 168 | 0) >> 2] | 0) + 92 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$7 } - if (!(($179((HEAP32[((HEAP32[($6_1 + 92 | 0) >> 2] | 0) + 92 | 0) >> 2] | 0) + 64 | 0 | 0) | 0) & 1 | 0)) { + if (!(($179((HEAP32[((HEAP32[($7_1 + 168 | 0) >> 2] | 0) + 92 | 0) >> 2] | 0) + 64 | 0 | 0) | 0) & 1 | 0)) { + break label$7 + } + if ((HEAPU8[($7_1 + 175 | 0) >> 0] | 0) & 1 | 0) { break label$7 } break label$6; } label$8 : { label$9 : while (1) { - if (!((HEAP32[($6_1 + 92 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[($7_1 + 168 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$8 } label$10 : { - if (!((HEAP32[((HEAP32[($6_1 + 92 | 0) >> 2] | 0) + 92 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($7_1 + 168 | 0) >> 2] | 0) + 92 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$10 } - $805(HEAP32[($6_1 + 104 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($6_1 + 108 | 0) >> 2] | 0) >> 2] | 0 | 0); - $62_1 = HEAP32[($6_1 + 104 | 0) >> 2] | 0; - $63_1 = HEAP32[($6_1 + 96 | 0) >> 2] | 0; - HEAP32[($6_1 + 4 | 0) >> 2] = HEAP32[((HEAP32[($6_1 + 92 | 0) >> 2] | 0) + 68 | 0) >> 2] | 0; - HEAP32[$6_1 >> 2] = $63_1; - $11($62_1 | 0, 87315 | 0, $6_1 | 0) | 0; - HEAP32[($6_1 + 88 | 0) >> 2] = 0; + $798(HEAP32[($7_1 + 184 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($7_1 + 188 | 0) >> 2] | 0) >> 2] | 0 | 0); + $67_1 = HEAP32[($7_1 + 184 | 0) >> 2] | 0; + $68_1 = HEAP32[($7_1 + 176 | 0) >> 2] | 0; + HEAP32[($7_1 + 4 | 0) >> 2] = HEAP32[((HEAP32[($7_1 + 168 | 0) >> 2] | 0) + 68 | 0) >> 2] | 0; + HEAP32[$7_1 >> 2] = $68_1; + $11($67_1 | 0, 87300 | 0, $7_1 | 0) | 0; + HEAP32[($7_1 + 160 | 0) >> 2] = 0; i64toi32_i32$0 = 0; - HEAP32[($6_1 + 80 | 0) >> 2] = 0; - HEAP32[($6_1 + 84 | 0) >> 2] = i64toi32_i32$0; - $798(HEAP32[($6_1 + 108 | 0) >> 2] | 0 | 0, $6_1 + 80 | 0 | 0, HEAP32[((HEAP32[($6_1 + 92 | 0) >> 2] | 0) + 92 | 0) >> 2] | 0 | 0); - $76_1 = HEAP32[($6_1 + 104 | 0) >> 2] | 0; - HEAP32[($6_1 + 16 | 0) >> 2] = HEAP32[($6_1 + 80 | 0) >> 2] | 0; - $11($76_1 | 0, 69406 | 0, $6_1 + 16 | 0 | 0) | 0; - $11(HEAP32[($6_1 + 104 | 0) >> 2] | 0 | 0, 88151 | 0, 0 | 0) | 0; - $12($6_1 + 80 | 0 | 0); + HEAP32[($7_1 + 152 | 0) >> 2] = 0; + HEAP32[($7_1 + 156 | 0) >> 2] = i64toi32_i32$0; + $799(HEAP32[($7_1 + 188 | 0) >> 2] | 0 | 0, $7_1 + 152 | 0 | 0, HEAP32[((HEAP32[($7_1 + 168 | 0) >> 2] | 0) + 92 | 0) >> 2] | 0 | 0); + $81_1 = HEAP32[($7_1 + 184 | 0) >> 2] | 0; + HEAP32[($7_1 + 16 | 0) >> 2] = HEAP32[($7_1 + 152 | 0) >> 2] | 0; + $11($81_1 | 0, 69406 | 0, $7_1 + 16 | 0 | 0) | 0; + $11(HEAP32[($7_1 + 184 | 0) >> 2] | 0 | 0, 88160 | 0, 0 | 0) | 0; + $12($7_1 + 152 | 0 | 0); break label$8; } - HEAP32[($6_1 + 92 | 0) >> 2] = HEAP32[((HEAP32[($6_1 + 92 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0; + label$11 : { + if (!((HEAPU8[($7_1 + 175 | 0) >> 0] | 0) & 1 | 0)) { + break label$11 + } + $798(HEAP32[($7_1 + 184 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($7_1 + 188 | 0) >> 2] | 0) >> 2] | 0 | 0); + $98_1 = HEAP32[($7_1 + 184 | 0) >> 2] | 0; + $99_1 = HEAP32[($7_1 + 176 | 0) >> 2] | 0; + HEAP32[($7_1 + 36 | 0) >> 2] = HEAP32[((HEAP32[($7_1 + 168 | 0) >> 2] | 0) + 68 | 0) >> 2] | 0; + HEAP32[($7_1 + 32 | 0) >> 2] = $99_1; + $11($98_1 | 0, 88135 | 0, $7_1 + 32 | 0 | 0) | 0; + } + HEAP32[($7_1 + 168 | 0) >> 2] = HEAP32[((HEAP32[($7_1 + 168 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0; continue label$9; }; } } break label$4; } - HEAP32[($6_1 + 76 | 0) >> 2] = HEAP32[((HEAP32[($6_1 + 100 | 0) >> 2] | 0) + 96 | 0) >> 2] | 0; - label$11 : { - label$12 : while (1) { - if (!((HEAP32[($6_1 + 76 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { - break label$11 + HEAP32[($7_1 + 148 | 0) >> 2] = HEAP32[((HEAP32[($7_1 + 180 | 0) >> 2] | 0) + 96 | 0) >> 2] | 0; + label$12 : { + label$13 : while (1) { + if (!((HEAP32[($7_1 + 148 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + break label$12 } - $801(HEAP32[($6_1 + 108 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 104 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 76 | 0) >> 2] | 0 | 0, HEAP32[($6_1 + 96 | 0) >> 2] | 0 | 0); - HEAP32[($6_1 + 76 | 0) >> 2] = HEAP32[((HEAP32[($6_1 + 76 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0; - continue label$12; + $802(HEAP32[($7_1 + 188 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 184 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 148 | 0) >> 2] | 0 | 0, HEAP32[($7_1 + 176 | 0) >> 2] | 0 | 0, (HEAPU8[($7_1 + 175 | 0) >> 0] | 0) & 1 | 0 | 0); + HEAP32[($7_1 + 148 | 0) >> 2] = HEAP32[((HEAP32[($7_1 + 148 | 0) >> 2] | 0) + 100 | 0) >> 2] | 0; + continue label$13; }; } } break label$2; } - label$13 : { - if (!((HEAP32[((HEAP32[($6_1 + 100 | 0) >> 2] | 0) + 92 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { - break label$13 - } - label$14 : { - label$15 : { - if (!((HEAP32[(HEAP32[((HEAP32[($6_1 + 100 | 0) >> 2] | 0) + 92 | 0) >> 2] | 0) >> 2] | 0 | 0) == (3 | 0) & 1 | 0)) { - break label$15 - } - break label$14; + label$14 : { + label$15 : { + if (!((HEAP32[((HEAP32[($7_1 + 180 | 0) >> 2] | 0) + 92 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + break label$15 } label$16 : { - if (($179((HEAP32[((HEAP32[($6_1 + 100 | 0) >> 2] | 0) + 92 | 0) >> 2] | 0) + 64 | 0 | 0) | 0) & 1 | 0) { - break label$16 + label$17 : { + if ((HEAPU8[($7_1 + 175 | 0) >> 0] | 0) & 1 | 0) { + break label$17 + } + label$18 : { + label$19 : { + if (!((HEAP32[(HEAP32[((HEAP32[($7_1 + 180 | 0) >> 2] | 0) + 92 | 0) >> 2] | 0) >> 2] | 0 | 0) == (3 | 0) & 1 | 0)) { + break label$19 + } + break label$18; + } + label$20 : { + if (($179((HEAP32[((HEAP32[($7_1 + 180 | 0) >> 2] | 0) + 92 | 0) >> 2] | 0) + 64 | 0 | 0) | 0) & 1 | 0) { + break label$20 + } + $798(HEAP32[($7_1 + 184 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($7_1 + 188 | 0) >> 2] | 0) >> 2] | 0 | 0); + $155_1 = HEAP32[($7_1 + 184 | 0) >> 2] | 0; + $156_1 = HEAP32[($7_1 + 176 | 0) >> 2] | 0; + HEAP32[($7_1 + 84 | 0) >> 2] = HEAP32[((HEAP32[($7_1 + 180 | 0) >> 2] | 0) + 68 | 0) >> 2] | 0; + HEAP32[($7_1 + 80 | 0) >> 2] = $156_1; + $11($155_1 | 0, 87300 | 0, $7_1 + 80 | 0 | 0) | 0; + HEAP32[($7_1 + 144 | 0) >> 2] = 0; + i64toi32_i32$0 = 0; + HEAP32[($7_1 + 136 | 0) >> 2] = 0; + HEAP32[($7_1 + 140 | 0) >> 2] = i64toi32_i32$0; + $799(HEAP32[($7_1 + 188 | 0) >> 2] | 0 | 0, $7_1 + 136 | 0 | 0, HEAP32[((HEAP32[($7_1 + 180 | 0) >> 2] | 0) + 92 | 0) >> 2] | 0 | 0); + $171_1 = HEAP32[($7_1 + 184 | 0) >> 2] | 0; + HEAP32[($7_1 + 96 | 0) >> 2] = HEAP32[($7_1 + 136 | 0) >> 2] | 0; + $11($171_1 | 0, 69406 | 0, $7_1 + 96 | 0 | 0) | 0; + $11(HEAP32[($7_1 + 184 | 0) >> 2] | 0 | 0, 88160 | 0, 0 | 0) | 0; + $12($7_1 + 136 | 0 | 0); + } + } + break label$16; } - $805(HEAP32[($6_1 + 104 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($6_1 + 108 | 0) >> 2] | 0) >> 2] | 0 | 0); - $131_1 = HEAP32[($6_1 + 104 | 0) >> 2] | 0; - $132_1 = HEAP32[($6_1 + 96 | 0) >> 2] | 0; - HEAP32[($6_1 + 36 | 0) >> 2] = HEAP32[((HEAP32[($6_1 + 100 | 0) >> 2] | 0) + 68 | 0) >> 2] | 0; - HEAP32[($6_1 + 32 | 0) >> 2] = $132_1; - $11($131_1 | 0, 87315 | 0, $6_1 + 32 | 0 | 0) | 0; - HEAP32[($6_1 + 72 | 0) >> 2] = 0; + $798(HEAP32[($7_1 + 184 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($7_1 + 188 | 0) >> 2] | 0) >> 2] | 0 | 0); + $185_1 = HEAP32[($7_1 + 184 | 0) >> 2] | 0; + $186_1 = HEAP32[($7_1 + 176 | 0) >> 2] | 0; + HEAP32[($7_1 + 52 | 0) >> 2] = HEAP32[((HEAP32[($7_1 + 180 | 0) >> 2] | 0) + 68 | 0) >> 2] | 0; + HEAP32[($7_1 + 48 | 0) >> 2] = $186_1; + $11($185_1 | 0, 87300 | 0, $7_1 + 48 | 0 | 0) | 0; + HEAP32[($7_1 + 128 | 0) >> 2] = 0; i64toi32_i32$0 = 0; - HEAP32[($6_1 + 64 | 0) >> 2] = 0; - HEAP32[($6_1 + 68 | 0) >> 2] = i64toi32_i32$0; - $798(HEAP32[($6_1 + 108 | 0) >> 2] | 0 | 0, $6_1 + 64 | 0 | 0, HEAP32[((HEAP32[($6_1 + 100 | 0) >> 2] | 0) + 92 | 0) >> 2] | 0 | 0); - $147_1 = HEAP32[($6_1 + 104 | 0) >> 2] | 0; - HEAP32[($6_1 + 48 | 0) >> 2] = HEAP32[($6_1 + 64 | 0) >> 2] | 0; - $11($147_1 | 0, 69406 | 0, $6_1 + 48 | 0 | 0) | 0; - $11(HEAP32[($6_1 + 104 | 0) >> 2] | 0 | 0, 88151 | 0, 0 | 0) | 0; - $12($6_1 + 64 | 0 | 0); + HEAP32[($7_1 + 120 | 0) >> 2] = 0; + HEAP32[($7_1 + 124 | 0) >> 2] = i64toi32_i32$0; + $799(HEAP32[($7_1 + 188 | 0) >> 2] | 0 | 0, $7_1 + 120 | 0 | 0, HEAP32[((HEAP32[($7_1 + 180 | 0) >> 2] | 0) + 92 | 0) >> 2] | 0 | 0); + $201_1 = HEAP32[($7_1 + 184 | 0) >> 2] | 0; + HEAP32[($7_1 + 64 | 0) >> 2] = HEAP32[($7_1 + 120 | 0) >> 2] | 0; + $11($201_1 | 0, 69406 | 0, $7_1 + 64 | 0 | 0) | 0; + $11(HEAP32[($7_1 + 184 | 0) >> 2] | 0 | 0, 88160 | 0, 0 | 0) | 0; + $12($7_1 + 120 | 0 | 0); + } + break label$14; + } + label$21 : { + if (!((HEAPU8[($7_1 + 175 | 0) >> 0] | 0) & 1 | 0)) { + break label$21 } + $798(HEAP32[($7_1 + 184 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($7_1 + 188 | 0) >> 2] | 0) >> 2] | 0 | 0); + $218_1 = HEAP32[($7_1 + 184 | 0) >> 2] | 0; + $219_1 = HEAP32[($7_1 + 176 | 0) >> 2] | 0; + HEAP32[($7_1 + 116 | 0) >> 2] = HEAP32[((HEAP32[($7_1 + 180 | 0) >> 2] | 0) + 68 | 0) >> 2] | 0; + HEAP32[($7_1 + 112 | 0) >> 2] = $219_1; + $11($218_1 | 0, 88135 | 0, $7_1 + 112 | 0 | 0) | 0; } } } - global$0 = $6_1 + 112 | 0; + global$0 = $7_1 + 192 | 0; return; } - function $802($0_1, $1_1, $2_1) { + function $803($0_1, $1_1, $2_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; - var $5_1 = 0, $11_1 = 0, $57_1 = 0; - $5_1 = global$0 - 16 | 0; + var $5_1 = 0, i64toi32_i32$0 = 0, $24_1 = 0, $74_1 = 0, $91_1 = 0, $107_1 = 0; + $5_1 = global$0 - 80 | 0; global$0 = $5_1; - HEAP32[($5_1 + 12 | 0) >> 2] = $0_1; - HEAP32[($5_1 + 8 | 0) >> 2] = $1_1; - HEAP32[($5_1 + 4 | 0) >> 2] = $2_1; - $797(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0); - $11(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 87615 | 0, 0 | 0) | 0; - $11_1 = HEAP32[($5_1 + 12 | 0) >> 2] | 0; - HEAP32[$11_1 >> 2] = (HEAP32[$11_1 >> 2] | 0) + 1 | 0; - $806(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, (HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 8 | 0 | 0); - HEAP8[($5_1 + 3 | 0) >> 0] = 0; + HEAP32[($5_1 + 76 | 0) >> 2] = $0_1; + HEAP32[($5_1 + 72 | 0) >> 2] = $1_1; + HEAP32[($5_1 + 68 | 0) >> 2] = $2_1; + HEAP8[($5_1 + 67 | 0) >> 0] = (HEAPU8[((HEAP32[($5_1 + 76 | 0) >> 2] | 0) + 88 | 0) >> 0] | 0) & 1 | 0; + HEAP8[((HEAP32[($5_1 + 76 | 0) >> 2] | 0) + 88 | 0) >> 0] = 1; + HEAP32[($5_1 + 56 | 0) >> 2] = 0; + i64toi32_i32$0 = 0; + HEAP32[($5_1 + 48 | 0) >> 2] = 0; + HEAP32[($5_1 + 52 | 0) >> 2] = i64toi32_i32$0; + $157((HEAP32[($5_1 + 76 | 0) >> 2] | 0) + 52 | 0 | 0, $5_1 + 48 | 0 | 0); + HEAP32[($5_1 + 40 | 0) >> 2] = 0; + i64toi32_i32$0 = 0; + HEAP32[($5_1 + 32 | 0) >> 2] = 0; + HEAP32[($5_1 + 36 | 0) >> 2] = i64toi32_i32$0; + $24_1 = HEAP32[($5_1 + 76 | 0) >> 2] | 0; + HEAP32[$24_1 >> 2] = (HEAP32[$24_1 >> 2] | 0) + 1 | 0; + $806(HEAP32[($5_1 + 76 | 0) >> 2] | 0 | 0, $5_1 + 32 | 0 | 0, (HEAP32[($5_1 + 68 | 0) >> 2] | 0) + 8 | 0 | 0); + HEAP8[($5_1 + 31 | 0) >> 0] = 0; label$1 : { - if (!((HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($5_1 + 68 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$1 } - if (!((HEAP32[((HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[((HEAP32[($5_1 + 68 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$1 } - if (!((HEAP32[((HEAP32[((HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[((HEAP32[((HEAP32[($5_1 + 68 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$1 } - HEAP8[($5_1 + 3 | 0) >> 0] = 1; + HEAP8[($5_1 + 31 | 0) >> 0] = 1; } label$2 : { - if ((HEAPU8[($5_1 + 3 | 0) >> 0] | 0) & 1 | 0) { + if ((HEAPU8[($5_1 + 31 | 0) >> 0] | 0) & 1 | 0) { break label$2 } - $807(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, (HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 40 | 0 | 0); + $807(HEAP32[($5_1 + 76 | 0) >> 2] | 0 | 0, $5_1 + 32 | 0 | 0, (HEAP32[($5_1 + 68 | 0) >> 2] | 0) + 40 | 0 | 0); } - $57_1 = HEAP32[($5_1 + 12 | 0) >> 2] | 0; - HEAP32[$57_1 >> 2] = (HEAP32[$57_1 >> 2] | 0) + -1 | 0; - $797(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0); - $11(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 87481 | 0, 0 | 0) | 0; - global$0 = $5_1 + 16 | 0; + $74_1 = HEAP32[($5_1 + 76 | 0) >> 2] | 0; + HEAP32[$74_1 >> 2] = (HEAP32[$74_1 >> 2] | 0) + -1 | 0; + $797(HEAP32[($5_1 + 76 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 72 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 72 | 0) >> 2] | 0 | 0, 87600 | 0, 0 | 0) | 0; + label$3 : { + if (!((HEAP32[((HEAP32[($5_1 + 76 | 0) >> 2] | 0) + 52 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + break label$3 + } + $91_1 = HEAP32[($5_1 + 72 | 0) >> 2] | 0; + HEAP32[($5_1 + 16 | 0) >> 2] = HEAP32[((HEAP32[($5_1 + 76 | 0) >> 2] | 0) + 52 | 0) >> 2] | 0; + $11($91_1 | 0, 69406 | 0, $5_1 + 16 | 0 | 0) | 0; + $11(HEAP32[($5_1 + 72 | 0) >> 2] | 0 | 0, 89066 | 0, 0 | 0) | 0; + } + label$4 : { + if (!((HEAP32[($5_1 + 32 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + break label$4 + } + $107_1 = HEAP32[($5_1 + 72 | 0) >> 2] | 0; + HEAP32[$5_1 >> 2] = HEAP32[($5_1 + 32 | 0) >> 2] | 0; + $11($107_1 | 0, 69406 | 0, $5_1 | 0) | 0; + } + $797(HEAP32[($5_1 + 76 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 72 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 72 | 0) >> 2] | 0 | 0, 87466 | 0, 0 | 0) | 0; + HEAP8[((HEAP32[($5_1 + 76 | 0) >> 2] | 0) + 88 | 0) >> 0] = (HEAPU8[($5_1 + 67 | 0) >> 0] | 0) & 1 | 0; + $157((HEAP32[($5_1 + 76 | 0) >> 2] | 0) + 52 | 0 | 0, $5_1 + 48 | 0 | 0); + global$0 = $5_1 + 80 | 0; return; } - function $803($0_1, $1_1) { + function $804($0_1, $1_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; var $4_1 = 0, $8_1 = 0, $18_1 = 0, $22_1 = 0, $61_1 = 0, $67_1 = 0; @@ -74825,7 +75046,7 @@ function asmFunc(imports) { return 0 | 0; } - function $804($0_1, $1_1) { + function $805($0_1, $1_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; var $4_1 = 0, i64toi32_i32$2 = 0, i64toi32_i32$0 = 0, i64toi32_i32$1 = 0, $8_1 = 0, $22_1 = 0, $39_1 = 0, $116_1 = 0, $10_1 = 0, $19_1 = 0, $28_1 = 0, $36_1 = 0, $45_1 = 0, $53_1 = 0, $59_1 = 0, $68_1 = 0, $77_1 = 0, $86_1 = 0, $339_1 = 0, $94_1 = 0, $360_1 = 0, $102_1 = 0, $110_1 = 0, $115_1 = 0, $129_1 = 0, $129$hi = 0, $424_1 = 0; @@ -74954,29 +75175,6 @@ function asmFunc(imports) { return; } - function $805($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; - HEAP32[($4_1 + 4 | 0) >> 2] = 0; - label$1 : { - label$2 : while (1) { - if (!((HEAP32[($4_1 + 4 | 0) >> 2] | 0 | 0) < (HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0) & 1 | 0)) { - break label$1 - } - $11(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, 87461 | 0, 0 | 0) | 0; - HEAP32[($4_1 + 4 | 0) >> 2] = (HEAP32[($4_1 + 4 | 0) >> 2] | 0) + 1 | 0; - continue label$2; - }; - } - global$0 = $4_1 + 16 | 0; - return; - } - function $806($0_1, $1_1, $2_1) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; @@ -75042,7 +75240,7 @@ function asmFunc(imports) { HEAP32[($5_1 + 24 | 0) >> 2] = 0; HEAP32[($5_1 + 28 | 0) >> 2] = i64toi32_i32$0; $157(HEAP32[($5_1 + 40 | 0) >> 2] | 0 | 0, $5_1 + 24 | 0 | 0); - $158((HEAP32[($5_1 + 44 | 0) >> 2] | 0) + 52 | 0 | 0); + $158((HEAP32[($5_1 + 44 | 0) >> 2] | 0) + 64 | 0 | 0); label$1 : { label$2 : { if (!((HEAP32[((HEAP32[($5_1 + 36 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { @@ -75068,12 +75266,12 @@ function asmFunc(imports) { } } label$6 : { - if (!((HEAP32[((HEAP32[($5_1 + 44 | 0) >> 2] | 0) + 56 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($5_1 + 44 | 0) >> 2] | 0) + 68 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$6 } - HEAP32[($5_1 + 16 | 0) >> 2] = HEAP32[((HEAP32[($5_1 + 44 | 0) >> 2] | 0) + 52 | 0) >> 2] | 0; + HEAP32[($5_1 + 16 | 0) >> 2] = HEAP32[((HEAP32[($5_1 + 44 | 0) >> 2] | 0) + 64 | 0) >> 2] | 0; $11($5_1 + 24 | 0 | 0, 69406 | 0, $5_1 + 16 | 0 | 0) | 0; - $158((HEAP32[($5_1 + 44 | 0) >> 2] | 0) + 52 | 0 | 0); + $158((HEAP32[($5_1 + 44 | 0) >> 2] | 0) + 64 | 0 | 0); } label$7 : { if (!((HEAP32[(HEAP32[($5_1 + 40 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { @@ -75145,7 +75343,7 @@ function asmFunc(imports) { $814(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); break label$5; } - fimport$0(75141 | 0, 77943 | 0, 41213 | 0, 67504 | 0); + fimport$0(75141 | 0, 77943 | 0, 41267 | 0, 67504 | 0); wasm2js_trap(); } } @@ -75170,9 +75368,9 @@ function asmFunc(imports) { break label$2 } $797(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0); - $11(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 87152 | 0, 0 | 0) | 0; - $804(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, (HEAP32[(HEAP32[($5_1 + 4 | 0) >> 2] | 0) >> 2] | 0) + 64 | 0 | 0); - $11(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 88192 | 0, 0 | 0) | 0; + $11(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 87137 | 0, 0 | 0) | 0; + $805(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, (HEAP32[(HEAP32[($5_1 + 4 | 0) >> 2] | 0) >> 2] | 0) + 64 | 0 | 0); + $11(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 88201 | 0, 0 | 0) | 0; break label$1; } label$3 : { @@ -75183,7 +75381,7 @@ function asmFunc(imports) { $797(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0); $39_1 = HEAP32[($5_1 + 8 | 0) >> 2] | 0; HEAP32[$5_1 >> 2] = HEAP32[((HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $11($39_1 | 0, 88164 | 0, $5_1 | 0) | 0; + $11($39_1 | 0, 88173 | 0, $5_1 | 0) | 0; break label$3; } label$5 : { @@ -75191,7 +75389,7 @@ function asmFunc(imports) { break label$5 } $797(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0); - $11(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 88154 | 0, 0 | 0) | 0; + $11(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 88163 | 0, 0 | 0) | 0; } } } @@ -75221,7 +75419,7 @@ function asmFunc(imports) { if (!((HEAP32[(HEAP32[($5_1 + 4 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$4 } - $802(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($5_1 + 4 | 0) >> 2] | 0) >> 2] | 0 | 0); + $803(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($5_1 + 4 | 0) >> 2] | 0) >> 2] | 0 | 0); break label$3; } label$5 : { @@ -75264,7 +75462,7 @@ function asmFunc(imports) { HEAP32[($5_1 + 44 | 0) >> 2] = $0_1; HEAP32[($5_1 + 40 | 0) >> 2] = $1_1; HEAP32[($5_1 + 36 | 0) >> 2] = $2_1; - $158((HEAP32[($5_1 + 44 | 0) >> 2] | 0) + 52 | 0 | 0); + $158((HEAP32[($5_1 + 44 | 0) >> 2] | 0) + 64 | 0 | 0); HEAP32[($5_1 + 32 | 0) >> 2] = 0; i64toi32_i32$0 = 0; HEAP32[($5_1 + 24 | 0) >> 2] = 0; @@ -75274,20 +75472,20 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($5_1 + 36 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$1 } - $798(HEAP32[($5_1 + 44 | 0) >> 2] | 0 | 0, $5_1 + 24 | 0 | 0, HEAP32[((HEAP32[($5_1 + 36 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $799(HEAP32[($5_1 + 44 | 0) >> 2] | 0 | 0, $5_1 + 24 | 0 | 0, HEAP32[((HEAP32[($5_1 + 36 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); } label$2 : { - if (!((HEAP32[((HEAP32[($5_1 + 44 | 0) >> 2] | 0) + 56 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($5_1 + 44 | 0) >> 2] | 0) + 68 | 0) >> 2] | 0 | 0) > (0 | 0) & 1 | 0)) { break label$2 } $38_1 = HEAP32[($5_1 + 40 | 0) >> 2] | 0; - HEAP32[($5_1 + 16 | 0) >> 2] = HEAP32[((HEAP32[($5_1 + 44 | 0) >> 2] | 0) + 52 | 0) >> 2] | 0; + HEAP32[($5_1 + 16 | 0) >> 2] = HEAP32[((HEAP32[($5_1 + 44 | 0) >> 2] | 0) + 64 | 0) >> 2] | 0; $11($38_1 | 0, 69406 | 0, $5_1 + 16 | 0 | 0) | 0; - $158((HEAP32[($5_1 + 44 | 0) >> 2] | 0) + 52 | 0 | 0); + $158((HEAP32[($5_1 + 44 | 0) >> 2] | 0) + 64 | 0 | 0); } $47_1 = HEAP32[($5_1 + 40 | 0) >> 2] | 0; HEAP32[$5_1 >> 2] = HEAP32[($5_1 + 24 | 0) >> 2] | 0; - $11($47_1 | 0, 88103 | 0, $5_1 | 0) | 0; + $11($47_1 | 0, 88088 | 0, $5_1 | 0) | 0; $12($5_1 + 24 | 0 | 0); global$0 = $5_1 + 48 | 0; return; @@ -75312,7 +75510,7 @@ function asmFunc(imports) { $797(HEAP32[($5_1 + 188 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 184 | 0) >> 2] | 0 | 0); $22_1 = HEAP32[($5_1 + 184 | 0) >> 2] | 0; HEAP32[$5_1 >> 2] = HEAP32[((HEAP32[($5_1 + 180 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0; - $11($22_1 | 0, 88127 | 0, $5_1 | 0) | 0; + $11($22_1 | 0, 88112 | 0, $5_1 | 0) | 0; break label$1; } label$3 : { @@ -75344,10 +75542,10 @@ function asmFunc(imports) { if (!((HEAP32[((HEAP32[($5_1 + 180 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$8 } - $11(HEAP32[($5_1 + 184 | 0) >> 2] | 0 | 0, 87464 | 0, 0 | 0) | 0; - $798(HEAP32[($5_1 + 188 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 184 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 180 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 184 | 0) >> 2] | 0 | 0, 87449 | 0, 0 | 0) | 0; + $799(HEAP32[($5_1 + 188 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 184 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 180 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0); } - $11(HEAP32[($5_1 + 184 | 0) >> 2] | 0 | 0, 88151 | 0, 0 | 0) | 0; + $11(HEAP32[($5_1 + 184 | 0) >> 2] | 0 | 0, 88160 | 0, 0 | 0) | 0; break label$6; } $892($5_1 + 64 | 0 | 0, 0 | 0, 100 | 0) | 0; @@ -75358,19 +75556,19 @@ function asmFunc(imports) { $929($5_1 + 64 | 0 | 0, 100 | 0, 77727 | 0, $5_1 + 32 | 0 | 0) | 0; $797(HEAP32[($5_1 + 188 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 184 | 0) >> 2] | 0 | 0); $717(HEAP32[($5_1 + 188 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 184 | 0) >> 2] | 0 | 0, (HEAP32[((HEAP32[($5_1 + 180 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 4 | 0 | 0, $5_1 + 64 | 0 | 0); - $11(HEAP32[($5_1 + 184 | 0) >> 2] | 0 | 0, 87319 | 0, 0 | 0) | 0; + $11(HEAP32[($5_1 + 184 | 0) >> 2] | 0 | 0, 87304 | 0, 0 | 0) | 0; label$9 : { if (!((HEAP32[((HEAP32[($5_1 + 180 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$9 } - $798(HEAP32[($5_1 + 188 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 184 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 180 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0); + $799(HEAP32[($5_1 + 188 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 184 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 180 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0); } - $11(HEAP32[($5_1 + 184 | 0) >> 2] | 0 | 0, 88151 | 0, 0 | 0) | 0; + $11(HEAP32[($5_1 + 184 | 0) >> 2] | 0 | 0, 88160 | 0, 0 | 0) | 0; $807(HEAP32[($5_1 + 188 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 184 | 0) >> 2] | 0 | 0, (HEAP32[($5_1 + 180 | 0) >> 2] | 0) + 20 | 0 | 0); $797(HEAP32[($5_1 + 188 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 184 | 0) >> 2] | 0 | 0); $146_1 = HEAP32[($5_1 + 184 | 0) >> 2] | 0; HEAP32[($5_1 + 16 | 0) >> 2] = $5_1 + 64 | 0; - $11($146_1 | 0, 88096 | 0, $5_1 + 16 | 0 | 0) | 0; + $11($146_1 | 0, 88081 | 0, $5_1 + 16 | 0 | 0) | 0; } break label$3; } @@ -75391,10 +75589,10 @@ function asmFunc(imports) { if (!((HEAP32[(HEAP32[((HEAP32[($5_1 + 180 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9e3 | 0) & 1 | 0)) { break label$14 } - $11(HEAP32[($5_1 + 184 | 0) >> 2] | 0 | 0, 88108 | 0, 0 | 0) | 0; + $11(HEAP32[($5_1 + 184 | 0) >> 2] | 0 | 0, 88093 | 0, 0 | 0) | 0; break label$13; } - $11(HEAP32[($5_1 + 184 | 0) >> 2] | 0 | 0, 88116 | 0, 0 | 0) | 0; + $11(HEAP32[($5_1 + 184 | 0) >> 2] | 0 | 0, 88101 | 0, 0 | 0) | 0; } break label$10; } @@ -75407,10 +75605,10 @@ function asmFunc(imports) { $797(HEAP32[($5_1 + 188 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 184 | 0) >> 2] | 0 | 0); $209_1 = HEAP32[($5_1 + 184 | 0) >> 2] | 0; HEAP32[($5_1 + 48 | 0) >> 2] = HEAP32[((HEAP32[(HEAP32[($5_1 + 180 | 0) >> 2] | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $11($209_1 | 0, 88086 | 0, $5_1 + 48 | 0 | 0) | 0; + $11($209_1 | 0, 88071 | 0, $5_1 + 48 | 0 | 0) | 0; break label$15; } - fimport$0(75141 | 0, 77943 | 0, 40921 | 0, 67108 | 0); + fimport$0(75141 | 0, 77943 | 0, 40946 | 0, 67108 | 0); wasm2js_trap(); } } @@ -75424,100 +75622,116 @@ function asmFunc(imports) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; - var $5_1 = 0, $87_1 = 0, $163_1 = 0; - $5_1 = global$0 - 16 | 0; + var $5_1 = 0, i64toi32_i32$0 = 0, $87_1 = 0, $192_1 = 0, $109_1 = 0, $113_1 = 0; + $5_1 = global$0 - 64 | 0; global$0 = $5_1; - HEAP32[($5_1 + 12 | 0) >> 2] = $0_1; - HEAP32[($5_1 + 8 | 0) >> 2] = $1_1; - HEAP32[($5_1 + 4 | 0) >> 2] = $2_1; - $797(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0); + HEAP32[($5_1 + 60 | 0) >> 2] = $0_1; + HEAP32[($5_1 + 56 | 0) >> 2] = $1_1; + HEAP32[($5_1 + 52 | 0) >> 2] = $2_1; + $797(HEAP32[($5_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 56 | 0) >> 2] | 0 | 0); label$1 : { label$2 : { - if (!((HEAP32[(HEAP32[(HEAP32[($5_1 + 4 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) == (9042 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[(HEAP32[($5_1 + 52 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) == (9042 | 0) & 1 | 0)) { break label$2 } - $11(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 86407 | 0, 0 | 0) | 0; + $11(HEAP32[($5_1 + 56 | 0) >> 2] | 0 | 0, 86400 | 0, 0 | 0) | 0; label$3 : { - if (!((HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($5_1 + 52 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$3 } - $798(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0); + $799(HEAP32[($5_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 56 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 52 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0); } - $11(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 88505 | 0, 0 | 0) | 0; - $819(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 56 | 0) >> 2] | 0 | 0, 88514 | 0, 0 | 0) | 0; + $819(HEAP32[($5_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 56 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 52 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); break label$1; } label$4 : { label$5 : { - if (!((HEAP32[(HEAP32[(HEAP32[($5_1 + 4 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) == (9008 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[(HEAP32[($5_1 + 52 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) == (9008 | 0) & 1 | 0)) { break label$5 } - $11(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 87794 | 0, 0 | 0) | 0; - $819(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); - $797(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0); - $11(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 86407 | 0, 0 | 0) | 0; - $798(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0); - $11(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 88150 | 0, 0 | 0) | 0; + $11(HEAP32[($5_1 + 56 | 0) >> 2] | 0 | 0, 87779 | 0, 0 | 0) | 0; + $819(HEAP32[($5_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 56 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 52 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); + $797(HEAP32[($5_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 56 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 56 | 0) >> 2] | 0 | 0, 86400 | 0, 0 | 0) | 0; + $799(HEAP32[($5_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 56 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 52 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 56 | 0) >> 2] | 0 | 0, 88159 | 0, 0 | 0) | 0; break label$4; } label$6 : { - if (!((HEAP32[(HEAP32[(HEAP32[($5_1 + 4 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) == (9015 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[(HEAP32[($5_1 + 52 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) == (9015 | 0) & 1 | 0)) { break label$6 } label$7 : { label$8 : { - if (!((HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($5_1 + 52 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$8 } - $11(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 87615 | 0, 0 | 0) | 0; - $87_1 = HEAP32[($5_1 + 12 | 0) >> 2] | 0; + $11(HEAP32[($5_1 + 56 | 0) >> 2] | 0 | 0, 87600 | 0, 0 | 0) | 0; + $87_1 = HEAP32[($5_1 + 60 | 0) >> 2] | 0; HEAP32[$87_1 >> 2] = (HEAP32[$87_1 >> 2] | 0) + 1 | 0; - $692(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0 | 0); - $797(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0); - $11(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 86387 | 0, 0 | 0) | 0; + HEAP32[($5_1 + 48 | 0) >> 2] = 0; + i64toi32_i32$0 = 0; + HEAP32[($5_1 + 40 | 0) >> 2] = 0; + HEAP32[($5_1 + 44 | 0) >> 2] = i64toi32_i32$0; + $157($5_1 + 40 | 0 | 0, (HEAP32[($5_1 + 60 | 0) >> 2] | 0) + 52 | 0 | 0); + HEAP32[($5_1 + 32 | 0) >> 2] = 0; + i64toi32_i32$0 = 0; + HEAP32[($5_1 + 24 | 0) >> 2] = 0; + HEAP32[($5_1 + 28 | 0) >> 2] = i64toi32_i32$0; + $692(HEAP32[($5_1 + 60 | 0) >> 2] | 0 | 0, $5_1 + 24 | 0 | 0, HEAP32[((HEAP32[($5_1 + 52 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0 | 0); + $109_1 = HEAP32[($5_1 + 56 | 0) >> 2] | 0; + HEAP32[$5_1 >> 2] = HEAP32[((HEAP32[($5_1 + 60 | 0) >> 2] | 0) + 52 | 0) >> 2] | 0; + $11($109_1 | 0, 69406 | 0, $5_1 | 0) | 0; + $113_1 = HEAP32[($5_1 + 56 | 0) >> 2] | 0; + HEAP32[($5_1 + 16 | 0) >> 2] = HEAP32[($5_1 + 24 | 0) >> 2] | 0; + $11($113_1 | 0, 69406 | 0, $5_1 + 16 | 0 | 0) | 0; + $157($5_1 + 40 | 0 | 0, (HEAP32[($5_1 + 60 | 0) >> 2] | 0) + 52 | 0 | 0); + $797(HEAP32[($5_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 56 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 56 | 0) >> 2] | 0 | 0, 86380 | 0, 0 | 0) | 0; break label$7; } label$9 : { label$10 : { - if (!((HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($5_1 + 52 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$10 } - $11(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 86387 | 0, 0 | 0) | 0; - $798(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 56 | 0) >> 2] | 0 | 0, 86380 | 0, 0 | 0) | 0; + $799(HEAP32[($5_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 56 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 52 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0 | 0); break label$9; } - $11(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 86387 | 0, 0 | 0) | 0; + $11(HEAP32[($5_1 + 56 | 0) >> 2] | 0 | 0, 86380 | 0, 0 | 0) | 0; } } - $11(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 87332 | 0, 0 | 0) | 0; + $11(HEAP32[($5_1 + 56 | 0) >> 2] | 0 | 0, 87317 | 0, 0 | 0) | 0; label$11 : { - if (!((HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($5_1 + 52 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$11 } - $798(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0); + $799(HEAP32[($5_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 56 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 52 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0); } - $11(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 87332 | 0, 0 | 0) | 0; + $11(HEAP32[($5_1 + 56 | 0) >> 2] | 0 | 0, 87317 | 0, 0 | 0) | 0; label$12 : { - if (!((HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($5_1 + 52 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$12 } - $798(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0); + $799(HEAP32[($5_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 56 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 52 | 0) >> 2] | 0) + 16 | 0) >> 2] | 0 | 0); } - $11(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 88505 | 0, 0 | 0) | 0; - $819(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 56 | 0) >> 2] | 0 | 0, 88514 | 0, 0 | 0) | 0; + $819(HEAP32[($5_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 56 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 52 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); label$13 : { - if (!((HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($5_1 + 52 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$13 } - $163_1 = HEAP32[($5_1 + 12 | 0) >> 2] | 0; - HEAP32[$163_1 >> 2] = (HEAP32[$163_1 >> 2] | 0) + -1 | 0; - $797(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0); - $11(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 87481 | 0, 0 | 0) | 0; + $192_1 = HEAP32[($5_1 + 60 | 0) >> 2] | 0; + HEAP32[$192_1 >> 2] = (HEAP32[$192_1 >> 2] | 0) + -1 | 0; + $797(HEAP32[($5_1 + 60 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 56 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 56 | 0) >> 2] | 0 | 0, 87466 | 0, 0 | 0) | 0; } } } } - global$0 = $5_1 + 16 | 0; + global$0 = $5_1 + 64 | 0; return; } @@ -75525,132 +75739,168 @@ function asmFunc(imports) { $0_1 = $0_1 | 0; $1_1 = $1_1 | 0; $2_1 = $2_1 | 0; - var $5_1 = 0, $53_1 = 0, $83_1 = 0, $154_1 = 0, $162_1 = 0, $198_1 = 0, $206_1 = 0, $218_1 = 0, $101_1 = 0; - $5_1 = global$0 - 32 | 0; + var $5_1 = 0, i64toi32_i32$0 = 0, $53_1 = 0, $120_1 = 0, $228_1 = 0, $236_1 = 0, $272_1 = 0, $280_1 = 0, $292_1 = 0, $75_1 = 0, $84_1 = 0, $147_1 = 0, $154_1 = 0, $173_1 = 0; + $5_1 = global$0 - 160 | 0; global$0 = $5_1; - HEAP32[($5_1 + 28 | 0) >> 2] = $0_1; - HEAP32[($5_1 + 24 | 0) >> 2] = $1_1; - HEAP32[($5_1 + 20 | 0) >> 2] = $2_1; - $797(HEAP32[($5_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 24 | 0) >> 2] | 0 | 0); + HEAP32[($5_1 + 156 | 0) >> 2] = $0_1; + HEAP32[($5_1 + 152 | 0) >> 2] = $1_1; + HEAP32[($5_1 + 148 | 0) >> 2] = $2_1; + $797(HEAP32[($5_1 + 156 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 152 | 0) >> 2] | 0 | 0); label$1 : { label$2 : { - if (!((HEAP32[(HEAP32[((HEAP32[($5_1 + 20 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9034 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($5_1 + 148 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9034 | 0) & 1 | 0)) { break label$2 } - $11(HEAP32[($5_1 + 24 | 0) >> 2] | 0 | 0, 86393 | 0, 0 | 0) | 0; - $820(HEAP32[($5_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 24 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 20 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); - $11(HEAP32[($5_1 + 24 | 0) >> 2] | 0 | 0, 88505 | 0, 0 | 0) | 0; - $819(HEAP32[($5_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 24 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 20 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 152 | 0) >> 2] | 0 | 0, 86386 | 0, 0 | 0) | 0; + $820(HEAP32[($5_1 + 156 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 152 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 148 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 152 | 0) >> 2] | 0 | 0, 88514 | 0, 0 | 0) | 0; + $819(HEAP32[($5_1 + 156 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 152 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 148 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); break label$1; } label$3 : { - if (!((HEAP32[(HEAP32[((HEAP32[($5_1 + 20 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9017 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($5_1 + 148 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9017 | 0) & 1 | 0)) { break label$3 } - HEAP8[($5_1 + 19 | 0) >> 0] = 0; + HEAP8[($5_1 + 147 | 0) >> 0] = 0; label$4 : { - if (!((HEAP32[(HEAP32[($5_1 + 20 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[($5_1 + 148 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$4 } - $11(HEAP32[($5_1 + 24 | 0) >> 2] | 0 | 0, 87615 | 0, 0 | 0) | 0; - HEAP8[($5_1 + 19 | 0) >> 0] = 1; - $53_1 = HEAP32[($5_1 + 28 | 0) >> 2] | 0; + $11(HEAP32[($5_1 + 152 | 0) >> 2] | 0 | 0, 87600 | 0, 0 | 0) | 0; + HEAP8[($5_1 + 147 | 0) >> 0] = 1; + $53_1 = HEAP32[($5_1 + 156 | 0) >> 2] | 0; HEAP32[$53_1 >> 2] = (HEAP32[$53_1 >> 2] | 0) + 1 | 0; - $821(HEAP32[($5_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 24 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($5_1 + 20 | 0) >> 2] | 0) >> 2] | 0 | 0); - $797(HEAP32[($5_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 24 | 0) >> 2] | 0 | 0); + HEAP32[($5_1 + 136 | 0) >> 2] = 0; + i64toi32_i32$0 = 0; + HEAP32[($5_1 + 128 | 0) >> 2] = 0; + HEAP32[($5_1 + 132 | 0) >> 2] = i64toi32_i32$0; + $157($5_1 + 128 | 0 | 0, (HEAP32[($5_1 + 156 | 0) >> 2] | 0) + 52 | 0 | 0); + HEAP32[($5_1 + 120 | 0) >> 2] = 0; + i64toi32_i32$0 = 0; + HEAP32[($5_1 + 112 | 0) >> 2] = 0; + HEAP32[($5_1 + 116 | 0) >> 2] = i64toi32_i32$0; + $821(HEAP32[($5_1 + 156 | 0) >> 2] | 0 | 0, $5_1 + 112 | 0 | 0, HEAP32[(HEAP32[($5_1 + 148 | 0) >> 2] | 0) >> 2] | 0 | 0); + $75_1 = HEAP32[($5_1 + 152 | 0) >> 2] | 0; + HEAP32[($5_1 + 48 | 0) >> 2] = HEAP32[((HEAP32[($5_1 + 156 | 0) >> 2] | 0) + 52 | 0) >> 2] | 0; + $11($75_1 | 0, 69406 | 0, $5_1 + 48 | 0 | 0) | 0; + $11(HEAP32[($5_1 + 152 | 0) >> 2] | 0 | 0, 89066 | 0, 0 | 0) | 0; + $84_1 = HEAP32[($5_1 + 152 | 0) >> 2] | 0; + HEAP32[($5_1 + 64 | 0) >> 2] = HEAP32[($5_1 + 112 | 0) >> 2] | 0; + $11($84_1 | 0, 69406 | 0, $5_1 + 64 | 0 | 0) | 0; + $12($5_1 + 112 | 0 | 0); + $797(HEAP32[($5_1 + 156 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 152 | 0) >> 2] | 0 | 0); + $157($5_1 + 128 | 0 | 0, (HEAP32[($5_1 + 156 | 0) >> 2] | 0) + 52 | 0 | 0); } label$5 : { - if (!((HEAP32[((HEAP32[($5_1 + 20 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($5_1 + 148 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$5 } label$6 : { label$7 : { - if (!((HEAP32[((HEAP32[((HEAP32[($5_1 + 20 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[((HEAP32[($5_1 + 148 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$7 } - $11(HEAP32[($5_1 + 24 | 0) >> 2] | 0 | 0, 87615 | 0, 0 | 0) | 0; - $83_1 = HEAP32[($5_1 + 28 | 0) >> 2] | 0; - HEAP32[$83_1 >> 2] = (HEAP32[$83_1 >> 2] | 0) + 1 | 0; - HEAP8[($5_1 + 19 | 0) >> 0] = 1; - $796(HEAP32[($5_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 24 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[((HEAP32[($5_1 + 20 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0, 0 & 1 | 0 | 0); - $797(HEAP32[($5_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 24 | 0) >> 2] | 0 | 0); - $11(HEAP32[($5_1 + 24 | 0) >> 2] | 0 | 0, 86402 | 0, 0 | 0) | 0; - $101_1 = HEAP32[($5_1 + 24 | 0) >> 2] | 0; - HEAP32[$5_1 >> 2] = HEAP32[((HEAP32[((HEAP32[((HEAP32[((HEAP32[((HEAP32[($5_1 + 20 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $11($101_1 | 0, 69406 | 0, $5_1 | 0) | 0; - $11(HEAP32[($5_1 + 24 | 0) >> 2] | 0 | 0, 88505 | 0, 0 | 0) | 0; + $11(HEAP32[($5_1 + 152 | 0) >> 2] | 0 | 0, 87600 | 0, 0 | 0) | 0; + $120_1 = HEAP32[($5_1 + 156 | 0) >> 2] | 0; + HEAP32[$120_1 >> 2] = (HEAP32[$120_1 >> 2] | 0) + 1 | 0; + HEAP8[($5_1 + 147 | 0) >> 0] = 1; + HEAP32[($5_1 + 104 | 0) >> 2] = 0; + i64toi32_i32$0 = 0; + HEAP32[($5_1 + 96 | 0) >> 2] = 0; + HEAP32[($5_1 + 100 | 0) >> 2] = i64toi32_i32$0; + $157($5_1 + 96 | 0 | 0, (HEAP32[($5_1 + 156 | 0) >> 2] | 0) + 52 | 0 | 0); + HEAP32[($5_1 + 88 | 0) >> 2] = 0; + i64toi32_i32$0 = 0; + HEAP32[($5_1 + 80 | 0) >> 2] = 0; + HEAP32[($5_1 + 84 | 0) >> 2] = i64toi32_i32$0; + $796(HEAP32[($5_1 + 156 | 0) >> 2] | 0 | 0, $5_1 + 80 | 0 | 0, HEAP32[((HEAP32[((HEAP32[($5_1 + 148 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0, 0 & 1 | 0 | 0); + $147_1 = HEAP32[($5_1 + 152 | 0) >> 2] | 0; + HEAP32[$5_1 >> 2] = HEAP32[((HEAP32[($5_1 + 156 | 0) >> 2] | 0) + 52 | 0) >> 2] | 0; + $11($147_1 | 0, 69406 | 0, $5_1 | 0) | 0; + $11(HEAP32[($5_1 + 152 | 0) >> 2] | 0 | 0, 89066 | 0, 0 | 0) | 0; + $154_1 = HEAP32[($5_1 + 152 | 0) >> 2] | 0; + HEAP32[($5_1 + 16 | 0) >> 2] = HEAP32[($5_1 + 80 | 0) >> 2] | 0; + $11($154_1 | 0, 69406 | 0, $5_1 + 16 | 0 | 0) | 0; + $12($5_1 + 80 | 0 | 0); + $157($5_1 + 96 | 0 | 0, (HEAP32[($5_1 + 156 | 0) >> 2] | 0) + 52 | 0 | 0); + $797(HEAP32[($5_1 + 156 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 152 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 152 | 0) >> 2] | 0 | 0, 86395 | 0, 0 | 0) | 0; + $173_1 = HEAP32[($5_1 + 152 | 0) >> 2] | 0; + HEAP32[($5_1 + 32 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[((HEAP32[((HEAP32[((HEAP32[($5_1 + 148 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; + $11($173_1 | 0, 69406 | 0, $5_1 + 32 | 0 | 0) | 0; + $11(HEAP32[($5_1 + 152 | 0) >> 2] | 0 | 0, 88514 | 0, 0 | 0) | 0; break label$6; } label$8 : { - if (!((HEAP32[(HEAP32[((HEAP32[($5_1 + 20 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[(HEAP32[((HEAP32[($5_1 + 148 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$8 } - $11(HEAP32[($5_1 + 24 | 0) >> 2] | 0 | 0, 86402 | 0, 0 | 0) | 0; - $798(HEAP32[($5_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 24 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[((HEAP32[($5_1 + 20 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) >> 2] | 0 | 0); - $11(HEAP32[($5_1 + 24 | 0) >> 2] | 0 | 0, 88505 | 0, 0 | 0) | 0; + $11(HEAP32[($5_1 + 152 | 0) >> 2] | 0 | 0, 86395 | 0, 0 | 0) | 0; + $799(HEAP32[($5_1 + 156 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 152 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[((HEAP32[($5_1 + 148 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 152 | 0) >> 2] | 0 | 0, 88514 | 0, 0 | 0) | 0; } } } label$9 : { - if (!((HEAP32[((HEAP32[($5_1 + 20 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($5_1 + 148 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$9 } label$10 : { label$11 : { - if (!(($822(HEAP32[((HEAP32[($5_1 + 20 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { + if (!(($822(HEAP32[((HEAP32[($5_1 + 148 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { break label$11 } - $819(HEAP32[($5_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 24 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 20 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); + $819(HEAP32[($5_1 + 156 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 152 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 148 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); break label$10; } - $797(HEAP32[($5_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 24 | 0) >> 2] | 0 | 0); - $11(HEAP32[($5_1 + 24 | 0) >> 2] | 0 | 0, 87615 | 0, 0 | 0) | 0; - $154_1 = HEAP32[($5_1 + 28 | 0) >> 2] | 0; - HEAP32[$154_1 >> 2] = (HEAP32[$154_1 >> 2] | 0) + 1 | 0; - $819(HEAP32[($5_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 24 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 20 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); - $162_1 = HEAP32[($5_1 + 28 | 0) >> 2] | 0; - HEAP32[$162_1 >> 2] = (HEAP32[$162_1 >> 2] | 0) + -1 | 0; - $797(HEAP32[($5_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 24 | 0) >> 2] | 0 | 0); - $11(HEAP32[($5_1 + 24 | 0) >> 2] | 0 | 0, 87481 | 0, 0 | 0) | 0; + $797(HEAP32[($5_1 + 156 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 152 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 152 | 0) >> 2] | 0 | 0, 87600 | 0, 0 | 0) | 0; + $228_1 = HEAP32[($5_1 + 156 | 0) >> 2] | 0; + HEAP32[$228_1 >> 2] = (HEAP32[$228_1 >> 2] | 0) + 1 | 0; + $819(HEAP32[($5_1 + 156 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 152 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 148 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0); + $236_1 = HEAP32[($5_1 + 156 | 0) >> 2] | 0; + HEAP32[$236_1 >> 2] = (HEAP32[$236_1 >> 2] | 0) + -1 | 0; + $797(HEAP32[($5_1 + 156 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 152 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 152 | 0) >> 2] | 0 | 0, 87466 | 0, 0 | 0) | 0; } } label$12 : { - if (!((HEAP32[((HEAP32[($5_1 + 20 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { + if (!((HEAP32[((HEAP32[($5_1 + 148 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$12 } - $797(HEAP32[($5_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 24 | 0) >> 2] | 0 | 0); - $11(HEAP32[($5_1 + 24 | 0) >> 2] | 0 | 0, 87945 | 0, 0 | 0) | 0; + $797(HEAP32[($5_1 + 156 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 152 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 152 | 0) >> 2] | 0 | 0, 87930 | 0, 0 | 0) | 0; label$13 : { label$14 : { - if (!(($822(HEAP32[((HEAP32[($5_1 + 20 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { + if (!(($822(HEAP32[((HEAP32[($5_1 + 148 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) | 0) & 1 | 0)) { break label$14 } - $819(HEAP32[($5_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 24 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 20 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0); + $819(HEAP32[($5_1 + 156 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 152 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 148 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0); break label$13; } - $797(HEAP32[($5_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 24 | 0) >> 2] | 0 | 0); - $11(HEAP32[($5_1 + 24 | 0) >> 2] | 0 | 0, 87615 | 0, 0 | 0) | 0; - $198_1 = HEAP32[($5_1 + 28 | 0) >> 2] | 0; - HEAP32[$198_1 >> 2] = (HEAP32[$198_1 >> 2] | 0) + 1 | 0; - $819(HEAP32[($5_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 24 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 20 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0); - $206_1 = HEAP32[($5_1 + 28 | 0) >> 2] | 0; - HEAP32[$206_1 >> 2] = (HEAP32[$206_1 >> 2] | 0) + -1 | 0; - $797(HEAP32[($5_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 24 | 0) >> 2] | 0 | 0); - $11(HEAP32[($5_1 + 24 | 0) >> 2] | 0 | 0, 87481 | 0, 0 | 0) | 0; + $797(HEAP32[($5_1 + 156 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 152 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 152 | 0) >> 2] | 0 | 0, 87600 | 0, 0 | 0) | 0; + $272_1 = HEAP32[($5_1 + 156 | 0) >> 2] | 0; + HEAP32[$272_1 >> 2] = (HEAP32[$272_1 >> 2] | 0) + 1 | 0; + $819(HEAP32[($5_1 + 156 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 152 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($5_1 + 148 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0); + $280_1 = HEAP32[($5_1 + 156 | 0) >> 2] | 0; + HEAP32[$280_1 >> 2] = (HEAP32[$280_1 >> 2] | 0) + -1 | 0; + $797(HEAP32[($5_1 + 156 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 152 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 152 | 0) >> 2] | 0 | 0, 87466 | 0, 0 | 0) | 0; } } label$15 : { - if (!((HEAPU8[($5_1 + 19 | 0) >> 0] | 0) & 1 | 0)) { + if (!((HEAPU8[($5_1 + 147 | 0) >> 0] | 0) & 1 | 0)) { break label$15 } - $218_1 = HEAP32[($5_1 + 28 | 0) >> 2] | 0; - HEAP32[$218_1 >> 2] = (HEAP32[$218_1 >> 2] | 0) + -1 | 0; - $797(HEAP32[($5_1 + 28 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 24 | 0) >> 2] | 0 | 0); - $11(HEAP32[($5_1 + 24 | 0) >> 2] | 0 | 0, 87481 | 0, 0 | 0) | 0; + $292_1 = HEAP32[($5_1 + 156 | 0) >> 2] | 0; + HEAP32[$292_1 >> 2] = (HEAP32[$292_1 >> 2] | 0) + -1 | 0; + $797(HEAP32[($5_1 + 156 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 152 | 0) >> 2] | 0 | 0); + $11(HEAP32[($5_1 + 152 | 0) >> 2] | 0 | 0, 87466 | 0, 0 | 0) | 0; } } } - global$0 = $5_1 + 32 | 0; + global$0 = $5_1 + 160 | 0; return; } @@ -75665,12 +75915,12 @@ function asmFunc(imports) { HEAP32[($5_1 + 8 | 0) >> 2] = $1_1; HEAP32[($5_1 + 4 | 0) >> 2] = $2_1; $797(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0); - $11(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 88500 | 0, 0 | 0) | 0; + $11(HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, 88509 | 0, 0 | 0) | 0; $819(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($5_1 + 4 | 0) >> 2] | 0) >> 2] | 0 | 0); $797(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0); $17_1 = HEAP32[($5_1 + 8 | 0) >> 2] | 0; HEAP32[$5_1 >> 2] = HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 20 | 0) >> 2] | 0; - $11($17_1 | 0, 88169 | 0, $5_1 | 0) | 0; + $11($17_1 | 0, 88178 | 0, $5_1 | 0) | 0; label$1 : { if (!((HEAP32[((HEAP32[($5_1 + 4 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$1 @@ -75741,7 +75991,7 @@ function asmFunc(imports) { if (!((HEAP32[(HEAP32[($5_1 + 4 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0)) { break label$2 } - $798(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($5_1 + 4 | 0) >> 2] | 0) >> 2] | 0 | 0); + $799(HEAP32[($5_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($5_1 + 8 | 0) >> 2] | 0 | 0, HEAP32[(HEAP32[($5_1 + 4 | 0) >> 2] | 0) >> 2] | 0 | 0); } global$0 = $5_1 + 16 | 0; return; @@ -75920,7 +76170,7 @@ function asmFunc(imports) { $83_1 = HEAP32[((HEAP32[($4_1 + 44 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; $85_1 = HEAP32[((HEAP32[($4_1 + 40 | 0) >> 2] | 0) + 184 | 0) >> 2] | 0; HEAP32[$4_1 >> 2] = HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 40 | 0) >> 2] | 0) + 192 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $251(29 | 0, $83_1 | 0, $85_1 | 0, 0 | 0, 86530 | 0, $4_1 | 0) | 0; + $251(29 | 0, $83_1 | 0, $85_1 | 0, 0 | 0, 86523 | 0, $4_1 | 0) | 0; break label$7; } $98_1 = 0; @@ -75950,7 +76200,7 @@ function asmFunc(imports) { $134_1 = HEAP32[((HEAP32[($4_1 + 44 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; $136_1 = HEAP32[((HEAP32[($4_1 + 40 | 0) >> 2] | 0) + 184 | 0) >> 2] | 0; HEAP32[($4_1 + 16 | 0) >> 2] = HEAP32[((HEAP32[((HEAP32[((HEAP32[($4_1 + 40 | 0) >> 2] | 0) + 192 | 0) >> 2] | 0) + 28 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0; - $251(29 | 0, $134_1 | 0, $136_1 | 0, 0 | 0, 87204 | 0, $4_1 + 16 | 0 | 0) | 0; + $251(29 | 0, $134_1 | 0, $136_1 | 0, 0 | 0, 87189 | 0, $4_1 + 16 | 0 | 0) | 0; break label$11; } $151_1 = 0; @@ -76947,14 +77197,14 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($5_1 + 56 | 0) >> 2] | 0) + 36 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$13 } - fimport$0(82950 | 0, 77943 | 0, 42713 | 0, 75035 | 0); + fimport$0(82950 | 0, 77943 | 0, 42902 | 0, 75035 | 0); wasm2js_trap(); } label$14 : { if ((HEAP32[((HEAP32[($5_1 + 48 | 0) >> 2] | 0) + 8 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$14 } - fimport$0(82930 | 0, 77943 | 0, 42714 | 0, 75035 | 0); + fimport$0(82930 | 0, 77943 | 0, 42903 | 0, 75035 | 0); wasm2js_trap(); } HEAP32[($5_1 + 44 | 0) >> 2] = $434(HEAP32[($5_1 + 60 | 0) >> 2] | 0 | 0) | 0; @@ -77568,7 +77818,7 @@ function asmFunc(imports) { $458((HEAP32[$5_1 >> 2] | 0) + 148 | 0 | 0, HEAP32[((HEAP32[$5_1 >> 2] | 0) + 144 | 0) >> 2] | 0 | 0); break label$4; } - fimport$0(85018 | 0, 77943 | 0, 42604 | 0, 75878 | 0); + fimport$0(85018 | 0, 77943 | 0, 42793 | 0, 75878 | 0); wasm2js_trap(); } } @@ -77609,7 +77859,7 @@ function asmFunc(imports) { $872(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(75141 | 0, 77943 | 0, 45181 | 0, 67441 | 0); + fimport$0(75141 | 0, 77943 | 0, 45370 | 0, 67441 | 0); wasm2js_trap(); } } @@ -77789,7 +78039,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($4_1 + 108 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$11 } - fimport$0(82853 | 0, 77943 | 0, 45007 | 0, 67055 | 0); + fimport$0(82853 | 0, 77943 | 0, 45196 | 0, 67055 | 0); wasm2js_trap(); } HEAP32[($4_1 + 80 | 0) >> 2] = $414(HEAP32[($4_1 + 108 | 0) >> 2] | 0 | 0, HEAP32[((HEAP32[($4_1 + 108 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0 | 0, 0 | 0, HEAP32[((HEAP32[($4_1 + 104 | 0) >> 2] | 0) + 12 | 0) >> 2] | 0 | 0) | 0; @@ -77804,7 +78054,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($4_1 + 108 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$13 } - fimport$0(82853 | 0, 77943 | 0, 45016 | 0, 67055 | 0); + fimport$0(82853 | 0, 77943 | 0, 45205 | 0, 67055 | 0); wasm2js_trap(); } $456(HEAP32[((HEAP32[($4_1 + 108 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 80 | 0) >> 2] | 0 | 0); @@ -77826,7 +78076,7 @@ function asmFunc(imports) { if ((HEAP32[((HEAP32[($4_1 + 108 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$14 } - fimport$0(82853 | 0, 77943 | 0, 45028 | 0, 67055 | 0); + fimport$0(82853 | 0, 77943 | 0, 45217 | 0, 67055 | 0); wasm2js_trap(); } $191_1 = 0; @@ -77875,7 +78125,7 @@ function asmFunc(imports) { if ((HEAP32[(HEAP32[($4_1 + 104 | 0) >> 2] | 0) >> 2] | 0 | 0) != (0 | 0) & 1 | 0) { break label$22 } - fimport$0(82785 | 0, 77943 | 0, 45094 | 0, 67055 | 0); + fimport$0(82785 | 0, 77943 | 0, 45283 | 0, 67055 | 0); wasm2js_trap(); } HEAP32[($4_1 + 16 | 0) >> 2] = -1; @@ -77909,7 +78159,7 @@ function asmFunc(imports) { $551(HEAP32[($4_1 + 108 | 0) >> 2] | 0 | 0, (HEAP32[($4_1 + 104 | 0) >> 2] | 0) + 20 | 0 | 0, HEAP32[((HEAP32[($4_1 + 104 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0 | 0); break label$20; } - fimport$0(75141 | 0, 77943 | 0, 45120 | 0, 67055 | 0); + fimport$0(75141 | 0, 77943 | 0, 45309 | 0, 67055 | 0); wasm2js_trap(); } } @@ -77966,7 +78216,7 @@ function asmFunc(imports) { $880(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0); break label$1; } - fimport$0(75141 | 0, 77943 | 0, 44963 | 0, 67194 | 0); + fimport$0(75141 | 0, 77943 | 0, 45152 | 0, 67194 | 0); wasm2js_trap(); } global$0 = $4_1 + 16 | 0; @@ -77997,7 +78247,7 @@ function asmFunc(imports) { $882(HEAP32[($4_1 + 12 | 0) >> 2] | 0 | 0, HEAP32[($4_1 + 8 | 0) >> 2] | 0 | 0); break label$3; } - fimport$0(75141 | 0, 77943 | 0, 43323 | 0, 67131 | 0); + fimport$0(75141 | 0, 77943 | 0, 43512 | 0, 67131 | 0); wasm2js_trap(); } } @@ -78118,7 +78368,7 @@ function asmFunc(imports) { if ((HEAP32[(HEAP32[(HEAP32[($4_1 + 56 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) == (9042 | 0) & 1 | 0) { break label$1 } - fimport$0(84029 | 0, 77943 | 0, 44781 | 0, 67306 | 0); + fimport$0(84029 | 0, 77943 | 0, 44970 | 0, 67306 | 0); wasm2js_trap(); } label$2 : { @@ -78190,7 +78440,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(79597 | 0, 77943 | 0, 44732 | 0, 67361 | 0); + fimport$0(79597 | 0, 77943 | 0, 44921 | 0, 67361 | 0); wasm2js_trap(); } HEAP8[($4_1 + 23 | 0) >> 0] = (HEAPU8[((HEAP32[((HEAP32[($4_1 + 28 | 0) >> 2] | 0) + 4 | 0) >> 2] | 0) + 264 | 0) >> 0] | 0) & 1 | 0; @@ -78239,7 +78489,7 @@ function asmFunc(imports) { if ((HEAP32[(HEAP32[(HEAP32[($4_1 + 24 | 0) >> 2] | 0) >> 2] | 0) >> 2] | 0 | 0) == (9015 | 0) & 1 | 0) { break label$1 } - fimport$0(79240 | 0, 77943 | 0, 44885 | 0, 67004 | 0); + fimport$0(79240 | 0, 77943 | 0, 45074 | 0, 67004 | 0); wasm2js_trap(); } HEAP32[($4_1 + 16 | 0) >> 2] = 0; @@ -78350,7 +78600,7 @@ function asmFunc(imports) { if ((HEAP32[(HEAP32[((HEAP32[($4_1 + 40 | 0) >> 2] | 0) + 24 | 0) >> 2] | 0) >> 2] | 0 | 0) == (9017 | 0) & 1 | 0) { break label$5 } - fimport$0(83539 | 0, 77943 | 0, 43102 | 0, 67257 | 0); + fimport$0(83539 | 0, 77943 | 0, 43291 | 0, 67257 | 0); wasm2js_trap(); } HEAP32[($4_1 + 20 | 0) >> 2] = $836(HEAP32[($4_1 + 44 | 0) >> 2] | 0 | 0, 74227 | 0) | 0; @@ -78542,7 +78792,7 @@ function asmFunc(imports) { } function $888() { - return 117444 | 0; + return 117604 | 0; } function $889($0_1) { @@ -78999,16 +79249,16 @@ function asmFunc(imports) { } $1_1 = 0; label$2 : { - if (!(HEAP32[(0 + 117424 | 0) >> 2] | 0)) { + if (!(HEAP32[(0 + 117584 | 0) >> 2] | 0)) { break label$2 } - $1_1 = $898(HEAP32[(0 + 117424 | 0) >> 2] | 0 | 0) | 0; + $1_1 = $898(HEAP32[(0 + 117584 | 0) >> 2] | 0 | 0) | 0; } label$3 : { - if (!(HEAP32[(0 + 117464 | 0) >> 2] | 0)) { + if (!(HEAP32[(0 + 117624 | 0) >> 2] | 0)) { break label$3 } - $1_1 = $898(HEAP32[(0 + 117464 | 0) >> 2] | 0 | 0) | 0 | $1_1 | 0; + $1_1 = $898(HEAP32[(0 + 117624 | 0) >> 2] | 0 | 0) | 0 | $1_1 | 0; } label$4 : { $0_1 = HEAP32[($915() | 0) >> 2] | 0; @@ -79369,7 +79619,7 @@ function asmFunc(imports) { function $913($0_1) { $0_1 = $0_1 | 0; - return $914($0_1 | 0, 117524 | 0) | 0 | 0; + return $914($0_1 | 0, 117684 | 0) | 0 | 0; } function $914($0_1, $1_1) { @@ -79380,17 +79630,17 @@ function asmFunc(imports) { i64toi32_i32$2 = $0_1; i64toi32_i32$1 = HEAP32[(i64toi32_i32$2 + 4 | 0) >> 2] | 0; $1028(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 ? 117456 + 4 | 0 : 117456) >> 2] | 0; + HEAP32[($1_1 + 40 | 0) >> 2] = HEAP32[(HEAP32[($1_1 + 32 | 0) >> 2] | 0 ? 117616 + 4 | 0 : 117616) >> 2] | 0; return $1_1 | 0; } function $915() { - $911(117568 | 0); - return 117572 | 0; + $911(117728 | 0); + return 117732 | 0; } function $916() { - $912(117568 | 0); + $912(117728 | 0); } function $917($0_1, $1_1) { @@ -79400,7 +79650,7 @@ function asmFunc(imports) { $2_1 = global$0 - 16 | 0; global$0 = $2_1; HEAP32[($2_1 + 12 | 0) >> 2] = $1_1; - $1_1 = $974(117280 | 0, $0_1 | 0, $1_1 | 0) | 0; + $1_1 = $974(117440 | 0, $0_1 | 0, $1_1 | 0) | 0; global$0 = $2_1 + 16 | 0; return $1_1 | 0; } @@ -79414,12 +79664,12 @@ function asmFunc(imports) { } function $920() { - return 117576 | 0; + return 117736 | 0; } function $921() { - HEAP32[(0 + 117672 | 0) >> 2] = 117500; - HEAP32[(0 + 117600 | 0) >> 2] = $919() | 0; + HEAP32[(0 + 117832 | 0) >> 2] = 117660; + HEAP32[(0 + 117760 | 0) >> 2] = $919() | 0; } function $922($0_1, $1_1) { @@ -81317,8 +81567,8 @@ function asmFunc(imports) { break label$2 } $2_1 = $2_1 << 2 | 0; - $5_1 = HEAP32[($2_1 + 116268 | 0) >> 2] | 0; - $6_1 = HEAP32[($2_1 + 116256 | 0) >> 2] | 0; + $5_1 = HEAP32[($2_1 + 116428 | 0) >> 2] | 0; + $6_1 = HEAP32[($2_1 + 116416 | 0) >> 2] | 0; label$3 : while (1) { label$4 : { label$5 : { @@ -83558,7 +83808,7 @@ function asmFunc(imports) { i64toi32_i32$2 = $386$hi; i64toi32_i32$1 = $390$hi; $1011($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); - $1005($7_1 + 224 | 0 | 0, HEAP32[(((8 - $16_1 | 0) << 2 | 0) + 116224 | 0) >> 2] | 0 | 0); + $1005($7_1 + 224 | 0 | 0, HEAP32[(((8 - $16_1 | 0) << 2 | 0) + 116384 | 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; @@ -83633,7 +83883,7 @@ function asmFunc(imports) { i64toi32_i32$2 = $445$hi; i64toi32_i32$1 = $449$hi; $1011($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); - $1005($7_1 + 304 | 0 | 0, HEAP32[(($16_1 << 2 | 0) + 116184 | 0) >> 2] | 0 | 0); + $1005($7_1 + 304 | 0 | 0, HEAP32[(($16_1 << 2 | 0) + 116344 | 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; @@ -83699,7 +83949,7 @@ function asmFunc(imports) { $14_1 = 0; break label$42; } - $11_1 = HEAP32[(((8 - $9_1 | 0) << 2 | 0) + 116224 | 0) >> 2] | 0; + $11_1 = HEAP32[(((8 - $9_1 | 0) << 2 | 0) + 116384 | 0) >> 2] | 0; $6_1 = (1e9 | 0) / ($11_1 | 0) | 0; $2_1 = 0; $1_1 = 0; @@ -83868,7 +84118,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) + 116208 | 0) >> 2] | 0; + $13_1 = HEAP32[(($1_1 << 2 | 0) + 116368 | 0) >> 2] | 0; if ($2_1 >>> 0 < $13_1 >>> 0) { break label$60 } @@ -85180,18 +85430,18 @@ function asmFunc(imports) { function $963() { label$1 : { - if ((HEAPU8[(0 + 118768 | 0) >> 0] | 0) & 1 | 0) { + if ((HEAPU8[(0 + 118928 | 0) >> 0] | 0) & 1 | 0) { break label$1 } - $909(118744 | 0) | 0; + $909(118904 | 0) | 0; label$2 : { - if ((HEAPU8[(0 + 118768 | 0) >> 0] | 0) & 1 | 0) { + if ((HEAPU8[(0 + 118928 | 0) >> 0] | 0) & 1 | 0) { break label$2 } - fimport$4(117448 | 0, 117452 | 0, 117456 | 0); - HEAP8[(0 + 118768 | 0) >> 0] = 1; + fimport$4(117608 | 0, 117612 | 0, 117616 | 0); + HEAP8[(0 + 118928 | 0) >> 0] = 1; } - $910(118744 | 0) | 0; + $910(118904 | 0) | 0; } } @@ -85608,7 +85858,7 @@ function asmFunc(imports) { break label$2 } $1_1 = $1_1 + 1 | 0; - $14_1 = HEAPU8[(($14_1 + Math_imul($17_1, 58) | 0) + 116223 | 0) >> 0] | 0; + $14_1 = HEAPU8[(($14_1 + Math_imul($17_1, 58) | 0) + 116383 | 0) >> 0] | 0; if (($14_1 + -1 | 0) >>> 0 < 8 >>> 0) { continue label$37 } @@ -85924,7 +86174,7 @@ function asmFunc(imports) { break label$8; } $14_1 = HEAP32[($7_1 + 64 | 0) >> 2] | 0; - $15_1 = $14_1 ? $14_1 : 85845; + $15_1 = $14_1 ? $14_1 : 85838; $14_1 = $942($15_1 | 0, ($22_1 >>> 0 < 2147483647 >>> 0 ? $22_1 : 2147483647) | 0) | 0; $27_1 = $15_1 + $14_1 | 0; label$69 : { @@ -86366,7 +86616,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) + 116752 | 0) >> 0] | 0 | $2_1 | 0; + HEAP8[$1_1 >> 0] = HEAPU8[(($0_1 & 15 | 0) + 116912 | 0) >> 0] | 0 | $2_1 | 0; i64toi32_i32$2 = $0_1; i64toi32_i32$1 = 0; i64toi32_i32$3 = 15; @@ -87330,7 +87580,7 @@ function asmFunc(imports) { } $11_1 = -2147483648; } - HEAP8[$10_1 >> 0] = HEAPU8[($11_1 + 116752 | 0) >> 0] | 0 | $18_1 | 0; + HEAP8[$10_1 >> 0] = HEAPU8[($11_1 + 116912 | 0) >> 0] | 0 | $18_1 | 0; $1_1 = ($1_1 - +($11_1 | 0)) * 16.0; label$75 : { $11_1 = $10_1 + 1 | 0; @@ -87586,7 +87836,7 @@ function asmFunc(imports) { function $985($0_1) { $0_1 = $0_1 | 0; var $1_1 = 0, $2_1 = 0; - $1_1 = HEAP32[(0 + 117428 | 0) >> 2] | 0; + $1_1 = HEAP32[(0 + 117588 | 0) >> 2] | 0; $2_1 = ($0_1 + 7 | 0) & -8 | 0; $0_1 = $1_1 + $2_1 | 0; label$1 : { @@ -87606,7 +87856,7 @@ function asmFunc(imports) { break label$1 } } - HEAP32[(0 + 117428 | 0) >> 2] = $0_1; + HEAP32[(0 + 117588 | 0) >> 2] = $0_1; return $1_1 | 0; } HEAP32[($888() | 0) >> 2] = 48; @@ -87632,7 +87882,7 @@ function asmFunc(imports) { break label$10 } label$11 : { - $2_1 = HEAP32[(0 + 118772 | 0) >> 2] | 0; + $2_1 = HEAP32[(0 + 118932 | 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; @@ -87643,13 +87893,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 + 118812 | 0; - $4_1 = HEAP32[($4_1 + 118820 | 0) >> 2] | 0; + $0_1 = $4_1 + 118972 | 0; + $4_1 = HEAP32[($4_1 + 118980 | 0) >> 2] | 0; $3_1 = HEAP32[($4_1 + 8 | 0) >> 2] | 0; if (($0_1 | 0) != ($3_1 | 0)) { break label$13 } - HEAP32[(0 + 118772 | 0) >> 2] = $2_1 & (__wasm_rotl_i32(-2 | 0, $5_1 | 0) | 0) | 0; + HEAP32[(0 + 118932 | 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; @@ -87662,7 +87912,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 + 118780 | 0) >> 2] | 0; + $6_1 = HEAP32[(0 + 118940 | 0) >> 2] | 0; if ($3_1 >>> 0 <= $6_1 >>> 0) { break label$9 } @@ -87676,14 +87926,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 + 118812 | 0; - $0_1 = HEAP32[($0_1 + 118820 | 0) >> 2] | 0; + $5_1 = $0_1 + 118972 | 0; + $0_1 = HEAP32[($0_1 + 118980 | 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 + 118772 | 0) >> 2] = $2_1; + HEAP32[(0 + 118932 | 0) >> 2] = $2_1; break label$15; } HEAP32[($7_1 + 12 | 0) >> 2] = $5_1; @@ -87699,15 +87949,15 @@ function asmFunc(imports) { if (!$6_1) { break label$17 } - $3_1 = ($6_1 & -8 | 0) + 118812 | 0; - $4_1 = HEAP32[(0 + 118792 | 0) >> 2] | 0; + $3_1 = ($6_1 & -8 | 0) + 118972 | 0; + $4_1 = HEAP32[(0 + 118952 | 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 + 118772 | 0) >> 2] = $2_1 | $8_1 | 0; + HEAP32[(0 + 118932 | 0) >> 2] = $2_1 | $8_1 | 0; $8_1 = $3_1; break label$18; } @@ -87719,15 +87969,15 @@ function asmFunc(imports) { HEAP32[($4_1 + 8 | 0) >> 2] = $8_1; } $0_1 = $0_1 + 8 | 0; - HEAP32[(0 + 118792 | 0) >> 2] = $7_1; - HEAP32[(0 + 118780 | 0) >> 2] = $5_1; + HEAP32[(0 + 118952 | 0) >> 2] = $7_1; + HEAP32[(0 + 118940 | 0) >> 2] = $5_1; break label$1; } - $9_1 = HEAP32[(0 + 118776 | 0) >> 2] | 0; + $9_1 = HEAP32[(0 + 118936 | 0) >> 2] | 0; if (!$9_1) { break label$9 } - $7_1 = HEAP32[(((__wasm_ctz_i32($9_1 | 0) | 0) << 2 | 0) + 119076 | 0) >> 2] | 0; + $7_1 = HEAP32[(((__wasm_ctz_i32($9_1 | 0) | 0) << 2 | 0) + 119236 | 0) >> 2] | 0; $4_1 = ((HEAP32[($7_1 + 4 | 0) >> 2] | 0) & -8 | 0) - $3_1 | 0; $5_1 = $7_1; label$20 : { @@ -87758,7 +88008,7 @@ function asmFunc(imports) { break label$23 } $0_1 = HEAP32[($7_1 + 8 | 0) >> 2] | 0; - HEAP32[(0 + 118788 | 0) >> 2] | 0; + HEAP32[(0 + 118948 | 0) >> 2] | 0; HEAP32[($0_1 + 12 | 0) >> 2] = $8_1; HEAP32[($8_1 + 8 | 0) >> 2] = $0_1; break label$2; @@ -87799,7 +88049,7 @@ function asmFunc(imports) { } $0_1 = $0_1 + 11 | 0; $3_1 = $0_1 & -8 | 0; - $6_1 = HEAP32[(0 + 118776 | 0) >> 2] | 0; + $6_1 = HEAP32[(0 + 118936 | 0) >> 2] | 0; if (!$6_1) { break label$9 } @@ -87820,7 +88070,7 @@ function asmFunc(imports) { label$28 : { label$29 : { label$30 : { - $5_1 = HEAP32[(($11_1 << 2 | 0) + 119076 | 0) >> 2] | 0; + $5_1 = HEAP32[(($11_1 << 2 | 0) + 119236 | 0) >> 2] | 0; if ($5_1) { break label$30 } @@ -87867,7 +88117,7 @@ function asmFunc(imports) { if (!$0_1) { break label$9 } - $0_1 = HEAP32[(((__wasm_ctz_i32($0_1 | 0) | 0) << 2 | 0) + 119076 | 0) >> 2] | 0; + $0_1 = HEAP32[(((__wasm_ctz_i32($0_1 | 0) | 0) << 2 | 0) + 119236 | 0) >> 2] | 0; } if (!$0_1) { break label$27 @@ -87895,7 +88145,7 @@ function asmFunc(imports) { if (!$8_1) { break label$9 } - if ($4_1 >>> 0 >= ((HEAP32[(0 + 118780 | 0) >> 2] | 0) - $3_1 | 0) >>> 0) { + if ($4_1 >>> 0 >= ((HEAP32[(0 + 118940 | 0) >> 2] | 0) - $3_1 | 0) >>> 0) { break label$9 } $11_1 = HEAP32[($8_1 + 24 | 0) >> 2] | 0; @@ -87905,7 +88155,7 @@ function asmFunc(imports) { break label$36 } $0_1 = HEAP32[($8_1 + 8 | 0) >> 2] | 0; - HEAP32[(0 + 118788 | 0) >> 2] | 0; + HEAP32[(0 + 118948 | 0) >> 2] | 0; HEAP32[($0_1 + 12 | 0) >> 2] = $7_1; HEAP32[($7_1 + 8 | 0) >> 2] = $0_1; break label$3; @@ -87941,11 +88191,11 @@ function asmFunc(imports) { break label$3; } label$39 : { - $0_1 = HEAP32[(0 + 118780 | 0) >> 2] | 0; + $0_1 = HEAP32[(0 + 118940 | 0) >> 2] | 0; if ($0_1 >>> 0 < $3_1 >>> 0) { break label$39 } - $4_1 = HEAP32[(0 + 118792 | 0) >> 2] | 0; + $4_1 = HEAP32[(0 + 118952 | 0) >> 2] | 0; label$40 : { label$41 : { $5_1 = $0_1 - $3_1 | 0; @@ -87964,21 +88214,21 @@ function asmFunc(imports) { $7_1 = 0; $5_1 = 0; } - HEAP32[(0 + 118780 | 0) >> 2] = $5_1; - HEAP32[(0 + 118792 | 0) >> 2] = $7_1; + HEAP32[(0 + 118940 | 0) >> 2] = $5_1; + HEAP32[(0 + 118952 | 0) >> 2] = $7_1; $0_1 = $4_1 + 8 | 0; break label$1; } label$42 : { - $7_1 = HEAP32[(0 + 118784 | 0) >> 2] | 0; + $7_1 = HEAP32[(0 + 118944 | 0) >> 2] | 0; if ($7_1 >>> 0 <= $3_1 >>> 0) { break label$42 } $4_1 = $7_1 - $3_1 | 0; - HEAP32[(0 + 118784 | 0) >> 2] = $4_1; - $0_1 = HEAP32[(0 + 118796 | 0) >> 2] | 0; + HEAP32[(0 + 118944 | 0) >> 2] = $4_1; + $0_1 = HEAP32[(0 + 118956 | 0) >> 2] | 0; $5_1 = $0_1 + $3_1 | 0; - HEAP32[(0 + 118796 | 0) >> 2] = $5_1; + HEAP32[(0 + 118956 | 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; @@ -87986,23 +88236,23 @@ function asmFunc(imports) { } label$43 : { label$44 : { - if (!(HEAP32[(0 + 119244 | 0) >> 2] | 0)) { + if (!(HEAP32[(0 + 119404 | 0) >> 2] | 0)) { break label$44 } - $4_1 = HEAP32[(0 + 119252 | 0) >> 2] | 0; + $4_1 = HEAP32[(0 + 119412 | 0) >> 2] | 0; break label$43; } i64toi32_i32$1 = 0; i64toi32_i32$0 = -1; - HEAP32[(i64toi32_i32$1 + 119256 | 0) >> 2] = -1; - HEAP32[(i64toi32_i32$1 + 119260 | 0) >> 2] = i64toi32_i32$0; + HEAP32[(i64toi32_i32$1 + 119416 | 0) >> 2] = -1; + HEAP32[(i64toi32_i32$1 + 119420 | 0) >> 2] = i64toi32_i32$0; i64toi32_i32$1 = 0; i64toi32_i32$0 = 4096; - HEAP32[(i64toi32_i32$1 + 119248 | 0) >> 2] = 4096; - HEAP32[(i64toi32_i32$1 + 119252 | 0) >> 2] = i64toi32_i32$0; - HEAP32[(0 + 119244 | 0) >> 2] = (($1_1 + 12 | 0) & -16 | 0) ^ 1431655768 | 0; - HEAP32[(0 + 119264 | 0) >> 2] = 0; - HEAP32[(0 + 119216 | 0) >> 2] = 0; + HEAP32[(i64toi32_i32$1 + 119408 | 0) >> 2] = 4096; + HEAP32[(i64toi32_i32$1 + 119412 | 0) >> 2] = i64toi32_i32$0; + HEAP32[(0 + 119404 | 0) >> 2] = (($1_1 + 12 | 0) & -16 | 0) ^ 1431655768 | 0; + HEAP32[(0 + 119424 | 0) >> 2] = 0; + HEAP32[(0 + 119376 | 0) >> 2] = 0; $4_1 = 4096; } $0_1 = 0; @@ -88015,11 +88265,11 @@ function asmFunc(imports) { } $0_1 = 0; label$45 : { - $4_1 = HEAP32[(0 + 119212 | 0) >> 2] | 0; + $4_1 = HEAP32[(0 + 119372 | 0) >> 2] | 0; if (!$4_1) { break label$45 } - $5_1 = HEAP32[(0 + 119204 | 0) >> 2] | 0; + $5_1 = HEAP32[(0 + 119364 | 0) >> 2] | 0; $10_1 = $5_1 + $8_1 | 0; if ($10_1 >>> 0 <= $5_1 >>> 0) { break label$1 @@ -88030,7 +88280,7 @@ function asmFunc(imports) { } label$46 : { label$47 : { - if ((HEAPU8[(0 + 119216 | 0) >> 0] | 0) & 4 | 0) { + if ((HEAPU8[(0 + 119376 | 0) >> 0] | 0) & 4 | 0) { break label$47 } label$48 : { @@ -88038,11 +88288,11 @@ function asmFunc(imports) { label$50 : { label$51 : { label$52 : { - $4_1 = HEAP32[(0 + 118796 | 0) >> 2] | 0; + $4_1 = HEAP32[(0 + 118956 | 0) >> 2] | 0; if (!$4_1) { break label$52 } - $0_1 = 119220; + $0_1 = 119380; label$53 : while (1) { label$54 : { $5_1 = HEAP32[$0_1 >> 2] | 0; @@ -88066,7 +88316,7 @@ function asmFunc(imports) { } $2_1 = $8_1; label$55 : { - $0_1 = HEAP32[(0 + 119248 | 0) >> 2] | 0; + $0_1 = HEAP32[(0 + 119408 | 0) >> 2] | 0; $4_1 = $0_1 + -1 | 0; if (!($4_1 & $7_1 | 0)) { break label$55 @@ -88077,11 +88327,11 @@ function asmFunc(imports) { break label$48 } label$56 : { - $0_1 = HEAP32[(0 + 119212 | 0) >> 2] | 0; + $0_1 = HEAP32[(0 + 119372 | 0) >> 2] | 0; if (!$0_1) { break label$56 } - $4_1 = HEAP32[(0 + 119204 | 0) >> 2] | 0; + $4_1 = HEAP32[(0 + 119364 | 0) >> 2] | 0; $5_1 = $4_1 + $2_1 | 0; if ($5_1 >>> 0 <= $4_1 >>> 0) { break label$48 @@ -88113,7 +88363,7 @@ function asmFunc(imports) { $7_1 = $0_1; break label$46; } - $4_1 = HEAP32[(0 + 119252 | 0) >> 2] | 0; + $4_1 = HEAP32[(0 + 119412 | 0) >> 2] | 0; $4_1 = (($6_1 - $2_1 | 0) + $4_1 | 0) & (0 - $4_1 | 0) | 0; if (($985($4_1 | 0) | 0 | 0) == (-1 | 0)) { break label$48 @@ -88126,7 +88376,7 @@ function asmFunc(imports) { break label$46 } } - HEAP32[(0 + 119216 | 0) >> 2] = HEAP32[(0 + 119216 | 0) >> 2] | 0 | 4 | 0; + HEAP32[(0 + 119376 | 0) >> 2] = HEAP32[(0 + 119376 | 0) >> 2] | 0 | 4 | 0; } $7_1 = $985($8_1 | 0) | 0; $0_1 = $985(0 | 0) | 0; @@ -88144,21 +88394,21 @@ function asmFunc(imports) { break label$4 } } - $0_1 = (HEAP32[(0 + 119204 | 0) >> 2] | 0) + $2_1 | 0; - HEAP32[(0 + 119204 | 0) >> 2] = $0_1; + $0_1 = (HEAP32[(0 + 119364 | 0) >> 2] | 0) + $2_1 | 0; + HEAP32[(0 + 119364 | 0) >> 2] = $0_1; label$58 : { - if ($0_1 >>> 0 <= (HEAP32[(0 + 119208 | 0) >> 2] | 0) >>> 0) { + if ($0_1 >>> 0 <= (HEAP32[(0 + 119368 | 0) >> 2] | 0) >>> 0) { break label$58 } - HEAP32[(0 + 119208 | 0) >> 2] = $0_1; + HEAP32[(0 + 119368 | 0) >> 2] = $0_1; } label$59 : { label$60 : { - $4_1 = HEAP32[(0 + 118796 | 0) >> 2] | 0; + $4_1 = HEAP32[(0 + 118956 | 0) >> 2] | 0; if (!$4_1) { break label$60 } - $0_1 = 119220; + $0_1 = 119380; label$61 : while (1) { $5_1 = HEAP32[$0_1 >> 2] | 0; $8_1 = HEAP32[($0_1 + 4 | 0) >> 2] | 0; @@ -88174,7 +88424,7 @@ function asmFunc(imports) { } label$62 : { label$63 : { - $0_1 = HEAP32[(0 + 118788 | 0) >> 2] | 0; + $0_1 = HEAP32[(0 + 118948 | 0) >> 2] | 0; if (!$0_1) { break label$63 } @@ -88182,19 +88432,19 @@ function asmFunc(imports) { break label$62 } } - HEAP32[(0 + 118788 | 0) >> 2] = $7_1; + HEAP32[(0 + 118948 | 0) >> 2] = $7_1; } $0_1 = 0; - HEAP32[(0 + 119224 | 0) >> 2] = $2_1; - HEAP32[(0 + 119220 | 0) >> 2] = $7_1; - HEAP32[(0 + 118804 | 0) >> 2] = -1; - HEAP32[(0 + 118808 | 0) >> 2] = HEAP32[(0 + 119244 | 0) >> 2] | 0; - HEAP32[(0 + 119232 | 0) >> 2] = 0; + HEAP32[(0 + 119384 | 0) >> 2] = $2_1; + HEAP32[(0 + 119380 | 0) >> 2] = $7_1; + HEAP32[(0 + 118964 | 0) >> 2] = -1; + HEAP32[(0 + 118968 | 0) >> 2] = HEAP32[(0 + 119404 | 0) >> 2] | 0; + HEAP32[(0 + 119392 | 0) >> 2] = 0; label$64 : while (1) { $4_1 = $0_1 << 3 | 0; - $5_1 = $4_1 + 118812 | 0; - HEAP32[($4_1 + 118820 | 0) >> 2] = $5_1; - HEAP32[($4_1 + 118824 | 0) >> 2] = $5_1; + $5_1 = $4_1 + 118972 | 0; + HEAP32[($4_1 + 118980 | 0) >> 2] = $5_1; + HEAP32[($4_1 + 118984 | 0) >> 2] = $5_1; $0_1 = $0_1 + 1 | 0; if (($0_1 | 0) != (32 | 0)) { continue label$64 @@ -88204,12 +88454,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 + 118784 | 0) >> 2] = $5_1; + HEAP32[(0 + 118944 | 0) >> 2] = $5_1; $4_1 = $7_1 + $4_1 | 0; - HEAP32[(0 + 118796 | 0) >> 2] = $4_1; + HEAP32[(0 + 118956 | 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 + 118800 | 0) >> 2] = HEAP32[(0 + 119260 | 0) >> 2] | 0; + HEAP32[(0 + 118960 | 0) >> 2] = HEAP32[(0 + 119420 | 0) >> 2] | 0; break label$5; } if ($4_1 >>> 0 >= $7_1 >>> 0) { @@ -88224,13 +88474,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 + 118796 | 0) >> 2] = $5_1; - $7_1 = (HEAP32[(0 + 118784 | 0) >> 2] | 0) + $2_1 | 0; + HEAP32[(0 + 118956 | 0) >> 2] = $5_1; + $7_1 = (HEAP32[(0 + 118944 | 0) >> 2] | 0) + $2_1 | 0; $0_1 = $7_1 - $0_1 | 0; - HEAP32[(0 + 118784 | 0) >> 2] = $0_1; + HEAP32[(0 + 118944 | 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 + 118800 | 0) >> 2] = HEAP32[(0 + 119260 | 0) >> 2] | 0; + HEAP32[(0 + 118960 | 0) >> 2] = HEAP32[(0 + 119420 | 0) >> 2] | 0; break label$5; } $8_1 = 0; @@ -88240,13 +88490,13 @@ function asmFunc(imports) { break label$3; } label$65 : { - if ($7_1 >>> 0 >= (HEAP32[(0 + 118788 | 0) >> 2] | 0) >>> 0) { + if ($7_1 >>> 0 >= (HEAP32[(0 + 118948 | 0) >> 2] | 0) >>> 0) { break label$65 } - HEAP32[(0 + 118788 | 0) >> 2] = $7_1; + HEAP32[(0 + 118948 | 0) >> 2] = $7_1; } $5_1 = $7_1 + $2_1 | 0; - $0_1 = 119220; + $0_1 = 119380; label$66 : { label$67 : { label$68 : { @@ -88266,7 +88516,7 @@ function asmFunc(imports) { break label$67 } } - $0_1 = 119220; + $0_1 = 119380; label$71 : { label$72 : while (1) { label$73 : { @@ -88286,33 +88536,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 + 118784 | 0) >> 2] = $11_1; + HEAP32[(0 + 118944 | 0) >> 2] = $11_1; $8_1 = $7_1 + $8_1 | 0; - HEAP32[(0 + 118796 | 0) >> 2] = $8_1; + HEAP32[(0 + 118956 | 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 + 118800 | 0) >> 2] = HEAP32[(0 + 119260 | 0) >> 2] | 0; + HEAP32[(0 + 118960 | 0) >> 2] = HEAP32[(0 + 119420 | 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 + 119228 | 0) >> 2] | 0; - i64toi32_i32$1 = HEAP32[(i64toi32_i32$2 + 119232 | 0) >> 2] | 0; + i64toi32_i32$0 = HEAP32[(i64toi32_i32$2 + 119388 | 0) >> 2] | 0; + i64toi32_i32$1 = HEAP32[(i64toi32_i32$2 + 119392 | 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 + 119220 | 0) >> 2] | 0; - i64toi32_i32$0 = HEAP32[(i64toi32_i32$2 + 119224 | 0) >> 2] | 0; + i64toi32_i32$1 = HEAP32[(i64toi32_i32$2 + 119380 | 0) >> 2] | 0; + i64toi32_i32$0 = HEAP32[(i64toi32_i32$2 + 119384 | 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 + 119228 | 0) >> 2] = $8_1 + 8 | 0; - HEAP32[(0 + 119224 | 0) >> 2] = $2_1; - HEAP32[(0 + 119220 | 0) >> 2] = $7_1; - HEAP32[(0 + 119232 | 0) >> 2] = 0; + HEAP32[(0 + 119388 | 0) >> 2] = $8_1 + 8 | 0; + HEAP32[(0 + 119384 | 0) >> 2] = $2_1; + HEAP32[(0 + 119380 | 0) >> 2] = $7_1; + HEAP32[(0 + 119392 | 0) >> 2] = 0; $0_1 = $8_1 + 24 | 0; label$74 : while (1) { HEAP32[($0_1 + 4 | 0) >> 2] = 7; @@ -88334,15 +88584,15 @@ function asmFunc(imports) { if ($7_1 >>> 0 > 255 >>> 0) { break label$75 } - $0_1 = ($7_1 & -8 | 0) + 118812 | 0; + $0_1 = ($7_1 & -8 | 0) + 118972 | 0; label$76 : { label$77 : { - $5_1 = HEAP32[(0 + 118772 | 0) >> 2] | 0; + $5_1 = HEAP32[(0 + 118932 | 0) >> 2] | 0; $7_1 = 1 << ($7_1 >>> 3 | 0) | 0; if ($5_1 & $7_1 | 0) { break label$77 } - HEAP32[(0 + 118772 | 0) >> 2] = $5_1 | $7_1 | 0; + HEAP32[(0 + 118932 | 0) >> 2] = $5_1 | $7_1 | 0; $5_1 = $0_1; break label$76; } @@ -88367,15 +88617,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) + 119076 | 0; + $5_1 = ($0_1 << 2 | 0) + 119236 | 0; label$79 : { label$80 : { - $8_1 = HEAP32[(0 + 118776 | 0) >> 2] | 0; + $8_1 = HEAP32[(0 + 118936 | 0) >> 2] | 0; $2_1 = 1 << $0_1 | 0; if ($8_1 & $2_1 | 0) { break label$80 } - HEAP32[(0 + 118776 | 0) >> 2] = $8_1 | $2_1 | 0; + HEAP32[(0 + 118936 | 0) >> 2] = $8_1 | $2_1 | 0; HEAP32[$5_1 >> 2] = $4_1; HEAP32[($4_1 + 24 | 0) >> 2] = $5_1; break label$79; @@ -88415,15 +88665,15 @@ function asmFunc(imports) { HEAP32[($4_1 + 12 | 0) >> 2] = $5_1; HEAP32[($4_1 + 8 | 0) >> 2] = $0_1; } - $0_1 = HEAP32[(0 + 118784 | 0) >> 2] | 0; + $0_1 = HEAP32[(0 + 118944 | 0) >> 2] | 0; if ($0_1 >>> 0 <= $3_1 >>> 0) { break label$4 } $4_1 = $0_1 - $3_1 | 0; - HEAP32[(0 + 118784 | 0) >> 2] = $4_1; - $0_1 = HEAP32[(0 + 118796 | 0) >> 2] | 0; + HEAP32[(0 + 118944 | 0) >> 2] = $4_1; + $0_1 = HEAP32[(0 + 118956 | 0) >> 2] | 0; $5_1 = $0_1 + $3_1 | 0; - HEAP32[(0 + 118796 | 0) >> 2] = $5_1; + HEAP32[(0 + 118956 | 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; @@ -88440,7 +88690,7 @@ function asmFunc(imports) { label$83 : { label$84 : { $5_1 = HEAP32[($8_1 + 28 | 0) >> 2] | 0; - $0_1 = ($5_1 << 2 | 0) + 119076 | 0; + $0_1 = ($5_1 << 2 | 0) + 119236 | 0; if (($8_1 | 0) != (HEAP32[$0_1 >> 2] | 0 | 0)) { break label$84 } @@ -88449,7 +88699,7 @@ function asmFunc(imports) { break label$83 } $6_1 = $6_1 & (__wasm_rotl_i32(-2 | 0, $5_1 | 0) | 0) | 0; - HEAP32[(0 + 118776 | 0) >> 2] = $6_1; + HEAP32[(0 + 118936 | 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; @@ -88492,15 +88742,15 @@ function asmFunc(imports) { if ($4_1 >>> 0 > 255 >>> 0) { break label$88 } - $0_1 = ($4_1 & -8 | 0) + 118812 | 0; + $0_1 = ($4_1 & -8 | 0) + 118972 | 0; label$89 : { label$90 : { - $5_1 = HEAP32[(0 + 118772 | 0) >> 2] | 0; + $5_1 = HEAP32[(0 + 118932 | 0) >> 2] | 0; $4_1 = 1 << ($4_1 >>> 3 | 0) | 0; if ($5_1 & $4_1 | 0) { break label$90 } - HEAP32[(0 + 118772 | 0) >> 2] = $5_1 | $4_1 | 0; + HEAP32[(0 + 118932 | 0) >> 2] = $5_1 | $4_1 | 0; $4_1 = $0_1; break label$89; } @@ -88525,7 +88775,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) + 119076 | 0; + $5_1 = ($0_1 << 2 | 0) + 119236 | 0; label$92 : { label$93 : { label$94 : { @@ -88533,7 +88783,7 @@ function asmFunc(imports) { if ($6_1 & $3_1 | 0) { break label$94 } - HEAP32[(0 + 118776 | 0) >> 2] = $6_1 | $3_1 | 0; + HEAP32[(0 + 118936 | 0) >> 2] = $6_1 | $3_1 | 0; HEAP32[$5_1 >> 2] = $7_1; HEAP32[($7_1 + 24 | 0) >> 2] = $5_1; break label$93; @@ -88578,7 +88828,7 @@ function asmFunc(imports) { label$97 : { label$98 : { $5_1 = HEAP32[($7_1 + 28 | 0) >> 2] | 0; - $0_1 = ($5_1 << 2 | 0) + 119076 | 0; + $0_1 = ($5_1 << 2 | 0) + 119236 | 0; if (($7_1 | 0) != (HEAP32[$0_1 >> 2] | 0 | 0)) { break label$98 } @@ -88586,7 +88836,7 @@ function asmFunc(imports) { if ($8_1) { break label$97 } - HEAP32[(0 + 118776 | 0) >> 2] = $9_1 & (__wasm_rotl_i32(-2 | 0, $5_1 | 0) | 0) | 0; + HEAP32[(0 + 118936 | 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; @@ -88629,15 +88879,15 @@ function asmFunc(imports) { if (!$6_1) { break label$102 } - $3_1 = ($6_1 & -8 | 0) + 118812 | 0; - $0_1 = HEAP32[(0 + 118792 | 0) >> 2] | 0; + $3_1 = ($6_1 & -8 | 0) + 118972 | 0; + $0_1 = HEAP32[(0 + 118952 | 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 + 118772 | 0) >> 2] = $8_1 | $2_1 | 0; + HEAP32[(0 + 118932 | 0) >> 2] = $8_1 | $2_1 | 0; $8_1 = $3_1; break label$103; } @@ -88648,8 +88898,8 @@ function asmFunc(imports) { HEAP32[($0_1 + 12 | 0) >> 2] = $3_1; HEAP32[($0_1 + 8 | 0) >> 2] = $8_1; } - HEAP32[(0 + 118792 | 0) >> 2] = $5_1; - HEAP32[(0 + 118780 | 0) >> 2] = $4_1; + HEAP32[(0 + 118952 | 0) >> 2] = $5_1; + HEAP32[(0 + 118940 | 0) >> 2] = $4_1; } $0_1 = $7_1 + 8 | 0; } @@ -88669,22 +88919,22 @@ function asmFunc(imports) { $2_1 = $4_1 - $5_1 | 0; label$1 : { label$2 : { - if (($4_1 | 0) != (HEAP32[(0 + 118796 | 0) >> 2] | 0 | 0)) { + if (($4_1 | 0) != (HEAP32[(0 + 118956 | 0) >> 2] | 0 | 0)) { break label$2 } - HEAP32[(0 + 118796 | 0) >> 2] = $5_1; - $2_1 = (HEAP32[(0 + 118784 | 0) >> 2] | 0) + $2_1 | 0; - HEAP32[(0 + 118784 | 0) >> 2] = $2_1; + HEAP32[(0 + 118956 | 0) >> 2] = $5_1; + $2_1 = (HEAP32[(0 + 118944 | 0) >> 2] | 0) + $2_1 | 0; + HEAP32[(0 + 118944 | 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 + 118792 | 0) >> 2] | 0 | 0)) { + if (($4_1 | 0) != (HEAP32[(0 + 118952 | 0) >> 2] | 0 | 0)) { break label$3 } - HEAP32[(0 + 118792 | 0) >> 2] = $5_1; - $2_1 = (HEAP32[(0 + 118780 | 0) >> 2] | 0) + $2_1 | 0; - HEAP32[(0 + 118780 | 0) >> 2] = $2_1; + HEAP32[(0 + 118952 | 0) >> 2] = $5_1; + $2_1 = (HEAP32[(0 + 118940 | 0) >> 2] | 0) + $2_1 | 0; + HEAP32[(0 + 118940 | 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; @@ -88702,13 +88952,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) + 118812 | 0; + $8_1 = ($7_1 << 3 | 0) + 118972 | 0; label$7 : { $0_1 = HEAP32[($4_1 + 12 | 0) >> 2] | 0; if (($0_1 | 0) != ($1_1 | 0)) { break label$7 } - HEAP32[(0 + 118772 | 0) >> 2] = (HEAP32[(0 + 118772 | 0) >> 2] | 0) & (__wasm_rotl_i32(-2 | 0, $7_1 | 0) | 0) | 0; + HEAP32[(0 + 118932 | 0) >> 2] = (HEAP32[(0 + 118932 | 0) >> 2] | 0) & (__wasm_rotl_i32(-2 | 0, $7_1 | 0) | 0) | 0; break label$5; } HEAP32[($1_1 + 12 | 0) >> 2] = $0_1; @@ -88723,7 +88973,7 @@ function asmFunc(imports) { break label$9 } $0_1 = HEAP32[($4_1 + 8 | 0) >> 2] | 0; - HEAP32[(0 + 118788 | 0) >> 2] | 0; + HEAP32[(0 + 118948 | 0) >> 2] | 0; HEAP32[($0_1 + 12 | 0) >> 2] = $8_1; HEAP32[($8_1 + 8 | 0) >> 2] = $0_1; break label$8; @@ -88767,7 +89017,7 @@ function asmFunc(imports) { label$13 : { label$14 : { $1_1 = HEAP32[($4_1 + 28 | 0) >> 2] | 0; - $0_1 = ($1_1 << 2 | 0) + 119076 | 0; + $0_1 = ($1_1 << 2 | 0) + 119236 | 0; if (($4_1 | 0) != (HEAP32[$0_1 >> 2] | 0 | 0)) { break label$14 } @@ -88775,7 +89025,7 @@ function asmFunc(imports) { if ($8_1) { break label$13 } - HEAP32[(0 + 118776 | 0) >> 2] = (HEAP32[(0 + 118776 | 0) >> 2] | 0) & (__wasm_rotl_i32(-2 | 0, $1_1 | 0) | 0) | 0; + HEAP32[(0 + 118936 | 0) >> 2] = (HEAP32[(0 + 118936 | 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; @@ -88810,15 +89060,15 @@ function asmFunc(imports) { if ($2_1 >>> 0 > 255 >>> 0) { break label$16 } - $0_1 = ($2_1 & -8 | 0) + 118812 | 0; + $0_1 = ($2_1 & -8 | 0) + 118972 | 0; label$17 : { label$18 : { - $1_1 = HEAP32[(0 + 118772 | 0) >> 2] | 0; + $1_1 = HEAP32[(0 + 118932 | 0) >> 2] | 0; $2_1 = 1 << ($2_1 >>> 3 | 0) | 0; if ($1_1 & $2_1 | 0) { break label$18 } - HEAP32[(0 + 118772 | 0) >> 2] = $1_1 | $2_1 | 0; + HEAP32[(0 + 118932 | 0) >> 2] = $1_1 | $2_1 | 0; $2_1 = $0_1; break label$17; } @@ -88841,16 +89091,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) + 119076 | 0; + $1_1 = ($0_1 << 2 | 0) + 119236 | 0; label$20 : { label$21 : { label$22 : { - $8_1 = HEAP32[(0 + 118776 | 0) >> 2] | 0; + $8_1 = HEAP32[(0 + 118936 | 0) >> 2] | 0; $4_1 = 1 << $0_1 | 0; if ($8_1 & $4_1 | 0) { break label$22 } - HEAP32[(0 + 118776 | 0) >> 2] = $8_1 | $4_1 | 0; + HEAP32[(0 + 118936 | 0) >> 2] = $8_1 | $4_1 | 0; HEAP32[$1_1 >> 2] = $5_1; HEAP32[($5_1 + 24 | 0) >> 2] = $1_1; break label$21; @@ -88908,7 +89158,7 @@ function asmFunc(imports) { } $2_1 = HEAP32[$1_1 >> 2] | 0; $1_1 = $1_1 - $2_1 | 0; - $4_1 = HEAP32[(0 + 118788 | 0) >> 2] | 0; + $4_1 = HEAP32[(0 + 118948 | 0) >> 2] | 0; if ($1_1 >>> 0 < $4_1 >>> 0) { break label$1 } @@ -88916,7 +89166,7 @@ function asmFunc(imports) { label$3 : { label$4 : { label$5 : { - if (($1_1 | 0) == (HEAP32[(0 + 118792 | 0) >> 2] | 0 | 0)) { + if (($1_1 | 0) == (HEAP32[(0 + 118952 | 0) >> 2] | 0 | 0)) { break label$5 } label$6 : { @@ -88925,13 +89175,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) + 118812 | 0; + $6_1 = ($5_1 << 3 | 0) + 118972 | 0; label$7 : { $2_1 = HEAP32[($1_1 + 12 | 0) >> 2] | 0; if (($2_1 | 0) != ($4_1 | 0)) { break label$7 } - HEAP32[(0 + 118772 | 0) >> 2] = (HEAP32[(0 + 118772 | 0) >> 2] | 0) & (__wasm_rotl_i32(-2 | 0, $5_1 | 0) | 0) | 0; + HEAP32[(0 + 118932 | 0) >> 2] = (HEAP32[(0 + 118932 | 0) >> 2] | 0) & (__wasm_rotl_i32(-2 | 0, $5_1 | 0) | 0) | 0; break label$2; } HEAP32[($4_1 + 12 | 0) >> 2] = $2_1; @@ -88983,7 +89233,7 @@ function asmFunc(imports) { if (($2_1 & 3 | 0 | 0) != (3 | 0)) { break label$2 } - HEAP32[(0 + 118780 | 0) >> 2] = $0_1; + HEAP32[(0 + 118940 | 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; @@ -88997,7 +89247,7 @@ function asmFunc(imports) { label$11 : { label$12 : { $4_1 = HEAP32[($1_1 + 28 | 0) >> 2] | 0; - $2_1 = ($4_1 << 2 | 0) + 119076 | 0; + $2_1 = ($4_1 << 2 | 0) + 119236 | 0; if (($1_1 | 0) != (HEAP32[$2_1 >> 2] | 0 | 0)) { break label$12 } @@ -89005,7 +89255,7 @@ function asmFunc(imports) { if ($6_1) { break label$11 } - HEAP32[(0 + 118776 | 0) >> 2] = (HEAP32[(0 + 118776 | 0) >> 2] | 0) & (__wasm_rotl_i32(-2 | 0, $4_1 | 0) | 0) | 0; + HEAP32[(0 + 118936 | 0) >> 2] = (HEAP32[(0 + 118936 | 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; @@ -89045,27 +89295,27 @@ function asmFunc(imports) { break label$18 } label$19 : { - if (($3_1 | 0) != (HEAP32[(0 + 118796 | 0) >> 2] | 0 | 0)) { + if (($3_1 | 0) != (HEAP32[(0 + 118956 | 0) >> 2] | 0 | 0)) { break label$19 } - HEAP32[(0 + 118796 | 0) >> 2] = $1_1; - $0_1 = (HEAP32[(0 + 118784 | 0) >> 2] | 0) + $0_1 | 0; - HEAP32[(0 + 118784 | 0) >> 2] = $0_1; + HEAP32[(0 + 118956 | 0) >> 2] = $1_1; + $0_1 = (HEAP32[(0 + 118944 | 0) >> 2] | 0) + $0_1 | 0; + HEAP32[(0 + 118944 | 0) >> 2] = $0_1; HEAP32[($1_1 + 4 | 0) >> 2] = $0_1 | 1 | 0; - if (($1_1 | 0) != (HEAP32[(0 + 118792 | 0) >> 2] | 0 | 0)) { + if (($1_1 | 0) != (HEAP32[(0 + 118952 | 0) >> 2] | 0 | 0)) { break label$1 } - HEAP32[(0 + 118780 | 0) >> 2] = 0; - HEAP32[(0 + 118792 | 0) >> 2] = 0; + HEAP32[(0 + 118940 | 0) >> 2] = 0; + HEAP32[(0 + 118952 | 0) >> 2] = 0; return; } label$20 : { - if (($3_1 | 0) != (HEAP32[(0 + 118792 | 0) >> 2] | 0 | 0)) { + if (($3_1 | 0) != (HEAP32[(0 + 118952 | 0) >> 2] | 0 | 0)) { break label$20 } - HEAP32[(0 + 118792 | 0) >> 2] = $1_1; - $0_1 = (HEAP32[(0 + 118780 | 0) >> 2] | 0) + $0_1 | 0; - HEAP32[(0 + 118780 | 0) >> 2] = $0_1; + HEAP32[(0 + 118952 | 0) >> 2] = $1_1; + $0_1 = (HEAP32[(0 + 118940 | 0) >> 2] | 0) + $0_1 | 0; + HEAP32[(0 + 118940 | 0) >> 2] = $0_1; HEAP32[($1_1 + 4 | 0) >> 2] = $0_1 | 1 | 0; HEAP32[($1_1 + $0_1 | 0) >> 2] = $0_1; return; @@ -89077,13 +89327,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) + 118812 | 0; + $6_1 = ($5_1 << 3 | 0) + 118972 | 0; label$22 : { $2_1 = HEAP32[($3_1 + 12 | 0) >> 2] | 0; if (($2_1 | 0) != ($4_1 | 0)) { break label$22 } - HEAP32[(0 + 118772 | 0) >> 2] = (HEAP32[(0 + 118772 | 0) >> 2] | 0) & (__wasm_rotl_i32(-2 | 0, $5_1 | 0) | 0) | 0; + HEAP32[(0 + 118932 | 0) >> 2] = (HEAP32[(0 + 118932 | 0) >> 2] | 0) & (__wasm_rotl_i32(-2 | 0, $5_1 | 0) | 0) | 0; break label$15; } HEAP32[($4_1 + 12 | 0) >> 2] = $2_1; @@ -89097,7 +89347,7 @@ function asmFunc(imports) { break label$23 } $2_1 = HEAP32[($3_1 + 8 | 0) >> 2] | 0; - HEAP32[(0 + 118788 | 0) >> 2] | 0; + HEAP32[(0 + 118948 | 0) >> 2] | 0; HEAP32[($2_1 + 12 | 0) >> 2] = $6_1; HEAP32[($6_1 + 8 | 0) >> 2] = $2_1; break label$16; @@ -89145,7 +89395,7 @@ function asmFunc(imports) { label$26 : { label$27 : { $4_1 = HEAP32[($3_1 + 28 | 0) >> 2] | 0; - $2_1 = ($4_1 << 2 | 0) + 119076 | 0; + $2_1 = ($4_1 << 2 | 0) + 119236 | 0; if (($3_1 | 0) != (HEAP32[$2_1 >> 2] | 0 | 0)) { break label$27 } @@ -89153,7 +89403,7 @@ function asmFunc(imports) { if ($6_1) { break label$26 } - HEAP32[(0 + 118776 | 0) >> 2] = (HEAP32[(0 + 118776 | 0) >> 2] | 0) & (__wasm_rotl_i32(-2 | 0, $4_1 | 0) | 0) | 0; + HEAP32[(0 + 118936 | 0) >> 2] = (HEAP32[(0 + 118936 | 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; @@ -89179,25 +89429,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 + 118792 | 0) >> 2] | 0 | 0)) { + if (($1_1 | 0) != (HEAP32[(0 + 118952 | 0) >> 2] | 0 | 0)) { break label$14 } - HEAP32[(0 + 118780 | 0) >> 2] = $0_1; + HEAP32[(0 + 118940 | 0) >> 2] = $0_1; return; } label$29 : { if ($0_1 >>> 0 > 255 >>> 0) { break label$29 } - $2_1 = ($0_1 & -8 | 0) + 118812 | 0; + $2_1 = ($0_1 & -8 | 0) + 118972 | 0; label$30 : { label$31 : { - $4_1 = HEAP32[(0 + 118772 | 0) >> 2] | 0; + $4_1 = HEAP32[(0 + 118932 | 0) >> 2] | 0; $0_1 = 1 << ($0_1 >>> 3 | 0) | 0; if ($4_1 & $0_1 | 0) { break label$31 } - HEAP32[(0 + 118772 | 0) >> 2] = $4_1 | $0_1 | 0; + HEAP32[(0 + 118932 | 0) >> 2] = $4_1 | $0_1 | 0; $0_1 = $2_1; break label$30; } @@ -89220,17 +89470,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) + 119076 | 0; + $4_1 = ($2_1 << 2 | 0) + 119236 | 0; label$33 : { label$34 : { label$35 : { label$36 : { - $6_1 = HEAP32[(0 + 118776 | 0) >> 2] | 0; + $6_1 = HEAP32[(0 + 118936 | 0) >> 2] | 0; $3_1 = 1 << $2_1 | 0; if ($6_1 & $3_1 | 0) { break label$36 } - HEAP32[(0 + 118776 | 0) >> 2] = $6_1 | $3_1 | 0; + HEAP32[(0 + 118936 | 0) >> 2] = $6_1 | $3_1 | 0; HEAP32[$4_1 >> 2] = $1_1; HEAP32[($1_1 + 24 | 0) >> 2] = $4_1; break label$35; @@ -89265,8 +89515,8 @@ function asmFunc(imports) { HEAP32[($1_1 + 12 | 0) >> 2] = $4_1; HEAP32[($1_1 + 8 | 0) >> 2] = $0_1; } - $1_1 = (HEAP32[(0 + 118804 | 0) >> 2] | 0) + -1 | 0; - HEAP32[(0 + 118804 | 0) >> 2] = $1_1 ? $1_1 : -1; + $1_1 = (HEAP32[(0 + 118964 | 0) >> 2] | 0) + -1 | 0; + HEAP32[(0 + 118964 | 0) >> 2] = $1_1 ? $1_1 : -1; } } @@ -89330,7 +89580,7 @@ function asmFunc(imports) { break label$4 } $4_1 = $0_1; - if (($3_1 - $1_1 | 0) >>> 0 <= ((HEAP32[(0 + 119252 | 0) >> 2] | 0) << 1 | 0) >>> 0) { + if (($3_1 - $1_1 | 0) >>> 0 <= ((HEAP32[(0 + 119412 | 0) >> 2] | 0) << 1 | 0) >>> 0) { break label$1 } } @@ -89355,10 +89605,10 @@ function asmFunc(imports) { } $4_1 = 0; label$7 : { - if (($5_1 | 0) != (HEAP32[(0 + 118796 | 0) >> 2] | 0 | 0)) { + if (($5_1 | 0) != (HEAP32[(0 + 118956 | 0) >> 2] | 0 | 0)) { break label$7 } - $3_1 = (HEAP32[(0 + 118784 | 0) >> 2] | 0) + $3_1 | 0; + $3_1 = (HEAP32[(0 + 118944 | 0) >> 2] | 0) + $3_1 | 0; if ($3_1 >>> 0 <= $1_1 >>> 0) { break label$1 } @@ -89366,16 +89616,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 + 118784 | 0) >> 2] = $1_1; - HEAP32[(0 + 118796 | 0) >> 2] = $2_1; + HEAP32[(0 + 118944 | 0) >> 2] = $1_1; + HEAP32[(0 + 118956 | 0) >> 2] = $2_1; break label$5; } label$8 : { - if (($5_1 | 0) != (HEAP32[(0 + 118792 | 0) >> 2] | 0 | 0)) { + if (($5_1 | 0) != (HEAP32[(0 + 118952 | 0) >> 2] | 0 | 0)) { break label$8 } $4_1 = 0; - $3_1 = (HEAP32[(0 + 118780 | 0) >> 2] | 0) + $3_1 | 0; + $3_1 = (HEAP32[(0 + 118940 | 0) >> 2] | 0) + $3_1 | 0; if ($3_1 >>> 0 < $1_1 >>> 0) { break label$1 } @@ -89399,8 +89649,8 @@ function asmFunc(imports) { $4_1 = 0; $1_1 = 0; } - HEAP32[(0 + 118792 | 0) >> 2] = $1_1; - HEAP32[(0 + 118780 | 0) >> 2] = $4_1; + HEAP32[(0 + 118952 | 0) >> 2] = $1_1; + HEAP32[(0 + 118940 | 0) >> 2] = $4_1; break label$5; } $4_1 = 0; @@ -89420,13 +89670,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) + 118812 | 0; + $6_1 = ($9_1 << 3 | 0) + 118972 | 0; label$13 : { $4_1 = HEAP32[($5_1 + 12 | 0) >> 2] | 0; if (($4_1 | 0) != ($3_1 | 0)) { break label$13 } - HEAP32[(0 + 118772 | 0) >> 2] = (HEAP32[(0 + 118772 | 0) >> 2] | 0) & (__wasm_rotl_i32(-2 | 0, $9_1 | 0) | 0) | 0; + HEAP32[(0 + 118932 | 0) >> 2] = (HEAP32[(0 + 118932 | 0) >> 2] | 0) & (__wasm_rotl_i32(-2 | 0, $9_1 | 0) | 0) | 0; break label$11; } HEAP32[($3_1 + 12 | 0) >> 2] = $4_1; @@ -89441,7 +89691,7 @@ function asmFunc(imports) { break label$15 } $3_1 = HEAP32[($5_1 + 8 | 0) >> 2] | 0; - HEAP32[(0 + 118788 | 0) >> 2] | 0; + HEAP32[(0 + 118948 | 0) >> 2] | 0; HEAP32[($3_1 + 12 | 0) >> 2] = $6_1; HEAP32[($6_1 + 8 | 0) >> 2] = $3_1; break label$14; @@ -89485,7 +89735,7 @@ function asmFunc(imports) { label$19 : { label$20 : { $4_1 = HEAP32[($5_1 + 28 | 0) >> 2] | 0; - $3_1 = ($4_1 << 2 | 0) + 119076 | 0; + $3_1 = ($4_1 << 2 | 0) + 119236 | 0; if (($5_1 | 0) != (HEAP32[$3_1 >> 2] | 0 | 0)) { break label$20 } @@ -89493,7 +89743,7 @@ function asmFunc(imports) { if ($6_1) { break label$19 } - HEAP32[(0 + 118776 | 0) >> 2] = (HEAP32[(0 + 118776 | 0) >> 2] | 0) & (__wasm_rotl_i32(-2 | 0, $4_1 | 0) | 0) | 0; + HEAP32[(0 + 118936 | 0) >> 2] = (HEAP32[(0 + 118936 | 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; @@ -89559,7 +89809,7 @@ function asmFunc(imports) { label$5 : { label$6 : { $0_1 = $0_1 - $3_1 | 0; - if (($0_1 | 0) == (HEAP32[(0 + 118792 | 0) >> 2] | 0 | 0)) { + if (($0_1 | 0) == (HEAP32[(0 + 118952 | 0) >> 2] | 0 | 0)) { break label$6 } label$7 : { @@ -89568,12 +89818,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) + 118812 | 0; + $6_1 = ($5_1 << 3 | 0) + 118972 | 0; $3_1 = HEAP32[($0_1 + 12 | 0) >> 2] | 0; if (($3_1 | 0) != ($4_1 | 0)) { break label$5 } - HEAP32[(0 + 118772 | 0) >> 2] = (HEAP32[(0 + 118772 | 0) >> 2] | 0) & (__wasm_rotl_i32(-2 | 0, $5_1 | 0) | 0) | 0; + HEAP32[(0 + 118932 | 0) >> 2] = (HEAP32[(0 + 118932 | 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; @@ -89583,7 +89833,7 @@ function asmFunc(imports) { break label$8 } $3_1 = HEAP32[($0_1 + 8 | 0) >> 2] | 0; - HEAP32[(0 + 118788 | 0) >> 2] | 0; + HEAP32[(0 + 118948 | 0) >> 2] | 0; HEAP32[($3_1 + 12 | 0) >> 2] = $6_1; HEAP32[($6_1 + 8 | 0) >> 2] = $3_1; break label$3; @@ -89622,7 +89872,7 @@ function asmFunc(imports) { if (($3_1 & 3 | 0 | 0) != (3 | 0)) { break label$2 } - HEAP32[(0 + 118780 | 0) >> 2] = $1_1; + HEAP32[(0 + 118940 | 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; @@ -89640,7 +89890,7 @@ function asmFunc(imports) { label$11 : { label$12 : { $4_1 = HEAP32[($0_1 + 28 | 0) >> 2] | 0; - $3_1 = ($4_1 << 2 | 0) + 119076 | 0; + $3_1 = ($4_1 << 2 | 0) + 119236 | 0; if (($0_1 | 0) != (HEAP32[$3_1 >> 2] | 0 | 0)) { break label$12 } @@ -89648,7 +89898,7 @@ function asmFunc(imports) { if ($6_1) { break label$11 } - HEAP32[(0 + 118776 | 0) >> 2] = (HEAP32[(0 + 118776 | 0) >> 2] | 0) & (__wasm_rotl_i32(-2 | 0, $4_1 | 0) | 0) | 0; + HEAP32[(0 + 118936 | 0) >> 2] = (HEAP32[(0 + 118936 | 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; @@ -89682,27 +89932,27 @@ function asmFunc(imports) { break label$18 } label$19 : { - if (($2_1 | 0) != (HEAP32[(0 + 118796 | 0) >> 2] | 0 | 0)) { + if (($2_1 | 0) != (HEAP32[(0 + 118956 | 0) >> 2] | 0 | 0)) { break label$19 } - HEAP32[(0 + 118796 | 0) >> 2] = $0_1; - $1_1 = (HEAP32[(0 + 118784 | 0) >> 2] | 0) + $1_1 | 0; - HEAP32[(0 + 118784 | 0) >> 2] = $1_1; + HEAP32[(0 + 118956 | 0) >> 2] = $0_1; + $1_1 = (HEAP32[(0 + 118944 | 0) >> 2] | 0) + $1_1 | 0; + HEAP32[(0 + 118944 | 0) >> 2] = $1_1; HEAP32[($0_1 + 4 | 0) >> 2] = $1_1 | 1 | 0; - if (($0_1 | 0) != (HEAP32[(0 + 118792 | 0) >> 2] | 0 | 0)) { + if (($0_1 | 0) != (HEAP32[(0 + 118952 | 0) >> 2] | 0 | 0)) { break label$1 } - HEAP32[(0 + 118780 | 0) >> 2] = 0; - HEAP32[(0 + 118792 | 0) >> 2] = 0; + HEAP32[(0 + 118940 | 0) >> 2] = 0; + HEAP32[(0 + 118952 | 0) >> 2] = 0; return; } label$20 : { - if (($2_1 | 0) != (HEAP32[(0 + 118792 | 0) >> 2] | 0 | 0)) { + if (($2_1 | 0) != (HEAP32[(0 + 118952 | 0) >> 2] | 0 | 0)) { break label$20 } - HEAP32[(0 + 118792 | 0) >> 2] = $0_1; - $1_1 = (HEAP32[(0 + 118780 | 0) >> 2] | 0) + $1_1 | 0; - HEAP32[(0 + 118780 | 0) >> 2] = $1_1; + HEAP32[(0 + 118952 | 0) >> 2] = $0_1; + $1_1 = (HEAP32[(0 + 118940 | 0) >> 2] | 0) + $1_1 | 0; + HEAP32[(0 + 118940 | 0) >> 2] = $1_1; HEAP32[($0_1 + 4 | 0) >> 2] = $1_1 | 1 | 0; HEAP32[($0_1 + $1_1 | 0) >> 2] = $1_1; return; @@ -89714,13 +89964,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) + 118812 | 0; + $6_1 = ($5_1 << 3 | 0) + 118972 | 0; label$22 : { $3_1 = HEAP32[($2_1 + 12 | 0) >> 2] | 0; if (($3_1 | 0) != ($4_1 | 0)) { break label$22 } - HEAP32[(0 + 118772 | 0) >> 2] = (HEAP32[(0 + 118772 | 0) >> 2] | 0) & (__wasm_rotl_i32(-2 | 0, $5_1 | 0) | 0) | 0; + HEAP32[(0 + 118932 | 0) >> 2] = (HEAP32[(0 + 118932 | 0) >> 2] | 0) & (__wasm_rotl_i32(-2 | 0, $5_1 | 0) | 0) | 0; break label$15; } HEAP32[($4_1 + 12 | 0) >> 2] = $3_1; @@ -89734,7 +89984,7 @@ function asmFunc(imports) { break label$23 } $3_1 = HEAP32[($2_1 + 8 | 0) >> 2] | 0; - HEAP32[(0 + 118788 | 0) >> 2] | 0; + HEAP32[(0 + 118948 | 0) >> 2] | 0; HEAP32[($3_1 + 12 | 0) >> 2] = $6_1; HEAP32[($6_1 + 8 | 0) >> 2] = $3_1; break label$16; @@ -89782,7 +90032,7 @@ function asmFunc(imports) { label$26 : { label$27 : { $4_1 = HEAP32[($2_1 + 28 | 0) >> 2] | 0; - $3_1 = ($4_1 << 2 | 0) + 119076 | 0; + $3_1 = ($4_1 << 2 | 0) + 119236 | 0; if (($2_1 | 0) != (HEAP32[$3_1 >> 2] | 0 | 0)) { break label$27 } @@ -89790,7 +90040,7 @@ function asmFunc(imports) { if ($6_1) { break label$26 } - HEAP32[(0 + 118776 | 0) >> 2] = (HEAP32[(0 + 118776 | 0) >> 2] | 0) & (__wasm_rotl_i32(-2 | 0, $4_1 | 0) | 0) | 0; + HEAP32[(0 + 118936 | 0) >> 2] = (HEAP32[(0 + 118936 | 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; @@ -89816,25 +90066,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 + 118792 | 0) >> 2] | 0 | 0)) { + if (($0_1 | 0) != (HEAP32[(0 + 118952 | 0) >> 2] | 0 | 0)) { break label$14 } - HEAP32[(0 + 118780 | 0) >> 2] = $1_1; + HEAP32[(0 + 118940 | 0) >> 2] = $1_1; return; } label$29 : { if ($1_1 >>> 0 > 255 >>> 0) { break label$29 } - $3_1 = ($1_1 & -8 | 0) + 118812 | 0; + $3_1 = ($1_1 & -8 | 0) + 118972 | 0; label$30 : { label$31 : { - $4_1 = HEAP32[(0 + 118772 | 0) >> 2] | 0; + $4_1 = HEAP32[(0 + 118932 | 0) >> 2] | 0; $1_1 = 1 << ($1_1 >>> 3 | 0) | 0; if ($4_1 & $1_1 | 0) { break label$31 } - HEAP32[(0 + 118772 | 0) >> 2] = $4_1 | $1_1 | 0; + HEAP32[(0 + 118932 | 0) >> 2] = $4_1 | $1_1 | 0; $1_1 = $3_1; break label$30; } @@ -89857,16 +90107,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) + 119076 | 0; + $4_1 = ($3_1 << 2 | 0) + 119236 | 0; label$33 : { label$34 : { label$35 : { - $6_1 = HEAP32[(0 + 118776 | 0) >> 2] | 0; + $6_1 = HEAP32[(0 + 118936 | 0) >> 2] | 0; $2_1 = 1 << $3_1 | 0; if ($6_1 & $2_1 | 0) { break label$35 } - HEAP32[(0 + 118776 | 0) >> 2] = $6_1 | $2_1 | 0; + HEAP32[(0 + 118936 | 0) >> 2] = $6_1 | $2_1 | 0; HEAP32[$4_1 >> 2] = $0_1; HEAP32[($0_1 + 24 | 0) >> 2] = $4_1; break label$34; diff --git a/src/web/manual.html b/src/web/manual.html index de1b01d..1434bf4 100644 --- a/src/web/manual.html +++ b/src/web/manual.html @@ -771,7 +771,6 @@

C99 Variadic macros

#include <stdio.h> #define debug(...) fprintf(stderr, __VA_ARGS__) -#pragma expand debug int main() { @@ -872,7 +871,6 @@

C11 type-generic expressions (_Generic)

default: cbrtl \ )(X) -#pragma expand cbrt int main(void) { @@ -1169,7 +1167,6 @@

C23 typeof / typeof_unqual

typeof(a) temp = a; a = b; b = temp; \ } while (0) -#pragma expand SWAP int main() { @@ -1533,11 +1530,6 @@

C23 __VA_OPT__

#define SDEF(sname, ...) S sname __VA_OPT__(= { __VA_ARGS__ }) #define EMP -/*maybe this could be automatic if <C23*/ -#pragma expand F -#pragma expand G -#pragma expand SDEF -#pragma expand EMP void f(int i, ...) {} @@ -1613,7 +1605,7 @@

Obsolete implicitly octal literals

-

c89 backend (all constantes are decimals)

+

https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3353.htm

Extension - defer

@@ -1766,10 +1758,9 @@

Extension - try catch throw

Extension Literal function - lambdas

-

Lambdas without capture where implemented using a syntax similar of compound literal for function pointer.

- -

Lambdas are the most complex code transformation so far because sometimes function scope types needs to be transformed to file scope. This is important because manual lambda capture -is something we want to use in function scope.

+

Lambdas without capture where implemented using a compound literal syntax. +Since, we cannot have compound literal of function types (only pointer to function) the +syntax can be reused.

For instance:

@@ -1807,6 +1798,8 @@

Extension Literal function - lambdas

}


+Code generation is already working, but static analysis
+is not implemented. 
 
 ### Extension #pragma dir  
 
diff --git a/src/web/samples.js b/src/web/samples.js
index becc779..dd97496 100644
--- a/src/web/samples.js
+++ b/src/web/samples.js
@@ -2,7 +2,7 @@
 
 sample["C99"] = [];
 sample["C99"]["_Bool"] =
-    `
+ `
  /*
     _Bool type was introduced in C99 as built-in type used 
     to represent boolean values and the header 
@@ -12,10 +12,7 @@ sample["C99"]["_Bool"] =
 
 int main(void)
 {
-    // _Bool is converted to unsigned char. 
-
     _Bool b = 1;
-
     return 0;
 }
 `;
@@ -28,14 +25,17 @@ struct T {
     int k;
     int l;
 };
+
 struct S {
     int i;
     struct T t;
 };
+
 struct T x = {
     .l = 43,
     .k = 42,
 };
+
 void f(void) {
     struct S l = {
         1,
@@ -63,7 +63,7 @@ int a[A_MAX] = { 1, 3, 5, 7, 9, [A_MAX-5] = 8, 6, 4, 2, 0 };
 `;
 
 sample["C99"]["Compound literals"] =
-    `
+`
 struct X {
   int i;
 };
@@ -86,6 +86,50 @@ const double dmin = 0x1p-1022;
 */
 `;
 
+sample["C99"]["_Pragma"] =
+`
+   //TODO !!
+`;
+
+sample["C99"]["__func__"] =
+`
+   //TODO not implemented yet
+`;
+
+
+sample["C99"]["for block scope"] =
+`
+int main()
+{
+   const int max = 10;
+   for (int n = max - 1; n >= 0; n--)
+   {
+     // body of loop
+   }
+}
+`;
+
+sample["C99"]["Mixed declarations"] =
+`
+   //not converted yet
+`;
+
+sample["C99"]["restrict pointers"] =
+`
+   void copy_array(int n, int *restrict a, int *restrict b)
+   {
+      while (n-- > 0)
+        *a++ = *b++;
+   }
+`;
+
+sample["C99"]["Complex"] =
+`
+   /*not implemented*/
+`;
+
+
+
 sample["C99"]["int a[static]"] =
     `
 #include 
@@ -186,13 +230,8 @@ int main(void)
 `;
 
 sample["C11"]["_Static_assert"] =
-    `
+ `
 /*
-   _Static_assert provides a mechanism for compile-time assertion 
-   checking.
-
-   Cake removed this statement when compiling to C99/C89.
-
    See also C23 static_assert
 */
 
@@ -204,7 +243,7 @@ int main()
 
 
 sample["C11"]["_Noreturn"] =
-    `
+`
 #include 
 #include 
 
@@ -270,55 +309,26 @@ int main(void)
 
 sample["C23"] = []
 sample["C23"]["Digit Separator"] =
-    `
-#define M 1000'00
-
+`
 int main()
 {
     int a = 1000'00;
     static_assert(1000'00 == 100000);
 }
-
-/*
-  Note:
-  This conversion happens at token level, even not active blocks
-  are converted
-*/
-#if 0
-#define X 100'00
-#endif
-
 `;
 
 sample["C23"]["Binary Literal"] =
-    `
-#define X  0b1010
-
+`
 int main()
 {
     int a = X;
-    int b = 0B1010;
+    int b = 0B10;
 }
-
-/*
-  Note:
-  This conversion happens at token level, even not active blocks
-  are converted
-*/
 `;
 
 
 sample["C23"]["static_assert"] =
-    `
-/*
-   C23 added the alternative keyword static_assert for 
-   _Static_assert.
-
-   The error message also become optional in C23.
-
-   Cake transpile static_assert to _Static_assert if the target 
-   is C11 and removes static_assert if the target is C99/C89.
-*/
+`
 int main()
 {    
     static_assert(1 == 1, "error");
@@ -504,7 +514,6 @@ sample["C23"]["typeof / typeof_unqual"] =
     typeof(a) temp = a; a = b; b = temp; \\
   } while (0)
 
-#pragma expand SWAP
 
 /*pointer to function returning int*/
 int (*g1)(int a);
@@ -623,8 +632,6 @@ const auto pc_func = func;
 /*using auto inside a macro*/
 #define SWAP(a, b)   do {    auto temp = a; a = b; b = temp;   } while (0)
 
-#pragma expand SWAP
-
 void f()
 {
   int a = 1;
@@ -1290,7 +1297,7 @@ sample["Extensions"]["typeof + lambdas"] =
     typeof(a) temp = *arg1; *arg1 = *arg2; *arg2 = temp; \\
   }(&(a), &(b))
 
-#pragma expand SWAP
+
 int main()
 {
     int a = 1;