Skip to content

Instantly share code, notes, and snippets.

@jduey
Last active February 27, 2019 14:22
Show Gist options
  • Save jduey/47a4829ee84afee9cd3a36ca0a87d241 to your computer and use it in GitHub Desktop.
Save jduey/47a4829ee84afee9cd3a36ca0a87d241 to your computer and use it in GitHub Desktop.
Value *g_loop_3949;
Value *g_loop_3950(List *closures, Value *tmp_0, Value *n_1) {
while (1) {
incRef(tmp_0, 1);
incRef(n_1, 1);
Value *andRslt2;
// static-fixed
// #line 3 "recur-test.toc"
Value *rslt3 = g__LT__806(empty_list, n_1, numPtr0);
andRslt2 = rslt3;
if (isNothing(andRslt2,"",0)) {
dec_and_free(tmp_0, 1);
} else {
dec_and_free(andRslt2, 1);
// call-maybe
// #line 3 "recur-test.toc"
Value *maybe4 = (Value *)maybe((List *)0, (Value *)0, tmp_0);
andRslt2 = maybe4;
}
if (!isNothing(andRslt2,"",0)) {
Value *rslt12 = maybeExtract(andRslt2);
dec_and_free(tmp_0, 1);
dec_and_free(n_1, 1);
return(rslt12);
} else {
dec_and_free(andRslt2, 1);
// static-fixed
// #line 4 "recur-test.toc"
Value *rslt5 = g_add_numbers_131(empty_list, numPtr5, tmp_0);
// static-fixed
// #line 4 "recur-test.toc"
Value *rslt6 = g_dec_1158(empty_list, n_1);
Value *rslt10;
FnArity *arity7 = findFnArity(g_loop_3949, 2);
if(arity7 != (FnArity *)0 && !arity7->variadic) { FnType2 *fn9 = (FnType2 *)arity7->fn;
// dynamic fn type
// #line 4 "recur-test.toc"
rslt10 = fn9(arity7->closures, rslt5, rslt6);
} else if(arity7 != (FnArity *)0 && arity7->variadic) { FnType1 *fn9 = (FnType1 *)arity7->fn;
List *dynArgs8 = empty_list;
dynArgs8 = (List *)listCons(rslt6, dynArgs8);
dynArgs8 = (List *)listCons(rslt5, dynArgs8);
// dynamic fn type
// #line 4 "recur-test.toc"
rslt10 = fn9(arity7->closures, (Value *)dynArgs8);
} else {
fprintf(stderr, "\n*** no arity found for '%s' at: %s, %d.\n", ((Function *)g_loop_3949)->name, "recur-test.toc", 4);
abort();
}
dec_and_free(g_loop_3949, 1);
// static-fixed
// #line 4 "recur-test.toc"
Value *rslt11 = g_add_numbers_131(empty_list, numPtr5, rslt10);
return(rslt11);
}
};
};
Value *g_loop_3949 = (Value *)&g_loop_3953;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment