; LLVM IR from chdb-io/chdb :: base/poco/Foundation/src (pcre_byte_order)

; 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.real_pcre8_or_16 = type { i32, i32, i32, i32, i32, i32, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, ptr, ptr }
%struct.pcre_extra = type { i64, ptr, i64, ptr, ptr, i64, ptr, ptr }
%struct.pcre_study_data = type { i32, i32, [32 x i8], i32 }

; Function Attrs: nounwind uwtable
define dso_local i32 @pcre_pattern_to_host_byte_order(ptr noundef %0, ptr noundef %1, ptr noundef %2) #0 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = 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) #2
  %11 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %11, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #2
  %12 = load ptr, ptr %8, align 8, !tbaa !5
  %13 = icmp eq ptr %12, null
  br i1 %13, label %14, label %15

14:                                               ; preds = %3
  store i32 -2, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %168

15:                                               ; preds = %3
  %16 = load ptr, ptr %8, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.real_pcre8_or_16, ptr %16, i32 0, i32 0
  %18 = load i32, ptr %17, align 8, !tbaa !9
  %19 = zext i32 %18 to i64
  %20 = icmp eq i64 %19, 1346589253
  br i1 %20, label %21, label %32

21:                                               ; preds = %15
  %22 = load ptr, ptr %8, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.real_pcre8_or_16, ptr %22, i32 0, i32 3
  %24 = load i32, ptr %23, align 4, !tbaa !13
  %25 = and i32 %24, 1
  %26 = icmp eq i32 %25, 0
  br i1 %26, label %27, label %28

27:                                               ; preds = %21
  store i32 -28, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %168

28:                                               ; preds = %21
  %29 = load ptr, ptr %7, align 8, !tbaa !5
  %30 = load ptr, ptr %8, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.real_pcre8_or_16, ptr %30, i32 0, i32 18
  store ptr %29, ptr %31, align 8, !tbaa !14
  store i32 0, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %168

32:                                               ; preds = %15
  %33 = load ptr, ptr %8, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.real_pcre8_or_16, ptr %33, i32 0, i32 0
  %35 = load i32, ptr %34, align 8, !tbaa !9
  %36 = zext i32 %35 to i64
  %37 = icmp ne i64 %36, 1163019088
  br i1 %37, label %38, label %39

38:                                               ; preds = %32
  store i32 -4, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %168

39:                                               ; preds = %32
  %40 = load ptr, ptr %8, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.real_pcre8_or_16, ptr %40, i32 0, i32 3
  %42 = load i32, ptr %41, align 4, !tbaa !13
  %43 = call i32 @swap_uint32(i32 noundef %42)
  %44 = and i32 %43, 1
  %45 = icmp eq i32 %44, 0
  br i1 %45, label %46, label %47

46:                                               ; preds = %39
  store i32 -28, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %168

47:                                               ; preds = %39
  %48 = load ptr, ptr %8, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.real_pcre8_or_16, ptr %48, i32 0, i32 0
  store i32 1346589253, ptr %49, align 8, !tbaa !9
  %50 = load ptr, ptr %8, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.real_pcre8_or_16, ptr %50, i32 0, i32 1
  %52 = load i32, ptr %51, align 4, !tbaa !15
  %53 = call i32 @swap_uint32(i32 noundef %52)
  %54 = load ptr, ptr %8, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.real_pcre8_or_16, ptr %54, i32 0, i32 1
  store i32 %53, ptr %55, align 4, !tbaa !15
  %56 = load ptr, ptr %8, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.real_pcre8_or_16, ptr %56, i32 0, i32 2
  %58 = load i32, ptr %57, align 8, !tbaa !16
  %59 = call i32 @swap_uint32(i32 noundef %58)
  %60 = load ptr, ptr %8, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.real_pcre8_or_16, ptr %60, i32 0, i32 2
  store i32 %59, ptr %61, align 8, !tbaa !16
  %62 = load ptr, ptr %8, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.real_pcre8_or_16, ptr %62, i32 0, i32 3
  %64 = load i32, ptr %63, align 4, !tbaa !13
  %65 = call i32 @swap_uint32(i32 noundef %64)
  %66 = load ptr, ptr %8, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.real_pcre8_or_16, ptr %66, i32 0, i32 3
  store i32 %65, ptr %67, align 4, !tbaa !13
  %68 = load ptr, ptr %8, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.real_pcre8_or_16, ptr %68, i32 0, i32 4
  %70 = load i32, ptr %69, align 8, !tbaa !17
  %71 = call i32 @swap_uint32(i32 noundef %70)
  %72 = load ptr, ptr %8, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.real_pcre8_or_16, ptr %72, i32 0, i32 4
  store i32 %71, ptr %73, align 8, !tbaa !17
  %74 = load ptr, ptr %8, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.real_pcre8_or_16, ptr %74, i32 0, i32 5
  %76 = load i32, ptr %75, align 4, !tbaa !18
  %77 = call i32 @swap_uint32(i32 noundef %76)
  %78 = load ptr, ptr %8, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.real_pcre8_or_16, ptr %78, i32 0, i32 5
  store i32 %77, ptr %79, align 4, !tbaa !18
  %80 = load ptr, ptr %8, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.real_pcre8_or_16, ptr %80, i32 0, i32 6
  %82 = load i16, ptr %81, align 8, !tbaa !19
  %83 = call zeroext i16 @swap_uint16(i16 noundef zeroext %82)
  %84 = load ptr, ptr %8, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.real_pcre8_or_16, ptr %84, i32 0, i32 6
  store i16 %83, ptr %85, align 8, !tbaa !19
  %86 = load ptr, ptr %8, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.real_pcre8_or_16, ptr %86, i32 0, i32 7
  %88 = load i16, ptr %87, align 2, !tbaa !20
  %89 = call zeroext i16 @swap_uint16(i16 noundef zeroext %88)
  %90 = load ptr, ptr %8, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.real_pcre8_or_16, ptr %90, i32 0, i32 7
  store i16 %89, ptr %91, align 2, !tbaa !20
  %92 = load ptr, ptr %8, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.real_pcre8_or_16, ptr %92, i32 0, i32 8
  %94 = load i16, ptr %93, align 4, !tbaa !21
  %95 = call zeroext i16 @swap_uint16(i16 noundef zeroext %94)
  %96 = load ptr, ptr %8, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.real_pcre8_or_16, ptr %96, i32 0, i32 8
  store i16 %95, ptr %97, align 4, !tbaa !21
  %98 = load ptr, ptr %8, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.real_pcre8_or_16, ptr %98, i32 0, i32 9
  %100 = load i16, ptr %99, align 2, !tbaa !22
  %101 = call zeroext i16 @swap_uint16(i16 noundef zeroext %100)
  %102 = load ptr, ptr %8, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.real_pcre8_or_16, ptr %102, i32 0, i32 9
  store i16 %101, ptr %103, align 2, !tbaa !22
  %104 = load ptr, ptr %8, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.real_pcre8_or_16, ptr %104, i32 0, i32 10
  %106 = load i16, ptr %105, align 8, !tbaa !23
  %107 = call zeroext i16 @swap_uint16(i16 noundef zeroext %106)
  %108 = load ptr, ptr %8, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.real_pcre8_or_16, ptr %108, i32 0, i32 10
  store i16 %107, ptr %109, align 8, !tbaa !23
  %110 = load ptr, ptr %8, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.real_pcre8_or_16, ptr %110, i32 0, i32 11
  %112 = load i16, ptr %111, align 2, !tbaa !24
  %113 = call zeroext i16 @swap_uint16(i16 noundef zeroext %112)
  %114 = load ptr, ptr %8, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.real_pcre8_or_16, ptr %114, i32 0, i32 11
  store i16 %113, ptr %115, align 2, !tbaa !24
  %116 = load ptr, ptr %8, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.real_pcre8_or_16, ptr %116, i32 0, i32 12
  %118 = load i16, ptr %117, align 4, !tbaa !25
  %119 = call zeroext i16 @swap_uint16(i16 noundef zeroext %118)
  %120 = load ptr, ptr %8, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.real_pcre8_or_16, ptr %120, i32 0, i32 12
  store i16 %119, ptr %121, align 4, !tbaa !25
  %122 = load ptr, ptr %8, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.real_pcre8_or_16, ptr %122, i32 0, i32 13
  %124 = load i16, ptr %123, align 2, !tbaa !26
  %125 = call zeroext i16 @swap_uint16(i16 noundef zeroext %124)
  %126 = load ptr, ptr %8, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.real_pcre8_or_16, ptr %126, i32 0, i32 13
  store i16 %125, ptr %127, align 2, !tbaa !26
  %128 = load ptr, ptr %8, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.real_pcre8_or_16, ptr %128, i32 0, i32 14
  %130 = load i16, ptr %129, align 8, !tbaa !27
  %131 = call zeroext i16 @swap_uint16(i16 noundef zeroext %130)
  %132 = load ptr, ptr %8, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.real_pcre8_or_16, ptr %132, i32 0, i32 14
  store i16 %131, ptr %133, align 8, !tbaa !27
  %134 = load ptr, ptr %7, align 8, !tbaa !5
  %135 = load ptr, ptr %8, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.real_pcre8_or_16, ptr %135, i32 0, i32 18
  store ptr %134, ptr %136, align 8, !tbaa !14
  %137 = load ptr, ptr %6, align 8, !tbaa !5
  %138 = icmp ne ptr %137, null
  br i1 %138, label %139, label %167

139:                                              ; preds = %47
  %140 = load ptr, ptr %6, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.pcre_extra, ptr %140, i32 0, i32 0
  %142 = load i64, ptr %141, align 8, !tbaa !28
  %143 = and i64 %142, 1
  %144 = icmp ne i64 %143, 0
  br i1 %144, label %145, label %167

145:                                              ; preds = %139
  %146 = load ptr, ptr %6, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.pcre_extra, ptr %146, i32 0, i32 1
  %148 = load ptr, ptr %147, align 8, !tbaa !31
  store ptr %148, ptr %9, align 8, !tbaa !5
  %149 = load ptr, ptr %9, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.pcre_study_data, ptr %149, i32 0, i32 0
  %151 = load i32, ptr %150, align 4, !tbaa !32
  %152 = call i32 @swap_uint32(i32 noundef %151)
  %153 = load ptr, ptr %9, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.pcre_study_data, ptr %153, i32 0, i32 0
  store i32 %152, ptr %154, align 4, !tbaa !32
  %155 = load ptr, ptr %9, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.pcre_study_data, ptr %155, i32 0, i32 1
  %157 = load i32, ptr %156, align 4, !tbaa !34
  %158 = call i32 @swap_uint32(i32 noundef %157)
  %159 = load ptr, ptr %9, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.pcre_study_data, ptr %159, i32 0, i32 1
  store i32 %158, ptr %160, align 4, !tbaa !34
  %161 = load ptr, ptr %9, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.pcre_study_data, ptr %161, i32 0, i32 3
  %163 = load i32, ptr %162, align 4, !tbaa !35
  %164 = call i32 @swap_uint32(i32 noundef %163)
  %165 = load ptr, ptr %9, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.pcre_study_data, ptr %165, i32 0, i32 3
  store i32 %164, ptr %166, align 4, !tbaa !35
  br label %167

167:                                              ; preds = %145, %139, %47
  store i32 0, ptr %4, align 4
  store i32 1, ptr %10, align 4
  br label %168

168:                                              ; preds = %167, %46, %38, %28, %27, %14
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #2
  %169 = load i32, ptr %4, align 4
  ret i32 %169
}

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

; Function Attrs: nounwind uwtable
declare hidden i32 @swap_uint32(i32 noundef) #0

; Function Attrs: nounwind uwtable
declare hidden zeroext i16 @swap_uint16(i16 noundef zeroext) #0

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"real_pcre8_or_16", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !12, i64 24, !12, i64 26, !12, i64 28, !12, i64 30, !12, i64 32, !12, i64 34, !12, i64 36, !12, i64 38, !12, i64 40, !12, i64 42, !12, i64 44, !12, i64 46, !6, i64 48, !6, i64 56}
!11 = !{!"int", !7, i64 0}
!12 = !{!"short", !7, i64 0}
!13 = !{!10, !11, i64 12}
!14 = !{!10, !6, i64 48}
!15 = !{!10, !11, i64 4}
!16 = !{!10, !11, i64 8}
!17 = !{!10, !11, i64 16}
!18 = !{!10, !11, i64 20}
!19 = !{!10, !12, i64 24}
!20 = !{!10, !12, i64 26}
!21 = !{!10, !12, i64 28}
!22 = !{!10, !12, i64 30}
!23 = !{!10, !12, i64 32}
!24 = !{!10, !12, i64 34}
!25 = !{!10, !12, i64 36}
!26 = !{!10, !12, i64 38}
!27 = !{!10, !12, i64 40}
!28 = !{!29, !30, i64 0}
!29 = !{!"pcre_extra", !30, i64 0, !6, i64 8, !30, i64 16, !6, i64 24, !6, i64 32, !30, i64 40, !6, i64 48, !6, i64 56}
!30 = !{!"long", !7, i64 0}
!31 = !{!29, !6, i64 8}
!32 = !{!33, !11, i64 0}
!33 = !{!"pcre_study_data", !11, i64 0, !11, i64 4, !7, i64 8, !11, i64 40}
!34 = !{!33, !11, i64 4}
!35 = !{!33, !11, i64 40}


; 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: nounwind uwtable
define dso_local range(i32 -28, 1) i32 @pcre_pattern_to_host_byte_order(ptr noundef %0, ptr noundef readonly %1, ptr noundef %2) local_unnamed_addr #0 {
  %4 = icmp eq ptr %0, null
  br i1 %4, label %77, label %5

5:                                                ; preds = %3
  %6 = load i32, ptr %0, align 8, !tbaa !5
  switch i32 %6, label %77 [
    i32 1346589253, label %7
    i32 1163019088, label %14
  ]

7:                                                ; preds = %5
  %8 = getelementptr inbounds i8, ptr %0, i64 12
  %9 = load i32, ptr %8, align 4, !tbaa !12
  %10 = and i32 %9, 1
  %11 = icmp eq i32 %10, 0
  br i1 %11, label %77, label %12

12:                                               ; preds = %7
  %13 = getelementptr inbounds i8, ptr %0, i64 48
  store ptr %2, ptr %13, align 8, !tbaa !13
  br label %77

14:                                               ; preds = %5
  %15 = getelementptr inbounds i8, ptr %0, i64 12
  %16 = load i32, ptr %15, align 4, !tbaa !12
  %17 = tail call i32 @swap_uint32(i32 noundef %16)
  %18 = and i32 %17, 1
  %19 = icmp eq i32 %18, 0
  br i1 %19, label %77, label %20

20:                                               ; preds = %14
  store i32 1346589253, ptr %0, align 8, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %0, i64 4
  %22 = load i32, ptr %21, align 4, !tbaa !14
  %23 = tail call i32 @swap_uint32(i32 noundef %22)
  store i32 %23, ptr %21, align 4, !tbaa !14
  %24 = getelementptr inbounds i8, ptr %0, i64 8
  %25 = load i32, ptr %24, align 8, !tbaa !15
  %26 = tail call i32 @swap_uint32(i32 noundef %25)
  store i32 %26, ptr %24, align 8, !tbaa !15
  %27 = load i32, ptr %15, align 4, !tbaa !12
  %28 = tail call i32 @swap_uint32(i32 noundef %27)
  store i32 %28, ptr %15, align 4, !tbaa !12
  %29 = getelementptr inbounds i8, ptr %0, i64 16
  %30 = load i32, ptr %29, align 8, !tbaa !16
  %31 = tail call i32 @swap_uint32(i32 noundef %30)
  store i32 %31, ptr %29, align 8, !tbaa !16
  %32 = getelementptr inbounds i8, ptr %0, i64 20
  %33 = load i32, ptr %32, align 4, !tbaa !17
  %34 = tail call i32 @swap_uint32(i32 noundef %33)
  store i32 %34, ptr %32, align 4, !tbaa !17
  %35 = getelementptr inbounds i8, ptr %0, i64 24
  %36 = load i16, ptr %35, align 8, !tbaa !18
  %37 = tail call zeroext i16 @swap_uint16(i16 noundef zeroext %36)
  store i16 %37, ptr %35, align 8, !tbaa !18
  %38 = getelementptr inbounds i8, ptr %0, i64 26
  %39 = load i16, ptr %38, align 2, !tbaa !19
  %40 = tail call zeroext i16 @swap_uint16(i16 noundef zeroext %39)
  store i16 %40, ptr %38, align 2, !tbaa !19
  %41 = getelementptr inbounds i8, ptr %0, i64 28
  %42 = load i16, ptr %41, align 4, !tbaa !20
  %43 = tail call zeroext i16 @swap_uint16(i16 noundef zeroext %42)
  store i16 %43, ptr %41, align 4, !tbaa !20
  %44 = getelementptr inbounds i8, ptr %0, i64 30
  %45 = load i16, ptr %44, align 2, !tbaa !21
  %46 = tail call zeroext i16 @swap_uint16(i16 noundef zeroext %45)
  store i16 %46, ptr %44, align 2, !tbaa !21
  %47 = getelementptr inbounds i8, ptr %0, i64 32
  %48 = load i16, ptr %47, align 8, !tbaa !22
  %49 = tail call zeroext i16 @swap_uint16(i16 noundef zeroext %48)
  store i16 %49, ptr %47, align 8, !tbaa !22
  %50 = getelementptr inbounds i8, ptr %0, i64 34
  %51 = load i16, ptr %50, align 2, !tbaa !23
  %52 = tail call zeroext i16 @swap_uint16(i16 noundef zeroext %51)
  store i16 %52, ptr %50, align 2, !tbaa !23
  %53 = getelementptr inbounds i8, ptr %0, i64 36
  %54 = load i16, ptr %53, align 4, !tbaa !24
  %55 = tail call zeroext i16 @swap_uint16(i16 noundef zeroext %54)
  store i16 %55, ptr %53, align 4, !tbaa !24
  %56 = getelementptr inbounds i8, ptr %0, i64 38
  %57 = load i16, ptr %56, align 2, !tbaa !25
  %58 = tail call zeroext i16 @swap_uint16(i16 noundef zeroext %57)
  store i16 %58, ptr %56, align 2, !tbaa !25
  %59 = getelementptr inbounds i8, ptr %0, i64 40
  %60 = load i16, ptr %59, align 8, !tbaa !26
  %61 = tail call zeroext i16 @swap_uint16(i16 noundef zeroext %60)
  store i16 %61, ptr %59, align 8, !tbaa !26
  %62 = getelementptr inbounds i8, ptr %0, i64 48
  store ptr %2, ptr %62, align 8, !tbaa !13
  %.not51 = icmp eq ptr %1, null
  br i1 %.not51, label %77, label %63

63:                                               ; preds = %20
  %64 = load i64, ptr %1, align 8, !tbaa !27
  %65 = and i64 %64, 1
  %.not52 = icmp eq i64 %65, 0
  br i1 %.not52, label %77, label %66

66:                                               ; preds = %63
  %67 = getelementptr inbounds i8, ptr %1, i64 8
  %68 = load ptr, ptr %67, align 8, !tbaa !30
  %69 = load i32, ptr %68, align 4, !tbaa !31
  %70 = tail call i32 @swap_uint32(i32 noundef %69)
  store i32 %70, ptr %68, align 4, !tbaa !31
  %71 = getelementptr inbounds i8, ptr %68, i64 4
  %72 = load i32, ptr %71, align 4, !tbaa !33
  %73 = tail call i32 @swap_uint32(i32 noundef %72)
  store i32 %73, ptr %71, align 4, !tbaa !33
  %74 = getelementptr inbounds i8, ptr %68, i64 40
  %75 = load i32, ptr %74, align 4, !tbaa !34
  %76 = tail call i32 @swap_uint32(i32 noundef %75)
  store i32 %76, ptr %74, align 4, !tbaa !34
  br label %77

77:                                               ; preds = %20, %63, %66, %14, %5, %7, %3, %12
  %.0 = phi i32 [ 0, %12 ], [ -2, %3 ], [ -28, %7 ], [ -4, %5 ], [ -28, %14 ], [ 0, %66 ], [ 0, %63 ], [ 0, %20 ]
  ret i32 %.0
}

; Function Attrs: nounwind uwtable
declare hidden i32 @swap_uint32(i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare hidden zeroext i16 @swap_uint16(i16 noundef zeroext) local_unnamed_addr #0

attributes #0 = { 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" }

!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 0}
!6 = !{!"real_pcre8_or_16", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !10, i64 24, !10, i64 26, !10, i64 28, !10, i64 30, !10, i64 32, !10, i64 34, !10, i64 36, !10, i64 38, !10, i64 40, !10, i64 42, !10, i64 44, !10, i64 46, !11, i64 48, !11, i64 56}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"short", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!6, !7, i64 12}
!13 = !{!6, !11, i64 48}
!14 = !{!6, !7, i64 4}
!15 = !{!6, !7, i64 8}
!16 = !{!6, !7, i64 16}
!17 = !{!6, !7, i64 20}
!18 = !{!6, !10, i64 24}
!19 = !{!6, !10, i64 26}
!20 = !{!6, !10, i64 28}
!21 = !{!6, !10, i64 30}
!22 = !{!6, !10, i64 32}
!23 = !{!6, !10, i64 34}
!24 = !{!6, !10, i64 36}
!25 = !{!6, !10, i64 38}
!26 = !{!6, !10, i64 40}
!27 = !{!28, !29, i64 0}
!28 = !{!"pcre_extra", !29, i64 0, !11, i64 8, !29, i64 16, !11, i64 24, !11, i64 32, !29, i64 40, !11, i64 48, !11, i64 56}
!29 = !{!"long", !8, i64 0}
!30 = !{!28, !11, i64 8}
!31 = !{!32, !7, i64 0}
!32 = !{!"pcre_study_data", !7, i64 0, !7, i64 4, !8, i64 8, !7, i64 40}
!33 = !{!32, !7, i64 4}
!34 = !{!32, !7, i64 40}


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