; LLVM IR from yettabaa/cub3D :: mlx-linux/test (main)

; 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.s_xvar = type { ptr, i64, i32, i32, ptr, i64, i32, ptr, ptr, ptr, i32, i32, i32, [6 x i32], i64, i64, i32 }
%struct.s_img = type { ptr, i64, ptr, i32, i32, i32, i32, i32, i32, ptr, %struct.XShmSegmentInfo }
%struct.XShmSegmentInfo = type { i64, i32, ptr, i32 }

@mlx = external dso_local global ptr, align 8
@win1 = external dso_local global ptr, align 8
@im3 = external dso_local global ptr, align 8
@win2 = external dso_local global ptr, align 8
@im4 = external dso_local global ptr, align 8
@im2 = external dso_local global ptr, align 8
@win3 = external dso_local global ptr, align 8
@.str.6 = external hidden unnamed_addr constant [23 x i8], align 1
@local_endian = external dso_local global i32, align 4
@.str.7 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [29 x i8], align 1
@im1 = external dso_local global ptr, align 8
@bpp1 = external dso_local global i32, align 4
@sl1 = external dso_local global i32, align 4
@endian1 = external dso_local global i32, align 4
@data1 = external dso_local global ptr, align 8
@.str.17 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [29 x i8], align 1
@bpp3 = external dso_local global i32, align 4
@sl3 = external dso_local global i32, align 4
@endian3 = external dso_local global i32, align 4
@data3 = external dso_local global ptr, align 8
@.str.23 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [9 x i8], align 1
@xpm1_x = external dso_local global i32, align 4
@xpm1_y = external dso_local global i32, align 4
@bpp2 = external dso_local global i32, align 4
@sl2 = external dso_local global i32, align 4
@endian2 = external dso_local global i32, align 4
@data2 = external dso_local global ptr, align 8
@.str.31 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [7 x i8], align 1
@bpp4 = external dso_local global i32, align 4
@sl4 = external dso_local global i32, align 4
@endian4 = external dso_local global i32, align 4
@data4 = external dso_local global ptr, align 8
@.str.35 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [62 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local i32 @expose_win1(ptr noundef) #0

declare i32 @mlx_put_image_to_window(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @expose_win2(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @key_win1(i32 noundef, ptr noundef) #0

declare i32 @printf(ptr noundef, ...) #1

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @key_win2(i32 noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @key_win3(i32 noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @mouse_win1(i32 noundef, i32 noundef, i32 noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @mouse_win2(i32 noundef, i32 noundef, i32 noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @mouse_win3(i32 noundef, i32 noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
define dso_local i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #4
  %3 = call i32 (ptr, ...) @printf(ptr noundef @.str.6)
  store i32 287454020, ptr %2, align 4, !tbaa !5
  %4 = getelementptr inbounds i8, ptr %2, i64 0
  %5 = load i8, ptr %4, align 4, !tbaa !9
  %6 = zext i8 %5 to i32
  %7 = icmp eq i32 %6, 17
  br i1 %7, label %8, label %9

8:                                                ; preds = %0
  store i32 1, ptr @local_endian, align 4, !tbaa !5
  br label %10

9:                                                ; preds = %0
  store i32 0, ptr @local_endian, align 4, !tbaa !5
  br label %10

10:                                               ; preds = %9, %8
  %11 = load i32, ptr @local_endian, align 4, !tbaa !5
  %12 = call i32 (ptr, ...) @printf(ptr noundef @.str.7, i32 noundef %11)
  %13 = call i32 (ptr, ...) @printf(ptr noundef @.str.8)
  %14 = call ptr (...) @mlx_init()
  store ptr %14, ptr @mlx, align 8, !tbaa !10
  %15 = icmp ne ptr %14, null
  br i1 %15, label %18, label %16

16:                                               ; preds = %10
  %17 = call i32 (ptr, ...) @printf(ptr noundef @.str.9)
  call void @exit(i32 noundef 1) #5
  unreachable

18:                                               ; preds = %10
  %19 = load ptr, ptr @mlx, align 8, !tbaa !10
  %20 = getelementptr inbounds %struct.s_xvar, ptr %19, i32 0, i32 10
  %21 = load i32, ptr %20, align 8, !tbaa !12
  %22 = load ptr, ptr @mlx, align 8, !tbaa !10
  %23 = getelementptr inbounds %struct.s_xvar, ptr %22, i32 0, i32 11
  %24 = load i32, ptr %23, align 4, !tbaa !15
  %25 = call i32 (ptr, ...) @printf(ptr noundef @.str.10, i32 noundef %21, i32 noundef %24)
  %26 = call i32 (ptr, ...) @printf(ptr noundef @.str.11, i32 noundef 242, i32 noundef 242)
  %27 = load ptr, ptr @mlx, align 8, !tbaa !10
  %28 = call ptr @mlx_new_window(ptr noundef %27, i32 noundef 242, i32 noundef 242, ptr noundef @.str.12)
  store ptr %28, ptr @win1, align 8, !tbaa !10
  %29 = icmp ne ptr %28, null
  br i1 %29, label %32, label %30

30:                                               ; preds = %18
  %31 = call i32 (ptr, ...) @printf(ptr noundef @.str.9)
  call void @exit(i32 noundef 1) #5
  unreachable

32:                                               ; preds = %18
  %33 = call i32 (ptr, ...) @printf(ptr noundef @.str.13)
  %34 = call i32 (ptr, ...) @printf(ptr noundef @.str.14)
  %35 = load ptr, ptr @win1, align 8, !tbaa !10
  %36 = call i32 @color_map_1(ptr noundef %35, i32 noundef 242, i32 noundef 242)
  %37 = call i32 (ptr, ...) @printf(ptr noundef @.str.13)
  %38 = call i32 @sleep(i32 noundef 2)
  %39 = call i32 (ptr, ...) @printf(ptr noundef @.str.15)
  %40 = load ptr, ptr @mlx, align 8, !tbaa !10
  %41 = load ptr, ptr @win1, align 8, !tbaa !10
  %42 = call i32 @mlx_clear_window(ptr noundef %40, ptr noundef %41)
  %43 = call i32 (ptr, ...) @printf(ptr noundef @.str.13)
  %44 = call i32 @sleep(i32 noundef 2)
  %45 = call i32 (ptr, ...) @printf(ptr noundef @.str.16, i32 noundef 42, i32 noundef 42)
  %46 = load ptr, ptr @mlx, align 8, !tbaa !10
  %47 = call ptr @mlx_new_image(ptr noundef %46, i32 noundef 42, i32 noundef 42)
  store ptr %47, ptr @im1, align 8, !tbaa !10
  %48 = icmp ne ptr %47, null
  br i1 %48, label %51, label %49

49:                                               ; preds = %32
  %50 = call i32 (ptr, ...) @printf(ptr noundef @.str.9)
  call void @exit(i32 noundef 1) #5
  unreachable

51:                                               ; preds = %32
  %52 = load ptr, ptr @im1, align 8, !tbaa !10
  %53 = call ptr @mlx_get_data_addr(ptr noundef %52, ptr noundef @bpp1, ptr noundef @sl1, ptr noundef @endian1)
  store ptr %53, ptr @data1, align 8, !tbaa !10
  %54 = load i32, ptr @bpp1, align 4, !tbaa !5
  %55 = load i32, ptr @sl1, align 4, !tbaa !5
  %56 = load i32, ptr @endian1, align 4, !tbaa !5
  %57 = load ptr, ptr @im1, align 8, !tbaa !10
  %58 = getelementptr inbounds %struct.s_img, ptr %57, i32 0, i32 7
  %59 = load i32, ptr %58, align 8, !tbaa !16
  %60 = call i32 (ptr, ...) @printf(ptr noundef @.str.17, i32 noundef %54, i32 noundef %55, i32 noundef %56, i32 noundef %59)
  %61 = call i32 (ptr, ...) @printf(ptr noundef @.str.18)
  %62 = load ptr, ptr @data1, align 8, !tbaa !10
  %63 = load i32, ptr @bpp1, align 4, !tbaa !5
  %64 = load i32, ptr @sl1, align 4, !tbaa !5
  %65 = load i32, ptr @endian1, align 4, !tbaa !5
  %66 = call i32 @color_map_2(ptr noundef %62, i32 noundef %63, i32 noundef %64, i32 noundef 42, i32 noundef 42, i32 noundef %65, i32 noundef 1)
  %67 = load ptr, ptr @im1, align 8, !tbaa !10
  %68 = getelementptr inbounds %struct.s_img, ptr %67, i32 0, i32 1
  %69 = load i64, ptr %68, align 8, !tbaa !19
  %70 = trunc i64 %69 to i32
  %71 = call i32 (ptr, ...) @printf(ptr noundef @.str.19, i32 noundef %70)
  %72 = call i32 (ptr, ...) @printf(ptr noundef @.str.20)
  %73 = load ptr, ptr @mlx, align 8, !tbaa !10
  %74 = load ptr, ptr @win1, align 8, !tbaa !10
  %75 = load ptr, ptr @im1, align 8, !tbaa !10
  %76 = call i32 @mlx_put_image_to_window(ptr noundef %73, ptr noundef %74, ptr noundef %75, i32 noundef 20, i32 noundef 20)
  %77 = call i32 (ptr, ...) @printf(ptr noundef @.str.13)
  %78 = call i32 @sleep(i32 noundef 2)
  %79 = call i32 (ptr, ...) @printf(ptr noundef @.str.21)
  %80 = load ptr, ptr @mlx, align 8, !tbaa !10
  %81 = load ptr, ptr @im1, align 8, !tbaa !10
  %82 = call i32 @mlx_destroy_image(ptr noundef %80, ptr noundef %81)
  %83 = call i32 (ptr, ...) @printf(ptr noundef @.str.13)
  %84 = call i32 @sleep(i32 noundef 2)
  %85 = call i32 (ptr, ...) @printf(ptr noundef @.str.22, i32 noundef 242, i32 noundef 242)
  %86 = load ptr, ptr @mlx, align 8, !tbaa !10
  %87 = call ptr @mlx_new_image(ptr noundef %86, i32 noundef 242, i32 noundef 242)
  store ptr %87, ptr @im3, align 8, !tbaa !10
  %88 = icmp ne ptr %87, null
  br i1 %88, label %91, label %89

89:                                               ; preds = %51
  %90 = call i32 (ptr, ...) @printf(ptr noundef @.str.9)
  call void @exit(i32 noundef 1) #5
  unreachable

91:                                               ; preds = %51
  %92 = load ptr, ptr @im3, align 8, !tbaa !10
  %93 = call ptr @mlx_get_data_addr(ptr noundef %92, ptr noundef @bpp3, ptr noundef @sl3, ptr noundef @endian3)
  store ptr %93, ptr @data3, align 8, !tbaa !10
  %94 = load i32, ptr @bpp3, align 4, !tbaa !5
  %95 = load i32, ptr @sl3, align 4, !tbaa !5
  %96 = load i32, ptr @endian3, align 4, !tbaa !5
  %97 = load ptr, ptr @im3, align 8, !tbaa !10
  %98 = getelementptr inbounds %struct.s_img, ptr %97, i32 0, i32 7
  %99 = load i32, ptr %98, align 8, !tbaa !16
  %100 = call i32 (ptr, ...) @printf(ptr noundef @.str.23, i32 noundef %94, i32 noundef %95, i32 noundef %96, i32 noundef %99)
  %101 = call i32 (ptr, ...) @printf(ptr noundef @.str.24)
  %102 = load ptr, ptr @data3, align 8, !tbaa !10
  %103 = load i32, ptr @bpp3, align 4, !tbaa !5
  %104 = load i32, ptr @sl3, align 4, !tbaa !5
  %105 = load i32, ptr @endian3, align 4, !tbaa !5
  %106 = call i32 @color_map_2(ptr noundef %102, i32 noundef %103, i32 noundef %104, i32 noundef 242, i32 noundef 242, i32 noundef %105, i32 noundef 1)
  %107 = load ptr, ptr @im3, align 8, !tbaa !10
  %108 = getelementptr inbounds %struct.s_img, ptr %107, i32 0, i32 1
  %109 = load i64, ptr %108, align 8, !tbaa !19
  %110 = trunc i64 %109 to i32
  %111 = call i32 (ptr, ...) @printf(ptr noundef @.str.19, i32 noundef %110)
  %112 = call i32 (ptr, ...) @printf(ptr noundef @.str.25)
  %113 = load ptr, ptr @mlx, align 8, !tbaa !10
  %114 = load ptr, ptr @win1, align 8, !tbaa !10
  %115 = load ptr, ptr @im3, align 8, !tbaa !10
  %116 = call i32 @mlx_put_image_to_window(ptr noundef %113, ptr noundef %114, ptr noundef %115, i32 noundef 20, i32 noundef 20)
  %117 = call i32 (ptr, ...) @printf(ptr noundef @.str.13)
  %118 = call i32 @sleep(i32 noundef 2)
  %119 = call i32 (ptr, ...) @printf(ptr noundef @.str.26)
  %120 = load ptr, ptr @mlx, align 8, !tbaa !10
  %121 = load ptr, ptr @win1, align 8, !tbaa !10
  %122 = call i32 @mlx_string_put(ptr noundef %120, ptr noundef %121, i32 noundef 5, i32 noundef 121, i32 noundef 16751103, ptr noundef @.str.27)
  %123 = load ptr, ptr @mlx, align 8, !tbaa !10
  %124 = load ptr, ptr @win1, align 8, !tbaa !10
  %125 = call i32 @mlx_string_put(ptr noundef %123, ptr noundef %124, i32 noundef 15, i32 noundef 141, i32 noundef 65535, ptr noundef @.str.28)
  %126 = call i32 (ptr, ...) @printf(ptr noundef @.str.13)
  %127 = call i32 @sleep(i32 noundef 2)
  %128 = call i32 (ptr, ...) @printf(ptr noundef @.str.29)
  %129 = load ptr, ptr @mlx, align 8, !tbaa !10
  %130 = call ptr @mlx_xpm_file_to_image(ptr noundef %129, ptr noundef @.str.30, ptr noundef @xpm1_x, ptr noundef @xpm1_y)
  store ptr %130, ptr @im2, align 8, !tbaa !10
  %131 = icmp ne ptr %130, null
  br i1 %131, label %134, label %132

132:                                              ; preds = %91
  %133 = call i32 (ptr, ...) @printf(ptr noundef @.str.9)
  call void @exit(i32 noundef 1) #5
  unreachable

134:                                              ; preds = %91
  %135 = load ptr, ptr @im2, align 8, !tbaa !10
  %136 = call ptr @mlx_get_data_addr(ptr noundef %135, ptr noundef @bpp2, ptr noundef @sl2, ptr noundef @endian2)
  store ptr %136, ptr @data2, align 8, !tbaa !10
  %137 = load i32, ptr @xpm1_x, align 4, !tbaa !5
  %138 = load i32, ptr @xpm1_y, align 4, !tbaa !5
  %139 = load i32, ptr @bpp2, align 4, !tbaa !5
  %140 = load i32, ptr @sl2, align 4, !tbaa !5
  %141 = load i32, ptr @endian2, align 4, !tbaa !5
  %142 = load ptr, ptr @im2, align 8, !tbaa !10
  %143 = getelementptr inbounds %struct.s_img, ptr %142, i32 0, i32 7
  %144 = load i32, ptr %143, align 8, !tbaa !16
  %145 = call i32 (ptr, ...) @printf(ptr noundef @.str.31, i32 noundef %137, i32 noundef %138, i32 noundef %139, i32 noundef %140, i32 noundef %141, i32 noundef %144)
  %146 = call i32 @sleep(i32 noundef 2)
  %147 = call i32 (ptr, ...) @printf(ptr noundef @.str.32)
  %148 = load ptr, ptr @mlx, align 8, !tbaa !10
  %149 = load ptr, ptr @win1, align 8, !tbaa !10
  %150 = load ptr, ptr @im2, align 8, !tbaa !10
  %151 = call i32 @mlx_put_image_to_window(ptr noundef %148, ptr noundef %149, ptr noundef %150, i32 noundef 0, i32 noundef 0)
  %152 = load ptr, ptr @mlx, align 8, !tbaa !10
  %153 = load ptr, ptr @win1, align 8, !tbaa !10
  %154 = load ptr, ptr @im2, align 8, !tbaa !10
  %155 = call i32 @mlx_put_image_to_window(ptr noundef %152, ptr noundef %153, ptr noundef %154, i32 noundef 100, i32 noundef 100)
  %156 = call i32 (ptr, ...) @printf(ptr noundef @.str.13)
  %157 = call i32 @sleep(i32 noundef 2)
  %158 = call i32 (ptr, ...) @printf(ptr noundef @.str.33)
  %159 = load ptr, ptr @mlx, align 8, !tbaa !10
  %160 = call ptr @mlx_new_window(ptr noundef %159, i32 noundef 242, i32 noundef 242, ptr noundef @.str.34)
  store ptr %160, ptr @win2, align 8, !tbaa !10
  %161 = load ptr, ptr @mlx, align 8, !tbaa !10
  %162 = call ptr @mlx_new_image(ptr noundef %161, i32 noundef 242, i32 noundef 242)
  store ptr %162, ptr @im4, align 8, !tbaa !10
  %163 = icmp ne ptr %162, null
  br i1 %163, label %166, label %164

164:                                              ; preds = %134
  %165 = call i32 (ptr, ...) @printf(ptr noundef @.str.9)
  call void @exit(i32 noundef 1) #5
  unreachable

166:                                              ; preds = %134
  %167 = load ptr, ptr @im4, align 8, !tbaa !10
  %168 = call ptr @mlx_get_data_addr(ptr noundef %167, ptr noundef @bpp4, ptr noundef @sl4, ptr noundef @endian4)
  store ptr %168, ptr @data4, align 8, !tbaa !10
  %169 = load ptr, ptr @data4, align 8, !tbaa !10
  %170 = load i32, ptr @bpp4, align 4, !tbaa !5
  %171 = load i32, ptr @sl4, align 4, !tbaa !5
  %172 = load i32, ptr @endian4, align 4, !tbaa !5
  %173 = call i32 @color_map_2(ptr noundef %169, i32 noundef %170, i32 noundef %171, i32 noundef 242, i32 noundef 242, i32 noundef %172, i32 noundef 2)
  %174 = call i32 (ptr, ...) @printf(ptr noundef @.str.35)
  %175 = load ptr, ptr @mlx, align 8, !tbaa !10
  %176 = call ptr @mlx_new_window(ptr noundef %175, i32 noundef 242, i32 noundef 242, ptr noundef @.str.36)
  store ptr %176, ptr @win3, align 8, !tbaa !10
  %177 = load ptr, ptr @win1, align 8, !tbaa !10
  %178 = call i32 @mlx_expose_hook(ptr noundef %177, ptr noundef @expose_win1, ptr noundef null)
  %179 = load ptr, ptr @win1, align 8, !tbaa !10
  %180 = call i32 @mlx_mouse_hook(ptr noundef %179, ptr noundef @mouse_win1, ptr noundef null)
  %181 = load ptr, ptr @win1, align 8, !tbaa !10
  %182 = call i32 @mlx_key_hook(ptr noundef %181, ptr noundef @key_win1, ptr noundef null)
  %183 = load ptr, ptr @win2, align 8, !tbaa !10
  %184 = call i32 @mlx_expose_hook(ptr noundef %183, ptr noundef @expose_win2, ptr noundef null)
  %185 = load ptr, ptr @win2, align 8, !tbaa !10
  %186 = call i32 @mlx_mouse_hook(ptr noundef %185, ptr noundef @mouse_win2, ptr noundef null)
  %187 = load ptr, ptr @win2, align 8, !tbaa !10
  %188 = call i32 @mlx_key_hook(ptr noundef %187, ptr noundef @key_win2, ptr noundef null)
  %189 = load ptr, ptr @win3, align 8, !tbaa !10
  %190 = call i32 @mlx_key_hook(ptr noundef %189, ptr noundef @key_win3, ptr noundef null)
  %191 = load ptr, ptr @win3, align 8, !tbaa !10
  %192 = call i32 @mlx_hook(ptr noundef %191, i32 noundef 6, i32 noundef 64, ptr noundef @mouse_win3, ptr noundef null)
  %193 = call i32 (ptr, ...) @printf(ptr noundef @.str.37)
  %194 = load ptr, ptr @mlx, align 8, !tbaa !10
  %195 = call i32 @mlx_loop(ptr noundef %194)
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #4
  %196 = load i32, ptr %1, align 4
  ret i32 %196
}

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

declare ptr @mlx_init(...) #1

declare ptr @mlx_new_window(ptr noundef, i32 noundef, i32 noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @color_map_1(ptr noundef, i32 noundef, i32 noundef) #0

declare i32 @sleep(i32 noundef) #1

declare i32 @mlx_clear_window(ptr noundef, ptr noundef) #1

declare ptr @mlx_new_image(ptr noundef, i32 noundef, i32 noundef) #1

declare ptr @mlx_get_data_addr(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @color_map_2(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #0

declare i32 @mlx_destroy_image(ptr noundef, ptr noundef) #1

declare i32 @mlx_string_put(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef) #1

declare ptr @mlx_xpm_file_to_image(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

declare i32 @mlx_expose_hook(ptr noundef, ptr noundef, ptr noundef) #1

declare i32 @mlx_mouse_hook(ptr noundef, ptr noundef, ptr noundef) #1

declare i32 @mlx_key_hook(ptr noundef, ptr noundef, ptr noundef) #1

declare i32 @mlx_hook(ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) #1

declare i32 @mlx_loop(ptr noundef) #1

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

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 = { "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 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nounwind }
attributes #5 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!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 = !{!"any pointer", !7, i64 0}
!12 = !{!13, !6, i64 72}
!13 = !{!"s_xvar", !11, i64 0, !14, i64 8, !6, i64 16, !6, i64 20, !11, i64 24, !14, i64 32, !6, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !6, i64 72, !6, i64 76, !6, i64 80, !7, i64 84, !14, i64 112, !14, i64 120, !6, i64 128}
!14 = !{!"long", !7, i64 0}
!15 = !{!13, !6, i64 76}
!16 = !{!17, !6, i64 40}
!17 = !{!"s_img", !11, i64 0, !14, i64 8, !11, i64 16, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !6, i64 40, !6, i64 44, !11, i64 48, !18, i64 56}
!18 = !{!"", !14, i64 0, !6, i64 8, !11, i64 16, !6, i64 24}
!19 = !{!17, !14, i64 8}


; 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"

@mlx = external dso_local local_unnamed_addr global ptr, align 8
@win1 = external dso_local local_unnamed_addr global ptr, align 8
@im3 = external dso_local local_unnamed_addr global ptr, align 8
@win2 = external dso_local local_unnamed_addr global ptr, align 8
@im4 = external dso_local local_unnamed_addr global ptr, align 8
@im2 = external dso_local local_unnamed_addr global ptr, align 8
@win3 = external dso_local local_unnamed_addr global ptr, align 8
@.str.6 = external hidden unnamed_addr constant [23 x i8], align 1
@local_endian = external dso_local local_unnamed_addr global i32, align 4
@.str.7 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [29 x i8], align 1
@im1 = external dso_local local_unnamed_addr global ptr, align 8
@bpp1 = external dso_local global i32, align 4
@sl1 = external dso_local global i32, align 4
@endian1 = external dso_local global i32, align 4
@data1 = external dso_local local_unnamed_addr global ptr, align 8
@.str.17 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [29 x i8], align 1
@bpp3 = external dso_local global i32, align 4
@sl3 = external dso_local global i32, align 4
@endian3 = external dso_local global i32, align 4
@data3 = external dso_local local_unnamed_addr global ptr, align 8
@.str.23 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.29 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [9 x i8], align 1
@xpm1_x = external dso_local global i32, align 4
@xpm1_y = external dso_local global i32, align 4
@bpp2 = external dso_local global i32, align 4
@sl2 = external dso_local global i32, align 4
@endian2 = external dso_local global i32, align 4
@data2 = external dso_local local_unnamed_addr global ptr, align 8
@.str.31 = external hidden unnamed_addr constant [65 x i8], align 1
@.str.32 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.33 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.34 = external hidden unnamed_addr constant [7 x i8], align 1
@bpp4 = external dso_local global i32, align 4
@sl4 = external dso_local global i32, align 4
@endian4 = external dso_local global i32, align 4
@data4 = external dso_local local_unnamed_addr global ptr, align 8
@.str.35 = external hidden unnamed_addr constant [34 x i8], align 1
@.str.36 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.37 = external hidden unnamed_addr constant [62 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local i32 @expose_win1(ptr noundef) #0

declare i32 @mlx_put_image_to_window(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @expose_win2(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @key_win1(i32 noundef, ptr noundef) #0

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #3

; Function Attrs: nounwind uwtable
declare dso_local i32 @key_win2(i32 noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @key_win3(i32 noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @mouse_win1(i32 noundef, i32 noundef, i32 noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @mouse_win2(i32 noundef, i32 noundef, i32 noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @mouse_win3(i32 noundef, i32 noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6)
  store i32 0, ptr @local_endian, align 4, !tbaa !5
  %2 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 0)
  %3 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8)
  %4 = tail call ptr (...) @mlx_init() #4
  store ptr %4, ptr @mlx, align 8, !tbaa !9
  %.not = icmp eq ptr %4, null
  br i1 %.not, label %5, label %7

5:                                                ; preds = %0
  %6 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9)
  tail call void @exit(i32 noundef 1) #5
  unreachable

7:                                                ; preds = %0
  %8 = getelementptr inbounds i8, ptr %4, i64 72
  %9 = load i32, ptr %8, align 8, !tbaa !11
  %10 = getelementptr inbounds i8, ptr %4, i64 76
  %11 = load i32, ptr %10, align 4, !tbaa !14
  %12 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.10, i32 noundef %9, i32 noundef %11)
  %13 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.11, i32 noundef 242, i32 noundef 242)
  %14 = load ptr, ptr @mlx, align 8, !tbaa !9
  %15 = tail call ptr @mlx_new_window(ptr noundef %14, i32 noundef 242, i32 noundef 242, ptr noundef nonnull @.str.12) #4
  store ptr %15, ptr @win1, align 8, !tbaa !9
  %.not5 = icmp eq ptr %15, null
  br i1 %.not5, label %16, label %18

16:                                               ; preds = %7
  %17 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9)
  tail call void @exit(i32 noundef 1) #5
  unreachable

18:                                               ; preds = %7
  %19 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13)
  %20 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.14)
  %21 = load ptr, ptr @win1, align 8, !tbaa !9
  %22 = tail call i32 @color_map_1(ptr noundef %21, i32 noundef 242, i32 noundef 242)
  %23 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13)
  %24 = tail call i32 @sleep(i32 noundef 2) #4
  %25 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.15)
  %26 = load ptr, ptr @mlx, align 8, !tbaa !9
  %27 = load ptr, ptr @win1, align 8, !tbaa !9
  %28 = tail call i32 @mlx_clear_window(ptr noundef %26, ptr noundef %27) #4
  %29 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13)
  %30 = tail call i32 @sleep(i32 noundef 2) #4
  %31 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.16, i32 noundef 42, i32 noundef 42)
  %32 = load ptr, ptr @mlx, align 8, !tbaa !9
  %33 = tail call ptr @mlx_new_image(ptr noundef %32, i32 noundef 42, i32 noundef 42) #4
  store ptr %33, ptr @im1, align 8, !tbaa !9
  %.not6 = icmp eq ptr %33, null
  br i1 %.not6, label %34, label %36

34:                                               ; preds = %18
  %35 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9)
  tail call void @exit(i32 noundef 1) #5
  unreachable

36:                                               ; preds = %18
  %37 = tail call ptr @mlx_get_data_addr(ptr noundef nonnull %33, ptr noundef nonnull @bpp1, ptr noundef nonnull @sl1, ptr noundef nonnull @endian1) #4
  store ptr %37, ptr @data1, align 8, !tbaa !9
  %38 = load i32, ptr @bpp1, align 4, !tbaa !5
  %39 = load i32, ptr @sl1, align 4, !tbaa !5
  %40 = load i32, ptr @endian1, align 4, !tbaa !5
  %41 = load ptr, ptr @im1, align 8, !tbaa !9
  %42 = getelementptr inbounds i8, ptr %41, i64 40
  %43 = load i32, ptr %42, align 8, !tbaa !15
  %44 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.17, i32 noundef %38, i32 noundef %39, i32 noundef %40, i32 noundef %43)
  %45 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.18)
  %46 = load ptr, ptr @data1, align 8, !tbaa !9
  %47 = load i32, ptr @bpp1, align 4, !tbaa !5
  %48 = load i32, ptr @sl1, align 4, !tbaa !5
  %49 = load i32, ptr @endian1, align 4, !tbaa !5
  %50 = tail call i32 @color_map_2(ptr noundef %46, i32 noundef %47, i32 noundef %48, i32 noundef 42, i32 noundef 42, i32 noundef %49, i32 noundef 1)
  %51 = load ptr, ptr @im1, align 8, !tbaa !9
  %52 = getelementptr inbounds i8, ptr %51, i64 8
  %53 = load i64, ptr %52, align 8, !tbaa !18
  %54 = trunc i64 %53 to i32
  %55 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.19, i32 noundef %54)
  %56 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.20)
  %57 = load ptr, ptr @mlx, align 8, !tbaa !9
  %58 = load ptr, ptr @win1, align 8, !tbaa !9
  %59 = load ptr, ptr @im1, align 8, !tbaa !9
  %60 = tail call i32 @mlx_put_image_to_window(ptr noundef %57, ptr noundef %58, ptr noundef %59, i32 noundef 20, i32 noundef 20) #4
  %61 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13)
  %62 = tail call i32 @sleep(i32 noundef 2) #4
  %63 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.21)
  %64 = load ptr, ptr @mlx, align 8, !tbaa !9
  %65 = load ptr, ptr @im1, align 8, !tbaa !9
  %66 = tail call i32 @mlx_destroy_image(ptr noundef %64, ptr noundef %65) #4
  %67 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13)
  %68 = tail call i32 @sleep(i32 noundef 2) #4
  %69 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.22, i32 noundef 242, i32 noundef 242)
  %70 = load ptr, ptr @mlx, align 8, !tbaa !9
  %71 = tail call ptr @mlx_new_image(ptr noundef %70, i32 noundef 242, i32 noundef 242) #4
  store ptr %71, ptr @im3, align 8, !tbaa !9
  %.not7 = icmp eq ptr %71, null
  br i1 %.not7, label %72, label %74

72:                                               ; preds = %36
  %73 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9)
  tail call void @exit(i32 noundef 1) #5
  unreachable

74:                                               ; preds = %36
  %75 = tail call ptr @mlx_get_data_addr(ptr noundef nonnull %71, ptr noundef nonnull @bpp3, ptr noundef nonnull @sl3, ptr noundef nonnull @endian3) #4
  store ptr %75, ptr @data3, align 8, !tbaa !9
  %76 = load i32, ptr @bpp3, align 4, !tbaa !5
  %77 = load i32, ptr @sl3, align 4, !tbaa !5
  %78 = load i32, ptr @endian3, align 4, !tbaa !5
  %79 = load ptr, ptr @im3, align 8, !tbaa !9
  %80 = getelementptr inbounds i8, ptr %79, i64 40
  %81 = load i32, ptr %80, align 8, !tbaa !15
  %82 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.23, i32 noundef %76, i32 noundef %77, i32 noundef %78, i32 noundef %81)
  %83 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.24)
  %84 = load ptr, ptr @data3, align 8, !tbaa !9
  %85 = load i32, ptr @bpp3, align 4, !tbaa !5
  %86 = load i32, ptr @sl3, align 4, !tbaa !5
  %87 = load i32, ptr @endian3, align 4, !tbaa !5
  %88 = tail call i32 @color_map_2(ptr noundef %84, i32 noundef %85, i32 noundef %86, i32 noundef 242, i32 noundef 242, i32 noundef %87, i32 noundef 1)
  %89 = load ptr, ptr @im3, align 8, !tbaa !9
  %90 = getelementptr inbounds i8, ptr %89, i64 8
  %91 = load i64, ptr %90, align 8, !tbaa !18
  %92 = trunc i64 %91 to i32
  %93 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.19, i32 noundef %92)
  %94 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.25)
  %95 = load ptr, ptr @mlx, align 8, !tbaa !9
  %96 = load ptr, ptr @win1, align 8, !tbaa !9
  %97 = load ptr, ptr @im3, align 8, !tbaa !9
  %98 = tail call i32 @mlx_put_image_to_window(ptr noundef %95, ptr noundef %96, ptr noundef %97, i32 noundef 20, i32 noundef 20) #4
  %99 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13)
  %100 = tail call i32 @sleep(i32 noundef 2) #4
  %101 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.26)
  %102 = load ptr, ptr @mlx, align 8, !tbaa !9
  %103 = load ptr, ptr @win1, align 8, !tbaa !9
  %104 = tail call i32 @mlx_string_put(ptr noundef %102, ptr noundef %103, i32 noundef 5, i32 noundef 121, i32 noundef 16751103, ptr noundef nonnull @.str.27) #4
  %105 = load ptr, ptr @mlx, align 8, !tbaa !9
  %106 = load ptr, ptr @win1, align 8, !tbaa !9
  %107 = tail call i32 @mlx_string_put(ptr noundef %105, ptr noundef %106, i32 noundef 15, i32 noundef 141, i32 noundef 65535, ptr noundef nonnull @.str.28) #4
  %108 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13)
  %109 = tail call i32 @sleep(i32 noundef 2) #4
  %110 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.29)
  %111 = load ptr, ptr @mlx, align 8, !tbaa !9
  %112 = tail call ptr @mlx_xpm_file_to_image(ptr noundef %111, ptr noundef nonnull @.str.30, ptr noundef nonnull @xpm1_x, ptr noundef nonnull @xpm1_y) #4
  store ptr %112, ptr @im2, align 8, !tbaa !9
  %.not8 = icmp eq ptr %112, null
  br i1 %.not8, label %113, label %115

113:                                              ; preds = %74
  %114 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9)
  tail call void @exit(i32 noundef 1) #5
  unreachable

115:                                              ; preds = %74
  %116 = tail call ptr @mlx_get_data_addr(ptr noundef nonnull %112, ptr noundef nonnull @bpp2, ptr noundef nonnull @sl2, ptr noundef nonnull @endian2) #4
  store ptr %116, ptr @data2, align 8, !tbaa !9
  %117 = load i32, ptr @xpm1_x, align 4, !tbaa !5
  %118 = load i32, ptr @xpm1_y, align 4, !tbaa !5
  %119 = load i32, ptr @bpp2, align 4, !tbaa !5
  %120 = load i32, ptr @sl2, align 4, !tbaa !5
  %121 = load i32, ptr @endian2, align 4, !tbaa !5
  %122 = load ptr, ptr @im2, align 8, !tbaa !9
  %123 = getelementptr inbounds i8, ptr %122, i64 40
  %124 = load i32, ptr %123, align 8, !tbaa !15
  %125 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.31, i32 noundef %117, i32 noundef %118, i32 noundef %119, i32 noundef %120, i32 noundef %121, i32 noundef %124)
  %126 = tail call i32 @sleep(i32 noundef 2) #4
  %127 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.32)
  %128 = load ptr, ptr @mlx, align 8, !tbaa !9
  %129 = load ptr, ptr @win1, align 8, !tbaa !9
  %130 = load ptr, ptr @im2, align 8, !tbaa !9
  %131 = tail call i32 @mlx_put_image_to_window(ptr noundef %128, ptr noundef %129, ptr noundef %130, i32 noundef 0, i32 noundef 0) #4
  %132 = load ptr, ptr @mlx, align 8, !tbaa !9
  %133 = load ptr, ptr @win1, align 8, !tbaa !9
  %134 = load ptr, ptr @im2, align 8, !tbaa !9
  %135 = tail call i32 @mlx_put_image_to_window(ptr noundef %132, ptr noundef %133, ptr noundef %134, i32 noundef 100, i32 noundef 100) #4
  %136 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.13)
  %137 = tail call i32 @sleep(i32 noundef 2) #4
  %138 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.33)
  %139 = load ptr, ptr @mlx, align 8, !tbaa !9
  %140 = tail call ptr @mlx_new_window(ptr noundef %139, i32 noundef 242, i32 noundef 242, ptr noundef nonnull @.str.34) #4
  store ptr %140, ptr @win2, align 8, !tbaa !9
  %141 = load ptr, ptr @mlx, align 8, !tbaa !9
  %142 = tail call ptr @mlx_new_image(ptr noundef %141, i32 noundef 242, i32 noundef 242) #4
  store ptr %142, ptr @im4, align 8, !tbaa !9
  %.not9 = icmp eq ptr %142, null
  br i1 %.not9, label %143, label %145

143:                                              ; preds = %115
  %144 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.9)
  tail call void @exit(i32 noundef 1) #5
  unreachable

145:                                              ; preds = %115
  %146 = tail call ptr @mlx_get_data_addr(ptr noundef nonnull %142, ptr noundef nonnull @bpp4, ptr noundef nonnull @sl4, ptr noundef nonnull @endian4) #4
  store ptr %146, ptr @data4, align 8, !tbaa !9
  %147 = load i32, ptr @bpp4, align 4, !tbaa !5
  %148 = load i32, ptr @sl4, align 4, !tbaa !5
  %149 = load i32, ptr @endian4, align 4, !tbaa !5
  %150 = tail call i32 @color_map_2(ptr noundef %146, i32 noundef %147, i32 noundef %148, i32 noundef 242, i32 noundef 242, i32 noundef %149, i32 noundef 2)
  %151 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.35)
  %152 = load ptr, ptr @mlx, align 8, !tbaa !9
  %153 = tail call ptr @mlx_new_window(ptr noundef %152, i32 noundef 242, i32 noundef 242, ptr noundef nonnull @.str.36) #4
  store ptr %153, ptr @win3, align 8, !tbaa !9
  %154 = load ptr, ptr @win1, align 8, !tbaa !9
  %155 = tail call i32 @mlx_expose_hook(ptr noundef %154, ptr noundef nonnull @expose_win1, ptr noundef null) #4
  %156 = load ptr, ptr @win1, align 8, !tbaa !9
  %157 = tail call i32 @mlx_mouse_hook(ptr noundef %156, ptr noundef nonnull @mouse_win1, ptr noundef null) #4
  %158 = load ptr, ptr @win1, align 8, !tbaa !9
  %159 = tail call i32 @mlx_key_hook(ptr noundef %158, ptr noundef nonnull @key_win1, ptr noundef null) #4
  %160 = load ptr, ptr @win2, align 8, !tbaa !9
  %161 = tail call i32 @mlx_expose_hook(ptr noundef %160, ptr noundef nonnull @expose_win2, ptr noundef null) #4
  %162 = load ptr, ptr @win2, align 8, !tbaa !9
  %163 = tail call i32 @mlx_mouse_hook(ptr noundef %162, ptr noundef nonnull @mouse_win2, ptr noundef null) #4
  %164 = load ptr, ptr @win2, align 8, !tbaa !9
  %165 = tail call i32 @mlx_key_hook(ptr noundef %164, ptr noundef nonnull @key_win2, ptr noundef null) #4
  %166 = load ptr, ptr @win3, align 8, !tbaa !9
  %167 = tail call i32 @mlx_key_hook(ptr noundef %166, ptr noundef nonnull @key_win3, ptr noundef null) #4
  %168 = load ptr, ptr @win3, align 8, !tbaa !9
  %169 = tail call i32 @mlx_hook(ptr noundef %168, i32 noundef 6, i32 noundef 64, ptr noundef nonnull @mouse_win3, ptr noundef null) #4
  %170 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.37)
  %171 = load ptr, ptr @mlx, align 8, !tbaa !9
  %172 = tail call i32 @mlx_loop(ptr noundef %171) #4
  ret i32 0
}

declare ptr @mlx_init(...) local_unnamed_addr #1

declare ptr @mlx_new_window(ptr noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @color_map_1(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

declare i32 @sleep(i32 noundef) local_unnamed_addr #1

declare i32 @mlx_clear_window(ptr noundef, ptr noundef) local_unnamed_addr #1

declare ptr @mlx_new_image(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

declare ptr @mlx_get_data_addr(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @color_map_2(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

declare i32 @mlx_destroy_image(ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @mlx_string_put(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

declare ptr @mlx_xpm_file_to_image(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @mlx_expose_hook(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @mlx_mouse_hook(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @mlx_key_hook(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @mlx_hook(ptr noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @mlx_loop(ptr 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 = { "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 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }
attributes #5 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !6, i64 72}
!12 = !{!"s_xvar", !10, i64 0, !13, i64 8, !6, i64 16, !6, i64 20, !10, i64 24, !13, i64 32, !6, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !6, i64 72, !6, i64 76, !6, i64 80, !7, i64 84, !13, i64 112, !13, i64 120, !6, i64 128}
!13 = !{!"long", !7, i64 0}
!14 = !{!12, !6, i64 76}
!15 = !{!16, !6, i64 40}
!16 = !{!"s_img", !10, i64 0, !13, i64 8, !10, i64 16, !6, i64 24, !6, i64 28, !6, i64 32, !6, i64 36, !6, i64 40, !6, i64 44, !10, i64 48, !17, i64 56}
!17 = !{!"", !13, i64 0, !6, i64 8, !10, i64 16, !6, i64 24}
!18 = !{!16, !13, i64 8}


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