; LLVM IR from gem5/gem5 :: src/systemc/tests/systemc/misc/stars/star110089 (star110089)

; 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.lp_write_buf = type { %"class.sc_core::sc_module", %"class.sc_core::sc_in", %"class.sc_core::sc_in", %"class.sc_core::sc_in.13", %"class.sc_core::sc_in.13", %"class.sc_core::sc_in.21", %"class.sc_core::sc_out", %"class.sc_core::sc_out.36", %"class.sc_core::sc_out.45", %"class.sc_core::sc_inout.54", %"class.sc_core::sc_in.62", %"class.sc_core::sc_out.36", %"class.sc_core::sc_out.70", %"class.sc_core::sc_in.62", %"class.sc_core::sc_out.45", %"class.sc_core::sc_out.36", %"class.sc_core::sc_out.36", %"class.sc_core::sc_out.36" }
%"class.sc_core::sc_module" = type { %"class.sc_core::sc_object", %"class.sc_core::sc_process_host", %"class.sc_core::sc_sensitive", %"class.sc_core::sc_sensitive_pos", %"class.sc_core::sc_sensitive_neg", i8, ptr, i32, ptr, ptr }
%"class.sc_core::sc_object" = type { ptr, ptr, %"class.std::vector", %"class.std::vector.0", %"class.std::__cxx11::basic_string", ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<sc_core::sc_event *, std::allocator<sc_core::sc_event *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_event *, std::allocator<sc_core::sc_event *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_event *, std::allocator<sc_core::sc_event *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_event *, std::allocator<sc_core::sc_event *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<sc_core::sc_object *, std::allocator<sc_core::sc_object *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_object *, std::allocator<sc_core::sc_object *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_object *, std::allocator<sc_core::sc_object *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_object *, std::allocator<sc_core::sc_object *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.sc_core::sc_process_host" = type { ptr }
%"class.sc_core::sc_sensitive" = type { ptr, i32, ptr }
%"class.sc_core::sc_sensitive_pos" = type { ptr, i32, ptr }
%"class.sc_core::sc_sensitive_neg" = type { ptr, i32, ptr }
%"class.sc_core::sc_in" = type { %"class.sc_core::sc_port", ptr, ptr, ptr, ptr }
%"class.sc_core::sc_port" = type { %"class.sc_core::sc_port_b" }
%"class.sc_core::sc_port_b" = type { %"class.sc_core::sc_port_base", ptr, %"class.std::vector.8" }
%"class.sc_core::sc_port_base" = type { %"class.sc_core::sc_object", ptr }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<sc_core::sc_signal_in_if<bool> *, std::allocator<sc_core::sc_signal_in_if<bool> *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_signal_in_if<bool> *, std::allocator<sc_core::sc_signal_in_if<bool> *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_signal_in_if<bool> *, std::allocator<sc_core::sc_signal_in_if<bool> *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_signal_in_if<bool> *, std::allocator<sc_core::sc_signal_in_if<bool> *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.sc_core::sc_in.13" = type { %"class.sc_core::sc_port.14", ptr, ptr }
%"class.sc_core::sc_port.14" = type { %"class.sc_core::sc_port_b.15" }
%"class.sc_core::sc_port_b.15" = type { %"class.sc_core::sc_port_base", ptr, %"class.std::vector.16" }
%"class.std::vector.16" = type { %"struct.std::_Vector_base.17" }
%"struct.std::_Vector_base.17" = type { %"struct.std::_Vector_base<sc_core::sc_signal_in_if<unsigned int> *, std::allocator<sc_core::sc_signal_in_if<unsigned int> *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_signal_in_if<unsigned int> *, std::allocator<sc_core::sc_signal_in_if<unsigned int> *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_signal_in_if<unsigned int> *, std::allocator<sc_core::sc_signal_in_if<unsigned int> *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_signal_in_if<unsigned int> *, std::allocator<sc_core::sc_signal_in_if<unsigned int> *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.sc_core::sc_in.21" = type { %"class.sc_core::sc_port.22", ptr, ptr }
%"class.sc_core::sc_port.22" = type { %"class.sc_core::sc_port_b.23" }
%"class.sc_core::sc_port_b.23" = type { %"class.sc_core::sc_port_base", ptr, %"class.std::vector.24" }
%"class.std::vector.24" = type { %"struct.std::_Vector_base.25" }
%"struct.std::_Vector_base.25" = type { %"struct.std::_Vector_base<sc_core::sc_signal_in_if<int> *, std::allocator<sc_core::sc_signal_in_if<int> *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_signal_in_if<int> *, std::allocator<sc_core::sc_signal_in_if<int> *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_signal_in_if<int> *, std::allocator<sc_core::sc_signal_in_if<int> *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_signal_in_if<int> *, std::allocator<sc_core::sc_signal_in_if<int> *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.sc_core::sc_out" = type { %"class.sc_core::sc_inout" }
%"class.sc_core::sc_inout" = type { %"class.sc_core::sc_port.29", ptr, ptr, ptr }
%"class.sc_core::sc_port.29" = type { %"class.sc_core::sc_port_b.30" }
%"class.sc_core::sc_port_b.30" = type { %"class.sc_core::sc_port_base", ptr, %"class.std::vector.31" }
%"class.std::vector.31" = type { %"struct.std::_Vector_base.32" }
%"struct.std::_Vector_base.32" = type { %"struct.std::_Vector_base<sc_core::sc_signal_inout_if<int> *, std::allocator<sc_core::sc_signal_inout_if<int> *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_signal_inout_if<int> *, std::allocator<sc_core::sc_signal_inout_if<int> *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_signal_inout_if<int> *, std::allocator<sc_core::sc_signal_inout_if<int> *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_signal_inout_if<int> *, std::allocator<sc_core::sc_signal_inout_if<int> *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.sc_core::sc_inout.54" = type { %"class.sc_core::sc_port.55", ptr, ptr, ptr }
%"class.sc_core::sc_port.55" = type { %"class.sc_core::sc_port_b.56" }
%"class.sc_core::sc_port_b.56" = type { %"class.sc_core::sc_port_base", ptr, %"class.std::vector.57" }
%"class.std::vector.57" = type { %"struct.std::_Vector_base.58" }
%"struct.std::_Vector_base.58" = type { %"struct.std::_Vector_base<sc_core::sc_signal_inout_if<unsigned int> *, std::allocator<sc_core::sc_signal_inout_if<unsigned int> *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_signal_inout_if<unsigned int> *, std::allocator<sc_core::sc_signal_inout_if<unsigned int> *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_signal_inout_if<unsigned int> *, std::allocator<sc_core::sc_signal_inout_if<unsigned int> *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_signal_inout_if<unsigned int> *, std::allocator<sc_core::sc_signal_inout_if<unsigned int> *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.sc_core::sc_out.70" = type { %"class.sc_core::sc_inout.54" }
%"class.sc_core::sc_in.62" = type { %"class.sc_core::sc_port.63", ptr, ptr }
%"class.sc_core::sc_port.63" = type { %"class.sc_core::sc_port_b.64" }
%"class.sc_core::sc_port_b.64" = type { %"class.sc_core::sc_port_base", ptr, %"class.std::vector.65" }
%"class.std::vector.65" = type { %"struct.std::_Vector_base.66" }
%"struct.std::_Vector_base.66" = type { %"struct.std::_Vector_base<sc_core::sc_signal_in_if<char> *, std::allocator<sc_core::sc_signal_in_if<char> *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_signal_in_if<char> *, std::allocator<sc_core::sc_signal_in_if<char> *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_signal_in_if<char> *, std::allocator<sc_core::sc_signal_in_if<char> *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_signal_in_if<char> *, std::allocator<sc_core::sc_signal_in_if<char> *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.sc_core::sc_out.45" = type { %"class.sc_core::sc_inout.46" }
%"class.sc_core::sc_inout.46" = type { %"class.sc_core::sc_port.47", ptr, ptr, ptr }
%"class.sc_core::sc_port.47" = type { %"class.sc_core::sc_port_b.48" }
%"class.sc_core::sc_port_b.48" = type { %"class.sc_core::sc_port_base", ptr, %"class.std::vector.49" }
%"class.std::vector.49" = type { %"struct.std::_Vector_base.50" }
%"struct.std::_Vector_base.50" = type { %"struct.std::_Vector_base<sc_core::sc_signal_inout_if<char> *, std::allocator<sc_core::sc_signal_inout_if<char> *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_signal_inout_if<char> *, std::allocator<sc_core::sc_signal_inout_if<char> *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_signal_inout_if<char> *, std::allocator<sc_core::sc_signal_inout_if<char> *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_signal_inout_if<char> *, std::allocator<sc_core::sc_signal_inout_if<char> *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.sc_core::sc_out.36" = type { %"class.sc_core::sc_inout.37" }
%"class.sc_core::sc_inout.37" = type { %"class.sc_core::sc_port.38", ptr, ptr, ptr, ptr, ptr }
%"class.sc_core::sc_port.38" = type { %"class.sc_core::sc_port_b.39" }
%"class.sc_core::sc_port_b.39" = type { %"class.sc_core::sc_port_base", ptr, %"class.std::vector.40" }
%"class.std::vector.40" = type { %"struct.std::_Vector_base.41" }
%"struct.std::_Vector_base.41" = type { %"struct.std::_Vector_base<sc_core::sc_signal_inout_if<bool> *, std::allocator<sc_core::sc_signal_inout_if<bool> *>>::_Vector_impl" }
%"struct.std::_Vector_base<sc_core::sc_signal_inout_if<bool> *, std::allocator<sc_core::sc_signal_inout_if<bool> *>>::_Vector_impl" = type { %"struct.std::_Vector_base<sc_core::sc_signal_inout_if<bool> *, std::allocator<sc_core::sc_signal_inout_if<bool> *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<sc_core::sc_signal_inout_if<bool> *, std::allocator<sc_core::sc_signal_inout_if<bool> *>>::_Vector_impl_data" = type { ptr, ptr, ptr }

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7sc_core5sc_inIjEcvRKjEv(ptr noundef nonnull align 8 dereferenceable(168)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7sc_core5sc_inIiEcvRKiEv(ptr noundef nonnull align 8 dereferenceable(168)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(192) ptr @_ZN7sc_core6sc_outIbEaSERKb(ptr noundef nonnull align 8 dereferenceable(192), ptr noundef nonnull align 1 dereferenceable(1)) #1 align 2

; 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
declare dso_local void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232)) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN12lp_write_buf17lp_write_buf_bodyEv(ptr noundef nonnull align 8 dereferenceable(3280) %0) #1 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i8, align 1
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i8, align 1
  %9 = alloca i8, align 1
  store ptr %0, ptr %2, align 8, !tbaa !5
  %10 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #2
  store i32 0, ptr %3, align 4, !tbaa !9
  call void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %10)
  br label %11

11:                                               ; preds = %11, %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #2
  store i32 0, ptr %4, align 4, !tbaa !9
  %12 = getelementptr inbounds %struct.lp_write_buf, ptr %10, i32 0, i32 6
  %13 = call noundef nonnull align 8 dereferenceable(176) ptr @_ZN7sc_core6sc_outIiEaSERKi(ptr noundef nonnull align 8 dereferenceable(176) %12, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #2
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #2
  store i8 0, ptr %5, align 1, !tbaa !11
  %14 = getelementptr inbounds %struct.lp_write_buf, ptr %10, i32 0, i32 7
  %15 = call noundef nonnull align 8 dereferenceable(192) ptr @_ZN7sc_core6sc_outIbEaSERKb(ptr noundef nonnull align 8 dereferenceable(192) %14, ptr noundef nonnull align 1 dereferenceable(1) %5)
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #2
  %16 = getelementptr inbounds %struct.lp_write_buf, ptr %10, i32 0, i32 3
  %17 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7sc_core5sc_inIjEcvRKjEv(ptr noundef nonnull align 8 dereferenceable(168) %16)
  %18 = load i32, ptr %17, align 4, !tbaa !9
  %19 = getelementptr inbounds %struct.lp_write_buf, ptr %10, i32 0, i32 4
  %20 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7sc_core5sc_inIjEcvRKjEv(ptr noundef nonnull align 8 dereferenceable(168) %19)
  %21 = load i32, ptr %20, align 4, !tbaa !9
  %22 = getelementptr inbounds %struct.lp_write_buf, ptr %10, i32 0, i32 5
  %23 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7sc_core5sc_inIiEcvRKiEv(ptr noundef nonnull align 8 dereferenceable(168) %22)
  %24 = load i32, ptr %23, align 4, !tbaa !9
  %25 = call noundef i32 @_ZN12lp_write_buf14lp_write_buf_fEjji(ptr noundef nonnull align 8 dereferenceable(3280) %10, i32 noundef %18, i32 noundef %21, i32 noundef %24)
  store i32 %25, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #2
  %26 = load i32, ptr %6, align 4, !tbaa !9
  store i32 %26, ptr %7, align 4, !tbaa !9
  %27 = getelementptr inbounds %struct.lp_write_buf, ptr %10, i32 0, i32 6
  %28 = call noundef nonnull align 8 dereferenceable(176) ptr @_ZN7sc_core6sc_outIiEaSERKi(ptr noundef nonnull align 8 dereferenceable(176) %27, ptr noundef nonnull align 4 dereferenceable(4) %7)
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #2
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #2
  store i8 1, ptr %8, align 1, !tbaa !11
  %29 = getelementptr inbounds %struct.lp_write_buf, ptr %10, i32 0, i32 7
  %30 = call noundef nonnull align 8 dereferenceable(192) ptr @_ZN7sc_core6sc_outIbEaSERKb(ptr noundef nonnull align 8 dereferenceable(192) %29, ptr noundef nonnull align 1 dereferenceable(1) %8)
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #2
  call void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %10)
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #2
  store i8 0, ptr %9, align 1, !tbaa !11
  %31 = getelementptr inbounds %struct.lp_write_buf, ptr %10, i32 0, i32 7
  %32 = call noundef nonnull align 8 dereferenceable(192) ptr @_ZN7sc_core6sc_outIbEaSERKb(ptr noundef nonnull align 8 dereferenceable(192) %31, ptr noundef nonnull align 1 dereferenceable(1) %9)
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #2
  call void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %10)
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #2
  br label %11, !llvm.loop !13
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(176) ptr @_ZN7sc_core6sc_outIiEaSERKi(ptr noundef nonnull align 8 dereferenceable(176), ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN12lp_write_buf14lp_write_buf_fEjji(ptr noundef nonnull align 8 dereferenceable(3280), i32 noundef, i32 noundef, i32 noundef) #1 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 = { 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, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"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"

; 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 uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7sc_core5sc_inIjEcvRKjEv(ptr noundef nonnull align 8 dereferenceable(168)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7sc_core5sc_inIiEcvRKiEv(ptr noundef nonnull align 8 dereferenceable(168)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(192) ptr @_ZN7sc_core6sc_outIbEaSERKb(ptr noundef nonnull align 8 dereferenceable(192), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #1 align 2

; 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
declare dso_local void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress noreturn uwtable
define dso_local void @_ZN12lp_write_buf17lp_write_buf_bodyEv(ptr noundef nonnull align 8 dereferenceable(3280) %0) local_unnamed_addr #2 align 2 {
  %2 = alloca i32, align 4
  %3 = alloca i8, align 1
  %4 = alloca i32, align 4
  %5 = alloca i8, align 1
  %6 = alloca i8, align 1
  tail call void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %0)
  %7 = getelementptr inbounds i8, ptr %0, i64 1104
  %8 = getelementptr inbounds i8, ptr %0, i64 1280
  %9 = getelementptr inbounds i8, ptr %0, i64 600
  %10 = getelementptr inbounds i8, ptr %0, i64 768
  %11 = getelementptr inbounds i8, ptr %0, i64 936
  br label %12

12:                                               ; preds = %12, %1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #3
  store i32 0, ptr %2, align 4, !tbaa !5
  %13 = call noundef nonnull align 8 dereferenceable(176) ptr @_ZN7sc_core6sc_outIiEaSERKi(ptr noundef nonnull align 8 dereferenceable(176) %7, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #3
  store i8 0, ptr %3, align 1, !tbaa !9
  %14 = call noundef nonnull align 8 dereferenceable(192) ptr @_ZN7sc_core6sc_outIbEaSERKb(ptr noundef nonnull align 8 dereferenceable(192) %8, ptr noundef nonnull align 1 dereferenceable(1) %3)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #3
  %15 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7sc_core5sc_inIjEcvRKjEv(ptr noundef nonnull align 8 dereferenceable(168) %9)
  %16 = load i32, ptr %15, align 4, !tbaa !5
  %17 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7sc_core5sc_inIjEcvRKjEv(ptr noundef nonnull align 8 dereferenceable(168) %10)
  %18 = load i32, ptr %17, align 4, !tbaa !5
  %19 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK7sc_core5sc_inIiEcvRKiEv(ptr noundef nonnull align 8 dereferenceable(168) %11)
  %20 = load i32, ptr %19, align 4, !tbaa !5
  %21 = call noundef i32 @_ZN12lp_write_buf14lp_write_buf_fEjji(ptr noundef nonnull align 8 dereferenceable(3280) %0, i32 noundef %16, i32 noundef %18, i32 noundef %20)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #3
  store i32 %21, ptr %4, align 4, !tbaa !5
  %22 = call noundef nonnull align 8 dereferenceable(176) ptr @_ZN7sc_core6sc_outIiEaSERKi(ptr noundef nonnull align 8 dereferenceable(176) %7, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #3
  store i8 1, ptr %5, align 1, !tbaa !9
  %23 = call noundef nonnull align 8 dereferenceable(192) ptr @_ZN7sc_core6sc_outIbEaSERKb(ptr noundef nonnull align 8 dereferenceable(192) %8, ptr noundef nonnull align 1 dereferenceable(1) %5)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #3
  call void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %0)
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #3
  store i8 0, ptr %6, align 1, !tbaa !9
  %24 = call noundef nonnull align 8 dereferenceable(192) ptr @_ZN7sc_core6sc_outIbEaSERKb(ptr noundef nonnull align 8 dereferenceable(192) %8, ptr noundef nonnull align 1 dereferenceable(1) %6)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #3
  call void @_ZN7sc_core9sc_module4waitEv(ptr noundef nonnull align 8 dereferenceable(232) %0)
  br label %12, !llvm.loop !11
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(176) ptr @_ZN7sc_core6sc_outIiEaSERKi(ptr noundef nonnull align 8 dereferenceable(176), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN12lp_write_buf14lp_write_buf_fEjji(ptr noundef nonnull align 8 dereferenceable(3280), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #1 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 noreturn 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


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