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

; 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_lex_attr = type { ptr, ptr, ptr, i32, i32, ptr, ptr }
%struct.mln_lex_hooks_t = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.mln_expr_val_t = type { i32, %union.anon, ptr }
%union.anon = type { i64 }
%struct.mln_lex_s = type { ptr, ptr, ptr, ptr, %struct.mln_lex_hooks_t, ptr, ptr, ptr, ptr, i64, i64, i32, i8, ptr, ptr }

@keywords = external hidden global [11 x { ptr, i64, i8, i8, i8, i8 }], align 16

; 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 dso_local ptr @mln_expr_val_new(i32 noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @mln_expr_val_free(ptr noundef) #1

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

; Function Attrs: nounwind uwtable
define dso_local ptr @mln_expr_run(ptr noundef %0, ptr noundef %1, ptr noundef %2) #1 {
  %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 %struct.mln_lex_attr, align 8
  %10 = alloca %struct.mln_lex_hooks_t, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca %struct.mln_expr_val_t, align 8
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca %struct.mln_lex_hooks_t, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store ptr null, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 48, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 512, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  store ptr null, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  store ptr null, ptr %15, align 8, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 8 %10, i8 0, i64 512, i1 false)
  %19 = getelementptr inbounds %struct.mln_lex_hooks_t, ptr %10, i32 0, i32 2
  store ptr @mln_expr_dblq_handler, ptr %19, align 8, !tbaa !11
  %20 = getelementptr inbounds %struct.mln_lex_hooks_t, ptr %10, i32 0, i32 12
  store ptr @mln_expr_sglq_handler, ptr %20, align 8, !tbaa !13
  %21 = call ptr @mln_alloc_init(ptr noundef null, i64 noundef 0)
  %22 = getelementptr inbounds %struct.mln_lex_attr, ptr %9, i32 0, i32 0
  store ptr %21, ptr %22, align 8, !tbaa !14
  store ptr %21, ptr %11, align 8, !tbaa !5
  %23 = icmp eq ptr %21, null
  br i1 %23, label %24, label %25

24:                                               ; preds = %3
  store ptr null, ptr %4, align 8
  store i32 1, ptr %16, align 4
  br label %146

25:                                               ; preds = %3
  %26 = getelementptr inbounds %struct.mln_lex_attr, ptr %9, i32 0, i32 1
  store ptr @keywords, ptr %26, align 8, !tbaa !16
  %27 = getelementptr inbounds %struct.mln_lex_attr, ptr %9, i32 0, i32 2
  store ptr %10, ptr %27, align 8, !tbaa !17
  %28 = getelementptr inbounds %struct.mln_lex_attr, ptr %9, i32 0, i32 3
  %29 = load i32, ptr %28, align 8
  %30 = and i32 %29, -2
  %31 = or i32 %30, 0
  store i32 %31, ptr %28, align 8
  %32 = getelementptr inbounds %struct.mln_lex_attr, ptr %9, i32 0, i32 3
  %33 = load i32, ptr %32, align 8
  %34 = and i32 %33, 1
  %35 = or i32 %34, 0
  store i32 %35, ptr %32, align 8
  %36 = getelementptr inbounds %struct.mln_lex_attr, ptr %9, i32 0, i32 4
  store i32 0, ptr %36, align 4, !tbaa !18
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.mln_lex_attr, ptr %9, i32 0, i32 6
  store ptr %37, ptr %38, align 8, !tbaa !19
  %39 = getelementptr inbounds %struct.mln_lex_attr, ptr %9, i32 0, i32 5
  store ptr null, ptr %39, align 8, !tbaa !20
  %40 = getelementptr inbounds %struct.mln_lex_attr, ptr %9, i32 0, i32 3
  %41 = load i32, ptr %40, align 8
  %42 = and i32 %41, 1
  %43 = icmp ne i32 %42, 0
  br i1 %43, label %44, label %86

44:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %45 = getelementptr inbounds %struct.mln_lex_attr, ptr %9, i32 0, i32 0
  %46 = load ptr, ptr %45, align 8, !tbaa !14
  %47 = call ptr @mln_lex_preprocess_data_new(ptr noundef %46)
  store ptr %47, ptr %17, align 8, !tbaa !5
  %48 = load ptr, ptr %17, align 8, !tbaa !5
  %49 = icmp eq ptr %48, null
  br i1 %49, label %50, label %51

50:                                               ; preds = %44
  store ptr null, ptr %8, align 8, !tbaa !5
  br label %85

51:                                               ; preds = %44
  %52 = getelementptr inbounds %struct.mln_lex_attr, ptr %9, i32 0, i32 2
  %53 = load ptr, ptr %52, align 8, !tbaa !17
  %54 = icmp eq ptr %53, null
  br i1 %54, label %55, label %60

55:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 512, ptr %18) #6
  call void @llvm.memset.p0.i64(ptr align 8 %18, i8 0, i64 512, i1 false)
  %56 = getelementptr inbounds %struct.mln_lex_hooks_t, ptr %18, i32 0, i32 4
  store ptr @mln_expr_nums_handler, ptr %56, align 8, !tbaa !21
  %57 = load ptr, ptr %17, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.mln_lex_hooks_t, ptr %18, i32 0, i32 5
  store ptr %57, ptr %58, align 8, !tbaa !22
  %59 = getelementptr inbounds %struct.mln_lex_attr, ptr %9, i32 0, i32 2
  store ptr %18, ptr %59, align 8, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 512, ptr %18) #6
  br label %68

60:                                               ; preds = %51
  %61 = getelementptr inbounds %struct.mln_lex_attr, ptr %9, i32 0, i32 2
  %62 = load ptr, ptr %61, align 8, !tbaa !17
  %63 = getelementptr inbounds %struct.mln_lex_hooks_t, ptr %62, i32 0, i32 4
  store ptr @mln_expr_nums_handler, ptr %63, align 8, !tbaa !21
  %64 = load ptr, ptr %17, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.mln_lex_attr, ptr %9, i32 0, i32 2
  %66 = load ptr, ptr %65, align 8, !tbaa !17
  %67 = getelementptr inbounds %struct.mln_lex_hooks_t, ptr %66, i32 0, i32 5
  store ptr %64, ptr %67, align 8, !tbaa !22
  br label %68

68:                                               ; preds = %60, %55
  %69 = call ptr @mln_lex_init(ptr noundef %9)
  store ptr %69, ptr %8, align 8, !tbaa !5
  %70 = load ptr, ptr %8, align 8, !tbaa !5
  %71 = icmp ne ptr %70, null
  br i1 %71, label %72, label %82

72:                                               ; preds = %68
  %73 = getelementptr inbounds %struct.mln_lex_attr, ptr %9, i32 0, i32 2
  %74 = load ptr, ptr %73, align 8, !tbaa !17
  %75 = icmp ne ptr %74, null
  br i1 %75, label %76, label %78

76:                                               ; preds = %72
  %77 = load ptr, ptr %8, align 8, !tbaa !5
  call void @mln_expr_set_hooks(ptr noundef %77)
  br label %78

78:                                               ; preds = %76, %72
  %79 = load ptr, ptr %17, align 8, !tbaa !5
  %80 = load ptr, ptr %8, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.mln_lex_s, ptr %80, i32 0, i32 14
  store ptr %79, ptr %81, align 8, !tbaa !23
  br label %84

82:                                               ; preds = %68
  %83 = load ptr, ptr %17, align 8, !tbaa !5
  call void @mln_lex_preprocess_data_free(ptr noundef %83)
  br label %84

84:                                               ; preds = %82, %78
  br label %85

85:                                               ; preds = %84, %50
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %97

86:                                               ; preds = %25
  %87 = call ptr @mln_lex_init(ptr noundef %9)
  store ptr %87, ptr %8, align 8, !tbaa !5
  %88 = load ptr, ptr %8, align 8, !tbaa !5
  %89 = icmp ne ptr %88, null
  br i1 %89, label %90, label %96

90:                                               ; preds = %86
  %91 = getelementptr inbounds %struct.mln_lex_attr, ptr %9, i32 0, i32 2
  %92 = load ptr, ptr %91, align 8, !tbaa !17
  %93 = icmp ne ptr %92, null
  br i1 %93, label %94, label %96

94:                                               ; preds = %90
  %95 = load ptr, ptr %8, align 8, !tbaa !5
  call void @mln_expr_set_hooks(ptr noundef %95)
  br label %96

96:                                               ; preds = %94, %90, %86
  br label %97

97:                                               ; preds = %96, %85
  %98 = load ptr, ptr %8, align 8, !tbaa !5
  %99 = icmp eq ptr %98, null
  br i1 %99, label %100, label %102

100:                                              ; preds = %97
  %101 = load ptr, ptr %11, align 8, !tbaa !5
  call void @mln_alloc_destroy(ptr noundef %101)
  store ptr null, ptr %4, align 8
  store i32 1, ptr %16, align 4
  br label %146

102:                                              ; preds = %97
  br label %103

103:                                              ; preds = %136, %102
  br label %104

104:                                              ; preds = %103
  %105 = getelementptr inbounds %struct.mln_expr_val_t, ptr %13, i32 0, i32 0
  store i32 0, ptr %105, align 8, !tbaa !26
  %106 = load ptr, ptr %8, align 8, !tbaa !5
  %107 = load ptr, ptr %6, align 8, !tbaa !5
  %108 = load ptr, ptr %7, align 8, !tbaa !5
  %109 = call i32 @mln_expr_parse(ptr noundef %106, ptr noundef %107, ptr noundef %108, ptr noundef %13, ptr noundef %14, ptr noundef %15)
  %110 = icmp ne i32 %109, 0
  br i1 %110, label %111, label %117

111:                                              ; preds = %104
  %112 = load ptr, ptr %12, align 8, !tbaa !5
  %113 = icmp ne ptr %112, null
  br i1 %113, label %114, label %116

114:                                              ; preds = %111
  %115 = load ptr, ptr %12, align 8, !tbaa !5
  call void @mln_expr_val_free(ptr noundef %115)
  br label %116

116:                                              ; preds = %114, %111
  store ptr null, ptr %12, align 8, !tbaa !5
  call void @mln_expr_val_destroy(ptr noundef %13)
  br label %137

117:                                              ; preds = %104
  %118 = load i32, ptr %14, align 4, !tbaa !9
  %119 = icmp ne i32 %118, 0
  br i1 %119, label %120, label %126

120:                                              ; preds = %117
  call void @mln_expr_val_destroy(ptr noundef %13)
  %121 = load ptr, ptr %12, align 8, !tbaa !5
  %122 = icmp eq ptr %121, null
  br i1 %122, label %123, label %125

123:                                              ; preds = %120
  %124 = call ptr @mln_expr_val_new(i32 noundef 0, ptr noundef null, ptr noundef null)
  store ptr %124, ptr %12, align 8, !tbaa !5
  br label %125

125:                                              ; preds = %123, %120
  br label %137

126:                                              ; preds = %117
  %127 = load ptr, ptr %12, align 8, !tbaa !5
  %128 = icmp ne ptr %127, null
  br i1 %128, label %129, label %131

129:                                              ; preds = %126
  %130 = load ptr, ptr %12, align 8, !tbaa !5
  call void @mln_expr_val_free(ptr noundef %130)
  br label %131

131:                                              ; preds = %129, %126
  %132 = call noalias ptr @malloc(i64 noundef 24) #7
  store ptr %132, ptr %12, align 8, !tbaa !5
  %133 = icmp ne ptr %132, null
  br i1 %133, label %134, label %136

134:                                              ; preds = %131
  %135 = load ptr, ptr %12, align 8, !tbaa !5
  call void @mln_expr_val_copy(ptr noundef %135, ptr noundef %13)
  br label %136

136:                                              ; preds = %134, %131
  call void @mln_expr_val_destroy(ptr noundef %13)
  br label %103

137:                                              ; preds = %125, %116
  %138 = load ptr, ptr %15, align 8, !tbaa !5
  %139 = icmp ne ptr %138, null
  br i1 %139, label %140, label %142

140:                                              ; preds = %137
  %141 = load ptr, ptr %15, align 8, !tbaa !5
  call void @mln_expr_free(ptr noundef %141)
  br label %142

142:                                              ; preds = %140, %137
  %143 = load ptr, ptr %8, align 8, !tbaa !5
  call void @mln_lex_destroy(ptr noundef %143)
  %144 = load ptr, ptr %11, align 8, !tbaa !5
  call void @mln_alloc_destroy(ptr noundef %144)
  %145 = load ptr, ptr %12, align 8, !tbaa !5
  store ptr %145, ptr %4, align 8
  store i32 1, ptr %16, align 4
  br label %146

146:                                              ; preds = %142, %100, %24
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 512, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  %147 = load ptr, ptr %4, align 8
  ret ptr %147
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

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

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

declare ptr @mln_alloc_init(ptr noundef, i64 noundef) #4

declare ptr @mln_lex_preprocess_data_new(ptr noundef) #4

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

declare ptr @mln_lex_init(ptr noundef) #4

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

declare void @mln_lex_preprocess_data_free(ptr noundef) #4

declare void @mln_alloc_destroy(ptr noundef) #4

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

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

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

declare void @mln_lex_destroy(ptr noundef) #4

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 = { nounwind allocsize(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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { "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 = { 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 #6 = { nounwind }
attributes #7 = { nounwind allocsize(0) }

!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 16}
!12 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !6, i64 272, !6, i64 280, !6, i64 288, !6, i64 296, !6, i64 304, !6, i64 312, !6, i64 320, !6, i64 328, !6, i64 336, !6, i64 344, !6, i64 352, !6, i64 360, !6, i64 368, !6, i64 376, !6, i64 384, !6, i64 392, !6, i64 400, !6, i64 408, !6, i64 416, !6, i64 424, !6, i64 432, !6, i64 440, !6, i64 448, !6, i64 456, !6, i64 464, !6, i64 472, !6, i64 480, !6, i64 488, !6, i64 496, !6, i64 504}
!13 = !{!12, !6, i64 96}
!14 = !{!15, !6, i64 0}
!15 = !{!"mln_lex_attr", !6, i64 0, !6, i64 8, !6, i64 16, !10, i64 24, !10, i64 24, !10, i64 28, !6, i64 32, !6, i64 40}
!16 = !{!15, !6, i64 8}
!17 = !{!15, !6, i64 16}
!18 = !{!15, !10, i64 28}
!19 = !{!15, !6, i64 40}
!20 = !{!15, !6, i64 32}
!21 = !{!12, !6, i64 32}
!22 = !{!12, !6, i64 40}
!23 = !{!24, !6, i64 608}
!24 = !{!"mln_lex_s", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !12, i64 32, !6, i64 544, !6, i64 552, !6, i64 560, !6, i64 568, !25, i64 576, !25, i64 584, !10, i64 592, !10, i64 596, !10, i64 596, !6, i64 600, !6, i64 608}
!25 = !{!"long", !7, i64 0}
!26 = !{!27, !10, i64 0}
!27 = !{!"", !10, i64 0, !7, i64 8, !6, i64 16}


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

%struct.mln_lex_attr = type { ptr, ptr, ptr, i32, i32, ptr, ptr }
%struct.mln_lex_hooks_t = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.mln_expr_val_t = type { i32, %union.anon, ptr }
%union.anon = type { i64 }

@keywords = external hidden global [11 x { ptr, i64, i8, i8, i8, i8 }], align 16

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

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @mln_expr_val_new(i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local void @mln_expr_val_free(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @mln_expr_val_copy(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local ptr @mln_expr_run(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #1 {
  %4 = alloca %struct.mln_lex_attr, align 8
  %5 = alloca %struct.mln_lex_hooks_t, align 8
  %6 = alloca %struct.mln_expr_val_t, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  store i32 0, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  store ptr null, ptr %8, align 8, !tbaa !9
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(512) %5, i8 0, i64 512, i1 false)
  %9 = getelementptr inbounds i8, ptr %5, i64 16
  store ptr @mln_expr_dblq_handler, ptr %9, align 8, !tbaa !11
  %10 = getelementptr inbounds i8, ptr %5, i64 96
  store ptr @mln_expr_sglq_handler, ptr %10, align 8, !tbaa !13
  %11 = tail call ptr @mln_alloc_init(ptr noundef null, i64 noundef 0) #6
  store ptr %11, ptr %4, align 8, !tbaa !14
  %12 = icmp eq ptr %11, null
  br i1 %12, label %44, label %13

13:                                               ; preds = %3
  %14 = getelementptr inbounds i8, ptr %4, i64 8
  store ptr @keywords, ptr %14, align 8, !tbaa !16
  %15 = getelementptr inbounds i8, ptr %4, i64 16
  store ptr %5, ptr %15, align 8, !tbaa !17
  %16 = getelementptr inbounds i8, ptr %4, i64 24
  store i32 0, ptr %16, align 8
  %17 = getelementptr inbounds i8, ptr %4, i64 28
  store i32 0, ptr %17, align 4, !tbaa !18
  %18 = getelementptr inbounds i8, ptr %4, i64 40
  store ptr %0, ptr %18, align 8, !tbaa !19
  %19 = getelementptr inbounds i8, ptr %4, i64 32
  store ptr null, ptr %19, align 8, !tbaa !20
  %20 = call ptr @mln_lex_init(ptr noundef nonnull %4) #6
  %21 = icmp ne ptr %20, null
  %22 = load ptr, ptr %15, align 8
  %23 = icmp ne ptr %22, null
  %or.cond = select i1 %21, i1 %23, i1 false
  br i1 %or.cond, label %.thread, label %24

.thread:                                          ; preds = %13
  call void @mln_expr_set_hooks(ptr noundef nonnull %20)
  br label %.preheader

24:                                               ; preds = %13
  %25 = icmp eq ptr %20, null
  br i1 %25, label %.sink.split, label %.preheader

.preheader:                                       ; preds = %.thread, %24
  store i32 0, ptr %6, align 8, !tbaa !21
  %26 = call i32 @mln_expr_parse(ptr noundef nonnull %20, ptr noundef %1, ptr noundef %2, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %8)
  %.not4148 = icmp eq i32 %26, 0
  br i1 %.not4148, label %.lr.ph, label %._crit_edge.thread

._crit_edge:                                      ; preds = %38
  %.not45 = icmp eq ptr %36, null
  br i1 %.not45, label %._crit_edge.thread, label %27

27:                                               ; preds = %._crit_edge
  call void @mln_expr_val_free(ptr noundef nonnull %36)
  br label %._crit_edge.thread

._crit_edge.thread:                               ; preds = %.preheader, %27, %._crit_edge
  call void @mln_expr_val_destroy(ptr noundef nonnull %6)
  br label %40

.lr.ph:                                           ; preds = %.preheader, %38
  %.02849 = phi ptr [ %36, %38 ], [ null, %.preheader ]
  %28 = load i32, ptr %7, align 4, !tbaa !5
  %.not42 = icmp eq i32 %28, 0
  br i1 %.not42, label %33, label %29

29:                                               ; preds = %.lr.ph
  call void @mln_expr_val_destroy(ptr noundef nonnull %6)
  %30 = icmp eq ptr %.02849, null
  br i1 %30, label %31, label %40

31:                                               ; preds = %29
  %32 = call ptr @mln_expr_val_new(i32 noundef 0, ptr noundef null, ptr noundef null)
  br label %40

33:                                               ; preds = %.lr.ph
  %.not43 = icmp eq ptr %.02849, null
  br i1 %.not43, label %35, label %34

34:                                               ; preds = %33
  call void @mln_expr_val_free(ptr noundef nonnull %.02849)
  br label %35

35:                                               ; preds = %34, %33
  %36 = call noalias dereferenceable_or_null(24) ptr @malloc(i64 noundef 24) #7
  %.not44 = icmp eq ptr %36, null
  br i1 %.not44, label %38, label %37

37:                                               ; preds = %35
  call void @mln_expr_val_copy(ptr noundef nonnull %36, ptr noundef nonnull %6)
  br label %38

38:                                               ; preds = %37, %35
  call void @mln_expr_val_destroy(ptr noundef nonnull %6)
  store i32 0, ptr %6, align 8, !tbaa !21
  %39 = call i32 @mln_expr_parse(ptr noundef nonnull %20, ptr noundef %1, ptr noundef %2, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %8)
  %.not41 = icmp eq i32 %39, 0
  br i1 %.not41, label %.lr.ph, label %._crit_edge

40:                                               ; preds = %29, %31, %._crit_edge.thread
  %.1 = phi ptr [ null, %._crit_edge.thread ], [ %32, %31 ], [ %.02849, %29 ]
  %41 = load ptr, ptr %8, align 8, !tbaa !9
  %.not46 = icmp eq ptr %41, null
  br i1 %.not46, label %43, label %42

42:                                               ; preds = %40
  call void @mln_expr_free(ptr noundef nonnull %41)
  br label %43

43:                                               ; preds = %42, %40
  call void @mln_lex_destroy(ptr noundef nonnull %20) #6
  br label %.sink.split

.sink.split:                                      ; preds = %24, %43
  %.0.ph = phi ptr [ %.1, %43 ], [ null, %24 ]
  call void @mln_alloc_destroy(ptr noundef nonnull %11) #6
  br label %44

44:                                               ; preds = %.sink.split, %3
  %.0 = phi ptr [ null, %3 ], [ %.0.ph, %.sink.split ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #6
  ret ptr %.0
}

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

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

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

declare ptr @mln_alloc_init(ptr noundef, i64 noundef) local_unnamed_addr #4

declare ptr @mln_lex_init(ptr noundef) local_unnamed_addr #4

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

declare void @mln_alloc_destroy(ptr noundef) local_unnamed_addr #4

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

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

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

declare void @mln_lex_destroy(ptr noundef) local_unnamed_addr #4

attributes #0 = { mustprogress 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 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { "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 = { 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 #6 = { nounwind }
attributes #7 = { nounwind allocsize(0) }

!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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !10, i64 16}
!12 = !{!"", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !10, i64 184, !10, i64 192, !10, i64 200, !10, i64 208, !10, i64 216, !10, i64 224, !10, i64 232, !10, i64 240, !10, i64 248, !10, i64 256, !10, i64 264, !10, i64 272, !10, i64 280, !10, i64 288, !10, i64 296, !10, i64 304, !10, i64 312, !10, i64 320, !10, i64 328, !10, i64 336, !10, i64 344, !10, i64 352, !10, i64 360, !10, i64 368, !10, i64 376, !10, i64 384, !10, i64 392, !10, i64 400, !10, i64 408, !10, i64 416, !10, i64 424, !10, i64 432, !10, i64 440, !10, i64 448, !10, i64 456, !10, i64 464, !10, i64 472, !10, i64 480, !10, i64 488, !10, i64 496, !10, i64 504}
!13 = !{!12, !10, i64 96}
!14 = !{!15, !10, i64 0}
!15 = !{!"mln_lex_attr", !10, i64 0, !10, i64 8, !10, i64 16, !6, i64 24, !6, i64 24, !6, i64 28, !10, i64 32, !10, i64 40}
!16 = !{!15, !10, i64 8}
!17 = !{!15, !10, i64 16}
!18 = !{!15, !6, i64 28}
!19 = !{!15, !10, i64 40}
!20 = !{!15, !10, i64 32}
!21 = !{!22, !6, i64 0}
!22 = !{!"", !6, i64 0, !7, i64 8, !10, i64 16}


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