; LLVM IR from dmalyuta/FlyARocket_GNC :: pressure_funcs (get_readings_SPI_parallel)

; 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.timeval = type { i64, i64 }
%struct.spi_ioc_transfer = type { i64, i64, i32, i32, i16, i8, i8, i8, i8, i8, i8 }
%struct.SPI_data = type { i8, i8, i64, i8, i32, i32, float, float, i32, i32 }

@pressure_log = external global ptr, align 8
@.str.7 = external hidden unnamed_addr constant [127 x i8], align 1
@error_log = external global ptr, align 8
@before_pressure = external dso_local global %struct.timeval, align 8
@now_pressure_glob = external dso_local global %struct.timeval, align 8
@GLOBAL__TIME_STARTPOINT = external dso_local global %struct.timeval, align 8
@elapsed_pressure_glob = external dso_local global %struct.timeval, align 8
@time_pressure_glob = external dso_local global i64, align 8
@now_pressure = external dso_local global %struct.timeval, align 8
@elapsed_pressure = external dso_local global %struct.timeval, align 8
@time_pressure = external dso_local global i64, align 8
@SPI__READ_TIMESTEP = external global i64, align 8
@transfer = external dso_local global [4 x %struct.spi_ioc_transfer], align 16
@.str.8 = external hidden unnamed_addr constant [29 x i8], align 1
@data = external dso_local global [4 x i8], align 1
@radial_status = external dso_local global i8, align 1
@radial_pressure = external dso_local global float, align 4
@radial_temperature = external dso_local global float, align 4
@axial_status = external dso_local global i8, align 1
@axial_pressure = external dso_local global float, align 4
@axial_temperature = external dso_local global float, align 4
@.str.9 = external hidden unnamed_addr constant [32 x i8], align 1
@SPI_quit = external global i8, align 1
@.str.10 = external hidden unnamed_addr constant [47 x i8], align 1

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

declare void @perror(ptr noundef) #1

; Function Attrs: nounwind
declare i32 @ioctl(i32 noundef, i64 noundef, ...) #2

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

; Function Attrs: nounwind uwtable
define dso_local ptr @get_readings_SPI_parallel(ptr noundef %0) #4 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i8, align 1
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca float, align 4
  %10 = alloca float, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca [200 x i8], align 16
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  %16 = load ptr, ptr %2, align 8, !tbaa !5
  store ptr %16, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  %17 = load ptr, ptr %3, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.SPI_data, ptr %17, i32 0, i32 8
  %19 = load i32, ptr %18, align 4, !tbaa !9
  store i32 %19, ptr %4, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #7
  %20 = load ptr, ptr %3, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.SPI_data, ptr %20, i32 0, i32 9
  %22 = load i32, ptr %21, align 8, !tbaa !15
  store i32 %22, ptr %5, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #7
  %23 = load ptr, ptr %3, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.SPI_data, ptr %23, i32 0, i32 3
  %25 = load i8, ptr %24, align 8, !tbaa !16
  store i8 %25, ptr %6, align 1, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  %26 = load ptr, ptr %3, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.SPI_data, ptr %26, i32 0, i32 4
  %28 = load i32, ptr %27, align 4, !tbaa !18
  store i32 %28, ptr %7, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  %29 = load ptr, ptr %3, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.SPI_data, ptr %29, i32 0, i32 5
  %31 = load i32, ptr %30, align 8, !tbaa !19
  store i32 %31, ptr %8, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #7
  %32 = load ptr, ptr %3, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.SPI_data, ptr %32, i32 0, i32 6
  %34 = load float, ptr %33, align 4, !tbaa !20
  store float %34, ptr %9, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  %35 = load ptr, ptr %3, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.SPI_data, ptr %35, i32 0, i32 7
  %37 = load float, ptr %36, align 8, !tbaa !22
  store float %37, ptr %10, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 200, ptr %15) #7
  %38 = load ptr, ptr @pressure_log, align 8, !tbaa !5
  %39 = load ptr, ptr @error_log, align 8, !tbaa !5
  call void @write_to_file_custom(ptr noundef %38, ptr noundef @.str.7, ptr noundef %39)
  %40 = call i32 @gettimeofday(ptr noundef @before_pressure, ptr noundef null) #7
  br label %41

41:                                               ; preds = %187, %1
  %42 = load i64, ptr @GLOBAL__TIME_STARTPOINT, align 8
  %43 = load i64, ptr getelementptr inbounds ({ i64, i64 }, ptr @GLOBAL__TIME_STARTPOINT, i32 0, i32 1), align 8
  %44 = load i64, ptr @elapsed_pressure_glob, align 8
  %45 = load i64, ptr getelementptr inbounds ({ i64, i64 }, ptr @elapsed_pressure_glob, i32 0, i32 1), align 8
  call void @check_time(ptr noundef @now_pressure_glob, i64 %42, i64 %43, i64 %44, i64 %45, ptr noundef @time_pressure_glob)
  %46 = load i64, ptr @SPI__READ_TIMESTEP, align 8, !tbaa !23
  call void @passive_wait(ptr noundef @now_pressure, ptr noundef @before_pressure, ptr noundef @elapsed_pressure, ptr noundef @time_pressure, i64 noundef %46)
  %47 = load i32, ptr %4, align 4, !tbaa !14
  %48 = load i8, ptr %6, align 1, !tbaa !17
  %49 = zext i8 %48 to i64
  %50 = mul i64 %49, 32
  %51 = icmp ult i64 %50, 16384
  br i1 %51, label %52, label %56

52:                                               ; preds = %41
  %53 = load i8, ptr %6, align 1, !tbaa !17
  %54 = zext i8 %53 to i64
  %55 = mul i64 %54, 32
  br label %57

56:                                               ; preds = %41
  br label %57

57:                                               ; preds = %56, %52
  %58 = phi i64 [ %55, %52 ], [ 0, %56 ]
  %59 = shl i64 %58, 16
  %60 = or i64 1073769216, %59
  %61 = call i32 (i32, i64, ...) @ioctl(i32 noundef %47, i64 noundef %60, ptr noundef @transfer) #7
  %62 = icmp slt i32 %61, 0
  br i1 %62, label %63, label %66

63:                                               ; preds = %57
  call void @perror(ptr noundef @.str.8)
  %64 = load ptr, ptr @error_log, align 8, !tbaa !5
  %65 = load ptr, ptr @error_log, align 8, !tbaa !5
  call void @write_to_file_custom(ptr noundef %64, ptr noundef @.str.8, ptr noundef %65)
  call void @exit(i32 noundef -2) #8
  unreachable

66:                                               ; preds = %57
  %67 = load i8, ptr @data, align 1, !tbaa !17
  %68 = zext i8 %67 to i32
  %69 = and i32 %68, 192
  %70 = ashr i32 %69, 6
  %71 = trunc i32 %70 to i8
  store i8 %71, ptr @radial_status, align 1, !tbaa !17
  %72 = load i8, ptr @data, align 1, !tbaa !17
  %73 = zext i8 %72 to i32
  %74 = and i32 %73, 63
  %75 = shl i32 %74, 8
  %76 = load i8, ptr getelementptr inbounds ([4 x i8], ptr @data, i64 0, i64 1), align 1, !tbaa !17
  %77 = zext i8 %76 to i32
  %78 = or i32 %75, %77
  store i32 %78, ptr %11, align 4, !tbaa !14
  %79 = load i8, ptr getelementptr inbounds ([4 x i8], ptr @data, i64 0, i64 2), align 1, !tbaa !17
  %80 = zext i8 %79 to i32
  %81 = shl i32 %80, 3
  %82 = load i8, ptr getelementptr inbounds ([4 x i8], ptr @data, i64 0, i64 3), align 1, !tbaa !17
  %83 = zext i8 %82 to i32
  %84 = and i32 %83, 224
  %85 = ashr i32 %84, 5
  %86 = or i32 %81, %85
  store i32 %86, ptr %12, align 4, !tbaa !14
  %87 = load i32, ptr %11, align 4, !tbaa !14
  %88 = load i32, ptr %8, align 4, !tbaa !14
  %89 = sub i32 %87, %88
  %90 = uitofp i32 %89 to float
  %91 = load float, ptr %9, align 4, !tbaa !21
  %92 = load float, ptr %10, align 4, !tbaa !21
  %93 = fsub float %91, %92
  %94 = fmul float %90, %93
  %95 = load i32, ptr %7, align 4, !tbaa !14
  %96 = load i32, ptr %8, align 4, !tbaa !14
  %97 = sub i32 %95, %96
  %98 = uitofp i32 %97 to float
  %99 = fdiv float %94, %98
  %100 = load float, ptr %10, align 4, !tbaa !21
  %101 = fadd float %99, %100
  store float %101, ptr @radial_pressure, align 4, !tbaa !21
  %102 = load i32, ptr %12, align 4, !tbaa !14
  %103 = uitofp i32 %102 to float
  %104 = fpext float %103 to double
  %105 = fdiv double %104, 2.047000e+03
  %106 = call double @llvm.fmuladd.f64(double %105, double 2.000000e+02, double -5.000000e+01)
  %107 = fptrunc double %106 to float
  store float %107, ptr @radial_temperature, align 4, !tbaa !21
  %108 = load i32, ptr %5, align 4, !tbaa !14
  %109 = load i8, ptr %6, align 1, !tbaa !17
  %110 = zext i8 %109 to i64
  %111 = mul i64 %110, 32
  %112 = icmp ult i64 %111, 16384
  br i1 %112, label %113, label %117

113:                                              ; preds = %66
  %114 = load i8, ptr %6, align 1, !tbaa !17
  %115 = zext i8 %114 to i64
  %116 = mul i64 %115, 32
  br label %118

117:                                              ; preds = %66
  br label %118

118:                                              ; preds = %117, %113
  %119 = phi i64 [ %116, %113 ], [ 0, %117 ]
  %120 = shl i64 %119, 16
  %121 = or i64 1073769216, %120
  %122 = call i32 (i32, i64, ...) @ioctl(i32 noundef %108, i64 noundef %121, ptr noundef @transfer) #7
  %123 = icmp slt i32 %122, 0
  br i1 %123, label %124, label %127

124:                                              ; preds = %118
  call void @perror(ptr noundef @.str.8)
  %125 = load ptr, ptr @error_log, align 8, !tbaa !5
  %126 = load ptr, ptr @error_log, align 8, !tbaa !5
  call void @write_to_file_custom(ptr noundef %125, ptr noundef @.str.8, ptr noundef %126)
  call void @exit(i32 noundef -2) #8
  unreachable

127:                                              ; preds = %118
  %128 = load i8, ptr @data, align 1, !tbaa !17
  %129 = zext i8 %128 to i32
  %130 = and i32 %129, 192
  %131 = ashr i32 %130, 6
  %132 = trunc i32 %131 to i8
  store i8 %132, ptr @axial_status, align 1, !tbaa !17
  %133 = load i8, ptr @data, align 1, !tbaa !17
  %134 = zext i8 %133 to i32
  %135 = and i32 %134, 63
  %136 = shl i32 %135, 8
  %137 = load i8, ptr getelementptr inbounds ([4 x i8], ptr @data, i64 0, i64 1), align 1, !tbaa !17
  %138 = zext i8 %137 to i32
  %139 = or i32 %136, %138
  store i32 %139, ptr %13, align 4, !tbaa !14
  %140 = load i8, ptr getelementptr inbounds ([4 x i8], ptr @data, i64 0, i64 2), align 1, !tbaa !17
  %141 = zext i8 %140 to i32
  %142 = shl i32 %141, 3
  %143 = load i8, ptr getelementptr inbounds ([4 x i8], ptr @data, i64 0, i64 3), align 1, !tbaa !17
  %144 = zext i8 %143 to i32
  %145 = and i32 %144, 224
  %146 = ashr i32 %145, 5
  %147 = or i32 %142, %146
  store i32 %147, ptr %14, align 4, !tbaa !14
  %148 = load i32, ptr %13, align 4, !tbaa !14
  %149 = load i32, ptr %8, align 4, !tbaa !14
  %150 = sub i32 %148, %149
  %151 = uitofp i32 %150 to float
  %152 = load float, ptr %9, align 4, !tbaa !21
  %153 = load float, ptr %10, align 4, !tbaa !21
  %154 = fsub float %152, %153
  %155 = fmul float %151, %154
  %156 = load i32, ptr %7, align 4, !tbaa !14
  %157 = load i32, ptr %8, align 4, !tbaa !14
  %158 = sub i32 %156, %157
  %159 = uitofp i32 %158 to float
  %160 = fdiv float %155, %159
  %161 = load float, ptr %10, align 4, !tbaa !21
  %162 = fadd float %160, %161
  store float %162, ptr @axial_pressure, align 4, !tbaa !21
  %163 = load i32, ptr %14, align 4, !tbaa !14
  %164 = uitofp i32 %163 to float
  %165 = fpext float %164 to double
  %166 = fdiv double %165, 2.047000e+03
  %167 = call double @llvm.fmuladd.f64(double %166, double 2.000000e+02, double -5.000000e+01)
  %168 = fptrunc double %167 to float
  store float %168, ptr @axial_temperature, align 4, !tbaa !21
  %169 = getelementptr inbounds [200 x i8], ptr %15, i64 0, i64 0
  %170 = load i64, ptr @time_pressure_glob, align 8, !tbaa !23
  %171 = load i8, ptr @radial_status, align 1, !tbaa !17
  %172 = zext i8 %171 to i32
  %173 = load float, ptr @radial_pressure, align 4, !tbaa !21
  %174 = fpext float %173 to double
  %175 = load float, ptr @radial_temperature, align 4, !tbaa !21
  %176 = fpext float %175 to double
  %177 = load i8, ptr @axial_status, align 1, !tbaa !17
  %178 = sext i8 %177 to i32
  %179 = load float, ptr @axial_pressure, align 4, !tbaa !21
  %180 = fpext float %179 to double
  %181 = load float, ptr @axial_temperature, align 4, !tbaa !21
  %182 = fpext float %181 to double
  %183 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef %169, ptr noundef @.str.9, i64 noundef %170, i32 noundef %172, double noundef %174, double noundef %176, i32 noundef %178, double noundef %180, double noundef %182) #7
  %184 = load ptr, ptr @pressure_log, align 8, !tbaa !5
  %185 = getelementptr inbounds [200 x i8], ptr %15, i64 0, i64 0
  %186 = load ptr, ptr @error_log, align 8, !tbaa !5
  call void @write_to_file_custom(ptr noundef %184, ptr noundef %185, ptr noundef %186)
  br label %187

187:                                              ; preds = %127
  %188 = load i8, ptr @SPI_quit, align 1, !tbaa !17
  %189 = icmp ne i8 %188, 0
  %190 = xor i1 %189, true
  br i1 %190, label %41, label %191, !llvm.loop !25

191:                                              ; preds = %187
  %192 = call i32 (ptr, ...) @printf(ptr noundef @.str.10)
  call void @pthread_exit(ptr noundef null) #9
  unreachable
}

declare void @write_to_file_custom(ptr noundef, ptr noundef, ptr noundef) #1

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

declare void @check_time(ptr noundef, i64, i64, i64, i64, ptr noundef) #1

declare void @passive_wait(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef) #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #5

; Function Attrs: nounwind
declare i32 @sprintf(ptr noundef, ptr noundef, ...) #2

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

; Function Attrs: noreturn
declare void @pthread_exit(ptr noundef) #6

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 "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 = { 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 #4 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { noreturn "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 #7 = { nounwind }
attributes #8 = { noreturn nounwind }
attributes #9 = { noreturn }

!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, !12, i64 36}
!10 = !{!"SPI_data", !7, i64 0, !7, i64 1, !11, i64 8, !7, i64 16, !12, i64 20, !12, i64 24, !13, i64 28, !13, i64 32, !12, i64 36, !12, i64 40}
!11 = !{!"long", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"float", !7, i64 0}
!14 = !{!12, !12, i64 0}
!15 = !{!10, !12, i64 40}
!16 = !{!10, !7, i64 16}
!17 = !{!7, !7, i64 0}
!18 = !{!10, !12, i64 20}
!19 = !{!10, !12, i64 24}
!20 = !{!10, !13, i64 28}
!21 = !{!13, !13, i64 0}
!22 = !{!10, !13, i64 32}
!23 = !{!24, !24, i64 0}
!24 = !{!"long long", !7, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"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.timeval = type { i64, i64 }
%struct.spi_ioc_transfer = type { i64, i64, i32, i32, i16, i8, i8, i8, i8, i8, i8 }

@pressure_log = external local_unnamed_addr global ptr, align 8
@.str.7 = external hidden unnamed_addr constant [127 x i8], align 1
@error_log = external local_unnamed_addr global ptr, align 8
@before_pressure = external dso_local global %struct.timeval, align 8
@now_pressure_glob = external dso_local global %struct.timeval, align 8
@GLOBAL__TIME_STARTPOINT = external dso_local local_unnamed_addr global %struct.timeval, align 8
@elapsed_pressure_glob = external dso_local local_unnamed_addr global %struct.timeval, align 8
@time_pressure_glob = external dso_local global i64, align 8
@now_pressure = external dso_local global %struct.timeval, align 8
@elapsed_pressure = external dso_local global %struct.timeval, align 8
@time_pressure = external dso_local global i64, align 8
@SPI__READ_TIMESTEP = external local_unnamed_addr global i64, align 8
@transfer = external dso_local global [4 x %struct.spi_ioc_transfer], align 16
@.str.8 = external hidden unnamed_addr constant [29 x i8], align 1
@data = external dso_local local_unnamed_addr global [4 x i8], align 1
@radial_status = external dso_local local_unnamed_addr global i8, align 1
@radial_pressure = external dso_local local_unnamed_addr global float, align 4
@radial_temperature = external dso_local local_unnamed_addr global float, align 4
@axial_status = external dso_local local_unnamed_addr global i8, align 1
@axial_pressure = external dso_local local_unnamed_addr global float, align 4
@axial_temperature = external dso_local local_unnamed_addr global float, align 4
@.str.9 = external hidden unnamed_addr constant [32 x i8], align 1
@SPI_quit = external local_unnamed_addr global i8, align 1
@.str.10 = external hidden unnamed_addr constant [47 x i8], align 1

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

; Function Attrs: nofree nounwind
declare void @perror(ptr nocapture noundef readonly) local_unnamed_addr #1

; Function Attrs: nounwind
declare i32 @ioctl(i32 noundef, i64 noundef, ...) local_unnamed_addr #2

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

; Function Attrs: noreturn nounwind uwtable
define dso_local noalias noundef nonnull ptr @get_readings_SPI_parallel(ptr nocapture noundef readonly %0) local_unnamed_addr #4 {
  %2 = alloca [200 x i8], align 16
  %3 = getelementptr inbounds i8, ptr %0, i64 36
  %4 = load i32, ptr %3, align 4, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %0, i64 40
  %6 = load i32, ptr %5, align 8, !tbaa !12
  %7 = getelementptr inbounds i8, ptr %0, i64 16
  %8 = load i8, ptr %7, align 8, !tbaa !13
  %9 = getelementptr inbounds i8, ptr %0, i64 20
  %10 = load i32, ptr %9, align 4, !tbaa !14
  %11 = getelementptr inbounds i8, ptr %0, i64 24
  %12 = load i32, ptr %11, align 8, !tbaa !15
  %13 = getelementptr inbounds i8, ptr %0, i64 28
  %14 = load float, ptr %13, align 4, !tbaa !16
  %15 = getelementptr inbounds i8, ptr %0, i64 32
  %16 = load float, ptr %15, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 200, ptr nonnull %2) #8
  %17 = load ptr, ptr @pressure_log, align 8, !tbaa !18
  %18 = load ptr, ptr @error_log, align 8, !tbaa !18
  tail call void @write_to_file_custom(ptr noundef %17, ptr noundef nonnull @.str.7, ptr noundef %18) #8
  %19 = tail call i32 @gettimeofday(ptr noundef nonnull @before_pressure, ptr noundef null) #8
  %20 = zext i8 %8 to i64
  %21 = shl nuw nsw i64 %20, 21
  %22 = or disjoint i64 %21, 1073769216
  %23 = fsub float %14, %16
  %24 = sub i32 %10, %12
  %25 = uitofp i32 %24 to float
  br label %26

26:                                               ; preds = %65, %1
  %27 = load i64, ptr @GLOBAL__TIME_STARTPOINT, align 8
  %28 = load i64, ptr getelementptr inbounds (i8, ptr @GLOBAL__TIME_STARTPOINT, i64 8), align 8
  %29 = load i64, ptr @elapsed_pressure_glob, align 8
  %30 = load i64, ptr getelementptr inbounds (i8, ptr @elapsed_pressure_glob, i64 8), align 8
  call void @check_time(ptr noundef nonnull @now_pressure_glob, i64 %27, i64 %28, i64 %29, i64 %30, ptr noundef nonnull @time_pressure_glob) #8
  %31 = load i64, ptr @SPI__READ_TIMESTEP, align 8, !tbaa !20
  call void @passive_wait(ptr noundef nonnull @now_pressure, ptr noundef nonnull @before_pressure, ptr noundef nonnull @elapsed_pressure, ptr noundef nonnull @time_pressure, i64 noundef %31) #8
  %32 = call i32 (i32, i64, ...) @ioctl(i32 noundef %4, i64 noundef %22, ptr noundef nonnull @transfer) #8
  %33 = icmp slt i32 %32, 0
  br i1 %33, label %34, label %36

34:                                               ; preds = %26
  call void @perror(ptr noundef nonnull @.str.8) #9
  %35 = load ptr, ptr @error_log, align 8, !tbaa !18
  call void @write_to_file_custom(ptr noundef %35, ptr noundef nonnull @.str.8, ptr noundef %35) #8
  call void @exit(i32 noundef -2) #10
  unreachable

36:                                               ; preds = %26
  %37 = load i8, ptr @data, align 1, !tbaa !22
  %38 = lshr i8 %37, 6
  store i8 %38, ptr @radial_status, align 1, !tbaa !22
  %39 = and i8 %37, 63
  %40 = zext nneg i8 %39 to i32
  %41 = shl nuw nsw i32 %40, 8
  %42 = load i8, ptr getelementptr inbounds (i8, ptr @data, i64 1), align 1, !tbaa !22
  %43 = zext i8 %42 to i32
  %44 = load i8, ptr getelementptr inbounds (i8, ptr @data, i64 2), align 1, !tbaa !22
  %45 = zext i8 %44 to i32
  %46 = shl nuw nsw i32 %45, 3
  %47 = load i8, ptr getelementptr inbounds (i8, ptr @data, i64 3), align 1, !tbaa !22
  %48 = lshr i8 %47, 5
  %49 = zext nneg i8 %48 to i32
  %50 = or disjoint i32 %46, %49
  %51 = sub i32 %43, %12
  %52 = add i32 %51, %41
  %53 = uitofp i32 %52 to float
  %54 = fmul float %23, %53
  %55 = fdiv float %54, %25
  %56 = fadd float %16, %55
  store float %56, ptr @radial_pressure, align 4, !tbaa !23
  %57 = uitofp nneg i32 %50 to double
  %58 = fdiv double %57, 2.047000e+03
  %59 = call double @llvm.fmuladd.f64(double %58, double 2.000000e+02, double -5.000000e+01)
  %60 = fptrunc double %59 to float
  store float %60, ptr @radial_temperature, align 4, !tbaa !23
  %61 = call i32 (i32, i64, ...) @ioctl(i32 noundef %6, i64 noundef %22, ptr noundef nonnull @transfer) #8
  %62 = icmp slt i32 %61, 0
  br i1 %62, label %63, label %65

63:                                               ; preds = %36
  call void @perror(ptr noundef nonnull @.str.8) #9
  %64 = load ptr, ptr @error_log, align 8, !tbaa !18
  call void @write_to_file_custom(ptr noundef %64, ptr noundef nonnull @.str.8, ptr noundef %64) #8
  call void @exit(i32 noundef -2) #10
  unreachable

65:                                               ; preds = %36
  %66 = load i8, ptr @data, align 1, !tbaa !22
  %67 = lshr i8 %66, 6
  store i8 %67, ptr @axial_status, align 1, !tbaa !22
  %68 = and i8 %66, 63
  %69 = zext nneg i8 %68 to i32
  %70 = shl nuw nsw i32 %69, 8
  %71 = load i8, ptr getelementptr inbounds (i8, ptr @data, i64 1), align 1, !tbaa !22
  %72 = zext i8 %71 to i32
  %73 = load i8, ptr getelementptr inbounds (i8, ptr @data, i64 2), align 1, !tbaa !22
  %74 = zext i8 %73 to i32
  %75 = shl nuw nsw i32 %74, 3
  %76 = load i8, ptr getelementptr inbounds (i8, ptr @data, i64 3), align 1, !tbaa !22
  %77 = lshr i8 %76, 5
  %78 = zext nneg i8 %77 to i32
  %79 = or disjoint i32 %75, %78
  %80 = sub i32 %72, %12
  %81 = add i32 %80, %70
  %82 = uitofp i32 %81 to float
  %83 = fmul float %23, %82
  %84 = fdiv float %83, %25
  %85 = fadd float %16, %84
  store float %85, ptr @axial_pressure, align 4, !tbaa !23
  %86 = uitofp nneg i32 %79 to double
  %87 = fdiv double %86, 2.047000e+03
  %88 = call double @llvm.fmuladd.f64(double %87, double 2.000000e+02, double -5.000000e+01)
  %89 = fptrunc double %88 to float
  store float %89, ptr @axial_temperature, align 4, !tbaa !23
  %90 = load i64, ptr @time_pressure_glob, align 8, !tbaa !20
  %91 = load i8, ptr @radial_status, align 1, !tbaa !22
  %92 = zext i8 %91 to i32
  %93 = load float, ptr @radial_pressure, align 4, !tbaa !23
  %94 = fpext float %93 to double
  %95 = load float, ptr @radial_temperature, align 4, !tbaa !23
  %96 = fpext float %95 to double
  %97 = zext nneg i8 %67 to i32
  %98 = fpext float %85 to double
  %99 = fpext float %89 to double
  %100 = call i32 (ptr, ptr, ...) @sprintf(ptr noundef nonnull dereferenceable(1) %2, ptr noundef nonnull dereferenceable(1) @.str.9, i64 noundef %90, i32 noundef %92, double noundef %94, double noundef %96, i32 noundef %97, double noundef %98, double noundef %99) #8
  %101 = load ptr, ptr @pressure_log, align 8, !tbaa !18
  %102 = load ptr, ptr @error_log, align 8, !tbaa !18
  call void @write_to_file_custom(ptr noundef %101, ptr noundef nonnull %2, ptr noundef %102) #8
  %103 = load i8, ptr @SPI_quit, align 1, !tbaa !22
  %.not = icmp eq i8 %103, 0
  br i1 %.not, label %26, label %104, !llvm.loop !24

104:                                              ; preds = %65
  %105 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10)
  call void @pthread_exit(ptr noundef null) #10
  unreachable
}

declare void @write_to_file_custom(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

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

declare void @check_time(ptr noundef, i64, i64, i64, i64, ptr noundef) local_unnamed_addr #5

declare void @passive_wait(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #5

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #6

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

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

; Function Attrs: noreturn
declare void @pthread_exit(ptr noundef) local_unnamed_addr #7

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { noreturn nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "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 nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { noreturn "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 #8 = { nounwind }
attributes #9 = { cold }
attributes #10 = { 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, !10, i64 36}
!6 = !{!"SPI_data", !7, i64 0, !7, i64 1, !9, i64 8, !7, i64 16, !10, i64 20, !10, i64 24, !11, i64 28, !11, i64 32, !10, i64 36, !10, i64 40}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!"long", !7, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!"float", !7, i64 0}
!12 = !{!6, !10, i64 40}
!13 = !{!6, !7, i64 16}
!14 = !{!6, !10, i64 20}
!15 = !{!6, !10, i64 24}
!16 = !{!6, !11, i64 28}
!17 = !{!6, !11, i64 32}
!18 = !{!19, !19, i64 0}
!19 = !{!"any pointer", !7, i64 0}
!20 = !{!21, !21, i64 0}
!21 = !{!"long long", !7, i64 0}
!22 = !{!7, !7, i64 0}
!23 = !{!11, !11, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass