// Lean compiler output
// Module: Lake.Reservoir
// Imports: Init Lake.Util.Log Lake.Util.Proc Lake.Util.JsonObject Lake.Config.Env
#include <lean/lean.h>
#if defined(__clang__)
#pragma clang diagnostic ignored "-Wunused-parameter"
#pragma clang diagnostic ignored "-Wunused-label"
#elif defined(__GNUC__) && !defined(__CLANG__)
#pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-Wunused-label"
#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
#endif
#ifdef __cplusplus
extern "C" {
#endif
LEAN_EXPORT lean_object* l_Lake_instFromJsonReservoirResp___rarg(lean_object*);
LEAN_EXPORT lean_object* l_Lake_utf8EncodeCharM___at_Lake_uriEscapeChar___spec__1___lambda__3___boxed(lean_object*, lean_object*, lean_object*);
static lean_object* l_Lake_getUrl___closed__5;
LEAN_EXPORT lean_object* l_Lake_uriEncode___boxed(lean_object*);
lean_object* l_Lean_Json_getObj_x3f(lean_object*);
static lean_object* l_Lake_getUrl___closed__7;
LEAN_EXPORT lean_object* l_Lake_utf8EncodeCharM(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lake_RegistryPkg_fromJson_x3f(lean_object*);
uint8_t lean_uint32_to_uint8(uint32_t);
static lean_object* l_Lake_RegistrySrc_fromJson_x3f___closed__3;
LEAN_EXPORT lean_object* l_Lake_utf8EncodeCharM___at_Lake_uriEscapeChar___spec__1___lambda__3(uint32_t, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lake_uriEscapeChar(uint32_t, lean_object*);
LEAN_EXPORT lean_object* l_Lake_uriEncodeChar(uint32_t, lean_object*);
uint32_t lean_string_utf8_get(lean_object*, lean_object*);
lean_object* lean_mk_empty_array_with_capacity(lean_object*);
lean_object* l_Lean_RBNode_find___at___private_Lean_Data_Json_Basic_0__Lean_Json_beq_x27___spec__3(lean_object*, lean_object*);
uint8_t lean_uint8_lor(uint8_t, uint8_t);
static lean_object* l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__12;
LEAN_EXPORT lean_object* l_Lake_utf8EncodeCharM___rarg(lean_object*, uint32_t, lean_object*, lean_object*);
static lean_object* l_Lake_RegistryPkg_fromJson_x3f___closed__7;
LEAN_EXPORT lean_object* l_Lake_RegistrySrc_data___boxed(lean_object*);
LEAN_EXPORT lean_object* l_Lake_utf8EncodeCharM___rarg___lambda__1(uint32_t, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lake_utf8EncodeCharM___rarg___lambda__6___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lake_instInhabitedRegistryPkg___closed__1;
static lean_object* l_Lake_RegistrySrc_fromJson_x3f___closed__2;
LEAN_EXPORT lean_object* l_Lake_hexEncodeByte___boxed(lean_object*);
LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lake_RegistryPkg_fromJson_x3f___spec__1(size_t, size_t, lean_object*);
lean_object* lean_array_push(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lake_uriEscapeByte(uint8_t, lean_object*);
uint32_t lean_uint32_shift_right(uint32_t, uint32_t);
LEAN_EXPORT lean_object* l_Lake_utf8EncodeCharM___rarg___lambda__6(uint32_t, lean_object*, lean_object*, lean_object*, lean_object*);
uint8_t lean_usize_dec_eq(size_t, size_t);
LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lake_getUrl___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__13;
LEAN_EXPORT lean_object* l_Lake_utf8EncodeCharM___rarg___lambda__3___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lake_RegistrySrc_instFromJson;
static lean_object* l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__8;
static lean_object* l_Lake_RegistryPkg_fromJson_x3f___closed__19;
static lean_object* l_Lake_RegistryPkg_fromJson_x3f___closed__21;
uint8_t lean_uint8_land(uint8_t, uint8_t);
static lean_object* l_Lake_RegistryPkg_fromJson_x3f___closed__16;
static lean_object* l_Lake_RegistrySrc_fromJson_x3f___closed__5;
static lean_object* l_Lake_RegistryPkg_fromJson_x3f___closed__2;
static lean_object* l_Lake_instInhabitedRegistrySrc___closed__1;
static lean_object* l_Lake_getUrl___closed__3;
uint8_t lean_string_dec_eq(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lake_uriEncodeChar___boxed(lean_object*, lean_object*);
static lean_object* l_Lake_RegistryPkg_fromJson_x3f___closed__23;
lean_object* lean_string_utf8_byte_size(lean_object*);
lean_object* lean_string_push(lean_object*, uint32_t);
LEAN_EXPORT lean_object* l_Lake_ReservoirResp_fromJson_x3f___rarg(lean_object*, lean_object*);
static lean_object* l_Lake_RegistrySrc_fromJson_x3f___closed__13;
static lean_object* l_Lake_fetchReservoirPkg_x3f___lambda__1___closed__4;
static lean_object* l_Lake_fetchReservoirPkg_x3f___lambda__1___closed__3;
static lean_object* l_Lake_RegistrySrc_fromJson_x3f___closed__9;
LEAN_EXPORT lean_object* l_Lake_utf8EncodeCharM___at_Lake_uriEscapeChar___spec__1(uint32_t, lean_object*);
static lean_object* l_Lake_RegistryPkg_gitSrc_x3f___closed__3;
lean_object* l_Lean_Json_getStr_x3f(lean_object*);
size_t lean_usize_of_nat(lean_object*);
LEAN_EXPORT lean_object* l_Lake_RegistrySrc_isGit___boxed(lean_object*);
LEAN_EXPORT lean_object* l_Lake_RegistryPkg_instToJson;
static lean_object* l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__15;
LEAN_EXPORT lean_object* l_Lake_uriEscapeByte___boxed(lean_object*, lean_object*);
static size_t l_Lake_RegistryPkg_fromJson_x3f___closed__22;
static lean_object* l_Lake_RegistryPkg_fromJson_x3f___closed__20;
lean_object* lean_string_utf8_next(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lake_utf8EncodeCharM___at_Lake_uriEscapeChar___spec__1___lambda__2(uint32_t, lean_object*, lean_object*);
static lean_object* l_Lake_fetchReservoirPkg_x3f___closed__1;
uint8_t lean_nat_dec_eq(lean_object*, lean_object*);
uint8_t l_Char_isAlphanum(uint32_t);
uint8_t lean_uint32_dec_le(uint32_t, uint32_t);
static lean_object* l_Lake_RegistrySrc_fromJson_x3f___closed__15;
LEAN_EXPORT lean_object* l_Lake_utf8EncodeCharM___rarg___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__3;
static lean_object* l_Lake_RegistryPkg_fromJson_x3f___closed__6;
static lean_object* l_Lake_instInhabitedRegistrySrc___closed__2;
static lean_object* l_Lake_RegistryPkg_fromJson_x3f___closed__9;
LEAN_EXPORT lean_object* l_Lake_utf8EncodeCharM___rarg___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lake_getUrl___closed__4;
static lean_object* l_Lake_RegistryPkg_fromJson_x3f___closed__13;
static lean_object* l_Lake_RegistryPkg_fromJson_x3f___closed__1;
static lean_object* l_Lake_RegistrySrc_fromJson_x3f___closed__6;
static lean_object* l_Lake_RegistrySrc_instFromJson___closed__1;
LEAN_EXPORT lean_object* l_Lake_RegistrySrc_data(lean_object*);
static lean_object* l_Lake_RegistrySrc_fromJson_x3f___closed__8;
static lean_object* l_Lake_RegistryPkg_gitSrc_x3f___closed__1;
LEAN_EXPORT lean_object* l_Lake_RegistryPkg_gitSrc_x3f___lambda__1___boxed(lean_object*);
static lean_object* l_Lake_fetchReservoirPkg_x3f___closed__4;
LEAN_EXPORT lean_object* l_Lake_ReservoirResp_fromJson_x3f___at_Lake_fetchReservoirPkg_x3f___spec__1(lean_object*);
lean_object* l_Lake_captureProc(lean_object*, lean_object*, lean_object*);
static lean_object* l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__1;
LEAN_EXPORT lean_object* l_Lake_RegistryPkg_toJson(lean_object*);
static lean_object* l_Lake_RegistryPkg_fromJson_x3f___closed__24;
static lean_object* l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__11;
LEAN_EXPORT lean_object* l_Lake_fetchReservoirPkg_x3f___lambda__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lake_RegistryPkg_fromJson_x3f___closed__8;
static lean_object* l_Lake_RegistryPkg_instToJson___closed__1;
LEAN_EXPORT uint8_t l_Lake_isUriUnreservedMark(uint32_t);
LEAN_EXPORT lean_object* l_Lake_utf8EncodeCharM___rarg___lambda__4(uint32_t, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__10;
static lean_object* l_Lake_getUrl___closed__2;
LEAN_EXPORT lean_object* l_Lake_RegistryPkg_toJson___boxed(lean_object*);
static lean_object* l_Lake_RegistryPkg_fromJson_x3f___closed__10;
static lean_object* l_Lake_RegistryPkg_fromJson_x3f___closed__11;
LEAN_EXPORT lean_object* l_Lake_utf8EncodeCharM___rarg___lambda__2___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lake_RegistryPkg_fromJson_x3f___closed__17;
LEAN_EXPORT lean_object* l_Lake_getUrl___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lake_RegistrySrc_fromJson_x3f___closed__18;
static lean_object* l_Lake_fetchReservoirPkg_x3f___closed__2;
lean_object* l_Array_append___rarg(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lake_utf8EncodeCharM___rarg___lambda__5(uint32_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lake_fetchReservoirPkg_x3f(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lake_getUrl___closed__6;
static lean_object* l_Lake_RegistrySrc_fromJson_x3f___closed__7;
LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lake_RegistryPkg_gitSrc_x3f___spec__1(lean_object*, lean_object*, size_t, size_t, lean_object*);
lean_object* l_Array_mapMUnsafe_map___at_Lean_Server_instRpcEncodableArray___spec__3(size_t, size_t, lean_object*);
static lean_object* l_Lake_RegistrySrc_fromJson_x3f___closed__14;
LEAN_EXPORT lean_object* l_Lake_ReservoirResp_fromJson_x3f(lean_object*);
LEAN_EXPORT lean_object* l_Lake_instFromJsonReservoirResp(lean_object*);
LEAN_EXPORT lean_object* l_String_foldlAux___at_Lake_uriEncode___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lake_RegistrySrc_fromJson_x3f___closed__17;
static lean_object* l_Lake_RegistryPkg_fromJson_x3f___closed__3;
static lean_object* l_Lake_RegistrySrc_fromJson_x3f___closed__1;
static lean_object* l_Lake_fetchReservoirPkg_x3f___closed__6;
LEAN_EXPORT uint32_t l_Lake_hexEncodeByte(uint8_t);
LEAN_EXPORT lean_object* l_Lake_utf8EncodeCharM___at_Lake_uriEscapeChar___spec__1___lambda__2___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lake_utf8EncodeCharM___at_Lake_uriEscapeChar___spec__1___boxed(lean_object*, lean_object*);
uint8_t lean_nat_dec_lt(lean_object*, lean_object*);
static lean_object* l_Lake_RegistryPkg_fromJson_x3f___closed__18;
LEAN_EXPORT lean_object* l_Lake_instInhabitedRegistrySrc;
static lean_object* l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__4;
static lean_object* l_Lake_RegistryPkg_fromJson_x3f___closed__12;
uint8_t lean_uint32_dec_eq(uint32_t, uint32_t);
LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lake_getUrl___spec__1(lean_object*, lean_object*, size_t, size_t, lean_object*);
LEAN_EXPORT lean_object* l_Lake_RegistryPkg_gitSrc_x3f(lean_object*);
static lean_object* l_Lake_fetchReservoirPkg_x3f___closed__5;
LEAN_EXPORT lean_object* l_Lake_getUrl(lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lake_RegistrySrc_fromJson_x3f___closed__11;
LEAN_EXPORT lean_object* l_Lake_RegistrySrc_instToJson;
LEAN_EXPORT lean_object* l_Lake_uriEncode(lean_object*);
LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lake_RegistryPkg_gitSrc_x3f___spec__1___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lake_isUriUnreservedMark___boxed(lean_object*);
static lean_object* l_Lake_fetchReservoirPkg_x3f___lambda__1___closed__1;
LEAN_EXPORT lean_object* l_Lake_RegistrySrc_toJson___boxed(lean_object*);
lean_object* l_Lean_Json_getNat_x3f(lean_object*);
uint8_t lean_uint8_shift_right(uint8_t, uint8_t);
LEAN_EXPORT lean_object* l_Lake_utf8EncodeCharM___rarg___lambda__5___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__9;
static lean_object* l_Lake_RegistryPkg_fromJson_x3f___closed__4;
static lean_object* l_Lake_fetchReservoirPkg_x3f___closed__3;
LEAN_EXPORT lean_object* l_String_foldlAux___at_Lake_uriEncode___spec__1(lean_object*, lean_object*, lean_object*, lean_object*);
static lean_object* l_Lake_instInhabitedRegistryPkg___closed__2;
static lean_object* l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__7;
static lean_object* l_Lake_RegistrySrc_instToJson___closed__1;
static lean_object* l_Lake_getUrl___closed__1;
LEAN_EXPORT lean_object* l_Lake_fetchReservoirPkg_x3f___lambda__1(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
size_t lean_usize_add(size_t, size_t);
LEAN_EXPORT lean_object* l_Lake_uriEscapeChar___boxed(lean_object*, lean_object*);
static lean_object* l_Lake_RegistryPkg_fromJson_x3f___closed__14;
lean_object* lean_array_uget(lean_object*, size_t);
size_t lean_array_size(lean_object*);
static lean_object* l_Lake_RegistryPkg_fromJson_x3f___closed__15;
static lean_object* l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__5;
static lean_object* l_Lake_RegistryPkg_fromJson_x3f___closed__5;
static lean_object* l_Lake_RegistryPkg_gitSrc_x3f___closed__2;
static lean_object* l_Lake_RegistrySrc_fromJson_x3f___closed__16;
LEAN_EXPORT lean_object* l_Lake_utf8EncodeCharM___rarg___lambda__4___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lake_utf8EncodeCharM___at_Lake_uriEscapeChar___spec__1___lambda__1___boxed(lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lake_RegistrySrc_toJson(lean_object*);
lean_object* lean_string_append(lean_object*, lean_object*);
static lean_object* l_Lake_RegistryPkg_instFromJson___closed__1;
static lean_object* l_Lake_RegistrySrc_fromJson_x3f___closed__10;
lean_object* lean_array_get_size(lean_object*);
uint8_t lean_nat_dec_le(lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lake_RegistryPkg_instFromJson;
uint8_t lean_usize_dec_lt(size_t, size_t);
static lean_object* l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__6;
lean_object* l_Lean_Json_parse(lean_object*);
static lean_object* l_Lake_RegistrySrc_fromJson_x3f___closed__4;
LEAN_EXPORT lean_object* l_Lake_fetchReservoirPkg_x3f___boxed(lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* l_Lean_Json_pretty(lean_object*, lean_object*);
LEAN_EXPORT uint8_t l_Lake_RegistrySrc_isGit(lean_object*);
uint8_t lean_uint8_dec_eq(uint8_t, uint8_t);
LEAN_EXPORT lean_object* l_Lake_utf8EncodeCharM___rarg___lambda__3(uint32_t, lean_object*, lean_object*, lean_object*, lean_object*, lean_object*);
lean_object* lean_array_uset(lean_object*, size_t, lean_object*);
LEAN_EXPORT lean_object* l_Lake_utf8EncodeCharM___at_Lake_uriEscapeChar___spec__1___lambda__1(uint32_t, lean_object*, lean_object*);
static lean_object* l_Lake_fetchReservoirPkg_x3f___lambda__1___closed__2;
LEAN_EXPORT lean_object* l_Lake_utf8EncodeCharM___rarg___lambda__2(uint32_t, lean_object*, lean_object*, lean_object*, lean_object*);
LEAN_EXPORT lean_object* l_Lake_instInhabitedRegistryPkg;
static lean_object* l_Lake_RegistrySrc_fromJson_x3f___closed__12;
LEAN_EXPORT lean_object* l_Lake_RegistryPkg_gitSrc_x3f___boxed(lean_object*);
LEAN_EXPORT lean_object* l_Lake_RegistryPkg_gitSrc_x3f___lambda__1(lean_object*);
static lean_object* l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__2;
static lean_object* l_Array_foldlMUnsafe_fold___at_Lake_getUrl___spec__1___closed__1;
LEAN_EXPORT lean_object* l_Lake_RegistrySrc_fromJson_x3f(lean_object*);
static lean_object* l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__14;
LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lake_RegistryPkg_fromJson_x3f___spec__1___boxed(lean_object*, lean_object*, lean_object*);
static lean_object* _init_l_Lake_instInhabitedRegistrySrc___closed__1() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("", 0, 0);
return x_1;
}
}
static lean_object* _init_l_Lake_instInhabitedRegistrySrc___closed__2() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; 
x_1 = lean_box(0);
x_2 = lean_box(0);
x_3 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_4 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_4, 0, x_1);
lean_ctor_set(x_4, 1, x_3);
lean_ctor_set(x_4, 2, x_2);
lean_ctor_set(x_4, 3, x_2);
lean_ctor_set(x_4, 4, x_2);
return x_4;
}
}
static lean_object* _init_l_Lake_instInhabitedRegistrySrc() {
_start:
{
lean_object* x_1; 
x_1 = l_Lake_instInhabitedRegistrySrc___closed__2;
return x_1;
}
}
LEAN_EXPORT uint8_t l_Lake_RegistrySrc_isGit(lean_object* x_1) {
_start:
{
if (lean_obj_tag(x_1) == 0)
{
uint8_t x_2; 
x_2 = 1;
return x_2;
}
else
{
uint8_t x_3; 
x_3 = 0;
return x_3;
}
}
}
LEAN_EXPORT lean_object* l_Lake_RegistrySrc_isGit___boxed(lean_object* x_1) {
_start:
{
uint8_t x_2; lean_object* x_3; 
x_2 = l_Lake_RegistrySrc_isGit(x_1);
lean_dec(x_1);
x_3 = lean_box(x_2);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Lake_RegistrySrc_data(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = lean_ctor_get(x_1, 0);
lean_inc(x_2);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Lake_RegistrySrc_data___boxed(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = l_Lake_RegistrySrc_data(x_1);
lean_dec(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Lake_RegistrySrc_toJson(lean_object* x_1) {
_start:
{
lean_object* x_2; lean_object* x_3; 
x_2 = l_Lake_RegistrySrc_data(x_1);
x_3 = lean_alloc_ctor(5, 1, 0);
lean_ctor_set(x_3, 0, x_2);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Lake_RegistrySrc_toJson___boxed(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = l_Lake_RegistrySrc_toJson(x_1);
lean_dec(x_1);
return x_2;
}
}
static lean_object* _init_l_Lake_RegistrySrc_instToJson___closed__1() {
_start:
{
lean_object* x_1; 
x_1 = lean_alloc_closure((void*)(l_Lake_RegistrySrc_toJson___boxed), 1, 0);
return x_1;
}
}
static lean_object* _init_l_Lake_RegistrySrc_instToJson() {
_start:
{
lean_object* x_1; 
x_1 = l_Lake_RegistrySrc_instToJson___closed__1;
return x_1;
}
}
static lean_object* _init_l_Lake_RegistrySrc_fromJson_x3f___closed__1() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("invalid registry source: ", 25, 25);
return x_1;
}
}
static lean_object* _init_l_Lake_RegistrySrc_fromJson_x3f___closed__2() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("subDir", 6, 6);
return x_1;
}
}
static lean_object* _init_l_Lake_RegistrySrc_fromJson_x3f___closed__3() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_2 = l_Lake_RegistrySrc_fromJson_x3f___closed__2;
x_3 = lean_string_append(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_Lake_RegistrySrc_fromJson_x3f___closed__4() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked(": ", 2, 2);
return x_1;
}
}
static lean_object* _init_l_Lake_RegistrySrc_fromJson_x3f___closed__5() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lake_RegistrySrc_fromJson_x3f___closed__3;
x_2 = l_Lake_RegistrySrc_fromJson_x3f___closed__4;
x_3 = lean_string_append(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_Lake_RegistrySrc_fromJson_x3f___closed__6() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("defaultBranch", 13, 13);
return x_1;
}
}
static lean_object* _init_l_Lake_RegistrySrc_fromJson_x3f___closed__7() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_2 = l_Lake_RegistrySrc_fromJson_x3f___closed__6;
x_3 = lean_string_append(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_Lake_RegistrySrc_fromJson_x3f___closed__8() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lake_RegistrySrc_fromJson_x3f___closed__7;
x_2 = l_Lake_RegistrySrc_fromJson_x3f___closed__4;
x_3 = lean_string_append(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_Lake_RegistrySrc_fromJson_x3f___closed__9() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("repoUrl", 7, 7);
return x_1;
}
}
static lean_object* _init_l_Lake_RegistrySrc_fromJson_x3f___closed__10() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_2 = l_Lake_RegistrySrc_fromJson_x3f___closed__9;
x_3 = lean_string_append(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_Lake_RegistrySrc_fromJson_x3f___closed__11() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lake_RegistrySrc_fromJson_x3f___closed__10;
x_2 = l_Lake_RegistrySrc_fromJson_x3f___closed__4;
x_3 = lean_string_append(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_Lake_RegistrySrc_fromJson_x3f___closed__12() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("host", 4, 4);
return x_1;
}
}
static lean_object* _init_l_Lake_RegistrySrc_fromJson_x3f___closed__13() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_2 = l_Lake_RegistrySrc_fromJson_x3f___closed__12;
x_3 = lean_string_append(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_Lake_RegistrySrc_fromJson_x3f___closed__14() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lake_RegistrySrc_fromJson_x3f___closed__13;
x_2 = l_Lake_RegistrySrc_fromJson_x3f___closed__4;
x_3 = lean_string_append(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_Lake_RegistrySrc_fromJson_x3f___closed__15() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("gitUrl", 6, 6);
return x_1;
}
}
static lean_object* _init_l_Lake_RegistrySrc_fromJson_x3f___closed__16() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_2 = l_Lake_RegistrySrc_fromJson_x3f___closed__15;
x_3 = lean_string_append(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_Lake_RegistrySrc_fromJson_x3f___closed__17() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lake_RegistrySrc_fromJson_x3f___closed__16;
x_2 = l_Lake_RegistrySrc_fromJson_x3f___closed__4;
x_3 = lean_string_append(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_Lake_RegistrySrc_fromJson_x3f___closed__18() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("github", 6, 6);
return x_1;
}
}
LEAN_EXPORT lean_object* l_Lake_RegistrySrc_fromJson_x3f(lean_object* x_1) {
_start:
{
lean_object* x_2; lean_object* x_22; lean_object* x_29; lean_object* x_36; lean_object* x_43; lean_object* x_50; lean_object* x_57; 
x_57 = l_Lean_Json_getObj_x3f(x_1);
if (lean_obj_tag(x_57) == 0)
{
uint8_t x_58; 
x_58 = !lean_is_exclusive(x_57);
if (x_58 == 0)
{
x_2 = x_57;
goto block_21;
}
else
{
lean_object* x_59; lean_object* x_60; 
x_59 = lean_ctor_get(x_57, 0);
lean_inc(x_59);
lean_dec(x_57);
x_60 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_60, 0, x_59);
x_2 = x_60;
goto block_21;
}
}
else
{
lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_147; lean_object* x_148; 
x_61 = lean_ctor_get(x_57, 0);
lean_inc(x_61);
if (lean_is_exclusive(x_57)) {
 lean_ctor_release(x_57, 0);
 x_62 = x_57;
} else {
 lean_dec_ref(x_57);
 x_62 = lean_box(0);
}
x_147 = l_Lake_RegistrySrc_fromJson_x3f___closed__15;
x_148 = l_Lean_RBNode_find___at___private_Lean_Data_Json_Basic_0__Lean_Json_beq_x27___spec__3(x_61, x_147);
if (lean_obj_tag(x_148) == 0)
{
lean_object* x_149; 
x_149 = lean_box(0);
x_63 = x_149;
goto block_146;
}
else
{
uint8_t x_150; 
x_150 = !lean_is_exclusive(x_148);
if (x_150 == 0)
{
lean_object* x_151; 
x_151 = lean_ctor_get(x_148, 0);
if (lean_obj_tag(x_151) == 0)
{
lean_object* x_152; 
lean_free_object(x_148);
x_152 = lean_box(0);
x_63 = x_152;
goto block_146;
}
else
{
lean_object* x_153; 
x_153 = l_Lean_Json_getStr_x3f(x_151);
if (lean_obj_tag(x_153) == 0)
{
lean_object* x_154; 
lean_free_object(x_148);
lean_dec(x_62);
lean_dec(x_61);
x_154 = lean_ctor_get(x_153, 0);
lean_inc(x_154);
lean_dec(x_153);
x_50 = x_154;
goto block_56;
}
else
{
lean_object* x_155; 
x_155 = lean_ctor_get(x_153, 0);
lean_inc(x_155);
lean_dec(x_153);
lean_ctor_set(x_148, 0, x_155);
x_63 = x_148;
goto block_146;
}
}
}
else
{
lean_object* x_156; 
x_156 = lean_ctor_get(x_148, 0);
lean_inc(x_156);
lean_dec(x_148);
if (lean_obj_tag(x_156) == 0)
{
lean_object* x_157; 
x_157 = lean_box(0);
x_63 = x_157;
goto block_146;
}
else
{
lean_object* x_158; 
x_158 = l_Lean_Json_getStr_x3f(x_156);
if (lean_obj_tag(x_158) == 0)
{
lean_object* x_159; 
lean_dec(x_62);
lean_dec(x_61);
x_159 = lean_ctor_get(x_158, 0);
lean_inc(x_159);
lean_dec(x_158);
x_50 = x_159;
goto block_56;
}
else
{
lean_object* x_160; lean_object* x_161; 
x_160 = lean_ctor_get(x_158, 0);
lean_inc(x_160);
lean_dec(x_158);
x_161 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_161, 0, x_160);
x_63 = x_161;
goto block_146;
}
}
}
}
block_146:
{
if (lean_obj_tag(x_63) == 0)
{
lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; 
x_64 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_64, 0, x_61);
x_65 = lean_box(0);
x_66 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_66, 0, x_64);
lean_ctor_set(x_66, 1, x_65);
if (lean_is_scalar(x_62)) {
 x_67 = lean_alloc_ctor(1, 1, 0);
} else {
 x_67 = x_62;
}
lean_ctor_set(x_67, 0, x_66);
x_2 = x_67;
goto block_21;
}
else
{
lean_object* x_68; lean_object* x_69; lean_object* x_109; lean_object* x_131; lean_object* x_132; 
x_68 = lean_ctor_get(x_63, 0);
lean_inc(x_68);
lean_dec(x_63);
x_131 = l_Lake_RegistrySrc_fromJson_x3f___closed__12;
x_132 = l_Lean_RBNode_find___at___private_Lean_Data_Json_Basic_0__Lean_Json_beq_x27___spec__3(x_61, x_131);
if (lean_obj_tag(x_132) == 0)
{
lean_object* x_133; 
x_133 = lean_box(0);
x_109 = x_133;
goto block_130;
}
else
{
uint8_t x_134; 
x_134 = !lean_is_exclusive(x_132);
if (x_134 == 0)
{
lean_object* x_135; 
x_135 = lean_ctor_get(x_132, 0);
if (lean_obj_tag(x_135) == 0)
{
lean_object* x_136; 
lean_free_object(x_132);
x_136 = lean_box(0);
x_109 = x_136;
goto block_130;
}
else
{
lean_object* x_137; 
x_137 = l_Lean_Json_getStr_x3f(x_135);
if (lean_obj_tag(x_137) == 0)
{
lean_object* x_138; 
lean_free_object(x_132);
lean_dec(x_68);
lean_dec(x_62);
lean_dec(x_61);
x_138 = lean_ctor_get(x_137, 0);
lean_inc(x_138);
lean_dec(x_137);
x_43 = x_138;
goto block_49;
}
else
{
lean_object* x_139; 
x_139 = lean_ctor_get(x_137, 0);
lean_inc(x_139);
lean_dec(x_137);
lean_ctor_set(x_132, 0, x_139);
x_109 = x_132;
goto block_130;
}
}
}
else
{
lean_object* x_140; 
x_140 = lean_ctor_get(x_132, 0);
lean_inc(x_140);
lean_dec(x_132);
if (lean_obj_tag(x_140) == 0)
{
lean_object* x_141; 
x_141 = lean_box(0);
x_109 = x_141;
goto block_130;
}
else
{
lean_object* x_142; 
x_142 = l_Lean_Json_getStr_x3f(x_140);
if (lean_obj_tag(x_142) == 0)
{
lean_object* x_143; 
lean_dec(x_68);
lean_dec(x_62);
lean_dec(x_61);
x_143 = lean_ctor_get(x_142, 0);
lean_inc(x_143);
lean_dec(x_142);
x_43 = x_143;
goto block_49;
}
else
{
lean_object* x_144; lean_object* x_145; 
x_144 = lean_ctor_get(x_142, 0);
lean_inc(x_144);
lean_dec(x_142);
x_145 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_145, 0, x_144);
x_109 = x_145;
goto block_130;
}
}
}
}
block_108:
{
lean_object* x_70; lean_object* x_93; lean_object* x_94; 
x_93 = l_Lake_RegistrySrc_fromJson_x3f___closed__6;
x_94 = l_Lean_RBNode_find___at___private_Lean_Data_Json_Basic_0__Lean_Json_beq_x27___spec__3(x_61, x_93);
if (lean_obj_tag(x_94) == 0)
{
lean_object* x_95; 
x_95 = lean_box(0);
x_70 = x_95;
goto block_92;
}
else
{
uint8_t x_96; 
x_96 = !lean_is_exclusive(x_94);
if (x_96 == 0)
{
lean_object* x_97; 
x_97 = lean_ctor_get(x_94, 0);
if (lean_obj_tag(x_97) == 0)
{
lean_object* x_98; 
lean_free_object(x_94);
x_98 = lean_box(0);
x_70 = x_98;
goto block_92;
}
else
{
lean_object* x_99; 
x_99 = l_Lean_Json_getStr_x3f(x_97);
if (lean_obj_tag(x_99) == 0)
{
lean_object* x_100; 
lean_free_object(x_94);
lean_dec(x_69);
lean_dec(x_68);
lean_dec(x_62);
lean_dec(x_61);
x_100 = lean_ctor_get(x_99, 0);
lean_inc(x_100);
lean_dec(x_99);
x_29 = x_100;
goto block_35;
}
else
{
lean_object* x_101; 
x_101 = lean_ctor_get(x_99, 0);
lean_inc(x_101);
lean_dec(x_99);
lean_ctor_set(x_94, 0, x_101);
x_70 = x_94;
goto block_92;
}
}
}
else
{
lean_object* x_102; 
x_102 = lean_ctor_get(x_94, 0);
lean_inc(x_102);
lean_dec(x_94);
if (lean_obj_tag(x_102) == 0)
{
lean_object* x_103; 
x_103 = lean_box(0);
x_70 = x_103;
goto block_92;
}
else
{
lean_object* x_104; 
x_104 = l_Lean_Json_getStr_x3f(x_102);
if (lean_obj_tag(x_104) == 0)
{
lean_object* x_105; 
lean_dec(x_69);
lean_dec(x_68);
lean_dec(x_62);
lean_dec(x_61);
x_105 = lean_ctor_get(x_104, 0);
lean_inc(x_105);
lean_dec(x_104);
x_29 = x_105;
goto block_35;
}
else
{
lean_object* x_106; lean_object* x_107; 
x_106 = lean_ctor_get(x_104, 0);
lean_inc(x_106);
lean_dec(x_104);
x_107 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_107, 0, x_106);
x_70 = x_107;
goto block_92;
}
}
}
}
block_92:
{
lean_object* x_71; lean_object* x_77; lean_object* x_78; 
x_77 = l_Lake_RegistrySrc_fromJson_x3f___closed__2;
x_78 = l_Lean_RBNode_find___at___private_Lean_Data_Json_Basic_0__Lean_Json_beq_x27___spec__3(x_61, x_77);
if (lean_obj_tag(x_78) == 0)
{
lean_object* x_79; 
x_79 = lean_box(0);
x_71 = x_79;
goto block_76;
}
else
{
uint8_t x_80; 
x_80 = !lean_is_exclusive(x_78);
if (x_80 == 0)
{
lean_object* x_81; 
x_81 = lean_ctor_get(x_78, 0);
if (lean_obj_tag(x_81) == 0)
{
lean_object* x_82; 
lean_free_object(x_78);
x_82 = lean_box(0);
x_71 = x_82;
goto block_76;
}
else
{
lean_object* x_83; 
x_83 = l_Lean_Json_getStr_x3f(x_81);
if (lean_obj_tag(x_83) == 0)
{
lean_object* x_84; 
lean_free_object(x_78);
lean_dec(x_70);
lean_dec(x_69);
lean_dec(x_68);
lean_dec(x_62);
lean_dec(x_61);
x_84 = lean_ctor_get(x_83, 0);
lean_inc(x_84);
lean_dec(x_83);
x_22 = x_84;
goto block_28;
}
else
{
lean_object* x_85; 
x_85 = lean_ctor_get(x_83, 0);
lean_inc(x_85);
lean_dec(x_83);
lean_ctor_set(x_78, 0, x_85);
x_71 = x_78;
goto block_76;
}
}
}
else
{
lean_object* x_86; 
x_86 = lean_ctor_get(x_78, 0);
lean_inc(x_86);
lean_dec(x_78);
if (lean_obj_tag(x_86) == 0)
{
lean_object* x_87; 
x_87 = lean_box(0);
x_71 = x_87;
goto block_76;
}
else
{
lean_object* x_88; 
x_88 = l_Lean_Json_getStr_x3f(x_86);
if (lean_obj_tag(x_88) == 0)
{
lean_object* x_89; 
lean_dec(x_70);
lean_dec(x_69);
lean_dec(x_68);
lean_dec(x_62);
lean_dec(x_61);
x_89 = lean_ctor_get(x_88, 0);
lean_inc(x_89);
lean_dec(x_88);
x_22 = x_89;
goto block_28;
}
else
{
lean_object* x_90; lean_object* x_91; 
x_90 = lean_ctor_get(x_88, 0);
lean_inc(x_90);
lean_dec(x_88);
x_91 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_91, 0, x_90);
x_71 = x_91;
goto block_76;
}
}
}
}
block_76:
{
lean_object* x_72; lean_object* x_73; lean_object* x_74; lean_object* x_75; 
x_72 = lean_alloc_ctor(0, 5, 0);
lean_ctor_set(x_72, 0, x_61);
lean_ctor_set(x_72, 1, x_68);
lean_ctor_set(x_72, 2, x_69);
lean_ctor_set(x_72, 3, x_70);
lean_ctor_set(x_72, 4, x_71);
x_73 = lean_box(0);
x_74 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_74, 0, x_72);
lean_ctor_set(x_74, 1, x_73);
if (lean_is_scalar(x_62)) {
 x_75 = lean_alloc_ctor(1, 1, 0);
} else {
 x_75 = x_62;
}
lean_ctor_set(x_75, 0, x_74);
x_2 = x_75;
goto block_21;
}
}
}
block_130:
{
if (lean_obj_tag(x_109) == 0)
{
lean_object* x_110; 
x_110 = lean_box(0);
x_69 = x_110;
goto block_108;
}
else
{
lean_object* x_111; lean_object* x_112; uint8_t x_113; 
x_111 = lean_ctor_get(x_109, 0);
lean_inc(x_111);
lean_dec(x_109);
x_112 = l_Lake_RegistrySrc_fromJson_x3f___closed__18;
x_113 = lean_string_dec_eq(x_111, x_112);
lean_dec(x_111);
if (x_113 == 0)
{
lean_object* x_114; 
x_114 = lean_box(0);
x_69 = x_114;
goto block_108;
}
else
{
lean_object* x_115; lean_object* x_116; 
x_115 = l_Lake_RegistrySrc_fromJson_x3f___closed__9;
x_116 = l_Lean_RBNode_find___at___private_Lean_Data_Json_Basic_0__Lean_Json_beq_x27___spec__3(x_61, x_115);
if (lean_obj_tag(x_116) == 0)
{
lean_object* x_117; 
x_117 = lean_box(0);
x_69 = x_117;
goto block_108;
}
else
{
uint8_t x_118; 
x_118 = !lean_is_exclusive(x_116);
if (x_118 == 0)
{
lean_object* x_119; 
x_119 = lean_ctor_get(x_116, 0);
if (lean_obj_tag(x_119) == 0)
{
lean_object* x_120; 
lean_free_object(x_116);
x_120 = lean_box(0);
x_69 = x_120;
goto block_108;
}
else
{
lean_object* x_121; 
x_121 = l_Lean_Json_getStr_x3f(x_119);
if (lean_obj_tag(x_121) == 0)
{
lean_object* x_122; 
lean_free_object(x_116);
lean_dec(x_68);
lean_dec(x_62);
lean_dec(x_61);
x_122 = lean_ctor_get(x_121, 0);
lean_inc(x_122);
lean_dec(x_121);
x_36 = x_122;
goto block_42;
}
else
{
lean_object* x_123; 
x_123 = lean_ctor_get(x_121, 0);
lean_inc(x_123);
lean_dec(x_121);
lean_ctor_set(x_116, 0, x_123);
x_69 = x_116;
goto block_108;
}
}
}
else
{
lean_object* x_124; 
x_124 = lean_ctor_get(x_116, 0);
lean_inc(x_124);
lean_dec(x_116);
if (lean_obj_tag(x_124) == 0)
{
lean_object* x_125; 
x_125 = lean_box(0);
x_69 = x_125;
goto block_108;
}
else
{
lean_object* x_126; 
x_126 = l_Lean_Json_getStr_x3f(x_124);
if (lean_obj_tag(x_126) == 0)
{
lean_object* x_127; 
lean_dec(x_68);
lean_dec(x_62);
lean_dec(x_61);
x_127 = lean_ctor_get(x_126, 0);
lean_inc(x_127);
lean_dec(x_126);
x_36 = x_127;
goto block_42;
}
else
{
lean_object* x_128; lean_object* x_129; 
x_128 = lean_ctor_get(x_126, 0);
lean_inc(x_128);
lean_dec(x_126);
x_129 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_129, 0, x_128);
x_69 = x_129;
goto block_108;
}
}
}
}
}
}
}
}
}
}
block_21:
{
if (lean_obj_tag(x_2) == 0)
{
uint8_t x_3; 
x_3 = !lean_is_exclusive(x_2);
if (x_3 == 0)
{
lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; 
x_4 = lean_ctor_get(x_2, 0);
x_5 = l_Lake_RegistrySrc_fromJson_x3f___closed__1;
x_6 = lean_string_append(x_5, x_4);
lean_dec(x_4);
x_7 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_8 = lean_string_append(x_6, x_7);
lean_ctor_set(x_2, 0, x_8);
return x_2;
}
else
{
lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; 
x_9 = lean_ctor_get(x_2, 0);
lean_inc(x_9);
lean_dec(x_2);
x_10 = l_Lake_RegistrySrc_fromJson_x3f___closed__1;
x_11 = lean_string_append(x_10, x_9);
lean_dec(x_9);
x_12 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_13 = lean_string_append(x_11, x_12);
x_14 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_14, 0, x_13);
return x_14;
}
}
else
{
uint8_t x_15; 
x_15 = !lean_is_exclusive(x_2);
if (x_15 == 0)
{
lean_object* x_16; lean_object* x_17; 
x_16 = lean_ctor_get(x_2, 0);
x_17 = lean_ctor_get(x_16, 0);
lean_inc(x_17);
lean_dec(x_16);
lean_ctor_set(x_2, 0, x_17);
return x_2;
}
else
{
lean_object* x_18; lean_object* x_19; lean_object* x_20; 
x_18 = lean_ctor_get(x_2, 0);
lean_inc(x_18);
lean_dec(x_2);
x_19 = lean_ctor_get(x_18, 0);
lean_inc(x_19);
lean_dec(x_18);
x_20 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_20, 0, x_19);
return x_20;
}
}
}
block_28:
{
lean_object* x_23; lean_object* x_24; lean_object* x_25; lean_object* x_26; lean_object* x_27; 
x_23 = l_Lake_RegistrySrc_fromJson_x3f___closed__5;
x_24 = lean_string_append(x_23, x_22);
lean_dec(x_22);
x_25 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_26 = lean_string_append(x_24, x_25);
x_27 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_27, 0, x_26);
x_2 = x_27;
goto block_21;
}
block_35:
{
lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; 
x_30 = l_Lake_RegistrySrc_fromJson_x3f___closed__8;
x_31 = lean_string_append(x_30, x_29);
lean_dec(x_29);
x_32 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_33 = lean_string_append(x_31, x_32);
x_34 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_34, 0, x_33);
x_2 = x_34;
goto block_21;
}
block_42:
{
lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; 
x_37 = l_Lake_RegistrySrc_fromJson_x3f___closed__11;
x_38 = lean_string_append(x_37, x_36);
lean_dec(x_36);
x_39 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_40 = lean_string_append(x_38, x_39);
x_41 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_41, 0, x_40);
x_2 = x_41;
goto block_21;
}
block_49:
{
lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; 
x_44 = l_Lake_RegistrySrc_fromJson_x3f___closed__14;
x_45 = lean_string_append(x_44, x_43);
lean_dec(x_43);
x_46 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_47 = lean_string_append(x_45, x_46);
x_48 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_48, 0, x_47);
x_2 = x_48;
goto block_21;
}
block_56:
{
lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; lean_object* x_55; 
x_51 = l_Lake_RegistrySrc_fromJson_x3f___closed__17;
x_52 = lean_string_append(x_51, x_50);
lean_dec(x_50);
x_53 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_54 = lean_string_append(x_52, x_53);
x_55 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_55, 0, x_54);
x_2 = x_55;
goto block_21;
}
}
}
static lean_object* _init_l_Lake_RegistrySrc_instFromJson___closed__1() {
_start:
{
lean_object* x_1; 
x_1 = lean_alloc_closure((void*)(l_Lake_RegistrySrc_fromJson_x3f), 1, 0);
return x_1;
}
}
static lean_object* _init_l_Lake_RegistrySrc_instFromJson() {
_start:
{
lean_object* x_1; 
x_1 = l_Lake_RegistrySrc_instFromJson___closed__1;
return x_1;
}
}
static lean_object* _init_l_Lake_instInhabitedRegistryPkg___closed__1() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = lean_unsigned_to_nat(0u);
x_2 = lean_mk_empty_array_with_capacity(x_1);
return x_2;
}
}
static lean_object* _init_l_Lake_instInhabitedRegistryPkg___closed__2() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; lean_object* x_4; 
x_1 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_2 = l_Lake_instInhabitedRegistryPkg___closed__1;
x_3 = lean_box(0);
x_4 = lean_alloc_ctor(0, 4, 0);
lean_ctor_set(x_4, 0, x_1);
lean_ctor_set(x_4, 1, x_1);
lean_ctor_set(x_4, 2, x_2);
lean_ctor_set(x_4, 3, x_3);
return x_4;
}
}
static lean_object* _init_l_Lake_instInhabitedRegistryPkg() {
_start:
{
lean_object* x_1; 
x_1 = l_Lake_instInhabitedRegistryPkg___closed__2;
return x_1;
}
}
LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lake_RegistryPkg_gitSrc_x3f___spec__1(lean_object* x_1, lean_object* x_2, size_t x_3, size_t x_4, lean_object* x_5) {
_start:
{
uint8_t x_6; 
x_6 = lean_usize_dec_lt(x_4, x_3);
if (x_6 == 0)
{
lean_inc(x_5);
return x_5;
}
else
{
lean_object* x_7; uint8_t x_8; 
x_7 = lean_array_uget(x_2, x_4);
x_8 = l_Lake_RegistrySrc_isGit(x_7);
if (x_8 == 0)
{
size_t x_9; size_t x_10; 
lean_dec(x_7);
x_9 = 1;
x_10 = lean_usize_add(x_4, x_9);
{
size_t _tmp_3 = x_10;
lean_object* _tmp_4 = x_1;
x_4 = _tmp_3;
x_5 = _tmp_4;
}
goto _start;
}
else
{
lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; 
x_12 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_12, 0, x_7);
x_13 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_13, 0, x_12);
x_14 = lean_box(0);
x_15 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_15, 0, x_13);
lean_ctor_set(x_15, 1, x_14);
return x_15;
}
}
}
}
LEAN_EXPORT lean_object* l_Lake_RegistryPkg_gitSrc_x3f___lambda__1(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = lean_box(0);
return x_2;
}
}
static lean_object* _init_l_Lake_RegistryPkg_gitSrc_x3f___closed__1() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = lean_box(0);
x_2 = lean_box(0);
x_3 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_3, 0, x_1);
lean_ctor_set(x_3, 1, x_2);
return x_3;
}
}
static lean_object* _init_l_Lake_RegistryPkg_gitSrc_x3f___closed__2() {
_start:
{
lean_object* x_1; 
x_1 = lean_alloc_closure((void*)(l_Lake_RegistryPkg_gitSrc_x3f___lambda__1___boxed), 1, 0);
return x_1;
}
}
static lean_object* _init_l_Lake_RegistryPkg_gitSrc_x3f___closed__3() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lake_RegistryPkg_gitSrc_x3f___closed__2;
x_2 = lean_box(0);
x_3 = lean_apply_1(x_1, x_2);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Lake_RegistryPkg_gitSrc_x3f(lean_object* x_1) {
_start:
{
lean_object* x_2; size_t x_3; size_t x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; 
x_2 = lean_ctor_get(x_1, 2);
x_3 = lean_array_size(x_2);
x_4 = 0;
x_5 = l_Lake_RegistryPkg_gitSrc_x3f___closed__1;
x_6 = l_Array_forInUnsafe_loop___at_Lake_RegistryPkg_gitSrc_x3f___spec__1(x_5, x_2, x_3, x_4, x_5);
x_7 = lean_ctor_get(x_6, 0);
lean_inc(x_7);
lean_dec(x_6);
if (lean_obj_tag(x_7) == 0)
{
lean_object* x_8; 
x_8 = l_Lake_RegistryPkg_gitSrc_x3f___closed__3;
return x_8;
}
else
{
lean_object* x_9; 
x_9 = lean_ctor_get(x_7, 0);
lean_inc(x_9);
lean_dec(x_7);
return x_9;
}
}
}
LEAN_EXPORT lean_object* l_Array_forInUnsafe_loop___at_Lake_RegistryPkg_gitSrc_x3f___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
size_t x_6; size_t x_7; lean_object* x_8; 
x_6 = lean_unbox_usize(x_3);
lean_dec(x_3);
x_7 = lean_unbox_usize(x_4);
lean_dec(x_4);
x_8 = l_Array_forInUnsafe_loop___at_Lake_RegistryPkg_gitSrc_x3f___spec__1(x_1, x_2, x_6, x_7, x_5);
lean_dec(x_5);
lean_dec(x_2);
lean_dec(x_1);
return x_8;
}
}
LEAN_EXPORT lean_object* l_Lake_RegistryPkg_gitSrc_x3f___lambda__1___boxed(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = l_Lake_RegistryPkg_gitSrc_x3f___lambda__1(x_1);
lean_dec(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Lake_RegistryPkg_gitSrc_x3f___boxed(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = l_Lake_RegistryPkg_gitSrc_x3f(x_1);
lean_dec(x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Lake_RegistryPkg_toJson(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = lean_ctor_get(x_1, 3);
lean_inc(x_2);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Lake_RegistryPkg_toJson___boxed(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = l_Lake_RegistryPkg_toJson(x_1);
lean_dec(x_1);
return x_2;
}
}
static lean_object* _init_l_Lake_RegistryPkg_instToJson___closed__1() {
_start:
{
lean_object* x_1; 
x_1 = lean_alloc_closure((void*)(l_Lake_RegistryPkg_toJson___boxed), 1, 0);
return x_1;
}
}
static lean_object* _init_l_Lake_RegistryPkg_instToJson() {
_start:
{
lean_object* x_1; 
x_1 = l_Lake_RegistryPkg_instToJson___closed__1;
return x_1;
}
}
LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lake_RegistryPkg_fromJson_x3f___spec__1(size_t x_1, size_t x_2, lean_object* x_3) {
_start:
{
uint8_t x_4; 
x_4 = lean_usize_dec_lt(x_2, x_1);
if (x_4 == 0)
{
lean_object* x_5; 
x_5 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_5, 0, x_3);
return x_5;
}
else
{
lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; 
x_6 = lean_array_uget(x_3, x_2);
x_7 = lean_unsigned_to_nat(0u);
x_8 = lean_array_uset(x_3, x_2, x_7);
x_9 = l_Lake_RegistrySrc_fromJson_x3f(x_6);
if (lean_obj_tag(x_9) == 0)
{
uint8_t x_10; 
lean_dec(x_8);
x_10 = !lean_is_exclusive(x_9);
if (x_10 == 0)
{
return x_9;
}
else
{
lean_object* x_11; lean_object* x_12; 
x_11 = lean_ctor_get(x_9, 0);
lean_inc(x_11);
lean_dec(x_9);
x_12 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_12, 0, x_11);
return x_12;
}
}
else
{
lean_object* x_13; size_t x_14; size_t x_15; lean_object* x_16; 
x_13 = lean_ctor_get(x_9, 0);
lean_inc(x_13);
lean_dec(x_9);
x_14 = 1;
x_15 = lean_usize_add(x_2, x_14);
x_16 = lean_array_uset(x_8, x_2, x_13);
x_2 = x_15;
x_3 = x_16;
goto _start;
}
}
}
}
static lean_object* _init_l_Lake_RegistryPkg_fromJson_x3f___closed__1() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("sources", 7, 7);
return x_1;
}
}
static lean_object* _init_l_Lake_RegistryPkg_fromJson_x3f___closed__2() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_2 = l_Lake_RegistryPkg_fromJson_x3f___closed__1;
x_3 = lean_string_append(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_Lake_RegistryPkg_fromJson_x3f___closed__3() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lake_RegistryPkg_fromJson_x3f___closed__2;
x_2 = l_Lake_RegistrySrc_fromJson_x3f___closed__4;
x_3 = lean_string_append(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_Lake_RegistryPkg_fromJson_x3f___closed__4() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("invalid registry package: ", 26, 26);
return x_1;
}
}
static lean_object* _init_l_Lake_RegistryPkg_fromJson_x3f___closed__5() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("name", 4, 4);
return x_1;
}
}
static lean_object* _init_l_Lake_RegistryPkg_fromJson_x3f___closed__6() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("property not found: ", 20, 20);
return x_1;
}
}
static lean_object* _init_l_Lake_RegistryPkg_fromJson_x3f___closed__7() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lake_RegistryPkg_fromJson_x3f___closed__6;
x_2 = l_Lake_RegistryPkg_fromJson_x3f___closed__5;
x_3 = lean_string_append(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_Lake_RegistryPkg_fromJson_x3f___closed__8() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lake_RegistryPkg_fromJson_x3f___closed__7;
x_2 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_3 = lean_string_append(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_Lake_RegistryPkg_fromJson_x3f___closed__9() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lake_RegistryPkg_fromJson_x3f___closed__4;
x_2 = l_Lake_RegistryPkg_fromJson_x3f___closed__8;
x_3 = lean_string_append(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_Lake_RegistryPkg_fromJson_x3f___closed__10() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lake_RegistryPkg_fromJson_x3f___closed__9;
x_2 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_3 = lean_string_append(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_Lake_RegistryPkg_fromJson_x3f___closed__11() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lake_RegistryPkg_fromJson_x3f___closed__10;
x_2 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
static lean_object* _init_l_Lake_RegistryPkg_fromJson_x3f___closed__12() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_2 = l_Lake_RegistryPkg_fromJson_x3f___closed__5;
x_3 = lean_string_append(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_Lake_RegistryPkg_fromJson_x3f___closed__13() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lake_RegistryPkg_fromJson_x3f___closed__12;
x_2 = l_Lake_RegistrySrc_fromJson_x3f___closed__4;
x_3 = lean_string_append(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_Lake_RegistryPkg_fromJson_x3f___closed__14() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("fullName", 8, 8);
return x_1;
}
}
static lean_object* _init_l_Lake_RegistryPkg_fromJson_x3f___closed__15() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lake_RegistryPkg_fromJson_x3f___closed__6;
x_2 = l_Lake_RegistryPkg_fromJson_x3f___closed__14;
x_3 = lean_string_append(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_Lake_RegistryPkg_fromJson_x3f___closed__16() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lake_RegistryPkg_fromJson_x3f___closed__15;
x_2 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_3 = lean_string_append(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_Lake_RegistryPkg_fromJson_x3f___closed__17() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lake_RegistryPkg_fromJson_x3f___closed__4;
x_2 = l_Lake_RegistryPkg_fromJson_x3f___closed__16;
x_3 = lean_string_append(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_Lake_RegistryPkg_fromJson_x3f___closed__18() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lake_RegistryPkg_fromJson_x3f___closed__17;
x_2 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_3 = lean_string_append(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_Lake_RegistryPkg_fromJson_x3f___closed__19() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lake_RegistryPkg_fromJson_x3f___closed__18;
x_2 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
static lean_object* _init_l_Lake_RegistryPkg_fromJson_x3f___closed__20() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_2 = l_Lake_RegistryPkg_fromJson_x3f___closed__14;
x_3 = lean_string_append(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_Lake_RegistryPkg_fromJson_x3f___closed__21() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lake_RegistryPkg_fromJson_x3f___closed__20;
x_2 = l_Lake_RegistrySrc_fromJson_x3f___closed__4;
x_3 = lean_string_append(x_1, x_2);
return x_3;
}
}
static size_t _init_l_Lake_RegistryPkg_fromJson_x3f___closed__22() {
_start:
{
lean_object* x_1; size_t x_2; 
x_1 = l_Lake_instInhabitedRegistryPkg___closed__1;
x_2 = lean_array_size(x_1);
return x_2;
}
}
static lean_object* _init_l_Lake_RegistryPkg_fromJson_x3f___closed__23() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("expected JSON array, got '", 26, 26);
return x_1;
}
}
static lean_object* _init_l_Lake_RegistryPkg_fromJson_x3f___closed__24() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("'", 1, 1);
return x_1;
}
}
LEAN_EXPORT lean_object* l_Lake_RegistryPkg_fromJson_x3f(lean_object* x_1) {
_start:
{
lean_object* x_2; lean_object* x_12; 
x_12 = l_Lean_Json_getObj_x3f(x_1);
if (lean_obj_tag(x_12) == 0)
{
uint8_t x_13; 
x_13 = !lean_is_exclusive(x_12);
if (x_13 == 0)
{
lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; 
x_14 = lean_ctor_get(x_12, 0);
x_15 = l_Lake_RegistryPkg_fromJson_x3f___closed__4;
x_16 = lean_string_append(x_15, x_14);
lean_dec(x_14);
x_17 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_18 = lean_string_append(x_16, x_17);
lean_ctor_set(x_12, 0, x_18);
return x_12;
}
else
{
lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; 
x_19 = lean_ctor_get(x_12, 0);
lean_inc(x_19);
lean_dec(x_12);
x_20 = l_Lake_RegistryPkg_fromJson_x3f___closed__4;
x_21 = lean_string_append(x_20, x_19);
lean_dec(x_19);
x_22 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_23 = lean_string_append(x_21, x_22);
x_24 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_24, 0, x_23);
return x_24;
}
}
else
{
lean_object* x_25; lean_object* x_26; lean_object* x_27; 
x_25 = lean_ctor_get(x_12, 0);
lean_inc(x_25);
lean_dec(x_12);
x_26 = l_Lake_RegistryPkg_fromJson_x3f___closed__5;
x_27 = l_Lean_RBNode_find___at___private_Lean_Data_Json_Basic_0__Lean_Json_beq_x27___spec__3(x_25, x_26);
if (lean_obj_tag(x_27) == 0)
{
lean_object* x_28; 
lean_dec(x_25);
x_28 = l_Lake_RegistryPkg_fromJson_x3f___closed__11;
return x_28;
}
else
{
lean_object* x_29; lean_object* x_30; 
x_29 = lean_ctor_get(x_27, 0);
lean_inc(x_29);
lean_dec(x_27);
x_30 = l_Lean_Json_getStr_x3f(x_29);
if (lean_obj_tag(x_30) == 0)
{
uint8_t x_31; 
lean_dec(x_25);
x_31 = !lean_is_exclusive(x_30);
if (x_31 == 0)
{
lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; 
x_32 = lean_ctor_get(x_30, 0);
x_33 = l_Lake_RegistryPkg_fromJson_x3f___closed__13;
x_34 = lean_string_append(x_33, x_32);
lean_dec(x_32);
x_35 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_36 = lean_string_append(x_34, x_35);
x_37 = l_Lake_RegistryPkg_fromJson_x3f___closed__4;
x_38 = lean_string_append(x_37, x_36);
lean_dec(x_36);
x_39 = lean_string_append(x_38, x_35);
lean_ctor_set(x_30, 0, x_39);
return x_30;
}
else
{
lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; 
x_40 = lean_ctor_get(x_30, 0);
lean_inc(x_40);
lean_dec(x_30);
x_41 = l_Lake_RegistryPkg_fromJson_x3f___closed__13;
x_42 = lean_string_append(x_41, x_40);
lean_dec(x_40);
x_43 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_44 = lean_string_append(x_42, x_43);
x_45 = l_Lake_RegistryPkg_fromJson_x3f___closed__4;
x_46 = lean_string_append(x_45, x_44);
lean_dec(x_44);
x_47 = lean_string_append(x_46, x_43);
x_48 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_48, 0, x_47);
return x_48;
}
}
else
{
lean_object* x_49; lean_object* x_50; lean_object* x_51; 
x_49 = lean_ctor_get(x_30, 0);
lean_inc(x_49);
lean_dec(x_30);
x_50 = l_Lake_RegistryPkg_fromJson_x3f___closed__14;
x_51 = l_Lean_RBNode_find___at___private_Lean_Data_Json_Basic_0__Lean_Json_beq_x27___spec__3(x_25, x_50);
if (lean_obj_tag(x_51) == 0)
{
lean_object* x_52; 
lean_dec(x_49);
lean_dec(x_25);
x_52 = l_Lake_RegistryPkg_fromJson_x3f___closed__19;
return x_52;
}
else
{
lean_object* x_53; lean_object* x_54; lean_object* x_55; 
x_53 = lean_ctor_get(x_51, 0);
lean_inc(x_53);
if (lean_is_exclusive(x_51)) {
 lean_ctor_release(x_51, 0);
 x_54 = x_51;
} else {
 lean_dec_ref(x_51);
 x_54 = lean_box(0);
}
x_55 = l_Lean_Json_getStr_x3f(x_53);
if (lean_obj_tag(x_55) == 0)
{
uint8_t x_56; 
lean_dec(x_54);
lean_dec(x_49);
lean_dec(x_25);
x_56 = !lean_is_exclusive(x_55);
if (x_56 == 0)
{
lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; lean_object* x_63; lean_object* x_64; 
x_57 = lean_ctor_get(x_55, 0);
x_58 = l_Lake_RegistryPkg_fromJson_x3f___closed__21;
x_59 = lean_string_append(x_58, x_57);
lean_dec(x_57);
x_60 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_61 = lean_string_append(x_59, x_60);
x_62 = l_Lake_RegistryPkg_fromJson_x3f___closed__4;
x_63 = lean_string_append(x_62, x_61);
lean_dec(x_61);
x_64 = lean_string_append(x_63, x_60);
lean_ctor_set(x_55, 0, x_64);
return x_55;
}
else
{
lean_object* x_65; lean_object* x_66; lean_object* x_67; lean_object* x_68; lean_object* x_69; lean_object* x_70; lean_object* x_71; lean_object* x_72; lean_object* x_73; 
x_65 = lean_ctor_get(x_55, 0);
lean_inc(x_65);
lean_dec(x_55);
x_66 = l_Lake_RegistryPkg_fromJson_x3f___closed__21;
x_67 = lean_string_append(x_66, x_65);
lean_dec(x_65);
x_68 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_69 = lean_string_append(x_67, x_68);
x_70 = l_Lake_RegistryPkg_fromJson_x3f___closed__4;
x_71 = lean_string_append(x_70, x_69);
lean_dec(x_69);
x_72 = lean_string_append(x_71, x_68);
x_73 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_73, 0, x_72);
return x_73;
}
}
else
{
lean_object* x_74; lean_object* x_75; lean_object* x_140; lean_object* x_141; 
x_74 = lean_ctor_get(x_55, 0);
lean_inc(x_74);
lean_dec(x_55);
x_140 = l_Lake_RegistryPkg_fromJson_x3f___closed__1;
x_141 = l_Lean_RBNode_find___at___private_Lean_Data_Json_Basic_0__Lean_Json_beq_x27___spec__3(x_25, x_140);
if (lean_obj_tag(x_141) == 0)
{
lean_object* x_142; 
x_142 = lean_box(0);
x_75 = x_142;
goto block_139;
}
else
{
uint8_t x_143; 
x_143 = !lean_is_exclusive(x_141);
if (x_143 == 0)
{
lean_object* x_144; 
x_144 = lean_ctor_get(x_141, 0);
switch (lean_obj_tag(x_144)) {
case 0:
{
lean_object* x_145; 
lean_free_object(x_141);
x_145 = lean_box(0);
x_75 = x_145;
goto block_139;
}
case 4:
{
lean_object* x_146; size_t x_147; size_t x_148; lean_object* x_149; lean_object* x_150; 
x_146 = lean_ctor_get(x_144, 0);
lean_inc(x_146);
lean_dec(x_144);
x_147 = lean_array_size(x_146);
x_148 = 0;
x_149 = l_Array_mapMUnsafe_map___at_Lean_Server_instRpcEncodableArray___spec__3(x_147, x_148, x_146);
x_150 = lean_ctor_get(x_149, 0);
lean_inc(x_150);
lean_dec(x_149);
lean_ctor_set(x_141, 0, x_150);
x_75 = x_141;
goto block_139;
}
default: 
{
lean_object* x_151; lean_object* x_152; lean_object* x_153; lean_object* x_154; lean_object* x_155; lean_object* x_156; 
lean_free_object(x_141);
lean_dec(x_74);
lean_dec(x_54);
lean_dec(x_49);
lean_dec(x_25);
x_151 = lean_unsigned_to_nat(80u);
x_152 = l_Lean_Json_pretty(x_144, x_151);
x_153 = l_Lake_RegistryPkg_fromJson_x3f___closed__23;
x_154 = lean_string_append(x_153, x_152);
lean_dec(x_152);
x_155 = l_Lake_RegistryPkg_fromJson_x3f___closed__24;
x_156 = lean_string_append(x_154, x_155);
x_2 = x_156;
goto block_11;
}
}
}
else
{
lean_object* x_157; 
x_157 = lean_ctor_get(x_141, 0);
lean_inc(x_157);
lean_dec(x_141);
switch (lean_obj_tag(x_157)) {
case 0:
{
lean_object* x_158; 
x_158 = lean_box(0);
x_75 = x_158;
goto block_139;
}
case 4:
{
lean_object* x_159; size_t x_160; size_t x_161; lean_object* x_162; lean_object* x_163; lean_object* x_164; 
x_159 = lean_ctor_get(x_157, 0);
lean_inc(x_159);
lean_dec(x_157);
x_160 = lean_array_size(x_159);
x_161 = 0;
x_162 = l_Array_mapMUnsafe_map___at_Lean_Server_instRpcEncodableArray___spec__3(x_160, x_161, x_159);
x_163 = lean_ctor_get(x_162, 0);
lean_inc(x_163);
lean_dec(x_162);
x_164 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_164, 0, x_163);
x_75 = x_164;
goto block_139;
}
default: 
{
lean_object* x_165; lean_object* x_166; lean_object* x_167; lean_object* x_168; lean_object* x_169; lean_object* x_170; 
lean_dec(x_74);
lean_dec(x_54);
lean_dec(x_49);
lean_dec(x_25);
x_165 = lean_unsigned_to_nat(80u);
x_166 = l_Lean_Json_pretty(x_157, x_165);
x_167 = l_Lake_RegistryPkg_fromJson_x3f___closed__23;
x_168 = lean_string_append(x_167, x_166);
lean_dec(x_166);
x_169 = l_Lake_RegistryPkg_fromJson_x3f___closed__24;
x_170 = lean_string_append(x_168, x_169);
x_2 = x_170;
goto block_11;
}
}
}
}
block_139:
{
if (lean_obj_tag(x_75) == 0)
{
size_t x_76; size_t x_77; lean_object* x_78; lean_object* x_79; 
x_76 = 0;
x_77 = l_Lake_RegistryPkg_fromJson_x3f___closed__22;
x_78 = l_Lake_instInhabitedRegistryPkg___closed__1;
x_79 = l_Array_mapMUnsafe_map___at_Lake_RegistryPkg_fromJson_x3f___spec__1(x_77, x_76, x_78);
if (lean_obj_tag(x_79) == 0)
{
uint8_t x_80; 
lean_dec(x_74);
lean_dec(x_54);
lean_dec(x_49);
lean_dec(x_25);
x_80 = !lean_is_exclusive(x_79);
if (x_80 == 0)
{
lean_object* x_81; lean_object* x_82; lean_object* x_83; lean_object* x_84; lean_object* x_85; 
x_81 = lean_ctor_get(x_79, 0);
x_82 = l_Lake_RegistryPkg_fromJson_x3f___closed__4;
x_83 = lean_string_append(x_82, x_81);
lean_dec(x_81);
x_84 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_85 = lean_string_append(x_83, x_84);
lean_ctor_set(x_79, 0, x_85);
return x_79;
}
else
{
lean_object* x_86; lean_object* x_87; lean_object* x_88; lean_object* x_89; lean_object* x_90; lean_object* x_91; 
x_86 = lean_ctor_get(x_79, 0);
lean_inc(x_86);
lean_dec(x_79);
x_87 = l_Lake_RegistryPkg_fromJson_x3f___closed__4;
x_88 = lean_string_append(x_87, x_86);
lean_dec(x_86);
x_89 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_90 = lean_string_append(x_88, x_89);
x_91 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_91, 0, x_90);
return x_91;
}
}
else
{
uint8_t x_92; 
x_92 = !lean_is_exclusive(x_79);
if (x_92 == 0)
{
lean_object* x_93; lean_object* x_94; lean_object* x_95; 
x_93 = lean_ctor_get(x_79, 0);
if (lean_is_scalar(x_54)) {
 x_94 = lean_alloc_ctor(5, 1, 0);
} else {
 x_94 = x_54;
 lean_ctor_set_tag(x_94, 5);
}
lean_ctor_set(x_94, 0, x_25);
x_95 = lean_alloc_ctor(0, 4, 0);
lean_ctor_set(x_95, 0, x_49);
lean_ctor_set(x_95, 1, x_74);
lean_ctor_set(x_95, 2, x_93);
lean_ctor_set(x_95, 3, x_94);
lean_ctor_set(x_79, 0, x_95);
return x_79;
}
else
{
lean_object* x_96; lean_object* x_97; lean_object* x_98; lean_object* x_99; 
x_96 = lean_ctor_get(x_79, 0);
lean_inc(x_96);
lean_dec(x_79);
if (lean_is_scalar(x_54)) {
 x_97 = lean_alloc_ctor(5, 1, 0);
} else {
 x_97 = x_54;
 lean_ctor_set_tag(x_97, 5);
}
lean_ctor_set(x_97, 0, x_25);
x_98 = lean_alloc_ctor(0, 4, 0);
lean_ctor_set(x_98, 0, x_49);
lean_ctor_set(x_98, 1, x_74);
lean_ctor_set(x_98, 2, x_96);
lean_ctor_set(x_98, 3, x_97);
x_99 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_99, 0, x_98);
return x_99;
}
}
}
else
{
uint8_t x_100; 
lean_dec(x_54);
x_100 = !lean_is_exclusive(x_75);
if (x_100 == 0)
{
lean_object* x_101; size_t x_102; size_t x_103; lean_object* x_104; 
x_101 = lean_ctor_get(x_75, 0);
x_102 = lean_array_size(x_101);
x_103 = 0;
x_104 = l_Array_mapMUnsafe_map___at_Lake_RegistryPkg_fromJson_x3f___spec__1(x_102, x_103, x_101);
if (lean_obj_tag(x_104) == 0)
{
uint8_t x_105; 
lean_free_object(x_75);
lean_dec(x_74);
lean_dec(x_49);
lean_dec(x_25);
x_105 = !lean_is_exclusive(x_104);
if (x_105 == 0)
{
lean_object* x_106; lean_object* x_107; lean_object* x_108; lean_object* x_109; lean_object* x_110; 
x_106 = lean_ctor_get(x_104, 0);
x_107 = l_Lake_RegistryPkg_fromJson_x3f___closed__4;
x_108 = lean_string_append(x_107, x_106);
lean_dec(x_106);
x_109 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_110 = lean_string_append(x_108, x_109);
lean_ctor_set(x_104, 0, x_110);
return x_104;
}
else
{
lean_object* x_111; lean_object* x_112; lean_object* x_113; lean_object* x_114; lean_object* x_115; lean_object* x_116; 
x_111 = lean_ctor_get(x_104, 0);
lean_inc(x_111);
lean_dec(x_104);
x_112 = l_Lake_RegistryPkg_fromJson_x3f___closed__4;
x_113 = lean_string_append(x_112, x_111);
lean_dec(x_111);
x_114 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_115 = lean_string_append(x_113, x_114);
x_116 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_116, 0, x_115);
return x_116;
}
}
else
{
uint8_t x_117; 
x_117 = !lean_is_exclusive(x_104);
if (x_117 == 0)
{
lean_object* x_118; lean_object* x_119; 
x_118 = lean_ctor_get(x_104, 0);
lean_ctor_set_tag(x_75, 5);
lean_ctor_set(x_75, 0, x_25);
x_119 = lean_alloc_ctor(0, 4, 0);
lean_ctor_set(x_119, 0, x_49);
lean_ctor_set(x_119, 1, x_74);
lean_ctor_set(x_119, 2, x_118);
lean_ctor_set(x_119, 3, x_75);
lean_ctor_set(x_104, 0, x_119);
return x_104;
}
else
{
lean_object* x_120; lean_object* x_121; lean_object* x_122; 
x_120 = lean_ctor_get(x_104, 0);
lean_inc(x_120);
lean_dec(x_104);
lean_ctor_set_tag(x_75, 5);
lean_ctor_set(x_75, 0, x_25);
x_121 = lean_alloc_ctor(0, 4, 0);
lean_ctor_set(x_121, 0, x_49);
lean_ctor_set(x_121, 1, x_74);
lean_ctor_set(x_121, 2, x_120);
lean_ctor_set(x_121, 3, x_75);
x_122 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_122, 0, x_121);
return x_122;
}
}
}
else
{
lean_object* x_123; size_t x_124; size_t x_125; lean_object* x_126; 
x_123 = lean_ctor_get(x_75, 0);
lean_inc(x_123);
lean_dec(x_75);
x_124 = lean_array_size(x_123);
x_125 = 0;
x_126 = l_Array_mapMUnsafe_map___at_Lake_RegistryPkg_fromJson_x3f___spec__1(x_124, x_125, x_123);
if (lean_obj_tag(x_126) == 0)
{
lean_object* x_127; lean_object* x_128; lean_object* x_129; lean_object* x_130; lean_object* x_131; lean_object* x_132; lean_object* x_133; 
lean_dec(x_74);
lean_dec(x_49);
lean_dec(x_25);
x_127 = lean_ctor_get(x_126, 0);
lean_inc(x_127);
if (lean_is_exclusive(x_126)) {
 lean_ctor_release(x_126, 0);
 x_128 = x_126;
} else {
 lean_dec_ref(x_126);
 x_128 = lean_box(0);
}
x_129 = l_Lake_RegistryPkg_fromJson_x3f___closed__4;
x_130 = lean_string_append(x_129, x_127);
lean_dec(x_127);
x_131 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_132 = lean_string_append(x_130, x_131);
if (lean_is_scalar(x_128)) {
 x_133 = lean_alloc_ctor(0, 1, 0);
} else {
 x_133 = x_128;
}
lean_ctor_set(x_133, 0, x_132);
return x_133;
}
else
{
lean_object* x_134; lean_object* x_135; lean_object* x_136; lean_object* x_137; lean_object* x_138; 
x_134 = lean_ctor_get(x_126, 0);
lean_inc(x_134);
if (lean_is_exclusive(x_126)) {
 lean_ctor_release(x_126, 0);
 x_135 = x_126;
} else {
 lean_dec_ref(x_126);
 x_135 = lean_box(0);
}
x_136 = lean_alloc_ctor(5, 1, 0);
lean_ctor_set(x_136, 0, x_25);
x_137 = lean_alloc_ctor(0, 4, 0);
lean_ctor_set(x_137, 0, x_49);
lean_ctor_set(x_137, 1, x_74);
lean_ctor_set(x_137, 2, x_134);
lean_ctor_set(x_137, 3, x_136);
if (lean_is_scalar(x_135)) {
 x_138 = lean_alloc_ctor(1, 1, 0);
} else {
 x_138 = x_135;
}
lean_ctor_set(x_138, 0, x_137);
return x_138;
}
}
}
}
}
}
}
}
}
block_11:
{
lean_object* x_3; lean_object* x_4; lean_object* x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; 
x_3 = l_Lake_RegistryPkg_fromJson_x3f___closed__3;
x_4 = lean_string_append(x_3, x_2);
lean_dec(x_2);
x_5 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_6 = lean_string_append(x_4, x_5);
x_7 = l_Lake_RegistryPkg_fromJson_x3f___closed__4;
x_8 = lean_string_append(x_7, x_6);
lean_dec(x_6);
x_9 = lean_string_append(x_8, x_5);
x_10 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_10, 0, x_9);
return x_10;
}
}
}
LEAN_EXPORT lean_object* l_Array_mapMUnsafe_map___at_Lake_RegistryPkg_fromJson_x3f___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
size_t x_4; size_t x_5; lean_object* x_6; 
x_4 = lean_unbox_usize(x_1);
lean_dec(x_1);
x_5 = lean_unbox_usize(x_2);
lean_dec(x_2);
x_6 = l_Array_mapMUnsafe_map___at_Lake_RegistryPkg_fromJson_x3f___spec__1(x_4, x_5, x_3);
return x_6;
}
}
static lean_object* _init_l_Lake_RegistryPkg_instFromJson___closed__1() {
_start:
{
lean_object* x_1; 
x_1 = lean_alloc_closure((void*)(l_Lake_RegistryPkg_fromJson_x3f), 1, 0);
return x_1;
}
}
static lean_object* _init_l_Lake_RegistryPkg_instFromJson() {
_start:
{
lean_object* x_1; 
x_1 = l_Lake_RegistryPkg_instFromJson___closed__1;
return x_1;
}
}
LEAN_EXPORT uint32_t l_Lake_hexEncodeByte(uint8_t x_1) {
_start:
{
uint8_t x_2; uint8_t x_3; 
x_2 = 0;
x_3 = lean_uint8_dec_eq(x_1, x_2);
if (x_3 == 0)
{
uint8_t x_4; uint8_t x_5; 
x_4 = 1;
x_5 = lean_uint8_dec_eq(x_1, x_4);
if (x_5 == 0)
{
uint8_t x_6; uint8_t x_7; 
x_6 = 2;
x_7 = lean_uint8_dec_eq(x_1, x_6);
if (x_7 == 0)
{
uint8_t x_8; uint8_t x_9; 
x_8 = 3;
x_9 = lean_uint8_dec_eq(x_1, x_8);
if (x_9 == 0)
{
uint8_t x_10; uint8_t x_11; 
x_10 = 4;
x_11 = lean_uint8_dec_eq(x_1, x_10);
if (x_11 == 0)
{
uint8_t x_12; uint8_t x_13; 
x_12 = 5;
x_13 = lean_uint8_dec_eq(x_1, x_12);
if (x_13 == 0)
{
uint8_t x_14; uint8_t x_15; 
x_14 = 6;
x_15 = lean_uint8_dec_eq(x_1, x_14);
if (x_15 == 0)
{
uint8_t x_16; uint8_t x_17; 
x_16 = 7;
x_17 = lean_uint8_dec_eq(x_1, x_16);
if (x_17 == 0)
{
uint8_t x_18; uint8_t x_19; 
x_18 = 8;
x_19 = lean_uint8_dec_eq(x_1, x_18);
if (x_19 == 0)
{
uint8_t x_20; uint8_t x_21; 
x_20 = 9;
x_21 = lean_uint8_dec_eq(x_1, x_20);
if (x_21 == 0)
{
uint8_t x_22; uint8_t x_23; 
x_22 = 10;
x_23 = lean_uint8_dec_eq(x_1, x_22);
if (x_23 == 0)
{
uint8_t x_24; uint8_t x_25; 
x_24 = 11;
x_25 = lean_uint8_dec_eq(x_1, x_24);
if (x_25 == 0)
{
uint8_t x_26; uint8_t x_27; 
x_26 = 12;
x_27 = lean_uint8_dec_eq(x_1, x_26);
if (x_27 == 0)
{
uint8_t x_28; uint8_t x_29; 
x_28 = 13;
x_29 = lean_uint8_dec_eq(x_1, x_28);
if (x_29 == 0)
{
uint8_t x_30; uint8_t x_31; 
x_30 = 14;
x_31 = lean_uint8_dec_eq(x_1, x_30);
if (x_31 == 0)
{
uint8_t x_32; uint8_t x_33; 
x_32 = 15;
x_33 = lean_uint8_dec_eq(x_1, x_32);
if (x_33 == 0)
{
uint32_t x_34; 
x_34 = 42;
return x_34;
}
else
{
uint32_t x_35; 
x_35 = 70;
return x_35;
}
}
else
{
uint32_t x_36; 
x_36 = 69;
return x_36;
}
}
else
{
uint32_t x_37; 
x_37 = 68;
return x_37;
}
}
else
{
uint32_t x_38; 
x_38 = 67;
return x_38;
}
}
else
{
uint32_t x_39; 
x_39 = 66;
return x_39;
}
}
else
{
uint32_t x_40; 
x_40 = 65;
return x_40;
}
}
else
{
uint32_t x_41; 
x_41 = 57;
return x_41;
}
}
else
{
uint32_t x_42; 
x_42 = 56;
return x_42;
}
}
else
{
uint32_t x_43; 
x_43 = 55;
return x_43;
}
}
else
{
uint32_t x_44; 
x_44 = 54;
return x_44;
}
}
else
{
uint32_t x_45; 
x_45 = 53;
return x_45;
}
}
else
{
uint32_t x_46; 
x_46 = 52;
return x_46;
}
}
else
{
uint32_t x_47; 
x_47 = 51;
return x_47;
}
}
else
{
uint32_t x_48; 
x_48 = 50;
return x_48;
}
}
else
{
uint32_t x_49; 
x_49 = 49;
return x_49;
}
}
else
{
uint32_t x_50; 
x_50 = 48;
return x_50;
}
}
}
LEAN_EXPORT lean_object* l_Lake_hexEncodeByte___boxed(lean_object* x_1) {
_start:
{
uint8_t x_2; uint32_t x_3; lean_object* x_4; 
x_2 = lean_unbox(x_1);
lean_dec(x_1);
x_3 = l_Lake_hexEncodeByte(x_2);
x_4 = lean_box_uint32(x_3);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lake_uriEscapeByte(uint8_t x_1, lean_object* x_2) {
_start:
{
uint32_t x_3; lean_object* x_4; uint8_t x_5; uint8_t x_6; uint32_t x_7; lean_object* x_8; uint8_t x_9; uint8_t x_10; uint32_t x_11; lean_object* x_12; 
x_3 = 37;
x_4 = lean_string_push(x_2, x_3);
x_5 = 4;
x_6 = lean_uint8_shift_right(x_1, x_5);
x_7 = l_Lake_hexEncodeByte(x_6);
x_8 = lean_string_push(x_4, x_7);
x_9 = 15;
x_10 = lean_uint8_land(x_1, x_9);
x_11 = l_Lake_hexEncodeByte(x_10);
x_12 = lean_string_push(x_8, x_11);
return x_12;
}
}
LEAN_EXPORT lean_object* l_Lake_uriEscapeByte___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
uint8_t x_3; lean_object* x_4; 
x_3 = lean_unbox(x_1);
lean_dec(x_1);
x_4 = l_Lake_uriEscapeByte(x_3, x_2);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lake_utf8EncodeCharM___rarg___lambda__1(uint32_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
uint32_t x_5; uint32_t x_6; uint8_t x_7; uint8_t x_8; uint8_t x_9; uint8_t x_10; uint8_t x_11; lean_object* x_12; lean_object* x_13; 
x_5 = 18;
x_6 = lean_uint32_shift_right(x_1, x_5);
x_7 = lean_uint32_to_uint8(x_6);
x_8 = 7;
x_9 = lean_uint8_land(x_7, x_8);
x_10 = 240;
x_11 = lean_uint8_lor(x_9, x_10);
x_12 = lean_box(x_11);
x_13 = lean_apply_2(x_2, x_3, x_12);
return x_13;
}
}
LEAN_EXPORT lean_object* l_Lake_utf8EncodeCharM___rarg___lambda__2(uint32_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; lean_object* x_7; uint32_t x_8; uint8_t x_9; 
x_6 = lean_box_uint32(x_1);
lean_inc(x_5);
x_7 = lean_alloc_closure((void*)(l_Lake_utf8EncodeCharM___rarg___lambda__1___boxed), 4, 3);
lean_closure_set(x_7, 0, x_6);
lean_closure_set(x_7, 1, x_2);
lean_closure_set(x_7, 2, x_5);
x_8 = 65535;
x_9 = lean_uint32_dec_le(x_1, x_8);
if (x_9 == 0)
{
lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; 
lean_dec(x_5);
x_10 = lean_ctor_get(x_3, 0);
lean_inc(x_10);
lean_dec(x_3);
x_11 = lean_ctor_get(x_10, 1);
lean_inc(x_11);
lean_dec(x_10);
x_12 = lean_box(0);
x_13 = lean_apply_2(x_11, lean_box(0), x_12);
x_14 = lean_apply_4(x_4, lean_box(0), lean_box(0), x_13, x_7);
return x_14;
}
else
{
lean_object* x_15; lean_object* x_16; lean_object* x_17; 
lean_dec(x_7);
lean_dec(x_4);
x_15 = lean_ctor_get(x_3, 0);
lean_inc(x_15);
lean_dec(x_3);
x_16 = lean_ctor_get(x_15, 1);
lean_inc(x_16);
lean_dec(x_15);
x_17 = lean_apply_2(x_16, lean_box(0), x_5);
return x_17;
}
}
}
LEAN_EXPORT lean_object* l_Lake_utf8EncodeCharM___rarg___lambda__3(uint32_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
uint32_t x_7; uint32_t x_8; uint8_t x_9; uint8_t x_10; uint8_t x_11; uint8_t x_12; uint8_t x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; 
x_7 = 12;
x_8 = lean_uint32_shift_right(x_1, x_7);
x_9 = lean_uint32_to_uint8(x_8);
x_10 = 15;
x_11 = lean_uint8_land(x_9, x_10);
x_12 = 224;
x_13 = lean_uint8_lor(x_11, x_12);
x_14 = lean_box(x_13);
lean_inc(x_2);
x_15 = lean_apply_2(x_2, x_3, x_14);
x_16 = lean_box_uint32(x_1);
lean_inc(x_5);
x_17 = lean_alloc_closure((void*)(l_Lake_utf8EncodeCharM___rarg___lambda__2___boxed), 5, 4);
lean_closure_set(x_17, 0, x_16);
lean_closure_set(x_17, 1, x_2);
lean_closure_set(x_17, 2, x_4);
lean_closure_set(x_17, 3, x_5);
x_18 = lean_apply_4(x_5, lean_box(0), lean_box(0), x_15, x_17);
return x_18;
}
}
LEAN_EXPORT lean_object* l_Lake_utf8EncodeCharM___rarg___lambda__4(uint32_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; lean_object* x_7; uint32_t x_8; uint8_t x_9; 
x_6 = lean_box_uint32(x_1);
lean_inc(x_4);
lean_inc(x_3);
lean_inc(x_5);
x_7 = lean_alloc_closure((void*)(l_Lake_utf8EncodeCharM___rarg___lambda__3___boxed), 6, 5);
lean_closure_set(x_7, 0, x_6);
lean_closure_set(x_7, 1, x_2);
lean_closure_set(x_7, 2, x_5);
lean_closure_set(x_7, 3, x_3);
lean_closure_set(x_7, 4, x_4);
x_8 = 2047;
x_9 = lean_uint32_dec_le(x_1, x_8);
if (x_9 == 0)
{
lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; 
lean_dec(x_5);
x_10 = lean_ctor_get(x_3, 0);
lean_inc(x_10);
lean_dec(x_3);
x_11 = lean_ctor_get(x_10, 1);
lean_inc(x_11);
lean_dec(x_10);
x_12 = lean_box(0);
x_13 = lean_apply_2(x_11, lean_box(0), x_12);
x_14 = lean_apply_4(x_4, lean_box(0), lean_box(0), x_13, x_7);
return x_14;
}
else
{
lean_object* x_15; lean_object* x_16; lean_object* x_17; 
lean_dec(x_7);
lean_dec(x_4);
x_15 = lean_ctor_get(x_3, 0);
lean_inc(x_15);
lean_dec(x_3);
x_16 = lean_ctor_get(x_15, 1);
lean_inc(x_16);
lean_dec(x_15);
x_17 = lean_apply_2(x_16, lean_box(0), x_5);
return x_17;
}
}
}
LEAN_EXPORT lean_object* l_Lake_utf8EncodeCharM___rarg___lambda__5(uint32_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
uint32_t x_7; uint32_t x_8; uint8_t x_9; uint8_t x_10; uint8_t x_11; uint8_t x_12; uint8_t x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; 
x_7 = 6;
x_8 = lean_uint32_shift_right(x_1, x_7);
x_9 = lean_uint32_to_uint8(x_8);
x_10 = 31;
x_11 = lean_uint8_land(x_9, x_10);
x_12 = 192;
x_13 = lean_uint8_lor(x_11, x_12);
x_14 = lean_box(x_13);
lean_inc(x_2);
x_15 = lean_apply_2(x_2, x_3, x_14);
x_16 = lean_box_uint32(x_1);
lean_inc(x_5);
x_17 = lean_alloc_closure((void*)(l_Lake_utf8EncodeCharM___rarg___lambda__4___boxed), 5, 4);
lean_closure_set(x_17, 0, x_16);
lean_closure_set(x_17, 1, x_2);
lean_closure_set(x_17, 2, x_4);
lean_closure_set(x_17, 3, x_5);
x_18 = lean_apply_4(x_5, lean_box(0), lean_box(0), x_15, x_17);
return x_18;
}
}
LEAN_EXPORT lean_object* l_Lake_utf8EncodeCharM___rarg___lambda__6(uint32_t x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; lean_object* x_7; uint32_t x_8; uint8_t x_9; 
x_6 = lean_box_uint32(x_1);
lean_inc(x_4);
lean_inc(x_3);
lean_inc(x_5);
x_7 = lean_alloc_closure((void*)(l_Lake_utf8EncodeCharM___rarg___lambda__5___boxed), 6, 5);
lean_closure_set(x_7, 0, x_6);
lean_closure_set(x_7, 1, x_2);
lean_closure_set(x_7, 2, x_5);
lean_closure_set(x_7, 3, x_3);
lean_closure_set(x_7, 4, x_4);
x_8 = 127;
x_9 = lean_uint32_dec_le(x_1, x_8);
if (x_9 == 0)
{
lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; 
lean_dec(x_5);
x_10 = lean_ctor_get(x_3, 0);
lean_inc(x_10);
lean_dec(x_3);
x_11 = lean_ctor_get(x_10, 1);
lean_inc(x_11);
lean_dec(x_10);
x_12 = lean_box(0);
x_13 = lean_apply_2(x_11, lean_box(0), x_12);
x_14 = lean_apply_4(x_4, lean_box(0), lean_box(0), x_13, x_7);
return x_14;
}
else
{
lean_object* x_15; lean_object* x_16; lean_object* x_17; 
lean_dec(x_7);
lean_dec(x_4);
x_15 = lean_ctor_get(x_3, 0);
lean_inc(x_15);
lean_dec(x_3);
x_16 = lean_ctor_get(x_15, 1);
lean_inc(x_16);
lean_dec(x_15);
x_17 = lean_apply_2(x_16, lean_box(0), x_5);
return x_17;
}
}
}
LEAN_EXPORT lean_object* l_Lake_utf8EncodeCharM___rarg(lean_object* x_1, uint32_t x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; uint8_t x_6; uint8_t x_7; uint8_t x_8; uint8_t x_9; uint8_t x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; 
x_5 = lean_ctor_get(x_1, 1);
lean_inc(x_5);
x_6 = lean_uint32_to_uint8(x_2);
x_7 = 63;
x_8 = lean_uint8_land(x_6, x_7);
x_9 = 128;
x_10 = lean_uint8_lor(x_8, x_9);
x_11 = lean_box(x_10);
lean_inc(x_3);
x_12 = lean_apply_2(x_3, x_4, x_11);
x_13 = lean_box_uint32(x_2);
lean_inc(x_5);
x_14 = lean_alloc_closure((void*)(l_Lake_utf8EncodeCharM___rarg___lambda__6___boxed), 5, 4);
lean_closure_set(x_14, 0, x_13);
lean_closure_set(x_14, 1, x_3);
lean_closure_set(x_14, 2, x_1);
lean_closure_set(x_14, 3, x_5);
x_15 = lean_apply_4(x_5, lean_box(0), lean_box(0), x_12, x_14);
return x_15;
}
}
LEAN_EXPORT lean_object* l_Lake_utf8EncodeCharM(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; 
x_3 = lean_alloc_closure((void*)(l_Lake_utf8EncodeCharM___rarg___boxed), 4, 0);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Lake_utf8EncodeCharM___rarg___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
uint32_t x_5; lean_object* x_6; 
x_5 = lean_unbox_uint32(x_1);
lean_dec(x_1);
x_6 = l_Lake_utf8EncodeCharM___rarg___lambda__1(x_5, x_2, x_3, x_4);
lean_dec(x_4);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lake_utf8EncodeCharM___rarg___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
uint32_t x_6; lean_object* x_7; 
x_6 = lean_unbox_uint32(x_1);
lean_dec(x_1);
x_7 = l_Lake_utf8EncodeCharM___rarg___lambda__2(x_6, x_2, x_3, x_4, x_5);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Lake_utf8EncodeCharM___rarg___lambda__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
uint32_t x_7; lean_object* x_8; 
x_7 = lean_unbox_uint32(x_1);
lean_dec(x_1);
x_8 = l_Lake_utf8EncodeCharM___rarg___lambda__3(x_7, x_2, x_3, x_4, x_5, x_6);
lean_dec(x_6);
return x_8;
}
}
LEAN_EXPORT lean_object* l_Lake_utf8EncodeCharM___rarg___lambda__4___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
uint32_t x_6; lean_object* x_7; 
x_6 = lean_unbox_uint32(x_1);
lean_dec(x_1);
x_7 = l_Lake_utf8EncodeCharM___rarg___lambda__4(x_6, x_2, x_3, x_4, x_5);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Lake_utf8EncodeCharM___rarg___lambda__5___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5, lean_object* x_6) {
_start:
{
uint32_t x_7; lean_object* x_8; 
x_7 = lean_unbox_uint32(x_1);
lean_dec(x_1);
x_8 = l_Lake_utf8EncodeCharM___rarg___lambda__5(x_7, x_2, x_3, x_4, x_5, x_6);
lean_dec(x_6);
return x_8;
}
}
LEAN_EXPORT lean_object* l_Lake_utf8EncodeCharM___rarg___lambda__6___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
uint32_t x_6; lean_object* x_7; 
x_6 = lean_unbox_uint32(x_1);
lean_dec(x_1);
x_7 = l_Lake_utf8EncodeCharM___rarg___lambda__6(x_6, x_2, x_3, x_4, x_5);
return x_7;
}
}
LEAN_EXPORT lean_object* l_Lake_utf8EncodeCharM___rarg___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
uint32_t x_5; lean_object* x_6; 
x_5 = lean_unbox_uint32(x_2);
lean_dec(x_2);
x_6 = l_Lake_utf8EncodeCharM___rarg(x_1, x_5, x_3, x_4);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lake_utf8EncodeCharM___at_Lake_uriEscapeChar___spec__1___lambda__1(uint32_t x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
uint32_t x_4; uint32_t x_5; uint8_t x_6; uint8_t x_7; uint8_t x_8; uint8_t x_9; uint8_t x_10; lean_object* x_11; 
x_4 = 18;
x_5 = lean_uint32_shift_right(x_1, x_4);
x_6 = lean_uint32_to_uint8(x_5);
x_7 = 7;
x_8 = lean_uint8_land(x_6, x_7);
x_9 = 240;
x_10 = lean_uint8_lor(x_8, x_9);
x_11 = l_Lake_uriEscapeByte(x_10, x_2);
return x_11;
}
}
LEAN_EXPORT lean_object* l_Lake_utf8EncodeCharM___at_Lake_uriEscapeChar___spec__1___lambda__2(uint32_t x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
uint32_t x_4; uint32_t x_5; uint8_t x_6; uint8_t x_7; uint8_t x_8; uint8_t x_9; uint8_t x_10; lean_object* x_11; uint32_t x_12; uint8_t x_13; 
x_4 = 12;
x_5 = lean_uint32_shift_right(x_1, x_4);
x_6 = lean_uint32_to_uint8(x_5);
x_7 = 15;
x_8 = lean_uint8_land(x_6, x_7);
x_9 = 224;
x_10 = lean_uint8_lor(x_8, x_9);
x_11 = l_Lake_uriEscapeByte(x_10, x_2);
x_12 = 65535;
x_13 = lean_uint32_dec_le(x_1, x_12);
if (x_13 == 0)
{
lean_object* x_14; lean_object* x_15; 
x_14 = lean_box(0);
x_15 = l_Lake_utf8EncodeCharM___at_Lake_uriEscapeChar___spec__1___lambda__1(x_1, x_11, x_14);
return x_15;
}
else
{
return x_11;
}
}
}
LEAN_EXPORT lean_object* l_Lake_utf8EncodeCharM___at_Lake_uriEscapeChar___spec__1___lambda__3(uint32_t x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
uint32_t x_4; uint32_t x_5; uint8_t x_6; uint8_t x_7; uint8_t x_8; uint8_t x_9; uint8_t x_10; lean_object* x_11; uint32_t x_12; uint8_t x_13; 
x_4 = 6;
x_5 = lean_uint32_shift_right(x_1, x_4);
x_6 = lean_uint32_to_uint8(x_5);
x_7 = 31;
x_8 = lean_uint8_land(x_6, x_7);
x_9 = 192;
x_10 = lean_uint8_lor(x_8, x_9);
x_11 = l_Lake_uriEscapeByte(x_10, x_2);
x_12 = 2047;
x_13 = lean_uint32_dec_le(x_1, x_12);
if (x_13 == 0)
{
lean_object* x_14; lean_object* x_15; 
x_14 = lean_box(0);
x_15 = l_Lake_utf8EncodeCharM___at_Lake_uriEscapeChar___spec__1___lambda__2(x_1, x_11, x_14);
return x_15;
}
else
{
return x_11;
}
}
}
LEAN_EXPORT lean_object* l_Lake_utf8EncodeCharM___at_Lake_uriEscapeChar___spec__1(uint32_t x_1, lean_object* x_2) {
_start:
{
uint8_t x_3; uint8_t x_4; uint8_t x_5; uint8_t x_6; uint8_t x_7; lean_object* x_8; uint32_t x_9; uint8_t x_10; 
x_3 = lean_uint32_to_uint8(x_1);
x_4 = 63;
x_5 = lean_uint8_land(x_3, x_4);
x_6 = 128;
x_7 = lean_uint8_lor(x_5, x_6);
x_8 = l_Lake_uriEscapeByte(x_7, x_2);
x_9 = 127;
x_10 = lean_uint32_dec_le(x_1, x_9);
if (x_10 == 0)
{
lean_object* x_11; lean_object* x_12; 
x_11 = lean_box(0);
x_12 = l_Lake_utf8EncodeCharM___at_Lake_uriEscapeChar___spec__1___lambda__3(x_1, x_8, x_11);
return x_12;
}
else
{
return x_8;
}
}
}
LEAN_EXPORT lean_object* l_Lake_uriEscapeChar(uint32_t x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; 
x_3 = l_Lake_utf8EncodeCharM___at_Lake_uriEscapeChar___spec__1(x_1, x_2);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Lake_utf8EncodeCharM___at_Lake_uriEscapeChar___spec__1___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
uint32_t x_4; lean_object* x_5; 
x_4 = lean_unbox_uint32(x_1);
lean_dec(x_1);
x_5 = l_Lake_utf8EncodeCharM___at_Lake_uriEscapeChar___spec__1___lambda__1(x_4, x_2, x_3);
lean_dec(x_3);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lake_utf8EncodeCharM___at_Lake_uriEscapeChar___spec__1___lambda__2___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
uint32_t x_4; lean_object* x_5; 
x_4 = lean_unbox_uint32(x_1);
lean_dec(x_1);
x_5 = l_Lake_utf8EncodeCharM___at_Lake_uriEscapeChar___spec__1___lambda__2(x_4, x_2, x_3);
lean_dec(x_3);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lake_utf8EncodeCharM___at_Lake_uriEscapeChar___spec__1___lambda__3___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3) {
_start:
{
uint32_t x_4; lean_object* x_5; 
x_4 = lean_unbox_uint32(x_1);
lean_dec(x_1);
x_5 = l_Lake_utf8EncodeCharM___at_Lake_uriEscapeChar___spec__1___lambda__3(x_4, x_2, x_3);
lean_dec(x_3);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lake_utf8EncodeCharM___at_Lake_uriEscapeChar___spec__1___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
uint32_t x_3; lean_object* x_4; 
x_3 = lean_unbox_uint32(x_1);
lean_dec(x_1);
x_4 = l_Lake_utf8EncodeCharM___at_Lake_uriEscapeChar___spec__1(x_3, x_2);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lake_uriEscapeChar___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
uint32_t x_3; lean_object* x_4; 
x_3 = lean_unbox_uint32(x_1);
lean_dec(x_1);
x_4 = l_Lake_uriEscapeChar(x_3, x_2);
return x_4;
}
}
LEAN_EXPORT uint8_t l_Lake_isUriUnreservedMark(uint32_t x_1) {
_start:
{
uint32_t x_2; uint8_t x_3; 
x_2 = 45;
x_3 = lean_uint32_dec_eq(x_1, x_2);
if (x_3 == 0)
{
uint32_t x_4; uint8_t x_5; 
x_4 = 95;
x_5 = lean_uint32_dec_eq(x_1, x_4);
if (x_5 == 0)
{
uint32_t x_6; uint8_t x_7; 
x_6 = 46;
x_7 = lean_uint32_dec_eq(x_1, x_6);
if (x_7 == 0)
{
uint32_t x_8; uint8_t x_9; 
x_8 = 33;
x_9 = lean_uint32_dec_eq(x_1, x_8);
if (x_9 == 0)
{
uint32_t x_10; uint8_t x_11; 
x_10 = 126;
x_11 = lean_uint32_dec_eq(x_1, x_10);
if (x_11 == 0)
{
uint32_t x_12; uint8_t x_13; 
x_12 = 42;
x_13 = lean_uint32_dec_eq(x_1, x_12);
if (x_13 == 0)
{
uint32_t x_14; uint8_t x_15; 
x_14 = 39;
x_15 = lean_uint32_dec_eq(x_1, x_14);
if (x_15 == 0)
{
uint32_t x_16; uint8_t x_17; 
x_16 = 40;
x_17 = lean_uint32_dec_eq(x_1, x_16);
if (x_17 == 0)
{
uint32_t x_18; uint8_t x_19; 
x_18 = 41;
x_19 = lean_uint32_dec_eq(x_1, x_18);
return x_19;
}
else
{
uint8_t x_20; 
x_20 = 1;
return x_20;
}
}
else
{
uint8_t x_21; 
x_21 = 1;
return x_21;
}
}
else
{
uint8_t x_22; 
x_22 = 1;
return x_22;
}
}
else
{
uint8_t x_23; 
x_23 = 1;
return x_23;
}
}
else
{
uint8_t x_24; 
x_24 = 1;
return x_24;
}
}
else
{
uint8_t x_25; 
x_25 = 1;
return x_25;
}
}
else
{
uint8_t x_26; 
x_26 = 1;
return x_26;
}
}
else
{
uint8_t x_27; 
x_27 = 1;
return x_27;
}
}
}
LEAN_EXPORT lean_object* l_Lake_isUriUnreservedMark___boxed(lean_object* x_1) {
_start:
{
uint32_t x_2; uint8_t x_3; lean_object* x_4; 
x_2 = lean_unbox_uint32(x_1);
lean_dec(x_1);
x_3 = l_Lake_isUriUnreservedMark(x_2);
x_4 = lean_box(x_3);
return x_4;
}
}
LEAN_EXPORT lean_object* l_Lake_uriEncodeChar(uint32_t x_1, lean_object* x_2) {
_start:
{
uint8_t x_3; 
x_3 = l_Char_isAlphanum(x_1);
if (x_3 == 0)
{
uint8_t x_4; 
x_4 = l_Lake_isUriUnreservedMark(x_1);
if (x_4 == 0)
{
lean_object* x_5; 
x_5 = l_Lake_utf8EncodeCharM___at_Lake_uriEscapeChar___spec__1(x_1, x_2);
return x_5;
}
else
{
lean_object* x_6; 
x_6 = lean_string_push(x_2, x_1);
return x_6;
}
}
else
{
lean_object* x_7; 
x_7 = lean_string_push(x_2, x_1);
return x_7;
}
}
}
LEAN_EXPORT lean_object* l_Lake_uriEncodeChar___boxed(lean_object* x_1, lean_object* x_2) {
_start:
{
uint32_t x_3; lean_object* x_4; 
x_3 = lean_unbox_uint32(x_1);
lean_dec(x_1);
x_4 = l_Lake_uriEncodeChar(x_3, x_2);
return x_4;
}
}
LEAN_EXPORT lean_object* l_String_foldlAux___at_Lake_uriEncode___spec__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
uint8_t x_5; 
x_5 = lean_nat_dec_lt(x_3, x_2);
if (x_5 == 0)
{
lean_dec(x_3);
return x_4;
}
else
{
lean_object* x_6; uint32_t x_7; lean_object* x_8; 
x_6 = lean_string_utf8_next(x_1, x_3);
x_7 = lean_string_utf8_get(x_1, x_3);
lean_dec(x_3);
x_8 = l_Lake_uriEncodeChar(x_7, x_4);
x_3 = x_6;
x_4 = x_8;
goto _start;
}
}
}
LEAN_EXPORT lean_object* l_Lake_uriEncode(lean_object* x_1) {
_start:
{
lean_object* x_2; lean_object* x_3; lean_object* x_4; lean_object* x_5; 
x_2 = lean_string_utf8_byte_size(x_1);
x_3 = lean_unsigned_to_nat(0u);
x_4 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_5 = l_String_foldlAux___at_Lake_uriEncode___spec__1(x_1, x_2, x_3, x_4);
lean_dec(x_2);
return x_5;
}
}
LEAN_EXPORT lean_object* l_String_foldlAux___at_Lake_uriEncode___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_String_foldlAux___at_Lake_uriEncode___spec__1(x_1, x_2, x_3, x_4);
lean_dec(x_2);
lean_dec(x_1);
return x_5;
}
}
LEAN_EXPORT lean_object* l_Lake_uriEncode___boxed(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = l_Lake_uriEncode(x_1);
lean_dec(x_1);
return x_2;
}
}
static lean_object* _init_l_Array_foldlMUnsafe_fold___at_Lake_getUrl___spec__1___closed__1() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("-H", 2, 2);
return x_1;
}
}
LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lake_getUrl___spec__1(lean_object* x_1, lean_object* x_2, size_t x_3, size_t x_4, lean_object* x_5) {
_start:
{
uint8_t x_6; 
x_6 = lean_usize_dec_eq(x_3, x_4);
if (x_6 == 0)
{
lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; size_t x_12; size_t x_13; 
x_7 = lean_array_uget(x_2, x_3);
x_8 = l_Array_foldlMUnsafe_fold___at_Lake_getUrl___spec__1___closed__1;
lean_inc(x_1);
x_9 = lean_array_push(x_1, x_8);
x_10 = lean_array_push(x_9, x_7);
x_11 = l_Array_append___rarg(x_5, x_10);
lean_dec(x_10);
x_12 = 1;
x_13 = lean_usize_add(x_3, x_12);
x_3 = x_13;
x_5 = x_11;
goto _start;
}
else
{
lean_dec(x_1);
return x_5;
}
}
}
static lean_object* _init_l_Lake_getUrl___closed__1() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = lean_unsigned_to_nat(2u);
x_2 = lean_mk_empty_array_with_capacity(x_1);
return x_2;
}
}
static lean_object* _init_l_Lake_getUrl___closed__2() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("-s", 2, 2);
return x_1;
}
}
static lean_object* _init_l_Lake_getUrl___closed__3() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lake_getUrl___closed__1;
x_2 = l_Lake_getUrl___closed__2;
x_3 = lean_array_push(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_Lake_getUrl___closed__4() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("-L", 2, 2);
return x_1;
}
}
static lean_object* _init_l_Lake_getUrl___closed__5() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lake_getUrl___closed__3;
x_2 = l_Lake_getUrl___closed__4;
x_3 = lean_array_push(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_Lake_getUrl___closed__6() {
_start:
{
uint8_t x_1; lean_object* x_2; 
x_1 = 1;
x_2 = lean_alloc_ctor(0, 0, 3);
lean_ctor_set_uint8(x_2, 0, x_1);
lean_ctor_set_uint8(x_2, 1, x_1);
lean_ctor_set_uint8(x_2, 2, x_1);
return x_2;
}
}
static lean_object* _init_l_Lake_getUrl___closed__7() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("curl", 4, 4);
return x_1;
}
}
LEAN_EXPORT lean_object* l_Lake_getUrl(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; lean_object* x_6; uint8_t x_7; lean_object* x_8; 
x_5 = lean_array_get_size(x_2);
x_6 = lean_unsigned_to_nat(0u);
x_7 = lean_nat_dec_lt(x_6, x_5);
x_8 = lean_box(0);
if (x_7 == 0)
{
lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; uint8_t x_14; lean_object* x_15; lean_object* x_16; 
lean_dec(x_5);
x_9 = l_Lake_getUrl___closed__5;
x_10 = lean_array_push(x_9, x_1);
x_11 = l_Lake_getUrl___closed__6;
x_12 = l_Lake_getUrl___closed__7;
x_13 = l_Lake_instInhabitedRegistryPkg___closed__1;
x_14 = 0;
x_15 = lean_alloc_ctor(0, 5, 1);
lean_ctor_set(x_15, 0, x_11);
lean_ctor_set(x_15, 1, x_12);
lean_ctor_set(x_15, 2, x_10);
lean_ctor_set(x_15, 3, x_8);
lean_ctor_set(x_15, 4, x_13);
lean_ctor_set_uint8(x_15, sizeof(void*)*5, x_14);
x_16 = l_Lake_captureProc(x_15, x_3, x_4);
return x_16;
}
else
{
uint8_t x_17; 
x_17 = lean_nat_dec_le(x_5, x_5);
if (x_17 == 0)
{
lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; uint8_t x_23; lean_object* x_24; lean_object* x_25; 
lean_dec(x_5);
x_18 = l_Lake_getUrl___closed__5;
x_19 = lean_array_push(x_18, x_1);
x_20 = l_Lake_getUrl___closed__6;
x_21 = l_Lake_getUrl___closed__7;
x_22 = l_Lake_instInhabitedRegistryPkg___closed__1;
x_23 = 0;
x_24 = lean_alloc_ctor(0, 5, 1);
lean_ctor_set(x_24, 0, x_20);
lean_ctor_set(x_24, 1, x_21);
lean_ctor_set(x_24, 2, x_19);
lean_ctor_set(x_24, 3, x_8);
lean_ctor_set(x_24, 4, x_22);
lean_ctor_set_uint8(x_24, sizeof(void*)*5, x_23);
x_25 = l_Lake_captureProc(x_24, x_3, x_4);
return x_25;
}
else
{
size_t x_26; size_t x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; uint8_t x_35; lean_object* x_36; lean_object* x_37; 
x_26 = 0;
x_27 = lean_usize_of_nat(x_5);
lean_dec(x_5);
x_28 = l_Lake_getUrl___closed__1;
x_29 = l_Lake_getUrl___closed__5;
x_30 = l_Array_foldlMUnsafe_fold___at_Lake_getUrl___spec__1(x_28, x_2, x_26, x_27, x_29);
x_31 = lean_array_push(x_30, x_1);
x_32 = l_Lake_getUrl___closed__6;
x_33 = l_Lake_getUrl___closed__7;
x_34 = l_Lake_instInhabitedRegistryPkg___closed__1;
x_35 = 0;
x_36 = lean_alloc_ctor(0, 5, 1);
lean_ctor_set(x_36, 0, x_32);
lean_ctor_set(x_36, 1, x_33);
lean_ctor_set(x_36, 2, x_31);
lean_ctor_set(x_36, 3, x_8);
lean_ctor_set(x_36, 4, x_34);
lean_ctor_set_uint8(x_36, sizeof(void*)*5, x_35);
x_37 = l_Lake_captureProc(x_36, x_3, x_4);
return x_37;
}
}
}
}
LEAN_EXPORT lean_object* l_Array_foldlMUnsafe_fold___at_Lake_getUrl___spec__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
size_t x_6; size_t x_7; lean_object* x_8; 
x_6 = lean_unbox_usize(x_3);
lean_dec(x_3);
x_7 = lean_unbox_usize(x_4);
lean_dec(x_4);
x_8 = l_Array_foldlMUnsafe_fold___at_Lake_getUrl___spec__1(x_1, x_2, x_6, x_7, x_5);
lean_dec(x_2);
return x_8;
}
}
LEAN_EXPORT lean_object* l_Lake_getUrl___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4) {
_start:
{
lean_object* x_5; 
x_5 = l_Lake_getUrl(x_1, x_2, x_3, x_4);
lean_dec(x_2);
return x_5;
}
}
static lean_object* _init_l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__1() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("status", 6, 6);
return x_1;
}
}
static lean_object* _init_l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__2() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lake_RegistryPkg_fromJson_x3f___closed__6;
x_2 = l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__1;
x_3 = lean_string_append(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__3() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__2;
x_2 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_3 = lean_string_append(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__4() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__3;
x_2 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
static lean_object* _init_l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__5() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_2 = l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__1;
x_3 = lean_string_append(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__6() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__5;
x_2 = l_Lake_RegistrySrc_fromJson_x3f___closed__4;
x_3 = lean_string_append(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__7() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("message", 7, 7);
return x_1;
}
}
static lean_object* _init_l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__8() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lake_RegistryPkg_fromJson_x3f___closed__6;
x_2 = l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__7;
x_3 = lean_string_append(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__9() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__8;
x_2 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_3 = lean_string_append(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__10() {
_start:
{
lean_object* x_1; lean_object* x_2; 
x_1 = l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__9;
x_2 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_2, 0, x_1);
return x_2;
}
}
static lean_object* _init_l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__11() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_2 = l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__7;
x_3 = lean_string_append(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__12() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__11;
x_2 = l_Lake_RegistrySrc_fromJson_x3f___closed__4;
x_3 = lean_string_append(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__13() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("error", 5, 5);
return x_1;
}
}
static lean_object* _init_l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__14() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_2 = l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__13;
x_3 = lean_string_append(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__15() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__14;
x_2 = l_Lake_RegistrySrc_fromJson_x3f___closed__4;
x_3 = lean_string_append(x_1, x_2);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Lake_ReservoirResp_fromJson_x3f___rarg(lean_object* x_1, lean_object* x_2) {
_start:
{
lean_object* x_3; lean_object* x_57; lean_object* x_64; 
lean_inc(x_2);
x_64 = l_Lean_Json_getObj_x3f(x_2);
if (lean_obj_tag(x_64) == 0)
{
uint8_t x_65; 
lean_dec(x_2);
lean_dec(x_1);
x_65 = !lean_is_exclusive(x_64);
if (x_65 == 0)
{
return x_64;
}
else
{
lean_object* x_66; lean_object* x_67; 
x_66 = lean_ctor_get(x_64, 0);
lean_inc(x_66);
lean_dec(x_64);
x_67 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_67, 0, x_66);
return x_67;
}
}
else
{
lean_object* x_68; lean_object* x_69; lean_object* x_70; 
x_68 = lean_ctor_get(x_64, 0);
lean_inc(x_68);
lean_dec(x_64);
x_69 = l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__13;
x_70 = l_Lean_RBNode_find___at___private_Lean_Data_Json_Basic_0__Lean_Json_beq_x27___spec__3(x_68, x_69);
lean_dec(x_68);
if (lean_obj_tag(x_70) == 0)
{
lean_object* x_71; 
x_71 = lean_box(0);
x_3 = x_71;
goto block_56;
}
else
{
uint8_t x_72; 
x_72 = !lean_is_exclusive(x_70);
if (x_72 == 0)
{
lean_object* x_73; 
x_73 = lean_ctor_get(x_70, 0);
if (lean_obj_tag(x_73) == 0)
{
lean_object* x_74; 
lean_free_object(x_70);
x_74 = lean_box(0);
x_3 = x_74;
goto block_56;
}
else
{
lean_object* x_75; 
x_75 = l_Lean_Json_getObj_x3f(x_73);
if (lean_obj_tag(x_75) == 0)
{
lean_object* x_76; 
lean_free_object(x_70);
lean_dec(x_2);
lean_dec(x_1);
x_76 = lean_ctor_get(x_75, 0);
lean_inc(x_76);
lean_dec(x_75);
x_57 = x_76;
goto block_63;
}
else
{
lean_object* x_77; 
x_77 = lean_ctor_get(x_75, 0);
lean_inc(x_77);
lean_dec(x_75);
lean_ctor_set(x_70, 0, x_77);
x_3 = x_70;
goto block_56;
}
}
}
else
{
lean_object* x_78; 
x_78 = lean_ctor_get(x_70, 0);
lean_inc(x_78);
lean_dec(x_70);
if (lean_obj_tag(x_78) == 0)
{
lean_object* x_79; 
x_79 = lean_box(0);
x_3 = x_79;
goto block_56;
}
else
{
lean_object* x_80; 
x_80 = l_Lean_Json_getObj_x3f(x_78);
if (lean_obj_tag(x_80) == 0)
{
lean_object* x_81; 
lean_dec(x_2);
lean_dec(x_1);
x_81 = lean_ctor_get(x_80, 0);
lean_inc(x_81);
lean_dec(x_80);
x_57 = x_81;
goto block_63;
}
else
{
lean_object* x_82; lean_object* x_83; 
x_82 = lean_ctor_get(x_80, 0);
lean_inc(x_82);
lean_dec(x_80);
x_83 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_83, 0, x_82);
x_3 = x_83;
goto block_56;
}
}
}
}
}
block_56:
{
if (lean_obj_tag(x_3) == 0)
{
lean_object* x_4; 
x_4 = lean_apply_1(x_1, x_2);
if (lean_obj_tag(x_4) == 0)
{
uint8_t x_5; 
x_5 = !lean_is_exclusive(x_4);
if (x_5 == 0)
{
return x_4;
}
else
{
lean_object* x_6; lean_object* x_7; 
x_6 = lean_ctor_get(x_4, 0);
lean_inc(x_6);
lean_dec(x_4);
x_7 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_7, 0, x_6);
return x_7;
}
}
else
{
uint8_t x_8; 
x_8 = !lean_is_exclusive(x_4);
if (x_8 == 0)
{
lean_object* x_9; lean_object* x_10; 
x_9 = lean_ctor_get(x_4, 0);
x_10 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_10, 0, x_9);
lean_ctor_set(x_4, 0, x_10);
return x_4;
}
else
{
lean_object* x_11; lean_object* x_12; lean_object* x_13; 
x_11 = lean_ctor_get(x_4, 0);
lean_inc(x_11);
lean_dec(x_4);
x_12 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_12, 0, x_11);
x_13 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_13, 0, x_12);
return x_13;
}
}
}
else
{
lean_object* x_14; lean_object* x_15; lean_object* x_16; 
lean_dec(x_2);
lean_dec(x_1);
x_14 = lean_ctor_get(x_3, 0);
lean_inc(x_14);
lean_dec(x_3);
x_15 = l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__1;
x_16 = l_Lean_RBNode_find___at___private_Lean_Data_Json_Basic_0__Lean_Json_beq_x27___spec__3(x_14, x_15);
if (lean_obj_tag(x_16) == 0)
{
lean_object* x_17; 
lean_dec(x_14);
x_17 = l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__4;
return x_17;
}
else
{
lean_object* x_18; lean_object* x_19; 
x_18 = lean_ctor_get(x_16, 0);
lean_inc(x_18);
lean_dec(x_16);
x_19 = l_Lean_Json_getNat_x3f(x_18);
if (lean_obj_tag(x_19) == 0)
{
uint8_t x_20; 
lean_dec(x_14);
x_20 = !lean_is_exclusive(x_19);
if (x_20 == 0)
{
lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; 
x_21 = lean_ctor_get(x_19, 0);
x_22 = l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__6;
x_23 = lean_string_append(x_22, x_21);
lean_dec(x_21);
x_24 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_25 = lean_string_append(x_23, x_24);
lean_ctor_set(x_19, 0, x_25);
return x_19;
}
else
{
lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; 
x_26 = lean_ctor_get(x_19, 0);
lean_inc(x_26);
lean_dec(x_19);
x_27 = l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__6;
x_28 = lean_string_append(x_27, x_26);
lean_dec(x_26);
x_29 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_30 = lean_string_append(x_28, x_29);
x_31 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_31, 0, x_30);
return x_31;
}
}
else
{
lean_object* x_32; lean_object* x_33; lean_object* x_34; 
x_32 = lean_ctor_get(x_19, 0);
lean_inc(x_32);
lean_dec(x_19);
x_33 = l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__7;
x_34 = l_Lean_RBNode_find___at___private_Lean_Data_Json_Basic_0__Lean_Json_beq_x27___spec__3(x_14, x_33);
lean_dec(x_14);
if (lean_obj_tag(x_34) == 0)
{
lean_object* x_35; 
lean_dec(x_32);
x_35 = l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__10;
return x_35;
}
else
{
lean_object* x_36; lean_object* x_37; 
x_36 = lean_ctor_get(x_34, 0);
lean_inc(x_36);
lean_dec(x_34);
x_37 = l_Lean_Json_getStr_x3f(x_36);
if (lean_obj_tag(x_37) == 0)
{
uint8_t x_38; 
lean_dec(x_32);
x_38 = !lean_is_exclusive(x_37);
if (x_38 == 0)
{
lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; 
x_39 = lean_ctor_get(x_37, 0);
x_40 = l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__12;
x_41 = lean_string_append(x_40, x_39);
lean_dec(x_39);
x_42 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_43 = lean_string_append(x_41, x_42);
lean_ctor_set(x_37, 0, x_43);
return x_37;
}
else
{
lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; lean_object* x_49; 
x_44 = lean_ctor_get(x_37, 0);
lean_inc(x_44);
lean_dec(x_37);
x_45 = l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__12;
x_46 = lean_string_append(x_45, x_44);
lean_dec(x_44);
x_47 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_48 = lean_string_append(x_46, x_47);
x_49 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_49, 0, x_48);
return x_49;
}
}
else
{
uint8_t x_50; 
x_50 = !lean_is_exclusive(x_37);
if (x_50 == 0)
{
lean_object* x_51; lean_object* x_52; 
x_51 = lean_ctor_get(x_37, 0);
x_52 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_52, 0, x_32);
lean_ctor_set(x_52, 1, x_51);
lean_ctor_set(x_37, 0, x_52);
return x_37;
}
else
{
lean_object* x_53; lean_object* x_54; lean_object* x_55; 
x_53 = lean_ctor_get(x_37, 0);
lean_inc(x_53);
lean_dec(x_37);
x_54 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_54, 0, x_32);
lean_ctor_set(x_54, 1, x_53);
x_55 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_55, 0, x_54);
return x_55;
}
}
}
}
}
}
}
block_63:
{
lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; 
x_58 = l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__15;
x_59 = lean_string_append(x_58, x_57);
lean_dec(x_57);
x_60 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_61 = lean_string_append(x_59, x_60);
x_62 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_62, 0, x_61);
return x_62;
}
}
}
LEAN_EXPORT lean_object* l_Lake_ReservoirResp_fromJson_x3f(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = lean_alloc_closure((void*)(l_Lake_ReservoirResp_fromJson_x3f___rarg), 2, 0);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Lake_instFromJsonReservoirResp___rarg(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = lean_alloc_closure((void*)(l_Lake_ReservoirResp_fromJson_x3f___rarg), 2, 1);
lean_closure_set(x_2, 0, x_1);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Lake_instFromJsonReservoirResp(lean_object* x_1) {
_start:
{
lean_object* x_2; 
x_2 = lean_alloc_closure((void*)(l_Lake_instFromJsonReservoirResp___rarg), 1, 0);
return x_2;
}
}
LEAN_EXPORT lean_object* l_Lake_ReservoirResp_fromJson_x3f___at_Lake_fetchReservoirPkg_x3f___spec__1(lean_object* x_1) {
_start:
{
lean_object* x_2; lean_object* x_56; lean_object* x_63; 
lean_inc(x_1);
x_63 = l_Lean_Json_getObj_x3f(x_1);
if (lean_obj_tag(x_63) == 0)
{
uint8_t x_64; 
lean_dec(x_1);
x_64 = !lean_is_exclusive(x_63);
if (x_64 == 0)
{
return x_63;
}
else
{
lean_object* x_65; lean_object* x_66; 
x_65 = lean_ctor_get(x_63, 0);
lean_inc(x_65);
lean_dec(x_63);
x_66 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_66, 0, x_65);
return x_66;
}
}
else
{
lean_object* x_67; lean_object* x_68; lean_object* x_69; 
x_67 = lean_ctor_get(x_63, 0);
lean_inc(x_67);
lean_dec(x_63);
x_68 = l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__13;
x_69 = l_Lean_RBNode_find___at___private_Lean_Data_Json_Basic_0__Lean_Json_beq_x27___spec__3(x_67, x_68);
lean_dec(x_67);
if (lean_obj_tag(x_69) == 0)
{
lean_object* x_70; 
x_70 = lean_box(0);
x_2 = x_70;
goto block_55;
}
else
{
uint8_t x_71; 
x_71 = !lean_is_exclusive(x_69);
if (x_71 == 0)
{
lean_object* x_72; 
x_72 = lean_ctor_get(x_69, 0);
if (lean_obj_tag(x_72) == 0)
{
lean_object* x_73; 
lean_free_object(x_69);
x_73 = lean_box(0);
x_2 = x_73;
goto block_55;
}
else
{
lean_object* x_74; 
x_74 = l_Lean_Json_getObj_x3f(x_72);
if (lean_obj_tag(x_74) == 0)
{
lean_object* x_75; 
lean_free_object(x_69);
lean_dec(x_1);
x_75 = lean_ctor_get(x_74, 0);
lean_inc(x_75);
lean_dec(x_74);
x_56 = x_75;
goto block_62;
}
else
{
lean_object* x_76; 
x_76 = lean_ctor_get(x_74, 0);
lean_inc(x_76);
lean_dec(x_74);
lean_ctor_set(x_69, 0, x_76);
x_2 = x_69;
goto block_55;
}
}
}
else
{
lean_object* x_77; 
x_77 = lean_ctor_get(x_69, 0);
lean_inc(x_77);
lean_dec(x_69);
if (lean_obj_tag(x_77) == 0)
{
lean_object* x_78; 
x_78 = lean_box(0);
x_2 = x_78;
goto block_55;
}
else
{
lean_object* x_79; 
x_79 = l_Lean_Json_getObj_x3f(x_77);
if (lean_obj_tag(x_79) == 0)
{
lean_object* x_80; 
lean_dec(x_1);
x_80 = lean_ctor_get(x_79, 0);
lean_inc(x_80);
lean_dec(x_79);
x_56 = x_80;
goto block_62;
}
else
{
lean_object* x_81; lean_object* x_82; 
x_81 = lean_ctor_get(x_79, 0);
lean_inc(x_81);
lean_dec(x_79);
x_82 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_82, 0, x_81);
x_2 = x_82;
goto block_55;
}
}
}
}
}
block_55:
{
if (lean_obj_tag(x_2) == 0)
{
lean_object* x_3; 
x_3 = l_Lake_RegistryPkg_fromJson_x3f(x_1);
if (lean_obj_tag(x_3) == 0)
{
uint8_t x_4; 
x_4 = !lean_is_exclusive(x_3);
if (x_4 == 0)
{
return x_3;
}
else
{
lean_object* x_5; lean_object* x_6; 
x_5 = lean_ctor_get(x_3, 0);
lean_inc(x_5);
lean_dec(x_3);
x_6 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_6, 0, x_5);
return x_6;
}
}
else
{
uint8_t x_7; 
x_7 = !lean_is_exclusive(x_3);
if (x_7 == 0)
{
lean_object* x_8; lean_object* x_9; 
x_8 = lean_ctor_get(x_3, 0);
x_9 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_9, 0, x_8);
lean_ctor_set(x_3, 0, x_9);
return x_3;
}
else
{
lean_object* x_10; lean_object* x_11; lean_object* x_12; 
x_10 = lean_ctor_get(x_3, 0);
lean_inc(x_10);
lean_dec(x_3);
x_11 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_11, 0, x_10);
x_12 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_12, 0, x_11);
return x_12;
}
}
}
else
{
lean_object* x_13; lean_object* x_14; lean_object* x_15; 
lean_dec(x_1);
x_13 = lean_ctor_get(x_2, 0);
lean_inc(x_13);
lean_dec(x_2);
x_14 = l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__1;
x_15 = l_Lean_RBNode_find___at___private_Lean_Data_Json_Basic_0__Lean_Json_beq_x27___spec__3(x_13, x_14);
if (lean_obj_tag(x_15) == 0)
{
lean_object* x_16; 
lean_dec(x_13);
x_16 = l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__4;
return x_16;
}
else
{
lean_object* x_17; lean_object* x_18; 
x_17 = lean_ctor_get(x_15, 0);
lean_inc(x_17);
lean_dec(x_15);
x_18 = l_Lean_Json_getNat_x3f(x_17);
if (lean_obj_tag(x_18) == 0)
{
uint8_t x_19; 
lean_dec(x_13);
x_19 = !lean_is_exclusive(x_18);
if (x_19 == 0)
{
lean_object* x_20; lean_object* x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; 
x_20 = lean_ctor_get(x_18, 0);
x_21 = l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__6;
x_22 = lean_string_append(x_21, x_20);
lean_dec(x_20);
x_23 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_24 = lean_string_append(x_22, x_23);
lean_ctor_set(x_18, 0, x_24);
return x_18;
}
else
{
lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; 
x_25 = lean_ctor_get(x_18, 0);
lean_inc(x_25);
lean_dec(x_18);
x_26 = l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__6;
x_27 = lean_string_append(x_26, x_25);
lean_dec(x_25);
x_28 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_29 = lean_string_append(x_27, x_28);
x_30 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_30, 0, x_29);
return x_30;
}
}
else
{
lean_object* x_31; lean_object* x_32; lean_object* x_33; 
x_31 = lean_ctor_get(x_18, 0);
lean_inc(x_31);
lean_dec(x_18);
x_32 = l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__7;
x_33 = l_Lean_RBNode_find___at___private_Lean_Data_Json_Basic_0__Lean_Json_beq_x27___spec__3(x_13, x_32);
lean_dec(x_13);
if (lean_obj_tag(x_33) == 0)
{
lean_object* x_34; 
lean_dec(x_31);
x_34 = l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__10;
return x_34;
}
else
{
lean_object* x_35; lean_object* x_36; 
x_35 = lean_ctor_get(x_33, 0);
lean_inc(x_35);
lean_dec(x_33);
x_36 = l_Lean_Json_getStr_x3f(x_35);
if (lean_obj_tag(x_36) == 0)
{
uint8_t x_37; 
lean_dec(x_31);
x_37 = !lean_is_exclusive(x_36);
if (x_37 == 0)
{
lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; 
x_38 = lean_ctor_get(x_36, 0);
x_39 = l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__12;
x_40 = lean_string_append(x_39, x_38);
lean_dec(x_38);
x_41 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_42 = lean_string_append(x_40, x_41);
lean_ctor_set(x_36, 0, x_42);
return x_36;
}
else
{
lean_object* x_43; lean_object* x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; 
x_43 = lean_ctor_get(x_36, 0);
lean_inc(x_43);
lean_dec(x_36);
x_44 = l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__12;
x_45 = lean_string_append(x_44, x_43);
lean_dec(x_43);
x_46 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_47 = lean_string_append(x_45, x_46);
x_48 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_48, 0, x_47);
return x_48;
}
}
else
{
uint8_t x_49; 
x_49 = !lean_is_exclusive(x_36);
if (x_49 == 0)
{
lean_object* x_50; lean_object* x_51; 
x_50 = lean_ctor_get(x_36, 0);
x_51 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_51, 0, x_31);
lean_ctor_set(x_51, 1, x_50);
lean_ctor_set(x_36, 0, x_51);
return x_36;
}
else
{
lean_object* x_52; lean_object* x_53; lean_object* x_54; 
x_52 = lean_ctor_get(x_36, 0);
lean_inc(x_52);
lean_dec(x_36);
x_53 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_53, 0, x_31);
lean_ctor_set(x_53, 1, x_52);
x_54 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_54, 0, x_53);
return x_54;
}
}
}
}
}
}
}
block_62:
{
lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; 
x_57 = l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__15;
x_58 = lean_string_append(x_57, x_56);
lean_dec(x_56);
x_59 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_60 = lean_string_append(x_58, x_59);
x_61 = lean_alloc_ctor(0, 1, 0);
lean_ctor_set(x_61, 0, x_60);
return x_61;
}
}
}
static lean_object* _init_l_Lake_fetchReservoirPkg_x3f___lambda__1___closed__1() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("/", 1, 1);
return x_1;
}
}
static lean_object* _init_l_Lake_fetchReservoirPkg_x3f___lambda__1___closed__2() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked(": Reservoir lookup failed; server returned invalid JSON: ", 57, 57);
return x_1;
}
}
static lean_object* _init_l_Lake_fetchReservoirPkg_x3f___lambda__1___closed__3() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked(": Reservoir lookup failed; server returned unsupported JSON: ", 61, 61);
return x_1;
}
}
static lean_object* _init_l_Lake_fetchReservoirPkg_x3f___lambda__1___closed__4() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked(": Reservoir lookup failed: ", 27, 27);
return x_1;
}
}
LEAN_EXPORT lean_object* l_Lake_fetchReservoirPkg_x3f___lambda__1(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; 
x_6 = l_Lean_Json_parse(x_3);
if (lean_obj_tag(x_6) == 0)
{
lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; uint8_t x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; lean_object* x_21; lean_object* x_22; 
x_7 = lean_ctor_get(x_6, 0);
lean_inc(x_7);
lean_dec(x_6);
x_8 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_9 = lean_string_append(x_8, x_1);
x_10 = l_Lake_fetchReservoirPkg_x3f___lambda__1___closed__1;
x_11 = lean_string_append(x_9, x_10);
x_12 = lean_string_append(x_11, x_2);
x_13 = l_Lake_fetchReservoirPkg_x3f___lambda__1___closed__2;
x_14 = lean_string_append(x_12, x_13);
x_15 = lean_string_append(x_14, x_7);
lean_dec(x_7);
x_16 = lean_string_append(x_15, x_8);
x_17 = 3;
x_18 = lean_alloc_ctor(0, 1, 1);
lean_ctor_set(x_18, 0, x_16);
lean_ctor_set_uint8(x_18, sizeof(void*)*1, x_17);
x_19 = lean_array_push(x_4, x_18);
x_20 = lean_box(0);
x_21 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_21, 0, x_20);
lean_ctor_set(x_21, 1, x_19);
x_22 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_22, 0, x_21);
lean_ctor_set(x_22, 1, x_5);
return x_22;
}
else
{
lean_object* x_23; lean_object* x_24; 
x_23 = lean_ctor_get(x_6, 0);
lean_inc(x_23);
lean_dec(x_6);
x_24 = l_Lake_ReservoirResp_fromJson_x3f___at_Lake_fetchReservoirPkg_x3f___spec__1(x_23);
if (lean_obj_tag(x_24) == 0)
{
lean_object* x_25; lean_object* x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; uint8_t x_35; lean_object* x_36; lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; 
x_25 = lean_ctor_get(x_24, 0);
lean_inc(x_25);
lean_dec(x_24);
x_26 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_27 = lean_string_append(x_26, x_1);
x_28 = l_Lake_fetchReservoirPkg_x3f___lambda__1___closed__1;
x_29 = lean_string_append(x_27, x_28);
x_30 = lean_string_append(x_29, x_2);
x_31 = l_Lake_fetchReservoirPkg_x3f___lambda__1___closed__3;
x_32 = lean_string_append(x_30, x_31);
x_33 = lean_string_append(x_32, x_25);
lean_dec(x_25);
x_34 = lean_string_append(x_33, x_26);
x_35 = 3;
x_36 = lean_alloc_ctor(0, 1, 1);
lean_ctor_set(x_36, 0, x_34);
lean_ctor_set_uint8(x_36, sizeof(void*)*1, x_35);
x_37 = lean_array_push(x_4, x_36);
x_38 = lean_box(0);
x_39 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_39, 0, x_38);
lean_ctor_set(x_39, 1, x_37);
x_40 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_40, 0, x_39);
lean_ctor_set(x_40, 1, x_5);
return x_40;
}
else
{
lean_object* x_41; 
x_41 = lean_ctor_get(x_24, 0);
lean_inc(x_41);
lean_dec(x_24);
if (lean_obj_tag(x_41) == 0)
{
uint8_t x_42; 
x_42 = !lean_is_exclusive(x_41);
if (x_42 == 0)
{
lean_object* x_43; lean_object* x_44; 
lean_ctor_set_tag(x_41, 1);
x_43 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_43, 0, x_41);
lean_ctor_set(x_43, 1, x_4);
x_44 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_44, 0, x_43);
lean_ctor_set(x_44, 1, x_5);
return x_44;
}
else
{
lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; 
x_45 = lean_ctor_get(x_41, 0);
lean_inc(x_45);
lean_dec(x_41);
x_46 = lean_alloc_ctor(1, 1, 0);
lean_ctor_set(x_46, 0, x_45);
x_47 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_47, 0, x_46);
lean_ctor_set(x_47, 1, x_4);
x_48 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_48, 0, x_47);
lean_ctor_set(x_48, 1, x_5);
return x_48;
}
}
else
{
uint8_t x_49; 
x_49 = !lean_is_exclusive(x_41);
if (x_49 == 0)
{
lean_object* x_50; lean_object* x_51; lean_object* x_52; uint8_t x_53; 
x_50 = lean_ctor_get(x_41, 0);
x_51 = lean_ctor_get(x_41, 1);
x_52 = lean_unsigned_to_nat(404u);
x_53 = lean_nat_dec_eq(x_50, x_52);
lean_dec(x_50);
if (x_53 == 0)
{
lean_object* x_54; lean_object* x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; lean_object* x_61; lean_object* x_62; uint8_t x_63; lean_object* x_64; lean_object* x_65; lean_object* x_66; lean_object* x_67; 
x_54 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_55 = lean_string_append(x_54, x_1);
x_56 = l_Lake_fetchReservoirPkg_x3f___lambda__1___closed__1;
x_57 = lean_string_append(x_55, x_56);
x_58 = lean_string_append(x_57, x_2);
x_59 = l_Lake_fetchReservoirPkg_x3f___lambda__1___closed__4;
x_60 = lean_string_append(x_58, x_59);
x_61 = lean_string_append(x_60, x_51);
lean_dec(x_51);
x_62 = lean_string_append(x_61, x_54);
x_63 = 3;
x_64 = lean_alloc_ctor(0, 1, 1);
lean_ctor_set(x_64, 0, x_62);
lean_ctor_set_uint8(x_64, sizeof(void*)*1, x_63);
x_65 = lean_array_push(x_4, x_64);
x_66 = lean_box(0);
lean_ctor_set_tag(x_41, 0);
lean_ctor_set(x_41, 1, x_65);
lean_ctor_set(x_41, 0, x_66);
x_67 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_67, 0, x_41);
lean_ctor_set(x_67, 1, x_5);
return x_67;
}
else
{
lean_object* x_68; lean_object* x_69; 
lean_dec(x_51);
x_68 = lean_box(0);
lean_ctor_set_tag(x_41, 0);
lean_ctor_set(x_41, 1, x_4);
lean_ctor_set(x_41, 0, x_68);
x_69 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_69, 0, x_41);
lean_ctor_set(x_69, 1, x_5);
return x_69;
}
}
else
{
lean_object* x_70; lean_object* x_71; lean_object* x_72; uint8_t x_73; 
x_70 = lean_ctor_get(x_41, 0);
x_71 = lean_ctor_get(x_41, 1);
lean_inc(x_71);
lean_inc(x_70);
lean_dec(x_41);
x_72 = lean_unsigned_to_nat(404u);
x_73 = lean_nat_dec_eq(x_70, x_72);
lean_dec(x_70);
if (x_73 == 0)
{
lean_object* x_74; lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; lean_object* x_82; uint8_t x_83; lean_object* x_84; lean_object* x_85; lean_object* x_86; lean_object* x_87; lean_object* x_88; 
x_74 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_75 = lean_string_append(x_74, x_1);
x_76 = l_Lake_fetchReservoirPkg_x3f___lambda__1___closed__1;
x_77 = lean_string_append(x_75, x_76);
x_78 = lean_string_append(x_77, x_2);
x_79 = l_Lake_fetchReservoirPkg_x3f___lambda__1___closed__4;
x_80 = lean_string_append(x_78, x_79);
x_81 = lean_string_append(x_80, x_71);
lean_dec(x_71);
x_82 = lean_string_append(x_81, x_74);
x_83 = 3;
x_84 = lean_alloc_ctor(0, 1, 1);
lean_ctor_set(x_84, 0, x_82);
lean_ctor_set_uint8(x_84, sizeof(void*)*1, x_83);
x_85 = lean_array_push(x_4, x_84);
x_86 = lean_box(0);
x_87 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_87, 0, x_86);
lean_ctor_set(x_87, 1, x_85);
x_88 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_88, 0, x_87);
lean_ctor_set(x_88, 1, x_5);
return x_88;
}
else
{
lean_object* x_89; lean_object* x_90; lean_object* x_91; 
lean_dec(x_71);
x_89 = lean_box(0);
x_90 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_90, 0, x_89);
lean_ctor_set(x_90, 1, x_4);
x_91 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_91, 0, x_90);
lean_ctor_set(x_91, 1, x_5);
return x_91;
}
}
}
}
}
}
}
static lean_object* _init_l_Lake_fetchReservoirPkg_x3f___closed__1() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("/packages/", 10, 10);
return x_1;
}
}
static lean_object* _init_l_Lake_fetchReservoirPkg_x3f___closed__2() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked(": Reservoir lookup failed", 25, 25);
return x_1;
}
}
static lean_object* _init_l_Lake_fetchReservoirPkg_x3f___closed__3() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("X-Reservoir-Api-Version:1.0.0", 29, 29);
return x_1;
}
}
static lean_object* _init_l_Lake_fetchReservoirPkg_x3f___closed__4() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lake_getUrl___closed__1;
x_2 = l_Lake_fetchReservoirPkg_x3f___closed__3;
x_3 = lean_array_push(x_1, x_2);
return x_3;
}
}
static lean_object* _init_l_Lake_fetchReservoirPkg_x3f___closed__5() {
_start:
{
lean_object* x_1; 
x_1 = lean_mk_string_unchecked("X-Lake-Registry-Api-Version:0.1.0", 33, 33);
return x_1;
}
}
static lean_object* _init_l_Lake_fetchReservoirPkg_x3f___closed__6() {
_start:
{
lean_object* x_1; lean_object* x_2; lean_object* x_3; 
x_1 = l_Lake_fetchReservoirPkg_x3f___closed__4;
x_2 = l_Lake_fetchReservoirPkg_x3f___closed__5;
x_3 = lean_array_push(x_1, x_2);
return x_3;
}
}
LEAN_EXPORT lean_object* l_Lake_fetchReservoirPkg_x3f(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; lean_object* x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; lean_object* x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_62; lean_object* x_63; lean_object* x_64; 
x_6 = lean_ctor_get(x_1, 3);
x_7 = l_Lake_instInhabitedRegistrySrc___closed__1;
x_8 = lean_string_append(x_7, x_6);
x_9 = l_Lake_fetchReservoirPkg_x3f___closed__1;
x_10 = lean_string_append(x_8, x_9);
x_11 = l_Lake_uriEncode(x_2);
x_12 = lean_string_append(x_10, x_11);
lean_dec(x_11);
x_13 = l_Lake_fetchReservoirPkg_x3f___lambda__1___closed__1;
x_14 = lean_string_append(x_12, x_13);
x_15 = l_Lake_uriEncode(x_3);
x_16 = lean_string_append(x_14, x_15);
lean_dec(x_15);
x_17 = lean_string_append(x_16, x_7);
x_62 = l_Lake_fetchReservoirPkg_x3f___closed__6;
x_63 = l_Lake_getUrl(x_17, x_62, x_4, x_5);
x_64 = lean_ctor_get(x_63, 0);
lean_inc(x_64);
if (lean_obj_tag(x_64) == 0)
{
uint8_t x_65; 
x_65 = !lean_is_exclusive(x_63);
if (x_65 == 0)
{
lean_object* x_66; lean_object* x_67; uint8_t x_68; 
x_66 = lean_ctor_get(x_63, 1);
x_67 = lean_ctor_get(x_63, 0);
lean_dec(x_67);
x_68 = !lean_is_exclusive(x_64);
if (x_68 == 0)
{
lean_object* x_69; lean_object* x_70; 
x_69 = lean_ctor_get(x_64, 0);
x_70 = lean_box(0);
lean_ctor_set(x_63, 1, x_70);
lean_ctor_set(x_63, 0, x_69);
lean_ctor_set(x_64, 0, x_63);
x_18 = x_64;
x_19 = x_66;
goto block_61;
}
else
{
lean_object* x_71; lean_object* x_72; lean_object* x_73; lean_object* x_74; 
x_71 = lean_ctor_get(x_64, 0);
x_72 = lean_ctor_get(x_64, 1);
lean_inc(x_72);
lean_inc(x_71);
lean_dec(x_64);
x_73 = lean_box(0);
lean_ctor_set(x_63, 1, x_73);
lean_ctor_set(x_63, 0, x_71);
x_74 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_74, 0, x_63);
lean_ctor_set(x_74, 1, x_72);
x_18 = x_74;
x_19 = x_66;
goto block_61;
}
}
else
{
lean_object* x_75; lean_object* x_76; lean_object* x_77; lean_object* x_78; lean_object* x_79; lean_object* x_80; lean_object* x_81; 
x_75 = lean_ctor_get(x_63, 1);
lean_inc(x_75);
lean_dec(x_63);
x_76 = lean_ctor_get(x_64, 0);
lean_inc(x_76);
x_77 = lean_ctor_get(x_64, 1);
lean_inc(x_77);
if (lean_is_exclusive(x_64)) {
 lean_ctor_release(x_64, 0);
 lean_ctor_release(x_64, 1);
 x_78 = x_64;
} else {
 lean_dec_ref(x_64);
 x_78 = lean_box(0);
}
x_79 = lean_box(0);
x_80 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_80, 0, x_76);
lean_ctor_set(x_80, 1, x_79);
if (lean_is_scalar(x_78)) {
 x_81 = lean_alloc_ctor(0, 2, 0);
} else {
 x_81 = x_78;
}
lean_ctor_set(x_81, 0, x_80);
lean_ctor_set(x_81, 1, x_77);
x_18 = x_81;
x_19 = x_75;
goto block_61;
}
}
else
{
lean_object* x_82; uint8_t x_83; 
x_82 = lean_ctor_get(x_63, 1);
lean_inc(x_82);
lean_dec(x_63);
x_83 = !lean_is_exclusive(x_64);
if (x_83 == 0)
{
x_18 = x_64;
x_19 = x_82;
goto block_61;
}
else
{
lean_object* x_84; lean_object* x_85; lean_object* x_86; 
x_84 = lean_ctor_get(x_64, 0);
x_85 = lean_ctor_get(x_64, 1);
lean_inc(x_85);
lean_inc(x_84);
lean_dec(x_64);
x_86 = lean_alloc_ctor(1, 2, 0);
lean_ctor_set(x_86, 0, x_84);
lean_ctor_set(x_86, 1, x_85);
x_18 = x_86;
x_19 = x_82;
goto block_61;
}
}
block_61:
{
if (lean_obj_tag(x_18) == 0)
{
lean_object* x_20; 
x_20 = lean_ctor_get(x_18, 0);
lean_inc(x_20);
if (lean_obj_tag(x_20) == 0)
{
lean_object* x_21; lean_object* x_22; lean_object* x_23; 
x_21 = lean_ctor_get(x_18, 1);
lean_inc(x_21);
lean_dec(x_18);
x_22 = lean_ctor_get(x_20, 0);
lean_inc(x_22);
lean_dec(x_20);
x_23 = l_Lake_fetchReservoirPkg_x3f___lambda__1(x_2, x_3, x_22, x_21, x_19);
return x_23;
}
else
{
uint8_t x_24; 
x_24 = !lean_is_exclusive(x_18);
if (x_24 == 0)
{
lean_object* x_25; uint8_t x_26; 
x_25 = lean_ctor_get(x_18, 0);
lean_dec(x_25);
x_26 = !lean_is_exclusive(x_20);
if (x_26 == 0)
{
lean_object* x_27; lean_object* x_28; 
x_27 = lean_ctor_get(x_20, 0);
x_28 = lean_ctor_get(x_20, 1);
lean_dec(x_28);
lean_ctor_set(x_18, 0, x_27);
lean_ctor_set_tag(x_20, 0);
lean_ctor_set(x_20, 1, x_19);
lean_ctor_set(x_20, 0, x_18);
return x_20;
}
else
{
lean_object* x_29; lean_object* x_30; 
x_29 = lean_ctor_get(x_20, 0);
lean_inc(x_29);
lean_dec(x_20);
lean_ctor_set(x_18, 0, x_29);
x_30 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_30, 0, x_18);
lean_ctor_set(x_30, 1, x_19);
return x_30;
}
}
else
{
lean_object* x_31; lean_object* x_32; lean_object* x_33; lean_object* x_34; lean_object* x_35; 
x_31 = lean_ctor_get(x_18, 1);
lean_inc(x_31);
lean_dec(x_18);
x_32 = lean_ctor_get(x_20, 0);
lean_inc(x_32);
if (lean_is_exclusive(x_20)) {
 lean_ctor_release(x_20, 0);
 lean_ctor_release(x_20, 1);
 x_33 = x_20;
} else {
 lean_dec_ref(x_20);
 x_33 = lean_box(0);
}
x_34 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_34, 0, x_32);
lean_ctor_set(x_34, 1, x_31);
if (lean_is_scalar(x_33)) {
 x_35 = lean_alloc_ctor(0, 2, 0);
} else {
 x_35 = x_33;
 lean_ctor_set_tag(x_35, 0);
}
lean_ctor_set(x_35, 0, x_34);
lean_ctor_set(x_35, 1, x_19);
return x_35;
}
}
}
else
{
uint8_t x_36; 
x_36 = !lean_is_exclusive(x_18);
if (x_36 == 0)
{
lean_object* x_37; lean_object* x_38; lean_object* x_39; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; uint8_t x_44; lean_object* x_45; lean_object* x_46; lean_object* x_47; lean_object* x_48; 
x_37 = lean_ctor_get(x_18, 1);
x_38 = lean_ctor_get(x_18, 0);
lean_dec(x_38);
x_39 = lean_string_append(x_7, x_2);
x_40 = lean_string_append(x_39, x_13);
x_41 = lean_string_append(x_40, x_3);
x_42 = l_Lake_fetchReservoirPkg_x3f___closed__2;
x_43 = lean_string_append(x_41, x_42);
x_44 = 3;
x_45 = lean_alloc_ctor(0, 1, 1);
lean_ctor_set(x_45, 0, x_43);
lean_ctor_set_uint8(x_45, sizeof(void*)*1, x_44);
x_46 = lean_array_push(x_37, x_45);
x_47 = lean_box(0);
lean_ctor_set_tag(x_18, 0);
lean_ctor_set(x_18, 1, x_46);
lean_ctor_set(x_18, 0, x_47);
x_48 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_48, 0, x_18);
lean_ctor_set(x_48, 1, x_19);
return x_48;
}
else
{
lean_object* x_49; lean_object* x_50; lean_object* x_51; lean_object* x_52; lean_object* x_53; lean_object* x_54; uint8_t x_55; lean_object* x_56; lean_object* x_57; lean_object* x_58; lean_object* x_59; lean_object* x_60; 
x_49 = lean_ctor_get(x_18, 1);
lean_inc(x_49);
lean_dec(x_18);
x_50 = lean_string_append(x_7, x_2);
x_51 = lean_string_append(x_50, x_13);
x_52 = lean_string_append(x_51, x_3);
x_53 = l_Lake_fetchReservoirPkg_x3f___closed__2;
x_54 = lean_string_append(x_52, x_53);
x_55 = 3;
x_56 = lean_alloc_ctor(0, 1, 1);
lean_ctor_set(x_56, 0, x_54);
lean_ctor_set_uint8(x_56, sizeof(void*)*1, x_55);
x_57 = lean_array_push(x_49, x_56);
x_58 = lean_box(0);
x_59 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_59, 0, x_58);
lean_ctor_set(x_59, 1, x_57);
x_60 = lean_alloc_ctor(0, 2, 0);
lean_ctor_set(x_60, 0, x_59);
lean_ctor_set(x_60, 1, x_19);
return x_60;
}
}
}
}
}
LEAN_EXPORT lean_object* l_Lake_fetchReservoirPkg_x3f___lambda__1___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; 
x_6 = l_Lake_fetchReservoirPkg_x3f___lambda__1(x_1, x_2, x_3, x_4, x_5);
lean_dec(x_2);
lean_dec(x_1);
return x_6;
}
}
LEAN_EXPORT lean_object* l_Lake_fetchReservoirPkg_x3f___boxed(lean_object* x_1, lean_object* x_2, lean_object* x_3, lean_object* x_4, lean_object* x_5) {
_start:
{
lean_object* x_6; 
x_6 = l_Lake_fetchReservoirPkg_x3f(x_1, x_2, x_3, x_4, x_5);
lean_dec(x_3);
lean_dec(x_2);
lean_dec(x_1);
return x_6;
}
}
lean_object* initialize_Init(uint8_t builtin, lean_object*);
lean_object* initialize_Lake_Util_Log(uint8_t builtin, lean_object*);
lean_object* initialize_Lake_Util_Proc(uint8_t builtin, lean_object*);
lean_object* initialize_Lake_Util_JsonObject(uint8_t builtin, lean_object*);
lean_object* initialize_Lake_Config_Env(uint8_t builtin, lean_object*);
static bool _G_initialized = false;
LEAN_EXPORT lean_object* initialize_Lake_Reservoir(uint8_t builtin, lean_object* w) {
lean_object * res;
if (_G_initialized) return lean_io_result_mk_ok(lean_box(0));
_G_initialized = true;
res = initialize_Init(builtin, lean_io_mk_world());
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
res = initialize_Lake_Util_Log(builtin, lean_io_mk_world());
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
res = initialize_Lake_Util_Proc(builtin, lean_io_mk_world());
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
res = initialize_Lake_Util_JsonObject(builtin, lean_io_mk_world());
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
res = initialize_Lake_Config_Env(builtin, lean_io_mk_world());
if (lean_io_result_is_error(res)) return res;
lean_dec_ref(res);
l_Lake_instInhabitedRegistrySrc___closed__1 = _init_l_Lake_instInhabitedRegistrySrc___closed__1();
lean_mark_persistent(l_Lake_instInhabitedRegistrySrc___closed__1);
l_Lake_instInhabitedRegistrySrc___closed__2 = _init_l_Lake_instInhabitedRegistrySrc___closed__2();
lean_mark_persistent(l_Lake_instInhabitedRegistrySrc___closed__2);
l_Lake_instInhabitedRegistrySrc = _init_l_Lake_instInhabitedRegistrySrc();
lean_mark_persistent(l_Lake_instInhabitedRegistrySrc);
l_Lake_RegistrySrc_instToJson___closed__1 = _init_l_Lake_RegistrySrc_instToJson___closed__1();
lean_mark_persistent(l_Lake_RegistrySrc_instToJson___closed__1);
l_Lake_RegistrySrc_instToJson = _init_l_Lake_RegistrySrc_instToJson();
lean_mark_persistent(l_Lake_RegistrySrc_instToJson);
l_Lake_RegistrySrc_fromJson_x3f___closed__1 = _init_l_Lake_RegistrySrc_fromJson_x3f___closed__1();
lean_mark_persistent(l_Lake_RegistrySrc_fromJson_x3f___closed__1);
l_Lake_RegistrySrc_fromJson_x3f___closed__2 = _init_l_Lake_RegistrySrc_fromJson_x3f___closed__2();
lean_mark_persistent(l_Lake_RegistrySrc_fromJson_x3f___closed__2);
l_Lake_RegistrySrc_fromJson_x3f___closed__3 = _init_l_Lake_RegistrySrc_fromJson_x3f___closed__3();
lean_mark_persistent(l_Lake_RegistrySrc_fromJson_x3f___closed__3);
l_Lake_RegistrySrc_fromJson_x3f___closed__4 = _init_l_Lake_RegistrySrc_fromJson_x3f___closed__4();
lean_mark_persistent(l_Lake_RegistrySrc_fromJson_x3f___closed__4);
l_Lake_RegistrySrc_fromJson_x3f___closed__5 = _init_l_Lake_RegistrySrc_fromJson_x3f___closed__5();
lean_mark_persistent(l_Lake_RegistrySrc_fromJson_x3f___closed__5);
l_Lake_RegistrySrc_fromJson_x3f___closed__6 = _init_l_Lake_RegistrySrc_fromJson_x3f___closed__6();
lean_mark_persistent(l_Lake_RegistrySrc_fromJson_x3f___closed__6);
l_Lake_RegistrySrc_fromJson_x3f___closed__7 = _init_l_Lake_RegistrySrc_fromJson_x3f___closed__7();
lean_mark_persistent(l_Lake_RegistrySrc_fromJson_x3f___closed__7);
l_Lake_RegistrySrc_fromJson_x3f___closed__8 = _init_l_Lake_RegistrySrc_fromJson_x3f___closed__8();
lean_mark_persistent(l_Lake_RegistrySrc_fromJson_x3f___closed__8);
l_Lake_RegistrySrc_fromJson_x3f___closed__9 = _init_l_Lake_RegistrySrc_fromJson_x3f___closed__9();
lean_mark_persistent(l_Lake_RegistrySrc_fromJson_x3f___closed__9);
l_Lake_RegistrySrc_fromJson_x3f___closed__10 = _init_l_Lake_RegistrySrc_fromJson_x3f___closed__10();
lean_mark_persistent(l_Lake_RegistrySrc_fromJson_x3f___closed__10);
l_Lake_RegistrySrc_fromJson_x3f___closed__11 = _init_l_Lake_RegistrySrc_fromJson_x3f___closed__11();
lean_mark_persistent(l_Lake_RegistrySrc_fromJson_x3f___closed__11);
l_Lake_RegistrySrc_fromJson_x3f___closed__12 = _init_l_Lake_RegistrySrc_fromJson_x3f___closed__12();
lean_mark_persistent(l_Lake_RegistrySrc_fromJson_x3f___closed__12);
l_Lake_RegistrySrc_fromJson_x3f___closed__13 = _init_l_Lake_RegistrySrc_fromJson_x3f___closed__13();
lean_mark_persistent(l_Lake_RegistrySrc_fromJson_x3f___closed__13);
l_Lake_RegistrySrc_fromJson_x3f___closed__14 = _init_l_Lake_RegistrySrc_fromJson_x3f___closed__14();
lean_mark_persistent(l_Lake_RegistrySrc_fromJson_x3f___closed__14);
l_Lake_RegistrySrc_fromJson_x3f___closed__15 = _init_l_Lake_RegistrySrc_fromJson_x3f___closed__15();
lean_mark_persistent(l_Lake_RegistrySrc_fromJson_x3f___closed__15);
l_Lake_RegistrySrc_fromJson_x3f___closed__16 = _init_l_Lake_RegistrySrc_fromJson_x3f___closed__16();
lean_mark_persistent(l_Lake_RegistrySrc_fromJson_x3f___closed__16);
l_Lake_RegistrySrc_fromJson_x3f___closed__17 = _init_l_Lake_RegistrySrc_fromJson_x3f___closed__17();
lean_mark_persistent(l_Lake_RegistrySrc_fromJson_x3f___closed__17);
l_Lake_RegistrySrc_fromJson_x3f___closed__18 = _init_l_Lake_RegistrySrc_fromJson_x3f___closed__18();
lean_mark_persistent(l_Lake_RegistrySrc_fromJson_x3f___closed__18);
l_Lake_RegistrySrc_instFromJson___closed__1 = _init_l_Lake_RegistrySrc_instFromJson___closed__1();
lean_mark_persistent(l_Lake_RegistrySrc_instFromJson___closed__1);
l_Lake_RegistrySrc_instFromJson = _init_l_Lake_RegistrySrc_instFromJson();
lean_mark_persistent(l_Lake_RegistrySrc_instFromJson);
l_Lake_instInhabitedRegistryPkg___closed__1 = _init_l_Lake_instInhabitedRegistryPkg___closed__1();
lean_mark_persistent(l_Lake_instInhabitedRegistryPkg___closed__1);
l_Lake_instInhabitedRegistryPkg___closed__2 = _init_l_Lake_instInhabitedRegistryPkg___closed__2();
lean_mark_persistent(l_Lake_instInhabitedRegistryPkg___closed__2);
l_Lake_instInhabitedRegistryPkg = _init_l_Lake_instInhabitedRegistryPkg();
lean_mark_persistent(l_Lake_instInhabitedRegistryPkg);
l_Lake_RegistryPkg_gitSrc_x3f___closed__1 = _init_l_Lake_RegistryPkg_gitSrc_x3f___closed__1();
lean_mark_persistent(l_Lake_RegistryPkg_gitSrc_x3f___closed__1);
l_Lake_RegistryPkg_gitSrc_x3f___closed__2 = _init_l_Lake_RegistryPkg_gitSrc_x3f___closed__2();
lean_mark_persistent(l_Lake_RegistryPkg_gitSrc_x3f___closed__2);
l_Lake_RegistryPkg_gitSrc_x3f___closed__3 = _init_l_Lake_RegistryPkg_gitSrc_x3f___closed__3();
lean_mark_persistent(l_Lake_RegistryPkg_gitSrc_x3f___closed__3);
l_Lake_RegistryPkg_instToJson___closed__1 = _init_l_Lake_RegistryPkg_instToJson___closed__1();
lean_mark_persistent(l_Lake_RegistryPkg_instToJson___closed__1);
l_Lake_RegistryPkg_instToJson = _init_l_Lake_RegistryPkg_instToJson();
lean_mark_persistent(l_Lake_RegistryPkg_instToJson);
l_Lake_RegistryPkg_fromJson_x3f___closed__1 = _init_l_Lake_RegistryPkg_fromJson_x3f___closed__1();
lean_mark_persistent(l_Lake_RegistryPkg_fromJson_x3f___closed__1);
l_Lake_RegistryPkg_fromJson_x3f___closed__2 = _init_l_Lake_RegistryPkg_fromJson_x3f___closed__2();
lean_mark_persistent(l_Lake_RegistryPkg_fromJson_x3f___closed__2);
l_Lake_RegistryPkg_fromJson_x3f___closed__3 = _init_l_Lake_RegistryPkg_fromJson_x3f___closed__3();
lean_mark_persistent(l_Lake_RegistryPkg_fromJson_x3f___closed__3);
l_Lake_RegistryPkg_fromJson_x3f___closed__4 = _init_l_Lake_RegistryPkg_fromJson_x3f___closed__4();
lean_mark_persistent(l_Lake_RegistryPkg_fromJson_x3f___closed__4);
l_Lake_RegistryPkg_fromJson_x3f___closed__5 = _init_l_Lake_RegistryPkg_fromJson_x3f___closed__5();
lean_mark_persistent(l_Lake_RegistryPkg_fromJson_x3f___closed__5);
l_Lake_RegistryPkg_fromJson_x3f___closed__6 = _init_l_Lake_RegistryPkg_fromJson_x3f___closed__6();
lean_mark_persistent(l_Lake_RegistryPkg_fromJson_x3f___closed__6);
l_Lake_RegistryPkg_fromJson_x3f___closed__7 = _init_l_Lake_RegistryPkg_fromJson_x3f___closed__7();
lean_mark_persistent(l_Lake_RegistryPkg_fromJson_x3f___closed__7);
l_Lake_RegistryPkg_fromJson_x3f___closed__8 = _init_l_Lake_RegistryPkg_fromJson_x3f___closed__8();
lean_mark_persistent(l_Lake_RegistryPkg_fromJson_x3f___closed__8);
l_Lake_RegistryPkg_fromJson_x3f___closed__9 = _init_l_Lake_RegistryPkg_fromJson_x3f___closed__9();
lean_mark_persistent(l_Lake_RegistryPkg_fromJson_x3f___closed__9);
l_Lake_RegistryPkg_fromJson_x3f___closed__10 = _init_l_Lake_RegistryPkg_fromJson_x3f___closed__10();
lean_mark_persistent(l_Lake_RegistryPkg_fromJson_x3f___closed__10);
l_Lake_RegistryPkg_fromJson_x3f___closed__11 = _init_l_Lake_RegistryPkg_fromJson_x3f___closed__11();
lean_mark_persistent(l_Lake_RegistryPkg_fromJson_x3f___closed__11);
l_Lake_RegistryPkg_fromJson_x3f___closed__12 = _init_l_Lake_RegistryPkg_fromJson_x3f___closed__12();
lean_mark_persistent(l_Lake_RegistryPkg_fromJson_x3f___closed__12);
l_Lake_RegistryPkg_fromJson_x3f___closed__13 = _init_l_Lake_RegistryPkg_fromJson_x3f___closed__13();
lean_mark_persistent(l_Lake_RegistryPkg_fromJson_x3f___closed__13);
l_Lake_RegistryPkg_fromJson_x3f___closed__14 = _init_l_Lake_RegistryPkg_fromJson_x3f___closed__14();
lean_mark_persistent(l_Lake_RegistryPkg_fromJson_x3f___closed__14);
l_Lake_RegistryPkg_fromJson_x3f___closed__15 = _init_l_Lake_RegistryPkg_fromJson_x3f___closed__15();
lean_mark_persistent(l_Lake_RegistryPkg_fromJson_x3f___closed__15);
l_Lake_RegistryPkg_fromJson_x3f___closed__16 = _init_l_Lake_RegistryPkg_fromJson_x3f___closed__16();
lean_mark_persistent(l_Lake_RegistryPkg_fromJson_x3f___closed__16);
l_Lake_RegistryPkg_fromJson_x3f___closed__17 = _init_l_Lake_RegistryPkg_fromJson_x3f___closed__17();
lean_mark_persistent(l_Lake_RegistryPkg_fromJson_x3f___closed__17);
l_Lake_RegistryPkg_fromJson_x3f___closed__18 = _init_l_Lake_RegistryPkg_fromJson_x3f___closed__18();
lean_mark_persistent(l_Lake_RegistryPkg_fromJson_x3f___closed__18);
l_Lake_RegistryPkg_fromJson_x3f___closed__19 = _init_l_Lake_RegistryPkg_fromJson_x3f___closed__19();
lean_mark_persistent(l_Lake_RegistryPkg_fromJson_x3f___closed__19);
l_Lake_RegistryPkg_fromJson_x3f___closed__20 = _init_l_Lake_RegistryPkg_fromJson_x3f___closed__20();
lean_mark_persistent(l_Lake_RegistryPkg_fromJson_x3f___closed__20);
l_Lake_RegistryPkg_fromJson_x3f___closed__21 = _init_l_Lake_RegistryPkg_fromJson_x3f___closed__21();
lean_mark_persistent(l_Lake_RegistryPkg_fromJson_x3f___closed__21);
l_Lake_RegistryPkg_fromJson_x3f___closed__22 = _init_l_Lake_RegistryPkg_fromJson_x3f___closed__22();
l_Lake_RegistryPkg_fromJson_x3f___closed__23 = _init_l_Lake_RegistryPkg_fromJson_x3f___closed__23();
lean_mark_persistent(l_Lake_RegistryPkg_fromJson_x3f___closed__23);
l_Lake_RegistryPkg_fromJson_x3f___closed__24 = _init_l_Lake_RegistryPkg_fromJson_x3f___closed__24();
lean_mark_persistent(l_Lake_RegistryPkg_fromJson_x3f___closed__24);
l_Lake_RegistryPkg_instFromJson___closed__1 = _init_l_Lake_RegistryPkg_instFromJson___closed__1();
lean_mark_persistent(l_Lake_RegistryPkg_instFromJson___closed__1);
l_Lake_RegistryPkg_instFromJson = _init_l_Lake_RegistryPkg_instFromJson();
lean_mark_persistent(l_Lake_RegistryPkg_instFromJson);
l_Array_foldlMUnsafe_fold___at_Lake_getUrl___spec__1___closed__1 = _init_l_Array_foldlMUnsafe_fold___at_Lake_getUrl___spec__1___closed__1();
lean_mark_persistent(l_Array_foldlMUnsafe_fold___at_Lake_getUrl___spec__1___closed__1);
l_Lake_getUrl___closed__1 = _init_l_Lake_getUrl___closed__1();
lean_mark_persistent(l_Lake_getUrl___closed__1);
l_Lake_getUrl___closed__2 = _init_l_Lake_getUrl___closed__2();
lean_mark_persistent(l_Lake_getUrl___closed__2);
l_Lake_getUrl___closed__3 = _init_l_Lake_getUrl___closed__3();
lean_mark_persistent(l_Lake_getUrl___closed__3);
l_Lake_getUrl___closed__4 = _init_l_Lake_getUrl___closed__4();
lean_mark_persistent(l_Lake_getUrl___closed__4);
l_Lake_getUrl___closed__5 = _init_l_Lake_getUrl___closed__5();
lean_mark_persistent(l_Lake_getUrl___closed__5);
l_Lake_getUrl___closed__6 = _init_l_Lake_getUrl___closed__6();
lean_mark_persistent(l_Lake_getUrl___closed__6);
l_Lake_getUrl___closed__7 = _init_l_Lake_getUrl___closed__7();
lean_mark_persistent(l_Lake_getUrl___closed__7);
l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__1 = _init_l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__1();
lean_mark_persistent(l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__1);
l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__2 = _init_l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__2();
lean_mark_persistent(l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__2);
l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__3 = _init_l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__3();
lean_mark_persistent(l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__3);
l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__4 = _init_l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__4();
lean_mark_persistent(l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__4);
l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__5 = _init_l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__5();
lean_mark_persistent(l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__5);
l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__6 = _init_l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__6();
lean_mark_persistent(l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__6);
l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__7 = _init_l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__7();
lean_mark_persistent(l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__7);
l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__8 = _init_l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__8();
lean_mark_persistent(l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__8);
l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__9 = _init_l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__9();
lean_mark_persistent(l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__9);
l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__10 = _init_l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__10();
lean_mark_persistent(l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__10);
l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__11 = _init_l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__11();
lean_mark_persistent(l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__11);
l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__12 = _init_l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__12();
lean_mark_persistent(l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__12);
l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__13 = _init_l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__13();
lean_mark_persistent(l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__13);
l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__14 = _init_l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__14();
lean_mark_persistent(l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__14);
l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__15 = _init_l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__15();
lean_mark_persistent(l_Lake_ReservoirResp_fromJson_x3f___rarg___closed__15);
l_Lake_fetchReservoirPkg_x3f___lambda__1___closed__1 = _init_l_Lake_fetchReservoirPkg_x3f___lambda__1___closed__1();
lean_mark_persistent(l_Lake_fetchReservoirPkg_x3f___lambda__1___closed__1);
l_Lake_fetchReservoirPkg_x3f___lambda__1___closed__2 = _init_l_Lake_fetchReservoirPkg_x3f___lambda__1___closed__2();
lean_mark_persistent(l_Lake_fetchReservoirPkg_x3f___lambda__1___closed__2);
l_Lake_fetchReservoirPkg_x3f___lambda__1___closed__3 = _init_l_Lake_fetchReservoirPkg_x3f___lambda__1___closed__3();
lean_mark_persistent(l_Lake_fetchReservoirPkg_x3f___lambda__1___closed__3);
l_Lake_fetchReservoirPkg_x3f___lambda__1___closed__4 = _init_l_Lake_fetchReservoirPkg_x3f___lambda__1___closed__4();
lean_mark_persistent(l_Lake_fetchReservoirPkg_x3f___lambda__1___closed__4);
l_Lake_fetchReservoirPkg_x3f___closed__1 = _init_l_Lake_fetchReservoirPkg_x3f___closed__1();
lean_mark_persistent(l_Lake_fetchReservoirPkg_x3f___closed__1);
l_Lake_fetchReservoirPkg_x3f___closed__2 = _init_l_Lake_fetchReservoirPkg_x3f___closed__2();
lean_mark_persistent(l_Lake_fetchReservoirPkg_x3f___closed__2);
l_Lake_fetchReservoirPkg_x3f___closed__3 = _init_l_Lake_fetchReservoirPkg_x3f___closed__3();
lean_mark_persistent(l_Lake_fetchReservoirPkg_x3f___closed__3);
l_Lake_fetchReservoirPkg_x3f___closed__4 = _init_l_Lake_fetchReservoirPkg_x3f___closed__4();
lean_mark_persistent(l_Lake_fetchReservoirPkg_x3f___closed__4);
l_Lake_fetchReservoirPkg_x3f___closed__5 = _init_l_Lake_fetchReservoirPkg_x3f___closed__5();
lean_mark_persistent(l_Lake_fetchReservoirPkg_x3f___closed__5);
l_Lake_fetchReservoirPkg_x3f___closed__6 = _init_l_Lake_fetchReservoirPkg_x3f___closed__6();
lean_mark_persistent(l_Lake_fetchReservoirPkg_x3f___closed__6);
return lean_io_result_mk_ok(lean_box(0));
}
#ifdef __cplusplus
}
#endif
