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

; 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_event_s = type { %union.pthread_mutex_t, %union.pthread_mutex_t, %union.pthread_mutex_t, ptr, ptr, i32, i32, %struct.fd_set, %struct.fd_set, %struct.fd_set, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%struct.fd_set = type { [16 x i64] }
%struct.mln_fheap_t = type { ptr, ptr, ptr, ptr, ptr, i64, ptr, ptr, ptr, ptr }
%struct.mln_fheap_node_s = type { ptr, ptr, ptr, ptr, ptr, i64, i32 }

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

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

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

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

; Function Attrs: nounwind
declare i32 @pthread_mutex_destroy(ptr noundef) #2

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

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

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

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

; Function Attrs: nounwind
declare void @free(ptr noundef) #2

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

declare void @mln_rbtree_free(ptr noundef) #3

; Function Attrs: nounwind uwtable
define dso_local void @mln_event_free(ptr noundef %0) #4 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %18 = load ptr, ptr %2, align 8, !tbaa !5
  %19 = icmp eq ptr %18, null
  br i1 %19, label %20, label %21

20:                                               ; preds = %1
  br label %340

21:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  %22 = load ptr, ptr %2, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.mln_event_s, ptr %22, i32 0, i32 15
  %24 = load ptr, ptr %23, align 8, !tbaa !9
  %25 = icmp ne ptr %24, null
  br i1 %25, label %26, label %167

26:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  br label %27

27:                                               ; preds = %145, %26
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  store ptr @mln_event_fd_timeout_cmp, ptr %5, align 8, !tbaa !5
  %28 = load ptr, ptr %5, align 8, !tbaa !5
  %29 = icmp eq ptr %28, null
  br i1 %29, label %30, label %36

30:                                               ; preds = %27
  %31 = load ptr, ptr %2, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.mln_event_s, ptr %31, i32 0, i32 15
  %33 = load ptr, ptr %32, align 8, !tbaa !9
  %34 = getelementptr inbounds %struct.mln_fheap_t, ptr %33, i32 0, i32 2
  %35 = load ptr, ptr %34, align 8, !tbaa !13
  store ptr %35, ptr %5, align 8, !tbaa !5
  br label %36

36:                                               ; preds = %30, %27
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %37 = load ptr, ptr %2, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.mln_event_s, ptr %37, i32 0, i32 15
  %39 = load ptr, ptr %38, align 8, !tbaa !9
  %40 = getelementptr inbounds %struct.mln_fheap_t, ptr %39, i32 0, i32 1
  %41 = load ptr, ptr %40, align 8, !tbaa !16
  store ptr %41, ptr %6, align 8, !tbaa !5
  %42 = load ptr, ptr %6, align 8, !tbaa !5
  %43 = icmp ne ptr %42, null
  br i1 %43, label %44, label %92

44:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  br label %45

45:                                               ; preds = %50, %44
  %46 = load ptr, ptr %6, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.mln_fheap_node_s, ptr %46, i32 0, i32 2
  %48 = call ptr @mln_fheap_remove_child(ptr noundef %47)
  store ptr %48, ptr %7, align 8, !tbaa !5
  %49 = icmp ne ptr %48, null
  br i1 %49, label %50, label %58

50:                                               ; preds = %45
  %51 = load ptr, ptr %2, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.mln_event_s, ptr %51, i32 0, i32 15
  %53 = load ptr, ptr %52, align 8, !tbaa !9
  %54 = getelementptr inbounds %struct.mln_fheap_t, ptr %53, i32 0, i32 0
  %55 = load ptr, ptr %7, align 8, !tbaa !5
  call void @mln_fheap_add_child(ptr noundef %54, ptr noundef %55)
  %56 = load ptr, ptr %7, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.mln_fheap_node_s, ptr %56, i32 0, i32 1
  store ptr null, ptr %57, align 8, !tbaa !17
  br label %45, !llvm.loop !19

58:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %59 = load ptr, ptr %6, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.mln_fheap_node_s, ptr %59, i32 0, i32 4
  %61 = load ptr, ptr %60, align 8, !tbaa !21
  store ptr %61, ptr %8, align 8, !tbaa !5
  %62 = load ptr, ptr %2, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.mln_event_s, ptr %62, i32 0, i32 15
  %64 = load ptr, ptr %63, align 8, !tbaa !9
  %65 = getelementptr inbounds %struct.mln_fheap_t, ptr %64, i32 0, i32 0
  %66 = load ptr, ptr %6, align 8, !tbaa !5
  call void @mln_fheap_del_child(ptr noundef %65, ptr noundef %66)
  %67 = load ptr, ptr %6, align 8, !tbaa !5
  %68 = load ptr, ptr %8, align 8, !tbaa !5
  %69 = icmp eq ptr %67, %68
  br i1 %69, label %70, label %75

70:                                               ; preds = %58
  %71 = load ptr, ptr %2, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.mln_event_s, ptr %71, i32 0, i32 15
  %73 = load ptr, ptr %72, align 8, !tbaa !9
  %74 = getelementptr inbounds %struct.mln_fheap_t, ptr %73, i32 0, i32 1
  store ptr null, ptr %74, align 8, !tbaa !16
  br label %85

75:                                               ; preds = %58
  %76 = load ptr, ptr %8, align 8, !tbaa !5
  %77 = load ptr, ptr %2, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.mln_event_s, ptr %77, i32 0, i32 15
  %79 = load ptr, ptr %78, align 8, !tbaa !9
  %80 = getelementptr inbounds %struct.mln_fheap_t, ptr %79, i32 0, i32 1
  store ptr %76, ptr %80, align 8, !tbaa !16
  %81 = load ptr, ptr %2, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.mln_event_s, ptr %81, i32 0, i32 15
  %83 = load ptr, ptr %82, align 8, !tbaa !9
  %84 = load ptr, ptr %5, align 8, !tbaa !5
  call void @mln_fheap_consolidate(ptr noundef %83, ptr noundef %84)
  br label %85

85:                                               ; preds = %75, %70
  %86 = load ptr, ptr %2, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.mln_event_s, ptr %86, i32 0, i32 15
  %88 = load ptr, ptr %87, align 8, !tbaa !9
  %89 = getelementptr inbounds %struct.mln_fheap_t, ptr %88, i32 0, i32 5
  %90 = load i64, ptr %89, align 8, !tbaa !22
  %91 = add i64 %90, -1
  store i64 %91, ptr %89, align 8, !tbaa !22
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %92

92:                                               ; preds = %85, %36
  %93 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %93, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  %94 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %94, ptr %4, align 8, !tbaa !5
  %95 = icmp ne ptr %94, null
  br i1 %95, label %96, label %146

96:                                               ; preds = %92
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  store ptr null, ptr %10, align 8, !tbaa !5
  %97 = load ptr, ptr %10, align 8, !tbaa !5
  %98 = icmp eq ptr %97, null
  br i1 %98, label %99, label %105

99:                                               ; preds = %96
  %100 = load ptr, ptr %2, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.mln_event_s, ptr %100, i32 0, i32 15
  %102 = load ptr, ptr %101, align 8, !tbaa !9
  %103 = getelementptr inbounds %struct.mln_fheap_t, ptr %102, i32 0, i32 4
  %104 = load ptr, ptr %103, align 8, !tbaa !23
  store ptr %104, ptr %10, align 8, !tbaa !5
  br label %105

105:                                              ; preds = %99, %96
  %106 = load ptr, ptr %4, align 8, !tbaa !5
  %107 = icmp ne ptr %106, null
  br i1 %107, label %108, label %145

108:                                              ; preds = %105
  %109 = load ptr, ptr %10, align 8, !tbaa !5
  %110 = icmp ne ptr %109, null
  br i1 %110, label %111, label %121

111:                                              ; preds = %108
  %112 = load ptr, ptr %4, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.mln_fheap_node_s, ptr %112, i32 0, i32 0
  %114 = load ptr, ptr %113, align 8, !tbaa !24
  %115 = icmp ne ptr %114, null
  br i1 %115, label %116, label %121

116:                                              ; preds = %111
  %117 = load ptr, ptr %10, align 8, !tbaa !5
  %118 = load ptr, ptr %4, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.mln_fheap_node_s, ptr %118, i32 0, i32 0
  %120 = load ptr, ptr %119, align 8, !tbaa !24
  call void %117(ptr noundef %120)
  br label %121

121:                                              ; preds = %116, %111, %108
  %122 = load ptr, ptr %4, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.mln_fheap_node_s, ptr %122, i32 0, i32 6
  %124 = load i32, ptr %123, align 8
  %125 = and i32 %124, 1
  %126 = icmp ne i32 %125, 0
  br i1 %126, label %144, label %127

127:                                              ; preds = %121
  %128 = load ptr, ptr %2, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.mln_event_s, ptr %128, i32 0, i32 15
  %130 = load ptr, ptr %129, align 8, !tbaa !9
  %131 = getelementptr inbounds %struct.mln_fheap_t, ptr %130, i32 0, i32 7
  %132 = load ptr, ptr %131, align 8, !tbaa !25
  %133 = icmp ne ptr %132, null
  br i1 %133, label %134, label %141

134:                                              ; preds = %127
  %135 = load ptr, ptr %2, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.mln_event_s, ptr %135, i32 0, i32 15
  %137 = load ptr, ptr %136, align 8, !tbaa !9
  %138 = getelementptr inbounds %struct.mln_fheap_t, ptr %137, i32 0, i32 9
  %139 = load ptr, ptr %138, align 8, !tbaa !26
  %140 = load ptr, ptr %4, align 8, !tbaa !5
  call void %139(ptr noundef %140)
  br label %143

141:                                              ; preds = %127
  %142 = load ptr, ptr %4, align 8, !tbaa !5
  call void @free(ptr noundef %142) #5
  br label %143

143:                                              ; preds = %141, %134
  br label %144

144:                                              ; preds = %143, %121
  br label %145

145:                                              ; preds = %144, %105
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  br label %27, !llvm.loop !27

146:                                              ; preds = %92
  %147 = load ptr, ptr %2, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.mln_event_s, ptr %147, i32 0, i32 15
  %149 = load ptr, ptr %148, align 8, !tbaa !9
  %150 = getelementptr inbounds %struct.mln_fheap_t, ptr %149, i32 0, i32 7
  %151 = load ptr, ptr %150, align 8, !tbaa !25
  %152 = icmp ne ptr %151, null
  br i1 %152, label %153, label %162

153:                                              ; preds = %146
  %154 = load ptr, ptr %2, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.mln_event_s, ptr %154, i32 0, i32 15
  %156 = load ptr, ptr %155, align 8, !tbaa !9
  %157 = getelementptr inbounds %struct.mln_fheap_t, ptr %156, i32 0, i32 9
  %158 = load ptr, ptr %157, align 8, !tbaa !26
  %159 = load ptr, ptr %2, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.mln_event_s, ptr %159, i32 0, i32 15
  %161 = load ptr, ptr %160, align 8, !tbaa !9
  call void %158(ptr noundef %161)
  br label %166

162:                                              ; preds = %146
  %163 = load ptr, ptr %2, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.mln_event_s, ptr %163, i32 0, i32 15
  %165 = load ptr, ptr %164, align 8, !tbaa !9
  call void @free(ptr noundef %165) #5
  br label %166

166:                                              ; preds = %162, %153
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  br label %167

167:                                              ; preds = %166, %21
  %168 = load ptr, ptr %2, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.mln_event_s, ptr %168, i32 0, i32 10
  %170 = load ptr, ptr %169, align 8, !tbaa !28
  call void @mln_rbtree_free(ptr noundef %170)
  br label %171

171:                                              ; preds = %176, %167
  %172 = load ptr, ptr %2, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.mln_event_s, ptr %172, i32 0, i32 11
  %174 = load ptr, ptr %173, align 8, !tbaa !29
  store ptr %174, ptr %3, align 8, !tbaa !5
  %175 = icmp ne ptr %174, null
  br i1 %175, label %176, label %183

176:                                              ; preds = %171
  %177 = load ptr, ptr %2, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.mln_event_s, ptr %177, i32 0, i32 11
  %179 = load ptr, ptr %2, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.mln_event_s, ptr %179, i32 0, i32 12
  %181 = load ptr, ptr %3, align 8, !tbaa !5
  call void @ev_fd_wait_chain_del(ptr noundef %178, ptr noundef %180, ptr noundef %181)
  %182 = load ptr, ptr %3, align 8, !tbaa !5
  call void @mln_event_desc_free(ptr noundef %182)
  br label %171, !llvm.loop !30

183:                                              ; preds = %171
  %184 = load ptr, ptr %2, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.mln_event_s, ptr %184, i32 0, i32 16
  %186 = load ptr, ptr %185, align 8, !tbaa !31
  %187 = icmp ne ptr %186, null
  br i1 %187, label %188, label %329

188:                                              ; preds = %183
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  br label %189

189:                                              ; preds = %307, %188
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  store ptr @mln_event_fheap_timer_cmp, ptr %12, align 8, !tbaa !5
  %190 = load ptr, ptr %12, align 8, !tbaa !5
  %191 = icmp eq ptr %190, null
  br i1 %191, label %192, label %198

192:                                              ; preds = %189
  %193 = load ptr, ptr %2, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.mln_event_s, ptr %193, i32 0, i32 16
  %195 = load ptr, ptr %194, align 8, !tbaa !31
  %196 = getelementptr inbounds %struct.mln_fheap_t, ptr %195, i32 0, i32 2
  %197 = load ptr, ptr %196, align 8, !tbaa !13
  store ptr %197, ptr %12, align 8, !tbaa !5
  br label %198

198:                                              ; preds = %192, %189
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %199 = load ptr, ptr %2, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.mln_event_s, ptr %199, i32 0, i32 16
  %201 = load ptr, ptr %200, align 8, !tbaa !31
  %202 = getelementptr inbounds %struct.mln_fheap_t, ptr %201, i32 0, i32 1
  %203 = load ptr, ptr %202, align 8, !tbaa !16
  store ptr %203, ptr %13, align 8, !tbaa !5
  %204 = load ptr, ptr %13, align 8, !tbaa !5
  %205 = icmp ne ptr %204, null
  br i1 %205, label %206, label %254

206:                                              ; preds = %198
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  br label %207

207:                                              ; preds = %212, %206
  %208 = load ptr, ptr %13, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.mln_fheap_node_s, ptr %208, i32 0, i32 2
  %210 = call ptr @mln_fheap_remove_child(ptr noundef %209)
  store ptr %210, ptr %14, align 8, !tbaa !5
  %211 = icmp ne ptr %210, null
  br i1 %211, label %212, label %220

212:                                              ; preds = %207
  %213 = load ptr, ptr %2, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct.mln_event_s, ptr %213, i32 0, i32 16
  %215 = load ptr, ptr %214, align 8, !tbaa !31
  %216 = getelementptr inbounds %struct.mln_fheap_t, ptr %215, i32 0, i32 0
  %217 = load ptr, ptr %14, align 8, !tbaa !5
  call void @mln_fheap_add_child(ptr noundef %216, ptr noundef %217)
  %218 = load ptr, ptr %14, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct.mln_fheap_node_s, ptr %218, i32 0, i32 1
  store ptr null, ptr %219, align 8, !tbaa !17
  br label %207, !llvm.loop !32

220:                                              ; preds = %207
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %221 = load ptr, ptr %13, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct.mln_fheap_node_s, ptr %221, i32 0, i32 4
  %223 = load ptr, ptr %222, align 8, !tbaa !21
  store ptr %223, ptr %15, align 8, !tbaa !5
  %224 = load ptr, ptr %2, align 8, !tbaa !5
  %225 = getelementptr inbounds %struct.mln_event_s, ptr %224, i32 0, i32 16
  %226 = load ptr, ptr %225, align 8, !tbaa !31
  %227 = getelementptr inbounds %struct.mln_fheap_t, ptr %226, i32 0, i32 0
  %228 = load ptr, ptr %13, align 8, !tbaa !5
  call void @mln_fheap_del_child(ptr noundef %227, ptr noundef %228)
  %229 = load ptr, ptr %13, align 8, !tbaa !5
  %230 = load ptr, ptr %15, align 8, !tbaa !5
  %231 = icmp eq ptr %229, %230
  br i1 %231, label %232, label %237

232:                                              ; preds = %220
  %233 = load ptr, ptr %2, align 8, !tbaa !5
  %234 = getelementptr inbounds %struct.mln_event_s, ptr %233, i32 0, i32 16
  %235 = load ptr, ptr %234, align 8, !tbaa !31
  %236 = getelementptr inbounds %struct.mln_fheap_t, ptr %235, i32 0, i32 1
  store ptr null, ptr %236, align 8, !tbaa !16
  br label %247

237:                                              ; preds = %220
  %238 = load ptr, ptr %15, align 8, !tbaa !5
  %239 = load ptr, ptr %2, align 8, !tbaa !5
  %240 = getelementptr inbounds %struct.mln_event_s, ptr %239, i32 0, i32 16
  %241 = load ptr, ptr %240, align 8, !tbaa !31
  %242 = getelementptr inbounds %struct.mln_fheap_t, ptr %241, i32 0, i32 1
  store ptr %238, ptr %242, align 8, !tbaa !16
  %243 = load ptr, ptr %2, align 8, !tbaa !5
  %244 = getelementptr inbounds %struct.mln_event_s, ptr %243, i32 0, i32 16
  %245 = load ptr, ptr %244, align 8, !tbaa !31
  %246 = load ptr, ptr %12, align 8, !tbaa !5
  call void @mln_fheap_consolidate(ptr noundef %245, ptr noundef %246)
  br label %247

247:                                              ; preds = %237, %232
  %248 = load ptr, ptr %2, align 8, !tbaa !5
  %249 = getelementptr inbounds %struct.mln_event_s, ptr %248, i32 0, i32 16
  %250 = load ptr, ptr %249, align 8, !tbaa !31
  %251 = getelementptr inbounds %struct.mln_fheap_t, ptr %250, i32 0, i32 5
  %252 = load i64, ptr %251, align 8, !tbaa !22
  %253 = add i64 %252, -1
  store i64 %253, ptr %251, align 8, !tbaa !22
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %254

254:                                              ; preds = %247, %198
  %255 = load ptr, ptr %13, align 8, !tbaa !5
  store ptr %255, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  %256 = load ptr, ptr %16, align 8, !tbaa !5
  store ptr %256, ptr %11, align 8, !tbaa !5
  %257 = icmp ne ptr %256, null
  br i1 %257, label %258, label %308

258:                                              ; preds = %254
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  store ptr @mln_event_desc_free, ptr %17, align 8, !tbaa !5
  %259 = load ptr, ptr %17, align 8, !tbaa !5
  %260 = icmp eq ptr %259, null
  br i1 %260, label %261, label %267

261:                                              ; preds = %258
  %262 = load ptr, ptr %2, align 8, !tbaa !5
  %263 = getelementptr inbounds %struct.mln_event_s, ptr %262, i32 0, i32 16
  %264 = load ptr, ptr %263, align 8, !tbaa !31
  %265 = getelementptr inbounds %struct.mln_fheap_t, ptr %264, i32 0, i32 4
  %266 = load ptr, ptr %265, align 8, !tbaa !23
  store ptr %266, ptr %17, align 8, !tbaa !5
  br label %267

267:                                              ; preds = %261, %258
  %268 = load ptr, ptr %11, align 8, !tbaa !5
  %269 = icmp ne ptr %268, null
  br i1 %269, label %270, label %307

270:                                              ; preds = %267
  %271 = load ptr, ptr %17, align 8, !tbaa !5
  %272 = icmp ne ptr %271, null
  br i1 %272, label %273, label %283

273:                                              ; preds = %270
  %274 = load ptr, ptr %11, align 8, !tbaa !5
  %275 = getelementptr inbounds %struct.mln_fheap_node_s, ptr %274, i32 0, i32 0
  %276 = load ptr, ptr %275, align 8, !tbaa !24
  %277 = icmp ne ptr %276, null
  br i1 %277, label %278, label %283

278:                                              ; preds = %273
  %279 = load ptr, ptr %17, align 8, !tbaa !5
  %280 = load ptr, ptr %11, align 8, !tbaa !5
  %281 = getelementptr inbounds %struct.mln_fheap_node_s, ptr %280, i32 0, i32 0
  %282 = load ptr, ptr %281, align 8, !tbaa !24
  call void %279(ptr noundef %282)
  br label %283

283:                                              ; preds = %278, %273, %270
  %284 = load ptr, ptr %11, align 8, !tbaa !5
  %285 = getelementptr inbounds %struct.mln_fheap_node_s, ptr %284, i32 0, i32 6
  %286 = load i32, ptr %285, align 8
  %287 = and i32 %286, 1
  %288 = icmp ne i32 %287, 0
  br i1 %288, label %306, label %289

289:                                              ; preds = %283
  %290 = load ptr, ptr %2, align 8, !tbaa !5
  %291 = getelementptr inbounds %struct.mln_event_s, ptr %290, i32 0, i32 16
  %292 = load ptr, ptr %291, align 8, !tbaa !31
  %293 = getelementptr inbounds %struct.mln_fheap_t, ptr %292, i32 0, i32 7
  %294 = load ptr, ptr %293, align 8, !tbaa !25
  %295 = icmp ne ptr %294, null
  br i1 %295, label %296, label %303

296:                                              ; preds = %289
  %297 = load ptr, ptr %2, align 8, !tbaa !5
  %298 = getelementptr inbounds %struct.mln_event_s, ptr %297, i32 0, i32 16
  %299 = load ptr, ptr %298, align 8, !tbaa !31
  %300 = getelementptr inbounds %struct.mln_fheap_t, ptr %299, i32 0, i32 9
  %301 = load ptr, ptr %300, align 8, !tbaa !26
  %302 = load ptr, ptr %11, align 8, !tbaa !5
  call void %301(ptr noundef %302)
  br label %305

303:                                              ; preds = %289
  %304 = load ptr, ptr %11, align 8, !tbaa !5
  call void @free(ptr noundef %304) #5
  br label %305

305:                                              ; preds = %303, %296
  br label %306

306:                                              ; preds = %305, %283
  br label %307

307:                                              ; preds = %306, %267
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %189, !llvm.loop !33

308:                                              ; preds = %254
  %309 = load ptr, ptr %2, align 8, !tbaa !5
  %310 = getelementptr inbounds %struct.mln_event_s, ptr %309, i32 0, i32 16
  %311 = load ptr, ptr %310, align 8, !tbaa !31
  %312 = getelementptr inbounds %struct.mln_fheap_t, ptr %311, i32 0, i32 7
  %313 = load ptr, ptr %312, align 8, !tbaa !25
  %314 = icmp ne ptr %313, null
  br i1 %314, label %315, label %324

315:                                              ; preds = %308
  %316 = load ptr, ptr %2, align 8, !tbaa !5
  %317 = getelementptr inbounds %struct.mln_event_s, ptr %316, i32 0, i32 16
  %318 = load ptr, ptr %317, align 8, !tbaa !31
  %319 = getelementptr inbounds %struct.mln_fheap_t, ptr %318, i32 0, i32 9
  %320 = load ptr, ptr %319, align 8, !tbaa !26
  %321 = load ptr, ptr %2, align 8, !tbaa !5
  %322 = getelementptr inbounds %struct.mln_event_s, ptr %321, i32 0, i32 16
  %323 = load ptr, ptr %322, align 8, !tbaa !31
  call void %320(ptr noundef %323)
  br label %328

324:                                              ; preds = %308
  %325 = load ptr, ptr %2, align 8, !tbaa !5
  %326 = getelementptr inbounds %struct.mln_event_s, ptr %325, i32 0, i32 16
  %327 = load ptr, ptr %326, align 8, !tbaa !31
  call void @free(ptr noundef %327) #5
  br label %328

328:                                              ; preds = %324, %315
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %329

329:                                              ; preds = %328, %183
  %330 = load ptr, ptr %2, align 8, !tbaa !5
  %331 = getelementptr inbounds %struct.mln_event_s, ptr %330, i32 0, i32 0
  %332 = call i32 @pthread_mutex_destroy(ptr noundef %331) #5
  %333 = load ptr, ptr %2, align 8, !tbaa !5
  %334 = getelementptr inbounds %struct.mln_event_s, ptr %333, i32 0, i32 1
  %335 = call i32 @pthread_mutex_destroy(ptr noundef %334) #5
  %336 = load ptr, ptr %2, align 8, !tbaa !5
  %337 = getelementptr inbounds %struct.mln_event_s, ptr %336, i32 0, i32 2
  %338 = call i32 @pthread_mutex_destroy(ptr noundef %337) #5
  %339 = load ptr, ptr %2, align 8, !tbaa !5
  call void @free(ptr noundef %339) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  br label %340

340:                                              ; preds = %329, %20
  ret void
}

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nounwind "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 = { "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 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 #5 = { nounwind }

!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 568}
!10 = !{!"mln_event_s", !7, i64 0, !7, i64 40, !7, i64 80, !6, i64 120, !6, i64 128, !11, i64 136, !11, i64 136, !11, i64 140, !12, i64 144, !12, i64 272, !12, i64 400, !6, i64 528, !6, i64 536, !6, i64 544, !6, i64 552, !6, i64 560, !6, i64 568, !6, i64 576}
!11 = !{!"int", !7, i64 0}
!12 = !{!"", !7, i64 0}
!13 = !{!14, !6, i64 16}
!14 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !15, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72}
!15 = !{!"long", !7, i64 0}
!16 = !{!14, !6, i64 8}
!17 = !{!18, !6, i64 8}
!18 = !{!"mln_fheap_node_s", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !15, i64 40, !11, i64 48, !11, i64 48}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!18, !6, i64 32}
!22 = !{!14, !15, i64 40}
!23 = !{!14, !6, i64 32}
!24 = !{!18, !6, i64 0}
!25 = !{!14, !6, i64 56}
!26 = !{!14, !6, i64 72}
!27 = distinct !{!27, !20}
!28 = !{!10, !6, i64 528}
!29 = !{!10, !6, i64 536}
!30 = distinct !{!30, !20}
!31 = !{!10, !6, i64 576}
!32 = distinct !{!32, !20}
!33 = distinct !{!33, !20}


; 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"

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @mln_event_fheap_timer_cmp(ptr noundef nonnull, ptr noundef nonnull) #0

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

; Function Attrs: nounwind
declare i32 @pthread_mutex_destroy(ptr noundef) local_unnamed_addr #1

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

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

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

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

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #2

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

declare void @mln_rbtree_free(ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
define dso_local void @mln_event_free(ptr noundef %0) local_unnamed_addr #4 {
  %2 = icmp eq ptr %0, null
  br i1 %2, label %120, label %3

3:                                                ; preds = %1
  %4 = getelementptr inbounds i8, ptr %0, i64 568
  %5 = load ptr, ptr %4, align 8, !tbaa !5
  %.not = icmp eq ptr %5, null
  br i1 %.not, label %56, label %.preheader120

.preheader120:                                    ; preds = %3
  %6 = getelementptr inbounds i8, ptr %5, i64 8
  %7 = load ptr, ptr %6, align 8, !tbaa !12
  %.not101122 = icmp eq ptr %7, null
  br i1 %.not101122, label %.critedge, label %.preheader119

.preheader119:                                    ; preds = %.preheader120, %45
  %8 = phi ptr [ %48, %45 ], [ %7, %.preheader120 ]
  %9 = getelementptr inbounds i8, ptr %8, i64 16
  %10 = tail call ptr @mln_fheap_remove_child(ptr noundef nonnull %9)
  %.not102121 = icmp eq ptr %10, null
  br i1 %.not102121, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader119, %.lr.ph
  %11 = phi ptr [ %14, %.lr.ph ], [ %10, %.preheader119 ]
  %12 = load ptr, ptr %4, align 8, !tbaa !5
  tail call void @mln_fheap_add_child(ptr noundef %12, ptr noundef nonnull %11)
  %13 = getelementptr inbounds i8, ptr %11, i64 8
  store ptr null, ptr %13, align 8, !tbaa !15
  %14 = tail call ptr @mln_fheap_remove_child(ptr noundef nonnull %9)
  %.not102 = icmp eq ptr %14, null
  br i1 %.not102, label %._crit_edge, label %.lr.ph, !llvm.loop !17

._crit_edge:                                      ; preds = %.lr.ph, %.preheader119
  %15 = getelementptr inbounds i8, ptr %8, i64 32
  %16 = load ptr, ptr %15, align 8, !tbaa !19
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  tail call void @mln_fheap_del_child(ptr noundef %17, ptr noundef nonnull %8)
  %18 = icmp eq ptr %8, %16
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = getelementptr inbounds i8, ptr %19, i64 8
  br i1 %18, label %21, label %22

21:                                               ; preds = %._crit_edge
  store ptr null, ptr %20, align 8, !tbaa !12
  br label %23

22:                                               ; preds = %._crit_edge
  store ptr %16, ptr %20, align 8, !tbaa !12
  tail call void @mln_fheap_consolidate(ptr noundef %19, ptr noundef nonnull @mln_event_fd_timeout_cmp)
  %.pre = load ptr, ptr %4, align 8, !tbaa !5
  br label %23

23:                                               ; preds = %21, %22
  %24 = phi ptr [ %19, %21 ], [ %.pre, %22 ]
  %25 = getelementptr inbounds i8, ptr %24, i64 40
  %26 = load i64, ptr %25, align 8, !tbaa !20
  %27 = add i64 %26, -1
  store i64 %27, ptr %25, align 8, !tbaa !20
  %28 = getelementptr inbounds i8, ptr %24, i64 32
  %29 = load ptr, ptr %28, align 8, !tbaa !21
  %.not112 = icmp eq ptr %29, null
  br i1 %.not112, label %33, label %30

30:                                               ; preds = %23
  %31 = load ptr, ptr %8, align 8, !tbaa !22
  %.not113 = icmp eq ptr %31, null
  br i1 %.not113, label %33, label %32

32:                                               ; preds = %30
  tail call void %29(ptr noundef nonnull %31) #5
  br label %33

33:                                               ; preds = %32, %30, %23
  %34 = getelementptr inbounds i8, ptr %8, i64 48
  %35 = load i32, ptr %34, align 8
  %36 = and i32 %35, 1
  %.not114 = icmp eq i32 %36, 0
  br i1 %.not114, label %37, label %45

37:                                               ; preds = %33
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = getelementptr inbounds i8, ptr %38, i64 56
  %40 = load ptr, ptr %39, align 8, !tbaa !23
  %.not115 = icmp eq ptr %40, null
  br i1 %.not115, label %44, label %41

41:                                               ; preds = %37
  %42 = getelementptr inbounds i8, ptr %38, i64 72
  %43 = load ptr, ptr %42, align 8, !tbaa !24
  tail call void %43(ptr noundef nonnull %8) #5
  br label %45

44:                                               ; preds = %37
  tail call void @free(ptr noundef nonnull %8) #5
  br label %45

45:                                               ; preds = %33, %44, %41
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  %47 = getelementptr inbounds i8, ptr %46, i64 8
  %48 = load ptr, ptr %47, align 8, !tbaa !12
  %.not101 = icmp eq ptr %48, null
  br i1 %.not101, label %.critedge, label %.preheader119, !llvm.loop !25

.critedge:                                        ; preds = %45, %.preheader120
  %49 = phi ptr [ %5, %.preheader120 ], [ %46, %45 ]
  %50 = getelementptr inbounds i8, ptr %49, i64 56
  %51 = load ptr, ptr %50, align 8, !tbaa !23
  %.not103 = icmp eq ptr %51, null
  br i1 %.not103, label %55, label %52

52:                                               ; preds = %.critedge
  %53 = getelementptr inbounds i8, ptr %49, i64 72
  %54 = load ptr, ptr %53, align 8, !tbaa !24
  tail call void %54(ptr noundef nonnull %49) #5
  br label %56

55:                                               ; preds = %.critedge
  tail call void @free(ptr noundef nonnull %49) #5
  br label %56

56:                                               ; preds = %52, %55, %3
  %57 = getelementptr inbounds i8, ptr %0, i64 528
  %58 = load ptr, ptr %57, align 8, !tbaa !26
  tail call void @mln_rbtree_free(ptr noundef %58) #5
  %59 = getelementptr inbounds i8, ptr %0, i64 536
  %60 = load ptr, ptr %59, align 8, !tbaa !27
  %.not104123 = icmp eq ptr %60, null
  br i1 %.not104123, label %._crit_edge126, label %.lr.ph125

.lr.ph125:                                        ; preds = %56
  %61 = getelementptr inbounds i8, ptr %0, i64 544
  br label %62

62:                                               ; preds = %.lr.ph125, %62
  %63 = phi ptr [ %60, %.lr.ph125 ], [ %64, %62 ]
  tail call void @ev_fd_wait_chain_del(ptr noundef nonnull %59, ptr noundef nonnull %61, ptr noundef nonnull %63)
  tail call void @mln_event_desc_free(ptr noundef nonnull %63)
  %64 = load ptr, ptr %59, align 8, !tbaa !27
  %.not104 = icmp eq ptr %64, null
  br i1 %.not104, label %._crit_edge126, label %62, !llvm.loop !28

._crit_edge126:                                   ; preds = %62, %56
  %65 = getelementptr inbounds i8, ptr %0, i64 576
  %66 = load ptr, ptr %65, align 8, !tbaa !29
  %.not105 = icmp eq ptr %66, null
  br i1 %.not105, label %114, label %.preheader118

.preheader118:                                    ; preds = %._crit_edge126
  %67 = getelementptr inbounds i8, ptr %66, i64 8
  %68 = load ptr, ptr %67, align 8, !tbaa !12
  %.not106130 = icmp eq ptr %68, null
  br i1 %.not106130, label %.critedge117, label %.preheader

.preheader:                                       ; preds = %.preheader118, %103
  %69 = phi ptr [ %106, %103 ], [ %68, %.preheader118 ]
  %70 = getelementptr inbounds i8, ptr %69, i64 16
  %71 = tail call ptr @mln_fheap_remove_child(ptr noundef nonnull %70)
  %.not107127 = icmp eq ptr %71, null
  br i1 %.not107127, label %._crit_edge129, label %.lr.ph128

.lr.ph128:                                        ; preds = %.preheader, %.lr.ph128
  %72 = phi ptr [ %75, %.lr.ph128 ], [ %71, %.preheader ]
  %73 = load ptr, ptr %65, align 8, !tbaa !29
  tail call void @mln_fheap_add_child(ptr noundef %73, ptr noundef nonnull %72)
  %74 = getelementptr inbounds i8, ptr %72, i64 8
  store ptr null, ptr %74, align 8, !tbaa !15
  %75 = tail call ptr @mln_fheap_remove_child(ptr noundef nonnull %70)
  %.not107 = icmp eq ptr %75, null
  br i1 %.not107, label %._crit_edge129, label %.lr.ph128, !llvm.loop !30

._crit_edge129:                                   ; preds = %.lr.ph128, %.preheader
  %76 = getelementptr inbounds i8, ptr %69, i64 32
  %77 = load ptr, ptr %76, align 8, !tbaa !19
  %78 = load ptr, ptr %65, align 8, !tbaa !29
  tail call void @mln_fheap_del_child(ptr noundef %78, ptr noundef nonnull %69)
  %79 = icmp eq ptr %69, %77
  %80 = load ptr, ptr %65, align 8, !tbaa !29
  %81 = getelementptr inbounds i8, ptr %80, i64 8
  br i1 %79, label %82, label %83

82:                                               ; preds = %._crit_edge129
  store ptr null, ptr %81, align 8, !tbaa !12
  br label %84

83:                                               ; preds = %._crit_edge129
  store ptr %77, ptr %81, align 8, !tbaa !12
  tail call void @mln_fheap_consolidate(ptr noundef %80, ptr noundef nonnull @mln_event_fheap_timer_cmp)
  %.pre131 = load ptr, ptr %65, align 8, !tbaa !29
  br label %84

84:                                               ; preds = %82, %83
  %85 = phi ptr [ %80, %82 ], [ %.pre131, %83 ]
  %86 = getelementptr inbounds i8, ptr %85, i64 40
  %87 = load i64, ptr %86, align 8, !tbaa !20
  %88 = add i64 %87, -1
  store i64 %88, ptr %86, align 8, !tbaa !20
  %89 = load ptr, ptr %69, align 8, !tbaa !22
  %.not109 = icmp eq ptr %89, null
  br i1 %.not109, label %91, label %90

90:                                               ; preds = %84
  tail call void @mln_event_desc_free(ptr noundef nonnull %89)
  br label %91

91:                                               ; preds = %90, %84
  %92 = getelementptr inbounds i8, ptr %69, i64 48
  %93 = load i32, ptr %92, align 8
  %94 = and i32 %93, 1
  %.not110 = icmp eq i32 %94, 0
  br i1 %.not110, label %95, label %103

95:                                               ; preds = %91
  %96 = load ptr, ptr %65, align 8, !tbaa !29
  %97 = getelementptr inbounds i8, ptr %96, i64 56
  %98 = load ptr, ptr %97, align 8, !tbaa !23
  %.not111 = icmp eq ptr %98, null
  br i1 %.not111, label %102, label %99

99:                                               ; preds = %95
  %100 = getelementptr inbounds i8, ptr %96, i64 72
  %101 = load ptr, ptr %100, align 8, !tbaa !24
  tail call void %101(ptr noundef nonnull %69) #5
  br label %103

102:                                              ; preds = %95
  tail call void @free(ptr noundef nonnull %69) #5
  br label %103

103:                                              ; preds = %91, %102, %99
  %104 = load ptr, ptr %65, align 8, !tbaa !29
  %105 = getelementptr inbounds i8, ptr %104, i64 8
  %106 = load ptr, ptr %105, align 8, !tbaa !12
  %.not106 = icmp eq ptr %106, null
  br i1 %.not106, label %.critedge117, label %.preheader, !llvm.loop !31

.critedge117:                                     ; preds = %103, %.preheader118
  %107 = phi ptr [ %66, %.preheader118 ], [ %104, %103 ]
  %108 = getelementptr inbounds i8, ptr %107, i64 56
  %109 = load ptr, ptr %108, align 8, !tbaa !23
  %.not108 = icmp eq ptr %109, null
  br i1 %.not108, label %113, label %110

110:                                              ; preds = %.critedge117
  %111 = getelementptr inbounds i8, ptr %107, i64 72
  %112 = load ptr, ptr %111, align 8, !tbaa !24
  tail call void %112(ptr noundef nonnull %107) #5
  br label %114

113:                                              ; preds = %.critedge117
  tail call void @free(ptr noundef nonnull %107) #5
  br label %114

114:                                              ; preds = %110, %113, %._crit_edge126
  %115 = tail call i32 @pthread_mutex_destroy(ptr noundef nonnull %0) #5
  %116 = getelementptr inbounds i8, ptr %0, i64 40
  %117 = tail call i32 @pthread_mutex_destroy(ptr noundef nonnull %116) #5
  %118 = getelementptr inbounds i8, ptr %0, i64 80
  %119 = tail call i32 @pthread_mutex_destroy(ptr noundef nonnull %118) #5
  tail call void @free(ptr noundef nonnull %0) #5
  br label %120

120:                                              ; preds = %1, %114
  ret void
}

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

attributes #0 = { 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 #1 = { nounwind "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 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { "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 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 #5 = { nounwind }

!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, !9, i64 568}
!6 = !{!"mln_event_s", !7, i64 0, !7, i64 40, !7, i64 80, !9, i64 120, !9, i64 128, !10, i64 136, !10, i64 136, !10, i64 140, !11, i64 144, !11, i64 272, !11, i64 400, !9, i64 528, !9, i64 536, !9, i64 544, !9, i64 552, !9, i64 560, !9, i64 568, !9, i64 576}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!"any pointer", !7, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!"", !7, i64 0}
!12 = !{!13, !9, i64 8}
!13 = !{!"", !9, i64 0, !9, i64 8, !9, i64 16, !9, i64 24, !9, i64 32, !14, i64 40, !9, i64 48, !9, i64 56, !9, i64 64, !9, i64 72}
!14 = !{!"long", !7, i64 0}
!15 = !{!16, !9, i64 8}
!16 = !{!"mln_fheap_node_s", !9, i64 0, !9, i64 8, !9, i64 16, !9, i64 24, !9, i64 32, !14, i64 40, !10, i64 48, !10, i64 48}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!16, !9, i64 32}
!20 = !{!13, !14, i64 40}
!21 = !{!13, !9, i64 32}
!22 = !{!16, !9, i64 0}
!23 = !{!13, !9, i64 56}
!24 = !{!13, !9, i64 72}
!25 = distinct !{!25, !18}
!26 = !{!6, !9, i64 528}
!27 = !{!6, !9, i64 536}
!28 = distinct !{!28, !18}
!29 = !{!6, !9, i64 576}
!30 = distinct !{!30, !18}
!31 = distinct !{!31, !18}


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