; LLVM IR from devantler/software-engineering-f22-shared :: IOT/BudgetManagementExcercise-03-28/ESP-Project/components/components/nghttp (get)

; 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.mrb_value = type { %union.anon, i32 }
%union.anon = type { double }
%struct.mrb_state = type { ptr, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, %struct.mrb_gc, i32, ptr, [256 x i32], i64, [8 x i8], ptr, ptr, ptr, ptr, ptr, ptr, i16, i16 }
%struct.mrb_gc = type { ptr, ptr, ptr, i64, ptr, i32, i32, i32, i32, ptr, ptr, i64, i64, i32, i32, i8, i64 }
%struct.mrb_context = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i16, ptr, i16, i16, i32, i8, ptr }
%struct.mrb_callinfo = type { i32, ptr, ptr, i16, i16, ptr, ptr, ptr, i32, i32, ptr }
%struct.RProc = type { i32, ptr, ptr, %union.anon.0, ptr, %union.anon.1 }
%union.anon.0 = type { ptr }
%union.anon.1 = type { ptr }
%struct.REnv = type { i32, ptr, ptr, ptr, ptr, i32 }
%struct.RClass = type { i32, ptr, ptr, ptr, ptr, ptr }

@.str.8 = external hidden unnamed_addr constant [13 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: nounwind uwtable
declare hidden zeroext i8 @iv_get(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

declare i32 @mrb_intern_static(ptr noundef, ptr noundef, i64 noundef) #3

; Function Attrs: nounwind uwtable
declare hidden { i64, i32 } @const_get(ptr noundef, ptr noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
define dso_local { i64, i32 } @mrb_vm_const_get(ptr noundef %0, i32 noundef %1) #1 {
  %3 = alloca %struct.mrb_value, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %struct.mrb_value, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %struct.mrb_value, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %12 = load ptr, ptr %4, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.mrb_state, ptr %12, i32 0, i32 4
  %14 = load ptr, ptr %13, align 8, !tbaa !11
  %15 = getelementptr inbounds %struct.mrb_context, ptr %14, i32 0, i32 4
  %16 = load ptr, ptr %15, align 8, !tbaa !16
  %17 = getelementptr inbounds %struct.mrb_callinfo, ptr %16, i32 0, i32 1
  %18 = load ptr, ptr %17, align 8, !tbaa !18
  %19 = load i32, ptr %18, align 8
  %20 = lshr i32 %19, 11
  %21 = and i32 %20, 1024
  %22 = icmp ne i32 %21, 0
  br i1 %22, label %23, label %35

23:                                               ; preds = %2
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.mrb_state, ptr %24, i32 0, i32 4
  %26 = load ptr, ptr %25, align 8, !tbaa !11
  %27 = getelementptr inbounds %struct.mrb_context, ptr %26, i32 0, i32 4
  %28 = load ptr, ptr %27, align 8, !tbaa !16
  %29 = getelementptr inbounds %struct.mrb_callinfo, ptr %28, i32 0, i32 1
  %30 = load ptr, ptr %29, align 8, !tbaa !18
  %31 = getelementptr inbounds %struct.RProc, ptr %30, i32 0, i32 5
  %32 = load ptr, ptr %31, align 8, !tbaa !20
  %33 = getelementptr inbounds %struct.REnv, ptr %32, i32 0, i32 1
  %34 = load ptr, ptr %33, align 8, !tbaa !21
  br label %45

35:                                               ; preds = %2
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.mrb_state, ptr %36, i32 0, i32 4
  %38 = load ptr, ptr %37, align 8, !tbaa !11
  %39 = getelementptr inbounds %struct.mrb_context, ptr %38, i32 0, i32 4
  %40 = load ptr, ptr %39, align 8, !tbaa !16
  %41 = getelementptr inbounds %struct.mrb_callinfo, ptr %40, i32 0, i32 1
  %42 = load ptr, ptr %41, align 8, !tbaa !18
  %43 = getelementptr inbounds %struct.RProc, ptr %42, i32 0, i32 5
  %44 = load ptr, ptr %43, align 8, !tbaa !20
  br label %45

45:                                               ; preds = %35, %23
  %46 = phi ptr [ %34, %23 ], [ %44, %35 ]
  store ptr %46, ptr %6, align 8, !tbaa !5
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  %48 = load ptr, ptr %6, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.RClass, ptr %48, i32 0, i32 3
  %50 = load ptr, ptr %49, align 8, !tbaa !23
  %51 = load i32, ptr %5, align 4, !tbaa !9
  %52 = call zeroext i8 @iv_get(ptr noundef %47, ptr noundef %50, i32 noundef %51, ptr noundef %8)
  %53 = icmp ne i8 %52, 0
  br i1 %53, label %54, label %55

54:                                               ; preds = %45
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %3, ptr align 8 %8, i64 16, i1 false), !tbaa.struct !25
  store i32 1, ptr %10, align 4
  br label %152

55:                                               ; preds = %45
  %56 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %56, ptr %7, align 8, !tbaa !5
  br label %57

57:                                               ; preds = %82, %55
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = icmp ne ptr %58, null
  br i1 %59, label %60, label %65

60:                                               ; preds = %57
  %61 = load ptr, ptr %7, align 8, !tbaa !5
  %62 = load i32, ptr %61, align 8
  %63 = and i32 %62, 255
  %64 = icmp eq i32 %63, 12
  br label %65

65:                                               ; preds = %60, %57
  %66 = phi i1 [ false, %57 ], [ %64, %60 ]
  br i1 %66, label %67, label %83

67:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #4
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  %69 = load ptr, ptr %7, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.RClass, ptr %69, i32 0, i32 3
  %71 = load ptr, ptr %70, align 8, !tbaa !23
  %72 = load ptr, ptr %4, align 8, !tbaa !5
  %73 = call i32 @mrb_intern_static(ptr noundef %72, ptr noundef @.str.8, i64 noundef 12)
  %74 = call zeroext i8 @iv_get(ptr noundef %68, ptr noundef %71, i32 noundef %73, ptr noundef %11)
  %75 = icmp ne i8 %74, 0
  br i1 %75, label %77, label %76

76:                                               ; preds = %67
  store ptr null, ptr %7, align 8, !tbaa !5
  store i32 3, ptr %10, align 4
  br label %80

77:                                               ; preds = %67
  %78 = getelementptr inbounds %struct.mrb_value, ptr %11, i32 0, i32 0
  %79 = load ptr, ptr %78, align 8, !tbaa !20
  store ptr %79, ptr %7, align 8, !tbaa !5
  store i32 0, ptr %10, align 4
  br label %80

80:                                               ; preds = %77, %76
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #4
  %81 = load i32, ptr %10, align 4
  switch i32 %81, label %154 [
    i32 0, label %82
    i32 3, label %83
  ]

82:                                               ; preds = %80
  br label %57, !llvm.loop !26

83:                                               ; preds = %80, %65
  %84 = load ptr, ptr %7, align 8, !tbaa !5
  %85 = icmp ne ptr %84, null
  br i1 %85, label %86, label %98

86:                                               ; preds = %83
  %87 = load ptr, ptr %7, align 8, !tbaa !5
  %88 = load i32, ptr %87, align 8
  %89 = and i32 %88, 255
  %90 = icmp eq i32 %89, 9
  br i1 %90, label %96, label %91

91:                                               ; preds = %86
  %92 = load ptr, ptr %7, align 8, !tbaa !5
  %93 = load i32, ptr %92, align 8
  %94 = and i32 %93, 255
  %95 = icmp eq i32 %94, 10
  br i1 %95, label %96, label %98

96:                                               ; preds = %91, %86
  %97 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %97, ptr %6, align 8, !tbaa !5
  br label %98

98:                                               ; preds = %96, %91, %83
  %99 = load ptr, ptr %4, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.mrb_state, ptr %99, i32 0, i32 4
  %101 = load ptr, ptr %100, align 8, !tbaa !11
  %102 = getelementptr inbounds %struct.mrb_context, ptr %101, i32 0, i32 4
  %103 = load ptr, ptr %102, align 8, !tbaa !16
  %104 = getelementptr inbounds %struct.mrb_callinfo, ptr %103, i32 0, i32 1
  %105 = load ptr, ptr %104, align 8, !tbaa !18
  store ptr %105, ptr %9, align 8, !tbaa !5
  br label %106

106:                                              ; preds = %139, %98
  %107 = load ptr, ptr %9, align 8, !tbaa !5
  %108 = icmp ne ptr %107, null
  br i1 %108, label %109, label %143

109:                                              ; preds = %106
  %110 = load ptr, ptr %9, align 8, !tbaa !5
  %111 = load i32, ptr %110, align 8
  %112 = lshr i32 %111, 11
  %113 = and i32 %112, 1024
  %114 = icmp ne i32 %113, 0
  br i1 %114, label %115, label %121

115:                                              ; preds = %109
  %116 = load ptr, ptr %9, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.RProc, ptr %116, i32 0, i32 5
  %118 = load ptr, ptr %117, align 8, !tbaa !20
  %119 = getelementptr inbounds %struct.REnv, ptr %118, i32 0, i32 1
  %120 = load ptr, ptr %119, align 8, !tbaa !21
  br label %125

121:                                              ; preds = %109
  %122 = load ptr, ptr %9, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.RProc, ptr %122, i32 0, i32 5
  %124 = load ptr, ptr %123, align 8, !tbaa !20
  br label %125

125:                                              ; preds = %121, %115
  %126 = phi ptr [ %120, %115 ], [ %124, %121 ]
  store ptr %126, ptr %7, align 8, !tbaa !5
  %127 = load ptr, ptr %7, align 8, !tbaa !5
  %128 = icmp ne ptr %127, null
  br i1 %128, label %129, label %139

129:                                              ; preds = %125
  %130 = load ptr, ptr %4, align 8, !tbaa !5
  %131 = load ptr, ptr %7, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.RClass, ptr %131, i32 0, i32 3
  %133 = load ptr, ptr %132, align 8, !tbaa !23
  %134 = load i32, ptr %5, align 4, !tbaa !9
  %135 = call zeroext i8 @iv_get(ptr noundef %130, ptr noundef %133, i32 noundef %134, ptr noundef %8)
  %136 = zext i8 %135 to i32
  %137 = icmp ne i32 %136, 0
  br i1 %137, label %138, label %139

138:                                              ; preds = %129
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %3, ptr align 8 %8, i64 16, i1 false), !tbaa.struct !25
  store i32 1, ptr %10, align 4
  br label %152

139:                                              ; preds = %129, %125
  %140 = load ptr, ptr %9, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.RProc, ptr %140, i32 0, i32 4
  %142 = load ptr, ptr %141, align 8, !tbaa !28
  store ptr %142, ptr %9, align 8, !tbaa !5
  br label %106, !llvm.loop !30

143:                                              ; preds = %106
  %144 = load ptr, ptr %4, align 8, !tbaa !5
  %145 = load ptr, ptr %6, align 8, !tbaa !5
  %146 = load i32, ptr %5, align 4, !tbaa !9
  %147 = call { i64, i32 } @const_get(ptr noundef %144, ptr noundef %145, i32 noundef %146)
  %148 = getelementptr inbounds { i64, i32 }, ptr %3, i32 0, i32 0
  %149 = extractvalue { i64, i32 } %147, 0
  store i64 %149, ptr %148, align 8
  %150 = getelementptr inbounds { i64, i32 }, ptr %3, i32 0, i32 1
  %151 = extractvalue { i64, i32 } %147, 1
  store i32 %151, ptr %150, align 8
  store i32 1, ptr %10, align 4
  br label %152

152:                                              ; preds = %143, %138, %54
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  %153 = load { i64, i32 }, ptr %3, align 8
  ret { i64, i32 } %153

154:                                              ; preds = %80
  unreachable
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { "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 = { 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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 32}
!12 = !{!"mrb_state", !6, i64 0, !10, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !13, i64 200, !10, i64 312, !6, i64 320, !7, i64 328, !14, i64 1352, !7, i64 1360, !6, i64 1368, !6, i64 1376, !6, i64 1384, !6, i64 1392, !6, i64 1400, !6, i64 1408, !15, i64 1416, !15, i64 1418}
!13 = !{!"mrb_gc", !6, i64 0, !6, i64 8, !6, i64 16, !14, i64 24, !6, i64 32, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !6, i64 56, !6, i64 64, !14, i64 72, !14, i64 80, !10, i64 88, !10, i64 92, !7, i64 96, !7, i64 96, !7, i64 96, !7, i64 96, !7, i64 96, !14, i64 104}
!14 = !{!"long", !7, i64 0}
!15 = !{!"short", !7, i64 0}
!16 = !{!17, !6, i64 32}
!17 = !{!"mrb_context", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !15, i64 64, !6, i64 72, !15, i64 80, !15, i64 82, !10, i64 84, !7, i64 88, !6, i64 96}
!18 = !{!19, !6, i64 8}
!19 = !{!"", !10, i64 0, !6, i64 8, !6, i64 16, !15, i64 24, !15, i64 26, !6, i64 32, !6, i64 40, !6, i64 48, !10, i64 56, !10, i64 60, !6, i64 64}
!20 = !{!7, !7, i64 0}
!21 = !{!22, !6, i64 8}
!22 = !{!"REnv", !10, i64 0, !10, i64 1, !10, i64 1, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !10, i64 40}
!23 = !{!24, !6, i64 24}
!24 = !{!"RClass", !10, i64 0, !10, i64 1, !10, i64 1, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!25 = !{i64 0, i64 8, !20, i64 8, i64 4, !9}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = !{!29, !6, i64 32}
!29 = !{!"RProc", !10, i64 0, !10, i64 1, !10, i64 1, !6, i64 8, !6, i64 16, !7, i64 24, !6, i64 32, !7, i64 40}
!30 = distinct !{!30, !27}


; 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.mrb_value = type { %union.anon, i32 }
%union.anon = type { double }

@.str.8 = external hidden unnamed_addr constant [13 x i8], align 1

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

; Function Attrs: nounwind uwtable
declare hidden zeroext i8 @iv_get(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

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

declare i32 @mrb_intern_static(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare hidden { i64, i32 } @const_get(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local { i64, i32 } @mrb_vm_const_get(ptr noundef %0, i32 noundef %1) local_unnamed_addr #1 {
  %3 = alloca %struct.mrb_value, align 8
  %4 = alloca %struct.mrb_value, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #3
  %5 = getelementptr inbounds i8, ptr %0, i64 32
  %6 = load ptr, ptr %5, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %6, i64 32
  %8 = load ptr, ptr %7, align 8, !tbaa !14
  %9 = getelementptr inbounds i8, ptr %8, i64 8
  %10 = load ptr, ptr %9, align 8, !tbaa !16
  %11 = load i32, ptr %10, align 8
  %12 = and i32 %11, 2097152
  %.not = icmp eq i32 %12, 0
  %13 = getelementptr inbounds i8, ptr %10, i64 40
  br i1 %.not, label %17, label %14

14:                                               ; preds = %2
  %15 = load ptr, ptr %13, align 8, !tbaa !18
  %16 = getelementptr inbounds i8, ptr %15, i64 8
  br label %17

17:                                               ; preds = %2, %14
  %.in = phi ptr [ %16, %14 ], [ %13, %2 ]
  %18 = load ptr, ptr %.in, align 8, !tbaa !18
  %19 = getelementptr inbounds i8, ptr %18, i64 24
  %20 = load ptr, ptr %19, align 8, !tbaa !19
  %21 = call zeroext i8 @iv_get(ptr noundef nonnull %0, ptr noundef %20, i32 noundef %1, ptr noundef nonnull %3)
  %.not39 = icmp eq i8 %21, 0
  br i1 %.not39, label %.preheader, label %22

22:                                               ; preds = %17
  %.sroa.0.0.copyload = load i64, ptr %3, align 8, !tbaa !18
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %3, i64 8
  %.sroa.4.0.copyload = load i32, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !21
  br label %55

.preheader:                                       ; preds = %17, %27
  %.035 = phi ptr [ %32, %27 ], [ %18, %17 ]
  %.not40 = icmp eq ptr %.035, null
  br i1 %.not40, label %.critedge.thread, label %23

23:                                               ; preds = %.preheader
  %24 = load i32, ptr %.035, align 8
  %25 = and i32 %24, 255
  %26 = icmp eq i32 %25, 12
  br i1 %26, label %27, label %.critedge.thread50

27:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #3
  %28 = getelementptr inbounds i8, ptr %.035, i64 24
  %29 = load ptr, ptr %28, align 8, !tbaa !19
  %30 = call i32 @mrb_intern_static(ptr noundef %0, ptr noundef nonnull @.str.8, i64 noundef 12) #3
  %31 = call zeroext i8 @iv_get(ptr noundef %0, ptr noundef %29, i32 noundef %30, ptr noundef nonnull %4)
  %.not41 = icmp eq i8 %31, 0
  %32 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #3
  br i1 %.not41, label %.critedge.thread, label %.preheader

.critedge.thread50:                               ; preds = %23
  %.off = add nsw i32 %25, -9
  %switch = icmp ult i32 %.off, 2
  %spec.select = select i1 %switch, ptr %.035, ptr %18
  br label %.critedge.thread

.critedge.thread:                                 ; preds = %27, %.preheader, %.critedge.thread50
  %.036 = phi ptr [ %spec.select, %.critedge.thread50 ], [ %18, %.preheader ], [ %18, %27 ]
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = getelementptr inbounds i8, ptr %33, i64 32
  %35 = load ptr, ptr %34, align 8, !tbaa !14
  %36 = getelementptr inbounds i8, ptr %35, i64 8
  %.03455 = load ptr, ptr %36, align 8, !tbaa !22
  %.not4356 = icmp eq ptr %.03455, null
  br i1 %.not4356, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.critedge.thread, %50
  %.03457 = phi ptr [ %.034, %50 ], [ %.03455, %.critedge.thread ]
  %37 = load i32, ptr %.03457, align 8
  %38 = and i32 %37, 2097152
  %.not44 = icmp eq i32 %38, 0
  %39 = getelementptr inbounds i8, ptr %.03457, i64 40
  br i1 %.not44, label %43, label %40

40:                                               ; preds = %.lr.ph
  %41 = load ptr, ptr %39, align 8, !tbaa !18
  %42 = getelementptr inbounds i8, ptr %41, i64 8
  br label %43

43:                                               ; preds = %.lr.ph, %40
  %.in45 = phi ptr [ %42, %40 ], [ %39, %.lr.ph ]
  %44 = load ptr, ptr %.in45, align 8, !tbaa !18
  %.not46 = icmp eq ptr %44, null
  br i1 %.not46, label %50, label %45

45:                                               ; preds = %43
  %46 = getelementptr inbounds i8, ptr %44, i64 24
  %47 = load ptr, ptr %46, align 8, !tbaa !19
  %48 = call zeroext i8 @iv_get(ptr noundef %0, ptr noundef %47, i32 noundef %1, ptr noundef nonnull %3)
  %.not47 = icmp eq i8 %48, 0
  br i1 %.not47, label %50, label %49

49:                                               ; preds = %45
  %.sroa.0.0.copyload29 = load i64, ptr %3, align 8, !tbaa !18
  %.sroa.4.0..sroa_idx30 = getelementptr inbounds i8, ptr %3, i64 8
  %.sroa.4.0.copyload31 = load i32, ptr %.sroa.4.0..sroa_idx30, align 8, !tbaa !21
  br label %55

50:                                               ; preds = %45, %43
  %51 = getelementptr inbounds i8, ptr %.03457, i64 32
  %.034 = load ptr, ptr %51, align 8, !tbaa !22
  %.not43 = icmp eq ptr %.034, null
  br i1 %.not43, label %._crit_edge, label %.lr.ph, !llvm.loop !23

._crit_edge:                                      ; preds = %50, %.critedge.thread
  %52 = call { i64, i32 } @const_get(ptr noundef %0, ptr noundef %.036, i32 noundef %1)
  %53 = extractvalue { i64, i32 } %52, 0
  %54 = extractvalue { i64, i32 } %52, 1
  br label %55

55:                                               ; preds = %._crit_edge, %49, %22
  %.sroa.0.0 = phi i64 [ %.sroa.0.0.copyload, %22 ], [ %.sroa.0.0.copyload29, %49 ], [ %53, %._crit_edge ]
  %.sroa.4.0 = phi i32 [ %.sroa.4.0.copyload, %22 ], [ %.sroa.4.0.copyload31, %49 ], [ %54, %._crit_edge ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #3
  %.fca.0.insert = insertvalue { i64, i32 } poison, i64 %.sroa.0.0, 0
  %.fca.1.insert = insertvalue { i64, i32 } %.fca.0.insert, i32 %.sroa.4.0, 1
  ret { i64, i32 } %.fca.1.insert
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { "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, !7, i64 32}
!6 = !{!"mrb_state", !7, i64 0, !10, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !7, i64 112, !7, i64 120, !7, i64 128, !7, i64 136, !7, i64 144, !7, i64 152, !7, i64 160, !7, i64 168, !7, i64 176, !7, i64 184, !7, i64 192, !11, i64 200, !10, i64 312, !7, i64 320, !8, i64 328, !12, i64 1352, !8, i64 1360, !7, i64 1368, !7, i64 1376, !7, i64 1384, !7, i64 1392, !7, i64 1400, !7, i64 1408, !13, i64 1416, !13, i64 1418}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"mrb_gc", !7, i64 0, !7, i64 8, !7, i64 16, !12, i64 24, !7, i64 32, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !7, i64 56, !7, i64 64, !12, i64 72, !12, i64 80, !10, i64 88, !10, i64 92, !8, i64 96, !8, i64 96, !8, i64 96, !8, i64 96, !8, i64 96, !12, i64 104}
!12 = !{!"long", !8, i64 0}
!13 = !{!"short", !8, i64 0}
!14 = !{!15, !7, i64 32}
!15 = !{!"mrb_context", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !13, i64 64, !7, i64 72, !13, i64 80, !13, i64 82, !10, i64 84, !8, i64 88, !7, i64 96}
!16 = !{!17, !7, i64 8}
!17 = !{!"", !10, i64 0, !7, i64 8, !7, i64 16, !13, i64 24, !13, i64 26, !7, i64 32, !7, i64 40, !7, i64 48, !10, i64 56, !10, i64 60, !7, i64 64}
!18 = !{!8, !8, i64 0}
!19 = !{!20, !7, i64 24}
!20 = !{!"RClass", !10, i64 0, !10, i64 1, !10, i64 1, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40}
!21 = !{!10, !10, i64 0}
!22 = !{!7, !7, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass