; LLVM IR from Water-Melon/Melon :: src (mln_lang)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.mln_lang_var_s = type { i32, ptr, ptr, ptr, ptr, ptr, i64 }
%struct.mln_lang_set_detail_s = type { ptr, ptr, i64 }
%struct.mln_lang_ctx_s = type { ptr, ptr, ptr, ptr, ptr, [1025 x %struct.mln_lang_stack_node_s], ptr, [1025 x %struct.mln_lang_scope_s], ptr, i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i64, ptr, i32 }
%struct.mln_lang_stack_node_s = type { ptr, i32, i32, %union.anon, ptr, ptr, ptr }
%union.anon = type { ptr }
%struct.mln_lang_scope_s = type { i32, ptr, ptr, ptr, ptr, i64, ptr, ptr }
%struct.mln_lang_symbol_node_s = type { ptr, ptr, i32, %union.anon.0, i64, ptr, ptr, ptr, ptr, ptr }
%union.anon.0 = type { ptr }
%struct.mln_lang_hash_bucket_s = type { ptr, ptr }
%struct.mln_string_t = type { ptr, i64, i32 }

@.str = external hidden unnamed_addr constant [11 x i8], align 1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nounwind uwtable
declare hidden void @__mln_lang_errmsg(ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @mln_lang_symbol_node_upper_join(ptr noundef nonnull %0, i32 noundef %1, ptr noundef nonnull %2) #1 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %21 = load i32, ptr %6, align 4, !tbaa !9
  %22 = icmp eq i32 %21, 0
  br i1 %22, label %23, label %27

23:                                               ; preds = %3
  %24 = load ptr, ptr %7, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.mln_lang_var_s, ptr %24, i32 0, i32 1
  %26 = load ptr, ptr %25, align 8, !tbaa !11
  br label %31

27:                                               ; preds = %3
  %28 = load ptr, ptr %7, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.mln_lang_set_detail_s, ptr %28, i32 0, i32 0
  %30 = load ptr, ptr %29, align 8, !tbaa !14
  br label %31

31:                                               ; preds = %27, %23
  %32 = phi ptr [ %26, %23 ], [ %30, %27 ]
  store ptr %32, ptr %10, align 8, !tbaa !5
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = load ptr, ptr %10, align 8, !tbaa !5
  %35 = load i32, ptr %6, align 4, !tbaa !9
  %36 = load ptr, ptr %7, align 8, !tbaa !5
  %37 = call ptr @mln_lang_symbol_node_new(ptr noundef %33, ptr noundef %34, i32 noundef %35, ptr noundef %36)
  store ptr %37, ptr %8, align 8, !tbaa !5
  %38 = icmp eq ptr %37, null
  br i1 %38, label %39, label %41

39:                                               ; preds = %31
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  call void @__mln_lang_errmsg(ptr noundef %40, ptr noundef @.str)
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %242

41:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  store i32 0, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.mln_lang_ctx_s, ptr %42, i32 0, i32 8
  %44 = load ptr, ptr %43, align 8, !tbaa !16
  %45 = getelementptr inbounds %struct.mln_lang_scope_s, ptr %44, i64 -1
  store ptr %45, ptr %13, align 8, !tbaa !5
  %46 = load ptr, ptr %13, align 8, !tbaa !5
  %47 = icmp ne ptr %46, null
  br i1 %47, label %48, label %59

48:                                               ; preds = %41
  %49 = load ptr, ptr %13, align 8, !tbaa !5
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.mln_lang_ctx_s, ptr %50, i32 0, i32 7
  %52 = getelementptr inbounds [1025 x %struct.mln_lang_scope_s], ptr %51, i64 0, i64 0
  %53 = ptrtoint ptr %49 to i64
  %54 = ptrtoint ptr %52 to i64
  %55 = sub i64 %53, %54
  %56 = sdiv exact i64 %55, 64
  %57 = icmp sle i64 %56, 1024
  br i1 %57, label %58, label %59

58:                                               ; preds = %48
  store i32 1, ptr %12, align 4, !tbaa !9
  br label %59

59:                                               ; preds = %58, %48, %41
  %60 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %60, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  %61 = load i32, ptr %14, align 4, !tbaa !9
  %62 = icmp ne i32 %61, 0
  br i1 %62, label %69, label %63

63:                                               ; preds = %59
  %64 = load ptr, ptr %5, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.mln_lang_ctx_s, ptr %64, i32 0, i32 8
  %66 = load ptr, ptr %65, align 8, !tbaa !16
  %67 = getelementptr inbounds %struct.mln_lang_scope_s, ptr %66, i32 0, i32 5
  %68 = load i64, ptr %67, align 8, !tbaa !18
  br label %76

69:                                               ; preds = %59
  %70 = load ptr, ptr %5, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.mln_lang_ctx_s, ptr %70, i32 0, i32 8
  %72 = load ptr, ptr %71, align 8, !tbaa !16
  %73 = getelementptr inbounds %struct.mln_lang_scope_s, ptr %72, i64 -1
  %74 = getelementptr inbounds %struct.mln_lang_scope_s, ptr %73, i32 0, i32 5
  %75 = load i64, ptr %74, align 8, !tbaa !18
  br label %76

76:                                               ; preds = %69, %63
  %77 = phi i64 [ %68, %63 ], [ %75, %69 ]
  %78 = load ptr, ptr %8, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.mln_lang_symbol_node_s, ptr %78, i32 0, i32 4
  store i64 %77, ptr %79, align 8, !tbaa !20
  %80 = load ptr, ptr %5, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.mln_lang_ctx_s, ptr %80, i32 0, i32 16
  %82 = load ptr, ptr %81, align 8, !tbaa !22
  %83 = load ptr, ptr %8, align 8, !tbaa !5
  %84 = call ptr @mln_lang_hash_get_bucket(ptr noundef %82, ptr noundef %83)
  %85 = load ptr, ptr %8, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.mln_lang_symbol_node_s, ptr %85, i32 0, i32 5
  store ptr %84, ptr %86, align 8, !tbaa !23
  %87 = load ptr, ptr %8, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.mln_lang_symbol_node_s, ptr %87, i32 0, i32 5
  %89 = load ptr, ptr %88, align 8, !tbaa !23
  %90 = getelementptr inbounds %struct.mln_lang_hash_bucket_s, ptr %89, i32 0, i32 1
  %91 = load ptr, ptr %90, align 8, !tbaa !24
  store ptr %91, ptr %9, align 8, !tbaa !5
  br label %92

92:                                               ; preds = %184, %76
  %93 = load ptr, ptr %9, align 8, !tbaa !5
  %94 = icmp ne ptr %93, null
  br i1 %94, label %95, label %188

95:                                               ; preds = %92
  %96 = load ptr, ptr %9, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.mln_lang_symbol_node_s, ptr %96, i32 0, i32 4
  %98 = load i64, ptr %97, align 8, !tbaa !20
  %99 = load ptr, ptr %8, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.mln_lang_symbol_node_s, ptr %99, i32 0, i32 4
  %101 = load i64, ptr %100, align 8, !tbaa !20
  %102 = icmp ne i64 %98, %101
  br i1 %102, label %113, label %103

103:                                              ; preds = %95
  %104 = load ptr, ptr %9, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.mln_lang_symbol_node_s, ptr %104, i32 0, i32 0
  %106 = load ptr, ptr %105, align 8, !tbaa !26
  %107 = getelementptr inbounds %struct.mln_string_t, ptr %106, i32 0, i32 1
  %108 = load i64, ptr %107, align 8, !tbaa !27
  %109 = load ptr, ptr %10, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.mln_string_t, ptr %109, i32 0, i32 1
  %111 = load i64, ptr %110, align 8, !tbaa !27
  %112 = icmp ne i64 %108, %111
  br i1 %112, label %113, label %114

113:                                              ; preds = %103, %95
  br label %184

114:                                              ; preds = %103
  %115 = load ptr, ptr %9, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.mln_lang_symbol_node_s, ptr %115, i32 0, i32 0
  %117 = load ptr, ptr %116, align 8, !tbaa !26
  %118 = getelementptr inbounds %struct.mln_string_t, ptr %117, i32 0, i32 0
  %119 = load ptr, ptr %118, align 8, !tbaa !29
  %120 = load ptr, ptr %10, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.mln_string_t, ptr %120, i32 0, i32 0
  %122 = load ptr, ptr %121, align 8, !tbaa !29
  %123 = load ptr, ptr %10, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.mln_string_t, ptr %123, i32 0, i32 1
  %125 = load i64, ptr %124, align 8, !tbaa !27
  %126 = call i32 @memcmp(ptr noundef %119, ptr noundef %122, i64 noundef %125) #5
  %127 = icmp ne i32 %126, 0
  br i1 %127, label %183, label %128

128:                                              ; preds = %114
  %129 = load ptr, ptr %9, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.mln_lang_symbol_node_s, ptr %129, i32 0, i32 5
  %131 = load ptr, ptr %130, align 8, !tbaa !23
  %132 = getelementptr inbounds %struct.mln_lang_hash_bucket_s, ptr %131, i32 0, i32 0
  %133 = load ptr, ptr %9, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.mln_lang_symbol_node_s, ptr %133, i32 0, i32 5
  %135 = load ptr, ptr %134, align 8, !tbaa !23
  %136 = getelementptr inbounds %struct.mln_lang_hash_bucket_s, ptr %135, i32 0, i32 1
  %137 = load ptr, ptr %9, align 8, !tbaa !5
  call void @mln_lang_sym_chain_del(ptr noundef %132, ptr noundef %136, ptr noundef %137)
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  store i32 0, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %138 = load ptr, ptr %5, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.mln_lang_ctx_s, ptr %138, i32 0, i32 8
  %140 = load ptr, ptr %139, align 8, !tbaa !16
  %141 = getelementptr inbounds %struct.mln_lang_scope_s, ptr %140, i64 -1
  store ptr %141, ptr %16, align 8, !tbaa !5
  %142 = load ptr, ptr %16, align 8, !tbaa !5
  %143 = icmp ne ptr %142, null
  br i1 %143, label %144, label %155

144:                                              ; preds = %128
  %145 = load ptr, ptr %16, align 8, !tbaa !5
  %146 = load ptr, ptr %5, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.mln_lang_ctx_s, ptr %146, i32 0, i32 7
  %148 = getelementptr inbounds [1025 x %struct.mln_lang_scope_s], ptr %147, i64 0, i64 0
  %149 = ptrtoint ptr %145 to i64
  %150 = ptrtoint ptr %148 to i64
  %151 = sub i64 %149, %150
  %152 = sdiv exact i64 %151, 64
  %153 = icmp sle i64 %152, 1024
  br i1 %153, label %154, label %155

154:                                              ; preds = %144
  store i32 1, ptr %15, align 4, !tbaa !9
  br label %155

155:                                              ; preds = %154, %144, %128
  %156 = load i32, ptr %15, align 4, !tbaa !9
  store i32 %156, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  %157 = load i32, ptr %17, align 4, !tbaa !9
  %158 = icmp ne i32 %157, 0
  br i1 %158, label %169, label %159

159:                                              ; preds = %155
  %160 = load ptr, ptr %5, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.mln_lang_ctx_s, ptr %160, i32 0, i32 8
  %162 = load ptr, ptr %161, align 8, !tbaa !16
  %163 = getelementptr inbounds %struct.mln_lang_scope_s, ptr %162, i32 0, i32 6
  %164 = load ptr, ptr %5, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.mln_lang_ctx_s, ptr %164, i32 0, i32 8
  %166 = load ptr, ptr %165, align 8, !tbaa !16
  %167 = getelementptr inbounds %struct.mln_lang_scope_s, ptr %166, i32 0, i32 7
  %168 = load ptr, ptr %9, align 8, !tbaa !5
  call void @mln_lang_sym_scope_chain_del(ptr noundef %163, ptr noundef %167, ptr noundef %168)
  br label %181

169:                                              ; preds = %155
  %170 = load ptr, ptr %5, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.mln_lang_ctx_s, ptr %170, i32 0, i32 8
  %172 = load ptr, ptr %171, align 8, !tbaa !16
  %173 = getelementptr inbounds %struct.mln_lang_scope_s, ptr %172, i64 -1
  %174 = getelementptr inbounds %struct.mln_lang_scope_s, ptr %173, i32 0, i32 6
  %175 = load ptr, ptr %5, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.mln_lang_ctx_s, ptr %175, i32 0, i32 8
  %177 = load ptr, ptr %176, align 8, !tbaa !16
  %178 = getelementptr inbounds %struct.mln_lang_scope_s, ptr %177, i64 -1
  %179 = getelementptr inbounds %struct.mln_lang_scope_s, ptr %178, i32 0, i32 7
  %180 = load ptr, ptr %9, align 8, !tbaa !5
  call void @mln_lang_sym_scope_chain_del(ptr noundef %174, ptr noundef %179, ptr noundef %180)
  br label %181

181:                                              ; preds = %169, %159
  %182 = load ptr, ptr %9, align 8, !tbaa !5
  call void @mln_lang_symbol_node_free(ptr noundef %182)
  br label %188

183:                                              ; preds = %114
  br label %184

184:                                              ; preds = %183, %113
  %185 = load ptr, ptr %9, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.mln_lang_symbol_node_s, ptr %185, i32 0, i32 6
  %187 = load ptr, ptr %186, align 8, !tbaa !30
  store ptr %187, ptr %9, align 8, !tbaa !5
  br label %92, !llvm.loop !31

188:                                              ; preds = %181, %92
  %189 = load ptr, ptr %8, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.mln_lang_symbol_node_s, ptr %189, i32 0, i32 5
  %191 = load ptr, ptr %190, align 8, !tbaa !23
  %192 = getelementptr inbounds %struct.mln_lang_hash_bucket_s, ptr %191, i32 0, i32 0
  %193 = load ptr, ptr %8, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.mln_lang_symbol_node_s, ptr %193, i32 0, i32 5
  %195 = load ptr, ptr %194, align 8, !tbaa !23
  %196 = getelementptr inbounds %struct.mln_lang_hash_bucket_s, ptr %195, i32 0, i32 1
  %197 = load ptr, ptr %8, align 8, !tbaa !5
  call void @mln_lang_sym_chain_add(ptr noundef %192, ptr noundef %196, ptr noundef %197)
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  store i32 0, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  %198 = load ptr, ptr %5, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.mln_lang_ctx_s, ptr %198, i32 0, i32 8
  %200 = load ptr, ptr %199, align 8, !tbaa !16
  %201 = getelementptr inbounds %struct.mln_lang_scope_s, ptr %200, i64 -1
  store ptr %201, ptr %19, align 8, !tbaa !5
  %202 = load ptr, ptr %19, align 8, !tbaa !5
  %203 = icmp ne ptr %202, null
  br i1 %203, label %204, label %215

204:                                              ; preds = %188
  %205 = load ptr, ptr %19, align 8, !tbaa !5
  %206 = load ptr, ptr %5, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.mln_lang_ctx_s, ptr %206, i32 0, i32 7
  %208 = getelementptr inbounds [1025 x %struct.mln_lang_scope_s], ptr %207, i64 0, i64 0
  %209 = ptrtoint ptr %205 to i64
  %210 = ptrtoint ptr %208 to i64
  %211 = sub i64 %209, %210
  %212 = sdiv exact i64 %211, 64
  %213 = icmp sle i64 %212, 1024
  br i1 %213, label %214, label %215

214:                                              ; preds = %204
  store i32 1, ptr %18, align 4, !tbaa !9
  br label %215

215:                                              ; preds = %214, %204, %188
  %216 = load i32, ptr %18, align 4, !tbaa !9
  store i32 %216, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  %217 = load i32, ptr %20, align 4, !tbaa !9
  %218 = icmp ne i32 %217, 0
  br i1 %218, label %229, label %219

219:                                              ; preds = %215
  %220 = load ptr, ptr %5, align 8, !tbaa !5
  %221 = getelementptr inbounds %struct.mln_lang_ctx_s, ptr %220, i32 0, i32 8
  %222 = load ptr, ptr %221, align 8, !tbaa !16
  %223 = getelementptr inbounds %struct.mln_lang_scope_s, ptr %222, i32 0, i32 6
  %224 = load ptr, ptr %5, align 8, !tbaa !5
  %225 = getelementptr inbounds %struct.mln_lang_ctx_s, ptr %224, i32 0, i32 8
  %226 = load ptr, ptr %225, align 8, !tbaa !16
  %227 = getelementptr inbounds %struct.mln_lang_scope_s, ptr %226, i32 0, i32 7
  %228 = load ptr, ptr %8, align 8, !tbaa !5
  call void @mln_lang_sym_scope_chain_add(ptr noundef %223, ptr noundef %227, ptr noundef %228)
  br label %241

229:                                              ; preds = %215
  %230 = load ptr, ptr %5, align 8, !tbaa !5
  %231 = getelementptr inbounds %struct.mln_lang_ctx_s, ptr %230, i32 0, i32 8
  %232 = load ptr, ptr %231, align 8, !tbaa !16
  %233 = getelementptr inbounds %struct.mln_lang_scope_s, ptr %232, i64 -1
  %234 = getelementptr inbounds %struct.mln_lang_scope_s, ptr %233, i32 0, i32 6
  %235 = load ptr, ptr %5, align 8, !tbaa !5
  %236 = getelementptr inbounds %struct.mln_lang_ctx_s, ptr %235, i32 0, i32 8
  %237 = load ptr, ptr %236, align 8, !tbaa !16
  %238 = getelementptr inbounds %struct.mln_lang_scope_s, ptr %237, i64 -1
  %239 = getelementptr inbounds %struct.mln_lang_scope_s, ptr %238, i32 0, i32 7
  %240 = load ptr, ptr %8, align 8, !tbaa !5
  call void @mln_lang_sym_scope_chain_add(ptr noundef %234, ptr noundef %239, ptr noundef %240)
  br label %241

241:                                              ; preds = %229, %219
  store i32 0, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %242

242:                                              ; preds = %241, %39
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  %243 = load i32, ptr %4, align 4
  ret i32 %243
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @mln_lang_symbol_node_new(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @mln_lang_hash_get_bucket(ptr noundef, ptr noundef) #2

; Function Attrs: nounwind willreturn memory(read)
declare i32 @memcmp(ptr noundef, ptr noundef, i64 noundef) #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @mln_lang_sym_chain_del(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @mln_lang_sym_scope_chain_del(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden void @mln_lang_symbol_node_free(ptr noundef) #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @mln_lang_sym_chain_add(ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @mln_lang_sym_scope_chain_add(ptr noundef, ptr noundef, ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind willreturn memory(read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }
attributes #5 = { nounwind willreturn memory(read) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 8}
!12 = !{!"mln_lang_var_s", !10, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !13, i64 48}
!13 = !{!"long", !7, i64 0}
!14 = !{!15, !6, i64 0}
!15 = !{!"mln_lang_set_detail_s", !6, i64 0, !6, i64 8, !13, i64 16}
!16 = !{!17, !6, i64 114848}
!17 = !{!"mln_lang_ctx_s", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !7, i64 40, !6, i64 49240, !7, i64 49248, !6, i64 114848, !13, i64 114856, !6, i64 114864, !6, i64 114872, !6, i64 114880, !6, i64 114888, !6, i64 114896, !6, i64 114904, !6, i64 114912, !6, i64 114920, !6, i64 114928, !6, i64 114936, !6, i64 114944, !13, i64 114952, !6, i64 114960, !10, i64 114968, !10, i64 114970, !10, i64 114970, !10, i64 114970, !10, i64 114970, !10, i64 114970, !10, i64 114970, !10, i64 114970, !10, i64 114970, !10, i64 114971, !10, i64 114971, !10, i64 114971}
!18 = !{!19, !13, i64 40}
!19 = !{!"mln_lang_scope_s", !10, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !13, i64 40, !6, i64 48, !6, i64 56}
!20 = !{!21, !13, i64 32}
!21 = !{!"mln_lang_symbol_node_s", !6, i64 0, !6, i64 8, !10, i64 16, !7, i64 24, !13, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72}
!22 = !{!17, !6, i64 114912}
!23 = !{!21, !6, i64 40}
!24 = !{!25, !6, i64 8}
!25 = !{!"mln_lang_hash_bucket_s", !6, i64 0, !6, i64 8}
!26 = !{!21, !6, i64 0}
!27 = !{!28, !13, i64 8}
!28 = !{!"", !6, i64 0, !13, i64 8, !13, i64 16, !13, i64 16, !13, i64 16}
!29 = !{!28, !6, i64 0}
!30 = !{!21, !6, i64 48}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str = external hidden unnamed_addr constant [11 x i8], align 1

; Function Attrs: nounwind uwtable
declare hidden void @__mln_lang_errmsg(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 1) i32 @mln_lang_symbol_node_upper_join(ptr noundef nonnull %0, i32 noundef %1, ptr noundef nonnull %2) local_unnamed_addr #0 {
  %4 = icmp eq i32 %1, 0
  %.in.idx = select i1 %4, i64 8, i64 0
  %.in = getelementptr inbounds i8, ptr %2, i64 %.in.idx
  %5 = load ptr, ptr %.in, align 8, !tbaa !5
  %6 = tail call ptr @mln_lang_symbol_node_new(ptr noundef nonnull %0, ptr noundef %5, i32 noundef %1, ptr noundef nonnull %2)
  %7 = icmp eq ptr %6, null
  br i1 %7, label %8, label %9

8:                                                ; preds = %3
  tail call void @__mln_lang_errmsg(ptr noundef nonnull %0, ptr noundef nonnull @.str)
  br label %64

9:                                                ; preds = %3
  %10 = getelementptr inbounds i8, ptr %0, i64 114848
  %11 = load ptr, ptr %10, align 8, !tbaa !9
  %12 = getelementptr inbounds i8, ptr %11, i64 -64
  %13 = getelementptr inbounds i8, ptr %0, i64 49248
  %14 = ptrtoint ptr %12 to i64
  %15 = ptrtoint ptr %13 to i64
  %16 = sub i64 %14, %15
  %17 = icmp sgt i64 %16, 65536
  %.in67.v = select i1 %17, i64 40, i64 -24
  %.in67 = getelementptr inbounds i8, ptr %11, i64 %.in67.v
  %18 = load i64, ptr %.in67, align 8, !tbaa !13
  %19 = getelementptr inbounds i8, ptr %6, i64 32
  store i64 %18, ptr %19, align 8, !tbaa !15
  %20 = getelementptr inbounds i8, ptr %0, i64 114912
  %21 = load ptr, ptr %20, align 8, !tbaa !17
  %22 = tail call ptr @mln_lang_hash_get_bucket(ptr noundef %21, ptr noundef nonnull %6)
  %23 = getelementptr inbounds i8, ptr %6, i64 40
  store ptr %22, ptr %23, align 8, !tbaa !18
  %24 = getelementptr inbounds i8, ptr %22, i64 8
  %.06174 = load ptr, ptr %24, align 8, !tbaa !5
  %.not75 = icmp eq ptr %.06174, null
  br i1 %.not75, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %9
  %25 = load i64, ptr %19, align 8, !tbaa !15
  %26 = getelementptr inbounds i8, ptr %5, i64 8
  br label %27

27:                                               ; preds = %.lr.ph, %49
  %.06176 = phi ptr [ %.06174, %.lr.ph ], [ %.061, %49 ]
  %28 = getelementptr inbounds i8, ptr %.06176, i64 32
  %29 = load i64, ptr %28, align 8, !tbaa !15
  %.not68 = icmp eq i64 %29, %25
  br i1 %.not68, label %30, label %49

30:                                               ; preds = %27
  %31 = load ptr, ptr %.06176, align 8, !tbaa !19
  %32 = getelementptr inbounds i8, ptr %31, i64 8
  %33 = load i64, ptr %32, align 8, !tbaa !20
  %34 = load i64, ptr %26, align 8, !tbaa !20
  %.not69 = icmp eq i64 %33, %34
  br i1 %.not69, label %35, label %49

35:                                               ; preds = %30
  %36 = load ptr, ptr %31, align 8, !tbaa !22
  %37 = load ptr, ptr %5, align 8, !tbaa !22
  %bcmp = tail call i32 @bcmp(ptr %36, ptr %37, i64 %33)
  %.not70 = icmp eq i32 %bcmp, 0
  br i1 %.not70, label %38, label %49

38:                                               ; preds = %35
  %39 = getelementptr inbounds i8, ptr %.06176, i64 40
  %40 = load ptr, ptr %39, align 8, !tbaa !18
  %41 = getelementptr inbounds i8, ptr %40, i64 8
  tail call void @mln_lang_sym_chain_del(ptr noundef %40, ptr noundef nonnull %41, ptr noundef nonnull %.06176)
  %42 = load ptr, ptr %10, align 8, !tbaa !9
  %43 = getelementptr inbounds i8, ptr %42, i64 -64
  %44 = ptrtoint ptr %43 to i64
  %45 = sub i64 %44, %15
  %46 = icmp sgt i64 %45, 65536
  %. = select i1 %46, i64 48, i64 -16
  %.82 = select i1 %46, i64 56, i64 -8
  %47 = getelementptr inbounds i8, ptr %42, i64 %.
  %48 = getelementptr inbounds i8, ptr %42, i64 %.82
  tail call void @mln_lang_sym_scope_chain_del(ptr noundef nonnull %47, ptr noundef nonnull %48, ptr noundef nonnull %.06176)
  tail call void @mln_lang_symbol_node_free(ptr noundef nonnull %.06176)
  %.pre = load ptr, ptr %23, align 8, !tbaa !18
  br label %.loopexit

49:                                               ; preds = %35, %27, %30
  %50 = getelementptr inbounds i8, ptr %.06176, i64 48
  %.061 = load ptr, ptr %50, align 8, !tbaa !5
  %.not = icmp eq ptr %.061, null
  br i1 %.not, label %.loopexit, label %27, !llvm.loop !23

.loopexit:                                        ; preds = %49, %9, %38
  %51 = phi ptr [ %22, %9 ], [ %.pre, %38 ], [ %22, %49 ]
  %52 = getelementptr inbounds i8, ptr %51, i64 8
  tail call void @mln_lang_sym_chain_add(ptr noundef %51, ptr noundef nonnull %52, ptr noundef nonnull %6)
  %53 = load ptr, ptr %10, align 8, !tbaa !9
  %54 = getelementptr inbounds i8, ptr %53, i64 -64
  %55 = ptrtoint ptr %54 to i64
  %56 = sub i64 %55, %15
  %57 = icmp sgt i64 %56, 65536
  br i1 %57, label %58, label %61

58:                                               ; preds = %.loopexit
  %59 = getelementptr inbounds i8, ptr %53, i64 48
  %60 = getelementptr inbounds i8, ptr %53, i64 56
  tail call void @mln_lang_sym_scope_chain_add(ptr noundef nonnull %59, ptr noundef nonnull %60, ptr noundef nonnull %6)
  br label %64

61:                                               ; preds = %.loopexit
  %62 = getelementptr inbounds i8, ptr %53, i64 -16
  %63 = getelementptr inbounds i8, ptr %53, i64 -8
  tail call void @mln_lang_sym_scope_chain_add(ptr noundef nonnull %62, ptr noundef nonnull %63, ptr noundef nonnull %6)
  br label %64

64:                                               ; preds = %58, %61, %8
  %.0 = phi i32 [ -1, %8 ], [ 0, %61 ], [ 0, %58 ]
  ret i32 %.0
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @mln_lang_symbol_node_new(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @mln_lang_hash_get_bucket(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @mln_lang_sym_chain_del(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @mln_lang_sym_scope_chain_del(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden void @mln_lang_symbol_node_free(ptr noundef) local_unnamed_addr #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @mln_lang_sym_chain_add(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @mln_lang_sym_scope_chain_add(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nofree nounwind willreturn memory(argmem: read)
declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #2

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nofree nounwind willreturn memory(argmem: read) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 114848}
!10 = !{!"mln_lang_ctx_s", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !7, i64 40, !6, i64 49240, !7, i64 49248, !6, i64 114848, !11, i64 114856, !6, i64 114864, !6, i64 114872, !6, i64 114880, !6, i64 114888, !6, i64 114896, !6, i64 114904, !6, i64 114912, !6, i64 114920, !6, i64 114928, !6, i64 114936, !6, i64 114944, !11, i64 114952, !6, i64 114960, !12, i64 114968, !12, i64 114970, !12, i64 114970, !12, i64 114970, !12, i64 114970, !12, i64 114970, !12, i64 114970, !12, i64 114970, !12, i64 114970, !12, i64 114971, !12, i64 114971, !12, i64 114971}
!11 = !{!"long", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !11, i64 40}
!14 = !{!"mln_lang_scope_s", !12, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !11, i64 40, !6, i64 48, !6, i64 56}
!15 = !{!16, !11, i64 32}
!16 = !{!"mln_lang_symbol_node_s", !6, i64 0, !6, i64 8, !12, i64 16, !7, i64 24, !11, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72}
!17 = !{!10, !6, i64 114912}
!18 = !{!16, !6, i64 40}
!19 = !{!16, !6, i64 0}
!20 = !{!21, !11, i64 8}
!21 = !{!"", !6, i64 0, !11, i64 8, !11, i64 16, !11, i64 16, !11, i64 16}
!22 = !{!21, !6, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass