; LLVM IR from zhenrong-wang/co2 :: co2_property_calc (co2_prop_calc_tr)

; 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.co2_prop = type { double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double }

; Function Attrs: nounwind uwtable
define dso_local void @co2_prop_calc_tr(ptr noundef %0, double noundef %1, double noundef %2) #0 {
  %4 = alloca ptr, align 8
  %5 = alloca double, align 8
  %6 = alloca double, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store double %1, ptr %5, align 8, !tbaa !9
  store double %2, ptr %6, align 8, !tbaa !9
  %7 = load double, ptr %5, align 8, !tbaa !9
  %8 = load double, ptr %6, align 8, !tbaa !9
  %9 = call double @p_tr(double noundef %7, double noundef %8)
  %10 = load ptr, ptr %4, align 8, !tbaa !5
  %11 = getelementptr inbounds %struct.co2_prop, ptr %10, i32 0, i32 0
  store double %9, ptr %11, align 8, !tbaa !11
  %12 = load double, ptr %5, align 8, !tbaa !9
  %13 = load ptr, ptr %4, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.co2_prop, ptr %13, i32 0, i32 1
  store double %12, ptr %14, align 8, !tbaa !13
  %15 = load double, ptr %6, align 8, !tbaa !9
  %16 = fdiv double 1.000000e+00, %15
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.co2_prop, ptr %17, i32 0, i32 2
  store double %16, ptr %18, align 8, !tbaa !14
  %19 = load double, ptr %6, align 8, !tbaa !9
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.co2_prop, ptr %20, i32 0, i32 3
  store double %19, ptr %21, align 8, !tbaa !15
  %22 = load double, ptr %5, align 8, !tbaa !9
  %23 = load double, ptr %6, align 8, !tbaa !9
  %24 = call double @s_tr(double noundef %22, double noundef %23)
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.co2_prop, ptr %25, i32 0, i32 4
  store double %24, ptr %26, align 8, !tbaa !16
  %27 = load double, ptr %5, align 8, !tbaa !9
  %28 = load double, ptr %6, align 8, !tbaa !9
  %29 = call double @u_tr(double noundef %27, double noundef %28)
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.co2_prop, ptr %30, i32 0, i32 5
  store double %29, ptr %31, align 8, !tbaa !17
  %32 = load double, ptr %5, align 8, !tbaa !9
  %33 = load double, ptr %6, align 8, !tbaa !9
  %34 = call double @cv_tr(double noundef %32, double noundef %33)
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.co2_prop, ptr %35, i32 0, i32 6
  store double %34, ptr %36, align 8, !tbaa !18
  %37 = load double, ptr %5, align 8, !tbaa !9
  %38 = load double, ptr %6, align 8, !tbaa !9
  %39 = call double @h_tr(double noundef %37, double noundef %38)
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.co2_prop, ptr %40, i32 0, i32 7
  store double %39, ptr %41, align 8, !tbaa !19
  %42 = load double, ptr %5, align 8, !tbaa !9
  %43 = load double, ptr %6, align 8, !tbaa !9
  %44 = call double @cp_tr(double noundef %42, double noundef %43)
  %45 = load ptr, ptr %4, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.co2_prop, ptr %45, i32 0, i32 8
  store double %44, ptr %46, align 8, !tbaa !20
  %47 = load double, ptr %5, align 8, !tbaa !9
  %48 = load double, ptr %6, align 8, !tbaa !9
  %49 = call double @cs_tr(double noundef %47, double noundef %48)
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.co2_prop, ptr %50, i32 0, i32 9
  store double %49, ptr %51, align 8, !tbaa !21
  %52 = load double, ptr %5, align 8, !tbaa !9
  %53 = load double, ptr %6, align 8, !tbaa !9
  %54 = call double @w_tr(double noundef %52, double noundef %53)
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.co2_prop, ptr %55, i32 0, i32 10
  store double %54, ptr %56, align 8, !tbaa !22
  %57 = load double, ptr %5, align 8, !tbaa !9
  %58 = load double, ptr %6, align 8, !tbaa !9
  %59 = call double @miu_tr(double noundef %57, double noundef %58)
  %60 = load ptr, ptr %4, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.co2_prop, ptr %60, i32 0, i32 11
  store double %59, ptr %61, align 8, !tbaa !23
  %62 = load double, ptr %5, align 8, !tbaa !9
  %63 = load double, ptr %6, align 8, !tbaa !9
  %64 = call double @f_tr(double noundef %62, double noundef %63)
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.co2_prop, ptr %65, i32 0, i32 12
  store double %64, ptr %66, align 8, !tbaa !24
  %67 = load ptr, ptr %4, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.co2_prop, ptr %67, i32 0, i32 13
  store double -1.000000e+00, ptr %68, align 8, !tbaa !25
  %69 = load ptr, ptr %4, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.co2_prop, ptr %69, i32 0, i32 14
  store double -1.000000e+00, ptr %70, align 8, !tbaa !26
  %71 = load ptr, ptr %4, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.co2_prop, ptr %71, i32 0, i32 15
  store double -1.000000e+00, ptr %72, align 8, !tbaa !27
  ret void
}

declare double @p_tr(double noundef, double noundef) #1

declare double @s_tr(double noundef, double noundef) #1

declare double @u_tr(double noundef, double noundef) #1

declare double @cv_tr(double noundef, double noundef) #1

declare double @h_tr(double noundef, double noundef) #1

declare double @cp_tr(double noundef, double noundef) #1

declare double @cs_tr(double noundef, double noundef) #1

declare double @w_tr(double noundef, double noundef) #1

declare double @miu_tr(double noundef, double noundef) #1

declare double @f_tr(double noundef, double 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" }

!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 = !{!"double", !7, i64 0}
!11 = !{!12, !10, i64 0}
!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}
!13 = !{!12, !10, i64 8}
!14 = !{!12, !10, i64 16}
!15 = !{!12, !10, i64 24}
!16 = !{!12, !10, i64 32}
!17 = !{!12, !10, i64 40}
!18 = !{!12, !10, i64 48}
!19 = !{!12, !10, i64 56}
!20 = !{!12, !10, i64 64}
!21 = !{!12, !10, i64 72}
!22 = !{!12, !10, i64 80}
!23 = !{!12, !10, i64 88}
!24 = !{!12, !10, i64 96}
!25 = !{!12, !10, i64 104}
!26 = !{!12, !10, i64 112}
!27 = !{!12, !10, i64 120}


; 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: nounwind uwtable
define dso_local void @co2_prop_calc_tr(ptr nocapture noundef writeonly %0, double noundef %1, double noundef %2) local_unnamed_addr #0 {
  %4 = tail call double @p_tr(double noundef %1, double noundef %2) #2
  store double %4, ptr %0, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %0, i64 8
  store double %1, ptr %5, align 8, !tbaa !10
  %6 = fdiv double 1.000000e+00, %2
  %7 = getelementptr inbounds i8, ptr %0, i64 16
  store double %6, ptr %7, align 8, !tbaa !11
  %8 = getelementptr inbounds i8, ptr %0, i64 24
  store double %2, ptr %8, align 8, !tbaa !12
  %9 = tail call double @s_tr(double noundef %1, double noundef %2) #2
  %10 = getelementptr inbounds i8, ptr %0, i64 32
  store double %9, ptr %10, align 8, !tbaa !13
  %11 = tail call double @u_tr(double noundef %1, double noundef %2) #2
  %12 = getelementptr inbounds i8, ptr %0, i64 40
  store double %11, ptr %12, align 8, !tbaa !14
  %13 = tail call double @cv_tr(double noundef %1, double noundef %2) #2
  %14 = getelementptr inbounds i8, ptr %0, i64 48
  store double %13, ptr %14, align 8, !tbaa !15
  %15 = tail call double @h_tr(double noundef %1, double noundef %2) #2
  %16 = getelementptr inbounds i8, ptr %0, i64 56
  store double %15, ptr %16, align 8, !tbaa !16
  %17 = tail call double @cp_tr(double noundef %1, double noundef %2) #2
  %18 = getelementptr inbounds i8, ptr %0, i64 64
  store double %17, ptr %18, align 8, !tbaa !17
  %19 = tail call double @cs_tr(double noundef %1, double noundef %2) #2
  %20 = getelementptr inbounds i8, ptr %0, i64 72
  store double %19, ptr %20, align 8, !tbaa !18
  %21 = tail call double @w_tr(double noundef %1, double noundef %2) #2
  %22 = getelementptr inbounds i8, ptr %0, i64 80
  store double %21, ptr %22, align 8, !tbaa !19
  %23 = tail call double @miu_tr(double noundef %1, double noundef %2) #2
  %24 = getelementptr inbounds i8, ptr %0, i64 88
  store double %23, ptr %24, align 8, !tbaa !20
  %25 = tail call double @f_tr(double noundef %1, double noundef %2) #2
  %26 = getelementptr inbounds i8, ptr %0, i64 96
  store double %25, ptr %26, align 8, !tbaa !21
  %27 = getelementptr inbounds i8, ptr %0, i64 104
  store <2 x double> <double -1.000000e+00, double -1.000000e+00>, ptr %27, align 8, !tbaa !22
  %28 = getelementptr inbounds i8, ptr %0, i64 120
  store double -1.000000e+00, ptr %28, align 8, !tbaa !23
  ret void
}

declare double @p_tr(double noundef, double noundef) local_unnamed_addr #1

declare double @s_tr(double noundef, double noundef) local_unnamed_addr #1

declare double @u_tr(double noundef, double noundef) local_unnamed_addr #1

declare double @cv_tr(double noundef, double noundef) local_unnamed_addr #1

declare double @h_tr(double noundef, double noundef) local_unnamed_addr #1

declare double @cp_tr(double noundef, double noundef) local_unnamed_addr #1

declare double @cs_tr(double noundef, double noundef) local_unnamed_addr #1

declare double @w_tr(double noundef, double noundef) local_unnamed_addr #1

declare double @miu_tr(double noundef, double noundef) local_unnamed_addr #1

declare double @f_tr(double noundef, double noundef) local_unnamed_addr #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 = { 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, !7, i64 0}
!6 = !{!"", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !7, i64 112, !7, i64 120}
!7 = !{!"double", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!6, !7, i64 8}
!11 = !{!6, !7, i64 16}
!12 = !{!6, !7, i64 24}
!13 = !{!6, !7, i64 32}
!14 = !{!6, !7, i64 40}
!15 = !{!6, !7, i64 48}
!16 = !{!6, !7, i64 56}
!17 = !{!6, !7, i64 64}
!18 = !{!6, !7, i64 72}
!19 = !{!6, !7, i64 80}
!20 = !{!6, !7, i64 88}
!21 = !{!6, !7, i64 96}
!22 = !{!7, !7, i64 0}
!23 = !{!6, !7, i64 120}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InstCombinePass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,TailCallElimPass