; LLVM IR from devicehive/esp8266-firmware :: esp-utils/common/serialport_posix.ll (ZN10SerialPort4openEPKc)

; 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.termios = type { i32, i32, i32, i32, i8, [32 x i8], i32, i32 }
%class.SerialPort = type <{ ptr, i32, i8, i8, [2 x i8], ptr, i32, i8, [3 x i8], i32, [256 x i8], [4 x i8] }>

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN10SerialPort12thread_startEPv(ptr noundef) #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10SerialPort5sleepEj(ptr noundef nonnull align 8 dereferenceable(292), i32 noundef) #0 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN10SerialPort4openEPKc(ptr noundef %0) #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca %struct.termios, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  %11 = load ptr, ptr %3, align 8, !tbaa !5
  %12 = call i32 (ptr, i32, ...) @open(ptr noundef %11, i32 noundef 2050)
  store i32 %12, ptr %4, align 4, !tbaa !9
  %13 = load i32, ptr %4, align 4, !tbaa !9
  %14 = icmp sge i32 %13, 0
  br i1 %14, label %15, label %83

15:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 60, ptr %5) #7
  call void @llvm.memset.p0.i64(ptr align 4 %5, i8 0, i64 60, i1 false)
  %16 = load i32, ptr %4, align 4, !tbaa !9
  %17 = call i32 @tcgetattr(i32 noundef %16, ptr noundef %5) #7
  %18 = icmp ne i32 %17, 0
  br i1 %18, label %19, label %22

19:                                               ; preds = %15
  %20 = load i32, ptr %4, align 4, !tbaa !9
  %21 = call i32 @close(i32 noundef %20)
  store ptr null, ptr %2, align 8
  store i32 1, ptr %6, align 4
  br label %82

22:                                               ; preds = %15
  %23 = getelementptr inbounds %struct.termios, ptr %5, i32 0, i32 0
  store i32 0, ptr %23, align 4, !tbaa !11
  %24 = getelementptr inbounds %struct.termios, ptr %5, i32 0, i32 1
  store i32 0, ptr %24, align 4, !tbaa !13
  %25 = getelementptr inbounds %struct.termios, ptr %5, i32 0, i32 3
  store i32 0, ptr %25, align 4, !tbaa !14
  %26 = getelementptr inbounds %struct.termios, ptr %5, i32 0, i32 2
  %27 = load i32, ptr %26, align 4, !tbaa !15
  %28 = and i32 %27, 2147483279
  store i32 %28, ptr %26, align 4, !tbaa !15
  %29 = getelementptr inbounds %struct.termios, ptr %5, i32 0, i32 2
  store i32 2224, ptr %29, align 4, !tbaa !15
  %30 = getelementptr inbounds %struct.termios, ptr %5, i32 0, i32 5
  %31 = getelementptr inbounds [32 x i8], ptr %30, i64 0, i64 6
  store i8 1, ptr %31, align 1, !tbaa !16
  %32 = getelementptr inbounds %struct.termios, ptr %5, i32 0, i32 5
  %33 = getelementptr inbounds [32 x i8], ptr %32, i64 0, i64 5
  store i8 5, ptr %33, align 1, !tbaa !16
  %34 = call i32 @cfsetospeed(ptr noundef %5, i32 noundef 4098) #7
  %35 = call i32 @cfsetispeed(ptr noundef %5, i32 noundef 4098) #7
  %36 = load i32, ptr %4, align 4, !tbaa !9
  %37 = call i32 @tcflush(i32 noundef %36, i32 noundef 2) #7
  %38 = load i32, ptr %4, align 4, !tbaa !9
  %39 = call i32 @tcsetattr(i32 noundef %38, i32 noundef 0, ptr noundef %5) #7
  %40 = icmp ne i32 %39, 0
  br i1 %40, label %41, label %44

41:                                               ; preds = %22
  %42 = load i32, ptr %4, align 4, !tbaa !9
  %43 = call i32 @close(i32 noundef %42)
  store ptr null, ptr %2, align 8
  store i32 1, ptr %6, align 4
  br label %82

44:                                               ; preds = %22
  %45 = load i32, ptr %4, align 4, !tbaa !9
  %46 = call i32 @tcflush(i32 noundef %45, i32 noundef 2) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %47 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 296) #8
  %48 = load i32, ptr %4, align 4, !tbaa !9
  %49 = load ptr, ptr %3, align 8, !tbaa !5
  invoke void @_ZN10SerialPortC1EiPKc(ptr noundef nonnull align 8 dereferenceable(292) %47, i32 noundef %48, ptr noundef %49)
          to label %50 unwind label %62

50:                                               ; preds = %44
  store ptr %47, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %51 = load ptr, ptr %7, align 8, !tbaa !5
  %52 = call i32 @pthread_create(ptr noundef %10, ptr noundef null, ptr noundef @_ZN10SerialPort12thread_startEPv, ptr noundef %51) #7
  %53 = icmp ne i32 %52, 0
  br i1 %53, label %54, label %66

54:                                               ; preds = %50
  %55 = load ptr, ptr %7, align 8, !tbaa !5
  %56 = icmp eq ptr %55, null
  br i1 %56, label %61, label %57

57:                                               ; preds = %54
  %58 = load ptr, ptr %55, align 8, !tbaa !17
  %59 = getelementptr inbounds ptr, ptr %58, i64 1
  %60 = load ptr, ptr %59, align 8
  call void %60(ptr noundef nonnull align 8 dereferenceable(292) %55) #7
  br label %61

61:                                               ; preds = %57, %54
  store ptr null, ptr %2, align 8
  store i32 1, ptr %6, align 4
  br label %81

62:                                               ; preds = %44
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %8, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %9, align 4
  call void @_ZdlPvm(ptr noundef %47, i64 noundef 296) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 60, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %86

66:                                               ; preds = %50
  %67 = load i64, ptr %10, align 8, !tbaa !19
  %68 = inttoptr i64 %67 to ptr
  %69 = load ptr, ptr %7, align 8, !tbaa !5
  %70 = getelementptr inbounds %class.SerialPort, ptr %69, i32 0, i32 5
  store ptr %68, ptr %70, align 8, !tbaa !21
  br label %71

71:                                               ; preds = %77, %66
  %72 = load ptr, ptr %7, align 8, !tbaa !5
  %73 = getelementptr inbounds %class.SerialPort, ptr %72, i32 0, i32 3
  %74 = load i8, ptr %73, align 1, !tbaa !24, !range !25, !noundef !26
  %75 = trunc i8 %74 to i1
  %76 = xor i1 %75, true
  br i1 %76, label %77, label %79

77:                                               ; preds = %71
  %78 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN10SerialPort5sleepEj(ptr noundef nonnull align 8 dereferenceable(292) %78, i32 noundef 10)
  br label %71, !llvm.loop !27

79:                                               ; preds = %71
  %80 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %80, ptr %2, align 8
  store i32 1, ptr %6, align 4
  br label %81

81:                                               ; preds = %79, %61
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  br label %82

82:                                               ; preds = %81, %41, %19
  call void @llvm.lifetime.end.p0(i64 60, ptr %5) #7
  br label %84

83:                                               ; preds = %1
  store ptr null, ptr %2, align 8
  store i32 1, ptr %6, align 4
  br label %84

84:                                               ; preds = %83, %82
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  %85 = load ptr, ptr %2, align 8
  ret ptr %85

86:                                               ; preds = %62
  %87 = load ptr, ptr %8, align 8
  %88 = load i32, ptr %9, align 4
  %89 = insertvalue { ptr, i32 } poison, ptr %87, 0
  %90 = insertvalue { ptr, i32 } %89, i32 %88, 1
  resume { ptr, i32 } %90
}

declare i32 @open(ptr noundef, i32 noundef, ...) #2

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

; Function Attrs: nounwind
declare i32 @tcgetattr(i32 noundef, ptr noundef) #4

declare i32 @close(i32 noundef) #2

; Function Attrs: nounwind
declare i32 @cfsetospeed(ptr noundef, i32 noundef) #4

; Function Attrs: nounwind
declare i32 @cfsetispeed(ptr noundef, i32 noundef) #4

; Function Attrs: nounwind
declare i32 @tcflush(i32 noundef, i32 noundef) #4

; Function Attrs: nounwind
declare i32 @tcsetattr(i32 noundef, i32 noundef, ptr noundef) #4

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #5

declare void @_ZN10SerialPortC1EiPKc(ptr noundef nonnull align 8 dereferenceable(292), i32 noundef, ptr noundef) unnamed_addr #2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #6

; Function Attrs: nounwind
declare i32 @pthread_create(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #4

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nobuiltin 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 #7 = { nounwind }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { builtin 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 = !{!12, !10, i64 0}
!12 = !{!"_ZTS7termios", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !7, i64 16, !7, i64 17, !10, i64 52, !10, i64 56}
!13 = !{!12, !10, i64 4}
!14 = !{!12, !10, i64 12}
!15 = !{!12, !10, i64 8}
!16 = !{!7, !7, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"vtable pointer", !8, i64 0}
!19 = !{!20, !20, i64 0}
!20 = !{!"long", !7, i64 0}
!21 = !{!22, !6, i64 16}
!22 = !{!"_ZTS10SerialPort", !10, i64 8, !23, i64 12, !23, i64 13, !6, i64 16, !10, i64 24, !23, i64 28, !10, i64 32, !7, i64 36}
!23 = !{!"bool", !7, i64 0}
!24 = !{!22, !23, i64 13}
!25 = !{i8 0, i8 2}
!26 = !{}
!27 = distinct !{!27, !28}
!28 = !{!"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.termios = type { i32, i32, i32, i32, i8, [32 x i8], i32, i32 }

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN10SerialPort12thread_startEPv(ptr noundef) #0 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10SerialPort5sleepEj(ptr noundef nonnull align 8 dereferenceable(292), i32 noundef) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN10SerialPort4openEPKc(ptr noundef %0) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %struct.termios, align 16
  %3 = alloca i64, align 8
  %4 = tail call i32 (ptr, i32, ...) @open(ptr noundef %0, i32 noundef 2050)
  %5 = icmp sgt i32 %4, -1
  br i1 %5, label %6, label %40

6:                                                ; preds = %1
  call void @llvm.lifetime.start.p0(i64 60, ptr nonnull %2) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(60) %2, i8 0, i64 60, i1 false)
  %7 = call i32 @tcgetattr(i32 noundef %4, ptr noundef nonnull %2) #8
  %.not = icmp eq i32 %7, 0
  br i1 %.not, label %10, label %8

8:                                                ; preds = %6
  %9 = call i32 @close(i32 noundef %4)
  br label %39

10:                                               ; preds = %6
  store <4 x i32> <i32 0, i32 0, i32 2224, i32 0>, ptr %2, align 16, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %2, i64 23
  store i8 1, ptr %11, align 1, !tbaa !9
  %12 = getelementptr inbounds i8, ptr %2, i64 22
  store i8 5, ptr %12, align 2, !tbaa !9
  %13 = call i32 @cfsetospeed(ptr noundef nonnull %2, i32 noundef 4098) #8
  %14 = call i32 @cfsetispeed(ptr noundef nonnull %2, i32 noundef 4098) #8
  %15 = call i32 @tcflush(i32 noundef %4, i32 noundef 2) #8
  %16 = call i32 @tcsetattr(i32 noundef %4, i32 noundef 0, ptr noundef nonnull %2) #8
  %.not19 = icmp eq i32 %16, 0
  br i1 %.not19, label %19, label %17

17:                                               ; preds = %10
  %18 = call i32 @close(i32 noundef %4)
  br label %39

19:                                               ; preds = %10
  %20 = call i32 @tcflush(i32 noundef %4, i32 noundef 2) #8
  %21 = call noalias noundef nonnull dereferenceable(296) ptr @_Znwm(i64 noundef 296) #9
  invoke void @_ZN10SerialPortC1EiPKc(ptr noundef nonnull align 8 dereferenceable(292) %21, i32 noundef %4, ptr noundef %0)
          to label %22 unwind label %28

22:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  %23 = call i32 @pthread_create(ptr noundef nonnull %3, ptr noundef null, ptr noundef nonnull @_ZN10SerialPort12thread_startEPv, ptr noundef nonnull %21) #8
  %.not20 = icmp eq i32 %23, 0
  br i1 %.not20, label %30, label %24

24:                                               ; preds = %22
  %25 = load ptr, ptr %21, align 8, !tbaa !10
  %26 = getelementptr inbounds i8, ptr %25, i64 8
  %27 = load ptr, ptr %26, align 8
  call void %27(ptr noundef nonnull align 8 dereferenceable(292) %21) #8
  br label %.loopexit

28:                                               ; preds = %19
  %29 = landingpad { ptr, i32 }
          cleanup
  call void @_ZdlPvm(ptr noundef nonnull %21, i64 noundef 296) #10
  call void @llvm.lifetime.end.p0(i64 60, ptr nonnull %2) #8
  resume { ptr, i32 } %29

30:                                               ; preds = %22
  %31 = load i64, ptr %3, align 8, !tbaa !12
  %32 = inttoptr i64 %31 to ptr
  %33 = getelementptr inbounds i8, ptr %21, i64 16
  store ptr %32, ptr %33, align 8, !tbaa !14
  %34 = getelementptr inbounds i8, ptr %21, i64 13
  %35 = load i8, ptr %34, align 1, !tbaa !18, !range !19, !noundef !20
  %36 = trunc nuw i8 %35 to i1
  br i1 %36, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %30, %.lr.ph
  call void @_ZN10SerialPort5sleepEj(ptr noundef nonnull align 8 dereferenceable(292) %21, i32 noundef 10)
  %37 = load i8, ptr %34, align 1, !tbaa !18, !range !19, !noundef !20
  %38 = trunc nuw i8 %37 to i1
  br i1 %38, label %.loopexit, label %.lr.ph, !llvm.loop !21

.loopexit:                                        ; preds = %.lr.ph, %30, %24
  %.0 = phi ptr [ null, %24 ], [ %21, %30 ], [ %21, %.lr.ph ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  br label %39

39:                                               ; preds = %.loopexit, %17, %8
  %.1 = phi ptr [ null, %8 ], [ null, %17 ], [ %.0, %.loopexit ]
  call void @llvm.lifetime.end.p0(i64 60, ptr nonnull %2) #8
  br label %40

40:                                               ; preds = %1, %39
  %.2 = phi ptr [ %.1, %39 ], [ null, %1 ]
  ret ptr %.2
}

; Function Attrs: nofree
declare noundef i32 @open(ptr nocapture noundef readonly, i32 noundef, ...) local_unnamed_addr #2

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

; Function Attrs: nounwind
declare i32 @tcgetattr(i32 noundef, ptr noundef) local_unnamed_addr #4

declare i32 @close(i32 noundef) local_unnamed_addr #5

; Function Attrs: nounwind
declare i32 @cfsetospeed(ptr noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: nounwind
declare i32 @cfsetispeed(ptr noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: nounwind
declare i32 @tcflush(i32 noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: nounwind
declare i32 @tcsetattr(i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #6

declare void @_ZN10SerialPortC1EiPKc(ptr noundef nonnull align 8 dereferenceable(292), i32 noundef, ptr noundef) unnamed_addr #5

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #7

; Function Attrs: nounwind
declare i32 @pthread_create(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nofree "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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "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 = { nobuiltin allocsize(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 #7 = { nobuiltin 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 #8 = { nounwind }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { builtin 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++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"vtable pointer", !8, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!15, !17, i64 16}
!15 = !{!"_ZTS10SerialPort", !6, i64 8, !16, i64 12, !16, i64 13, !17, i64 16, !6, i64 24, !16, i64 28, !6, i64 32, !7, i64 36}
!16 = !{!"bool", !7, i64 0}
!17 = !{!"any pointer", !7, i64 0}
!18 = !{!15, !16, i64 13}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass