; LLVM IR from niessner/Matterport :: code/gaps/pkgs/R3Shapes/R3Draw.ll (ZNK8R3Sphere4DrawE7RNFlags)

; 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.R4Matrix = type { [4 x [4 x double]] }
%class.R3Vector = type { [3 x double] }
%class.RNFlags = type { i64 }
%class.R3Sphere = type { %class.R3Solid, %class.R3Point, double }
%class.R3Solid = type { %class.R3Shape }
%class.R3Shape = type { ptr }
%class.R3Point = type { [3 x double] }

@R4identity_matrix = external global %class.R4Matrix, align 8
@_ZZNK8R3Sphere4DrawE7RNFlagsE6sphere = external hidden global ptr, align 8
@_ZGVZNK8R3Sphere4DrawE7RNFlagsE6sphere = external hidden global i64, align 8

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK8R4Matrix4PushEv(ptr noundef nonnull align 8 dereferenceable(128)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK8R4Matrix3PopEv(ptr noundef nonnull align 8 dereferenceable(128)) #1 align 2

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

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

declare void @_ZN8R4MatrixC1ERKS_(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #4

declare void @_ZN8R4Matrix9TranslateERK8R3Vector(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(24)) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK7R3Point6VectorEv(ptr dead_on_unwind noalias writable sret(%class.R3Vector) align 8, ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

; Function Attrs: nounwind
declare i32 @__cxa_guard_acquire(ptr) #5

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind
declare void @__cxa_guard_abort(ptr) #5

; Function Attrs: nounwind
declare void @__cxa_guard_release(ptr) #5

declare ptr @gluNewQuadric() #4

declare void @gluQuadricNormals(ptr noundef, i32 noundef) #4

declare void @gluQuadricTexture(ptr noundef, i8 noundef zeroext) #4

declare void @gluQuadricDrawStyle(ptr noundef, i32 noundef) #4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK8R3Sphere4DrawE7RNFlags(ptr noundef nonnull align 8 dereferenceable(40) %0, i64 %1) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %class.RNFlags, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %class.R4Matrix, align 8
  %8 = alloca %class.R3Vector, align 8
  %9 = alloca %class.RNFlags, align 8
  %10 = alloca %class.RNFlags, align 8
  %11 = alloca %class.RNFlags, align 8
  %12 = alloca %class.RNFlags, align 8
  %13 = alloca %class.RNFlags, align 8
  %14 = getelementptr inbounds %class.RNFlags, ptr %3, i32 0, i32 0
  store i64 %1, ptr %14, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  %15 = load ptr, ptr %4, align 8
  %16 = load atomic i8, ptr @_ZGVZNK8R3Sphere4DrawE7RNFlagsE6sphere acquire, align 8
  %17 = icmp eq i8 %16, 0
  br i1 %17, label %18, label %24, !prof !9

18:                                               ; preds = %2
  %19 = call i32 @__cxa_guard_acquire(ptr @_ZGVZNK8R3Sphere4DrawE7RNFlagsE6sphere) #5
  %20 = icmp ne i32 %19, 0
  br i1 %20, label %21, label %24

21:                                               ; preds = %18
  %22 = invoke ptr @gluNewQuadric()
          to label %23 unwind label %37

23:                                               ; preds = %21
  store ptr %22, ptr @_ZZNK8R3Sphere4DrawE7RNFlagsE6sphere, align 8, !tbaa !5
  call void @__cxa_guard_release(ptr @_ZGVZNK8R3Sphere4DrawE7RNFlagsE6sphere) #5
  br label %24

24:                                               ; preds = %23, %18, %2
  call void @llvm.lifetime.start.p0(i64 128, ptr %7) #5
  call void @_ZN8R4MatrixC1ERKS_(ptr noundef nonnull align 8 dereferenceable(128) %7, ptr noundef nonnull align 8 dereferenceable(128) @R4identity_matrix)
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #5
  %25 = getelementptr inbounds %class.R3Sphere, ptr %15, i32 0, i32 1
  call void @_ZNK7R3Point6VectorEv(ptr dead_on_unwind writable sret(%class.R3Vector) align 8 %8, ptr noundef nonnull align 8 dereferenceable(24) %25)
  call void @_ZN8R4Matrix9TranslateERK8R3Vector(ptr noundef nonnull align 8 dereferenceable(128) %7, ptr noundef nonnull align 8 dereferenceable(24) %8)
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #5
  call void @_ZNK8R4Matrix4PushEv(ptr noundef nonnull align 8 dereferenceable(128) %7)
  call void @_ZN7RNFlagsC2Em(ptr noundef nonnull align 8 dereferenceable(8) %9, i64 noundef 2)
  %26 = getelementptr inbounds %class.RNFlags, ptr %9, i32 0, i32 0
  %27 = load i64, ptr %26, align 8
  %28 = call noundef i32 @_ZNK7RNFlagsixES_(ptr noundef nonnull align 8 dereferenceable(8) %3, i64 %27)
  %29 = icmp ne i32 %28, 0
  br i1 %29, label %30, label %63

30:                                               ; preds = %24
  call void @_ZN7RNFlagsC2Em(ptr noundef nonnull align 8 dereferenceable(8) %10, i64 noundef 256)
  %31 = getelementptr inbounds %class.RNFlags, ptr %10, i32 0, i32 0
  %32 = load i64, ptr %31, align 8
  %33 = call noundef i32 @_ZNK7RNFlagsixES_(ptr noundef nonnull align 8 dereferenceable(8) %3, i64 %32)
  %34 = icmp ne i32 %33, 0
  br i1 %34, label %35, label %41

35:                                               ; preds = %30
  %36 = load ptr, ptr @_ZZNK8R3Sphere4DrawE7RNFlagsE6sphere, align 8, !tbaa !5
  call void @gluQuadricNormals(ptr noundef %36, i32 noundef 100000)
  br label %49

37:                                               ; preds = %21
  %38 = landingpad { ptr, i32 }
          cleanup
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %5, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %6, align 4
  call void @__cxa_guard_abort(ptr @_ZGVZNK8R3Sphere4DrawE7RNFlagsE6sphere) #5
  br label %76

41:                                               ; preds = %30
  call void @_ZN7RNFlagsC2Em(ptr noundef nonnull align 8 dereferenceable(8) %11, i64 noundef 16)
  %42 = getelementptr inbounds %class.RNFlags, ptr %11, i32 0, i32 0
  %43 = load i64, ptr %42, align 8
  %44 = call noundef i32 @_ZNK7RNFlagsixES_(ptr noundef nonnull align 8 dereferenceable(8) %3, i64 %43)
  %45 = icmp ne i32 %44, 0
  br i1 %45, label %46, label %48

46:                                               ; preds = %41
  %47 = load ptr, ptr @_ZZNK8R3Sphere4DrawE7RNFlagsE6sphere, align 8, !tbaa !5
  call void @gluQuadricNormals(ptr noundef %47, i32 noundef 100001)
  br label %48

48:                                               ; preds = %46, %41
  br label %49

49:                                               ; preds = %48, %35
  call void @_ZN7RNFlagsC2Em(ptr noundef nonnull align 8 dereferenceable(8) %12, i64 noundef 512)
  %50 = getelementptr inbounds %class.RNFlags, ptr %12, i32 0, i32 0
  %51 = load i64, ptr %50, align 8
  %52 = call noundef i32 @_ZNK7RNFlagsixES_(ptr noundef nonnull align 8 dereferenceable(8) %3, i64 %51)
  %53 = icmp ne i32 %52, 0
  br i1 %53, label %54, label %56

54:                                               ; preds = %49
  %55 = load ptr, ptr @_ZZNK8R3Sphere4DrawE7RNFlagsE6sphere, align 8, !tbaa !5
  call void @gluQuadricTexture(ptr noundef %55, i8 noundef zeroext 1)
  br label %58

56:                                               ; preds = %49
  %57 = load ptr, ptr @_ZZNK8R3Sphere4DrawE7RNFlagsE6sphere, align 8, !tbaa !5
  call void @gluQuadricTexture(ptr noundef %57, i8 noundef zeroext 0)
  br label %58

58:                                               ; preds = %56, %54
  %59 = load ptr, ptr @_ZZNK8R3Sphere4DrawE7RNFlagsE6sphere, align 8, !tbaa !5
  call void @gluQuadricDrawStyle(ptr noundef %59, i32 noundef 100012)
  %60 = load ptr, ptr @_ZZNK8R3Sphere4DrawE7RNFlagsE6sphere, align 8, !tbaa !5
  %61 = getelementptr inbounds %class.R3Sphere, ptr %15, i32 0, i32 2
  %62 = load double, ptr %61, align 8, !tbaa !10
  call void @gluSphere(ptr noundef %60, double noundef %62, i32 noundef 8, i32 noundef 8)
  br label %63

63:                                               ; preds = %58, %24
  call void @_ZN7RNFlagsC2Em(ptr noundef nonnull align 8 dereferenceable(8) %13, i64 noundef 1)
  %64 = getelementptr inbounds %class.RNFlags, ptr %13, i32 0, i32 0
  %65 = load i64, ptr %64, align 8
  %66 = call noundef i32 @_ZNK7RNFlagsixES_(ptr noundef nonnull align 8 dereferenceable(8) %3, i64 %65)
  %67 = icmp ne i32 %66, 0
  br i1 %67, label %68, label %75

68:                                               ; preds = %63
  %69 = load ptr, ptr @_ZZNK8R3Sphere4DrawE7RNFlagsE6sphere, align 8, !tbaa !5
  call void @gluQuadricNormals(ptr noundef %69, i32 noundef 100002)
  %70 = load ptr, ptr @_ZZNK8R3Sphere4DrawE7RNFlagsE6sphere, align 8, !tbaa !5
  call void @gluQuadricTexture(ptr noundef %70, i8 noundef zeroext 0)
  %71 = load ptr, ptr @_ZZNK8R3Sphere4DrawE7RNFlagsE6sphere, align 8, !tbaa !5
  call void @gluQuadricDrawStyle(ptr noundef %71, i32 noundef 100013)
  %72 = load ptr, ptr @_ZZNK8R3Sphere4DrawE7RNFlagsE6sphere, align 8, !tbaa !5
  %73 = getelementptr inbounds %class.R3Sphere, ptr %15, i32 0, i32 2
  %74 = load double, ptr %73, align 8, !tbaa !10
  call void @gluSphere(ptr noundef %72, double noundef %74, i32 noundef 8, i32 noundef 8)
  br label %75

75:                                               ; preds = %68, %63
  call void @_ZNK8R4Matrix3PopEv(ptr noundef nonnull align 8 dereferenceable(128) %7)
  call void @llvm.lifetime.end.p0(i64 128, ptr %7) #5
  ret void

76:                                               ; preds = %37
  %77 = load ptr, ptr %5, align 8
  %78 = load i32, ptr %6, align 4
  %79 = insertvalue { ptr, i32 } poison, ptr %77, 0
  %80 = insertvalue { ptr, i32 } %79, i32 %78, 1
  resume { ptr, i32 } %80
}

declare void @gluSphere(ptr noundef, double noundef, i32 noundef, i32 noundef) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { inlinehint mustprogress 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 = { "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 = !{!"branch_weights", i32 1, i32 1048575}
!10 = !{!11, !15, i64 32}
!11 = !{!"_ZTS8R3Sphere", !12, i64 0, !14, i64 8, !15, i64 32}
!12 = !{!"_ZTS7R3Solid", !13, i64 0}
!13 = !{!"_ZTS7R3Shape"}
!14 = !{!"_ZTS7R3Point", !7, i64 0}
!15 = !{!"double", !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.R4Matrix = type { [4 x [4 x double]] }
%class.R3Vector = type { [3 x double] }
%class.RNFlags = type { i64 }

@R4identity_matrix = external global %class.R4Matrix, align 8
@_ZZNK8R3Sphere4DrawE7RNFlagsE6sphere = external hidden local_unnamed_addr global ptr, align 8
@_ZGVZNK8R3Sphere4DrawE7RNFlagsE6sphere = external hidden global i64, align 8

; 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK8R4Matrix4PushEv(ptr noundef nonnull align 8 dereferenceable(128)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK8R4Matrix3PopEv(ptr noundef nonnull align 8 dereferenceable(128)) local_unnamed_addr #1 align 2

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

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

declare void @_ZN8R4MatrixC1ERKS_(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #4

declare void @_ZN8R4Matrix9TranslateERK8R3Vector(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK7R3Point6VectorEv(ptr dead_on_unwind noalias writable sret(%class.R3Vector) align 8, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

; Function Attrs: nofree nounwind
declare i32 @__cxa_guard_acquire(ptr) local_unnamed_addr #5

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nofree nounwind
declare void @__cxa_guard_abort(ptr) local_unnamed_addr #5

; Function Attrs: nofree nounwind
declare void @__cxa_guard_release(ptr) local_unnamed_addr #5

declare ptr @gluNewQuadric() local_unnamed_addr #4

declare void @gluQuadricNormals(ptr noundef, i32 noundef) local_unnamed_addr #4

declare void @gluQuadricTexture(ptr noundef, i8 noundef zeroext) local_unnamed_addr #4

declare void @gluQuadricDrawStyle(ptr noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK8R3Sphere4DrawE7RNFlags(ptr noundef nonnull align 8 dereferenceable(40) %0, i64 %1) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %class.RNFlags, align 8
  %4 = alloca %class.R4Matrix, align 8
  %5 = alloca %class.R3Vector, align 8
  %6 = alloca %class.RNFlags, align 8
  %7 = alloca %class.RNFlags, align 8
  %8 = alloca %class.RNFlags, align 8
  %9 = alloca %class.RNFlags, align 8
  %10 = alloca %class.RNFlags, align 8
  store i64 %1, ptr %3, align 8
  %11 = load atomic i8, ptr @_ZGVZNK8R3Sphere4DrawE7RNFlagsE6sphere acquire, align 8
  %12 = icmp eq i8 %11, 0
  br i1 %12, label %13, label %18, !prof !5

13:                                               ; preds = %2
  %14 = tail call i32 @__cxa_guard_acquire(ptr nonnull @_ZGVZNK8R3Sphere4DrawE7RNFlagsE6sphere) #6
  %.not = icmp eq i32 %14, 0
  br i1 %.not, label %18, label %15

15:                                               ; preds = %13
  %16 = invoke ptr @gluNewQuadric()
          to label %17 unwind label %25

17:                                               ; preds = %15
  store ptr %16, ptr @_ZZNK8R3Sphere4DrawE7RNFlagsE6sphere, align 8, !tbaa !6
  tail call void @__cxa_guard_release(ptr nonnull @_ZGVZNK8R3Sphere4DrawE7RNFlagsE6sphere) #6
  br label %18

18:                                               ; preds = %17, %13, %2
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %4) #6
  call void @_ZN8R4MatrixC1ERKS_(ptr noundef nonnull align 8 dereferenceable(128) %4, ptr noundef nonnull align 8 dereferenceable(128) @R4identity_matrix)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #6
  %19 = getelementptr inbounds i8, ptr %0, i64 8
  call void @_ZNK7R3Point6VectorEv(ptr dead_on_unwind nonnull writable sret(%class.R3Vector) align 8 %5, ptr noundef nonnull align 8 dereferenceable(24) %19)
  call void @_ZN8R4Matrix9TranslateERK8R3Vector(ptr noundef nonnull align 8 dereferenceable(128) %4, ptr noundef nonnull align 8 dereferenceable(24) %5)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  call void @_ZNK8R4Matrix4PushEv(ptr noundef nonnull align 8 dereferenceable(128) %4)
  call void @_ZN7RNFlagsC2Em(ptr noundef nonnull align 8 dereferenceable(8) %6, i64 noundef 2)
  %20 = load i64, ptr %6, align 8
  %21 = call noundef i32 @_ZNK7RNFlagsixES_(ptr noundef nonnull align 8 dereferenceable(8) %3, i64 %20)
  %.not2 = icmp eq i32 %21, 0
  br i1 %.not2, label %39, label %22

22:                                               ; preds = %18
  call void @_ZN7RNFlagsC2Em(ptr noundef nonnull align 8 dereferenceable(8) %7, i64 noundef 256)
  %23 = load i64, ptr %7, align 8
  %24 = call noundef i32 @_ZNK7RNFlagsixES_(ptr noundef nonnull align 8 dereferenceable(8) %3, i64 %23)
  %.not3 = icmp eq i32 %24, 0
  br i1 %.not3, label %27, label %.sink.split

25:                                               ; preds = %15
  %26 = landingpad { ptr, i32 }
          cleanup
  tail call void @__cxa_guard_abort(ptr nonnull @_ZGVZNK8R3Sphere4DrawE7RNFlagsE6sphere) #6
  resume { ptr, i32 } %26

27:                                               ; preds = %22
  call void @_ZN7RNFlagsC2Em(ptr noundef nonnull align 8 dereferenceable(8) %8, i64 noundef 16)
  %28 = load i64, ptr %8, align 8
  %29 = call noundef i32 @_ZNK7RNFlagsixES_(ptr noundef nonnull align 8 dereferenceable(8) %3, i64 %28)
  %.not4 = icmp eq i32 %29, 0
  br i1 %.not4, label %31, label %.sink.split

.sink.split:                                      ; preds = %27, %22
  %.sink7 = phi i32 [ 100000, %22 ], [ 100001, %27 ]
  %30 = load ptr, ptr @_ZZNK8R3Sphere4DrawE7RNFlagsE6sphere, align 8, !tbaa !6
  call void @gluQuadricNormals(ptr noundef %30, i32 noundef %.sink7)
  br label %31

31:                                               ; preds = %.sink.split, %27
  call void @_ZN7RNFlagsC2Em(ptr noundef nonnull align 8 dereferenceable(8) %9, i64 noundef 512)
  %32 = load i64, ptr %9, align 8
  %33 = call noundef i32 @_ZNK7RNFlagsixES_(ptr noundef nonnull align 8 dereferenceable(8) %3, i64 %32)
  %.not5 = icmp ne i32 %33, 0
  %. = zext i1 %.not5 to i8
  %34 = load ptr, ptr @_ZZNK8R3Sphere4DrawE7RNFlagsE6sphere, align 8, !tbaa !6
  call void @gluQuadricTexture(ptr noundef %34, i8 noundef zeroext %.)
  %35 = load ptr, ptr @_ZZNK8R3Sphere4DrawE7RNFlagsE6sphere, align 8, !tbaa !6
  call void @gluQuadricDrawStyle(ptr noundef %35, i32 noundef 100012)
  %36 = load ptr, ptr @_ZZNK8R3Sphere4DrawE7RNFlagsE6sphere, align 8, !tbaa !6
  %37 = getelementptr inbounds i8, ptr %0, i64 32
  %38 = load double, ptr %37, align 8, !tbaa !10
  call void @gluSphere(ptr noundef %36, double noundef %38, i32 noundef 8, i32 noundef 8)
  br label %39

39:                                               ; preds = %31, %18
  call void @_ZN7RNFlagsC2Em(ptr noundef nonnull align 8 dereferenceable(8) %10, i64 noundef 1)
  %40 = load i64, ptr %10, align 8
  %41 = call noundef i32 @_ZNK7RNFlagsixES_(ptr noundef nonnull align 8 dereferenceable(8) %3, i64 %40)
  %.not6 = icmp eq i32 %41, 0
  br i1 %.not6, label %49, label %42

42:                                               ; preds = %39
  %43 = load ptr, ptr @_ZZNK8R3Sphere4DrawE7RNFlagsE6sphere, align 8, !tbaa !6
  call void @gluQuadricNormals(ptr noundef %43, i32 noundef 100002)
  %44 = load ptr, ptr @_ZZNK8R3Sphere4DrawE7RNFlagsE6sphere, align 8, !tbaa !6
  call void @gluQuadricTexture(ptr noundef %44, i8 noundef zeroext 0)
  %45 = load ptr, ptr @_ZZNK8R3Sphere4DrawE7RNFlagsE6sphere, align 8, !tbaa !6
  call void @gluQuadricDrawStyle(ptr noundef %45, i32 noundef 100013)
  %46 = load ptr, ptr @_ZZNK8R3Sphere4DrawE7RNFlagsE6sphere, align 8, !tbaa !6
  %47 = getelementptr inbounds i8, ptr %0, i64 32
  %48 = load double, ptr %47, align 8, !tbaa !10
  call void @gluSphere(ptr noundef %46, double noundef %48, i32 noundef 8, i32 noundef 8)
  br label %49

49:                                               ; preds = %42, %39
  call void @_ZNK8R4Matrix3PopEv(ptr noundef nonnull align 8 dereferenceable(128) %4)
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %4) #6
  ret void
}

declare void @gluSphere(ptr noundef, double noundef, i32 noundef, i32 noundef) local_unnamed_addr #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { inlinehint mustprogress 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 = { "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 = { nofree nounwind }
attributes #6 = { 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 = !{!"branch_weights", i32 1, i32 1048575}
!6 = !{!7, !7, i64 0}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!11, !15, i64 32}
!11 = !{!"_ZTS8R3Sphere", !12, i64 0, !14, i64 8, !15, i64 32}
!12 = !{!"_ZTS7R3Solid", !13, i64 0}
!13 = !{!"_ZTS7R3Shape"}
!14 = !{!"_ZTS7R3Point", !8, i64 0}
!15 = !{!"double", !8, i64 0}


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