; LLVM IR from ohler55/agoo :: ext/agoo (gqleval)

; 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._gqlSel = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct._gqlField = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct._gqlFrag = type { ptr, ptr, ptr, ptr, ptr }
%struct._agooErr = type { i32, [256 x i8] }
%struct._gqlDoc = type { ptr, ptr, ptr, ptr, %struct._gqlFuncs, ptr, ptr, ptr }
%struct._gqlFuncs = type { ptr, ptr }

@.str.5 = external hidden unnamed_addr constant [38 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 willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #1

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

declare i32 @agoo_err_set(ptr noundef, i32 noundef, ptr noundef, ...) #2

; Function Attrs: nounwind uwtable
define dso_local i32 @gql_eval_sels(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, i32 noundef %6) #3 {
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  store ptr %2, ptr %11, align 8, !tbaa !5
  store ptr %3, ptr %12, align 8, !tbaa !5
  store ptr %4, ptr %13, align 8, !tbaa !5
  store ptr %5, ptr %14, align 8, !tbaa !5
  store i32 %6, ptr %15, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  store ptr null, ptr %17, align 8, !tbaa !5
  %20 = load i32, ptr %15, align 4, !tbaa !9
  %21 = icmp slt i32 100, %20
  br i1 %21, label %22, label %25

22:                                               ; preds = %7
  %23 = load ptr, ptr %9, align 8, !tbaa !5
  %24 = call i32 (ptr, i32, ptr, ...) @agoo_err_set(ptr noundef %23, i32 noundef 313, ptr noundef @.str.5, i32 noundef 100)
  store i32 %24, ptr %8, align 4
  store i32 1, ptr %18, align 4
  br label %168

25:                                               ; preds = %7
  %26 = load i32, ptr %15, align 4, !tbaa !9
  %27 = add nsw i32 %26, 1
  store i32 %27, ptr %15, align 4, !tbaa !9
  %28 = load ptr, ptr %13, align 8, !tbaa !5
  store ptr %28, ptr %16, align 8, !tbaa !5
  br label %29

29:                                               ; preds = %163, %25
  %30 = load ptr, ptr %16, align 8, !tbaa !5
  %31 = icmp ne ptr null, %30
  br i1 %31, label %32, label %167

32:                                               ; preds = %29
  %33 = load ptr, ptr %12, align 8, !tbaa !5
  %34 = icmp ne ptr null, %33
  br i1 %34, label %35, label %51

35:                                               ; preds = %32
  %36 = load ptr, ptr %16, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct._gqlSel, ptr %36, i32 0, i32 2
  %38 = load ptr, ptr %37, align 8, !tbaa !11
  %39 = icmp eq ptr null, %38
  br i1 %39, label %40, label %42

40:                                               ; preds = %35
  %41 = load ptr, ptr %12, align 8, !tbaa !5
  store ptr %41, ptr %17, align 8, !tbaa !5
  br label %50

42:                                               ; preds = %35
  %43 = load ptr, ptr %12, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct._gqlField, ptr %43, i32 0, i32 2
  %45 = load ptr, ptr %44, align 8, !tbaa !13
  %46 = load ptr, ptr %16, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct._gqlSel, ptr %46, i32 0, i32 2
  %48 = load ptr, ptr %47, align 8, !tbaa !11
  %49 = call ptr @gql_type_get_field(ptr noundef %45, ptr noundef %48)
  store ptr %49, ptr %17, align 8, !tbaa !5
  br label %50

50:                                               ; preds = %42, %40
  br label %52

51:                                               ; preds = %32
  store ptr null, ptr %17, align 8, !tbaa !5
  br label %52

52:                                               ; preds = %51, %50
  %53 = load ptr, ptr %16, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct._gqlSel, ptr %53, i32 0, i32 8
  %55 = load ptr, ptr %54, align 8, !tbaa !15
  %56 = icmp ne ptr null, %55
  br i1 %56, label %57, label %84

57:                                               ; preds = %52
  %58 = load ptr, ptr %10, align 8, !tbaa !5
  %59 = load ptr, ptr %16, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct._gqlSel, ptr %59, i32 0, i32 8
  %61 = load ptr, ptr %60, align 8, !tbaa !15
  %62 = load ptr, ptr %11, align 8, !tbaa !5
  %63 = call zeroext i1 @frag_include(ptr noundef %58, ptr noundef %61, ptr noundef %62)
  br i1 %63, label %64, label %83

64:                                               ; preds = %57
  %65 = load ptr, ptr %9, align 8, !tbaa !5
  %66 = load ptr, ptr %10, align 8, !tbaa !5
  %67 = load ptr, ptr %11, align 8, !tbaa !5
  %68 = load ptr, ptr %17, align 8, !tbaa !5
  %69 = load ptr, ptr %16, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct._gqlSel, ptr %69, i32 0, i32 8
  %71 = load ptr, ptr %70, align 8, !tbaa !15
  %72 = getelementptr inbounds %struct._gqlFrag, ptr %71, i32 0, i32 4
  %73 = load ptr, ptr %72, align 8, !tbaa !16
  %74 = load ptr, ptr %14, align 8, !tbaa !5
  %75 = load i32, ptr %15, align 4, !tbaa !9
  %76 = call i32 @gql_eval_sels(ptr noundef %65, ptr noundef %66, ptr noundef %67, ptr noundef %68, ptr noundef %73, ptr noundef %74, i32 noundef %75)
  %77 = icmp ne i32 0, %76
  br i1 %77, label %78, label %82

78:                                               ; preds = %64
  %79 = load ptr, ptr %9, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct._agooErr, ptr %79, i32 0, i32 0
  %81 = load i32, ptr %80, align 4, !tbaa !18
  store i32 %81, ptr %8, align 4
  store i32 1, ptr %18, align 4
  br label %168

82:                                               ; preds = %64
  br label %83

83:                                               ; preds = %82, %57
  br label %162

84:                                               ; preds = %52
  %85 = load ptr, ptr %16, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct._gqlSel, ptr %85, i32 0, i32 7
  %87 = load ptr, ptr %86, align 8, !tbaa !20
  %88 = icmp ne ptr null, %87
  br i1 %88, label %89, label %142

89:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  %90 = load ptr, ptr %10, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct._gqlDoc, ptr %90, i32 0, i32 2
  %92 = load ptr, ptr %91, align 8, !tbaa !21
  store ptr %92, ptr %19, align 8, !tbaa !5
  br label %93

93:                                               ; preds = %134, %89
  %94 = load ptr, ptr %19, align 8, !tbaa !5
  %95 = icmp ne ptr null, %94
  br i1 %95, label %96, label %138

96:                                               ; preds = %93
  %97 = load ptr, ptr %19, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct._gqlFrag, ptr %97, i32 0, i32 1
  %99 = load ptr, ptr %98, align 8, !tbaa !24
  %100 = icmp ne ptr null, %99
  br i1 %100, label %101, label %133

101:                                              ; preds = %96
  %102 = load ptr, ptr %19, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct._gqlFrag, ptr %102, i32 0, i32 1
  %104 = load ptr, ptr %103, align 8, !tbaa !24
  %105 = load ptr, ptr %16, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct._gqlSel, ptr %105, i32 0, i32 7
  %107 = load ptr, ptr %106, align 8, !tbaa !20
  %108 = call i32 @strcmp(ptr noundef %104, ptr noundef %107) #5
  %109 = icmp eq i32 0, %108
  br i1 %109, label %110, label %133

110:                                              ; preds = %101
  %111 = load ptr, ptr %10, align 8, !tbaa !5
  %112 = load ptr, ptr %19, align 8, !tbaa !5
  %113 = load ptr, ptr %11, align 8, !tbaa !5
  %114 = call zeroext i1 @frag_include(ptr noundef %111, ptr noundef %112, ptr noundef %113)
  br i1 %114, label %115, label %132

115:                                              ; preds = %110
  %116 = load ptr, ptr %9, align 8, !tbaa !5
  %117 = load ptr, ptr %10, align 8, !tbaa !5
  %118 = load ptr, ptr %11, align 8, !tbaa !5
  %119 = load ptr, ptr %17, align 8, !tbaa !5
  %120 = load ptr, ptr %19, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct._gqlFrag, ptr %120, i32 0, i32 4
  %122 = load ptr, ptr %121, align 8, !tbaa !16
  %123 = load ptr, ptr %14, align 8, !tbaa !5
  %124 = load i32, ptr %15, align 4, !tbaa !9
  %125 = call i32 @gql_eval_sels(ptr noundef %116, ptr noundef %117, ptr noundef %118, ptr noundef %119, ptr noundef %122, ptr noundef %123, i32 noundef %124)
  %126 = icmp ne i32 0, %125
  br i1 %126, label %127, label %131

127:                                              ; preds = %115
  %128 = load ptr, ptr %9, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct._agooErr, ptr %128, i32 0, i32 0
  %130 = load i32, ptr %129, align 4, !tbaa !18
  store i32 %130, ptr %8, align 4
  store i32 1, ptr %18, align 4
  br label %139

131:                                              ; preds = %115
  br label %132

132:                                              ; preds = %131, %110
  br label %133

133:                                              ; preds = %132, %101, %96
  br label %134

134:                                              ; preds = %133
  %135 = load ptr, ptr %19, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct._gqlFrag, ptr %135, i32 0, i32 0
  %137 = load ptr, ptr %136, align 8, !tbaa !25
  store ptr %137, ptr %19, align 8, !tbaa !5
  br label %93, !llvm.loop !26

138:                                              ; preds = %93
  store i32 0, ptr %18, align 4
  br label %139

139:                                              ; preds = %138, %127
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  %140 = load i32, ptr %18, align 4
  switch i32 %140, label %168 [
    i32 0, label %141
  ]

141:                                              ; preds = %139
  br label %161

142:                                              ; preds = %84
  %143 = load ptr, ptr %10, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct._gqlDoc, ptr %143, i32 0, i32 4
  %145 = getelementptr inbounds %struct._gqlFuncs, ptr %144, i32 0, i32 0
  %146 = load ptr, ptr %145, align 8, !tbaa !28
  %147 = load ptr, ptr %9, align 8, !tbaa !5
  %148 = load ptr, ptr %10, align 8, !tbaa !5
  %149 = load ptr, ptr %11, align 8, !tbaa !5
  %150 = load ptr, ptr %17, align 8, !tbaa !5
  %151 = load ptr, ptr %16, align 8, !tbaa !5
  %152 = load ptr, ptr %14, align 8, !tbaa !5
  %153 = load i32, ptr %15, align 4, !tbaa !9
  %154 = call i32 %146(ptr noundef %147, ptr noundef %148, ptr noundef %149, ptr noundef %150, ptr noundef %151, ptr noundef %152, i32 noundef %153)
  %155 = icmp ne i32 0, %154
  br i1 %155, label %156, label %160

156:                                              ; preds = %142
  %157 = load ptr, ptr %9, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct._agooErr, ptr %157, i32 0, i32 0
  %159 = load i32, ptr %158, align 4, !tbaa !18
  store i32 %159, ptr %8, align 4
  store i32 1, ptr %18, align 4
  br label %168

160:                                              ; preds = %142
  br label %161

161:                                              ; preds = %160, %141
  br label %162

162:                                              ; preds = %161, %83
  br label %163

163:                                              ; preds = %162
  %164 = load ptr, ptr %16, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct._gqlSel, ptr %164, i32 0, i32 0
  %166 = load ptr, ptr %165, align 8, !tbaa !29
  store ptr %166, ptr %16, align 8, !tbaa !5
  br label %29, !llvm.loop !30

167:                                              ; preds = %29
  store i32 0, ptr %8, align 4
  store i32 1, ptr %18, align 4
  br label %168

168:                                              ; preds = %167, %156, %139, %78, %22
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  %169 = load i32, ptr %8, align 4
  ret i32 %169
}

declare ptr @gql_type_get_field(ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden zeroext i1 @frag_include(ptr noundef, ptr noundef, ptr noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind willreturn memory(read) "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 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 = { nounwind }
attributes #5 = { nounwind willreturn memory(read) }

!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 16}
!12 = !{!"_gqlSel", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64}
!13 = !{!14, !6, i64 16}
!14 = !{!"_gqlField", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48}
!15 = !{!12, !6, i64 64}
!16 = !{!17, !6, i64 32}
!17 = !{!"_gqlFrag", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!18 = !{!19, !10, i64 0}
!19 = !{!"_agooErr", !10, i64 0, !7, i64 4}
!20 = !{!12, !6, i64 56}
!21 = !{!22, !6, i64 16}
!22 = !{!"_gqlDoc", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !23, i64 32, !6, i64 48, !6, i64 56, !6, i64 64}
!23 = !{!"_gqlFuncs", !6, i64 0, !6, i64 8}
!24 = !{!17, !6, i64 8}
!25 = !{!17, !6, i64 0}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = !{!22, !6, i64 32}
!29 = !{!12, !6, i64 0}
!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"

@.str.5 = external hidden unnamed_addr constant [38 x i8], align 1

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #0

declare i32 @agoo_err_set(ptr noundef, i32 noundef, ptr noundef, ...) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local i32 @gql_eval_sels(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, i32 noundef %6) local_unnamed_addr #2 {
  %8 = icmp sgt i32 %6, 100
  br i1 %8, label %9, label %11

9:                                                ; preds = %7
  %10 = tail call i32 (ptr, i32, ptr, ...) @agoo_err_set(ptr noundef %0, i32 noundef 313, ptr noundef nonnull @.str.5, i32 noundef 100) #3
  br label %.loopexit

11:                                               ; preds = %7
  %12 = add nsw i32 %6, 1
  %.not72 = icmp eq ptr %4, null
  br i1 %.not72, label %.loopexit, label %.lr.ph74

.lr.ph74:                                         ; preds = %11
  %.not60 = icmp eq ptr %3, null
  %13 = getelementptr inbounds i8, ptr %3, i64 16
  %14 = getelementptr inbounds i8, ptr %1, i64 16
  %15 = getelementptr inbounds i8, ptr %1, i64 32
  br label %16

16:                                               ; preds = %.lr.ph74, %.thread
  %.05373 = phi ptr [ %4, %.lr.ph74 ], [ %60, %.thread ]
  br i1 %.not60, label %24, label %17

17:                                               ; preds = %16
  %18 = getelementptr inbounds i8, ptr %.05373, i64 16
  %19 = load ptr, ptr %18, align 8, !tbaa !5
  %20 = icmp eq ptr %19, null
  br i1 %20, label %24, label %21

21:                                               ; preds = %17
  %22 = load ptr, ptr %13, align 8, !tbaa !10
  %23 = tail call ptr @gql_type_get_field(ptr noundef %22, ptr noundef nonnull %19) #3
  br label %24

24:                                               ; preds = %16, %17, %21
  %.052 = phi ptr [ %23, %21 ], [ %3, %17 ], [ null, %16 ]
  %25 = getelementptr inbounds i8, ptr %.05373, i64 64
  %26 = load ptr, ptr %25, align 8, !tbaa !12
  %.not61 = icmp eq ptr %26, null
  br i1 %.not61, label %36, label %27

27:                                               ; preds = %24
  %28 = tail call zeroext i1 @frag_include(ptr noundef %1, ptr noundef nonnull %26, ptr noundef %2)
  br i1 %28, label %29, label %.thread

29:                                               ; preds = %27
  %30 = load ptr, ptr %25, align 8, !tbaa !12
  %31 = getelementptr inbounds i8, ptr %30, i64 32
  %32 = load ptr, ptr %31, align 8, !tbaa !13
  %33 = tail call i32 @gql_eval_sels(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %.052, ptr noundef %32, ptr noundef %5, i32 noundef %12)
  %.not67 = icmp eq i32 %33, 0
  br i1 %.not67, label %.thread, label %34

34:                                               ; preds = %29
  %35 = load i32, ptr %0, align 4, !tbaa !15
  br label %.loopexit

36:                                               ; preds = %24
  %37 = getelementptr inbounds i8, ptr %.05373, i64 56
  %38 = load ptr, ptr %37, align 8, !tbaa !18
  %.not62 = icmp eq ptr %38, null
  br i1 %.not62, label %55, label %39

39:                                               ; preds = %36
  %.069 = load ptr, ptr %14, align 8, !tbaa !19
  %.not6470 = icmp eq ptr %.069, null
  br i1 %.not6470, label %.thread, label %.lr.ph

.lr.ph:                                           ; preds = %39, %52
  %.071 = phi ptr [ %.0, %52 ], [ %.069, %39 ]
  %40 = getelementptr inbounds i8, ptr %.071, i64 8
  %41 = load ptr, ptr %40, align 8, !tbaa !20
  %.not65 = icmp eq ptr %41, null
  br i1 %.not65, label %52, label %42

42:                                               ; preds = %.lr.ph
  %43 = load ptr, ptr %37, align 8, !tbaa !18
  %44 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %41, ptr noundef nonnull dereferenceable(1) %43) #4
  %45 = icmp eq i32 %44, 0
  br i1 %45, label %46, label %52

46:                                               ; preds = %42
  %47 = tail call zeroext i1 @frag_include(ptr noundef %1, ptr noundef nonnull %.071, ptr noundef %2)
  br i1 %47, label %48, label %52

48:                                               ; preds = %46
  %49 = getelementptr inbounds i8, ptr %.071, i64 32
  %50 = load ptr, ptr %49, align 8, !tbaa !13
  %51 = tail call i32 @gql_eval_sels(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %.052, ptr noundef %50, ptr noundef %5, i32 noundef %12)
  %.not66 = icmp eq i32 %51, 0
  br i1 %.not66, label %52, label %53

52:                                               ; preds = %.lr.ph, %42, %48, %46
  %.0 = load ptr, ptr %.071, align 8, !tbaa !19
  %.not64 = icmp eq ptr %.0, null
  br i1 %.not64, label %.thread, label %.lr.ph, !llvm.loop !21

53:                                               ; preds = %48
  %54 = load i32, ptr %0, align 4, !tbaa !15
  br label %.loopexit

55:                                               ; preds = %36
  %56 = load ptr, ptr %15, align 8, !tbaa !23
  %57 = tail call i32 %56(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %.052, ptr noundef nonnull %.05373, ptr noundef %5, i32 noundef %12) #3
  %.not63 = icmp eq i32 %57, 0
  br i1 %.not63, label %.thread, label %58

58:                                               ; preds = %55
  %59 = load i32, ptr %0, align 4, !tbaa !15
  br label %.loopexit

.thread:                                          ; preds = %52, %39, %29, %27, %55
  %60 = load ptr, ptr %.05373, align 8, !tbaa !26
  %.not = icmp eq ptr %60, null
  br i1 %.not, label %.loopexit, label %16, !llvm.loop !27

.loopexit:                                        ; preds = %.thread, %11, %53, %58, %34, %9
  %.3 = phi i32 [ %10, %9 ], [ %35, %34 ], [ %54, %53 ], [ %59, %58 ], [ 0, %11 ], [ 0, %.thread ]
  ret i32 %.3
}

declare ptr @gql_type_get_field(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden zeroext i1 @frag_include(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

attributes #0 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind 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 }
attributes #4 = { nounwind willreturn memory(read) }

!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 16}
!6 = !{!"_gqlSel", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!11, !7, i64 16}
!11 = !{!"_gqlField", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48}
!12 = !{!6, !7, i64 64}
!13 = !{!14, !7, i64 32}
!14 = !{!"_gqlFrag", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32}
!15 = !{!16, !17, i64 0}
!16 = !{!"_agooErr", !17, i64 0, !8, i64 4}
!17 = !{!"int", !8, i64 0}
!18 = !{!6, !7, i64 56}
!19 = !{!7, !7, i64 0}
!20 = !{!14, !7, i64 8}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!24, !7, i64 32}
!24 = !{!"_gqlDoc", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !25, i64 32, !7, i64 48, !7, i64 56, !7, i64 64}
!25 = !{!"_gqlFuncs", !7, i64 0, !7, i64 8}
!26 = !{!6, !7, i64 0}
!27 = distinct !{!27, !22}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass