; LLVM IR from 0intro/wmii :: lib/libstuff/x11/insanity (sethints)

; 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.Point = type { i32, i32 }
%struct.Rectangle = type { %struct.Point, %struct.Point }
%struct.GravityMap = type { %struct.Point, i32 }
%struct.XSizeHints = type { i64, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.anon, %struct.anon, i32, i32, i32 }
%struct.anon = type { i32, i32 }
%struct.Window = type { i32, i64, ptr, ptr, ptr, i64, ptr, %struct.Rectangle, i32, ptr, ptr, ptr, ptr, ptr, ptr, %struct.Ewmh, i64, ptr, ptr, i8, i32, i32 }
%struct.Ewmh = type { i64, i64, i64 }
%struct.WinHints = type { %struct.Point, %struct.Point, %struct.Point, %struct.Point, %struct.Point, %struct.Point, %struct.Rectangle, i64, i8, i8 }

@ZP = external constant %struct.Point, align 4
@ZR = external constant %struct.Rectangle, align 4
@gravity_map = external hidden global [9 x %struct.GravityMap], align 16
@display = external global ptr, align 8

; Function Attrs: nounwind uwtable
define dso_local void @sethints(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %struct.XSizeHints, align 8
  %6 = alloca i32, align 4
  %7 = alloca %struct.Point, align 4
  %8 = alloca %struct.Point, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 80, ptr %5) #5
  call void @llvm.memset.p0.i64(ptr align 8 %5, i8 0, i64 80, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #5
  %9 = load ptr, ptr %3, align 8, !tbaa !5
  %10 = getelementptr inbounds %struct.Window, ptr %9, i32 0, i32 14
  %11 = load ptr, ptr %10, align 8, !tbaa !9
  %12 = icmp eq ptr %11, null
  br i1 %12, label %13, label %17

13:                                               ; preds = %2
  %14 = call ptr @emalloc(i32 noundef 80)
  %15 = load ptr, ptr %3, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.Window, ptr %15, i32 0, i32 14
  store ptr %14, ptr %16, align 8, !tbaa !9
  br label %17

17:                                               ; preds = %13, %2
  %18 = load ptr, ptr %3, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.Window, ptr %18, i32 0, i32 14
  %20 = load ptr, ptr %19, align 8, !tbaa !9
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %20, ptr align 8 %21, i64 80, i1 false), !tbaa.struct !17
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.WinHints, ptr %22, i32 0, i32 0
  %24 = load i64, ptr %23, align 8
  %25 = load i64, ptr @ZP, align 4
  %26 = call i32 @eqpt(i64 %24, i64 %25)
  %27 = icmp ne i32 %26, 0
  br i1 %27, label %42, label %28

28:                                               ; preds = %17
  %29 = getelementptr inbounds %struct.XSizeHints, ptr %5, i32 0, i32 0
  %30 = load i64, ptr %29, align 8, !tbaa !21
  %31 = or i64 %30, 16
  store i64 %31, ptr %29, align 8, !tbaa !21
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.WinHints, ptr %32, i32 0, i32 0
  %34 = getelementptr inbounds %struct.Point, ptr %33, i32 0, i32 0
  %35 = load i32, ptr %34, align 8, !tbaa !24
  %36 = getelementptr inbounds %struct.XSizeHints, ptr %5, i32 0, i32 5
  store i32 %35, ptr %36, align 8, !tbaa !26
  %37 = load ptr, ptr %4, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.WinHints, ptr %37, i32 0, i32 0
  %39 = getelementptr inbounds %struct.Point, ptr %38, i32 0, i32 1
  %40 = load i32, ptr %39, align 4, !tbaa !27
  %41 = getelementptr inbounds %struct.XSizeHints, ptr %5, i32 0, i32 6
  store i32 %40, ptr %41, align 4, !tbaa !28
  br label %42

42:                                               ; preds = %28, %17
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.WinHints, ptr %43, i32 0, i32 1
  %45 = getelementptr inbounds %struct.Point, ptr %7, i32 0, i32 0
  store i32 2147483647, ptr %45, align 4, !tbaa !29
  %46 = getelementptr inbounds %struct.Point, ptr %7, i32 0, i32 1
  store i32 2147483647, ptr %46, align 4, !tbaa !30
  %47 = load i64, ptr %44, align 8
  %48 = load i64, ptr %7, align 4
  %49 = call i32 @eqpt(i64 %47, i64 %48)
  %50 = icmp ne i32 %49, 0
  br i1 %50, label %65, label %51

51:                                               ; preds = %42
  %52 = getelementptr inbounds %struct.XSizeHints, ptr %5, i32 0, i32 0
  %53 = load i64, ptr %52, align 8, !tbaa !21
  %54 = or i64 %53, 32
  store i64 %54, ptr %52, align 8, !tbaa !21
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.WinHints, ptr %55, i32 0, i32 1
  %57 = getelementptr inbounds %struct.Point, ptr %56, i32 0, i32 0
  %58 = load i32, ptr %57, align 8, !tbaa !31
  %59 = getelementptr inbounds %struct.XSizeHints, ptr %5, i32 0, i32 7
  store i32 %58, ptr %59, align 8, !tbaa !32
  %60 = load ptr, ptr %4, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.WinHints, ptr %60, i32 0, i32 1
  %62 = getelementptr inbounds %struct.Point, ptr %61, i32 0, i32 1
  %63 = load i32, ptr %62, align 4, !tbaa !33
  %64 = getelementptr inbounds %struct.XSizeHints, ptr %5, i32 0, i32 8
  store i32 %63, ptr %64, align 4, !tbaa !34
  br label %65

65:                                               ; preds = %51, %42
  %66 = load ptr, ptr %4, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.WinHints, ptr %66, i32 0, i32 2
  %68 = load i64, ptr %67, align 8
  %69 = load i64, ptr @ZP, align 4
  %70 = call i32 @eqpt(i64 %68, i64 %69)
  %71 = icmp ne i32 %70, 0
  br i1 %71, label %86, label %72

72:                                               ; preds = %65
  %73 = getelementptr inbounds %struct.XSizeHints, ptr %5, i32 0, i32 0
  %74 = load i64, ptr %73, align 8, !tbaa !21
  %75 = or i64 %74, 256
  store i64 %75, ptr %73, align 8, !tbaa !21
  %76 = load ptr, ptr %4, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.WinHints, ptr %76, i32 0, i32 3
  %78 = getelementptr inbounds %struct.Point, ptr %77, i32 0, i32 0
  %79 = load i32, ptr %78, align 8, !tbaa !35
  %80 = getelementptr inbounds %struct.XSizeHints, ptr %5, i32 0, i32 13
  store i32 %79, ptr %80, align 8, !tbaa !36
  %81 = load ptr, ptr %4, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.WinHints, ptr %81, i32 0, i32 3
  %83 = getelementptr inbounds %struct.Point, ptr %82, i32 0, i32 1
  %84 = load i32, ptr %83, align 4, !tbaa !37
  %85 = getelementptr inbounds %struct.XSizeHints, ptr %5, i32 0, i32 14
  store i32 %84, ptr %85, align 4, !tbaa !38
  br label %86

86:                                               ; preds = %72, %65
  %87 = load ptr, ptr %4, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.WinHints, ptr %87, i32 0, i32 6
  %89 = getelementptr inbounds { i64, i64 }, ptr %88, i32 0, i32 0
  %90 = load i64, ptr %89, align 8
  %91 = getelementptr inbounds { i64, i64 }, ptr %88, i32 0, i32 1
  %92 = load i64, ptr %91, align 8
  %93 = load i64, ptr @ZR, align 4
  %94 = load i64, ptr getelementptr inbounds ({ i64, i64 }, ptr @ZR, i32 0, i32 1), align 4
  %95 = call i32 @eqrect(i64 %90, i64 %92, i64 %93, i64 %94)
  %96 = icmp ne i32 %95, 0
  br i1 %96, label %139, label %97

97:                                               ; preds = %86
  %98 = getelementptr inbounds %struct.XSizeHints, ptr %5, i32 0, i32 0
  %99 = load i64, ptr %98, align 8, !tbaa !21
  %100 = or i64 %99, 128
  store i64 %100, ptr %98, align 8, !tbaa !21
  %101 = load ptr, ptr %4, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.WinHints, ptr %101, i32 0, i32 3
  %103 = getelementptr inbounds %struct.Point, ptr %102, i32 0, i32 0
  %104 = load i32, ptr %103, align 8, !tbaa !35
  %105 = getelementptr inbounds %struct.XSizeHints, ptr %5, i32 0, i32 13
  store i32 %104, ptr %105, align 8, !tbaa !36
  %106 = load ptr, ptr %4, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.WinHints, ptr %106, i32 0, i32 3
  %108 = getelementptr inbounds %struct.Point, ptr %107, i32 0, i32 1
  %109 = load i32, ptr %108, align 4, !tbaa !37
  %110 = getelementptr inbounds %struct.XSizeHints, ptr %5, i32 0, i32 14
  store i32 %109, ptr %110, align 4, !tbaa !38
  %111 = load ptr, ptr %4, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.WinHints, ptr %111, i32 0, i32 6
  %113 = getelementptr inbounds %struct.Rectangle, ptr %112, i32 0, i32 0
  %114 = getelementptr inbounds %struct.Point, ptr %113, i32 0, i32 0
  %115 = load i32, ptr %114, align 8, !tbaa !39
  %116 = getelementptr inbounds %struct.XSizeHints, ptr %5, i32 0, i32 11
  %117 = getelementptr inbounds %struct.anon, ptr %116, i32 0, i32 0
  store i32 %115, ptr %117, align 8, !tbaa !40
  %118 = load ptr, ptr %4, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.WinHints, ptr %118, i32 0, i32 6
  %120 = getelementptr inbounds %struct.Rectangle, ptr %119, i32 0, i32 0
  %121 = getelementptr inbounds %struct.Point, ptr %120, i32 0, i32 1
  %122 = load i32, ptr %121, align 4, !tbaa !41
  %123 = getelementptr inbounds %struct.XSizeHints, ptr %5, i32 0, i32 11
  %124 = getelementptr inbounds %struct.anon, ptr %123, i32 0, i32 1
  store i32 %122, ptr %124, align 4, !tbaa !42
  %125 = load ptr, ptr %4, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.WinHints, ptr %125, i32 0, i32 6
  %127 = getelementptr inbounds %struct.Rectangle, ptr %126, i32 0, i32 1
  %128 = getelementptr inbounds %struct.Point, ptr %127, i32 0, i32 0
  %129 = load i32, ptr %128, align 8, !tbaa !43
  %130 = getelementptr inbounds %struct.XSizeHints, ptr %5, i32 0, i32 12
  %131 = getelementptr inbounds %struct.anon, ptr %130, i32 0, i32 0
  store i32 %129, ptr %131, align 8, !tbaa !44
  %132 = load ptr, ptr %4, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.WinHints, ptr %132, i32 0, i32 6
  %134 = getelementptr inbounds %struct.Rectangle, ptr %133, i32 0, i32 1
  %135 = getelementptr inbounds %struct.Point, ptr %134, i32 0, i32 1
  %136 = load i32, ptr %135, align 4, !tbaa !45
  %137 = getelementptr inbounds %struct.XSizeHints, ptr %5, i32 0, i32 12
  %138 = getelementptr inbounds %struct.anon, ptr %137, i32 0, i32 1
  store i32 %136, ptr %138, align 4, !tbaa !46
  br label %139

139:                                              ; preds = %97, %86
  %140 = load ptr, ptr %4, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.WinHints, ptr %140, i32 0, i32 4
  %142 = getelementptr inbounds %struct.Point, ptr %8, i32 0, i32 0
  store i32 1, ptr %142, align 4, !tbaa !29
  %143 = getelementptr inbounds %struct.Point, ptr %8, i32 0, i32 1
  store i32 1, ptr %143, align 4, !tbaa !30
  %144 = load i64, ptr %141, align 8
  %145 = load i64, ptr %8, align 4
  %146 = call i32 @eqpt(i64 %144, i64 %145)
  %147 = icmp ne i32 %146, 0
  br i1 %147, label %162, label %148

148:                                              ; preds = %139
  %149 = getelementptr inbounds %struct.XSizeHints, ptr %5, i32 0, i32 0
  %150 = load i64, ptr %149, align 8, !tbaa !21
  %151 = or i64 %150, 64
  store i64 %151, ptr %149, align 8, !tbaa !21
  %152 = load ptr, ptr %4, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.WinHints, ptr %152, i32 0, i32 4
  %154 = getelementptr inbounds %struct.Point, ptr %153, i32 0, i32 0
  %155 = load i32, ptr %154, align 8, !tbaa !47
  %156 = getelementptr inbounds %struct.XSizeHints, ptr %5, i32 0, i32 9
  store i32 %155, ptr %156, align 8, !tbaa !48
  %157 = load ptr, ptr %4, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.WinHints, ptr %157, i32 0, i32 4
  %159 = getelementptr inbounds %struct.Point, ptr %158, i32 0, i32 1
  %160 = load i32, ptr %159, align 4, !tbaa !49
  %161 = getelementptr inbounds %struct.XSizeHints, ptr %5, i32 0, i32 10
  store i32 %160, ptr %161, align 4, !tbaa !50
  br label %162

162:                                              ; preds = %148, %139
  %163 = load ptr, ptr %4, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.WinHints, ptr %163, i32 0, i32 9
  %165 = load i8, ptr %164, align 1, !tbaa !51, !range !52, !noundef !53
  %166 = trunc i8 %165 to i1
  br i1 %166, label %167, label %171

167:                                              ; preds = %162
  %168 = getelementptr inbounds %struct.XSizeHints, ptr %5, i32 0, i32 0
  %169 = load i64, ptr %168, align 8, !tbaa !21
  %170 = or i64 %169, 5
  store i64 %170, ptr %168, align 8, !tbaa !21
  br label %171

171:                                              ; preds = %167, %162
  %172 = getelementptr inbounds %struct.XSizeHints, ptr %5, i32 0, i32 0
  %173 = load i64, ptr %172, align 8, !tbaa !21
  %174 = or i64 %173, 512
  store i64 %174, ptr %172, align 8, !tbaa !21
  %175 = load ptr, ptr %4, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.WinHints, ptr %175, i32 0, i32 8
  %177 = load i8, ptr %176, align 8, !tbaa !54, !range !52, !noundef !53
  %178 = trunc i8 %177 to i1
  br i1 %178, label %179, label %181

179:                                              ; preds = %171
  %180 = getelementptr inbounds %struct.XSizeHints, ptr %5, i32 0, i32 15
  store i32 10, ptr %180, align 8, !tbaa !55
  br label %222

181:                                              ; preds = %171
  store i32 0, ptr %6, align 4, !tbaa !18
  br label %182

182:                                              ; preds = %218, %181
  %183 = load i32, ptr %6, align 4, !tbaa !18
  %184 = sext i32 %183 to i64
  %185 = icmp ult i64 %184, 9
  br i1 %185, label %186, label %221

186:                                              ; preds = %182
  %187 = load ptr, ptr %4, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.WinHints, ptr %187, i32 0, i32 5
  %189 = getelementptr inbounds %struct.Point, ptr %188, i32 0, i32 0
  %190 = load i32, ptr %189, align 8, !tbaa !56
  %191 = load i32, ptr %6, align 4, !tbaa !18
  %192 = sext i32 %191 to i64
  %193 = getelementptr inbounds [9 x %struct.GravityMap], ptr @gravity_map, i64 0, i64 %192
  %194 = getelementptr inbounds %struct.GravityMap, ptr %193, i32 0, i32 0
  %195 = getelementptr inbounds %struct.Point, ptr %194, i32 0, i32 0
  %196 = load i32, ptr %195, align 4, !tbaa !57
  %197 = icmp eq i32 %190, %196
  br i1 %197, label %198, label %217

198:                                              ; preds = %186
  %199 = load ptr, ptr %4, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.WinHints, ptr %199, i32 0, i32 5
  %201 = getelementptr inbounds %struct.Point, ptr %200, i32 0, i32 1
  %202 = load i32, ptr %201, align 4, !tbaa !59
  %203 = load i32, ptr %6, align 4, !tbaa !18
  %204 = sext i32 %203 to i64
  %205 = getelementptr inbounds [9 x %struct.GravityMap], ptr @gravity_map, i64 0, i64 %204
  %206 = getelementptr inbounds %struct.GravityMap, ptr %205, i32 0, i32 0
  %207 = getelementptr inbounds %struct.Point, ptr %206, i32 0, i32 1
  %208 = load i32, ptr %207, align 4, !tbaa !60
  %209 = icmp eq i32 %202, %208
  br i1 %209, label %210, label %217

210:                                              ; preds = %198
  %211 = load i32, ptr %6, align 4, !tbaa !18
  %212 = sext i32 %211 to i64
  %213 = getelementptr inbounds [9 x %struct.GravityMap], ptr @gravity_map, i64 0, i64 %212
  %214 = getelementptr inbounds %struct.GravityMap, ptr %213, i32 0, i32 1
  %215 = load i32, ptr %214, align 4, !tbaa !61
  %216 = getelementptr inbounds %struct.XSizeHints, ptr %5, i32 0, i32 15
  store i32 %215, ptr %216, align 8, !tbaa !55
  br label %221

217:                                              ; preds = %198, %186
  br label %218

218:                                              ; preds = %217
  %219 = load i32, ptr %6, align 4, !tbaa !18
  %220 = add nsw i32 %219, 1
  store i32 %220, ptr %6, align 4, !tbaa !18
  br label %182, !llvm.loop !62

221:                                              ; preds = %210, %182
  br label %222

222:                                              ; preds = %221, %179
  %223 = load ptr, ptr @display, align 8, !tbaa !5
  %224 = load ptr, ptr %3, align 8, !tbaa !5
  %225 = getelementptr inbounds %struct.Window, ptr %224, i32 0, i32 1
  %226 = load i64, ptr %225, align 8, !tbaa !64
  call void @XSetWMNormalHints(ptr noundef %223, i64 noundef %226, ptr noundef %5)
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr %5) #5
  ret void
}

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

declare ptr @emalloc(i32 noundef) #3

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

declare i32 @eqpt(i64, i64) #3

declare i32 @eqrect(i64, i64, i64, i64) #3

declare void @XSetWMNormalHints(ptr noundef, i64 noundef, ptr noundef) #3

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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, !6, i64 120}
!10 = !{!"Window", !11, i64 0, !12, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !12, i64 40, !6, i64 48, !13, i64 56, !11, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !15, i64 128, !12, i64 152, !6, i64 160, !6, i64 168, !16, i64 176, !11, i64 180, !11, i64 184}
!11 = !{!"int", !7, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!"Rectangle", !14, i64 0, !14, i64 8}
!14 = !{!"Point", !11, i64 0, !11, i64 4}
!15 = !{!"Ewmh", !12, i64 0, !12, i64 8, !12, i64 16}
!16 = !{!"_Bool", !7, i64 0}
!17 = !{i64 0, i64 4, !18, i64 4, i64 4, !18, i64 8, i64 4, !18, i64 12, i64 4, !18, i64 16, i64 4, !18, i64 20, i64 4, !18, i64 24, i64 4, !18, i64 28, i64 4, !18, i64 32, i64 4, !18, i64 36, i64 4, !18, i64 40, i64 4, !18, i64 44, i64 4, !18, i64 48, i64 4, !18, i64 52, i64 4, !18, i64 56, i64 4, !18, i64 60, i64 4, !18, i64 64, i64 8, !19, i64 72, i64 1, !20, i64 73, i64 1, !20}
!18 = !{!11, !11, i64 0}
!19 = !{!12, !12, i64 0}
!20 = !{!16, !16, i64 0}
!21 = !{!22, !12, i64 0}
!22 = !{!"", !12, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !23, i64 48, !23, i64 56, !11, i64 64, !11, i64 68, !11, i64 72}
!23 = !{!"", !11, i64 0, !11, i64 4}
!24 = !{!25, !11, i64 0}
!25 = !{!"WinHints", !14, i64 0, !14, i64 8, !14, i64 16, !14, i64 24, !14, i64 32, !14, i64 40, !13, i64 48, !12, i64 64, !16, i64 72, !16, i64 73}
!26 = !{!22, !11, i64 24}
!27 = !{!25, !11, i64 4}
!28 = !{!22, !11, i64 28}
!29 = !{!14, !11, i64 0}
!30 = !{!14, !11, i64 4}
!31 = !{!25, !11, i64 8}
!32 = !{!22, !11, i64 32}
!33 = !{!25, !11, i64 12}
!34 = !{!22, !11, i64 36}
!35 = !{!25, !11, i64 24}
!36 = !{!22, !11, i64 64}
!37 = !{!25, !11, i64 28}
!38 = !{!22, !11, i64 68}
!39 = !{!25, !11, i64 48}
!40 = !{!22, !11, i64 48}
!41 = !{!25, !11, i64 52}
!42 = !{!22, !11, i64 52}
!43 = !{!25, !11, i64 56}
!44 = !{!22, !11, i64 56}
!45 = !{!25, !11, i64 60}
!46 = !{!22, !11, i64 60}
!47 = !{!25, !11, i64 32}
!48 = !{!22, !11, i64 40}
!49 = !{!25, !11, i64 36}
!50 = !{!22, !11, i64 44}
!51 = !{!25, !16, i64 73}
!52 = !{i8 0, i8 2}
!53 = !{}
!54 = !{!25, !16, i64 72}
!55 = !{!22, !11, i64 72}
!56 = !{!25, !11, i64 40}
!57 = !{!58, !11, i64 0}
!58 = !{!"GravityMap", !14, i64 0, !11, i64 8}
!59 = !{!25, !11, i64 44}
!60 = !{!58, !11, i64 4}
!61 = !{!58, !11, i64 8}
!62 = distinct !{!62, !63}
!63 = !{!"llvm.loop.mustprogress"}
!64 = !{!10, !12, 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"

%struct.Point = type { i32, i32 }
%struct.Rectangle = type { %struct.Point, %struct.Point }
%struct.GravityMap = type { %struct.Point, i32 }
%struct.XSizeHints = type { i64, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.anon, %struct.anon, i32, i32, i32 }
%struct.anon = type { i32, i32 }

@ZP = external local_unnamed_addr constant %struct.Point, align 4
@ZR = external local_unnamed_addr constant %struct.Rectangle, align 4
@gravity_map = external hidden local_unnamed_addr global [9 x %struct.GravityMap], align 16
@display = external local_unnamed_addr global ptr, align 8

; Function Attrs: nounwind uwtable
define dso_local void @sethints(ptr nocapture noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = alloca %struct.XSizeHints, align 8
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %3) #5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %3, i8 0, i64 80, i1 false)
  %4 = getelementptr inbounds i8, ptr %0, i64 120
  %5 = load ptr, ptr %4, align 8, !tbaa !5
  %6 = icmp eq ptr %5, null
  br i1 %6, label %7, label %9

7:                                                ; preds = %2
  %8 = tail call ptr @emalloc(i32 noundef 80) #5
  store ptr %8, ptr %4, align 8, !tbaa !5
  br label %9

9:                                                ; preds = %7, %2
  %10 = phi ptr [ %8, %7 ], [ %5, %2 ]
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %10, ptr noundef nonnull align 8 dereferenceable(80) %1, i64 80, i1 false), !tbaa.struct !16
  %11 = load i64, ptr %1, align 8
  %12 = load i64, ptr @ZP, align 4
  %13 = tail call i32 @eqpt(i64 %11, i64 %12) #5
  %.not = icmp eq i32 %13, 0
  br i1 %.not, label %14, label %17

14:                                               ; preds = %9
  %15 = getelementptr inbounds i8, ptr %3, i64 24
  %16 = load <2 x i32>, ptr %1, align 8, !tbaa !17
  store <2 x i32> %16, ptr %15, align 8, !tbaa !17
  br label %17

17:                                               ; preds = %14, %9
  %18 = phi i64 [ 16, %14 ], [ 0, %9 ]
  %19 = getelementptr inbounds i8, ptr %1, i64 8
  %20 = load i64, ptr %19, align 8
  %21 = tail call i32 @eqpt(i64 %20, i64 9223372034707292159) #5
  %.not35 = icmp eq i32 %21, 0
  br i1 %.not35, label %22, label %26

22:                                               ; preds = %17
  %23 = or disjoint i64 %18, 32
  %24 = getelementptr inbounds i8, ptr %3, i64 32
  %25 = load <2 x i32>, ptr %19, align 8, !tbaa !17
  store <2 x i32> %25, ptr %24, align 8, !tbaa !17
  br label %26

26:                                               ; preds = %22, %17
  %27 = phi i64 [ %23, %22 ], [ %18, %17 ]
  %28 = getelementptr inbounds i8, ptr %1, i64 16
  %29 = load i64, ptr %28, align 8
  %30 = tail call i32 @eqpt(i64 %29, i64 %12) #5
  %.not36 = icmp eq i32 %30, 0
  br i1 %.not36, label %31, label %36

31:                                               ; preds = %26
  %32 = or i64 %27, 256
  store i64 %32, ptr %3, align 8, !tbaa !20
  %33 = getelementptr inbounds i8, ptr %1, i64 24
  %34 = getelementptr inbounds i8, ptr %3, i64 64
  %35 = load <2 x i32>, ptr %33, align 8, !tbaa !17
  store <2 x i32> %35, ptr %34, align 8, !tbaa !17
  br label %36

36:                                               ; preds = %31, %26
  %37 = phi i64 [ %32, %31 ], [ %27, %26 ]
  %38 = getelementptr inbounds i8, ptr %1, i64 48
  %39 = load i64, ptr %38, align 8
  %40 = getelementptr inbounds i8, ptr %1, i64 56
  %41 = load i64, ptr %40, align 8
  %42 = load i64, ptr @ZR, align 4
  %43 = load i64, ptr getelementptr inbounds (i8, ptr @ZR, i64 8), align 4
  %44 = tail call i32 @eqrect(i64 %39, i64 %41, i64 %42, i64 %43) #5
  %.not37 = icmp eq i32 %44, 0
  br i1 %.not37, label %45, label %52

45:                                               ; preds = %36
  %46 = or i64 %37, 128
  %47 = getelementptr inbounds i8, ptr %1, i64 24
  %48 = getelementptr inbounds i8, ptr %3, i64 64
  %49 = load <2 x i32>, ptr %47, align 8, !tbaa !17
  store <2 x i32> %49, ptr %48, align 8, !tbaa !17
  %50 = getelementptr inbounds i8, ptr %3, i64 48
  %51 = load <4 x i32>, ptr %38, align 8, !tbaa !17
  store <4 x i32> %51, ptr %50, align 8, !tbaa !17
  br label %52

52:                                               ; preds = %45, %36
  %53 = phi i64 [ %46, %45 ], [ %37, %36 ]
  %54 = getelementptr inbounds i8, ptr %1, i64 32
  %55 = load i64, ptr %54, align 8
  %56 = tail call i32 @eqpt(i64 %55, i64 4294967297) #5
  %.not38 = icmp eq i32 %56, 0
  br i1 %.not38, label %57, label %61

57:                                               ; preds = %52
  %58 = or i64 %53, 64
  %59 = getelementptr inbounds i8, ptr %3, i64 40
  %60 = load <2 x i32>, ptr %54, align 8, !tbaa !17
  store <2 x i32> %60, ptr %59, align 8, !tbaa !17
  br label %61

61:                                               ; preds = %57, %52
  %62 = phi i64 [ %58, %57 ], [ %53, %52 ]
  %63 = getelementptr inbounds i8, ptr %1, i64 73
  %64 = load i8, ptr %63, align 1, !tbaa !23, !range !25, !noundef !26
  %65 = trunc nuw i8 %64 to i1
  %66 = or i64 %62, 5
  %spec.select = select i1 %65, i64 %66, i64 %62
  %67 = or i64 %spec.select, 512
  store i64 %67, ptr %3, align 8, !tbaa !20
  %68 = getelementptr inbounds i8, ptr %1, i64 72
  %69 = load i8, ptr %68, align 8, !tbaa !27, !range !25, !noundef !26
  %70 = trunc nuw i8 %69 to i1
  br i1 %70, label %.loopexit.sink.split, label %.preheader

.preheader:                                       ; preds = %61
  %71 = getelementptr inbounds i8, ptr %1, i64 40
  %72 = load i32, ptr %71, align 8, !tbaa !28
  %73 = getelementptr inbounds i8, ptr %1, i64 44
  %74 = load i32, ptr @gravity_map, align 16, !tbaa !29
  %75 = icmp eq i32 %72, %74
  br i1 %75, label %76, label %83

76:                                               ; preds = %.preheader
  %77 = load i32, ptr %73, align 4, !tbaa !31
  %78 = load i32, ptr getelementptr inbounds (i8, ptr @gravity_map, i64 4), align 4, !tbaa !32
  %79 = icmp eq i32 %77, %78
  br i1 %79, label %80, label %83

80:                                               ; preds = %135, %128, %121, %114, %107, %100, %93, %86, %76
  %.lcssa = phi ptr [ @gravity_map, %76 ], [ getelementptr inbounds (i8, ptr @gravity_map, i64 12), %86 ], [ getelementptr inbounds (i8, ptr @gravity_map, i64 24), %93 ], [ getelementptr inbounds (i8, ptr @gravity_map, i64 36), %100 ], [ getelementptr inbounds (i8, ptr @gravity_map, i64 48), %107 ], [ getelementptr inbounds (i8, ptr @gravity_map, i64 60), %114 ], [ getelementptr inbounds (i8, ptr @gravity_map, i64 72), %121 ], [ getelementptr inbounds (i8, ptr @gravity_map, i64 84), %128 ], [ getelementptr inbounds (i8, ptr @gravity_map, i64 96), %135 ]
  %81 = getelementptr inbounds i8, ptr %.lcssa, i64 8
  %82 = load i32, ptr %81, align 4, !tbaa !33
  br label %.loopexit.sink.split

83:                                               ; preds = %.preheader, %76
  %84 = load i32, ptr getelementptr inbounds (i8, ptr @gravity_map, i64 12), align 4, !tbaa !29
  %85 = icmp eq i32 %72, %84
  br i1 %85, label %86, label %90

86:                                               ; preds = %83
  %87 = load i32, ptr %73, align 4, !tbaa !31
  %88 = load i32, ptr getelementptr inbounds (i8, ptr @gravity_map, i64 16), align 16, !tbaa !32
  %89 = icmp eq i32 %87, %88
  br i1 %89, label %80, label %90

90:                                               ; preds = %86, %83
  %91 = load i32, ptr getelementptr inbounds (i8, ptr @gravity_map, i64 24), align 8, !tbaa !29
  %92 = icmp eq i32 %72, %91
  br i1 %92, label %93, label %97

93:                                               ; preds = %90
  %94 = load i32, ptr %73, align 4, !tbaa !31
  %95 = load i32, ptr getelementptr inbounds (i8, ptr @gravity_map, i64 28), align 4, !tbaa !32
  %96 = icmp eq i32 %94, %95
  br i1 %96, label %80, label %97

97:                                               ; preds = %93, %90
  %98 = load i32, ptr getelementptr inbounds (i8, ptr @gravity_map, i64 36), align 4, !tbaa !29
  %99 = icmp eq i32 %72, %98
  br i1 %99, label %100, label %104

100:                                              ; preds = %97
  %101 = load i32, ptr %73, align 4, !tbaa !31
  %102 = load i32, ptr getelementptr inbounds (i8, ptr @gravity_map, i64 40), align 8, !tbaa !32
  %103 = icmp eq i32 %101, %102
  br i1 %103, label %80, label %104

104:                                              ; preds = %100, %97
  %105 = load i32, ptr getelementptr inbounds (i8, ptr @gravity_map, i64 48), align 16, !tbaa !29
  %106 = icmp eq i32 %72, %105
  br i1 %106, label %107, label %111

107:                                              ; preds = %104
  %108 = load i32, ptr %73, align 4, !tbaa !31
  %109 = load i32, ptr getelementptr inbounds (i8, ptr @gravity_map, i64 52), align 4, !tbaa !32
  %110 = icmp eq i32 %108, %109
  br i1 %110, label %80, label %111

111:                                              ; preds = %107, %104
  %112 = load i32, ptr getelementptr inbounds (i8, ptr @gravity_map, i64 60), align 4, !tbaa !29
  %113 = icmp eq i32 %72, %112
  br i1 %113, label %114, label %118

114:                                              ; preds = %111
  %115 = load i32, ptr %73, align 4, !tbaa !31
  %116 = load i32, ptr getelementptr inbounds (i8, ptr @gravity_map, i64 64), align 16, !tbaa !32
  %117 = icmp eq i32 %115, %116
  br i1 %117, label %80, label %118

118:                                              ; preds = %114, %111
  %119 = load i32, ptr getelementptr inbounds (i8, ptr @gravity_map, i64 72), align 8, !tbaa !29
  %120 = icmp eq i32 %72, %119
  br i1 %120, label %121, label %125

121:                                              ; preds = %118
  %122 = load i32, ptr %73, align 4, !tbaa !31
  %123 = load i32, ptr getelementptr inbounds (i8, ptr @gravity_map, i64 76), align 4, !tbaa !32
  %124 = icmp eq i32 %122, %123
  br i1 %124, label %80, label %125

125:                                              ; preds = %121, %118
  %126 = load i32, ptr getelementptr inbounds (i8, ptr @gravity_map, i64 84), align 4, !tbaa !29
  %127 = icmp eq i32 %72, %126
  br i1 %127, label %128, label %132

128:                                              ; preds = %125
  %129 = load i32, ptr %73, align 4, !tbaa !31
  %130 = load i32, ptr getelementptr inbounds (i8, ptr @gravity_map, i64 88), align 8, !tbaa !32
  %131 = icmp eq i32 %129, %130
  br i1 %131, label %80, label %132

132:                                              ; preds = %128, %125
  %133 = load i32, ptr getelementptr inbounds (i8, ptr @gravity_map, i64 96), align 16, !tbaa !29
  %134 = icmp eq i32 %72, %133
  br i1 %134, label %135, label %.loopexit

135:                                              ; preds = %132
  %136 = load i32, ptr %73, align 4, !tbaa !31
  %137 = load i32, ptr getelementptr inbounds (i8, ptr @gravity_map, i64 100), align 4, !tbaa !32
  %138 = icmp eq i32 %136, %137
  br i1 %138, label %80, label %.loopexit

.loopexit.sink.split:                             ; preds = %61, %80
  %.sink = phi i32 [ %82, %80 ], [ 10, %61 ]
  %139 = getelementptr inbounds i8, ptr %3, i64 72
  store i32 %.sink, ptr %139, align 8, !tbaa !34
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.sink.split, %132, %135
  %140 = load ptr, ptr @display, align 8, !tbaa !35
  %141 = getelementptr inbounds i8, ptr %0, i64 8
  %142 = load i64, ptr %141, align 8, !tbaa !36
  call void @XSetWMNormalHints(ptr noundef %140, i64 noundef %142, ptr noundef nonnull %3) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %3) #5
  ret void
}

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

declare ptr @emalloc(i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

declare i32 @eqpt(i64, i64) local_unnamed_addr #3

declare i32 @eqrect(i64, i64, i64, i64) local_unnamed_addr #3

declare void @XSetWMNormalHints(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #3

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { "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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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, !11, i64 120}
!6 = !{!"Window", !7, i64 0, !10, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !10, i64 40, !11, i64 48, !12, i64 56, !7, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !11, i64 104, !11, i64 112, !11, i64 120, !14, i64 128, !10, i64 152, !11, i64 160, !11, i64 168, !15, i64 176, !7, i64 180, !7, i64 184}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"Rectangle", !13, i64 0, !13, i64 8}
!13 = !{!"Point", !7, i64 0, !7, i64 4}
!14 = !{!"Ewmh", !10, i64 0, !10, i64 8, !10, i64 16}
!15 = !{!"_Bool", !8, i64 0}
!16 = !{i64 0, i64 4, !17, i64 4, i64 4, !17, i64 8, i64 4, !17, i64 12, i64 4, !17, i64 16, i64 4, !17, i64 20, i64 4, !17, i64 24, i64 4, !17, i64 28, i64 4, !17, i64 32, i64 4, !17, i64 36, i64 4, !17, i64 40, i64 4, !17, i64 44, i64 4, !17, i64 48, i64 4, !17, i64 52, i64 4, !17, i64 56, i64 4, !17, i64 60, i64 4, !17, i64 64, i64 8, !18, i64 72, i64 1, !19, i64 73, i64 1, !19}
!17 = !{!7, !7, i64 0}
!18 = !{!10, !10, i64 0}
!19 = !{!15, !15, i64 0}
!20 = !{!21, !10, i64 0}
!21 = !{!"", !10, i64 0, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 44, !22, i64 48, !22, i64 56, !7, i64 64, !7, i64 68, !7, i64 72}
!22 = !{!"", !7, i64 0, !7, i64 4}
!23 = !{!24, !15, i64 73}
!24 = !{!"WinHints", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24, !13, i64 32, !13, i64 40, !12, i64 48, !10, i64 64, !15, i64 72, !15, i64 73}
!25 = !{i8 0, i8 2}
!26 = !{}
!27 = !{!24, !15, i64 72}
!28 = !{!24, !7, i64 40}
!29 = !{!30, !7, i64 0}
!30 = !{!"GravityMap", !13, i64 0, !7, i64 8}
!31 = !{!24, !7, i64 44}
!32 = !{!30, !7, i64 4}
!33 = !{!30, !7, i64 8}
!34 = !{!21, !7, i64 72}
!35 = !{!11, !11, i64 0}
!36 = !{!6, !10, i64 8}


; Effective O3 passes: DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass