; LLVM IR from beagleboard/librobotcontrol :: library/src/io (i2c)

; 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.rc_i2c_state_t = type { i8, i32, i32, i32 }

@i2c = external hidden global [6 x %struct.rc_i2c_state_t], align 16
@stderr = external global ptr, align 8
@.str.15 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [70 x i8], align 1

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

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)
declare i64 @llvm.expect.i64(i64, i64) #1

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

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #3

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

declare i64 @write(i32 noundef, ptr noundef, i64 noundef) #4

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare ptr @llvm.stacksave.p0() #5

; Function Attrs: nocallback nofree nosync nounwind willreturn
declare void @llvm.stackrestore.p0(ptr) #5

; Function Attrs: nounwind uwtable
define dso_local i32 @rc_i2c_write_words(i32 noundef %0, i8 noundef zeroext %1, i64 noundef %2, ptr noundef %3) #0 {
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i8, align 1
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i64, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  %15 = alloca i32, align 4
  store i32 %0, ptr %6, align 4, !tbaa !5
  store i8 %1, ptr %7, align 1, !tbaa !9
  store i64 %2, ptr %8, align 8, !tbaa !10
  store ptr %3, ptr %9, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %16 = load i64, ptr %8, align 8, !tbaa !10
  %17 = mul i64 %16, 2
  %18 = add i64 %17, 1
  %19 = call ptr @llvm.stacksave.p0()
  store ptr %19, ptr %13, align 8
  %20 = alloca i8, i64 %18, align 16
  store i64 %18, ptr %14, align 8
  %21 = load i32, ptr %6, align 4, !tbaa !5
  %22 = call i32 @__check_bus_range(i32 noundef %21)
  %23 = icmp ne i32 %22, 0
  %24 = xor i1 %23, true
  %25 = xor i1 %24, true
  %26 = zext i1 %25 to i32
  %27 = sext i32 %26 to i64
  %28 = call i64 @llvm.expect.i64(i64 %27, i64 0)
  %29 = icmp ne i64 %28, 0
  br i1 %29, label %30, label %31

30:                                               ; preds = %4
  store i32 -1, ptr %5, align 4
  store i32 1, ptr %15, align 4
  br label %130

31:                                               ; preds = %4
  %32 = load i32, ptr %6, align 4, !tbaa !5
  %33 = sext i32 %32 to i64
  %34 = getelementptr inbounds [6 x %struct.rc_i2c_state_t], ptr @i2c, i64 0, i64 %33
  %35 = getelementptr inbounds %struct.rc_i2c_state_t, ptr %34, i32 0, i32 2
  %36 = load i32, ptr %35, align 8, !tbaa !14
  %37 = icmp eq i32 %36, 0
  %38 = xor i1 %37, true
  %39 = xor i1 %38, true
  %40 = zext i1 %39 to i32
  %41 = sext i32 %40 to i64
  %42 = call i64 @llvm.expect.i64(i64 %41, i64 0)
  %43 = icmp ne i64 %42, 0
  br i1 %43, label %44, label %47

44:                                               ; preds = %31
  %45 = load ptr, ptr @stderr, align 8, !tbaa !12
  %46 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %45, ptr noundef @.str.15) #6
  store i32 -1, ptr %5, align 4
  store i32 1, ptr %15, align 4
  br label %130

47:                                               ; preds = %31
  %48 = load i32, ptr %6, align 4, !tbaa !5
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds [6 x %struct.rc_i2c_state_t], ptr @i2c, i64 0, i64 %49
  %51 = getelementptr inbounds %struct.rc_i2c_state_t, ptr %50, i32 0, i32 3
  %52 = load i32, ptr %51, align 4, !tbaa !16
  store i32 %52, ptr %11, align 4, !tbaa !5
  %53 = load i32, ptr %6, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %55 = getelementptr inbounds [6 x %struct.rc_i2c_state_t], ptr @i2c, i64 0, i64 %54
  %56 = getelementptr inbounds %struct.rc_i2c_state_t, ptr %55, i32 0, i32 3
  store i32 1, ptr %56, align 4, !tbaa !16
  %57 = load i8, ptr %7, align 1, !tbaa !9
  %58 = getelementptr inbounds i8, ptr %20, i64 0
  store i8 %57, ptr %58, align 16, !tbaa !9
  store i64 0, ptr %12, align 8, !tbaa !10
  br label %59

59:                                               ; preds = %86, %47
  %60 = load i64, ptr %12, align 8, !tbaa !10
  %61 = load i64, ptr %8, align 8, !tbaa !10
  %62 = icmp ult i64 %60, %61
  br i1 %62, label %63, label %89

63:                                               ; preds = %59
  %64 = load ptr, ptr %9, align 8, !tbaa !12
  %65 = load i64, ptr %12, align 8, !tbaa !10
  %66 = getelementptr inbounds i16, ptr %64, i64 %65
  %67 = load i16, ptr %66, align 2, !tbaa !17
  %68 = zext i16 %67 to i32
  %69 = ashr i32 %68, 8
  %70 = trunc i32 %69 to i8
  %71 = load i64, ptr %12, align 8, !tbaa !10
  %72 = mul i64 %71, 2
  %73 = add i64 %72, 1
  %74 = getelementptr inbounds i8, ptr %20, i64 %73
  store i8 %70, ptr %74, align 1, !tbaa !9
  %75 = load ptr, ptr %9, align 8, !tbaa !12
  %76 = load i64, ptr %12, align 8, !tbaa !10
  %77 = getelementptr inbounds i16, ptr %75, i64 %76
  %78 = load i16, ptr %77, align 2, !tbaa !17
  %79 = zext i16 %78 to i32
  %80 = and i32 %79, 255
  %81 = trunc i32 %80 to i8
  %82 = load i64, ptr %12, align 8, !tbaa !10
  %83 = mul i64 %82, 2
  %84 = add i64 %83, 2
  %85 = getelementptr inbounds i8, ptr %20, i64 %84
  store i8 %81, ptr %85, align 1, !tbaa !9
  br label %86

86:                                               ; preds = %63
  %87 = load i64, ptr %12, align 8, !tbaa !10
  %88 = add i64 %87, 1
  store i64 %88, ptr %12, align 8, !tbaa !10
  br label %59, !llvm.loop !19

89:                                               ; preds = %59
  %90 = load i32, ptr %6, align 4, !tbaa !5
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds [6 x %struct.rc_i2c_state_t], ptr @i2c, i64 0, i64 %91
  %93 = getelementptr inbounds %struct.rc_i2c_state_t, ptr %92, i32 0, i32 1
  %94 = load i32, ptr %93, align 4, !tbaa !21
  %95 = load i64, ptr %8, align 8, !tbaa !10
  %96 = mul i64 %95, 2
  %97 = add i64 %96, 1
  %98 = call i64 @write(i32 noundef %94, ptr noundef %20, i64 noundef %97)
  %99 = trunc i64 %98 to i32
  store i32 %99, ptr %10, align 4, !tbaa !5
  %100 = load i32, ptr %10, align 4, !tbaa !5
  %101 = load i64, ptr %8, align 8, !tbaa !10
  %102 = mul i64 %101, 2
  %103 = trunc i64 %102 to i32
  %104 = add nsw i32 %103, 1
  %105 = icmp ne i32 %100, %104
  %106 = xor i1 %105, true
  %107 = xor i1 %106, true
  %108 = zext i1 %107 to i32
  %109 = sext i32 %108 to i64
  %110 = call i64 @llvm.expect.i64(i64 %109, i64 0)
  %111 = icmp ne i64 %110, 0
  br i1 %111, label %112, label %124

112:                                              ; preds = %89
  %113 = load ptr, ptr @stderr, align 8, !tbaa !12
  %114 = load i32, ptr %10, align 4, !tbaa !5
  %115 = load i64, ptr %8, align 8, !tbaa !10
  %116 = mul i64 %115, 2
  %117 = add i64 %116, 1
  %118 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %113, ptr noundef @.str.16, i32 noundef %114, i64 noundef %117) #6
  %119 = load i32, ptr %11, align 4, !tbaa !5
  %120 = load i32, ptr %6, align 4, !tbaa !5
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds [6 x %struct.rc_i2c_state_t], ptr @i2c, i64 0, i64 %121
  %123 = getelementptr inbounds %struct.rc_i2c_state_t, ptr %122, i32 0, i32 3
  store i32 %119, ptr %123, align 4, !tbaa !16
  store i32 -1, ptr %5, align 4
  store i32 1, ptr %15, align 4
  br label %130

124:                                              ; preds = %89
  %125 = load i32, ptr %11, align 4, !tbaa !5
  %126 = load i32, ptr %6, align 4, !tbaa !5
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [6 x %struct.rc_i2c_state_t], ptr @i2c, i64 0, i64 %127
  %129 = getelementptr inbounds %struct.rc_i2c_state_t, ptr %128, i32 0, i32 3
  store i32 %125, ptr %129, align 4, !tbaa !16
  store i32 0, ptr %5, align 4
  store i32 1, ptr %15, align 4
  br label %130

130:                                              ; preds = %124, %112, %44, %30
  %131 = load ptr, ptr %13, align 8
  call void @llvm.stackrestore.p0(ptr %131)
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  %132 = load i32, ptr %5, align 4
  ret i32 %132
}

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(none) }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #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 = { nocallback nofree nosync nounwind willreturn }
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 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"long", !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!15, !6, i64 8}
!15 = !{!"rc_i2c_state_t", !7, i64 0, !6, i64 4, !6, i64 8, !6, i64 12}
!16 = !{!15, !6, i64 12}
!17 = !{!18, !18, i64 0}
!18 = !{!"short", !7, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!15, !6, i64 4}


; 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.rc_i2c_state_t = type { i8, i32, i32, i32 }

@i2c = external hidden local_unnamed_addr global [6 x %struct.rc_i2c_state_t], align 16
@stderr = external local_unnamed_addr global ptr, align 8
@.str.15 = external hidden unnamed_addr constant [55 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [70 x i8], align 1

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

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #1

; Function Attrs: nofree
declare noundef i64 @write(i32 noundef, ptr nocapture noundef readonly, i64 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 1) i32 @rc_i2c_write_words(i32 noundef %0, i8 noundef zeroext %1, i64 noundef %2, ptr nocapture noundef readonly %3) local_unnamed_addr #0 {
  %5 = shl i64 %2, 1
  %6 = or disjoint i64 %5, 1
  %7 = alloca i8, i64 %6, align 16
  %8 = tail call i32 @__check_bus_range(i32 noundef %0)
  %.not = icmp eq i32 %8, 0
  br i1 %.not, label %9, label %77, !prof !5

9:                                                ; preds = %4
  %10 = sext i32 %0 to i64
  %11 = getelementptr inbounds [6 x %struct.rc_i2c_state_t], ptr @i2c, i64 0, i64 %10
  %12 = getelementptr inbounds i8, ptr %11, i64 8
  %13 = load i32, ptr %12, align 8, !tbaa !6
  %14 = icmp eq i32 %13, 0
  br i1 %14, label %15, label %18, !prof !11

15:                                               ; preds = %9
  %16 = load ptr, ptr @stderr, align 8, !tbaa !12
  %17 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %16, ptr noundef nonnull @.str.15) #3
  br label %77

18:                                               ; preds = %9
  %19 = getelementptr inbounds i8, ptr %11, i64 12
  %20 = load i32, ptr %19, align 4, !tbaa !14
  store i32 1, ptr %19, align 4, !tbaa !14
  store i8 %1, ptr %7, align 16, !tbaa !15
  %invariant.gep = getelementptr i8, ptr %7, i64 2
  %.not30 = icmp eq i64 %2, 0
  br i1 %.not30, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %18
  %min.iters.check = icmp ult i64 %2, 16
  br i1 %min.iters.check, label %.lr.ph.preheader36, label %vector.scevcheck

vector.scevcheck:                                 ; preds = %.lr.ph.preheader
  %21 = add i64 %2, -1
  %scevgep = getelementptr i8, ptr %7, i64 1
  %mul.result = shl i64 %21, 1
  %22 = getelementptr i8, ptr %scevgep, i64 %mul.result
  %23 = icmp ult ptr %22, %scevgep
  %mul.result32 = shl i64 %21, 1
  %mul.overflow33 = icmp slt i64 %21, 0
  %24 = getelementptr i8, ptr %invariant.gep, i64 %mul.result32
  %25 = icmp ult ptr %24, %invariant.gep
  %26 = or i1 %25, %mul.overflow33
  %27 = or i1 %23, %26
  br i1 %27, label %.lr.ph.preheader36, label %vector.ph

vector.ph:                                        ; preds = %vector.scevcheck
  %n.vec = and i64 %2, -16
  %invariant.gep37 = getelementptr i8, ptr %invariant.gep, i64 -1
  %invariant.gep39 = getelementptr i8, ptr %invariant.gep, i64 -1
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %28 = getelementptr inbounds i16, ptr %3, i64 %index
  %29 = getelementptr inbounds i8, ptr %28, i64 16
  %wide.load = load <8 x i16>, ptr %28, align 2, !tbaa !16
  %wide.load34 = load <8 x i16>, ptr %29, align 2, !tbaa !16
  %30 = lshr <8 x i16> %wide.load, <i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8>
  %31 = lshr <8 x i16> %wide.load34, <i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8, i16 8>
  %32 = shl i64 %index, 1
  %33 = shl i64 %index, 1
  %34 = or disjoint i64 %33, 16
  %gep38 = getelementptr i8, ptr %invariant.gep37, i64 %32
  %gep40 = getelementptr i8, ptr %invariant.gep39, i64 %34
  %35 = shufflevector <8 x i16> %30, <8 x i16> %wide.load, <16 x i32> <i32 0, i32 8, i32 1, i32 9, i32 2, i32 10, i32 3, i32 11, i32 4, i32 12, i32 5, i32 13, i32 6, i32 14, i32 7, i32 15>
  %interleaved.vec = trunc <16 x i16> %35 to <16 x i8>
  store <16 x i8> %interleaved.vec, ptr %gep38, align 1, !tbaa !15
  %36 = shufflevector <8 x i16> %31, <8 x i16> %wide.load34, <16 x i32> <i32 0, i32 8, i32 1, i32 9, i32 2, i32 10, i32 3, i32 11, i32 4, i32 12, i32 5, i32 13, i32 6, i32 14, i32 7, i32 15>
  %interleaved.vec35 = trunc <16 x i16> %36 to <16 x i8>
  store <16 x i8> %interleaved.vec35, ptr %gep40, align 1, !tbaa !15
  %index.next = add nuw i64 %index, 16
  %37 = icmp eq i64 %index.next, %n.vec
  br i1 %37, label %middle.block, label %vector.body, !llvm.loop !18

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %n.vec, %2
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph.preheader36

.lr.ph.preheader36:                               ; preds = %middle.block, %vector.scevcheck, %.lr.ph.preheader
  %.02629.ph = phi i64 [ 0, %vector.scevcheck ], [ 0, %.lr.ph.preheader ], [ %n.vec, %middle.block ]
  %xtraiter = and i64 %2, 1
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol

.lr.ph.prol:                                      ; preds = %.lr.ph.preheader36
  %38 = getelementptr inbounds i16, ptr %3, i64 %.02629.ph
  %39 = load i16, ptr %38, align 2, !tbaa !16
  %40 = lshr i16 %39, 8
  %41 = trunc nuw i16 %40 to i8
  %42 = shl i64 %.02629.ph, 1
  %43 = or disjoint i64 %42, 1
  %44 = getelementptr inbounds i8, ptr %7, i64 %43
  store i8 %41, ptr %44, align 1, !tbaa !15
  %45 = trunc i16 %39 to i8
  %gep.prol = getelementptr i8, ptr %invariant.gep, i64 %42
  store i8 %45, ptr %gep.prol, align 2, !tbaa !15
  %46 = or disjoint i64 %.02629.ph, 1
  br label %.lr.ph.prol.loopexit

.lr.ph.prol.loopexit:                             ; preds = %.lr.ph.prol, %.lr.ph.preheader36
  %.02629.unr = phi i64 [ %.02629.ph, %.lr.ph.preheader36 ], [ %46, %.lr.ph.prol ]
  %47 = add i64 %2, -1
  %48 = icmp eq i64 %.02629.ph, %47
  br i1 %48, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.prol.loopexit, %.lr.ph
  %.02629 = phi i64 [ %66, %.lr.ph ], [ %.02629.unr, %.lr.ph.prol.loopexit ]
  %49 = getelementptr inbounds i16, ptr %3, i64 %.02629
  %50 = load i16, ptr %49, align 2, !tbaa !16
  %51 = lshr i16 %50, 8
  %52 = trunc nuw i16 %51 to i8
  %53 = shl i64 %.02629, 1
  %54 = or disjoint i64 %53, 1
  %55 = getelementptr inbounds i8, ptr %7, i64 %54
  store i8 %52, ptr %55, align 1, !tbaa !15
  %56 = trunc i16 %50 to i8
  %gep = getelementptr i8, ptr %invariant.gep, i64 %53
  store i8 %56, ptr %gep, align 2, !tbaa !15
  %57 = add nuw i64 %.02629, 1
  %58 = getelementptr inbounds i16, ptr %3, i64 %57
  %59 = load i16, ptr %58, align 2, !tbaa !16
  %60 = lshr i16 %59, 8
  %61 = trunc nuw i16 %60 to i8
  %62 = shl i64 %57, 1
  %63 = or disjoint i64 %62, 1
  %64 = getelementptr inbounds i8, ptr %7, i64 %63
  store i8 %61, ptr %64, align 1, !tbaa !15
  %65 = trunc i16 %59 to i8
  %gep.1 = getelementptr i8, ptr %invariant.gep, i64 %62
  store i8 %65, ptr %gep.1, align 2, !tbaa !15
  %66 = add nuw i64 %.02629, 2
  %exitcond.not.1 = icmp eq i64 %66, %2
  br i1 %exitcond.not.1, label %._crit_edge, label %.lr.ph, !llvm.loop !22

._crit_edge:                                      ; preds = %.lr.ph.prol.loopexit, %.lr.ph, %middle.block, %18
  %67 = getelementptr inbounds i8, ptr %11, i64 4
  %68 = load i32, ptr %67, align 4, !tbaa !23
  %69 = call i64 @write(i32 noundef %68, ptr noundef nonnull %7, i64 noundef %6) #4
  %70 = trunc i64 %69 to i32
  %71 = trunc i64 %5 to i32
  %72 = or disjoint i32 %71, 1
  %.not28 = icmp eq i32 %72, %70
  br i1 %.not28, label %76, label %73, !prof !5

73:                                               ; preds = %._crit_edge
  %74 = load ptr, ptr @stderr, align 8, !tbaa !12
  %75 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %74, ptr noundef nonnull @.str.16, i32 noundef %70, i64 noundef %6) #3
  store i32 %20, ptr %19, align 4, !tbaa !14
  br label %77

76:                                               ; preds = %._crit_edge
  store i32 %20, ptr %19, align 4, !tbaa !14
  br label %77

77:                                               ; preds = %4, %76, %73, %15
  %.0 = phi i32 [ -1, %15 ], [ -1, %73 ], [ 0, %76 ], [ -1, %4 ]
  ret i32 %.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" }
attributes #1 = { nofree 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 = { nofree "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 = { cold nounwind }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!"branch_weights", !"expected", i32 2000, i32 1}
!6 = !{!7, !10, i64 8}
!7 = !{!"rc_i2c_state_t", !8, i64 0, !10, i64 4, !10, i64 8, !10, i64 12}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"branch_weights", !"expected", i32 1, i32 2000}
!12 = !{!13, !13, i64 0}
!13 = !{!"any pointer", !8, i64 0}
!14 = !{!7, !10, i64 12}
!15 = !{!8, !8, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"short", !8, i64 0}
!18 = distinct !{!18, !19, !20, !21}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!"llvm.loop.isvectorized", i32 1}
!21 = !{!"llvm.loop.unroll.runtime.disable"}
!22 = distinct !{!22, !19, !20}
!23 = !{!7, !10, i64 4}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalDCEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,LowerExpectIntrinsicPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass,VectorCombinePass