; LLVM IR from kacperks/Fractal_Engine :: Engine/Thirdparty/cmake/Engine/Thirdparty/cmake/openal-soft/al (effect)

; 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.anon.152 = type { [32 x i8], %struct.EFXEAXREVERBPROPERTIES }
%struct.EFXEAXREVERBPROPERTIES = type { float, float, float, float, float, float, float, float, float, float, [3 x float], float, float, [3 x float], float, float, float, float, float, float, float, float, i32 }
%struct.ALeffect = type <{ i32, %union.EffectProps, ptr, i32, [4 x i8] }>
%union.EffectProps = type { %struct.anon }
%struct.anon = type { float, float, float, float, float, float, float, float, float, float, float, float, i8, float, float, [3 x float], [3 x float], float, float, float, float, float, float }

@DisabledEffects = external dso_local global [15 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [5 x i8], align 1
@gLogLevel = external global i32, align 4
@gLogFile = external global ptr, align 8
@.str.9 = external hidden unnamed_addr constant [35 x i8], align 1
@_ZL10reverblist = external hidden constant [113 x %struct.anon.152], align 16
@.str.10 = external hidden unnamed_addr constant [44 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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_116InitEffectParamsEP8ALeffecti(ptr noundef, i32 noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_Z16LoadReverbPresetPKcP8ALeffect(ptr noundef %0, ptr noundef %1) #2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %11 = load ptr, ptr %3, align 8, !tbaa !5
  %12 = call noundef i32 @_ZN2al10strcasecmpEPKcS1_(ptr noundef %11, ptr noundef @.str.8) #4
  %13 = icmp eq i32 %12, 0
  br i1 %13, label %14, label %29

14:                                               ; preds = %2
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN12_GLOBAL__N_116InitEffectParamsEP8ALeffecti(ptr noundef %15, i32 noundef 0)
  br label %16

16:                                               ; preds = %14
  %17 = load i32, ptr @gLogLevel, align 4, !tbaa !9
  %18 = icmp sge i32 %17, 3
  %19 = xor i1 %18, true
  %20 = xor i1 %19, true
  %21 = zext i1 %20 to i64
  %22 = call i64 @llvm.expect.i64(i64 %21, i64 0)
  %23 = icmp ne i64 %22, 0
  br i1 %23, label %24, label %27

24:                                               ; preds = %16
  %25 = load ptr, ptr @gLogFile, align 8, !tbaa !5
  %26 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %25, ptr noundef @.str.9, ptr noundef @.str.8) #4
  br label %27

27:                                               ; preds = %24, %16
  br label %28

28:                                               ; preds = %27
  br label %277

29:                                               ; preds = %2
  %30 = load i8, ptr @DisabledEffects, align 1, !tbaa !11, !range !13, !noundef !14
  %31 = trunc i8 %30 to i1
  br i1 %31, label %34, label %32

32:                                               ; preds = %29
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN12_GLOBAL__N_116InitEffectParamsEP8ALeffecti(ptr noundef %33, i32 noundef 32768)
  br label %42

34:                                               ; preds = %29
  %35 = load i8, ptr getelementptr inbounds ([15 x i8], ptr @DisabledEffects, i64 0, i64 1), align 1, !tbaa !11, !range !13, !noundef !14
  %36 = trunc i8 %35 to i1
  br i1 %36, label %39, label %37

37:                                               ; preds = %34
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN12_GLOBAL__N_116InitEffectParamsEP8ALeffecti(ptr noundef %38, i32 noundef 1)
  br label %41

39:                                               ; preds = %34
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN12_GLOBAL__N_116InitEffectParamsEP8ALeffecti(ptr noundef %40, i32 noundef 0)
  br label %41

41:                                               ; preds = %39, %37
  br label %42

42:                                               ; preds = %41, %32
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  store ptr @_ZL10reverblist, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  store ptr @_ZL10reverblist, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  store ptr getelementptr inbounds (%struct.anon.152, ptr @_ZL10reverblist, i64 113), ptr %7, align 8, !tbaa !5
  br label %43

43:                                               ; preds = %258, %42
  %44 = load ptr, ptr %6, align 8, !tbaa !5
  %45 = load ptr, ptr %7, align 8, !tbaa !5
  %46 = icmp ne ptr %44, %45
  br i1 %46, label %48, label %47

47:                                               ; preds = %43
  store i32 4, ptr %8, align 4
  br label %261

48:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %49 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %49, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %50 = load ptr, ptr %3, align 8, !tbaa !5
  %51 = load ptr, ptr %9, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.anon.152, ptr %51, i32 0, i32 0
  %53 = getelementptr inbounds [32 x i8], ptr %52, i64 0, i64 0
  %54 = call noundef i32 @_ZN2al10strcasecmpEPKcS1_(ptr noundef %50, ptr noundef %53) #4
  %55 = icmp ne i32 %54, 0
  br i1 %55, label %56, label %57

56:                                               ; preds = %48
  store i32 5, ptr %8, align 4
  br label %256

57:                                               ; preds = %48
  br label %58

58:                                               ; preds = %57
  %59 = load i32, ptr @gLogLevel, align 4, !tbaa !9
  %60 = icmp sge i32 %59, 3
  %61 = xor i1 %60, true
  %62 = xor i1 %61, true
  %63 = zext i1 %62 to i64
  %64 = call i64 @llvm.expect.i64(i64 %63, i64 0)
  %65 = icmp ne i64 %64, 0
  br i1 %65, label %66, label %72

66:                                               ; preds = %58
  %67 = load ptr, ptr @gLogFile, align 8, !tbaa !5
  %68 = load ptr, ptr %9, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.anon.152, ptr %68, i32 0, i32 0
  %70 = getelementptr inbounds [32 x i8], ptr %69, i64 0, i64 0
  %71 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %67, ptr noundef @.str.9, ptr noundef %70) #4
  br label %72

72:                                               ; preds = %66, %58
  br label %73

73:                                               ; preds = %72
  br label %74

74:                                               ; preds = %73
  %75 = load ptr, ptr %9, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.anon.152, ptr %75, i32 0, i32 1
  store ptr %76, ptr %10, align 8, !tbaa !5
  %77 = load ptr, ptr %10, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.EFXEAXREVERBPROPERTIES, ptr %77, i32 0, i32 0
  %79 = load float, ptr %78, align 4, !tbaa !15
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.ALeffect, ptr %80, i32 0, i32 1
  %82 = getelementptr inbounds %struct.anon, ptr %81, i32 0, i32 0
  store float %79, ptr %82, align 4, !tbaa !19
  %83 = load ptr, ptr %10, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.EFXEAXREVERBPROPERTIES, ptr %83, i32 0, i32 1
  %85 = load float, ptr %84, align 4, !tbaa !20
  %86 = load ptr, ptr %4, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.ALeffect, ptr %86, i32 0, i32 1
  %88 = getelementptr inbounds %struct.anon, ptr %87, i32 0, i32 1
  store float %85, ptr %88, align 4, !tbaa !19
  %89 = load ptr, ptr %10, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.EFXEAXREVERBPROPERTIES, ptr %89, i32 0, i32 2
  %91 = load float, ptr %90, align 4, !tbaa !21
  %92 = load ptr, ptr %4, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.ALeffect, ptr %92, i32 0, i32 1
  %94 = getelementptr inbounds %struct.anon, ptr %93, i32 0, i32 2
  store float %91, ptr %94, align 4, !tbaa !19
  %95 = load ptr, ptr %10, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.EFXEAXREVERBPROPERTIES, ptr %95, i32 0, i32 3
  %97 = load float, ptr %96, align 4, !tbaa !22
  %98 = load ptr, ptr %4, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.ALeffect, ptr %98, i32 0, i32 1
  %100 = getelementptr inbounds %struct.anon, ptr %99, i32 0, i32 3
  store float %97, ptr %100, align 4, !tbaa !19
  %101 = load ptr, ptr %10, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.EFXEAXREVERBPROPERTIES, ptr %101, i32 0, i32 4
  %103 = load float, ptr %102, align 4, !tbaa !23
  %104 = load ptr, ptr %4, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.ALeffect, ptr %104, i32 0, i32 1
  %106 = getelementptr inbounds %struct.anon, ptr %105, i32 0, i32 13
  store float %103, ptr %106, align 4, !tbaa !19
  %107 = load ptr, ptr %10, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.EFXEAXREVERBPROPERTIES, ptr %107, i32 0, i32 5
  %109 = load float, ptr %108, align 4, !tbaa !24
  %110 = load ptr, ptr %4, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.ALeffect, ptr %110, i32 0, i32 1
  %112 = getelementptr inbounds %struct.anon, ptr %111, i32 0, i32 4
  store float %109, ptr %112, align 4, !tbaa !19
  %113 = load ptr, ptr %10, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.EFXEAXREVERBPROPERTIES, ptr %113, i32 0, i32 6
  %115 = load float, ptr %114, align 4, !tbaa !25
  %116 = load ptr, ptr %4, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.ALeffect, ptr %116, i32 0, i32 1
  %118 = getelementptr inbounds %struct.anon, ptr %117, i32 0, i32 5
  store float %115, ptr %118, align 4, !tbaa !19
  %119 = load ptr, ptr %10, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.EFXEAXREVERBPROPERTIES, ptr %119, i32 0, i32 7
  %121 = load float, ptr %120, align 4, !tbaa !26
  %122 = load ptr, ptr %4, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.ALeffect, ptr %122, i32 0, i32 1
  %124 = getelementptr inbounds %struct.anon, ptr %123, i32 0, i32 14
  store float %121, ptr %124, align 4, !tbaa !19
  %125 = load ptr, ptr %10, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.EFXEAXREVERBPROPERTIES, ptr %125, i32 0, i32 8
  %127 = load float, ptr %126, align 4, !tbaa !27
  %128 = load ptr, ptr %4, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.ALeffect, ptr %128, i32 0, i32 1
  %130 = getelementptr inbounds %struct.anon, ptr %129, i32 0, i32 6
  store float %127, ptr %130, align 4, !tbaa !19
  %131 = load ptr, ptr %10, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.EFXEAXREVERBPROPERTIES, ptr %131, i32 0, i32 9
  %133 = load float, ptr %132, align 4, !tbaa !28
  %134 = load ptr, ptr %4, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.ALeffect, ptr %134, i32 0, i32 1
  %136 = getelementptr inbounds %struct.anon, ptr %135, i32 0, i32 7
  store float %133, ptr %136, align 4, !tbaa !19
  %137 = load ptr, ptr %10, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.EFXEAXREVERBPROPERTIES, ptr %137, i32 0, i32 10
  %139 = getelementptr inbounds [3 x float], ptr %138, i64 0, i64 0
  %140 = load float, ptr %139, align 4, !tbaa !29
  %141 = load ptr, ptr %4, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.ALeffect, ptr %141, i32 0, i32 1
  %143 = getelementptr inbounds %struct.anon, ptr %142, i32 0, i32 15
  %144 = getelementptr inbounds [3 x float], ptr %143, i64 0, i64 0
  store float %140, ptr %144, align 4, !tbaa !19
  %145 = load ptr, ptr %10, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.EFXEAXREVERBPROPERTIES, ptr %145, i32 0, i32 10
  %147 = getelementptr inbounds [3 x float], ptr %146, i64 0, i64 1
  %148 = load float, ptr %147, align 4, !tbaa !29
  %149 = load ptr, ptr %4, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.ALeffect, ptr %149, i32 0, i32 1
  %151 = getelementptr inbounds %struct.anon, ptr %150, i32 0, i32 15
  %152 = getelementptr inbounds [3 x float], ptr %151, i64 0, i64 1
  store float %148, ptr %152, align 4, !tbaa !19
  %153 = load ptr, ptr %10, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.EFXEAXREVERBPROPERTIES, ptr %153, i32 0, i32 10
  %155 = getelementptr inbounds [3 x float], ptr %154, i64 0, i64 2
  %156 = load float, ptr %155, align 4, !tbaa !29
  %157 = load ptr, ptr %4, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.ALeffect, ptr %157, i32 0, i32 1
  %159 = getelementptr inbounds %struct.anon, ptr %158, i32 0, i32 15
  %160 = getelementptr inbounds [3 x float], ptr %159, i64 0, i64 2
  store float %156, ptr %160, align 4, !tbaa !19
  %161 = load ptr, ptr %10, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.EFXEAXREVERBPROPERTIES, ptr %161, i32 0, i32 11
  %163 = load float, ptr %162, align 4, !tbaa !30
  %164 = load ptr, ptr %4, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.ALeffect, ptr %164, i32 0, i32 1
  %166 = getelementptr inbounds %struct.anon, ptr %165, i32 0, i32 8
  store float %163, ptr %166, align 4, !tbaa !19
  %167 = load ptr, ptr %10, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.EFXEAXREVERBPROPERTIES, ptr %167, i32 0, i32 12
  %169 = load float, ptr %168, align 4, !tbaa !31
  %170 = load ptr, ptr %4, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.ALeffect, ptr %170, i32 0, i32 1
  %172 = getelementptr inbounds %struct.anon, ptr %171, i32 0, i32 9
  store float %169, ptr %172, align 4, !tbaa !19
  %173 = load ptr, ptr %10, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.EFXEAXREVERBPROPERTIES, ptr %173, i32 0, i32 13
  %175 = getelementptr inbounds [3 x float], ptr %174, i64 0, i64 0
  %176 = load float, ptr %175, align 4, !tbaa !29
  %177 = load ptr, ptr %4, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.ALeffect, ptr %177, i32 0, i32 1
  %179 = getelementptr inbounds %struct.anon, ptr %178, i32 0, i32 16
  %180 = getelementptr inbounds [3 x float], ptr %179, i64 0, i64 0
  store float %176, ptr %180, align 4, !tbaa !19
  %181 = load ptr, ptr %10, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct.EFXEAXREVERBPROPERTIES, ptr %181, i32 0, i32 13
  %183 = getelementptr inbounds [3 x float], ptr %182, i64 0, i64 1
  %184 = load float, ptr %183, align 4, !tbaa !29
  %185 = load ptr, ptr %4, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.ALeffect, ptr %185, i32 0, i32 1
  %187 = getelementptr inbounds %struct.anon, ptr %186, i32 0, i32 16
  %188 = getelementptr inbounds [3 x float], ptr %187, i64 0, i64 1
  store float %184, ptr %188, align 4, !tbaa !19
  %189 = load ptr, ptr %10, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.EFXEAXREVERBPROPERTIES, ptr %189, i32 0, i32 13
  %191 = getelementptr inbounds [3 x float], ptr %190, i64 0, i64 2
  %192 = load float, ptr %191, align 4, !tbaa !29
  %193 = load ptr, ptr %4, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.ALeffect, ptr %193, i32 0, i32 1
  %195 = getelementptr inbounds %struct.anon, ptr %194, i32 0, i32 16
  %196 = getelementptr inbounds [3 x float], ptr %195, i64 0, i64 2
  store float %192, ptr %196, align 4, !tbaa !19
  %197 = load ptr, ptr %10, align 8, !tbaa !5
  %198 = getelementptr inbounds %struct.EFXEAXREVERBPROPERTIES, ptr %197, i32 0, i32 14
  %199 = load float, ptr %198, align 4, !tbaa !32
  %200 = load ptr, ptr %4, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.ALeffect, ptr %200, i32 0, i32 1
  %202 = getelementptr inbounds %struct.anon, ptr %201, i32 0, i32 17
  store float %199, ptr %202, align 4, !tbaa !19
  %203 = load ptr, ptr %10, align 8, !tbaa !5
  %204 = getelementptr inbounds %struct.EFXEAXREVERBPROPERTIES, ptr %203, i32 0, i32 15
  %205 = load float, ptr %204, align 4, !tbaa !33
  %206 = load ptr, ptr %4, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.ALeffect, ptr %206, i32 0, i32 1
  %208 = getelementptr inbounds %struct.anon, ptr %207, i32 0, i32 18
  store float %205, ptr %208, align 4, !tbaa !19
  %209 = load ptr, ptr %10, align 8, !tbaa !5
  %210 = getelementptr inbounds %struct.EFXEAXREVERBPROPERTIES, ptr %209, i32 0, i32 16
  %211 = load float, ptr %210, align 4, !tbaa !34
  %212 = load ptr, ptr %4, align 8, !tbaa !5
  %213 = getelementptr inbounds %struct.ALeffect, ptr %212, i32 0, i32 1
  %214 = getelementptr inbounds %struct.anon, ptr %213, i32 0, i32 19
  store float %211, ptr %214, align 4, !tbaa !19
  %215 = load ptr, ptr %10, align 8, !tbaa !5
  %216 = getelementptr inbounds %struct.EFXEAXREVERBPROPERTIES, ptr %215, i32 0, i32 17
  %217 = load float, ptr %216, align 4, !tbaa !35
  %218 = load ptr, ptr %4, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct.ALeffect, ptr %218, i32 0, i32 1
  %220 = getelementptr inbounds %struct.anon, ptr %219, i32 0, i32 20
  store float %217, ptr %220, align 4, !tbaa !19
  %221 = load ptr, ptr %10, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct.EFXEAXREVERBPROPERTIES, ptr %221, i32 0, i32 18
  %223 = load float, ptr %222, align 4, !tbaa !36
  %224 = load ptr, ptr %4, align 8, !tbaa !5
  %225 = getelementptr inbounds %struct.ALeffect, ptr %224, i32 0, i32 1
  %226 = getelementptr inbounds %struct.anon, ptr %225, i32 0, i32 10
  store float %223, ptr %226, align 4, !tbaa !19
  %227 = load ptr, ptr %10, align 8, !tbaa !5
  %228 = getelementptr inbounds %struct.EFXEAXREVERBPROPERTIES, ptr %227, i32 0, i32 19
  %229 = load float, ptr %228, align 4, !tbaa !37
  %230 = load ptr, ptr %4, align 8, !tbaa !5
  %231 = getelementptr inbounds %struct.ALeffect, ptr %230, i32 0, i32 1
  %232 = getelementptr inbounds %struct.anon, ptr %231, i32 0, i32 21
  store float %229, ptr %232, align 4, !tbaa !19
  %233 = load ptr, ptr %10, align 8, !tbaa !5
  %234 = getelementptr inbounds %struct.EFXEAXREVERBPROPERTIES, ptr %233, i32 0, i32 20
  %235 = load float, ptr %234, align 4, !tbaa !38
  %236 = load ptr, ptr %4, align 8, !tbaa !5
  %237 = getelementptr inbounds %struct.ALeffect, ptr %236, i32 0, i32 1
  %238 = getelementptr inbounds %struct.anon, ptr %237, i32 0, i32 22
  store float %235, ptr %238, align 4, !tbaa !19
  %239 = load ptr, ptr %10, align 8, !tbaa !5
  %240 = getelementptr inbounds %struct.EFXEAXREVERBPROPERTIES, ptr %239, i32 0, i32 21
  %241 = load float, ptr %240, align 4, !tbaa !39
  %242 = load ptr, ptr %4, align 8, !tbaa !5
  %243 = getelementptr inbounds %struct.ALeffect, ptr %242, i32 0, i32 1
  %244 = getelementptr inbounds %struct.anon, ptr %243, i32 0, i32 11
  store float %241, ptr %244, align 4, !tbaa !19
  %245 = load ptr, ptr %10, align 8, !tbaa !5
  %246 = getelementptr inbounds %struct.EFXEAXREVERBPROPERTIES, ptr %245, i32 0, i32 22
  %247 = load i32, ptr %246, align 4, !tbaa !40
  %248 = icmp ne i32 %247, 0
  %249 = zext i1 %248 to i64
  %250 = select i1 %248, i32 1, i32 0
  %251 = icmp ne i32 %250, 0
  %252 = load ptr, ptr %4, align 8, !tbaa !5
  %253 = getelementptr inbounds %struct.ALeffect, ptr %252, i32 0, i32 1
  %254 = getelementptr inbounds %struct.anon, ptr %253, i32 0, i32 12
  %255 = zext i1 %251 to i8
  store i8 %255, ptr %254, align 4, !tbaa !19
  store i32 1, ptr %8, align 4
  br label %256

256:                                              ; preds = %74, %56
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  %257 = load i32, ptr %8, align 4
  switch i32 %257, label %261 [
    i32 5, label %258
  ]

258:                                              ; preds = %256
  %259 = load ptr, ptr %6, align 8, !tbaa !5
  %260 = getelementptr inbounds %struct.anon.152, ptr %259, i32 1
  store ptr %260, ptr %6, align 8, !tbaa !5
  br label %43

261:                                              ; preds = %256, %47
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  %262 = load i32, ptr %8, align 4
  switch i32 %262, label %278 [
    i32 4, label %263
    i32 1, label %277
  ]

263:                                              ; preds = %261
  br label %264

264:                                              ; preds = %263
  %265 = load i32, ptr @gLogLevel, align 4, !tbaa !9
  %266 = icmp sge i32 %265, 2
  %267 = xor i1 %266, true
  %268 = xor i1 %267, true
  %269 = zext i1 %268 to i64
  %270 = call i64 @llvm.expect.i64(i64 %269, i64 0)
  %271 = icmp ne i64 %270, 0
  br i1 %271, label %272, label %276

272:                                              ; preds = %264
  %273 = load ptr, ptr @gLogFile, align 8, !tbaa !5
  %274 = load ptr, ptr %3, align 8, !tbaa !5
  %275 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %273, ptr noundef @.str.10, ptr noundef %274) #4
  br label %276

276:                                              ; preds = %272, %264
  br label %277

277:                                              ; preds = %276, %261, %28
  ret void

278:                                              ; preds = %261
  unreachable
}

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"_ZTS8LogLevel", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!16, !17, i64 0}
!16 = !{!"_ZTS22EFXEAXREVERBPROPERTIES", !17, i64 0, !17, i64 4, !17, i64 8, !17, i64 12, !17, i64 16, !17, i64 20, !17, i64 24, !17, i64 28, !17, i64 32, !17, i64 36, !7, i64 40, !17, i64 52, !17, i64 56, !7, i64 60, !17, i64 72, !17, i64 76, !17, i64 80, !17, i64 84, !17, i64 88, !17, i64 92, !17, i64 96, !17, i64 100, !18, i64 104}
!17 = !{!"float", !7, i64 0}
!18 = !{!"int", !7, i64 0}
!19 = !{!7, !7, i64 0}
!20 = !{!16, !17, i64 4}
!21 = !{!16, !17, i64 8}
!22 = !{!16, !17, i64 12}
!23 = !{!16, !17, i64 16}
!24 = !{!16, !17, i64 20}
!25 = !{!16, !17, i64 24}
!26 = !{!16, !17, i64 28}
!27 = !{!16, !17, i64 32}
!28 = !{!16, !17, i64 36}
!29 = !{!17, !17, i64 0}
!30 = !{!16, !17, i64 52}
!31 = !{!16, !17, i64 56}
!32 = !{!16, !17, i64 72}
!33 = !{!16, !17, i64 76}
!34 = !{!16, !17, i64 80}
!35 = !{!16, !17, i64 84}
!36 = !{!16, !17, i64 88}
!37 = !{!16, !17, i64 92}
!38 = !{!16, !17, i64 96}
!39 = !{!16, !17, i64 100}
!40 = !{!16, !18, i64 104}


; 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.anon.152 = type { [32 x i8], %struct.EFXEAXREVERBPROPERTIES }
%struct.EFXEAXREVERBPROPERTIES = type { float, float, float, float, float, float, float, float, float, float, [3 x float], float, float, [3 x float], float, float, float, float, float, float, float, float, i32 }

@DisabledEffects = external dso_local local_unnamed_addr global [15 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [5 x i8], align 1
@gLogLevel = external local_unnamed_addr global i32, align 4
@gLogFile = external local_unnamed_addr global ptr, align 8
@.str.9 = external hidden unnamed_addr constant [35 x i8], align 1
@_ZL10reverblist = external hidden constant [113 x %struct.anon.152], align 16
@.str.10 = external hidden unnamed_addr constant [44 x i8], align 1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_116InitEffectParamsEP8ALeffecti(ptr noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local void @_Z16LoadReverbPresetPKcP8ALeffect(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = tail call noundef i32 @_ZN2al10strcasecmpEPKcS1_(ptr noundef %0, ptr noundef nonnull @.str.8) #3
  %4 = icmp eq i32 %3, 0
  br i1 %4, label %5, label %11

5:                                                ; preds = %2
  tail call void @_ZN12_GLOBAL__N_116InitEffectParamsEP8ALeffecti(ptr noundef %1, i32 noundef 0)
  %6 = load i32, ptr @gLogLevel, align 4, !tbaa !5
  %7 = icmp sgt i32 %6, 2
  br i1 %7, label %8, label %114, !prof !9

8:                                                ; preds = %5
  %9 = load ptr, ptr @gLogFile, align 8, !tbaa !10
  %10 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %9, ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.8) #3
  br label %114

11:                                               ; preds = %2
  %12 = load i8, ptr @DisabledEffects, align 1, !tbaa !12, !range !14, !noundef !15
  %13 = trunc nuw i8 %12 to i1
  %14 = load i8, ptr getelementptr inbounds (i8, ptr @DisabledEffects, i64 1), align 1, !range !14
  %15 = xor i8 %14, 1
  %not. = zext nneg i8 %15 to i32
  %.sink = select i1 %13, i32 %not., i32 32768
  tail call void @_ZN12_GLOBAL__N_116InitEffectParamsEP8ALeffecti(ptr noundef %1, i32 noundef %.sink)
  br label %17

16:                                               ; preds = %17
  %.0.add = add nuw nsw i64 %.0.idx79, 140
  %.not = icmp eq i64 %.0.add, 15820
  br i1 %.not, label %108, label %17

17:                                               ; preds = %11, %16
  %.0.idx79 = phi i64 [ 0, %11 ], [ %.0.add, %16 ]
  %.0.ptr80 = getelementptr inbounds i8, ptr @_ZL10reverblist, i64 %.0.idx79
  %18 = tail call noundef i32 @_ZN2al10strcasecmpEPKcS1_(ptr noundef %0, ptr noundef nonnull %.0.ptr80) #3
  %.not70.not = icmp eq i32 %18, 0
  br i1 %.not70.not, label %19, label %16

19:                                               ; preds = %17
  %20 = load i32, ptr @gLogLevel, align 4, !tbaa !5
  %21 = icmp sgt i32 %20, 2
  br i1 %21, label %22, label %.thread73, !prof !9

22:                                               ; preds = %19
  %23 = load ptr, ptr @gLogFile, align 8, !tbaa !10
  %24 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %23, ptr noundef nonnull @.str.9, ptr noundef nonnull %.0.ptr80) #3
  br label %.thread73

.thread73:                                        ; preds = %22, %19
  %25 = getelementptr inbounds i8, ptr %.0.ptr80, i64 32
  %26 = load float, ptr %25, align 4, !tbaa !16
  %27 = getelementptr inbounds i8, ptr %1, i64 4
  store float %26, ptr %27, align 4, !tbaa !20
  %28 = getelementptr inbounds i8, ptr %.0.ptr80, i64 36
  %29 = load float, ptr %28, align 4, !tbaa !21
  %30 = getelementptr inbounds i8, ptr %1, i64 8
  store float %29, ptr %30, align 4, !tbaa !20
  %31 = getelementptr inbounds i8, ptr %.0.ptr80, i64 40
  %32 = load float, ptr %31, align 4, !tbaa !22
  %33 = getelementptr inbounds i8, ptr %1, i64 12
  store float %32, ptr %33, align 4, !tbaa !20
  %34 = getelementptr inbounds i8, ptr %.0.ptr80, i64 44
  %35 = load float, ptr %34, align 4, !tbaa !23
  %36 = getelementptr inbounds i8, ptr %1, i64 16
  store float %35, ptr %36, align 4, !tbaa !20
  %37 = getelementptr inbounds i8, ptr %.0.ptr80, i64 48
  %38 = load float, ptr %37, align 4, !tbaa !24
  %39 = getelementptr inbounds i8, ptr %1, i64 56
  store float %38, ptr %39, align 4, !tbaa !20
  %40 = getelementptr inbounds i8, ptr %.0.ptr80, i64 52
  %41 = load float, ptr %40, align 4, !tbaa !25
  %42 = getelementptr inbounds i8, ptr %1, i64 20
  store float %41, ptr %42, align 4, !tbaa !20
  %43 = getelementptr inbounds i8, ptr %.0.ptr80, i64 56
  %44 = load float, ptr %43, align 4, !tbaa !26
  %45 = getelementptr inbounds i8, ptr %1, i64 24
  store float %44, ptr %45, align 4, !tbaa !20
  %46 = getelementptr inbounds i8, ptr %.0.ptr80, i64 60
  %47 = load float, ptr %46, align 4, !tbaa !27
  %48 = getelementptr inbounds i8, ptr %1, i64 60
  store float %47, ptr %48, align 4, !tbaa !20
  %49 = getelementptr inbounds i8, ptr %.0.ptr80, i64 64
  %50 = load float, ptr %49, align 4, !tbaa !28
  %51 = getelementptr inbounds i8, ptr %1, i64 28
  store float %50, ptr %51, align 4, !tbaa !20
  %52 = getelementptr inbounds i8, ptr %.0.ptr80, i64 68
  %53 = load float, ptr %52, align 4, !tbaa !29
  %54 = getelementptr inbounds i8, ptr %1, i64 32
  store float %53, ptr %54, align 4, !tbaa !20
  %55 = getelementptr inbounds i8, ptr %.0.ptr80, i64 72
  %56 = load float, ptr %55, align 4, !tbaa !30
  %57 = getelementptr inbounds i8, ptr %1, i64 64
  store float %56, ptr %57, align 4, !tbaa !20
  %58 = getelementptr inbounds i8, ptr %.0.ptr80, i64 76
  %59 = load float, ptr %58, align 4, !tbaa !30
  %60 = getelementptr inbounds i8, ptr %1, i64 68
  store float %59, ptr %60, align 4, !tbaa !20
  %61 = getelementptr inbounds i8, ptr %.0.ptr80, i64 80
  %62 = load float, ptr %61, align 4, !tbaa !30
  %63 = getelementptr inbounds i8, ptr %1, i64 72
  store float %62, ptr %63, align 4, !tbaa !20
  %64 = getelementptr inbounds i8, ptr %.0.ptr80, i64 84
  %65 = load float, ptr %64, align 4, !tbaa !31
  %66 = getelementptr inbounds i8, ptr %1, i64 36
  store float %65, ptr %66, align 4, !tbaa !20
  %67 = getelementptr inbounds i8, ptr %.0.ptr80, i64 88
  %68 = load float, ptr %67, align 4, !tbaa !32
  %69 = getelementptr inbounds i8, ptr %1, i64 40
  store float %68, ptr %69, align 4, !tbaa !20
  %70 = getelementptr inbounds i8, ptr %.0.ptr80, i64 92
  %71 = load float, ptr %70, align 4, !tbaa !30
  %72 = getelementptr inbounds i8, ptr %1, i64 76
  store float %71, ptr %72, align 4, !tbaa !20
  %73 = getelementptr inbounds i8, ptr %.0.ptr80, i64 96
  %74 = load float, ptr %73, align 4, !tbaa !30
  %75 = getelementptr inbounds i8, ptr %1, i64 80
  store float %74, ptr %75, align 4, !tbaa !20
  %76 = getelementptr inbounds i8, ptr %.0.ptr80, i64 100
  %77 = load float, ptr %76, align 4, !tbaa !30
  %78 = getelementptr inbounds i8, ptr %1, i64 84
  store float %77, ptr %78, align 4, !tbaa !20
  %79 = getelementptr inbounds i8, ptr %.0.ptr80, i64 104
  %80 = load float, ptr %79, align 4, !tbaa !33
  %81 = getelementptr inbounds i8, ptr %1, i64 88
  store float %80, ptr %81, align 4, !tbaa !20
  %82 = getelementptr inbounds i8, ptr %.0.ptr80, i64 108
  %83 = load float, ptr %82, align 4, !tbaa !34
  %84 = getelementptr inbounds i8, ptr %1, i64 92
  store float %83, ptr %84, align 4, !tbaa !20
  %85 = getelementptr inbounds i8, ptr %.0.ptr80, i64 112
  %86 = load float, ptr %85, align 4, !tbaa !35
  %87 = getelementptr inbounds i8, ptr %1, i64 96
  store float %86, ptr %87, align 4, !tbaa !20
  %88 = getelementptr inbounds i8, ptr %.0.ptr80, i64 116
  %89 = load float, ptr %88, align 4, !tbaa !36
  %90 = getelementptr inbounds i8, ptr %1, i64 100
  store float %89, ptr %90, align 4, !tbaa !20
  %91 = getelementptr inbounds i8, ptr %.0.ptr80, i64 120
  %92 = load float, ptr %91, align 4, !tbaa !37
  %93 = getelementptr inbounds i8, ptr %1, i64 44
  store float %92, ptr %93, align 4, !tbaa !20
  %94 = getelementptr inbounds i8, ptr %.0.ptr80, i64 124
  %95 = load float, ptr %94, align 4, !tbaa !38
  %96 = getelementptr inbounds i8, ptr %1, i64 104
  store float %95, ptr %96, align 4, !tbaa !20
  %97 = getelementptr inbounds i8, ptr %.0.ptr80, i64 128
  %98 = load float, ptr %97, align 4, !tbaa !39
  %99 = getelementptr inbounds i8, ptr %1, i64 108
  store float %98, ptr %99, align 4, !tbaa !20
  %100 = getelementptr inbounds i8, ptr %.0.ptr80, i64 132
  %101 = load float, ptr %100, align 4, !tbaa !40
  %102 = getelementptr inbounds i8, ptr %1, i64 48
  store float %101, ptr %102, align 4, !tbaa !20
  %103 = getelementptr inbounds i8, ptr %.0.ptr80, i64 136
  %104 = load i32, ptr %103, align 4, !tbaa !41
  %105 = icmp ne i32 %104, 0
  %106 = getelementptr inbounds i8, ptr %1, i64 52
  %107 = zext i1 %105 to i8
  store i8 %107, ptr %106, align 4, !tbaa !20
  br label %114

108:                                              ; preds = %16
  %109 = load i32, ptr @gLogLevel, align 4
  %110 = icmp sgt i32 %109, 1
  br i1 %110, label %111, label %114, !prof !42

111:                                              ; preds = %108
  %112 = load ptr, ptr @gLogFile, align 8, !tbaa !10
  %113 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %112, ptr noundef nonnull @.str.10, ptr noundef %0) #3
  br label %114

114:                                              ; preds = %.thread73, %108, %111, %8, %5
  ret void
}

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 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 #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 = !{!"_ZTS8LogLevel", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!"branch_weights", !"expected", i32 1, i32 2000}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = !{i8 0, i8 2}
!15 = !{}
!16 = !{!17, !18, i64 0}
!17 = !{!"_ZTS22EFXEAXREVERBPROPERTIES", !18, i64 0, !18, i64 4, !18, i64 8, !18, i64 12, !18, i64 16, !18, i64 20, !18, i64 24, !18, i64 28, !18, i64 32, !18, i64 36, !7, i64 40, !18, i64 52, !18, i64 56, !7, i64 60, !18, i64 72, !18, i64 76, !18, i64 80, !18, i64 84, !18, i64 88, !18, i64 92, !18, i64 96, !18, i64 100, !19, i64 104}
!18 = !{!"float", !7, i64 0}
!19 = !{!"int", !7, i64 0}
!20 = !{!7, !7, i64 0}
!21 = !{!17, !18, i64 4}
!22 = !{!17, !18, i64 8}
!23 = !{!17, !18, i64 12}
!24 = !{!17, !18, i64 16}
!25 = !{!17, !18, i64 20}
!26 = !{!17, !18, i64 24}
!27 = !{!17, !18, i64 28}
!28 = !{!17, !18, i64 32}
!29 = !{!17, !18, i64 36}
!30 = !{!18, !18, i64 0}
!31 = !{!17, !18, i64 52}
!32 = !{!17, !18, i64 56}
!33 = !{!17, !18, i64 72}
!34 = !{!17, !18, i64 76}
!35 = !{!17, !18, i64 80}
!36 = !{!17, !18, i64 84}
!37 = !{!17, !18, i64 88}
!38 = !{!17, !18, i64 92}
!39 = !{!17, !18, i64 96}
!40 = !{!17, !18, i64 100}
!41 = !{!17, !19, i64 104}
!42 = !{!"branch_weights", i32 1056437, i32 2146427211}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopUnrollPass,LowerExpectIntrinsicPass,SROAPass,SimplifyCFGPass,TailCallElimPass