; LLVM IR from AngoraFuzzer/Angora :: llvm_mode/dfsan_rt/sanitizer_common (sanitizer_posix)

; 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.__sanitizer::InternalScopedString" = type { %"class.__sanitizer::InternalScopedBuffer", i64 }
%"class.__sanitizer::InternalScopedBuffer" = type { ptr, i64 }
%"class.__sanitizer::MemoryMappingLayout" = type { %"struct.__sanitizer::ProcSelfMapsBuff", ptr }
%"struct.__sanitizer::ProcSelfMapsBuff" = type { ptr, i64, i64 }

; 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

declare void @_ZN11__sanitizer19MemoryMappingLayoutC1Eb(ptr noundef nonnull align 8 dereferenceable(32), i1 noundef zeroext) unnamed_addr #1

declare noundef zeroext i1 @_ZN11__sanitizer19MemoryMappingLayout4NextEPmS1_S1_PcmS1_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef) #1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind
declare void @_ZN11__sanitizer19MemoryMappingLayoutD1Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN11__sanitizer19GetCodeRangeForFileEPKcPmS2_(ptr noundef %0, ptr noundef %1, ptr noundef %2) #3 personality ptr @__gxx_personality_v0 {
  %4 = alloca i1, align 1
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca %"class.__sanitizer::InternalScopedString", align 8
  %13 = alloca %"class.__sanitizer::MemoryMappingLayout", align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #5
  call void @_ZN11__sanitizer20InternalScopedStringC2Em(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef 4096)
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #5
  invoke void @_ZN11__sanitizer19MemoryMappingLayoutC1Eb(ptr noundef nonnull align 8 dereferenceable(32) %13, i1 noundef zeroext false)
          to label %17 unwind label %41

17:                                               ; preds = %3
  br label %18

18:                                               ; preds = %49, %17
  %19 = invoke noundef ptr @_ZN11__sanitizer20InternalScopedBufferIcE4dataEv(ptr noundef nonnull align 8 dereferenceable(16) %12)
          to label %20 unwind label %45

20:                                               ; preds = %18
  %21 = invoke noundef i64 @_ZN11__sanitizer20InternalScopedBufferIcE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %12)
          to label %22 unwind label %45

22:                                               ; preds = %20
  %23 = invoke noundef zeroext i1 @_ZN11__sanitizer19MemoryMappingLayout4NextEPmS1_S1_PcmS1_(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %19, i64 noundef %21, ptr noundef %11)
          to label %24 unwind label %45

24:                                               ; preds = %22
  br i1 %23, label %25, label %50

25:                                               ; preds = %24
  %26 = load i64, ptr %11, align 8, !tbaa !9
  %27 = and i64 %26, 4
  %28 = icmp ne i64 %27, 0
  br i1 %28, label %29, label %49

29:                                               ; preds = %25
  %30 = load ptr, ptr %5, align 8, !tbaa !5
  %31 = invoke noundef ptr @_ZN11__sanitizer20InternalScopedBufferIcE4dataEv(ptr noundef nonnull align 8 dereferenceable(16) %12)
          to label %32 unwind label %45

32:                                               ; preds = %29
  %33 = invoke noundef i32 @_ZN11__sanitizer15internal_strcmpEPKcS1_(ptr noundef %30, ptr noundef %31)
          to label %34 unwind label %45

34:                                               ; preds = %32
  %35 = icmp eq i32 %33, 0
  br i1 %35, label %36, label %49

36:                                               ; preds = %34
  %37 = load i64, ptr %8, align 8, !tbaa !9
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  store i64 %37, ptr %38, align 8, !tbaa !9
  %39 = load i64, ptr %9, align 8, !tbaa !9
  %40 = load ptr, ptr %7, align 8, !tbaa !5
  store i64 %39, ptr %40, align 8, !tbaa !9
  store i1 true, ptr %4, align 1
  store i32 1, ptr %16, align 4
  br label %51

41:                                               ; preds = %3
  %42 = landingpad { ptr, i32 }
          cleanup
  %43 = extractvalue { ptr, i32 } %42, 0
  store ptr %43, ptr %14, align 8
  %44 = extractvalue { ptr, i32 } %42, 1
  store i32 %44, ptr %15, align 4
  br label %53

45:                                               ; preds = %32, %29, %22, %20, %18
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %14, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %15, align 4
  call void @_ZN11__sanitizer19MemoryMappingLayoutD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #5
  br label %53

49:                                               ; preds = %34, %25
  br label %18, !llvm.loop !11

50:                                               ; preds = %24
  store i1 false, ptr %4, align 1
  store i32 1, ptr %16, align 4
  br label %51

51:                                               ; preds = %50, %36
  call void @_ZN11__sanitizer19MemoryMappingLayoutD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #5
  call void @_ZN11__sanitizer20InternalScopedBufferIcED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  %52 = load i1, ptr %4, align 1
  ret i1 %52

53:                                               ; preds = %45, %41
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #5
  call void @_ZN11__sanitizer20InternalScopedBufferIcED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %54

54:                                               ; preds = %53
  %55 = load ptr, ptr %14, align 8
  %56 = load i32, ptr %15, align 4
  %57 = insertvalue { ptr, i32 } poison, ptr %55, 0
  %58 = insertvalue { ptr, i32 } %57, i32 %56, 1
  resume { ptr, i32 } %58
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11__sanitizer20InternalScopedStringC2Em(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN11__sanitizer20InternalScopedBufferIcE4dataEv(ptr noundef nonnull align 8 dereferenceable(16)) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN11__sanitizer20InternalScopedBufferIcE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16)) #4 align 2

declare noundef i32 @_ZN11__sanitizer15internal_strcmpEPKcS1_(ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11__sanitizer20InternalScopedBufferIcED2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #4 align 2

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 = { 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 #4 = { 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 #5 = { 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 = !{!"long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"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"

%"class.__sanitizer::InternalScopedString" = type { %"class.__sanitizer::InternalScopedBuffer", i64 }
%"class.__sanitizer::InternalScopedBuffer" = type { ptr, i64 }
%"class.__sanitizer::MemoryMappingLayout" = type { %"struct.__sanitizer::ProcSelfMapsBuff", ptr }
%"struct.__sanitizer::ProcSelfMapsBuff" = type { ptr, i64, i64 }

; 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

declare void @_ZN11__sanitizer19MemoryMappingLayoutC1Eb(ptr noundef nonnull align 8 dereferenceable(32), i1 noundef zeroext) unnamed_addr #1

declare noundef zeroext i1 @_ZN11__sanitizer19MemoryMappingLayout4NextEPmS1_S1_PcmS1_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind
declare void @_ZN11__sanitizer19MemoryMappingLayoutD1Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN11__sanitizer19GetCodeRangeForFileEPKcPmS2_(ptr noundef %0, ptr nocapture noundef writeonly %1, ptr nocapture noundef writeonly %2) local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca %"class.__sanitizer::InternalScopedString", align 8
  %9 = alloca %"class.__sanitizer::MemoryMappingLayout", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #5
  call void @_ZN11__sanitizer20InternalScopedStringC2Em(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef 4096)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #5
  invoke void @_ZN11__sanitizer19MemoryMappingLayoutC1Eb(ptr noundef nonnull align 8 dereferenceable(32) %9, i1 noundef zeroext false)
          to label %.preheader unwind label %25

.preheader:                                       ; preds = %3, %.preheader.backedge
  %10 = call noundef ptr @_ZN11__sanitizer20InternalScopedBufferIcE4dataEv(ptr noundef nonnull align 8 dereferenceable(16) %8)
  %11 = call noundef i64 @_ZN11__sanitizer20InternalScopedBufferIcE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %8)
  %12 = invoke noundef zeroext i1 @_ZN11__sanitizer19MemoryMappingLayout4NextEPmS1_S1_PcmS1_(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef nonnull %4, ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef %10, i64 noundef %11, ptr noundef nonnull %7)
          to label %13 unwind label %27

13:                                               ; preds = %.preheader
  br i1 %12, label %14, label %.loopexit

14:                                               ; preds = %13
  %15 = load i64, ptr %7, align 8, !tbaa !5
  %16 = and i64 %15, 4
  %.not = icmp eq i64 %16, 0
  br i1 %.not, label %.preheader.backedge, label %17

17:                                               ; preds = %14
  %18 = call noundef ptr @_ZN11__sanitizer20InternalScopedBufferIcE4dataEv(ptr noundef nonnull align 8 dereferenceable(16) %8)
  %19 = invoke noundef i32 @_ZN11__sanitizer15internal_strcmpEPKcS1_(ptr noundef %0, ptr noundef %18)
          to label %20 unwind label %27

20:                                               ; preds = %17
  %21 = icmp eq i32 %19, 0
  br i1 %21, label %22, label %.preheader.backedge

.preheader.backedge:                              ; preds = %20, %14
  br label %.preheader, !llvm.loop !9

22:                                               ; preds = %20
  %23 = load i64, ptr %4, align 8, !tbaa !5
  store i64 %23, ptr %1, align 8, !tbaa !5
  %24 = load i64, ptr %5, align 8, !tbaa !5
  store i64 %24, ptr %2, align 8, !tbaa !5
  br label %.loopexit

25:                                               ; preds = %3
  %26 = landingpad { ptr, i32 }
          cleanup
  br label %29

27:                                               ; preds = %17, %.preheader
  %28 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN11__sanitizer19MemoryMappingLayoutD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #5
  br label %29

.loopexit:                                        ; preds = %13, %22
  call void @_ZN11__sanitizer19MemoryMappingLayoutD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #5
  call void @_ZN11__sanitizer20InternalScopedBufferIcED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  ret i1 %12

29:                                               ; preds = %27, %25
  %.pn = phi { ptr, i32 } [ %28, %27 ], [ %26, %25 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #5
  call void @_ZN11__sanitizer20InternalScopedBufferIcED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  resume { ptr, i32 } %.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11__sanitizer20InternalScopedStringC2Em(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN11__sanitizer20InternalScopedBufferIcE4dataEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN11__sanitizer20InternalScopedBufferIcE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4 align 2

declare noundef i32 @_ZN11__sanitizer15internal_strcmpEPKcS1_(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11__sanitizer20InternalScopedBufferIcED2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #4 align 2

attributes #0 = { mustprogress 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 = { 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 #4 = { 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 #5 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass