; LLVM IR from facebook/redex :: service/constant-propagation (ObjectDomain)

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

@.str = external hidden unnamed_addr constant [11 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [4 x i8], align 1

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

; 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 nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRKN6sparta20FiniteAbstractDomainI11EscapeStateNS0_16BitVectorLatticeIS2_Lm4EvvEEN5boost14multiprecision6numberINS6_8backends15cpp_int_backendILj4ELj4ELNS6_16cpp_integer_typeE0ELNS6_18cpp_int_check_typeE0EvEELNS6_26expression_template_optionE0EEEXadL_ZN18escape_domain_impl7latticeEEEEE(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 1 dereferenceable(1) %1) #1 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #3
  %6 = load ptr, ptr %4, align 8, !tbaa !5
  %7 = call noundef i32 @_ZNK6sparta20FiniteAbstractDomainI11EscapeStateNS_16BitVectorLatticeIS1_Lm4EvvEEN5boost14multiprecision6numberINS5_8backends15cpp_int_backendILj4ELj4ELNS5_16cpp_integer_typeE0ELNS5_18cpp_int_check_typeE0EvEELNS5_26expression_template_optionE0EEEXadL_ZN18escape_domain_impl7latticeEEEE7elementEv(ptr noundef nonnull align 1 dereferenceable(1) %6)
  store i32 %7, ptr %5, align 4, !tbaa !9
  %8 = load i32, ptr %5, align 4, !tbaa !9
  switch i32 %8, label %21 [
    i32 0, label %9
    i32 1, label %12
    i32 2, label %15
    i32 3, label %18
  ]

9:                                                ; preds = %2
  %10 = load ptr, ptr %3, align 8, !tbaa !5
  %11 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef @.str)
  br label %21

12:                                               ; preds = %2
  %13 = load ptr, ptr %3, align 8, !tbaa !5
  %14 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef @.str.6)
  br label %21

15:                                               ; preds = %2
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  %17 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef @.str.7)
  br label %21

18:                                               ; preds = %2
  %19 = load ptr, ptr %3, align 8, !tbaa !5
  %20 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef @.str.8)
  br label %21

21:                                               ; preds = %18, %15, %12, %9, %2
  %22 = load ptr, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  ret ptr %22
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK6sparta20FiniteAbstractDomainI11EscapeStateNS_16BitVectorLatticeIS1_Lm4EvvEEN5boost14multiprecision6numberINS5_8backends15cpp_int_backendILj4ELj4ELNS5_16cpp_integer_typeE0ELNS5_18cpp_int_check_typeE0EvEELNS5_26expression_template_optionE0EEEXadL_ZN18escape_domain_impl7latticeEEEE7elementEv(ptr noundef nonnull align 1 dereferenceable(1)) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #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 = { inlinehint 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 #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 = !{!"_ZTS11EscapeState", !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"

@.str = external hidden unnamed_addr constant [11 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [4 x i8], align 1
@switch.table._ZlsRSoRKN6sparta20FiniteAbstractDomainI11EscapeStateNS0_16BitVectorLatticeIS2_Lm4EvvEEN5boost14multiprecision6numberINS6_8backends15cpp_int_backendILj4ELj4ELNS6_16cpp_integer_typeE0ELNS6_18cpp_int_check_typeE0EvEELNS6_26expression_template_optionE0EEEXadL_ZN18escape_domain_impl7latticeEEEEE = private unnamed_addr constant [4 x ptr] [ptr @.str, ptr @.str.6, ptr @.str.7, ptr @.str.8], align 8

; Function Attrs: mustprogress uwtable
define dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZlsRSoRKN6sparta20FiniteAbstractDomainI11EscapeStateNS0_16BitVectorLatticeIS2_Lm4EvvEEN5boost14multiprecision6numberINS6_8backends15cpp_int_backendILj4ELj4ELNS6_16cpp_integer_typeE0ELNS6_18cpp_int_check_typeE0EvEELNS6_26expression_template_optionE0EEEXadL_ZN18escape_domain_impl7latticeEEEEE(ptr noundef nonnull returned align 8 dereferenceable(8) %0, ptr noundef nonnull align 1 dereferenceable(1) %1) local_unnamed_addr #0 {
  %3 = tail call noundef i32 @_ZNK6sparta20FiniteAbstractDomainI11EscapeStateNS_16BitVectorLatticeIS1_Lm4EvvEEN5boost14multiprecision6numberINS5_8backends15cpp_int_backendILj4ELj4ELNS5_16cpp_integer_typeE0ELNS5_18cpp_int_check_typeE0EvEELNS5_26expression_template_optionE0EEEXadL_ZN18escape_domain_impl7latticeEEEE7elementEv(ptr noundef nonnull align 1 dereferenceable(1) %1)
  %4 = icmp ult i32 %3, 4
  br i1 %4, label %switch.lookup, label %7

switch.lookup:                                    ; preds = %2
  %5 = zext nneg i32 %3 to i64
  %switch.gep = getelementptr inbounds [4 x ptr], ptr @switch.table._ZlsRSoRKN6sparta20FiniteAbstractDomainI11EscapeStateNS0_16BitVectorLatticeIS2_Lm4EvvEEN5boost14multiprecision6numberINS6_8backends15cpp_int_backendILj4ELj4ELNS6_16cpp_integer_typeE0ELNS6_18cpp_int_check_typeE0EvEELNS6_26expression_template_optionE0EEEXadL_ZN18escape_domain_impl7latticeEEEEE, i64 0, i64 %5
  %switch.load = load ptr, ptr %switch.gep, align 8
  %6 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull %switch.load)
  br label %7

7:                                                ; preds = %2, %switch.lookup
  ret ptr %0
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK6sparta20FiniteAbstractDomainI11EscapeStateNS_16BitVectorLatticeIS1_Lm4EvvEEN5boost14multiprecision6numberINS5_8backends15cpp_int_backendILj4ELj4ELNS5_16cpp_integer_typeE0ELNS5_18cpp_int_check_typeE0EvEELNS5_26expression_template_optionE0EEEXadL_ZN18escape_domain_impl7latticeEEEE7elementEv(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #1

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 = { inlinehint 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" }

!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)"}


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