; LLVM IR from intel/cryptography-primitives :: sources/ippcp/crypto_mb/src/sm4/ccm (sm4_ccm_update_aad_mb16_api)

; 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._sm4_ccm_context_mb16 = type { [16 x i64], [16 x i64], [16 x i32], [16 x i32], [16 x <2 x i64>], [16 x <2 x i64>], [16 x <2 x i64>], [32 x [16 x i32]], i32 }

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

14:                                               ; preds = %3
  %15 = load ptr, ptr %6, align 8, !tbaa !5
  %16 = icmp eq ptr null, %15
  br i1 %16, label %20, label %17

17:                                               ; preds = %14
  %18 = load ptr, ptr %7, align 8, !tbaa !5
  %19 = icmp eq ptr null, %18
  br i1 %19, label %20, label %23

20:                                               ; preds = %17, %14, %3
  %21 = call i64 @MBX_SET_STS16_ALL(i64 noundef 2)
  store i64 %21, ptr %9, align 8, !tbaa !9
  %22 = load i64, ptr %9, align 8, !tbaa !9
  store i64 %22, ptr %4, align 8
  store i32 1, ptr %11, align 4
  br label %94

23:                                               ; preds = %17
  %24 = load ptr, ptr %7, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct._sm4_ccm_context_mb16, ptr %24, i32 0, i32 8
  %26 = load i32, ptr %25, align 16, !tbaa !13
  %27 = icmp ne i32 61601, %26
  br i1 %27, label %28, label %31

28:                                               ; preds = %23
  %29 = call i64 @MBX_SET_STS16_ALL(i64 noundef 1)
  store i64 %29, ptr %9, align 8, !tbaa !9
  %30 = load i64, ptr %9, align 8, !tbaa !9
  store i64 %30, ptr %4, align 8
  store i32 1, ptr %11, align 4
  br label %94

31:                                               ; preds = %23
  store i32 0, ptr %8, align 4, !tbaa !16
  br label %32

32:                                               ; preds = %87, %31
  %33 = load i32, ptr %8, align 4, !tbaa !16
  %34 = icmp slt i32 %33, 16
  br i1 %34, label %35, label %90

35:                                               ; preds = %32
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  %37 = load i32, ptr %8, align 4, !tbaa !16
  %38 = sext i32 %37 to i64
  %39 = getelementptr inbounds ptr, ptr %36, i64 %38
  %40 = load ptr, ptr %39, align 8, !tbaa !5
  %41 = icmp eq ptr %40, null
  br i1 %41, label %42, label %61

42:                                               ; preds = %35
  %43 = load ptr, ptr %6, align 8, !tbaa !5
  %44 = load i32, ptr %8, align 4, !tbaa !16
  %45 = sext i32 %44 to i64
  %46 = getelementptr inbounds i32, ptr %43, i64 %45
  %47 = load i32, ptr %46, align 4, !tbaa !16
  %48 = icmp ne i32 %47, 0
  br i1 %48, label %49, label %60

49:                                               ; preds = %42
  %50 = load i64, ptr %9, align 8, !tbaa !9
  %51 = load i32, ptr %8, align 4, !tbaa !16
  %52 = call i64 @MBX_SET_STS16(i64 noundef %50, i32 noundef %51, i64 noundef 2)
  store i64 %52, ptr %9, align 8, !tbaa !9
  %53 = load i32, ptr %8, align 4, !tbaa !16
  %54 = shl i32 1, %53
  %55 = xor i32 %54, -1
  %56 = load i16, ptr %10, align 2, !tbaa !11
  %57 = zext i16 %56 to i32
  %58 = and i32 %57, %55
  %59 = trunc i32 %58 to i16
  store i16 %59, ptr %10, align 2, !tbaa !11
  br label %87

60:                                               ; preds = %42
  br label %61

61:                                               ; preds = %60, %35
  %62 = load ptr, ptr %6, align 8, !tbaa !5
  %63 = load i32, ptr %8, align 4, !tbaa !16
  %64 = sext i32 %63 to i64
  %65 = getelementptr inbounds i32, ptr %62, i64 %64
  %66 = load i32, ptr %65, align 4, !tbaa !16
  %67 = icmp slt i32 %66, 0
  br i1 %67, label %75, label %68

68:                                               ; preds = %61
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  %70 = load i32, ptr %8, align 4, !tbaa !16
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds i32, ptr %69, i64 %71
  %73 = load i32, ptr %72, align 4, !tbaa !16
  %74 = icmp sgt i32 %73, 65280
  br i1 %74, label %75, label %86

75:                                               ; preds = %68, %61
  %76 = load i64, ptr %9, align 8, !tbaa !9
  %77 = load i32, ptr %8, align 4, !tbaa !16
  %78 = call i64 @MBX_SET_STS16(i64 noundef %76, i32 noundef %77, i64 noundef 1)
  store i64 %78, ptr %9, align 8, !tbaa !9
  %79 = load i32, ptr %8, align 4, !tbaa !16
  %80 = shl i32 1, %79
  %81 = xor i32 %80, -1
  %82 = load i16, ptr %10, align 2, !tbaa !11
  %83 = zext i16 %82 to i32
  %84 = and i32 %83, %81
  %85 = trunc i32 %84 to i16
  store i16 %85, ptr %10, align 2, !tbaa !11
  br label %86

86:                                               ; preds = %75, %68
  br label %87

87:                                               ; preds = %86, %49
  %88 = load i32, ptr %8, align 4, !tbaa !16
  %89 = add nsw i32 %88, 1
  store i32 %89, ptr %8, align 4, !tbaa !16
  br label %32, !llvm.loop !17

90:                                               ; preds = %32
  %91 = load i16, ptr %10, align 2, !tbaa !11
  %92 = call i64 @MBX_SET_STS16_ALL(i64 noundef 10)
  store i64 %92, ptr %9, align 8, !tbaa !9
  %93 = load i64, ptr %9, align 8, !tbaa !9
  store i64 %93, ptr %4, align 8
  store i32 1, ptr %11, align 4
  br label %94

94:                                               ; preds = %90, %28, %20
  call void @llvm.lifetime.end.p0(i64 2, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  %95 = load i64, ptr %4, align 8
  ret i64 %95
}

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

; Function Attrs: alwaysinline nounwind uwtable
declare hidden i64 @MBX_SET_STS16_ALL(i64 noundef) #2

; Function Attrs: alwaysinline nounwind uwtable
declare hidden i64 @MBX_SET_STS16(i64 noundef, i32 noundef, i64 noundef) #2

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { alwaysinline 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 }

!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 = !{!"long long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"short", !7, i64 0}
!13 = !{!14, !15, i64 3200}
!14 = !{!"_sm4_ccm_context_mb16", !7, i64 0, !7, i64 128, !7, i64 256, !7, i64 320, !7, i64 384, !7, i64 640, !7, i64 896, !7, i64 1152, !15, i64 3200}
!15 = !{!"int", !7, i64 0}
!16 = !{!15, !15, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

; Function Attrs: nounwind uwtable
define dso_local i64 @mbx_sm4_ccm_update_aad_mb16(ptr noundef readonly %0, ptr noundef readonly %1, ptr noundef readonly %2) local_unnamed_addr #0 {
  %4 = icmp eq ptr %0, null
  %5 = icmp eq ptr %1, null
  %or.cond = or i1 %4, %5
  %6 = icmp eq ptr %2, null
  %or.cond3 = or i1 %or.cond, %6
  br i1 %or.cond3, label %.loopexit, label %7

7:                                                ; preds = %3
  %8 = getelementptr inbounds i8, ptr %2, i64 3200
  %9 = load i32, ptr %8, align 16, !tbaa !5
  %.not = icmp eq i32 %9, 61601
  br i1 %.not, label %.preheader, label %.loopexit

.preheader:                                       ; preds = %7
  %10 = load ptr, ptr %0, align 8, !tbaa !10
  %11 = icmp eq ptr %10, null
  %12 = load i32, ptr %1, align 4, !tbaa !12
  br i1 %11, label %13, label %14

13:                                               ; preds = %.preheader
  %.not37 = icmp eq i32 %12, 0
  br i1 %.not37, label %.thread, label %.thread.sink.split

14:                                               ; preds = %.preheader
  %or.cond38 = icmp ugt i32 %12, 65280
  br i1 %or.cond38, label %.thread.sink.split, label %.thread

.thread.sink.split:                               ; preds = %14, %13
  %.sink44 = phi i64 [ 2, %13 ], [ 1, %14 ]
  %15 = tail call i64 @MBX_SET_STS16(i64 noundef 0, i32 noundef 0, i64 noundef %.sink44)
  br label %.thread

.thread:                                          ; preds = %.thread.sink.split, %13, %14
  %.130 = phi i64 [ 0, %14 ], [ 0, %13 ], [ %15, %.thread.sink.split ]
  %16 = getelementptr inbounds i8, ptr %0, i64 8
  %17 = load ptr, ptr %16, align 8, !tbaa !10
  %18 = icmp eq ptr %17, null
  %19 = getelementptr inbounds i8, ptr %1, i64 4
  %20 = load i32, ptr %19, align 4, !tbaa !12
  br i1 %18, label %22, label %21

21:                                               ; preds = %.thread
  %or.cond38.1 = icmp ugt i32 %20, 65280
  br i1 %or.cond38.1, label %.thread.sink.split.1, label %.thread.1

22:                                               ; preds = %.thread
  %.not37.1 = icmp eq i32 %20, 0
  br i1 %.not37.1, label %.thread.1, label %.thread.sink.split.1

.thread.sink.split.1:                             ; preds = %22, %21
  %.sink44.1 = phi i64 [ 2, %22 ], [ 1, %21 ]
  %23 = tail call i64 @MBX_SET_STS16(i64 noundef %.130, i32 noundef 1, i64 noundef %.sink44.1)
  br label %.thread.1

.thread.1:                                        ; preds = %.thread.sink.split.1, %22, %21
  %.130.1 = phi i64 [ %.130, %21 ], [ %.130, %22 ], [ %23, %.thread.sink.split.1 ]
  %24 = getelementptr inbounds i8, ptr %0, i64 16
  %25 = load ptr, ptr %24, align 8, !tbaa !10
  %26 = icmp eq ptr %25, null
  %27 = getelementptr inbounds i8, ptr %1, i64 8
  %28 = load i32, ptr %27, align 4, !tbaa !12
  br i1 %26, label %30, label %29

29:                                               ; preds = %.thread.1
  %or.cond38.2 = icmp ugt i32 %28, 65280
  br i1 %or.cond38.2, label %.thread.sink.split.2, label %.thread.2

30:                                               ; preds = %.thread.1
  %.not37.2 = icmp eq i32 %28, 0
  br i1 %.not37.2, label %.thread.2, label %.thread.sink.split.2

.thread.sink.split.2:                             ; preds = %30, %29
  %.sink44.2 = phi i64 [ 2, %30 ], [ 1, %29 ]
  %31 = tail call i64 @MBX_SET_STS16(i64 noundef %.130.1, i32 noundef 2, i64 noundef %.sink44.2)
  br label %.thread.2

.thread.2:                                        ; preds = %.thread.sink.split.2, %30, %29
  %.130.2 = phi i64 [ %.130.1, %29 ], [ %.130.1, %30 ], [ %31, %.thread.sink.split.2 ]
  %32 = getelementptr inbounds i8, ptr %0, i64 24
  %33 = load ptr, ptr %32, align 8, !tbaa !10
  %34 = icmp eq ptr %33, null
  %35 = getelementptr inbounds i8, ptr %1, i64 12
  %36 = load i32, ptr %35, align 4, !tbaa !12
  br i1 %34, label %38, label %37

37:                                               ; preds = %.thread.2
  %or.cond38.3 = icmp ugt i32 %36, 65280
  br i1 %or.cond38.3, label %.thread.sink.split.3, label %.thread.3

38:                                               ; preds = %.thread.2
  %.not37.3 = icmp eq i32 %36, 0
  br i1 %.not37.3, label %.thread.3, label %.thread.sink.split.3

.thread.sink.split.3:                             ; preds = %38, %37
  %.sink44.3 = phi i64 [ 2, %38 ], [ 1, %37 ]
  %39 = tail call i64 @MBX_SET_STS16(i64 noundef %.130.2, i32 noundef 3, i64 noundef %.sink44.3)
  br label %.thread.3

.thread.3:                                        ; preds = %.thread.sink.split.3, %38, %37
  %.130.3 = phi i64 [ %.130.2, %37 ], [ %.130.2, %38 ], [ %39, %.thread.sink.split.3 ]
  %40 = getelementptr inbounds i8, ptr %0, i64 32
  %41 = load ptr, ptr %40, align 8, !tbaa !10
  %42 = icmp eq ptr %41, null
  %43 = getelementptr inbounds i8, ptr %1, i64 16
  %44 = load i32, ptr %43, align 4, !tbaa !12
  br i1 %42, label %46, label %45

45:                                               ; preds = %.thread.3
  %or.cond38.4 = icmp ugt i32 %44, 65280
  br i1 %or.cond38.4, label %.thread.sink.split.4, label %.thread.4

46:                                               ; preds = %.thread.3
  %.not37.4 = icmp eq i32 %44, 0
  br i1 %.not37.4, label %.thread.4, label %.thread.sink.split.4

.thread.sink.split.4:                             ; preds = %46, %45
  %.sink44.4 = phi i64 [ 2, %46 ], [ 1, %45 ]
  %47 = tail call i64 @MBX_SET_STS16(i64 noundef %.130.3, i32 noundef 4, i64 noundef %.sink44.4)
  br label %.thread.4

.thread.4:                                        ; preds = %.thread.sink.split.4, %46, %45
  %.130.4 = phi i64 [ %.130.3, %45 ], [ %.130.3, %46 ], [ %47, %.thread.sink.split.4 ]
  %48 = getelementptr inbounds i8, ptr %0, i64 40
  %49 = load ptr, ptr %48, align 8, !tbaa !10
  %50 = icmp eq ptr %49, null
  %51 = getelementptr inbounds i8, ptr %1, i64 20
  %52 = load i32, ptr %51, align 4, !tbaa !12
  br i1 %50, label %54, label %53

53:                                               ; preds = %.thread.4
  %or.cond38.5 = icmp ugt i32 %52, 65280
  br i1 %or.cond38.5, label %.thread.sink.split.5, label %.thread.5

54:                                               ; preds = %.thread.4
  %.not37.5 = icmp eq i32 %52, 0
  br i1 %.not37.5, label %.thread.5, label %.thread.sink.split.5

.thread.sink.split.5:                             ; preds = %54, %53
  %.sink44.5 = phi i64 [ 2, %54 ], [ 1, %53 ]
  %55 = tail call i64 @MBX_SET_STS16(i64 noundef %.130.4, i32 noundef 5, i64 noundef %.sink44.5)
  br label %.thread.5

.thread.5:                                        ; preds = %.thread.sink.split.5, %54, %53
  %.130.5 = phi i64 [ %.130.4, %53 ], [ %.130.4, %54 ], [ %55, %.thread.sink.split.5 ]
  %56 = getelementptr inbounds i8, ptr %0, i64 48
  %57 = load ptr, ptr %56, align 8, !tbaa !10
  %58 = icmp eq ptr %57, null
  %59 = getelementptr inbounds i8, ptr %1, i64 24
  %60 = load i32, ptr %59, align 4, !tbaa !12
  br i1 %58, label %62, label %61

61:                                               ; preds = %.thread.5
  %or.cond38.6 = icmp ugt i32 %60, 65280
  br i1 %or.cond38.6, label %.thread.sink.split.6, label %.thread.6

62:                                               ; preds = %.thread.5
  %.not37.6 = icmp eq i32 %60, 0
  br i1 %.not37.6, label %.thread.6, label %.thread.sink.split.6

.thread.sink.split.6:                             ; preds = %62, %61
  %.sink44.6 = phi i64 [ 2, %62 ], [ 1, %61 ]
  %63 = tail call i64 @MBX_SET_STS16(i64 noundef %.130.5, i32 noundef 6, i64 noundef %.sink44.6)
  br label %.thread.6

.thread.6:                                        ; preds = %.thread.sink.split.6, %62, %61
  %.130.6 = phi i64 [ %.130.5, %61 ], [ %.130.5, %62 ], [ %63, %.thread.sink.split.6 ]
  %64 = getelementptr inbounds i8, ptr %0, i64 56
  %65 = load ptr, ptr %64, align 8, !tbaa !10
  %66 = icmp eq ptr %65, null
  %67 = getelementptr inbounds i8, ptr %1, i64 28
  %68 = load i32, ptr %67, align 4, !tbaa !12
  br i1 %66, label %70, label %69

69:                                               ; preds = %.thread.6
  %or.cond38.7 = icmp ugt i32 %68, 65280
  br i1 %or.cond38.7, label %.thread.sink.split.7, label %.thread.7

70:                                               ; preds = %.thread.6
  %.not37.7 = icmp eq i32 %68, 0
  br i1 %.not37.7, label %.thread.7, label %.thread.sink.split.7

.thread.sink.split.7:                             ; preds = %70, %69
  %.sink44.7 = phi i64 [ 2, %70 ], [ 1, %69 ]
  %71 = tail call i64 @MBX_SET_STS16(i64 noundef %.130.6, i32 noundef 7, i64 noundef %.sink44.7)
  br label %.thread.7

.thread.7:                                        ; preds = %.thread.sink.split.7, %70, %69
  %.130.7 = phi i64 [ %.130.6, %69 ], [ %.130.6, %70 ], [ %71, %.thread.sink.split.7 ]
  %72 = getelementptr inbounds i8, ptr %0, i64 64
  %73 = load ptr, ptr %72, align 8, !tbaa !10
  %74 = icmp eq ptr %73, null
  %75 = getelementptr inbounds i8, ptr %1, i64 32
  %76 = load i32, ptr %75, align 4, !tbaa !12
  br i1 %74, label %78, label %77

77:                                               ; preds = %.thread.7
  %or.cond38.8 = icmp ugt i32 %76, 65280
  br i1 %or.cond38.8, label %.thread.sink.split.8, label %.thread.8

78:                                               ; preds = %.thread.7
  %.not37.8 = icmp eq i32 %76, 0
  br i1 %.not37.8, label %.thread.8, label %.thread.sink.split.8

.thread.sink.split.8:                             ; preds = %78, %77
  %.sink44.8 = phi i64 [ 2, %78 ], [ 1, %77 ]
  %79 = tail call i64 @MBX_SET_STS16(i64 noundef %.130.7, i32 noundef 8, i64 noundef %.sink44.8)
  br label %.thread.8

.thread.8:                                        ; preds = %.thread.sink.split.8, %78, %77
  %.130.8 = phi i64 [ %.130.7, %77 ], [ %.130.7, %78 ], [ %79, %.thread.sink.split.8 ]
  %80 = getelementptr inbounds i8, ptr %0, i64 72
  %81 = load ptr, ptr %80, align 8, !tbaa !10
  %82 = icmp eq ptr %81, null
  %83 = getelementptr inbounds i8, ptr %1, i64 36
  %84 = load i32, ptr %83, align 4, !tbaa !12
  br i1 %82, label %86, label %85

85:                                               ; preds = %.thread.8
  %or.cond38.9 = icmp ugt i32 %84, 65280
  br i1 %or.cond38.9, label %.thread.sink.split.9, label %.thread.9

86:                                               ; preds = %.thread.8
  %.not37.9 = icmp eq i32 %84, 0
  br i1 %.not37.9, label %.thread.9, label %.thread.sink.split.9

.thread.sink.split.9:                             ; preds = %86, %85
  %.sink44.9 = phi i64 [ 2, %86 ], [ 1, %85 ]
  %87 = tail call i64 @MBX_SET_STS16(i64 noundef %.130.8, i32 noundef 9, i64 noundef %.sink44.9)
  br label %.thread.9

.thread.9:                                        ; preds = %.thread.sink.split.9, %86, %85
  %.130.9 = phi i64 [ %.130.8, %85 ], [ %.130.8, %86 ], [ %87, %.thread.sink.split.9 ]
  %88 = getelementptr inbounds i8, ptr %0, i64 80
  %89 = load ptr, ptr %88, align 8, !tbaa !10
  %90 = icmp eq ptr %89, null
  %91 = getelementptr inbounds i8, ptr %1, i64 40
  %92 = load i32, ptr %91, align 4, !tbaa !12
  br i1 %90, label %94, label %93

93:                                               ; preds = %.thread.9
  %or.cond38.10 = icmp ugt i32 %92, 65280
  br i1 %or.cond38.10, label %.thread.sink.split.10, label %.thread.10

94:                                               ; preds = %.thread.9
  %.not37.10 = icmp eq i32 %92, 0
  br i1 %.not37.10, label %.thread.10, label %.thread.sink.split.10

.thread.sink.split.10:                            ; preds = %94, %93
  %.sink44.10 = phi i64 [ 2, %94 ], [ 1, %93 ]
  %95 = tail call i64 @MBX_SET_STS16(i64 noundef %.130.9, i32 noundef 10, i64 noundef %.sink44.10)
  br label %.thread.10

.thread.10:                                       ; preds = %.thread.sink.split.10, %94, %93
  %.130.10 = phi i64 [ %.130.9, %93 ], [ %.130.9, %94 ], [ %95, %.thread.sink.split.10 ]
  %96 = getelementptr inbounds i8, ptr %0, i64 88
  %97 = load ptr, ptr %96, align 8, !tbaa !10
  %98 = icmp eq ptr %97, null
  %99 = getelementptr inbounds i8, ptr %1, i64 44
  %100 = load i32, ptr %99, align 4, !tbaa !12
  br i1 %98, label %102, label %101

101:                                              ; preds = %.thread.10
  %or.cond38.11 = icmp ugt i32 %100, 65280
  br i1 %or.cond38.11, label %.thread.sink.split.11, label %.thread.11

102:                                              ; preds = %.thread.10
  %.not37.11 = icmp eq i32 %100, 0
  br i1 %.not37.11, label %.thread.11, label %.thread.sink.split.11

.thread.sink.split.11:                            ; preds = %102, %101
  %.sink44.11 = phi i64 [ 2, %102 ], [ 1, %101 ]
  %103 = tail call i64 @MBX_SET_STS16(i64 noundef %.130.10, i32 noundef 11, i64 noundef %.sink44.11)
  br label %.thread.11

.thread.11:                                       ; preds = %.thread.sink.split.11, %102, %101
  %.130.11 = phi i64 [ %.130.10, %101 ], [ %.130.10, %102 ], [ %103, %.thread.sink.split.11 ]
  %104 = getelementptr inbounds i8, ptr %0, i64 96
  %105 = load ptr, ptr %104, align 8, !tbaa !10
  %106 = icmp eq ptr %105, null
  %107 = getelementptr inbounds i8, ptr %1, i64 48
  %108 = load i32, ptr %107, align 4, !tbaa !12
  br i1 %106, label %110, label %109

109:                                              ; preds = %.thread.11
  %or.cond38.12 = icmp ugt i32 %108, 65280
  br i1 %or.cond38.12, label %.thread.sink.split.12, label %.thread.12

110:                                              ; preds = %.thread.11
  %.not37.12 = icmp eq i32 %108, 0
  br i1 %.not37.12, label %.thread.12, label %.thread.sink.split.12

.thread.sink.split.12:                            ; preds = %110, %109
  %.sink44.12 = phi i64 [ 2, %110 ], [ 1, %109 ]
  %111 = tail call i64 @MBX_SET_STS16(i64 noundef %.130.11, i32 noundef 12, i64 noundef %.sink44.12)
  br label %.thread.12

.thread.12:                                       ; preds = %.thread.sink.split.12, %110, %109
  %.130.12 = phi i64 [ %.130.11, %109 ], [ %.130.11, %110 ], [ %111, %.thread.sink.split.12 ]
  %112 = getelementptr inbounds i8, ptr %0, i64 104
  %113 = load ptr, ptr %112, align 8, !tbaa !10
  %114 = icmp eq ptr %113, null
  %115 = getelementptr inbounds i8, ptr %1, i64 52
  %116 = load i32, ptr %115, align 4, !tbaa !12
  br i1 %114, label %118, label %117

117:                                              ; preds = %.thread.12
  %or.cond38.13 = icmp ugt i32 %116, 65280
  br i1 %or.cond38.13, label %.thread.sink.split.13, label %.thread.13

118:                                              ; preds = %.thread.12
  %.not37.13 = icmp eq i32 %116, 0
  br i1 %.not37.13, label %.thread.13, label %.thread.sink.split.13

.thread.sink.split.13:                            ; preds = %118, %117
  %.sink44.13 = phi i64 [ 2, %118 ], [ 1, %117 ]
  %119 = tail call i64 @MBX_SET_STS16(i64 noundef %.130.12, i32 noundef 13, i64 noundef %.sink44.13)
  br label %.thread.13

.thread.13:                                       ; preds = %.thread.sink.split.13, %118, %117
  %.130.13 = phi i64 [ %.130.12, %117 ], [ %.130.12, %118 ], [ %119, %.thread.sink.split.13 ]
  %120 = getelementptr inbounds i8, ptr %0, i64 112
  %121 = load ptr, ptr %120, align 8, !tbaa !10
  %122 = icmp eq ptr %121, null
  %123 = getelementptr inbounds i8, ptr %1, i64 56
  %124 = load i32, ptr %123, align 4, !tbaa !12
  br i1 %122, label %126, label %125

125:                                              ; preds = %.thread.13
  %or.cond38.14 = icmp ugt i32 %124, 65280
  br i1 %or.cond38.14, label %.thread.sink.split.14, label %.thread.14

126:                                              ; preds = %.thread.13
  %.not37.14 = icmp eq i32 %124, 0
  br i1 %.not37.14, label %.thread.14, label %.thread.sink.split.14

.thread.sink.split.14:                            ; preds = %126, %125
  %.sink44.14 = phi i64 [ 2, %126 ], [ 1, %125 ]
  %127 = tail call i64 @MBX_SET_STS16(i64 noundef %.130.13, i32 noundef 14, i64 noundef %.sink44.14)
  br label %.thread.14

.thread.14:                                       ; preds = %.thread.sink.split.14, %126, %125
  %.130.14 = phi i64 [ %.130.13, %125 ], [ %.130.13, %126 ], [ %127, %.thread.sink.split.14 ]
  %128 = getelementptr inbounds i8, ptr %0, i64 120
  %129 = load ptr, ptr %128, align 8, !tbaa !10
  %130 = icmp eq ptr %129, null
  %131 = getelementptr inbounds i8, ptr %1, i64 60
  %132 = load i32, ptr %131, align 4, !tbaa !12
  br i1 %130, label %134, label %133

133:                                              ; preds = %.thread.14
  %or.cond38.15 = icmp ugt i32 %132, 65280
  br i1 %or.cond38.15, label %.thread.sink.split.15, label %.loopexit

134:                                              ; preds = %.thread.14
  %.not37.15 = icmp eq i32 %132, 0
  br i1 %.not37.15, label %.loopexit, label %.thread.sink.split.15

.thread.sink.split.15:                            ; preds = %134, %133
  %.sink44.15 = phi i64 [ 2, %134 ], [ 1, %133 ]
  %135 = tail call i64 @MBX_SET_STS16(i64 noundef %.130.14, i32 noundef 15, i64 noundef %.sink44.15)
  br label %.loopexit

.loopexit:                                        ; preds = %133, %134, %.thread.sink.split.15, %7, %3
  %.sink = phi i64 [ 2, %3 ], [ 1, %7 ], [ 10, %.thread.sink.split.15 ], [ 10, %134 ], [ 10, %133 ]
  %136 = tail call i64 @MBX_SET_STS16_ALL(i64 noundef %.sink)
  ret i64 %136
}

; Function Attrs: alwaysinline nounwind uwtable
declare hidden i64 @MBX_SET_STS16_ALL(i64 noundef) local_unnamed_addr #1

; Function Attrs: alwaysinline nounwind uwtable
declare hidden i64 @MBX_SET_STS16(i64 noundef, i32 noundef, i64 noundef) local_unnamed_addr #1

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { alwaysinline nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !9, i64 3200}
!6 = !{!"_sm4_ccm_context_mb16", !7, i64 0, !7, i64 128, !7, i64 256, !7, i64 320, !7, i64 384, !7, i64 640, !7, i64 896, !7, i64 1152, !9, i64 3200}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!"int", !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!9, !9, i64 0}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass