text: // Lean compiler output
  // Module: Lean.Data.Lsp.Capabilities
  // Imports: Init Lean.Data.JsonRpc Lean.Data.Lsp.TextSync
  #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
  extern lean_object* l_Lean_instFromJsonOption___rarg___closed__1;
  lean_object* l_Lean_Json_opt___at___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____spec__1(lean_object*, lean_object*);
  lean_object* l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____closed__5;
  uint8_t l_Lean_Lsp_ServerCapabilities_declarationProvider___default;
  uint8_t l_Lean_Lsp_ServerCapabilities_documentSymbolProvider___default;
  lean_object* l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____closed__3;
  lean_object* l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____closed__7;
  lean_object* l_Lean_Lsp_instFromJsonServerCapabilities;
  lean_object* l_Lean_Lsp_ClientCapabilities_hasToJson(lean_object*);
  lean_object* l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_fromJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_119____boxed(lean_object*);
  uint8_t l_Lean_Lsp_ServerCapabilities_hoverProvider___default;
  lean_object* l_List_join___rarg(lean_object*);
  uint8_t l_Lean_Lsp_ServerCapabilities_typeDefinitionProvider___default;
  uint8_t l_Lean_Lsp_ServerCapabilities_documentHighlightProvider___default;
  lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonSaveOptions____x40_Lean_Data_Lsp_TextSync___hyg_381____spec__1(lean_object*, lean_object*);
  lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_478_(lean_object*);
  lean_object* l_Lean_Json_opt___at___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____spec__1___boxed(lean_object*, lean_object*);
  lean_object* l_Lean_Lsp_ClientCapabilities_hasToJson___closed__1;
  lean_object* l_Lean_Lsp_ClientCapabilities_hasToJson___boxed(lean_object*);
  lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_fromJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_119____spec__1___boxed(lean_object*, lean_object*);
  lean_object* l_Lean_Lsp_instFromJsonClientCapabilities(lean_object*);
  lean_object* l_Lean_Lsp_instToJsonServerCapabilities;
  lean_object* l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_fromJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_119_(lean_object*);
  lean_object* l_Lean_Lsp_instToJsonServerCapabilities___closed__1;
  uint8_t l_Lean_Lsp_ServerCapabilities_definitionProvider___default;
  lean_object* l_Lean_Lsp_ServerCapabilities_textDocumentSync_x3f___default;
  lean_object* l_Lean_Lsp_instFromJsonServerCapabilities___closed__1;
  lean_object* l_Lean_Json_getObjValD(lean_object*, lean_object*);
  lean_object* l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____closed__4;
  lean_object* l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____closed__1;
  lean_object* l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____closed__2;
  lean_object* l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____boxed(lean_object*);
  lean_object* l_Lean_Json_mkObj(lean_object*);
  lean_object* l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45_(lean_object*);
  lean_object* l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_534_(lean_object*);
  lean_object* l_Lean_Lsp_instFromJsonClientCapabilities___closed__1;
  lean_object* l_Lean_Lsp_instFromJsonClientCapabilities___boxed(lean_object*);
  lean_object* l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____closed__6;
  lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_fromJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_119____spec__1(lean_object*, lean_object*);
  static lean_object* _init_l_Lean_Lsp_instFromJsonClientCapabilities___closed__1() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; 
  x_1 = lean_box(0);
  x_2 = lean_alloc_ctor(1, 1, 0);
  lean_ctor_set(x_2, 0, x_1);
  return x_2;
  }
  }
  lean_object* l_Lean_Lsp_instFromJsonClientCapabilities(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; 
  x_2 = l_Lean_Lsp_instFromJsonClientCapabilities___closed__1;
  return x_2;
  }
  }
  lean_object* l_Lean_Lsp_instFromJsonClientCapabilities___boxed(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; 
  x_2 = l_Lean_Lsp_instFromJsonClientCapabilities(x_1);
  lean_dec(x_1);
  return x_2;
  }
  }
  static lean_object* _init_l_Lean_Lsp_ClientCapabilities_hasToJson___closed__1() {
  _start:
  {
  lean_object* x_1; lean_object* x_2; 
  x_1 = lean_box(0);
  x_2 = l_Lean_Json_mkObj(x_1);
  return x_2;
  }
  }
  lean_object* l_Lean_Lsp_ClientCapabilities_hasToJson(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; 
  x_2 = l_Lean_Lsp_ClientCapabilities_hasToJson___closed__1;
  return x_2;
  }
  }
  lean_object* l_Lean_Lsp_ClientCapabilities_hasToJson___boxed(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; 
  x_2 = l_Lean_Lsp_ClientCapabilities_hasToJson(x_1);
  lean_dec(x_1);
  return x_2;
  }
  }
  static lean_object* _init_l_Lean_Lsp_ServerCapabilities_textDocumentSync_x3f___default() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_box(0);
  return x_1;
  }
  }
  static uint8_t _init_l_Lean_Lsp_ServerCapabilities_hoverProvider___default() {
  _start:
  {
  uint8_t x_1; 
  x_1 = 0;
  return x_1;
  }
  }
  static uint8_t _init_l_Lean_Lsp_ServerCapabilities_documentHighlightProvider___default() {
  _start:
  {
  uint8_t x_1; 
  x_1 = 0;
  return x_1;
  }
  }
  static uint8_t _init_l_Lean_Lsp_ServerCapabilities_documentSymbolProvider___default() {
  _start:
  {
  uint8_t x_1; 
  x_1 = 0;
  return x_1;
  }
  }
  static uint8_t _init_l_Lean_Lsp_ServerCapabilities_definitionProvider___default() {
  _start:
  {
  uint8_t x_1; 
  x_1 = 0;
  return x_1;
  }
  }
  static uint8_t _init_l_Lean_Lsp_ServerCapabilities_declarationProvider___default() {
  _start:
  {
  uint8_t x_1; 
  x_1 = 0;
  return x_1;
  }
  }
  static uint8_t _init_l_Lean_Lsp_ServerCapabilities_typeDefinitionProvider___default() {
  _start:
  {
  uint8_t x_1; 
  x_1 = 0;
  return x_1;
  }
  }
  lean_object* l_Lean_Json_opt___at___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____spec__1(lean_object* x_1, lean_object* x_2) {
  _start:
  {
  if (lean_obj_tag(x_2) == 0)
  {
  lean_object* x_3; 
  lean_dec(x_1);
  x_3 = lean_box(0);
  return x_3;
  }
  else
  {
  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___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_toJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_478_(x_4);
  x_6 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_6, 0, x_1);
  lean_ctor_set(x_6, 1, x_5);
  x_7 = lean_box(0);
  x_8 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_8, 0, x_6);
  lean_ctor_set(x_8, 1, x_7);
  return x_8;
  }
  }
  }
  static lean_object* _init_l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____closed__1() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("textDocumentSync");
  return x_1;
  }
  }
  static lean_object* _init_l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____closed__2() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("hoverProvider");
  return x_1;
  }
  }
  static lean_object* _init_l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____closed__3() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("documentHighlightProvider");
  return x_1;
  }
  }
  static lean_object* _init_l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____closed__4() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("documentSymbolProvider");
  return x_1;
  }
  }
  static lean_object* _init_l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____closed__5() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("definitionProvider");
  return x_1;
  }
  }
  static lean_object* _init_l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____closed__6() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("declarationProvider");
  return x_1;
  }
  }
  static lean_object* _init_l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____closed__7() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_mk_string("typeDefinitionProvider");
  return x_1;
  }
  }
  lean_object* l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45_(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; lean_object* x_3; lean_object* x_4; uint8_t x_5; lean_object* x_6; lean_object* x_7; lean_object* x_8; lean_object* x_9; lean_object* x_10; uint8_t x_11; lean_object* x_12; lean_object* x_13; lean_object* x_14; lean_object* x_15; uint8_t x_16; lean_object* x_17; lean_object* x_18; lean_object* x_19; lean_object* x_20; uint8_t x_21; lean_object* x_22; lean_object* x_23; lean_object* x_24; lean_object* x_25; uint8_t x_26; lean_object* x_27; lean_object* x_28; lean_object* x_29; lean_object* x_30; uint8_t x_31; 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; lean_object* x_40; lean_object* x_41; lean_object* x_42; lean_object* x_43; lean_object* x_44; 
  x_2 = lean_ctor_get(x_1, 0);
  x_3 = l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____closed__1;
  x_4 = l_Lean_Json_opt___at___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____spec__1(x_3, x_2);
  x_5 = lean_ctor_get_uint8(x_1, sizeof(void*)*1);
  x_6 = lean_alloc_ctor(1, 0, 1);
  lean_ctor_set_uint8(x_6, 0, x_5);
  x_7 = l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____closed__2;
  x_8 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_8, 0, x_7);
  lean_ctor_set(x_8, 1, x_6);
  x_9 = lean_box(0);
  x_10 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_10, 0, x_8);
  lean_ctor_set(x_10, 1, x_9);
  x_11 = lean_ctor_get_uint8(x_1, sizeof(void*)*1 + 1);
  x_12 = lean_alloc_ctor(1, 0, 1);
  lean_ctor_set_uint8(x_12, 0, x_11);
  x_13 = l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____closed__3;
  x_14 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_14, 0, x_13);
  lean_ctor_set(x_14, 1, x_12);
  x_15 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_15, 0, x_14);
  lean_ctor_set(x_15, 1, x_9);
  x_16 = lean_ctor_get_uint8(x_1, sizeof(void*)*1 + 2);
  x_17 = lean_alloc_ctor(1, 0, 1);
  lean_ctor_set_uint8(x_17, 0, x_16);
  x_18 = l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____closed__4;
  x_19 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_19, 0, x_18);
  lean_ctor_set(x_19, 1, x_17);
  x_20 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_20, 0, x_19);
  lean_ctor_set(x_20, 1, x_9);
  x_21 = lean_ctor_get_uint8(x_1, sizeof(void*)*1 + 3);
  x_22 = lean_alloc_ctor(1, 0, 1);
  lean_ctor_set_uint8(x_22, 0, x_21);
  x_23 = l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____closed__5;
  x_24 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_24, 0, x_23);
  lean_ctor_set(x_24, 1, x_22);
  x_25 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_25, 0, x_24);
  lean_ctor_set(x_25, 1, x_9);
  x_26 = lean_ctor_get_uint8(x_1, sizeof(void*)*1 + 4);
  x_27 = lean_alloc_ctor(1, 0, 1);
  lean_ctor_set_uint8(x_27, 0, x_26);
  x_28 = l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____closed__6;
  x_29 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_29, 0, x_28);
  lean_ctor_set(x_29, 1, x_27);
  x_30 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_30, 0, x_29);
  lean_ctor_set(x_30, 1, x_9);
  x_31 = lean_ctor_get_uint8(x_1, sizeof(void*)*1 + 5);
  x_32 = lean_alloc_ctor(1, 0, 1);
  lean_ctor_set_uint8(x_32, 0, x_31);
  x_33 = l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____closed__7;
  x_34 = lean_alloc_ctor(0, 2, 0);
  lean_ctor_set(x_34, 0, x_33);
  lean_ctor_set(x_34, 1, x_32);
  x_35 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_35, 0, x_34);
  lean_ctor_set(x_35, 1, x_9);
  x_36 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_36, 0, x_35);
  lean_ctor_set(x_36, 1, x_9);
  x_37 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_37, 0, x_30);
  lean_ctor_set(x_37, 1, x_36);
  x_38 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_38, 0, x_25);
  lean_ctor_set(x_38, 1, x_37);
  x_39 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_39, 0, x_20);
  lean_ctor_set(x_39, 1, x_38);
  x_40 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_40, 0, x_15);
  lean_ctor_set(x_40, 1, x_39);
  x_41 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_41, 0, x_10);
  lean_ctor_set(x_41, 1, x_40);
  x_42 = lean_alloc_ctor(1, 2, 0);
  lean_ctor_set(x_42, 0, x_4);
  lean_ctor_set(x_42, 1, x_41);
  x_43 = l_List_join___rarg(x_42);
  x_44 = l_Lean_Json_mkObj(x_43);
  return x_44;
  }
  }
  lean_object* l_Lean_Json_opt___at___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____spec__1___boxed(lean_object* x_1, lean_object* x_2) {
  _start:
  {
  lean_object* x_3; 
  x_3 = l_Lean_Json_opt___at___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____spec__1(x_1, x_2);
  lean_dec(x_2);
  return x_3;
  }
  }
  lean_object* l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____boxed(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; 
  x_2 = l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45_(x_1);
  lean_dec(x_1);
  return x_2;
  }
  }
  static lean_object* _init_l_Lean_Lsp_instToJsonServerCapabilities___closed__1() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_alloc_closure((void*)(l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____boxed), 1, 0);
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Lsp_instToJsonServerCapabilities() {
  _start:
  {
  lean_object* x_1; 
  x_1 = l_Lean_Lsp_instToJsonServerCapabilities___closed__1;
  return x_1;
  }
  }
  lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_fromJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_119____spec__1(lean_object* x_1, lean_object* x_2) {
  _start:
  {
  lean_object* x_3; 
  x_3 = l_Lean_Json_getObjValD(x_1, x_2);
  if (lean_obj_tag(x_3) == 0)
  {
  lean_object* x_4; 
  x_4 = l_Lean_instFromJsonOption___rarg___closed__1;
  return x_4;
  }
  else
  {
  lean_object* x_5; 
  x_5 = l___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonTextDocumentSyncOptions____x40_Lean_Data_Lsp_TextSync___hyg_534_(x_3);
  lean_dec(x_3);
  if (lean_obj_tag(x_5) == 0)
  {
  lean_object* x_6; 
  x_6 = lean_box(0);
  return x_6;
  }
  else
  {
  uint8_t x_7; 
  x_7 = !lean_is_exclusive(x_5);
  if (x_7 == 0)
  {
  lean_object* x_8; 
  x_8 = lean_alloc_ctor(1, 1, 0);
  lean_ctor_set(x_8, 0, x_5);
  return x_8;
  }
  else
  {
  lean_object* x_9; lean_object* x_10; lean_object* x_11; 
  x_9 = lean_ctor_get(x_5, 0);
  lean_inc(x_9);
  lean_dec(x_5);
  x_10 = lean_alloc_ctor(1, 1, 0);
  lean_ctor_set(x_10, 0, x_9);
  x_11 = lean_alloc_ctor(1, 1, 0);
  lean_ctor_set(x_11, 0, x_10);
  return x_11;
  }
  }
  }
  }
  }
  lean_object* l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_fromJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_119_(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; lean_object* x_3; 
  x_2 = l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____closed__1;
  x_3 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_fromJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_119____spec__1(x_1, x_2);
  if (lean_obj_tag(x_3) == 0)
  {
  lean_object* x_4; 
  x_4 = lean_box(0);
  return x_4;
  }
  else
  {
  lean_object* x_5; lean_object* x_6; lean_object* x_7; 
  x_5 = lean_ctor_get(x_3, 0);
  lean_inc(x_5);
  lean_dec(x_3);
  x_6 = l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____closed__2;
  x_7 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonSaveOptions____x40_Lean_Data_Lsp_TextSync___hyg_381____spec__1(x_1, x_6);
  if (lean_obj_tag(x_7) == 0)
  {
  lean_object* x_8; 
  lean_dec(x_5);
  x_8 = lean_box(0);
  return x_8;
  }
  else
  {
  lean_object* x_9; lean_object* x_10; lean_object* x_11; 
  x_9 = lean_ctor_get(x_7, 0);
  lean_inc(x_9);
  lean_dec(x_7);
  x_10 = l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____closed__3;
  x_11 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonSaveOptions____x40_Lean_Data_Lsp_TextSync___hyg_381____spec__1(x_1, x_10);
  if (lean_obj_tag(x_11) == 0)
  {
  lean_object* x_12; 
  lean_dec(x_9);
  lean_dec(x_5);
  x_12 = lean_box(0);
  return x_12;
  }
  else
  {
  lean_object* x_13; lean_object* x_14; lean_object* x_15; 
  x_13 = lean_ctor_get(x_11, 0);
  lean_inc(x_13);
  lean_dec(x_11);
  x_14 = l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____closed__4;
  x_15 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonSaveOptions____x40_Lean_Data_Lsp_TextSync___hyg_381____spec__1(x_1, x_14);
  if (lean_obj_tag(x_15) == 0)
  {
  lean_object* x_16; 
  lean_dec(x_13);
  lean_dec(x_9);
  lean_dec(x_5);
  x_16 = lean_box(0);
  return x_16;
  }
  else
  {
  lean_object* x_17; lean_object* x_18; lean_object* x_19; 
  x_17 = lean_ctor_get(x_15, 0);
  lean_inc(x_17);
  lean_dec(x_15);
  x_18 = l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____closed__5;
  x_19 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonSaveOptions____x40_Lean_Data_Lsp_TextSync___hyg_381____spec__1(x_1, x_18);
  if (lean_obj_tag(x_19) == 0)
  {
  lean_object* x_20; 
  lean_dec(x_17);
  lean_dec(x_13);
  lean_dec(x_9);
  lean_dec(x_5);
  x_20 = lean_box(0);
  return x_20;
  }
  else
  {
  lean_object* x_21; lean_object* x_22; lean_object* x_23; 
  x_21 = lean_ctor_get(x_19, 0);
  lean_inc(x_21);
  lean_dec(x_19);
  x_22 = l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____closed__6;
  x_23 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonSaveOptions____x40_Lean_Data_Lsp_TextSync___hyg_381____spec__1(x_1, x_22);
  if (lean_obj_tag(x_23) == 0)
  {
  lean_object* x_24; 
  lean_dec(x_21);
  lean_dec(x_17);
  lean_dec(x_13);
  lean_dec(x_9);
  lean_dec(x_5);
  x_24 = lean_box(0);
  return x_24;
  }
  else
  {
  lean_object* x_25; lean_object* x_26; lean_object* x_27; 
  x_25 = lean_ctor_get(x_23, 0);
  lean_inc(x_25);
  lean_dec(x_23);
  x_26 = l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____closed__7;
  x_27 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_TextSync_0__Lean_Lsp_fromJsonSaveOptions____x40_Lean_Data_Lsp_TextSync___hyg_381____spec__1(x_1, x_26);
  if (lean_obj_tag(x_27) == 0)
  {
  lean_object* x_28; 
  lean_dec(x_25);
  lean_dec(x_21);
  lean_dec(x_17);
  lean_dec(x_13);
  lean_dec(x_9);
  lean_dec(x_5);
  x_28 = lean_box(0);
  return x_28;
  }
  else
  {
  uint8_t x_29; 
  x_29 = !lean_is_exclusive(x_27);
  if (x_29 == 0)
  {
  lean_object* x_30; lean_object* x_31; uint8_t x_32; uint8_t x_33; uint8_t x_34; uint8_t x_35; uint8_t x_36; uint8_t x_37; 
  x_30 = lean_ctor_get(x_27, 0);
  x_31 = lean_alloc_ctor(0, 1, 6);
  lean_ctor_set(x_31, 0, x_5);
  x_32 = lean_unbox(x_9);
  lean_dec(x_9);
  lean_ctor_set_uint8(x_31, sizeof(void*)*1, x_32);
  x_33 = lean_unbox(x_13);
  lean_dec(x_13);
  lean_ctor_set_uint8(x_31, sizeof(void*)*1 + 1, x_33);
  x_34 = lean_unbox(x_17);
  lean_dec(x_17);
  lean_ctor_set_uint8(x_31, sizeof(void*)*1 + 2, x_34);
  x_35 = lean_unbox(x_21);
  lean_dec(x_21);
  lean_ctor_set_uint8(x_31, sizeof(void*)*1 + 3, x_35);
  x_36 = lean_unbox(x_25);
  lean_dec(x_25);
  lean_ctor_set_uint8(x_31, sizeof(void*)*1 + 4, x_36);
  x_37 = lean_unbox(x_30);
  lean_dec(x_30);
  lean_ctor_set_uint8(x_31, sizeof(void*)*1 + 5, x_37);
  lean_ctor_set(x_27, 0, x_31);
  return x_27;
  }
  else
  {
  lean_object* x_38; lean_object* x_39; uint8_t x_40; uint8_t x_41; uint8_t x_42; uint8_t x_43; uint8_t x_44; uint8_t x_45; lean_object* x_46; 
  x_38 = lean_ctor_get(x_27, 0);
  lean_inc(x_38);
  lean_dec(x_27);
  x_39 = lean_alloc_ctor(0, 1, 6);
  lean_ctor_set(x_39, 0, x_5);
  x_40 = lean_unbox(x_9);
  lean_dec(x_9);
  lean_ctor_set_uint8(x_39, sizeof(void*)*1, x_40);
  x_41 = lean_unbox(x_13);
  lean_dec(x_13);
  lean_ctor_set_uint8(x_39, sizeof(void*)*1 + 1, x_41);
  x_42 = lean_unbox(x_17);
  lean_dec(x_17);
  lean_ctor_set_uint8(x_39, sizeof(void*)*1 + 2, x_42);
  x_43 = lean_unbox(x_21);
  lean_dec(x_21);
  lean_ctor_set_uint8(x_39, sizeof(void*)*1 + 3, x_43);
  x_44 = lean_unbox(x_25);
  lean_dec(x_25);
  lean_ctor_set_uint8(x_39, sizeof(void*)*1 + 4, x_44);
  x_45 = lean_unbox(x_38);
  lean_dec(x_38);
  lean_ctor_set_uint8(x_39, sizeof(void*)*1 + 5, x_45);
  x_46 = lean_alloc_ctor(1, 1, 0);
  lean_ctor_set(x_46, 0, x_39);
  return x_46;
  }
  }
  }
  }
  }
  }
  }
  }
  }
  }
  lean_object* l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_fromJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_119____spec__1___boxed(lean_object* x_1, lean_object* x_2) {
  _start:
  {
  lean_object* x_3; 
  x_3 = l_Lean_Json_getObjValAs_x3f___at___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_fromJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_119____spec__1(x_1, x_2);
  lean_dec(x_2);
  lean_dec(x_1);
  return x_3;
  }
  }
  lean_object* l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_fromJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_119____boxed(lean_object* x_1) {
  _start:
  {
  lean_object* x_2; 
  x_2 = l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_fromJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_119_(x_1);
  lean_dec(x_1);
  return x_2;
  }
  }
  static lean_object* _init_l_Lean_Lsp_instFromJsonServerCapabilities___closed__1() {
  _start:
  {
  lean_object* x_1; 
  x_1 = lean_alloc_closure((void*)(l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_fromJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_119____boxed), 1, 0);
  return x_1;
  }
  }
  static lean_object* _init_l_Lean_Lsp_instFromJsonServerCapabilities() {
  _start:
  {
  lean_object* x_1; 
  x_1 = l_Lean_Lsp_instFromJsonServerCapabilities___closed__1;
  return x_1;
  }
  }
  lean_object* initialize_Init(lean_object*);
  lean_object* initialize_Lean_Data_JsonRpc(lean_object*);
  lean_object* initialize_Lean_Data_Lsp_TextSync(lean_object*);
  static bool _G_initialized = false;
  lean_object* initialize_Lean_Data_Lsp_Capabilities(lean_object* w) {
  lean_object * res;
  if (_G_initialized) return lean_io_result_mk_ok(lean_box(0));
  _G_initialized = true;
  res = initialize_Init(lean_io_mk_world());
  if (lean_io_result_is_error(res)) return res;
  lean_dec_ref(res);
  res = initialize_Lean_Data_JsonRpc(lean_io_mk_world());
  if (lean_io_result_is_error(res)) return res;
  lean_dec_ref(res);
  res = initialize_Lean_Data_Lsp_TextSync(lean_io_mk_world());
  if (lean_io_result_is_error(res)) return res;
  lean_dec_ref(res);
  l_Lean_Lsp_instFromJsonClientCapabilities___closed__1 = _init_l_Lean_Lsp_instFromJsonClientCapabilities___closed__1();
  lean_mark_persistent(l_Lean_Lsp_instFromJsonClientCapabilities___closed__1);
  l_Lean_Lsp_ClientCapabilities_hasToJson___closed__1 = _init_l_Lean_Lsp_ClientCapabilities_hasToJson___closed__1();
  lean_mark_persistent(l_Lean_Lsp_ClientCapabilities_hasToJson___closed__1);
  l_Lean_Lsp_ServerCapabilities_textDocumentSync_x3f___default = _init_l_Lean_Lsp_ServerCapabilities_textDocumentSync_x3f___default();
  lean_mark_persistent(l_Lean_Lsp_ServerCapabilities_textDocumentSync_x3f___default);
  l_Lean_Lsp_ServerCapabilities_hoverProvider___default = _init_l_Lean_Lsp_ServerCapabilities_hoverProvider___default();
  l_Lean_Lsp_ServerCapabilities_documentHighlightProvider___default = _init_l_Lean_Lsp_ServerCapabilities_documentHighlightProvider___default();
  l_Lean_Lsp_ServerCapabilities_documentSymbolProvider___default = _init_l_Lean_Lsp_ServerCapabilities_documentSymbolProvider___default();
  l_Lean_Lsp_ServerCapabilities_definitionProvider___default = _init_l_Lean_Lsp_ServerCapabilities_definitionProvider___default();
  l_Lean_Lsp_ServerCapabilities_declarationProvider___default = _init_l_Lean_Lsp_ServerCapabilities_declarationProvider___default();
  l_Lean_Lsp_ServerCapabilities_typeDefinitionProvider___default = _init_l_Lean_Lsp_ServerCapabilities_typeDefinitionProvider___default();
  l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____closed__1 = _init_l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____closed__1();
  lean_mark_persistent(l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____closed__1);
  l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____closed__2 = _init_l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____closed__2();
  lean_mark_persistent(l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____closed__2);
  l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____closed__3 = _init_l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____closed__3();
  lean_mark_persistent(l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____closed__3);
  l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____closed__4 = _init_l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____closed__4();
  lean_mark_persistent(l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____closed__4);
  l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____closed__5 = _init_l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____closed__5();
  lean_mark_persistent(l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____closed__5);
  l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____closed__6 = _init_l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____closed__6();
  lean_mark_persistent(l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____closed__6);
  l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____closed__7 = _init_l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____closed__7();
  lean_mark_persistent(l___private_Lean_Data_Lsp_Capabilities_0__Lean_Lsp_toJsonServerCapabilities____x40_Lean_Data_Lsp_Capabilities___hyg_45____closed__7);
  l_Lean_Lsp_instToJsonServerCapabilities___closed__1 = _init_l_Lean_Lsp_instToJsonServerCapabilities___closed__1();
  lean_mark_persistent(l_Lean_Lsp_instToJsonServerCapabilities___closed__1);
  l_Lean_Lsp_instToJsonServerCapabilities = _init_l_Lean_Lsp_instToJsonServerCapabilities();
  lean_mark_persistent(l_Lean_Lsp_instToJsonServerCapabilities);
  l_Lean_Lsp_instFromJsonServerCapabilities___closed__1 = _init_l_Lean_Lsp_instFromJsonServerCapabilities___closed__1();
  lean_mark_persistent(l_Lean_Lsp_instFromJsonServerCapabilities___closed__1);
  l_Lean_Lsp_instFromJsonServerCapabilities = _init_l_Lean_Lsp_instFromJsonServerCapabilities();
  lean_mark_persistent(l_Lean_Lsp_instFromJsonServerCapabilities);
  return lean_io_result_mk_ok(lean_box(0));
  }
  #ifdef __cplusplus
  }
  #endif
  