; LLVM IR from facebook/redex :: libredex/IRAssembler.ll (ZN9assembler17field_from_s_exprERKN6sparta6s_exprE)

; 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.sparta::s_expr" = type { %"class.boost::intrusive_ptr" }
%"class.boost::intrusive_ptr" = type { ptr }
%"class.sparta::s_patn" = type { %"class.boost::intrusive_ptr.155" }
%"class.boost::intrusive_ptr.155" = type { ptr }
%"class.std::initializer_list.156" = type { ptr, i64 }
%"class.std::basic_string_view" = type { i64, 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] }

@.str.248 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.249 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.250 = external hidden unnamed_addr constant [37 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6sparta6s_exprD2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6sparta6s_exprC2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN9assembler21create_concrete_fieldERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK14DexAccessFlagsN6sparta6s_exprE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef) #4

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

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

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZN9assembler12_GLOBAL__N_118parse_access_flagsERKN6sparta6s_exprE(ptr noundef nonnull align 8 dereferenceable(8)) #4

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN9assembler17field_from_s_exprERKN6sparta6s_exprE(ptr noundef nonnull align 8 dereferenceable(8) %0) #4 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %"class.sparta::s_expr", align 8
  %4 = alloca %"class.sparta::s_patn", align 8
  %5 = alloca %"class.std::initializer_list.156", align 8
  %6 = alloca [1 x %"class.sparta::s_patn"], align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"class.std::basic_string_view", align 8
  %11 = alloca %"class.sparta::s_expr", align 8
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.sparta::s_patn", align 8
  %14 = alloca %"class.std::initializer_list.156", align 8
  %15 = alloca [2 x %"class.sparta::s_patn"], align 8
  %16 = alloca ptr, align 8
  %17 = alloca %"class.std::basic_string_view", align 8
  %18 = alloca i32, align 4
  %19 = alloca %"class.sparta::s_expr", align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  call void @_ZN6sparta6s_exprC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  store ptr %6, ptr %7, align 8
  invoke void @_ZN6sparta6s_patnC2EPKc(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef @.str.248)
          to label %20 unwind label %69

20:                                               ; preds = %1
  %21 = getelementptr inbounds %"class.std::initializer_list.156", ptr %5, i32 0, i32 0
  store ptr %6, ptr %21, align 8, !tbaa !9
  %22 = getelementptr inbounds %"class.std::initializer_list.156", ptr %5, i32 0, i32 1
  store i64 1, ptr %22, align 8, !tbaa !12
  %23 = getelementptr inbounds { ptr, i64 }, ptr %5, i32 0, i32 0
  %24 = load ptr, ptr %23, align 8
  %25 = getelementptr inbounds { ptr, i64 }, ptr %5, i32 0, i32 1
  %26 = load i64, ptr %25, align 8
  invoke void @_ZN6sparta6s_patnC2ESt16initializer_listIS0_ERNS_6s_exprE(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr %24, i64 %26, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %27 unwind label %80

27:                                               ; preds = %20
  %28 = load ptr, ptr %2, align 8, !tbaa !5
  call void @_ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef @.str.249) #5
  %29 = getelementptr inbounds { i64, ptr }, ptr %10, i32 0, i32 0
  %30 = load i64, ptr %29, align 8
  %31 = getelementptr inbounds { i64, ptr }, ptr %10, i32 0, i32 1
  %32 = load ptr, ptr %31, align 8
  invoke void @_ZN6sparta6s_patn10must_matchERKNS_6s_exprESt17basic_string_viewIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %28, i64 %30, ptr %32)
          to label %33 unwind label %84

33:                                               ; preds = %27
  call void @_ZN6sparta6s_patnD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  %34 = getelementptr inbounds [1 x %"class.sparta::s_patn"], ptr %6, i32 0, i32 0
  %35 = getelementptr inbounds %"class.sparta::s_patn", ptr %34, i64 1
  br label %36

36:                                               ; preds = %36, %33
  %37 = phi ptr [ %35, %33 ], [ %38, %36 ]
  %38 = getelementptr inbounds %"class.sparta::s_patn", ptr %37, i64 -1
  call void @_ZN6sparta6s_patnD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %38) #5
  %39 = icmp eq ptr %38, %34
  br i1 %39, label %40, label %36

40:                                               ; preds = %36
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  invoke void @_ZN6sparta6s_exprC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %41 unwind label %97

41:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #5
  store ptr %15, ptr %16, align 8
  invoke void @_ZN6sparta6s_patnC2ERNS_6s_exprE(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %42 unwind label %101

42:                                               ; preds = %41
  %43 = getelementptr inbounds %"class.sparta::s_patn", ptr %15, i64 1
  store ptr %43, ptr %16, align 8
  invoke void @_ZN6sparta6s_patnC2EPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(8) %43, ptr noundef %12)
          to label %44 unwind label %101

44:                                               ; preds = %42
  %45 = getelementptr inbounds %"class.std::initializer_list.156", ptr %14, i32 0, i32 0
  store ptr %15, ptr %45, align 8, !tbaa !9
  %46 = getelementptr inbounds %"class.std::initializer_list.156", ptr %14, i32 0, i32 1
  store i64 2, ptr %46, align 8, !tbaa !12
  %47 = getelementptr inbounds { ptr, i64 }, ptr %14, i32 0, i32 0
  %48 = load ptr, ptr %47, align 8
  %49 = getelementptr inbounds { ptr, i64 }, ptr %14, i32 0, i32 1
  %50 = load i64, ptr %49, align 8
  invoke void @_ZN6sparta6s_patnC2ESt16initializer_listIS0_ERNS_6s_exprE(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr %48, i64 %50, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %51 unwind label %112

51:                                               ; preds = %44
  call void @_ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef @.str.250) #5
  %52 = getelementptr inbounds { i64, ptr }, ptr %17, i32 0, i32 0
  %53 = load i64, ptr %52, align 8
  %54 = getelementptr inbounds { i64, ptr }, ptr %17, i32 0, i32 1
  %55 = load ptr, ptr %54, align 8
  invoke void @_ZN6sparta6s_patn10must_matchERKNS_6s_exprESt17basic_string_viewIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %3, i64 %53, ptr %55)
          to label %56 unwind label %116

56:                                               ; preds = %51
  call void @_ZN6sparta6s_patnD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #5
  %57 = getelementptr inbounds [2 x %"class.sparta::s_patn"], ptr %15, i32 0, i32 0
  %58 = getelementptr inbounds %"class.sparta::s_patn", ptr %57, i64 2
  br label %59

59:                                               ; preds = %59, %56
  %60 = phi ptr [ %58, %56 ], [ %61, %59 ]
  %61 = getelementptr inbounds %"class.sparta::s_patn", ptr %60, i64 -1
  call void @_ZN6sparta6s_patnD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %61) #5
  %62 = icmp eq ptr %61, %57
  br i1 %62, label %63, label %59

63:                                               ; preds = %59
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %64 = invoke noundef i32 @_ZN9assembler12_GLOBAL__N_118parse_access_flagsERKN6sparta6s_exprE(ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %65 unwind label %129

65:                                               ; preds = %63
  store i32 %64, ptr %18, align 4, !tbaa !13
  invoke void @_ZN6sparta6s_exprC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %66 unwind label %129

66:                                               ; preds = %65
  %67 = invoke noundef ptr @_ZN9assembler21create_concrete_fieldERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK14DexAccessFlagsN6sparta6s_exprE(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull align 4 dereferenceable(4) %18, ptr noundef %19)
          to label %68 unwind label %133

68:                                               ; preds = %66
  call void @_ZN6sparta6s_exprD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #5
  call void @_ZN6sparta6s_exprD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @_ZN6sparta6s_exprD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  ret ptr %67

69:                                               ; preds = %1
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %8, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %9, align 4
  %73 = load ptr, ptr %7, align 8
  %74 = icmp eq ptr %6, %73
  br i1 %74, label %79, label %75

75:                                               ; preds = %75, %69
  %76 = phi ptr [ %73, %69 ], [ %77, %75 ]
  %77 = getelementptr inbounds %"class.sparta::s_patn", ptr %76, i64 -1
  call void @_ZN6sparta6s_patnD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %77) #5
  %78 = icmp eq ptr %77, %6
  br i1 %78, label %79, label %75

79:                                               ; preds = %75, %69
  br label %96

80:                                               ; preds = %20
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %8, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %9, align 4
  br label %88

84:                                               ; preds = %27
  %85 = landingpad { ptr, i32 }
          cleanup
  %86 = extractvalue { ptr, i32 } %85, 0
  store ptr %86, ptr %8, align 8
  %87 = extractvalue { ptr, i32 } %85, 1
  store i32 %87, ptr %9, align 4
  call void @_ZN6sparta6s_patnD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  br label %88

88:                                               ; preds = %84, %80
  %89 = getelementptr inbounds [1 x %"class.sparta::s_patn"], ptr %6, i32 0, i32 0
  %90 = getelementptr inbounds %"class.sparta::s_patn", ptr %89, i64 1
  br label %91

91:                                               ; preds = %91, %88
  %92 = phi ptr [ %90, %88 ], [ %93, %91 ]
  %93 = getelementptr inbounds %"class.sparta::s_patn", ptr %92, i64 -1
  call void @_ZN6sparta6s_patnD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %93) #5
  %94 = icmp eq ptr %93, %89
  br i1 %94, label %95, label %91

95:                                               ; preds = %91
  br label %96

96:                                               ; preds = %95, %79
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  br label %140

97:                                               ; preds = %40
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %8, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %9, align 4
  br label %139

101:                                              ; preds = %42, %41
  %102 = landingpad { ptr, i32 }
          cleanup
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %8, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %9, align 4
  %105 = load ptr, ptr %16, align 8
  %106 = icmp eq ptr %15, %105
  br i1 %106, label %111, label %107

107:                                              ; preds = %107, %101
  %108 = phi ptr [ %105, %101 ], [ %109, %107 ]
  %109 = getelementptr inbounds %"class.sparta::s_patn", ptr %108, i64 -1
  call void @_ZN6sparta6s_patnD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %109) #5
  %110 = icmp eq ptr %109, %15
  br i1 %110, label %111, label %107

111:                                              ; preds = %107, %101
  br label %128

112:                                              ; preds = %44
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %8, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %9, align 4
  br label %120

116:                                              ; preds = %51
  %117 = landingpad { ptr, i32 }
          cleanup
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %8, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %9, align 4
  call void @_ZN6sparta6s_patnD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #5
  br label %120

120:                                              ; preds = %116, %112
  %121 = getelementptr inbounds [2 x %"class.sparta::s_patn"], ptr %15, i32 0, i32 0
  %122 = getelementptr inbounds %"class.sparta::s_patn", ptr %121, i64 2
  br label %123

123:                                              ; preds = %123, %120
  %124 = phi ptr [ %122, %120 ], [ %125, %123 ]
  %125 = getelementptr inbounds %"class.sparta::s_patn", ptr %124, i64 -1
  call void @_ZN6sparta6s_patnD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %125) #5
  %126 = icmp eq ptr %125, %121
  br i1 %126, label %127, label %123

127:                                              ; preds = %123
  br label %128

128:                                              ; preds = %127, %111
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %138

129:                                              ; preds = %65, %63
  %130 = landingpad { ptr, i32 }
          cleanup
  %131 = extractvalue { ptr, i32 } %130, 0
  store ptr %131, ptr %8, align 8
  %132 = extractvalue { ptr, i32 } %130, 1
  store i32 %132, ptr %9, align 4
  br label %137

133:                                              ; preds = %66
  %134 = landingpad { ptr, i32 }
          cleanup
  %135 = extractvalue { ptr, i32 } %134, 0
  store ptr %135, ptr %8, align 8
  %136 = extractvalue { ptr, i32 } %134, 1
  store i32 %136, ptr %9, align 4
  call void @_ZN6sparta6s_exprD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %19) #5
  br label %137

137:                                              ; preds = %133, %129
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %138

138:                                              ; preds = %137, %128
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #5
  call void @_ZN6sparta6s_exprD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #5
  br label %139

139:                                              ; preds = %138, %97
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %140

140:                                              ; preds = %139, %96
  call void @_ZN6sparta6s_exprD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  br label %141

141:                                              ; preds = %140
  %142 = load ptr, ptr %8, align 8
  %143 = load i32, ptr %9, align 4
  %144 = insertvalue { ptr, i32 } poison, ptr %142, 0
  %145 = insertvalue { ptr, i32 } %144, i32 %143, 1
  resume { ptr, i32 } %145
}

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { inlinehint 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 = { 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 #4 = { 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 #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, !6, i64 0}
!10 = !{!"_ZTSSt16initializer_listIN6sparta6s_patnEE", !6, i64 0, !11, i64 8}
!11 = !{!"long", !7, i64 0}
!12 = !{!10, !11, i64 8}
!13 = !{!14, !14, i64 0}
!14 = !{!"_ZTS14DexAccessFlags", !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"

%"class.sparta::s_expr" = type { %"class.boost::intrusive_ptr" }
%"class.boost::intrusive_ptr" = type { ptr }
%"class.sparta::s_patn" = type { %"class.boost::intrusive_ptr.155" }
%"class.boost::intrusive_ptr.155" = type { ptr }
%"class.std::basic_string_view" = type { i64, 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] }

@.str.248 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.249 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.250 = external hidden unnamed_addr constant [37 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; 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 nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) 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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6sparta6s_exprD2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6sparta6s_exprC2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3 align 2

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN6sparta6s_patn10must_matchERKNS_6s_exprESt17basic_string_viewIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), i64, ptr) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN9assembler21create_concrete_fieldERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK14DexAccessFlagsN6sparta6s_exprE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef) local_unnamed_addr #4

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

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

; Function Attrs: mustprogress uwtable
declare hidden noundef i32 @_ZN9assembler12_GLOBAL__N_118parse_access_flagsERKN6sparta6s_exprE(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_ZN9assembler17field_from_s_exprERKN6sparta6s_exprE(ptr noundef nonnull align 8 dereferenceable(8) %0) local_unnamed_addr #4 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.sparta::s_expr", align 8
  %3 = alloca %"class.sparta::s_patn", align 8
  %4 = alloca [1 x %"class.sparta::s_patn"], align 8
  %5 = alloca %"class.std::basic_string_view", align 8
  %6 = alloca %"class.sparta::s_expr", align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.sparta::s_patn", align 8
  %9 = alloca [2 x %"class.sparta::s_patn"], align 8
  %10 = alloca %"class.std::basic_string_view", align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.sparta::s_expr", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  call void @_ZN6sparta6s_exprC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %2)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  invoke void @_ZN6sparta6s_patnC2EPKc(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull @.str.248)
          to label %13 unwind label %35

13:                                               ; preds = %1
  invoke void @_ZN6sparta6s_patnC2ESt16initializer_listIS0_ERNS_6s_exprE(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr nonnull %4, i64 1, ptr noundef nonnull align 8 dereferenceable(8) %2)
          to label %14 unwind label %37

14:                                               ; preds = %13
  call void @_ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef @.str.249) #5
  %15 = load i64, ptr %5, align 8
  %16 = getelementptr inbounds i8, ptr %5, i64 8
  %17 = load ptr, ptr %16, align 8
  invoke void @_ZN6sparta6s_patn10must_matchERKNS_6s_exprESt17basic_string_viewIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %0, i64 %15, ptr %17)
          to label %18 unwind label %39

18:                                               ; preds = %14
  call void @_ZN6sparta6s_patnD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  call void @_ZN6sparta6s_patnD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #5
  invoke void @_ZN6sparta6s_exprC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %19 unwind label %41

19:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #5
  invoke void @_ZN6sparta6s_patnC2ERNS_6s_exprE(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %21 unwind label %.thread

.thread:                                          ; preds = %19
  %20 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit

21:                                               ; preds = %19
  %22 = getelementptr inbounds i8, ptr %9, i64 8
  invoke void @_ZN6sparta6s_patnC2EPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull %7)
          to label %23 unwind label %.loopexit.loopexit30

23:                                               ; preds = %21
  invoke void @_ZN6sparta6s_patnC2ESt16initializer_listIS0_ERNS_6s_exprE(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr nonnull %9, i64 2, ptr noundef nonnull align 8 dereferenceable(8) %2)
          to label %24 unwind label %44

24:                                               ; preds = %23
  call void @_ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef @.str.250) #5
  %25 = load i64, ptr %10, align 8
  %26 = getelementptr inbounds i8, ptr %10, i64 8
  %27 = load ptr, ptr %26, align 8
  invoke void @_ZN6sparta6s_patn10must_matchERKNS_6s_exprESt17basic_string_viewIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %2, i64 %25, ptr %27)
          to label %28 unwind label %46

28:                                               ; preds = %24
  call void @_ZN6sparta6s_patnD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  %29 = getelementptr inbounds i8, ptr %9, i64 8
  call void @_ZN6sparta6s_patnD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %29) #5
  call void @_ZN6sparta6s_patnD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #5
  %30 = invoke noundef i32 @_ZN9assembler12_GLOBAL__N_118parse_access_flagsERKN6sparta6s_exprE(ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %31 unwind label %49

31:                                               ; preds = %28
  store i32 %30, ptr %11, align 4, !tbaa !5
  invoke void @_ZN6sparta6s_exprC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %2)
          to label %32 unwind label %49

32:                                               ; preds = %31
  %33 = invoke noundef ptr @_ZN9assembler21create_concrete_fieldERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERK14DexAccessFlagsN6sparta6s_exprE(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull %12)
          to label %34 unwind label %51

34:                                               ; preds = %32
  call void @_ZN6sparta6s_exprD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  call void @_ZN6sparta6s_exprD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  call void @_ZN6sparta6s_exprD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  ret ptr %33

35:                                               ; preds = %1
  %36 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit29

37:                                               ; preds = %13
  %38 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit29.loopexit

39:                                               ; preds = %14
  %40 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6sparta6s_patnD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  br label %.loopexit29.loopexit

.loopexit29.loopexit:                             ; preds = %39, %37
  %.pn = phi { ptr, i32 } [ %40, %39 ], [ %38, %37 ]
  call void @_ZN6sparta6s_patnD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  br label %.loopexit29

.loopexit29:                                      ; preds = %.loopexit29.loopexit, %35
  %.pn.pn = phi { ptr, i32 } [ %36, %35 ], [ %.pn, %.loopexit29.loopexit ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  br label %56

41:                                               ; preds = %18
  %42 = landingpad { ptr, i32 }
          cleanup
  br label %55

.loopexit.loopexit30:                             ; preds = %21
  %43 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6sparta6s_patnD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  br label %.loopexit

44:                                               ; preds = %23
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.loopexit

46:                                               ; preds = %24
  %47 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6sparta6s_patnD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  br label %.loopexit.loopexit

.loopexit.loopexit:                               ; preds = %46, %44
  %.pn19 = phi { ptr, i32 } [ %47, %46 ], [ %45, %44 ]
  %48 = getelementptr inbounds i8, ptr %9, i64 8
  call void @_ZN6sparta6s_patnD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %48) #5
  call void @_ZN6sparta6s_patnD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit30, %.loopexit.loopexit, %.thread
  %.pn19.pn = phi { ptr, i32 } [ %20, %.thread ], [ %.pn19, %.loopexit.loopexit ], [ %43, %.loopexit.loopexit30 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  br label %54

49:                                               ; preds = %31, %28
  %50 = landingpad { ptr, i32 }
          cleanup
  br label %53

51:                                               ; preds = %32
  %52 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6sparta6s_exprD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #5
  br label %53

53:                                               ; preds = %51, %49
  %.pn22 = phi { ptr, i32 } [ %52, %51 ], [ %50, %49 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #5
  br label %54

54:                                               ; preds = %53, %.loopexit
  %.pn22.pn = phi { ptr, i32 } [ %.pn22, %53 ], [ %.pn19.pn, %.loopexit ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  call void @_ZN6sparta6s_exprD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #5
  br label %55

55:                                               ; preds = %54, %41
  %.pn22.pn.pn = phi { ptr, i32 } [ %.pn22.pn, %54 ], [ %42, %41 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  br label %56

56:                                               ; preds = %55, %.loopexit29
  %.pn22.pn.pn.pn = phi { ptr, i32 } [ %.pn22.pn.pn, %55 ], [ %.pn.pn, %.loopexit29 ]
  call void @_ZN6sparta6s_exprD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  resume { ptr, i32 } %.pn22.pn.pn.pn
}

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { inlinehint 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 = { 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 #4 = { 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 #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 = !{!"_ZTS14DexAccessFlags", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopSimplifyPass,SROAPass,SimplifyCFGPass