; LLVM IR from cruppstahl/upscaledb :: samples (uqi1)

; 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.ups_parameter_t = type { i32, i64 }
%struct.ups_key_t = type { i16, ptr, i32, i32 }
%struct.ups_record_t = type { i32, ptr, i32 }

@.str.1 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [10 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @error(ptr noundef, i32 noundef) #0

declare i32 @printf(ptr noundef, ...) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca [3 x %struct.ups_parameter_t], align 16
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %struct.ups_key_t, align 8
  %13 = alloca %struct.ups_record_t, align 8
  %14 = alloca ptr, align 8
  %15 = alloca %struct.ups_key_t, align 8
  %16 = alloca %struct.ups_record_t, align 8
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 48, ptr %9) #4
  call void @llvm.memset.p0.i64(ptr align 16 %9, i8 0, i64 48, i1 false)
  %17 = getelementptr inbounds [3 x %struct.ups_parameter_t], ptr %9, i32 0, i32 0
  %18 = getelementptr inbounds %struct.ups_parameter_t, ptr %17, i32 0, i32 0
  store i32 260, ptr %18, align 16
  %19 = getelementptr inbounds %struct.ups_parameter_t, ptr %17, i32 0, i32 1
  store i64 7, ptr %19, align 8
  %20 = getelementptr inbounds [3 x %struct.ups_parameter_t], ptr %9, i32 0, i32 1
  %21 = getelementptr inbounds %struct.ups_parameter_t, ptr %20, i32 0, i32 0
  store i32 274, ptr %21, align 16
  %22 = getelementptr inbounds %struct.ups_parameter_t, ptr %20, i32 0, i32 1
  store i64 7, ptr %22, align 8
  %23 = call i32 @ups_env_create(ptr noundef %7, ptr noundef @.str.1, i32 noundef 0, i32 noundef 436, ptr noundef null)
  store i32 %23, ptr %6, align 4, !tbaa !5
  %24 = load i32, ptr %6, align 4, !tbaa !5
  %25 = icmp ne i32 %24, 0
  br i1 %25, label %26, label %28

26:                                               ; preds = %2
  %27 = load i32, ptr %6, align 4, !tbaa !5
  call void @error(ptr noundef @.str.2, i32 noundef %27)
  br label %28

28:                                               ; preds = %26, %2
  %29 = load ptr, ptr %7, align 8, !tbaa !9
  %30 = getelementptr inbounds [3 x %struct.ups_parameter_t], ptr %9, i64 0, i64 0
  %31 = call i32 @ups_env_create_db(ptr noundef %29, ptr noundef %8, i16 noundef zeroext 1, i32 noundef 4096, ptr noundef %30)
  store i32 %31, ptr %6, align 4, !tbaa !5
  %32 = load i32, ptr %6, align 4, !tbaa !5
  %33 = icmp ne i32 %32, 0
  br i1 %33, label %34, label %36

34:                                               ; preds = %28
  %35 = load i32, ptr %6, align 4, !tbaa !5
  call void @error(ptr noundef @.str.3, i32 noundef %35)
  br label %36

36:                                               ; preds = %34, %28
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !5
  br label %37

37:                                               ; preds = %55, %36
  %38 = load i32, ptr %10, align 4, !tbaa !5
  %39 = icmp slt i32 %38, 10000
  br i1 %39, label %41, label %40

40:                                               ; preds = %37
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %58

41:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %42 = load i32, ptr %10, align 4, !tbaa !5
  %43 = srem i32 %42, 30
  %44 = add nsw i32 50, %43
  store i32 %44, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #4
  call void @llvm.memset.p0.i64(ptr align 8 %12, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #4
  %45 = getelementptr inbounds %struct.ups_record_t, ptr %13, i32 0, i32 0
  store i32 4, ptr %45, align 8, !tbaa !11
  %46 = getelementptr inbounds %struct.ups_record_t, ptr %13, i32 0, i32 1
  store ptr %11, ptr %46, align 8, !tbaa !13
  %47 = getelementptr inbounds %struct.ups_record_t, ptr %13, i32 0, i32 2
  store i32 0, ptr %47, align 8, !tbaa !14
  %48 = load ptr, ptr %8, align 8, !tbaa !9
  %49 = call i32 @ups_db_insert(ptr noundef %48, ptr noundef null, ptr noundef %12, ptr noundef %13, i32 noundef 0)
  store i32 %49, ptr %6, align 4, !tbaa !5
  %50 = load i32, ptr %6, align 4, !tbaa !5
  %51 = icmp ne i32 %50, 0
  br i1 %51, label %52, label %54

52:                                               ; preds = %41
  %53 = load i32, ptr %6, align 4, !tbaa !5
  call void @error(ptr noundef @.str.4, i32 noundef %53)
  br label %54

54:                                               ; preds = %52, %41
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %55

55:                                               ; preds = %54
  %56 = load i32, ptr %10, align 4, !tbaa !5
  %57 = add nsw i32 %56, 1
  store i32 %57, ptr %10, align 4, !tbaa !5
  br label %37, !llvm.loop !15

58:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #4
  call void @llvm.memset.p0.i64(ptr align 8 %15, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #4
  call void @llvm.memset.p0.i64(ptr align 8 %16, i8 0, i64 24, i1 false)
  %59 = load ptr, ptr %7, align 8, !tbaa !9
  %60 = call i32 @uqi_select(ptr noundef %59, ptr noundef @.str.5, ptr noundef %14)
  store i32 %60, ptr %6, align 4, !tbaa !5
  %61 = load i32, ptr %6, align 4, !tbaa !5
  %62 = icmp ne i32 %61, 0
  br i1 %62, label %63, label %65

63:                                               ; preds = %58
  %64 = load i32, ptr %6, align 4, !tbaa !5
  call void @error(ptr noundef @.str.6, i32 noundef %64)
  br label %65

65:                                               ; preds = %63, %58
  %66 = load ptr, ptr %14, align 8, !tbaa !9
  call void @uqi_result_get_key(ptr noundef %66, i32 noundef 0, ptr noundef %15)
  %67 = load ptr, ptr %14, align 8, !tbaa !9
  call void @uqi_result_get_record(ptr noundef %67, i32 noundef 0, ptr noundef %16)
  %68 = getelementptr inbounds %struct.ups_key_t, ptr %15, i32 0, i32 1
  %69 = load ptr, ptr %68, align 8, !tbaa !17
  %70 = load i32, ptr %69, align 4, !tbaa !5
  %71 = getelementptr inbounds %struct.ups_record_t, ptr %16, i32 0, i32 1
  %72 = load ptr, ptr %71, align 8, !tbaa !13
  %73 = load i32, ptr %72, align 4, !tbaa !5
  %74 = call i32 (ptr, ...) @printf(ptr noundef @.str.7, i32 noundef %70, i32 noundef %73)
  %75 = load ptr, ptr %14, align 8, !tbaa !9
  call void @uqi_result_close(ptr noundef %75)
  %76 = load ptr, ptr %7, align 8, !tbaa !9
  %77 = call i32 @uqi_select(ptr noundef %76, ptr noundef @.str.8, ptr noundef %14)
  store i32 %77, ptr %6, align 4, !tbaa !5
  %78 = load i32, ptr %6, align 4, !tbaa !5
  %79 = icmp ne i32 %78, 0
  br i1 %79, label %80, label %82

80:                                               ; preds = %65
  %81 = load i32, ptr %6, align 4, !tbaa !5
  call void @error(ptr noundef @.str.6, i32 noundef %81)
  br label %82

82:                                               ; preds = %80, %65
  %83 = load ptr, ptr %14, align 8, !tbaa !9
  call void @uqi_result_get_key(ptr noundef %83, i32 noundef 0, ptr noundef %15)
  %84 = load ptr, ptr %14, align 8, !tbaa !9
  call void @uqi_result_get_record(ptr noundef %84, i32 noundef 0, ptr noundef %16)
  %85 = getelementptr inbounds %struct.ups_key_t, ptr %15, i32 0, i32 1
  %86 = load ptr, ptr %85, align 8, !tbaa !17
  %87 = load i32, ptr %86, align 4, !tbaa !5
  %88 = getelementptr inbounds %struct.ups_record_t, ptr %16, i32 0, i32 1
  %89 = load ptr, ptr %88, align 8, !tbaa !13
  %90 = load i32, ptr %89, align 4, !tbaa !5
  %91 = call i32 (ptr, ...) @printf(ptr noundef @.str.9, i32 noundef %87, i32 noundef %90)
  %92 = load ptr, ptr %14, align 8, !tbaa !9
  call void @uqi_result_close(ptr noundef %92)
  %93 = load ptr, ptr %7, align 8, !tbaa !9
  %94 = call i32 @uqi_select(ptr noundef %93, ptr noundef @.str.10, ptr noundef %14)
  store i32 %94, ptr %6, align 4, !tbaa !5
  %95 = load i32, ptr %6, align 4, !tbaa !5
  %96 = icmp ne i32 %95, 0
  br i1 %96, label %97, label %99

97:                                               ; preds = %82
  %98 = load i32, ptr %6, align 4, !tbaa !5
  call void @error(ptr noundef @.str.6, i32 noundef %98)
  br label %99

99:                                               ; preds = %97, %82
  %100 = load ptr, ptr %14, align 8, !tbaa !9
  call void @uqi_result_get_record(ptr noundef %100, i32 noundef 0, ptr noundef %16)
  %101 = getelementptr inbounds %struct.ups_record_t, ptr %16, i32 0, i32 1
  %102 = load ptr, ptr %101, align 8, !tbaa !13
  %103 = load double, ptr %102, align 8, !tbaa !20
  %104 = call i32 (ptr, ...) @printf(ptr noundef @.str.11, double noundef %103)
  %105 = load ptr, ptr %14, align 8, !tbaa !9
  call void @uqi_result_close(ptr noundef %105)
  %106 = load ptr, ptr %7, align 8, !tbaa !9
  %107 = call i32 @ups_env_close(ptr noundef %106, i32 noundef 1)
  store i32 %107, ptr %6, align 4, !tbaa !5
  %108 = load i32, ptr %6, align 4, !tbaa !5
  %109 = icmp ne i32 %108, 0
  br i1 %109, label %110, label %112

110:                                              ; preds = %99
  %111 = load i32, ptr %6, align 4, !tbaa !5
  call void @error(ptr noundef @.str.12, i32 noundef %111)
  br label %112

112:                                              ; preds = %110, %99
  %113 = call i32 (ptr, ...) @printf(ptr noundef @.str.13)
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  ret i32 0
}

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

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

declare i32 @ups_env_create(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef) #1

declare i32 @ups_env_create_db(ptr noundef, ptr noundef, i16 noundef zeroext, i32 noundef, ptr noundef) #1

declare i32 @ups_db_insert(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) #1

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

declare i32 @uqi_select(ptr noundef, ptr noundef, ptr noundef) #1

declare void @uqi_result_get_key(ptr noundef, i32 noundef, ptr noundef) #1

declare void @uqi_result_get_record(ptr noundef, i32 noundef, ptr noundef) #1

declare void @uqi_result_close(ptr noundef) #1

declare i32 @ups_env_close(ptr noundef, i32 noundef) #1

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 = { "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { 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 = !{!"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, !6, i64 0}
!12 = !{!"", !6, i64 0, !10, i64 8, !6, i64 16}
!13 = !{!12, !10, i64 8}
!14 = !{!12, !6, i64 16}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!18, !10, i64 8}
!18 = !{!"", !19, i64 0, !10, i64 8, !6, i64 16, !6, i64 20}
!19 = !{!"short", !7, i64 0}
!20 = !{!21, !21, i64 0}
!21 = !{!"double", !7, i64 0}


; 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.ups_parameter_t = type { i32, i64 }
%struct.ups_key_t = type { i16, ptr, i32, i32 }
%struct.ups_record_t = type { i32, ptr, i32 }

@.str.1 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [10 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local void @error(ptr noundef, i32 noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr nocapture noundef readnone %1) local_unnamed_addr #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca [3 x %struct.ups_parameter_t], align 16
  %6 = alloca i32, align 4
  %7 = alloca %struct.ups_key_t, align 8
  %8 = alloca %struct.ups_record_t, align 8
  %9 = alloca ptr, align 8
  %10 = alloca %struct.ups_key_t, align 8
  %11 = alloca %struct.ups_record_t, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %5) #5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(48) %5, i8 0, i64 48, i1 false)
  store i32 260, ptr %5, align 16
  %12 = getelementptr inbounds i8, ptr %5, i64 8
  store i64 7, ptr %12, align 8
  %13 = getelementptr inbounds i8, ptr %5, i64 16
  store i32 274, ptr %13, align 16
  %14 = getelementptr inbounds i8, ptr %5, i64 24
  store i64 7, ptr %14, align 8
  %15 = call i32 @ups_env_create(ptr noundef nonnull %3, ptr noundef nonnull @.str.1, i32 noundef 0, i32 noundef 436, ptr noundef null) #5
  %.not = icmp eq i32 %15, 0
  br i1 %.not, label %17, label %16

16:                                               ; preds = %2
  call void @error(ptr noundef nonnull @.str.2, i32 noundef %15)
  br label %17

17:                                               ; preds = %16, %2
  %18 = load ptr, ptr %3, align 8, !tbaa !5
  %19 = call i32 @ups_env_create_db(ptr noundef %18, ptr noundef nonnull %4, i16 noundef zeroext 1, i32 noundef 4096, ptr noundef nonnull %5) #5
  %.not24 = icmp eq i32 %19, 0
  br i1 %.not24, label %21, label %20

20:                                               ; preds = %17
  call void @error(ptr noundef nonnull @.str.3, i32 noundef %19)
  br label %21

21:                                               ; preds = %20, %17
  %22 = getelementptr inbounds i8, ptr %8, i64 8
  %23 = getelementptr inbounds i8, ptr %8, i64 16
  br label %27

24:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %10, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %11, i8 0, i64 24, i1 false)
  %25 = load ptr, ptr %3, align 8, !tbaa !5
  %26 = call i32 @uqi_select(ptr noundef %25, ptr noundef nonnull @.str.5, ptr noundef nonnull %9) #5
  %.not25 = icmp eq i32 %26, 0
  br i1 %.not25, label %36, label %35

27:                                               ; preds = %21, %33
  %.030 = phi i32 [ 0, %21 ], [ %34, %33 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  %.lhs.trunc = trunc nuw i32 %.030 to i16
  %28 = urem i16 %.lhs.trunc, 30
  %narrow = add nuw nsw i16 %28, 50
  %29 = zext nneg i16 %narrow to i32
  store i32 %29, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %7, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #5
  store i32 4, ptr %8, align 8, !tbaa !11
  store ptr %6, ptr %22, align 8, !tbaa !13
  store i32 0, ptr %23, align 8, !tbaa !14
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = call i32 @ups_db_insert(ptr noundef %30, ptr noundef null, ptr noundef nonnull %7, ptr noundef nonnull %8, i32 noundef 0) #5
  %.not29 = icmp eq i32 %31, 0
  br i1 %.not29, label %33, label %32

32:                                               ; preds = %27
  call void @error(ptr noundef nonnull @.str.4, i32 noundef %31)
  br label %33

33:                                               ; preds = %32, %27
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  %34 = add nuw nsw i32 %.030, 1
  %exitcond.not = icmp eq i32 %34, 10000
  br i1 %exitcond.not, label %24, label %27, !llvm.loop !15

35:                                               ; preds = %24
  call void @error(ptr noundef nonnull @.str.6, i32 noundef %26)
  br label %36

36:                                               ; preds = %35, %24
  %37 = load ptr, ptr %9, align 8, !tbaa !5
  call void @uqi_result_get_key(ptr noundef %37, i32 noundef 0, ptr noundef nonnull %10) #5
  %38 = load ptr, ptr %9, align 8, !tbaa !5
  call void @uqi_result_get_record(ptr noundef %38, i32 noundef 0, ptr noundef nonnull %11) #5
  %39 = getelementptr inbounds i8, ptr %10, i64 8
  %40 = load ptr, ptr %39, align 8, !tbaa !17
  %41 = load i32, ptr %40, align 4, !tbaa !9
  %42 = getelementptr inbounds i8, ptr %11, i64 8
  %43 = load ptr, ptr %42, align 8, !tbaa !13
  %44 = load i32, ptr %43, align 4, !tbaa !9
  %45 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef %41, i32 noundef %44)
  %46 = load ptr, ptr %9, align 8, !tbaa !5
  call void @uqi_result_close(ptr noundef %46) #5
  %47 = load ptr, ptr %3, align 8, !tbaa !5
  %48 = call i32 @uqi_select(ptr noundef %47, ptr noundef nonnull @.str.8, ptr noundef nonnull %9) #5
  %.not26 = icmp eq i32 %48, 0
  br i1 %.not26, label %50, label %49

49:                                               ; preds = %36
  call void @error(ptr noundef nonnull @.str.6, i32 noundef %48)
  br label %50

50:                                               ; preds = %49, %36
  %51 = load ptr, ptr %9, align 8, !tbaa !5
  call void @uqi_result_get_key(ptr noundef %51, i32 noundef 0, ptr noundef nonnull %10) #5
  %52 = load ptr, ptr %9, align 8, !tbaa !5
  call void @uqi_result_get_record(ptr noundef %52, i32 noundef 0, ptr noundef nonnull %11) #5
  %53 = load ptr, ptr %39, align 8, !tbaa !17
  %54 = load i32, ptr %53, align 4, !tbaa !9
  %55 = load ptr, ptr %42, align 8, !tbaa !13
  %56 = load i32, ptr %55, align 4, !tbaa !9
  %57 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9, i32 noundef %54, i32 noundef %56)
  %58 = load ptr, ptr %9, align 8, !tbaa !5
  call void @uqi_result_close(ptr noundef %58) #5
  %59 = load ptr, ptr %3, align 8, !tbaa !5
  %60 = call i32 @uqi_select(ptr noundef %59, ptr noundef nonnull @.str.10, ptr noundef nonnull %9) #5
  %.not27 = icmp eq i32 %60, 0
  br i1 %.not27, label %62, label %61

61:                                               ; preds = %50
  call void @error(ptr noundef nonnull @.str.6, i32 noundef %60)
  br label %62

62:                                               ; preds = %61, %50
  %63 = load ptr, ptr %9, align 8, !tbaa !5
  call void @uqi_result_get_record(ptr noundef %63, i32 noundef 0, ptr noundef nonnull %11) #5
  %64 = load ptr, ptr %42, align 8, !tbaa !13
  %65 = load double, ptr %64, align 8, !tbaa !20
  %66 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, double noundef %65)
  %67 = load ptr, ptr %9, align 8, !tbaa !5
  call void @uqi_result_close(ptr noundef %67) #5
  %68 = load ptr, ptr %3, align 8, !tbaa !5
  %69 = call i32 @ups_env_close(ptr noundef %68, i32 noundef 1) #5
  %.not28 = icmp eq i32 %69, 0
  br i1 %.not28, label %71, label %70

70:                                               ; preds = %62
  call void @error(ptr noundef nonnull @.str.12, i32 noundef %69)
  br label %71

71:                                               ; preds = %70, %62
  %72 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  ret i32 0
}

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

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

declare i32 @ups_env_create(ptr noundef, ptr noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

declare i32 @ups_env_create_db(ptr noundef, ptr noundef, i16 noundef zeroext, i32 noundef, ptr noundef) local_unnamed_addr #4

declare i32 @ups_db_insert(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #4

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

declare i32 @uqi_select(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

declare void @uqi_result_get_key(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

declare void @uqi_result_get_record(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

declare void @uqi_result_close(ptr noundef) local_unnamed_addr #4

declare i32 @ups_env_close(ptr noundef, i32 noundef) local_unnamed_addr #4

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 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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, !10, i64 0}
!12 = !{!"", !10, i64 0, !6, i64 8, !10, i64 16}
!13 = !{!12, !6, i64 8}
!14 = !{!12, !10, i64 16}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!18, !6, i64 8}
!18 = !{!"", !19, i64 0, !6, i64 8, !10, i64 16, !10, i64 20}
!19 = !{!"short", !7, i64 0}
!20 = !{!21, !21, i64 0}
!21 = !{!"double", !7, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopRotatePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass