; LLVM IR from IOsonata/IOsonata :: src/sensors (ag_icm456x)

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

%class.Device = type { ptr, i8, i32, ptr, ptr, i64, i8, ptr, i8, i32 }

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN9AgIcm456x4InitEjP11DeviceIntrfh24__Dev_Interrupt_PolarityP5Timer(ptr noundef nonnull align 8 dereferenceable(420) %0, i32 noundef %1, ptr noundef %2, i8 noundef zeroext %3, i32 noundef %4, ptr noundef %5) unnamed_addr #1 align 2 {
  %7 = alloca i1, align 1
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i8, align 1
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca i8, align 1
  %15 = alloca i8, align 1
  %16 = alloca i32, align 4
  %17 = alloca i16, align 2
  %18 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store i32 %1, ptr %9, align 4, !tbaa !9
  store ptr %2, ptr %10, align 8, !tbaa !5
  store i8 %3, ptr %11, align 1, !tbaa !11
  store i32 %4, ptr %12, align 4, !tbaa !12
  store ptr %5, ptr %13, align 8, !tbaa !5
  %19 = load ptr, ptr %8, align 8
  %20 = load ptr, ptr %19, align 8, !tbaa !14
  %21 = getelementptr i8, ptr %20, i64 -24
  %22 = load i64, ptr %21, align 8
  %23 = getelementptr inbounds i8, ptr %19, i64 %22
  %24 = call noundef zeroext i1 @_ZN6Device5ValidEv(ptr noundef nonnull align 8 dereferenceable(64) %23)
  br i1 %24, label %25, label %26

25:                                               ; preds = %6
  store i1 true, ptr %7, align 1
  br label %217

26:                                               ; preds = %6
  %27 = load ptr, ptr %10, align 8, !tbaa !5
  %28 = icmp eq ptr %27, null
  br i1 %28, label %29, label %30

29:                                               ; preds = %26
  store i1 false, ptr %7, align 1
  br label %217

30:                                               ; preds = %26
  %31 = load ptr, ptr %19, align 8, !tbaa !14
  %32 = getelementptr i8, ptr %31, i64 -24
  %33 = load i64, ptr %32, align 8
  %34 = getelementptr inbounds i8, ptr %19, i64 %33
  %35 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN6Device9InterfaceEP11DeviceIntrf(ptr noundef nonnull align 8 dereferenceable(64) %34, ptr noundef %35)
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #3
  store i8 114, ptr %14, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #3
  %36 = load i32, ptr %9, align 4, !tbaa !9
  %37 = icmp eq i32 %36, 104
  br i1 %37, label %41, label %38

38:                                               ; preds = %30
  %39 = load i32, ptr %9, align 4, !tbaa !9
  %40 = icmp eq i32 %39, 105
  br i1 %40, label %41, label %71

41:                                               ; preds = %38, %30
  %42 = load ptr, ptr %10, align 8, !tbaa !5
  %43 = load ptr, ptr %42, align 8, !tbaa !14
  %44 = getelementptr inbounds ptr, ptr %43, i64 1
  %45 = load ptr, ptr %44, align 8
  %46 = call noundef i32 %45(ptr noundef nonnull align 8 dereferenceable(8) %42)
  %47 = icmp ne i32 %46, 4
  br i1 %47, label %48, label %49

48:                                               ; preds = %41
  store i1 false, ptr %7, align 1
  store i32 1, ptr %16, align 4
  br label %216

49:                                               ; preds = %41
  %50 = load ptr, ptr %19, align 8, !tbaa !14
  %51 = getelementptr i8, ptr %50, i64 -24
  %52 = load i64, ptr %51, align 8
  %53 = getelementptr inbounds i8, ptr %19, i64 %52
  %54 = load i32, ptr %9, align 4, !tbaa !9
  %55 = load ptr, ptr %53, align 8, !tbaa !14
  %56 = getelementptr inbounds ptr, ptr %55, i64 6
  %57 = load ptr, ptr %56, align 8
  call void %57(ptr noundef nonnull align 8 dereferenceable(64) %53, i32 noundef %54)
  %58 = load ptr, ptr %19, align 8, !tbaa !14
  %59 = getelementptr i8, ptr %58, i64 -24
  %60 = load i64, ptr %59, align 8
  %61 = getelementptr inbounds i8, ptr %19, i64 %60
  %62 = load ptr, ptr %61, align 8, !tbaa !14
  %63 = getelementptr inbounds ptr, ptr %62, i64 11
  %64 = load ptr, ptr %63, align 8
  %65 = call noundef zeroext i8 %64(ptr noundef nonnull align 8 dereferenceable(64) %61, ptr noundef %14, i32 noundef 1)
  store i8 %65, ptr %15, align 1, !tbaa !11
  %66 = load i8, ptr %15, align 1, !tbaa !11
  %67 = zext i8 %66 to i32
  %68 = icmp ne i32 %67, 114
  br i1 %68, label %69, label %70

69:                                               ; preds = %49
  store i1 false, ptr %7, align 1
  store i32 1, ptr %16, align 4
  br label %216

70:                                               ; preds = %49
  br label %142

71:                                               ; preds = %38
  %72 = load ptr, ptr %10, align 8, !tbaa !5
  %73 = load ptr, ptr %72, align 8, !tbaa !14
  %74 = getelementptr inbounds ptr, ptr %73, i64 1
  %75 = load ptr, ptr %74, align 8
  %76 = call noundef i32 %75(ptr noundef nonnull align 8 dereferenceable(8) %72)
  %77 = icmp eq i32 %76, 4
  br i1 %77, label %78, label %119

78:                                               ; preds = %71
  %79 = load ptr, ptr %19, align 8, !tbaa !14
  %80 = getelementptr i8, ptr %79, i64 -24
  %81 = load i64, ptr %80, align 8
  %82 = getelementptr inbounds i8, ptr %19, i64 %81
  %83 = load ptr, ptr %82, align 8, !tbaa !14
  %84 = getelementptr inbounds ptr, ptr %83, i64 6
  %85 = load ptr, ptr %84, align 8
  call void %85(ptr noundef nonnull align 8 dereferenceable(64) %82, i32 noundef 104)
  %86 = load ptr, ptr %19, align 8, !tbaa !14
  %87 = getelementptr i8, ptr %86, i64 -24
  %88 = load i64, ptr %87, align 8
  %89 = getelementptr inbounds i8, ptr %19, i64 %88
  %90 = load ptr, ptr %89, align 8, !tbaa !14
  %91 = getelementptr inbounds ptr, ptr %90, i64 11
  %92 = load ptr, ptr %91, align 8
  %93 = call noundef zeroext i8 %92(ptr noundef nonnull align 8 dereferenceable(64) %89, ptr noundef %14, i32 noundef 1)
  store i8 %93, ptr %15, align 1, !tbaa !11
  %94 = load i8, ptr %15, align 1, !tbaa !11
  %95 = zext i8 %94 to i32
  %96 = icmp ne i32 %95, 233
  br i1 %96, label %97, label %118

97:                                               ; preds = %78
  %98 = load ptr, ptr %19, align 8, !tbaa !14
  %99 = getelementptr i8, ptr %98, i64 -24
  %100 = load i64, ptr %99, align 8
  %101 = getelementptr inbounds i8, ptr %19, i64 %100
  %102 = load ptr, ptr %101, align 8, !tbaa !14
  %103 = getelementptr inbounds ptr, ptr %102, i64 6
  %104 = load ptr, ptr %103, align 8
  call void %104(ptr noundef nonnull align 8 dereferenceable(64) %101, i32 noundef 105)
  %105 = load ptr, ptr %19, align 8, !tbaa !14
  %106 = getelementptr i8, ptr %105, i64 -24
  %107 = load i64, ptr %106, align 8
  %108 = getelementptr inbounds i8, ptr %19, i64 %107
  %109 = load ptr, ptr %108, align 8, !tbaa !14
  %110 = getelementptr inbounds ptr, ptr %109, i64 11
  %111 = load ptr, ptr %110, align 8
  %112 = call noundef zeroext i8 %111(ptr noundef nonnull align 8 dereferenceable(64) %108, ptr noundef %14, i32 noundef 1)
  store i8 %112, ptr %15, align 1, !tbaa !11
  %113 = load i8, ptr %15, align 1, !tbaa !11
  %114 = zext i8 %113 to i32
  %115 = icmp ne i32 %114, 233
  br i1 %115, label %116, label %117

116:                                              ; preds = %97
  store i1 false, ptr %7, align 1
  store i32 1, ptr %16, align 4
  br label %216

117:                                              ; preds = %97
  br label %118

118:                                              ; preds = %117, %78
  br label %141

119:                                              ; preds = %71
  %120 = load ptr, ptr %19, align 8, !tbaa !14
  %121 = getelementptr i8, ptr %120, i64 -24
  %122 = load i64, ptr %121, align 8
  %123 = getelementptr inbounds i8, ptr %19, i64 %122
  %124 = load i32, ptr %9, align 4, !tbaa !9
  %125 = load ptr, ptr %123, align 8, !tbaa !14
  %126 = getelementptr inbounds ptr, ptr %125, i64 6
  %127 = load ptr, ptr %126, align 8
  call void %127(ptr noundef nonnull align 8 dereferenceable(64) %123, i32 noundef %124)
  %128 = load ptr, ptr %19, align 8, !tbaa !14
  %129 = getelementptr i8, ptr %128, i64 -24
  %130 = load i64, ptr %129, align 8
  %131 = getelementptr inbounds i8, ptr %19, i64 %130
  %132 = load ptr, ptr %131, align 8, !tbaa !14
  %133 = getelementptr inbounds ptr, ptr %132, i64 11
  %134 = load ptr, ptr %133, align 8
  %135 = call noundef zeroext i8 %134(ptr noundef nonnull align 8 dereferenceable(64) %131, ptr noundef %14, i32 noundef 1)
  store i8 %135, ptr %15, align 1, !tbaa !11
  %136 = load i8, ptr %15, align 1, !tbaa !11
  %137 = zext i8 %136 to i32
  %138 = icmp ne i32 %137, 233
  br i1 %138, label %139, label %140

139:                                              ; preds = %119
  store i1 false, ptr %7, align 1
  store i32 1, ptr %16, align 4
  br label %216

140:                                              ; preds = %119
  br label %141

141:                                              ; preds = %140, %118
  br label %142

142:                                              ; preds = %141, %70
  %143 = load ptr, ptr %19, align 8, !tbaa !14
  %144 = getelementptr i8, ptr %143, i64 -24
  %145 = load i64, ptr %144, align 8
  %146 = getelementptr inbounds i8, ptr %19, i64 %145
  %147 = load i8, ptr %15, align 1, !tbaa !11
  %148 = zext i8 %147 to i64
  call void @_ZN6Device8DeviceIDEm(ptr noundef nonnull align 8 dereferenceable(64) %146, i64 noundef %148)
  %149 = load ptr, ptr %13, align 8, !tbaa !5
  %150 = icmp ne ptr %149, null
  br i1 %150, label %151, label %158

151:                                              ; preds = %142
  %152 = load ptr, ptr %13, align 8, !tbaa !5
  %153 = load ptr, ptr %19, align 8, !tbaa !14
  %154 = getelementptr i8, ptr %153, i64 -24
  %155 = load i64, ptr %154, align 8
  %156 = getelementptr inbounds i8, ptr %19, i64 %155
  %157 = getelementptr inbounds %class.Device, ptr %156, i32 0, i32 4
  store ptr %152, ptr %157, align 8, !tbaa !16
  br label %158

158:                                              ; preds = %151, %142
  %159 = load ptr, ptr %19, align 8, !tbaa !14
  %160 = getelementptr i8, ptr %159, i64 -24
  %161 = load i64, ptr %160, align 8
  %162 = getelementptr inbounds i8, ptr %19, i64 %161
  call void @_ZN6Device5ValidEb(ptr noundef nonnull align 8 dereferenceable(64) %162, i1 noundef zeroext true)
  %163 = load ptr, ptr %19, align 8, !tbaa !14
  %164 = getelementptr inbounds ptr, ptr %163, i64 32
  %165 = load ptr, ptr %164, align 8
  call void %165(ptr noundef nonnull align 8 dereferenceable(420) %19)
  store i8 29, ptr %14, align 1, !tbaa !11
  %166 = load ptr, ptr %19, align 8, !tbaa !14
  %167 = getelementptr i8, ptr %166, i64 -24
  %168 = load i64, ptr %167, align 8
  %169 = getelementptr inbounds i8, ptr %19, i64 %168
  %170 = load ptr, ptr %169, align 8, !tbaa !14
  %171 = getelementptr inbounds ptr, ptr %170, i64 14
  %172 = load ptr, ptr %171, align 8
  %173 = call noundef zeroext i1 %172(ptr noundef nonnull align 8 dereferenceable(64) %169, ptr noundef %14, i32 noundef 1, i8 noundef zeroext 71)
  store i8 30, ptr %14, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 2, ptr %17) #3
  store i16 1638, ptr %17, align 2, !tbaa !21
  %174 = load ptr, ptr %19, align 8, !tbaa !14
  %175 = getelementptr i8, ptr %174, i64 -24
  %176 = load i64, ptr %175, align 8
  %177 = getelementptr inbounds i8, ptr %19, i64 %176
  %178 = load i16, ptr %17, align 2, !tbaa !21
  %179 = load ptr, ptr %177, align 8, !tbaa !14
  %180 = getelementptr inbounds ptr, ptr %179, i64 15
  %181 = load ptr, ptr %180, align 8
  %182 = call noundef zeroext i1 %181(ptr noundef nonnull align 8 dereferenceable(64) %177, ptr noundef %14, i32 noundef 1, i16 noundef zeroext %178)
  store i8 32, ptr %14, align 1, !tbaa !11
  %183 = load ptr, ptr %19, align 8, !tbaa !14
  %184 = getelementptr i8, ptr %183, i64 -24
  %185 = load i64, ptr %184, align 8
  %186 = getelementptr inbounds i8, ptr %19, i64 %185
  %187 = load ptr, ptr %186, align 8, !tbaa !14
  %188 = getelementptr inbounds ptr, ptr %187, i64 14
  %189 = load ptr, ptr %188, align 8
  %190 = call noundef zeroext i1 %189(ptr noundef nonnull align 8 dereferenceable(64) %186, ptr noundef %14, i32 noundef 1, i8 noundef zeroext 8)
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #3
  store i32 0, ptr %18, align 4, !tbaa !9
  store i8 22, ptr %14, align 1, !tbaa !11
  %191 = load i8, ptr %11, align 1, !tbaa !11
  %192 = icmp ne i8 %191, 0
  br i1 %192, label %193, label %211

193:                                              ; preds = %158
  store i32 28175, ptr %18, align 4, !tbaa !9
  %194 = load i32, ptr %12, align 4, !tbaa !12
  %195 = icmp eq i32 %194, 1
  br i1 %195, label %196, label %199

196:                                              ; preds = %193
  %197 = load i32, ptr %18, align 4, !tbaa !9
  %198 = or i32 %197, 196608
  store i32 %198, ptr %18, align 4, !tbaa !9
  br label %199

199:                                              ; preds = %196, %193
  %200 = load i8, ptr %11, align 1, !tbaa !11
  %201 = zext i8 %200 to i32
  %202 = icmp eq i32 %201, 1
  br i1 %202, label %203, label %204

203:                                              ; preds = %199
  store i8 22, ptr %14, align 1, !tbaa !11
  br label %205

204:                                              ; preds = %199
  store i8 86, ptr %14, align 1, !tbaa !11
  br label %205

205:                                              ; preds = %204, %203
  %206 = load ptr, ptr %19, align 8, !tbaa !14
  %207 = getelementptr i8, ptr %206, i64 -24
  %208 = load i64, ptr %207, align 8
  %209 = getelementptr inbounds i8, ptr %19, i64 %208
  %210 = load i8, ptr %11, align 1, !tbaa !11
  call void @_ZN6Device11InterruptIdEh(ptr noundef nonnull align 8 dereferenceable(64) %209, i8 noundef zeroext %210)
  br label %211

211:                                              ; preds = %205, %158
  %212 = load ptr, ptr %19, align 8, !tbaa !14
  %213 = getelementptr inbounds ptr, ptr %212, i64 37
  %214 = load ptr, ptr %213, align 8
  %215 = call noundef i32 %214(ptr noundef nonnull align 8 dereferenceable(420) %19, ptr noundef %14, i32 noundef 1, ptr noundef %18, i32 noundef 2)
  store i1 true, ptr %7, align 1
  store i32 1, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 2, ptr %17) #3
  br label %216

216:                                              ; preds = %211, %139, %116, %69, %48
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #3
  br label %217

217:                                              ; preds = %216, %29, %25
  %218 = load i1, ptr %7, align 1
  ret i1 %218
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN6Device5ValidEv(ptr noundef nonnull align 8 dereferenceable(64)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6Device9InterfaceEP11DeviceIntrf(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6Device8DeviceIDEm(ptr noundef nonnull align 8 dereferenceable(64), i64 noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6Device5ValidEb(ptr noundef nonnull align 8 dereferenceable(64), i1 noundef zeroext) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6Device11InterruptIdEh(ptr noundef nonnull align 8 dereferenceable(64), i8 noundef zeroext) #2 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 #3 = { 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"_ZTS24__Dev_Interrupt_Polarity", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"vtable pointer", !8, i64 0}
!16 = !{!17, !6, i64 24}
!17 = !{!"_ZTS6Device", !18, i64 8, !10, i64 12, !6, i64 16, !6, i64 24, !19, i64 32, !18, i64 40, !6, i64 48, !7, i64 56, !20, i64 60}
!18 = !{!"bool", !7, i64 0}
!19 = !{!"long", !7, i64 0}
!20 = !{!"_ZTS21__Dev_Data_Byte_Order", !7, i64 0}
!21 = !{!22, !22, i64 0}
!22 = !{!"short", !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"

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN9AgIcm456x4InitEjP11DeviceIntrfh24__Dev_Interrupt_PolarityP5Timer(ptr noundef nonnull align 8 dereferenceable(420) %0, i32 noundef %1, ptr noundef %2, i8 noundef zeroext %3, i32 noundef %4, ptr noundef %5) unnamed_addr #1 align 2 {
  %7 = alloca i8, align 1
  %8 = alloca i32, align 4
  %9 = load ptr, ptr %0, align 8, !tbaa !5
  %10 = getelementptr i8, ptr %9, i64 -24
  %11 = load i64, ptr %10, align 8
  %12 = getelementptr inbounds i8, ptr %0, i64 %11
  %13 = tail call noundef zeroext i1 @_ZN6Device5ValidEv(ptr noundef nonnull align 8 dereferenceable(64) %12)
  br i1 %13, label %139, label %14

14:                                               ; preds = %6
  %15 = icmp eq ptr %2, null
  br i1 %15, label %139, label %16

16:                                               ; preds = %14
  %17 = load ptr, ptr %0, align 8, !tbaa !5
  %18 = getelementptr i8, ptr %17, i64 -24
  %19 = load i64, ptr %18, align 8
  %20 = getelementptr inbounds i8, ptr %0, i64 %19
  tail call void @_ZN6Device9InterfaceEP11DeviceIntrf(ptr noundef nonnull align 8 dereferenceable(64) %20, ptr noundef nonnull %2)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #3
  store i8 114, ptr %7, align 1, !tbaa !8
  %21 = and i32 %1, -2
  %or.cond = icmp eq i32 %21, 104
  %22 = load ptr, ptr %2, align 8, !tbaa !5
  %23 = getelementptr inbounds i8, ptr %22, i64 8
  %24 = load ptr, ptr %23, align 8
  %25 = tail call noundef i32 %24(ptr noundef nonnull align 8 dereferenceable(8) %2)
  %.not29 = icmp eq i32 %25, 4
  br i1 %or.cond, label %26, label %43

26:                                               ; preds = %16
  br i1 %.not29, label %27, label %138

27:                                               ; preds = %26
  %28 = load ptr, ptr %0, align 8, !tbaa !5
  %29 = getelementptr i8, ptr %28, i64 -24
  %30 = load i64, ptr %29, align 8
  %31 = getelementptr inbounds i8, ptr %0, i64 %30
  %32 = load ptr, ptr %31, align 8, !tbaa !5
  %33 = getelementptr inbounds i8, ptr %32, i64 48
  %34 = load ptr, ptr %33, align 8
  tail call void %34(ptr noundef nonnull align 8 dereferenceable(64) %31, i32 noundef %1)
  %35 = load ptr, ptr %0, align 8, !tbaa !5
  %36 = getelementptr i8, ptr %35, i64 -24
  %37 = load i64, ptr %36, align 8
  %38 = getelementptr inbounds i8, ptr %0, i64 %37
  %39 = load ptr, ptr %38, align 8, !tbaa !5
  %40 = getelementptr inbounds i8, ptr %39, i64 88
  %41 = load ptr, ptr %40, align 8
  %42 = call noundef zeroext i8 %41(ptr noundef nonnull align 8 dereferenceable(64) %38, ptr noundef nonnull %7, i32 noundef 1)
  %.not30 = icmp eq i8 %42, 114
  br i1 %.not30, label %85, label %138

43:                                               ; preds = %16
  %44 = load ptr, ptr %0, align 8, !tbaa !5
  %45 = getelementptr i8, ptr %44, i64 -24
  %46 = load i64, ptr %45, align 8
  %47 = getelementptr inbounds i8, ptr %0, i64 %46
  %48 = load ptr, ptr %47, align 8, !tbaa !5
  %49 = getelementptr inbounds i8, ptr %48, i64 48
  %50 = load ptr, ptr %49, align 8
  br i1 %.not29, label %51, label %76

51:                                               ; preds = %43
  tail call void %50(ptr noundef nonnull align 8 dereferenceable(64) %47, i32 noundef 104)
  %52 = load ptr, ptr %0, align 8, !tbaa !5
  %53 = getelementptr i8, ptr %52, i64 -24
  %54 = load i64, ptr %53, align 8
  %55 = getelementptr inbounds i8, ptr %0, i64 %54
  %56 = load ptr, ptr %55, align 8, !tbaa !5
  %57 = getelementptr inbounds i8, ptr %56, i64 88
  %58 = load ptr, ptr %57, align 8
  %59 = call noundef zeroext i8 %58(ptr noundef nonnull align 8 dereferenceable(64) %55, ptr noundef nonnull %7, i32 noundef 1)
  %.not27 = icmp eq i8 %59, -23
  br i1 %.not27, label %85, label %60

60:                                               ; preds = %51
  %61 = load ptr, ptr %0, align 8, !tbaa !5
  %62 = getelementptr i8, ptr %61, i64 -24
  %63 = load i64, ptr %62, align 8
  %64 = getelementptr inbounds i8, ptr %0, i64 %63
  %65 = load ptr, ptr %64, align 8, !tbaa !5
  %66 = getelementptr inbounds i8, ptr %65, i64 48
  %67 = load ptr, ptr %66, align 8
  call void %67(ptr noundef nonnull align 8 dereferenceable(64) %64, i32 noundef 105)
  %68 = load ptr, ptr %0, align 8, !tbaa !5
  %69 = getelementptr i8, ptr %68, i64 -24
  %70 = load i64, ptr %69, align 8
  %71 = getelementptr inbounds i8, ptr %0, i64 %70
  %72 = load ptr, ptr %71, align 8, !tbaa !5
  %73 = getelementptr inbounds i8, ptr %72, i64 88
  %74 = load ptr, ptr %73, align 8
  %75 = call noundef zeroext i8 %74(ptr noundef nonnull align 8 dereferenceable(64) %71, ptr noundef nonnull %7, i32 noundef 1)
  %.not28 = icmp eq i8 %75, -23
  br i1 %.not28, label %85, label %138

76:                                               ; preds = %43
  tail call void %50(ptr noundef nonnull align 8 dereferenceable(64) %47, i32 noundef %1)
  %77 = load ptr, ptr %0, align 8, !tbaa !5
  %78 = getelementptr i8, ptr %77, i64 -24
  %79 = load i64, ptr %78, align 8
  %80 = getelementptr inbounds i8, ptr %0, i64 %79
  %81 = load ptr, ptr %80, align 8, !tbaa !5
  %82 = getelementptr inbounds i8, ptr %81, i64 88
  %83 = load ptr, ptr %82, align 8
  %84 = call noundef zeroext i8 %83(ptr noundef nonnull align 8 dereferenceable(64) %80, ptr noundef nonnull %7, i32 noundef 1)
  %.not = icmp eq i8 %84, -23
  br i1 %.not, label %85, label %138

85:                                               ; preds = %60, %51, %76, %27
  %.022 = phi i64 [ 114, %27 ], [ 233, %60 ], [ 233, %51 ], [ 233, %76 ]
  %86 = load ptr, ptr %0, align 8, !tbaa !5
  %87 = getelementptr i8, ptr %86, i64 -24
  %88 = load i64, ptr %87, align 8
  %89 = getelementptr inbounds i8, ptr %0, i64 %88
  call void @_ZN6Device8DeviceIDEm(ptr noundef nonnull align 8 dereferenceable(64) %89, i64 noundef %.022)
  %.not31 = icmp eq ptr %5, null
  %.pre = load ptr, ptr %0, align 8, !tbaa !5
  br i1 %.not31, label %95, label %90

90:                                               ; preds = %85
  %91 = getelementptr i8, ptr %.pre, i64 -24
  %92 = load i64, ptr %91, align 8
  %93 = getelementptr inbounds i8, ptr %0, i64 %92
  %94 = getelementptr inbounds i8, ptr %93, i64 24
  store ptr %5, ptr %94, align 8, !tbaa !10
  br label %95

95:                                               ; preds = %90, %85
  %96 = getelementptr i8, ptr %.pre, i64 -24
  %97 = load i64, ptr %96, align 8
  %98 = getelementptr inbounds i8, ptr %0, i64 %97
  call void @_ZN6Device5ValidEb(ptr noundef nonnull align 8 dereferenceable(64) %98, i1 noundef zeroext true)
  %99 = load ptr, ptr %0, align 8, !tbaa !5
  %100 = getelementptr inbounds i8, ptr %99, i64 256
  %101 = load ptr, ptr %100, align 8
  call void %101(ptr noundef nonnull align 8 dereferenceable(420) %0)
  store i8 29, ptr %7, align 1, !tbaa !8
  %102 = load ptr, ptr %0, align 8, !tbaa !5
  %103 = getelementptr i8, ptr %102, i64 -24
  %104 = load i64, ptr %103, align 8
  %105 = getelementptr inbounds i8, ptr %0, i64 %104
  %106 = load ptr, ptr %105, align 8, !tbaa !5
  %107 = getelementptr inbounds i8, ptr %106, i64 112
  %108 = load ptr, ptr %107, align 8
  %109 = call noundef zeroext i1 %108(ptr noundef nonnull align 8 dereferenceable(64) %105, ptr noundef nonnull %7, i32 noundef 1, i8 noundef zeroext 71)
  store i8 30, ptr %7, align 1, !tbaa !8
  %110 = load ptr, ptr %0, align 8, !tbaa !5
  %111 = getelementptr i8, ptr %110, i64 -24
  %112 = load i64, ptr %111, align 8
  %113 = getelementptr inbounds i8, ptr %0, i64 %112
  %114 = load ptr, ptr %113, align 8, !tbaa !5
  %115 = getelementptr inbounds i8, ptr %114, i64 120
  %116 = load ptr, ptr %115, align 8
  %117 = call noundef zeroext i1 %116(ptr noundef nonnull align 8 dereferenceable(64) %113, ptr noundef nonnull %7, i32 noundef 1, i16 noundef zeroext 1638)
  store i8 32, ptr %7, align 1, !tbaa !8
  %118 = load ptr, ptr %0, align 8, !tbaa !5
  %119 = getelementptr i8, ptr %118, i64 -24
  %120 = load i64, ptr %119, align 8
  %121 = getelementptr inbounds i8, ptr %0, i64 %120
  %122 = load ptr, ptr %121, align 8, !tbaa !5
  %123 = getelementptr inbounds i8, ptr %122, i64 112
  %124 = load ptr, ptr %123, align 8
  %125 = call noundef zeroext i1 %124(ptr noundef nonnull align 8 dereferenceable(64) %121, ptr noundef nonnull %7, i32 noundef 1, i8 noundef zeroext 8)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #3
  store i32 0, ptr %8, align 4, !tbaa !17
  store i8 22, ptr %7, align 1, !tbaa !8
  %.not32 = icmp eq i8 %3, 0
  br i1 %.not32, label %133, label %126

126:                                              ; preds = %95
  %127 = icmp eq i32 %4, 1
  %spec.select = select i1 %127, i32 224783, i32 28175
  store i32 %spec.select, ptr %8, align 4, !tbaa !17
  %128 = icmp eq i8 %3, 1
  %storemerge33 = select i1 %128, i8 22, i8 86
  store i8 %storemerge33, ptr %7, align 1, !tbaa !8
  %129 = load ptr, ptr %0, align 8, !tbaa !5
  %130 = getelementptr i8, ptr %129, i64 -24
  %131 = load i64, ptr %130, align 8
  %132 = getelementptr inbounds i8, ptr %0, i64 %131
  call void @_ZN6Device11InterruptIdEh(ptr noundef nonnull align 8 dereferenceable(64) %132, i8 noundef zeroext %3)
  br label %133

133:                                              ; preds = %126, %95
  %134 = load ptr, ptr %0, align 8, !tbaa !5
  %135 = getelementptr inbounds i8, ptr %134, i64 296
  %136 = load ptr, ptr %135, align 8
  %137 = call noundef i32 %136(ptr noundef nonnull align 8 dereferenceable(420) %0, ptr noundef nonnull %7, i32 noundef 1, ptr noundef nonnull %8, i32 noundef 2)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #3
  br label %138

138:                                              ; preds = %76, %60, %27, %26, %133
  %.0 = phi i1 [ true, %133 ], [ false, %26 ], [ false, %27 ], [ false, %60 ], [ false, %76 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #3
  br label %139

139:                                              ; preds = %14, %6, %138
  %.1 = phi i1 [ %.0, %138 ], [ true, %6 ], [ false, %14 ]
  ret i1 %.1
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN6Device5ValidEv(ptr noundef nonnull align 8 dereferenceable(64)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6Device9InterfaceEP11DeviceIntrf(ptr noundef nonnull align 8 dereferenceable(64), ptr noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6Device8DeviceIDEm(ptr noundef nonnull align 8 dereferenceable(64), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6Device5ValidEb(ptr noundef nonnull align 8 dereferenceable(64), i1 noundef zeroext) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN6Device11InterruptIdEh(ptr noundef nonnull align 8 dereferenceable(64), i8 noundef zeroext) local_unnamed_addr #2 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress 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 #3 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"omnipotent char", !7, i64 0}
!10 = !{!11, !14, i64 24}
!11 = !{!"_ZTS6Device", !12, i64 8, !13, i64 12, !14, i64 16, !14, i64 24, !15, i64 32, !12, i64 40, !14, i64 48, !9, i64 56, !16, i64 60}
!12 = !{!"bool", !9, i64 0}
!13 = !{!"int", !9, i64 0}
!14 = !{!"any pointer", !9, i64 0}
!15 = !{!"long", !9, i64 0}
!16 = !{!"_ZTS21__Dev_Data_Byte_Order", !9, i64 0}
!17 = !{!13, !13, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass