; LLVM IR from erthink/libmdbx :: test/extra (dupfix_addodd)

; 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.iovec = type { ptr, i64 }

@.str = external hidden unnamed_addr constant [21 x i8], align 1
@stderr = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [26 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca %struct.iovec, align 8
  %6 = alloca %struct.iovec, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca [32 x i8], align 16
  %10 = alloca i8, align 1
  %11 = alloca [15 x i8], align 1
  %12 = alloca [15 x i8], align 1
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  store ptr null, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store i32 0, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  store ptr null, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  store ptr @.str, ptr %8, align 8, !tbaa !5
  %13 = load ptr, ptr %8, align 8, !tbaa !5
  %14 = call i32 @mdbx_env_delete(ptr noundef %13, i32 noundef 0)
  %15 = call i32 @mdbx_env_create(ptr noundef %3)
  store i32 %15, ptr %2, align 4, !tbaa !9
  %16 = load i32, ptr %2, align 4, !tbaa !9
  %17 = icmp ne i32 %16, 0
  br i1 %17, label %18, label %24

18:                                               ; preds = %0
  %19 = load ptr, ptr @stderr, align 8, !tbaa !5
  %20 = load i32, ptr %2, align 4, !tbaa !9
  %21 = load i32, ptr %2, align 4, !tbaa !9
  %22 = call ptr @mdbx_strerror(i32 noundef %21)
  %23 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %19, ptr noundef @.str.1, i32 noundef %20, ptr noundef %22) #7
  call void @exit(i32 noundef 1) #8
  unreachable

24:                                               ; preds = %0
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  %26 = call i32 @mdbx_env_set_maxdbs(ptr noundef %25, i32 noundef 1)
  store i32 %26, ptr %2, align 4, !tbaa !9
  %27 = load i32, ptr %2, align 4, !tbaa !9
  %28 = icmp ne i32 %27, 0
  br i1 %28, label %29, label %35

29:                                               ; preds = %24
  %30 = load ptr, ptr @stderr, align 8, !tbaa !5
  %31 = load i32, ptr %2, align 4, !tbaa !9
  %32 = load i32, ptr %2, align 4, !tbaa !9
  %33 = call ptr @mdbx_strerror(i32 noundef %32)
  %34 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %30, ptr noundef @.str.1, i32 noundef %31, ptr noundef %33) #7
  call void @exit(i32 noundef 1) #8
  unreachable

35:                                               ; preds = %24
  %36 = load ptr, ptr %3, align 8, !tbaa !5
  %37 = load ptr, ptr %8, align 8, !tbaa !5
  %38 = call i32 @mdbx_env_open(ptr noundef %36, ptr noundef %37, i32 noundef 67125248, i32 noundef 436)
  store i32 %38, ptr %2, align 4, !tbaa !9
  %39 = load i32, ptr %2, align 4, !tbaa !9
  %40 = icmp ne i32 %39, 0
  br i1 %40, label %41, label %47

41:                                               ; preds = %35
  %42 = load ptr, ptr @stderr, align 8, !tbaa !5
  %43 = load i32, ptr %2, align 4, !tbaa !9
  %44 = load i32, ptr %2, align 4, !tbaa !9
  %45 = call ptr @mdbx_strerror(i32 noundef %44)
  %46 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %42, ptr noundef @.str.2, i32 noundef %43, ptr noundef %45) #7
  call void @exit(i32 noundef 1) #8
  unreachable

47:                                               ; preds = %35
  %48 = load ptr, ptr %3, align 8, !tbaa !5
  %49 = call i32 @mdbx_txn_begin(ptr noundef %48, ptr noundef null, i32 noundef 0, ptr noundef %7)
  store i32 %49, ptr %2, align 4, !tbaa !9
  %50 = load i32, ptr %2, align 4, !tbaa !9
  %51 = icmp ne i32 %50, 0
  br i1 %51, label %52, label %58

52:                                               ; preds = %47
  %53 = load ptr, ptr @stderr, align 8, !tbaa !5
  %54 = load i32, ptr %2, align 4, !tbaa !9
  %55 = load i32, ptr %2, align 4, !tbaa !9
  %56 = call ptr @mdbx_strerror(i32 noundef %55)
  %57 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %53, ptr noundef @.str.3, i32 noundef %54, ptr noundef %56) #7
  call void @exit(i32 noundef 1) #8
  unreachable

58:                                               ; preds = %47
  %59 = load ptr, ptr %7, align 8, !tbaa !5
  %60 = call i32 @mdbx_dbi_open(ptr noundef %59, ptr noundef @.str.4, i32 noundef 262164, ptr noundef %4)
  store i32 %60, ptr %2, align 4, !tbaa !9
  %61 = load i32, ptr %2, align 4, !tbaa !9
  %62 = icmp ne i32 %61, 0
  br i1 %62, label %63, label %69

63:                                               ; preds = %58
  %64 = load ptr, ptr @stderr, align 8, !tbaa !5
  %65 = load i32, ptr %2, align 4, !tbaa !9
  %66 = load i32, ptr %2, align 4, !tbaa !9
  %67 = call ptr @mdbx_strerror(i32 noundef %66)
  %68 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %64, ptr noundef @.str.5, i32 noundef %65, ptr noundef %67) #7
  call void @exit(i32 noundef 1) #8
  unreachable

69:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #7
  call void @llvm.memset.p0.i64(ptr align 16 %9, i8 0, i64 32, i1 false)
  %70 = getelementptr inbounds %struct.iovec, ptr %5, i32 0, i32 1
  store i64 32, ptr %70, align 8, !tbaa !11
  %71 = getelementptr inbounds [32 x i8], ptr %9, i64 0, i64 0
  %72 = getelementptr inbounds %struct.iovec, ptr %5, i32 0, i32 0
  store ptr %71, ptr %72, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #7
  store i8 0, ptr %10, align 1, !tbaa !15
  br label %73

73:                                               ; preds = %101, %69
  %74 = load i8, ptr %10, align 1, !tbaa !15
  %75 = zext i8 %74 to i32
  %76 = icmp slt i32 %75, 129
  br i1 %76, label %77, label %104

77:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 15, ptr %11) #7
  %78 = load i8, ptr %10, align 1, !tbaa !15
  store i8 %78, ptr %11, align 1, !tbaa !15
  %79 = getelementptr inbounds i8, ptr %11, i64 1
  %80 = getelementptr inbounds i8, ptr %11, i64 15
  br label %81

81:                                               ; preds = %81, %77
  %82 = phi ptr [ %79, %77 ], [ %83, %81 ]
  store i8 0, ptr %82, align 1, !tbaa !15
  %83 = getelementptr inbounds i8, ptr %82, i64 1
  %84 = icmp eq ptr %83, %80
  br i1 %84, label %85, label %81

85:                                               ; preds = %81
  %86 = getelementptr inbounds %struct.iovec, ptr %6, i32 0, i32 1
  store i64 15, ptr %86, align 8, !tbaa !11
  %87 = getelementptr inbounds [15 x i8], ptr %11, i64 0, i64 0
  %88 = getelementptr inbounds %struct.iovec, ptr %6, i32 0, i32 0
  store ptr %87, ptr %88, align 8, !tbaa !14
  %89 = load ptr, ptr %7, align 8, !tbaa !5
  %90 = load i32, ptr %4, align 4, !tbaa !9
  %91 = call i32 @mdbx_put(ptr noundef %89, i32 noundef %90, ptr noundef %5, ptr noundef %6, i32 noundef 0)
  store i32 %91, ptr %2, align 4, !tbaa !9
  %92 = load i32, ptr %2, align 4, !tbaa !9
  %93 = icmp ne i32 %92, 0
  br i1 %93, label %94, label %100

94:                                               ; preds = %85
  %95 = load ptr, ptr @stderr, align 8, !tbaa !5
  %96 = load i32, ptr %2, align 4, !tbaa !9
  %97 = load i32, ptr %2, align 4, !tbaa !9
  %98 = call ptr @mdbx_strerror(i32 noundef %97)
  %99 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %95, ptr noundef @.str.6, i32 noundef %96, ptr noundef %98) #7
  call void @exit(i32 noundef 1) #8
  unreachable

100:                                              ; preds = %85
  call void @llvm.lifetime.end.p0(i64 15, ptr %11) #7
  br label %101

101:                                              ; preds = %100
  %102 = load i8, ptr %10, align 1, !tbaa !15
  %103 = add i8 %102, 1
  store i8 %103, ptr %10, align 1, !tbaa !15
  br label %73, !llvm.loop !16

104:                                              ; preds = %73
  call void @llvm.lifetime.start.p0(i64 15, ptr %12) #7
  %105 = load i8, ptr %10, align 1, !tbaa !15
  store i8 %105, ptr %12, align 1, !tbaa !15
  %106 = getelementptr inbounds i8, ptr %12, i64 1
  %107 = getelementptr inbounds i8, ptr %12, i64 15
  br label %108

108:                                              ; preds = %108, %104
  %109 = phi ptr [ %106, %104 ], [ %110, %108 ]
  store i8 0, ptr %109, align 1, !tbaa !15
  %110 = getelementptr inbounds i8, ptr %109, i64 1
  %111 = icmp eq ptr %110, %107
  br i1 %111, label %112, label %108

112:                                              ; preds = %108
  %113 = getelementptr inbounds %struct.iovec, ptr %6, i32 0, i32 1
  store i64 15, ptr %113, align 8, !tbaa !11
  %114 = getelementptr inbounds [15 x i8], ptr %12, i64 0, i64 0
  %115 = getelementptr inbounds %struct.iovec, ptr %6, i32 0, i32 0
  store ptr %114, ptr %115, align 8, !tbaa !14
  %116 = load ptr, ptr %7, align 8, !tbaa !5
  %117 = load i32, ptr %4, align 4, !tbaa !9
  %118 = call i32 @mdbx_put(ptr noundef %116, i32 noundef %117, ptr noundef %5, ptr noundef %6, i32 noundef 0)
  store i32 %118, ptr %2, align 4, !tbaa !9
  %119 = load i32, ptr %2, align 4, !tbaa !9
  %120 = icmp ne i32 %119, 0
  br i1 %120, label %121, label %129

121:                                              ; preds = %112
  %122 = load ptr, ptr @stderr, align 8, !tbaa !5
  %123 = load i32, ptr %2, align 4, !tbaa !9
  %124 = load i32, ptr %2, align 4, !tbaa !9
  %125 = call ptr @mdbx_strerror(i32 noundef %124)
  %126 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %122, ptr noundef @.str.6, i32 noundef %123, ptr noundef %125) #7
  %127 = load ptr, ptr @stderr, align 8, !tbaa !5
  %128 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %127, ptr noundef @.str.7) #7
  call void @exit(i32 noundef 1) #8
  unreachable

129:                                              ; preds = %112
  %130 = load ptr, ptr %7, align 8, !tbaa !5
  %131 = call i32 @mdbx_txn_commit(ptr noundef %130)
  store i32 %131, ptr %2, align 4, !tbaa !9
  %132 = load i32, ptr %2, align 4, !tbaa !9
  %133 = icmp ne i32 %132, 0
  br i1 %133, label %134, label %140

134:                                              ; preds = %129
  %135 = load ptr, ptr @stderr, align 8, !tbaa !5
  %136 = load i32, ptr %2, align 4, !tbaa !9
  %137 = load i32, ptr %2, align 4, !tbaa !9
  %138 = call ptr @mdbx_strerror(i32 noundef %137)
  %139 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %135, ptr noundef @.str.8, i32 noundef %136, ptr noundef %138) #7
  call void @exit(i32 noundef 1) #8
  unreachable

140:                                              ; preds = %129
  call void @llvm.lifetime.end.p0(i64 15, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #7
  %141 = load i32, ptr %1, align 4
  ret i32 %141
}

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

declare i32 @mdbx_env_delete(ptr noundef, i32 noundef) #2

declare i32 @mdbx_env_create(ptr noundef) #2

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #3

declare ptr @mdbx_strerror(i32 noundef) #2

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #4

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

declare i32 @mdbx_env_open(ptr noundef, ptr noundef, i32 noundef, i32 noundef) #2

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

declare i32 @mdbx_dbi_open(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #2

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

declare i32 @mdbx_put(ptr noundef, i32 noundef, ptr noundef, ptr noundef, i32 noundef) #2

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

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

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 "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 = { noreturn 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 #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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { nounwind }
attributes #8 = { noreturn 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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !13, i64 8}
!12 = !{!"iovec", !6, i64 0, !13, i64 8}
!13 = !{!"long", !7, i64 0}
!14 = !{!12, !6, i64 0}
!15 = !{!7, !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"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"

%struct.iovec = type { ptr, i64 }

@.str = external hidden unnamed_addr constant [21 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [26 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca ptr, align 8
  %2 = alloca i32, align 4
  %3 = alloca %struct.iovec, align 8
  %4 = alloca %struct.iovec, align 8
  %5 = alloca ptr, align 8
  %6 = alloca [32 x i8], align 16
  %7 = alloca [15 x i8], align 1
  %8 = alloca [15 x i8], align 1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %1) #7
  store ptr null, ptr %1, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #7
  store i32 0, ptr %2, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  store ptr null, ptr %5, align 8, !tbaa !5
  %9 = tail call i32 @mdbx_env_delete(ptr noundef nonnull @.str, i32 noundef 0) #7
  %10 = call i32 @mdbx_env_create(ptr noundef nonnull %1) #7
  %.not = icmp eq i32 %10, 0
  br i1 %.not, label %15, label %11

11:                                               ; preds = %0
  %12 = load ptr, ptr @stderr, align 8, !tbaa !5
  %13 = call ptr @mdbx_strerror(i32 noundef %10) #7
  %14 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %12, ptr noundef nonnull @.str.1, i32 noundef %10, ptr noundef %13) #8
  call void @exit(i32 noundef 1) #9
  unreachable

15:                                               ; preds = %0
  %16 = load ptr, ptr %1, align 8, !tbaa !5
  %17 = call i32 @mdbx_env_set_maxdbs(ptr noundef %16, i32 noundef 1)
  %.not38 = icmp eq i32 %17, 0
  br i1 %.not38, label %22, label %18

18:                                               ; preds = %15
  %19 = load ptr, ptr @stderr, align 8, !tbaa !5
  %20 = call ptr @mdbx_strerror(i32 noundef %17) #7
  %21 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %19, ptr noundef nonnull @.str.1, i32 noundef %17, ptr noundef %20) #8
  call void @exit(i32 noundef 1) #9
  unreachable

22:                                               ; preds = %15
  %23 = load ptr, ptr %1, align 8, !tbaa !5
  %24 = call i32 @mdbx_env_open(ptr noundef %23, ptr noundef nonnull @.str, i32 noundef 67125248, i32 noundef 436) #7
  %.not39 = icmp eq i32 %24, 0
  br i1 %.not39, label %29, label %25

25:                                               ; preds = %22
  %26 = load ptr, ptr @stderr, align 8, !tbaa !5
  %27 = call ptr @mdbx_strerror(i32 noundef %24) #7
  %28 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %26, ptr noundef nonnull @.str.2, i32 noundef %24, ptr noundef %27) #8
  call void @exit(i32 noundef 1) #9
  unreachable

29:                                               ; preds = %22
  %30 = load ptr, ptr %1, align 8, !tbaa !5
  %31 = call i32 @mdbx_txn_begin(ptr noundef %30, ptr noundef null, i32 noundef 0, ptr noundef nonnull %5)
  %.not40 = icmp eq i32 %31, 0
  br i1 %.not40, label %36, label %32

32:                                               ; preds = %29
  %33 = load ptr, ptr @stderr, align 8, !tbaa !5
  %34 = call ptr @mdbx_strerror(i32 noundef %31) #7
  %35 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %33, ptr noundef nonnull @.str.3, i32 noundef %31, ptr noundef %34) #8
  call void @exit(i32 noundef 1) #9
  unreachable

36:                                               ; preds = %29
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = call i32 @mdbx_dbi_open(ptr noundef %37, ptr noundef nonnull @.str.4, i32 noundef 262164, ptr noundef nonnull %2) #7
  %.not41 = icmp eq i32 %38, 0
  br i1 %.not41, label %43, label %39

39:                                               ; preds = %36
  %40 = load ptr, ptr @stderr, align 8, !tbaa !5
  %41 = call ptr @mdbx_strerror(i32 noundef %38) #7
  %42 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %40, ptr noundef nonnull @.str.5, i32 noundef %38, ptr noundef %41) #8
  call void @exit(i32 noundef 1) #9
  unreachable

43:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) %6, i8 0, i64 32, i1 false)
  %44 = getelementptr inbounds i8, ptr %3, i64 8
  store i64 32, ptr %44, align 8, !tbaa !11
  store ptr %6, ptr %3, align 8, !tbaa !14
  %45 = getelementptr inbounds i8, ptr %4, i64 8
  %scevgep = getelementptr inbounds i8, ptr %7, i64 1
  br label %46

46:                                               ; preds = %43, %54
  %.053 = phi i8 [ 0, %43 ], [ %55, %54 ]
  call void @llvm.lifetime.start.p0(i64 15, ptr nonnull %7) #7
  store i8 %.053, ptr %7, align 1, !tbaa !15
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(14) %scevgep, i8 0, i64 14, i1 false), !tbaa !15
  store i64 15, ptr %45, align 8, !tbaa !11
  store ptr %7, ptr %4, align 8, !tbaa !14
  %47 = load ptr, ptr %5, align 8, !tbaa !5
  %48 = load i32, ptr %2, align 4, !tbaa !9
  %49 = call i32 @mdbx_put(ptr noundef %47, i32 noundef %48, ptr noundef nonnull %3, ptr noundef nonnull %4, i32 noundef 0) #7
  %.not51 = icmp eq i32 %49, 0
  br i1 %.not51, label %54, label %50

50:                                               ; preds = %46
  %51 = load ptr, ptr @stderr, align 8, !tbaa !5
  %52 = call ptr @mdbx_strerror(i32 noundef %49) #7
  %53 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %51, ptr noundef nonnull @.str.6, i32 noundef %49, ptr noundef %52) #8
  call void @exit(i32 noundef 1) #9
  unreachable

54:                                               ; preds = %46
  call void @llvm.lifetime.end.p0(i64 15, ptr nonnull %7) #7
  %55 = add nuw i8 %.053, 1
  %exitcond.not = icmp eq i8 %55, -127
  br i1 %exitcond.not, label %56, label %46, !llvm.loop !16

56:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 15, ptr nonnull %8) #7
  store i8 -127, ptr %8, align 1, !tbaa !15
  %scevgep56 = getelementptr inbounds i8, ptr %8, i64 1
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(14) %scevgep56, i8 0, i64 14, i1 false), !tbaa !15
  store i64 15, ptr %45, align 8, !tbaa !11
  store ptr %8, ptr %4, align 8, !tbaa !14
  %57 = load ptr, ptr %5, align 8, !tbaa !5
  %58 = load i32, ptr %2, align 4, !tbaa !9
  %59 = call i32 @mdbx_put(ptr noundef %57, i32 noundef %58, ptr noundef nonnull %3, ptr noundef nonnull %4, i32 noundef 0) #7
  %.not44 = icmp eq i32 %59, 0
  br i1 %.not44, label %66, label %60

60:                                               ; preds = %56
  %61 = load ptr, ptr @stderr, align 8, !tbaa !5
  %62 = call ptr @mdbx_strerror(i32 noundef %59) #7
  %63 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %61, ptr noundef nonnull @.str.6, i32 noundef %59, ptr noundef %62) #8
  %64 = load ptr, ptr @stderr, align 8, !tbaa !5
  %65 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %64, ptr noundef nonnull @.str.7) #8
  call void @exit(i32 noundef 1) #9
  unreachable

66:                                               ; preds = %56
  %67 = load ptr, ptr %5, align 8, !tbaa !5
  %68 = call i32 @mdbx_txn_commit(ptr noundef %67)
  %.not45 = icmp eq i32 %68, 0
  br i1 %.not45, label %73, label %69

69:                                               ; preds = %66
  %70 = load ptr, ptr @stderr, align 8, !tbaa !5
  %71 = call ptr @mdbx_strerror(i32 noundef %68) #7
  %72 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %70, ptr noundef nonnull @.str.8, i32 noundef %68, ptr noundef %71) #8
  call void @exit(i32 noundef 1) #9
  unreachable

73:                                               ; preds = %66
  call void @llvm.lifetime.end.p0(i64 15, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %1) #7
  ret i32 0
}

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

declare i32 @mdbx_env_delete(ptr noundef, i32 noundef) local_unnamed_addr #2

declare i32 @mdbx_env_create(ptr noundef) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #3

declare ptr @mdbx_strerror(i32 noundef) local_unnamed_addr #2

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #4

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

declare i32 @mdbx_env_open(ptr noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

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

declare i32 @mdbx_dbi_open(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

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

declare i32 @mdbx_put(ptr noundef, i32 noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

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

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

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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = { nofree 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 #4 = { noreturn 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 #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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { nounwind }
attributes #8 = { cold nounwind }
attributes #9 = { noreturn 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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !13, i64 8}
!12 = !{!"iovec", !6, i64 0, !13, i64 8}
!13 = !{!"long", !7, i64 0}
!14 = !{!12, !6, i64 0}
!15 = !{!7, !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopRotatePass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass