; LLVM IR from ARM-software/Arm-2D :: examples/common/controls (meter_pointer)

; 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.spin_zoom_widget_cfg_t = type { ptr, %struct.anon.0, ptr, %struct.anon.3, i32 }
%struct.anon.0 = type { ptr, ptr, %union.anon.1, %union.anon.2 }
%union.anon.1 = type { %struct.arm_2d_point_float_t }
%struct.arm_2d_point_float_t = type { float, float }
%union.anon.2 = type { i16 }
%struct.anon.3 = type { %struct.anon.4, %struct.anon.5, %struct.anon.6 }
%struct.anon.4 = type { float, i32 }
%struct.anon.5 = type { float, i32 }
%struct.anon.6 = type { float, %union.anon.7, float }
%union.anon.7 = type { float }
%struct.meter_pointer_cfg_t = type { %union.anon.9, %struct.anon.10, %struct.arm_2d_helper_pi_slider_cfg_t, i32 }
%union.anon.9 = type { %struct.spin_zoom_widget_cfg_t }
%struct.anon.10 = type { i8, i16 }
%struct.arm_2d_helper_pi_slider_cfg_t = type { i32, float, float }
%struct.arm_2d_tile_t = type { %union.anon.11, %union.anon.22, %union.anon.25 }
%union.anon.11 = type { %struct.anon.12 }
%struct.anon.12 = type { i8, %union.arm_2d_color_info_t, %union.anon.15 }
%union.arm_2d_color_info_t = type { %struct.anon.13 }
%struct.anon.13 = type { i8 }
%union.anon.15 = type { i16 }
%union.anon.22 = type { %struct.arm_2d_region_t }
%struct.arm_2d_region_t = type { %union.anon.23, %union.anon.24 }
%union.anon.23 = type { %struct.arm_2d_location_t }
%struct.arm_2d_location_t = type { i16, i16 }
%union.anon.24 = type { %struct.arm_2d_size_t }
%struct.arm_2d_size_t = type { i16, i16 }
%union.anon.25 = type { ptr }
%struct.meter_pointer_t = type { %union.anon, %struct.anon.8 }
%union.anon = type { %struct.spin_zoom_widget_t }
%struct.spin_zoom_widget_t = type { %struct.anon, [320 x i8] }
%struct.anon = type { %struct.spin_zoom_widget_cfg_t }
%struct.anon.8 = type { %struct.arm_2d_helper_pi_slider_cfg_t, [4 x i8], %struct.arm_2d_helper_pi_slider_t, float, [4 x i8] }
%struct.arm_2d_helper_pi_slider_t = type { [40 x i8] }

@.str = external hidden unnamed_addr constant [14 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [94 x i8], align 1
@__PRETTY_FUNCTION__.meter_pointer_init = external hidden unnamed_addr constant [74 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @meter_pointer_init(ptr noundef nonnull %0, ptr noundef nonnull %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %struct.spin_zoom_widget_cfg_t, align 8
  %6 = alloca i16, align 2
  %7 = alloca i16, align 2
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %8 = load ptr, ptr %3, align 8, !tbaa !5
  %9 = icmp ne ptr null, %8
  br i1 %9, label %10, label %11

10:                                               ; preds = %2
  br label %12

11:                                               ; preds = %2
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 76, ptr noundef @__PRETTY_FUNCTION__.meter_pointer_init) #6
  unreachable

12:                                               ; preds = %10
  %13 = load ptr, ptr %3, align 8, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 8 %13, i8 0, i64 464, i1 false)
  br label %14

14:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 80, ptr %5) #7
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.meter_pointer_cfg_t, ptr %15, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %5, ptr align 8 %16, i64 80, i1 false), !tbaa.struct !9
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.meter_pointer_cfg_t, ptr %17, i32 0, i32 1
  %19 = getelementptr inbounds %struct.anon.10, ptr %18, i32 0, i32 1
  %20 = load i16, ptr %19, align 2, !tbaa !15
  %21 = sext i16 %20 to i32
  %22 = icmp sgt i32 %21, 0
  br i1 %22, label %23, label %122

23:                                               ; preds = %14
  %24 = getelementptr inbounds %struct.spin_zoom_widget_cfg_t, ptr %5, i32 0, i32 4
  %25 = load i32, ptr %24, align 4
  %26 = and i32 %25, -2
  %27 = or i32 %26, 1
  store i32 %27, ptr %24, align 4
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.meter_pointer_cfg_t, ptr %28, i32 0, i32 1
  %30 = getelementptr inbounds %struct.anon.10, ptr %29, i32 0, i32 0
  %31 = load i8, ptr %30, align 8, !tbaa !21, !range !22, !noundef !23
  %32 = trunc i8 %31 to i1
  br i1 %32, label %33, label %77

33:                                               ; preds = %23
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.meter_pointer_cfg_t, ptr %34, i32 0, i32 1
  %36 = getelementptr inbounds %struct.anon.10, ptr %35, i32 0, i32 1
  %37 = load i16, ptr %36, align 2, !tbaa !15
  %38 = sitofp i16 %37 to float
  %39 = getelementptr inbounds %struct.spin_zoom_widget_cfg_t, ptr %5, i32 0, i32 1
  %40 = getelementptr inbounds %struct.anon.0, ptr %39, i32 0, i32 2
  %41 = getelementptr inbounds %struct.arm_2d_point_float_t, ptr %40, i32 0, i32 0
  store float %38, ptr %41, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 2, ptr %6) #7
  %42 = getelementptr inbounds %struct.spin_zoom_widget_cfg_t, ptr %5, i32 0, i32 1
  %43 = getelementptr inbounds %struct.anon.0, ptr %42, i32 0, i32 1
  %44 = load ptr, ptr %43, align 8, !tbaa !24
  %45 = icmp ne ptr null, %44
  br i1 %45, label %46, label %54

46:                                               ; preds = %33
  %47 = getelementptr inbounds %struct.spin_zoom_widget_cfg_t, ptr %5, i32 0, i32 1
  %48 = getelementptr inbounds %struct.anon.0, ptr %47, i32 0, i32 1
  %49 = load ptr, ptr %48, align 8, !tbaa !24
  %50 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %49, i32 0, i32 1
  %51 = getelementptr inbounds %struct.arm_2d_region_t, ptr %50, i32 0, i32 1
  %52 = getelementptr inbounds %struct.arm_2d_size_t, ptr %51, i32 0, i32 1
  %53 = load i16, ptr %52, align 2, !tbaa !10
  store i16 %53, ptr %6, align 2, !tbaa !30
  br label %69

54:                                               ; preds = %33
  %55 = getelementptr inbounds %struct.spin_zoom_widget_cfg_t, ptr %5, i32 0, i32 1
  %56 = getelementptr inbounds %struct.anon.0, ptr %55, i32 0, i32 0
  %57 = load ptr, ptr %56, align 8, !tbaa !31
  %58 = icmp ne ptr null, %57
  br i1 %58, label %59, label %67

59:                                               ; preds = %54
  %60 = getelementptr inbounds %struct.spin_zoom_widget_cfg_t, ptr %5, i32 0, i32 1
  %61 = getelementptr inbounds %struct.anon.0, ptr %60, i32 0, i32 0
  %62 = load ptr, ptr %61, align 8, !tbaa !31
  %63 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %62, i32 0, i32 1
  %64 = getelementptr inbounds %struct.arm_2d_region_t, ptr %63, i32 0, i32 1
  %65 = getelementptr inbounds %struct.arm_2d_size_t, ptr %64, i32 0, i32 1
  %66 = load i16, ptr %65, align 2, !tbaa !10
  store i16 %66, ptr %6, align 2, !tbaa !30
  br label %68

67:                                               ; preds = %54
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 96, ptr noundef @__PRETTY_FUNCTION__.meter_pointer_init) #6
  unreachable

68:                                               ; preds = %59
  br label %69

69:                                               ; preds = %68, %46
  %70 = load i16, ptr %6, align 2, !tbaa !30
  %71 = sext i16 %70 to i32
  %72 = sitofp i32 %71 to float
  %73 = fdiv float %72, 2.000000e+00
  %74 = getelementptr inbounds %struct.spin_zoom_widget_cfg_t, ptr %5, i32 0, i32 1
  %75 = getelementptr inbounds %struct.anon.0, ptr %74, i32 0, i32 2
  %76 = getelementptr inbounds %struct.arm_2d_point_float_t, ptr %75, i32 0, i32 1
  store float %73, ptr %76, align 4, !tbaa !10
  call void @llvm.lifetime.end.p0(i64 2, ptr %6) #7
  br label %121

77:                                               ; preds = %23
  %78 = load ptr, ptr %4, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.meter_pointer_cfg_t, ptr %78, i32 0, i32 1
  %80 = getelementptr inbounds %struct.anon.10, ptr %79, i32 0, i32 1
  %81 = load i16, ptr %80, align 2, !tbaa !15
  %82 = sitofp i16 %81 to float
  %83 = getelementptr inbounds %struct.spin_zoom_widget_cfg_t, ptr %5, i32 0, i32 1
  %84 = getelementptr inbounds %struct.anon.0, ptr %83, i32 0, i32 2
  %85 = getelementptr inbounds %struct.arm_2d_point_float_t, ptr %84, i32 0, i32 1
  store float %82, ptr %85, align 4, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 2, ptr %7) #7
  %86 = getelementptr inbounds %struct.spin_zoom_widget_cfg_t, ptr %5, i32 0, i32 1
  %87 = getelementptr inbounds %struct.anon.0, ptr %86, i32 0, i32 1
  %88 = load ptr, ptr %87, align 8, !tbaa !24
  %89 = icmp ne ptr null, %88
  br i1 %89, label %90, label %98

90:                                               ; preds = %77
  %91 = getelementptr inbounds %struct.spin_zoom_widget_cfg_t, ptr %5, i32 0, i32 1
  %92 = getelementptr inbounds %struct.anon.0, ptr %91, i32 0, i32 1
  %93 = load ptr, ptr %92, align 8, !tbaa !24
  %94 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %93, i32 0, i32 1
  %95 = getelementptr inbounds %struct.arm_2d_region_t, ptr %94, i32 0, i32 1
  %96 = getelementptr inbounds %struct.arm_2d_size_t, ptr %95, i32 0, i32 0
  %97 = load i16, ptr %96, align 4, !tbaa !10
  store i16 %97, ptr %7, align 2, !tbaa !30
  br label %113

98:                                               ; preds = %77
  %99 = getelementptr inbounds %struct.spin_zoom_widget_cfg_t, ptr %5, i32 0, i32 1
  %100 = getelementptr inbounds %struct.anon.0, ptr %99, i32 0, i32 0
  %101 = load ptr, ptr %100, align 8, !tbaa !31
  %102 = icmp ne ptr null, %101
  br i1 %102, label %103, label %111

103:                                              ; preds = %98
  %104 = getelementptr inbounds %struct.spin_zoom_widget_cfg_t, ptr %5, i32 0, i32 1
  %105 = getelementptr inbounds %struct.anon.0, ptr %104, i32 0, i32 0
  %106 = load ptr, ptr %105, align 8, !tbaa !31
  %107 = getelementptr inbounds %struct.arm_2d_tile_t, ptr %106, i32 0, i32 1
  %108 = getelementptr inbounds %struct.arm_2d_region_t, ptr %107, i32 0, i32 1
  %109 = getelementptr inbounds %struct.arm_2d_size_t, ptr %108, i32 0, i32 0
  %110 = load i16, ptr %109, align 4, !tbaa !10
  store i16 %110, ptr %7, align 2, !tbaa !30
  br label %112

111:                                              ; preds = %98
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 110, ptr noundef @__PRETTY_FUNCTION__.meter_pointer_init) #6
  unreachable

112:                                              ; preds = %103
  br label %113

113:                                              ; preds = %112, %90
  %114 = load i16, ptr %7, align 2, !tbaa !30
  %115 = sext i16 %114 to i32
  %116 = sitofp i32 %115 to float
  %117 = fdiv float %116, 2.000000e+00
  %118 = getelementptr inbounds %struct.spin_zoom_widget_cfg_t, ptr %5, i32 0, i32 1
  %119 = getelementptr inbounds %struct.anon.0, ptr %118, i32 0, i32 2
  %120 = getelementptr inbounds %struct.arm_2d_point_float_t, ptr %119, i32 0, i32 0
  store float %117, ptr %120, align 8, !tbaa !10
  call void @llvm.lifetime.end.p0(i64 2, ptr %7) #7
  br label %121

121:                                              ; preds = %113, %69
  br label %122

122:                                              ; preds = %121, %14
  %123 = getelementptr inbounds %struct.spin_zoom_widget_cfg_t, ptr %5, i32 0, i32 3
  %124 = getelementptr inbounds %struct.anon.3, ptr %123, i32 0, i32 0
  %125 = getelementptr inbounds %struct.anon.4, ptr %124, i32 0, i32 1
  %126 = load i32, ptr %125, align 4, !tbaa !32
  %127 = getelementptr inbounds %struct.spin_zoom_widget_cfg_t, ptr %5, i32 0, i32 3
  %128 = getelementptr inbounds %struct.anon.3, ptr %127, i32 0, i32 1
  %129 = getelementptr inbounds %struct.anon.5, ptr %128, i32 0, i32 1
  %130 = load i32, ptr %129, align 4, !tbaa !33
  %131 = load ptr, ptr %3, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.meter_pointer_t, ptr %131, i32 0, i32 0
  call void @spin_zoom_widget_init(ptr noundef %132, ptr noundef %5)
  call void @llvm.lifetime.end.p0(i64 80, ptr %5) #7
  br label %133

133:                                              ; preds = %122
  br label %134

134:                                              ; preds = %133
  %135 = load ptr, ptr %3, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.meter_pointer_t, ptr %135, i32 0, i32 1
  %137 = getelementptr inbounds %struct.anon.8, ptr %136, i32 0, i32 0
  %138 = load ptr, ptr %4, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.meter_pointer_cfg_t, ptr %138, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %137, ptr align 4 %139, i64 12, i1 false), !tbaa.struct !34
  %140 = load ptr, ptr %3, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.meter_pointer_t, ptr %140, i32 0, i32 1
  %142 = getelementptr inbounds %struct.anon.8, ptr %141, i32 0, i32 0
  %143 = getelementptr inbounds %struct.arm_2d_helper_pi_slider_cfg_t, ptr %142, i32 0, i32 1
  %144 = load float, ptr %143, align 4, !tbaa !35
  %145 = fcmp ole float %144, 0.000000e+00
  br i1 %145, label %153, label %146

146:                                              ; preds = %134
  %147 = load ptr, ptr %3, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.meter_pointer_t, ptr %147, i32 0, i32 1
  %149 = getelementptr inbounds %struct.anon.8, ptr %148, i32 0, i32 0
  %150 = getelementptr inbounds %struct.arm_2d_helper_pi_slider_cfg_t, ptr %149, i32 0, i32 0
  %151 = load i32, ptr %150, align 8, !tbaa !39
  %152 = icmp sle i32 %151, 0
  br i1 %152, label %153, label %162

153:                                              ; preds = %146, %134
  %154 = load ptr, ptr %3, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.meter_pointer_t, ptr %154, i32 0, i32 1
  %156 = getelementptr inbounds %struct.anon.8, ptr %155, i32 0, i32 2
  %157 = load ptr, ptr %4, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.meter_pointer_cfg_t, ptr %157, i32 0, i32 3
  %159 = load i32, ptr %158, align 8, !tbaa !40
  %160 = trunc i32 %159 to i16
  %161 = call ptr @arm_2d_helper_pi_slider_init(ptr noundef %156, ptr noundef null, i16 noundef signext %160)
  br label %174

162:                                              ; preds = %146
  %163 = load ptr, ptr %3, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.meter_pointer_t, ptr %163, i32 0, i32 1
  %165 = getelementptr inbounds %struct.anon.8, ptr %164, i32 0, i32 2
  %166 = load ptr, ptr %3, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.meter_pointer_t, ptr %166, i32 0, i32 1
  %168 = getelementptr inbounds %struct.anon.8, ptr %167, i32 0, i32 0
  %169 = load ptr, ptr %4, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.meter_pointer_cfg_t, ptr %169, i32 0, i32 3
  %171 = load i32, ptr %170, align 8, !tbaa !40
  %172 = trunc i32 %171 to i16
  %173 = call ptr @arm_2d_helper_pi_slider_init(ptr noundef %165, ptr noundef %168, i16 noundef signext %172)
  br label %174

174:                                              ; preds = %162, %153
  br label %175

175:                                              ; preds = %174
  ret i32 0
}

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

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

; 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) #4

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

declare void @spin_zoom_widget_init(ptr noundef, ptr noundef) #5

declare ptr @arm_2d_helper_pi_slider_init(ptr noundef, ptr noundef, i16 noundef signext) #5

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 = { noreturn nounwind "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: write) }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { "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 #6 = { noreturn nounwind }
attributes #7 = { 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 = !{i64 0, i64 8, !5, i64 8, i64 8, !5, i64 16, i64 8, !5, i64 24, i64 8, !10, i64 32, i64 2, !10, i64 40, i64 8, !5, i64 48, i64 4, !11, i64 52, i64 4, !13, i64 56, i64 4, !11, i64 60, i64 4, !13, i64 64, i64 4, !11, i64 68, i64 4, !10, i64 72, i64 4, !11, i64 76, i64 4, !10}
!10 = !{!7, !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!16, !19, i64 82}
!16 = !{!"meter_pointer_cfg_t", !7, i64 0, !17, i64 80, !20, i64 84, !14, i64 96}
!17 = !{!"", !18, i64 0, !19, i64 2}
!18 = !{!"_Bool", !7, i64 0}
!19 = !{!"short", !7, i64 0}
!20 = !{!"arm_2d_helper_pi_slider_cfg_t", !14, i64 0, !12, i64 4, !12, i64 8}
!21 = !{!16, !18, i64 80}
!22 = !{i8 0, i8 2}
!23 = !{}
!24 = !{!25, !6, i64 16}
!25 = !{!"spin_zoom_widget_cfg_t", !6, i64 0, !26, i64 8, !6, i64 40, !27, i64 48, !14, i64 76}
!26 = !{!"", !6, i64 0, !6, i64 8, !7, i64 16, !7, i64 24}
!27 = !{!"", !28, i64 0, !28, i64 8, !29, i64 16}
!28 = !{!"", !12, i64 0, !14, i64 4}
!29 = !{!"", !12, i64 0, !7, i64 4, !12, i64 8}
!30 = !{!19, !19, i64 0}
!31 = !{!25, !6, i64 8}
!32 = !{!25, !14, i64 52}
!33 = !{!25, !14, i64 60}
!34 = !{i64 0, i64 4, !13, i64 4, i64 4, !11, i64 8, i64 4, !11}
!35 = !{!36, !12, i64 404}
!36 = !{!"meter_pointer_t", !7, i64 0, !37, i64 400}
!37 = !{!"", !20, i64 0, !38, i64 16, !12, i64 56}
!38 = !{!"arm_2d_helper_pi_slider_t", !7, i64 0}
!39 = !{!36, !14, i64 400}
!40 = !{!16, !14, i64 96}


; 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.spin_zoom_widget_cfg_t = type { ptr, %struct.anon.0, ptr, %struct.anon.3, i32 }
%struct.anon.0 = type { ptr, ptr, %union.anon.1, %union.anon.2 }
%union.anon.1 = type { %struct.arm_2d_point_float_t }
%struct.arm_2d_point_float_t = type { float, float }
%union.anon.2 = type { i16 }
%struct.anon.3 = type { %struct.anon.4, %struct.anon.5, %struct.anon.6 }
%struct.anon.4 = type { float, i32 }
%struct.anon.5 = type { float, i32 }
%struct.anon.6 = type { float, %union.anon.7, float }
%union.anon.7 = type { float }

@.str.1 = external hidden unnamed_addr constant [94 x i8], align 1
@__PRETTY_FUNCTION__.meter_pointer_init = external hidden unnamed_addr constant [74 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [6 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @meter_pointer_init(ptr noundef nonnull %0, ptr nocapture noundef nonnull readonly %1) local_unnamed_addr #0 {
  %3 = alloca %struct.spin_zoom_widget_cfg_t, align 8
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(464) %0, i8 0, i64 464, i1 false)
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %3) #6
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %3, ptr noundef nonnull align 8 dereferenceable(80) %1, i64 80, i1 false), !tbaa.struct !5
  %4 = getelementptr inbounds i8, ptr %1, i64 82
  %5 = load i16, ptr %4, align 2, !tbaa !15
  %6 = icmp sgt i16 %5, 0
  br i1 %6, label %7, label %38

7:                                                ; preds = %2
  %8 = getelementptr inbounds i8, ptr %1, i64 80
  %9 = getelementptr inbounds i8, ptr %3, i64 76
  %10 = load i32, ptr %9, align 4
  %11 = or i32 %10, 1
  store i32 %11, ptr %9, align 4
  %12 = load i8, ptr %8, align 8, !tbaa !21, !range !22, !noundef !23
  %13 = trunc nuw i8 %12 to i1
  %14 = uitofp nneg i16 %5 to float
  %15 = getelementptr inbounds i8, ptr %3, i64 24
  br i1 %13, label %16, label %27

16:                                               ; preds = %7
  store float %14, ptr %15, align 8, !tbaa !10
  %17 = getelementptr inbounds i8, ptr %3, i64 16
  %18 = load ptr, ptr %17, align 8, !tbaa !24
  %.not24 = icmp eq ptr %18, null
  br i1 %.not24, label %19, label %23

19:                                               ; preds = %16
  %20 = getelementptr inbounds i8, ptr %3, i64 8
  %21 = load ptr, ptr %20, align 8, !tbaa !30
  %.not25 = icmp eq ptr %21, null
  br i1 %.not25, label %22, label %23

22:                                               ; preds = %19
  tail call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 96, ptr noundef nonnull @__PRETTY_FUNCTION__.meter_pointer_init) #7
  unreachable

23:                                               ; preds = %19, %16
  %.pn26 = phi ptr [ %18, %16 ], [ %21, %19 ]
  %.018.in = getelementptr inbounds i8, ptr %.pn26, i64 10
  %.018 = load i16, ptr %.018.in, align 2, !tbaa !10
  %24 = sitofp i16 %.018 to float
  %25 = fmul float %24, 5.000000e-01
  %26 = getelementptr inbounds i8, ptr %3, i64 28
  store float %25, ptr %26, align 4, !tbaa !10
  br label %38

27:                                               ; preds = %7
  %28 = getelementptr inbounds i8, ptr %3, i64 28
  store float %14, ptr %28, align 4, !tbaa !10
  %29 = getelementptr inbounds i8, ptr %3, i64 16
  %30 = load ptr, ptr %29, align 8, !tbaa !24
  %.not = icmp eq ptr %30, null
  br i1 %.not, label %31, label %35

31:                                               ; preds = %27
  %32 = getelementptr inbounds i8, ptr %3, i64 8
  %33 = load ptr, ptr %32, align 8, !tbaa !30
  %.not23 = icmp eq ptr %33, null
  br i1 %.not23, label %34, label %35

34:                                               ; preds = %31
  tail call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 110, ptr noundef nonnull @__PRETTY_FUNCTION__.meter_pointer_init) #7
  unreachable

35:                                               ; preds = %31, %27
  %.pn = phi ptr [ %30, %27 ], [ %33, %31 ]
  %.0.in = getelementptr inbounds i8, ptr %.pn, i64 8
  %.0 = load i16, ptr %.0.in, align 4, !tbaa !10
  %36 = sitofp i16 %.0 to float
  %37 = fmul float %36, 5.000000e-01
  store float %37, ptr %15, align 8, !tbaa !10
  br label %38

38:                                               ; preds = %23, %35, %2
  call void @spin_zoom_widget_init(ptr noundef nonnull %0, ptr noundef nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %3) #6
  %39 = getelementptr inbounds i8, ptr %0, i64 400
  %40 = getelementptr inbounds i8, ptr %1, i64 84
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(12) %39, ptr noundef nonnull align 4 dereferenceable(12) %40, i64 12, i1 false), !tbaa.struct !31
  %41 = getelementptr inbounds i8, ptr %0, i64 404
  %42 = load float, ptr %41, align 4, !tbaa !32
  %43 = fcmp ugt float %42, 0.000000e+00
  br i1 %43, label %44, label %47

44:                                               ; preds = %38
  %45 = load i32, ptr %39, align 8, !tbaa !36
  %46 = icmp slt i32 %45, 1
  br i1 %46, label %47, label %53

47:                                               ; preds = %44, %38
  %48 = getelementptr inbounds i8, ptr %0, i64 416
  %49 = getelementptr inbounds i8, ptr %1, i64 96
  %50 = load i32, ptr %49, align 8, !tbaa !37
  %51 = trunc i32 %50 to i16
  %52 = call ptr @arm_2d_helper_pi_slider_init(ptr noundef nonnull %48, ptr noundef null, i16 noundef signext %51) #6
  br label %59

53:                                               ; preds = %44
  %54 = getelementptr inbounds i8, ptr %0, i64 416
  %55 = getelementptr inbounds i8, ptr %1, i64 96
  %56 = load i32, ptr %55, align 8, !tbaa !37
  %57 = trunc i32 %56 to i16
  %58 = call ptr @arm_2d_helper_pi_slider_init(ptr noundef nonnull %54, ptr noundef nonnull %39, i16 noundef signext %57) #6
  br label %59

59:                                               ; preds = %47, %53
  ret i32 0
}

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

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

; Function Attrs: mustprogress 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) #4

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

declare void @spin_zoom_widget_init(ptr noundef, ptr noundef) local_unnamed_addr #5

declare ptr @arm_2d_helper_pi_slider_init(ptr noundef, ptr noundef, i16 noundef signext) local_unnamed_addr #5

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 = { noreturn nounwind "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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { "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 #6 = { nounwind }
attributes #7 = { noreturn 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 = !{i64 0, i64 8, !6, i64 8, i64 8, !6, i64 16, i64 8, !6, i64 24, i64 8, !10, i64 32, i64 2, !10, i64 40, i64 8, !6, i64 48, i64 4, !11, i64 52, i64 4, !13, i64 56, i64 4, !11, i64 60, i64 4, !13, i64 64, i64 4, !11, i64 68, i64 4, !10, i64 72, i64 4, !11, i64 76, i64 4, !10}
!6 = !{!7, !7, i64 0}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!8, !8, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !8, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !8, i64 0}
!15 = !{!16, !19, i64 82}
!16 = !{!"meter_pointer_cfg_t", !8, i64 0, !17, i64 80, !20, i64 84, !14, i64 96}
!17 = !{!"", !18, i64 0, !19, i64 2}
!18 = !{!"_Bool", !8, i64 0}
!19 = !{!"short", !8, i64 0}
!20 = !{!"arm_2d_helper_pi_slider_cfg_t", !14, i64 0, !12, i64 4, !12, i64 8}
!21 = !{!16, !18, i64 80}
!22 = !{i8 0, i8 2}
!23 = !{}
!24 = !{!25, !7, i64 16}
!25 = !{!"spin_zoom_widget_cfg_t", !7, i64 0, !26, i64 8, !7, i64 40, !27, i64 48, !14, i64 76}
!26 = !{!"", !7, i64 0, !7, i64 8, !8, i64 16, !8, i64 24}
!27 = !{!"", !28, i64 0, !28, i64 8, !29, i64 16}
!28 = !{!"", !12, i64 0, !14, i64 4}
!29 = !{!"", !12, i64 0, !8, i64 4, !12, i64 8}
!30 = !{!25, !7, i64 8}
!31 = !{i64 0, i64 4, !13, i64 4, i64 4, !11, i64 8, i64 4, !11}
!32 = !{!33, !12, i64 404}
!33 = !{!"meter_pointer_t", !8, i64 0, !34, i64 400}
!34 = !{!"", !20, i64 0, !35, i64 16, !12, i64 56}
!35 = !{!"arm_2d_helper_pi_slider_t", !8, i64 0}
!36 = !{!33, !14, i64 400}
!37 = !{!16, !14, i64 96}


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