; LLVM IR from FrancesoM/Bisc8FX :: sdk_projects/bisc8_platform/ps7_cortexa9_0/standalone_domain/bsp/ps7_cortexa9_0_ (ReconfigureEp)

; 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.XUsbPs_DeviceConfig = type { i8, [12 x %struct.XUsbPs_EpConfig], i32, [12 x %struct.XUsbPs_Endpoint], i32 }
%struct.XUsbPs_EpConfig = type { %struct.XUsbPs_EpSetup, %struct.XUsbPs_EpSetup }
%struct.XUsbPs_EpSetup = type { i32, i32, i32, i16 }
%struct.XUsbPs_Endpoint = type { %struct.XUsbPs_EpOut, %struct.XUsbPs_EpIn }
%struct.XUsbPs_EpOut = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, ptr, i8, i32 }
%struct.XUsbPs_EpIn = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, ptr, i32 }

@Xil_AssertStatus = external global i32, align 4
@.str = external hidden unnamed_addr constant [171 x i8], align 1

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

declare void @Xil_Assert(ptr noundef, i32 noundef) #1

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

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

19:                                               ; preds = %5
  store i32 0, ptr @Xil_AssertStatus, align 4, !tbaa !9
  br label %21

20:                                               ; preds = %5
  call void @Xil_Assert(ptr noundef @.str, i32 noundef 1392)
  store i32 1, ptr @Xil_AssertStatus, align 4, !tbaa !9
  store i32 0, ptr %6, align 4
  store i32 1, ptr %15, align 4
  br label %164

21:                                               ; preds = %19
  %22 = load ptr, ptr %8, align 8, !tbaa !5
  %23 = icmp ne ptr %22, null
  br i1 %23, label %24, label %25

24:                                               ; preds = %21
  store i32 0, ptr @Xil_AssertStatus, align 4, !tbaa !9
  br label %26

25:                                               ; preds = %21
  call void @Xil_Assert(ptr noundef @.str, i32 noundef 1393)
  store i32 1, ptr @Xil_AssertStatus, align 4, !tbaa !9
  store i32 0, ptr %6, align 4
  store i32 1, ptr %15, align 4
  br label %164

26:                                               ; preds = %24
  %27 = load ptr, ptr %8, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.XUsbPs_DeviceConfig, ptr %27, i32 0, i32 3
  %29 = getelementptr inbounds [12 x %struct.XUsbPs_Endpoint], ptr %28, i64 0, i64 0
  store ptr %29, ptr %13, align 8, !tbaa !5
  %30 = load ptr, ptr %8, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.XUsbPs_DeviceConfig, ptr %30, i32 0, i32 1
  %32 = getelementptr inbounds [12 x %struct.XUsbPs_EpConfig], ptr %31, i64 0, i64 0
  store ptr %32, ptr %14, align 8, !tbaa !5
  %33 = load i32, ptr %11, align 4, !tbaa !9
  %34 = icmp ne i32 %33, 0
  br i1 %34, label %35, label %107

35:                                               ; preds = %26
  %36 = load i16, ptr %10, align 2, !tbaa !11
  %37 = zext i16 %36 to i32
  %38 = icmp eq i32 %37, 2
  br i1 %38, label %39, label %87

39:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  %40 = load ptr, ptr %13, align 8, !tbaa !5
  %41 = load i32, ptr %9, align 4, !tbaa !9
  %42 = sext i32 %41 to i64
  %43 = getelementptr inbounds %struct.XUsbPs_Endpoint, ptr %40, i64 %42
  %44 = getelementptr inbounds %struct.XUsbPs_Endpoint, ptr %43, i32 0, i32 1
  %45 = getelementptr inbounds %struct.XUsbPs_EpIn, ptr %44, i32 0, i32 1
  %46 = load ptr, ptr %45, align 8, !tbaa !13
  %47 = load ptr, ptr %13, align 8, !tbaa !5
  %48 = load i32, ptr %9, align 4, !tbaa !9
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds %struct.XUsbPs_Endpoint, ptr %47, i64 %49
  %51 = getelementptr inbounds %struct.XUsbPs_Endpoint, ptr %50, i32 0, i32 0
  %52 = getelementptr inbounds %struct.XUsbPs_EpOut, ptr %51, i32 0, i32 1
  store ptr %46, ptr %52, align 8, !tbaa !17
  %53 = load ptr, ptr %13, align 8, !tbaa !5
  %54 = load i32, ptr %9, align 4, !tbaa !9
  %55 = sext i32 %54 to i64
  %56 = getelementptr inbounds %struct.XUsbPs_Endpoint, ptr %53, i64 %55
  %57 = getelementptr inbounds %struct.XUsbPs_Endpoint, ptr %56, i32 0, i32 0
  %58 = getelementptr inbounds %struct.XUsbPs_EpOut, ptr %57, i32 0, i32 1
  %59 = load ptr, ptr %58, align 8, !tbaa !17
  %60 = load ptr, ptr %14, align 8, !tbaa !5
  %61 = load i32, ptr %9, align 4, !tbaa !9
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds %struct.XUsbPs_EpConfig, ptr %60, i64 %62
  %64 = getelementptr inbounds %struct.XUsbPs_EpConfig, ptr %63, i32 0, i32 0
  %65 = getelementptr inbounds %struct.XUsbPs_EpSetup, ptr %64, i32 0, i32 1
  %66 = load i32, ptr %65, align 4, !tbaa !18
  %67 = mul i32 32, %66
  %68 = zext i32 %67 to i64
  %69 = getelementptr inbounds [32 x i8], ptr %59, i64 %68
  store ptr %69, ptr %16, align 8, !tbaa !5
  %70 = load ptr, ptr %14, align 8, !tbaa !5
  %71 = load i32, ptr %9, align 4, !tbaa !9
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds %struct.XUsbPs_EpConfig, ptr %70, i64 %72
  %74 = getelementptr inbounds %struct.XUsbPs_EpConfig, ptr %73, i32 0, i32 0
  %75 = getelementptr inbounds %struct.XUsbPs_EpSetup, ptr %74, i32 0, i32 2
  %76 = load i32, ptr %75, align 4, !tbaa !21
  %77 = icmp ugt i32 %76, 0
  br i1 %77, label %78, label %86

78:                                               ; preds = %39
  %79 = load ptr, ptr %16, align 8, !tbaa !5
  %80 = load ptr, ptr %13, align 8, !tbaa !5
  %81 = load i32, ptr %9, align 4, !tbaa !9
  %82 = sext i32 %81 to i64
  %83 = getelementptr inbounds %struct.XUsbPs_Endpoint, ptr %80, i64 %82
  %84 = getelementptr inbounds %struct.XUsbPs_Endpoint, ptr %83, i32 0, i32 0
  %85 = getelementptr inbounds %struct.XUsbPs_EpOut, ptr %84, i32 0, i32 3
  store ptr %79, ptr %85, align 8, !tbaa !22
  br label %86

86:                                               ; preds = %78, %39
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  br label %106

87:                                               ; preds = %35
  %88 = load i16, ptr %10, align 2, !tbaa !11
  %89 = zext i16 %88 to i32
  %90 = icmp eq i32 %89, 1
  br i1 %90, label %91, label %105

91:                                               ; preds = %87
  %92 = load ptr, ptr %13, align 8, !tbaa !5
  %93 = load i32, ptr %9, align 4, !tbaa !9
  %94 = sext i32 %93 to i64
  %95 = getelementptr inbounds %struct.XUsbPs_Endpoint, ptr %92, i64 %94
  %96 = getelementptr inbounds %struct.XUsbPs_Endpoint, ptr %95, i32 0, i32 0
  %97 = getelementptr inbounds %struct.XUsbPs_EpOut, ptr %96, i32 0, i32 1
  %98 = load ptr, ptr %97, align 8, !tbaa !17
  %99 = load ptr, ptr %13, align 8, !tbaa !5
  %100 = load i32, ptr %9, align 4, !tbaa !9
  %101 = sext i32 %100 to i64
  %102 = getelementptr inbounds %struct.XUsbPs_Endpoint, ptr %99, i64 %101
  %103 = getelementptr inbounds %struct.XUsbPs_Endpoint, ptr %102, i32 0, i32 1
  %104 = getelementptr inbounds %struct.XUsbPs_EpIn, ptr %103, i32 0, i32 1
  store ptr %98, ptr %104, align 8, !tbaa !13
  br label %105

105:                                              ; preds = %91, %87
  br label %106

106:                                              ; preds = %105, %86
  br label %107

107:                                              ; preds = %106, %26
  %108 = load i16, ptr %10, align 2, !tbaa !11
  %109 = zext i16 %108 to i32
  %110 = icmp eq i32 %109, 1
  br i1 %110, label %111, label %131

111:                                              ; preds = %107
  %112 = load ptr, ptr %13, align 8, !tbaa !5
  %113 = load i32, ptr %9, align 4, !tbaa !9
  %114 = sext i32 %113 to i64
  %115 = getelementptr inbounds %struct.XUsbPs_Endpoint, ptr %112, i64 %114
  %116 = getelementptr inbounds %struct.XUsbPs_Endpoint, ptr %115, i32 0, i32 1
  %117 = getelementptr inbounds %struct.XUsbPs_EpIn, ptr %116, i32 0, i32 1
  %118 = load ptr, ptr %117, align 8, !tbaa !13
  %119 = load ptr, ptr %13, align 8, !tbaa !5
  %120 = load i32, ptr %9, align 4, !tbaa !9
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds %struct.XUsbPs_Endpoint, ptr %119, i64 %121
  %123 = getelementptr inbounds %struct.XUsbPs_Endpoint, ptr %122, i32 0, i32 1
  %124 = getelementptr inbounds %struct.XUsbPs_EpIn, ptr %123, i32 0, i32 3
  store ptr %118, ptr %124, align 8, !tbaa !23
  %125 = load ptr, ptr %13, align 8, !tbaa !5
  %126 = load i32, ptr %9, align 4, !tbaa !9
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds %struct.XUsbPs_Endpoint, ptr %125, i64 %127
  %129 = getelementptr inbounds %struct.XUsbPs_Endpoint, ptr %128, i32 0, i32 1
  %130 = getelementptr inbounds %struct.XUsbPs_EpIn, ptr %129, i32 0, i32 2
  store ptr %118, ptr %130, align 8, !tbaa !24
  br label %150

131:                                              ; preds = %107
  %132 = load i16, ptr %10, align 2, !tbaa !11
  %133 = zext i16 %132 to i32
  %134 = icmp eq i32 %133, 2
  br i1 %134, label %135, label %149

135:                                              ; preds = %131
  %136 = load ptr, ptr %13, align 8, !tbaa !5
  %137 = load i32, ptr %9, align 4, !tbaa !9
  %138 = sext i32 %137 to i64
  %139 = getelementptr inbounds %struct.XUsbPs_Endpoint, ptr %136, i64 %138
  %140 = getelementptr inbounds %struct.XUsbPs_Endpoint, ptr %139, i32 0, i32 0
  %141 = getelementptr inbounds %struct.XUsbPs_EpOut, ptr %140, i32 0, i32 1
  %142 = load ptr, ptr %141, align 8, !tbaa !17
  %143 = load ptr, ptr %13, align 8, !tbaa !5
  %144 = load i32, ptr %9, align 4, !tbaa !9
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds %struct.XUsbPs_Endpoint, ptr %143, i64 %145
  %147 = getelementptr inbounds %struct.XUsbPs_Endpoint, ptr %146, i32 0, i32 0
  %148 = getelementptr inbounds %struct.XUsbPs_EpOut, ptr %147, i32 0, i32 2
  store ptr %142, ptr %148, align 8, !tbaa !25
  br label %149

149:                                              ; preds = %135, %131
  br label %150

150:                                              ; preds = %149, %111
  %151 = load ptr, ptr %8, align 8, !tbaa !5
  %152 = load i32, ptr %9, align 4, !tbaa !9
  %153 = load i16, ptr %10, align 2, !tbaa !11
  call void @XUsbPs_dQHReinitEp(ptr noundef %151, i32 noundef %152, i16 noundef zeroext %153)
  %154 = load ptr, ptr %8, align 8, !tbaa !5
  %155 = load i32, ptr %9, align 4, !tbaa !9
  %156 = load i16, ptr %10, align 2, !tbaa !11
  %157 = call i32 @XUsbPs_dTDReinitEp(ptr noundef %154, i32 noundef %155, i16 noundef zeroext %156)
  store i32 %157, ptr %12, align 4, !tbaa !9
  %158 = load i32, ptr %12, align 4, !tbaa !9
  %159 = sext i32 %158 to i64
  %160 = icmp ne i64 %159, 0
  br i1 %160, label %161, label %163

161:                                              ; preds = %150
  %162 = load i32, ptr %12, align 4, !tbaa !9
  store i32 %162, ptr %6, align 4
  store i32 1, ptr %15, align 4
  br label %164

163:                                              ; preds = %150
  store i32 0, ptr %6, align 4
  store i32 1, ptr %15, align 4
  br label %164

164:                                              ; preds = %163, %161, %25, %20
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  %165 = load i32, ptr %6, align 4
  ret i32 %165
}

; Function Attrs: nounwind uwtable
declare hidden void @XUsbPs_dQHReinitEp(ptr noundef, i32 noundef, i16 noundef zeroext) #2

; Function Attrs: nounwind uwtable
declare hidden i32 @XUsbPs_dTDReinitEp(ptr noundef, i32 noundef, i16 noundef zeroext) #2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"short", !7, i64 0}
!13 = !{!14, !6, i64 88}
!14 = !{!"", !15, i64 0, !16, i64 80}
!15 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !10, i64 56, !10, i64 60, !6, i64 64, !7, i64 72, !10, i64 76}
!16 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !10, i64 56, !10, i64 60, !6, i64 64, !10, i64 72}
!17 = !{!14, !6, i64 8}
!18 = !{!19, !10, i64 4}
!19 = !{!"", !20, i64 0, !20, i64 16}
!20 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !12, i64 12}
!21 = !{!19, !10, i64 8}
!22 = !{!14, !6, i64 24}
!23 = !{!14, !6, i64 104}
!24 = !{!14, !6, i64 96}
!25 = !{!14, !6, i64 16}


; 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.XUsbPs_Endpoint = type { %struct.XUsbPs_EpOut, %struct.XUsbPs_EpIn }
%struct.XUsbPs_EpOut = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, ptr, i8, i32 }
%struct.XUsbPs_EpIn = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, ptr, i32 }
%struct.XUsbPs_EpConfig = type { %struct.XUsbPs_EpSetup, %struct.XUsbPs_EpSetup }
%struct.XUsbPs_EpSetup = type { i32, i32, i32, i16 }

@Xil_AssertStatus = external local_unnamed_addr global i32, align 4
@.str = external hidden unnamed_addr constant [171 x i8], align 1

declare void @Xil_Assert(ptr noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local i32 @XUsbPs_ReconfigureEp(ptr noundef readnone %0, ptr noundef %1, i32 noundef %2, i16 noundef zeroext %3, i32 noundef %4) local_unnamed_addr #1 {
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %7, label %6

6:                                                ; preds = %5
  store i32 0, ptr @Xil_AssertStatus, align 4, !tbaa !5
  %.not47 = icmp eq ptr %1, null
  br i1 %.not47, label %11, label %8

7:                                                ; preds = %5
  tail call void @Xil_Assert(ptr noundef nonnull @.str, i32 noundef 1392) #2
  store i32 1, ptr @Xil_AssertStatus, align 4, !tbaa !5
  br label %44

8:                                                ; preds = %6
  %9 = getelementptr inbounds i8, ptr %1, i64 392
  %10 = getelementptr inbounds i8, ptr %1, i64 4
  %.not48 = icmp eq i32 %4, 0
  br i1 %.not48, label %34, label %12

11:                                               ; preds = %6
  tail call void @Xil_Assert(ptr noundef nonnull @.str, i32 noundef 1393) #2
  store i32 1, ptr @Xil_AssertStatus, align 4, !tbaa !5
  br label %44

12:                                               ; preds = %8
  switch i16 %3, label %42 [
    i16 2, label %13
    i16 1, label %.thread51
  ]

13:                                               ; preds = %12
  %14 = sext i32 %2 to i64
  %15 = getelementptr inbounds %struct.XUsbPs_Endpoint, ptr %9, i64 %14
  %16 = getelementptr inbounds i8, ptr %15, i64 88
  %17 = load ptr, ptr %16, align 8, !tbaa !9
  %18 = getelementptr inbounds i8, ptr %15, i64 8
  store ptr %17, ptr %18, align 8, !tbaa !14
  %19 = getelementptr inbounds %struct.XUsbPs_EpConfig, ptr %10, i64 %14
  %20 = getelementptr inbounds i8, ptr %19, i64 8
  %21 = load i32, ptr %20, align 4, !tbaa !15
  %.not49 = icmp eq i32 %21, 0
  br i1 %.not49, label %.thread, label %22

22:                                               ; preds = %13
  %23 = getelementptr inbounds i8, ptr %19, i64 4
  %24 = load i32, ptr %23, align 4, !tbaa !19
  %25 = shl i32 %24, 5
  %26 = zext i32 %25 to i64
  %27 = getelementptr inbounds [32 x i8], ptr %17, i64 %26
  %28 = getelementptr inbounds i8, ptr %15, i64 24
  store ptr %27, ptr %28, align 8, !tbaa !20
  br label %.thread

.thread51:                                        ; preds = %12
  %29 = sext i32 %2 to i64
  %30 = getelementptr inbounds %struct.XUsbPs_Endpoint, ptr %9, i64 %29
  %31 = getelementptr inbounds i8, ptr %30, i64 8
  %32 = load ptr, ptr %31, align 8, !tbaa !14
  %33 = getelementptr inbounds i8, ptr %30, i64 88
  store ptr %32, ptr %33, align 8, !tbaa !9
  br label %35

34:                                               ; preds = %8
  switch i16 %3, label %42 [
    i16 1, label %._crit_edge
    i16 2, label %..thread_crit_edge
  ]

._crit_edge:                                      ; preds = %34
  %.phi.trans.insert54 = sext i32 %2 to i64
  %.phi.trans.insert56 = getelementptr inbounds %struct.XUsbPs_Endpoint, ptr %9, i64 %.phi.trans.insert54, i32 1, i32 1
  %.pre57 = load ptr, ptr %.phi.trans.insert56, align 8, !tbaa !9
  br label %35

..thread_crit_edge:                               ; preds = %34
  %.phi.trans.insert = sext i32 %2 to i64
  %.phi.trans.insert53 = getelementptr inbounds %struct.XUsbPs_Endpoint, ptr %9, i64 %.phi.trans.insert, i32 0, i32 1
  %.pre = load ptr, ptr %.phi.trans.insert53, align 8, !tbaa !14
  br label %.thread

35:                                               ; preds = %._crit_edge, %.thread51
  %.pre-phi = phi i64 [ %.phi.trans.insert54, %._crit_edge ], [ %29, %.thread51 ]
  %36 = phi ptr [ %.pre57, %._crit_edge ], [ %32, %.thread51 ]
  %37 = getelementptr inbounds %struct.XUsbPs_Endpoint, ptr %9, i64 %.pre-phi, i32 1
  %38 = getelementptr inbounds i8, ptr %37, i64 24
  store ptr %36, ptr %38, align 8, !tbaa !21
  %39 = getelementptr inbounds i8, ptr %37, i64 16
  store ptr %36, ptr %39, align 8, !tbaa !22
  br label %42

.thread:                                          ; preds = %..thread_crit_edge, %22, %13
  %.pre-phi58 = phi i64 [ %.phi.trans.insert, %..thread_crit_edge ], [ %14, %22 ], [ %14, %13 ]
  %40 = phi ptr [ %.pre, %..thread_crit_edge ], [ %17, %22 ], [ %17, %13 ]
  %41 = getelementptr inbounds %struct.XUsbPs_Endpoint, ptr %9, i64 %.pre-phi58, i32 0, i32 2
  store ptr %40, ptr %41, align 8, !tbaa !23
  br label %42

42:                                               ; preds = %12, %34, %.thread, %35
  tail call void @XUsbPs_dQHReinitEp(ptr noundef nonnull %1, i32 noundef %2, i16 noundef zeroext %3)
  %43 = tail call i32 @XUsbPs_dTDReinitEp(ptr noundef nonnull %1, i32 noundef %2, i16 noundef zeroext %3)
  br label %44

44:                                               ; preds = %42, %11, %7
  %.0 = phi i32 [ 0, %11 ], [ 0, %7 ], [ %43, %42 ]
  ret i32 %.0
}

; Function Attrs: nounwind uwtable
declare hidden void @XUsbPs_dQHReinitEp(ptr noundef, i32 noundef, i16 noundef zeroext) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i32 @XUsbPs_dTDReinitEp(ptr noundef, i32 noundef, i16 noundef zeroext) local_unnamed_addr #1

attributes #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 = { 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 #2 = { 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 = !{!10, !12, i64 88}
!10 = !{!"", !11, i64 0, !13, i64 80}
!11 = !{!"", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !6, i64 56, !6, i64 60, !12, i64 64, !7, i64 72, !6, i64 76}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!"", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !12, i64 40, !12, i64 48, !6, i64 56, !6, i64 60, !12, i64 64, !6, i64 72}
!14 = !{!10, !12, i64 8}
!15 = !{!16, !6, i64 8}
!16 = !{!"", !17, i64 0, !17, i64 16}
!17 = !{!"", !6, i64 0, !6, i64 4, !6, i64 8, !18, i64 12}
!18 = !{!"short", !7, i64 0}
!19 = !{!16, !6, i64 4}
!20 = !{!10, !12, i64 24}
!21 = !{!10, !12, i64 104}
!22 = !{!10, !12, i64 96}
!23 = !{!10, !12, i64 16}


; Effective O3 passes: BDCEPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass