; ModuleID = 'd4dag.bc'
source_filename = "d4dag.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"

%struct.d4d__maing = type { i8* (i32)*, void (i8*)* }
%struct.splay_tree_s = type { %struct.splay_tree_node_s*, i32 (i64, i64)*, void (i64)*, void (i64)*, i8* (i32, i8*)*, void (i8*, i8*)*, i8* }
%struct.splay_tree_node_s = type { i64, i64, %struct.splay_tree_node_s*, %struct.splay_tree_node_s* }

@d4d__main = internal global %struct.d4d__maing* null, align 8

; Function Attrs: noinline nounwind optnone uwtable
define dso_local i32 @d4d_version() #0 {
  ret i32 10
}

; Function Attrs: noinline nounwind optnone uwtable
define dso_local i32 @d4d_init(i8* (i32)* %0, void (i8*)* %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i8* (i32)*, align 8
  %5 = alloca void (i8*)*, align 8
  %6 = alloca %struct.splay_tree_s*, align 8
  %7 = alloca i64, align 8
  %8 = alloca %struct.splay_tree_node_s*, align 8
  store i8* (i32)* %0, i8* (i32)** %4, align 8
  store void (i8*)* %1, void (i8*)** %5, align 8
  %9 = load i8* (i32)*, i8* (i32)** %4, align 8
  %10 = icmp ne i8* (i32)* %9, null
  br i1 %10, label %12, label %11

11:                                               ; preds = %2
  store i32 -1, i32* %3, align 4
  br label %49

12:                                               ; preds = %2
  %13 = load void (i8*)*, void (i8*)** %5, align 8
  %14 = icmp ne void (i8*)* %13, null
  br i1 %14, label %16, label %15

15:                                               ; preds = %12
  store i32 -1, i32* %3, align 4
  br label %49

16:                                               ; preds = %12
  %17 = load i8* (i32)*, i8* (i32)** %4, align 8
  %18 = call i8* %17(i32 16)
  %19 = bitcast i8* %18 to %struct.d4d__maing*
  store %struct.d4d__maing* %19, %struct.d4d__maing** @d4d__main, align 8
  %20 = load %struct.d4d__maing*, %struct.d4d__maing** @d4d__main, align 8
  %21 = icmp ne %struct.d4d__maing* %20, null
  br i1 %21, label %23, label %22

22:                                               ; preds = %16
  store i32 -2, i32* %3, align 4
  br label %49

23:                                               ; preds = %16
  %24 = load %struct.d4d__maing*, %struct.d4d__maing** @d4d__main, align 8
  %25 = bitcast %struct.d4d__maing* %24 to i8*
  call void @d4d__memzero(i8* %25, i32 16)
  %26 = load i8* (i32)*, i8* (i32)** %4, align 8
  %27 = load %struct.d4d__maing*, %struct.d4d__maing** @d4d__main, align 8
  %28 = getelementptr inbounds %struct.d4d__maing, %struct.d4d__maing* %27, i32 0, i32 0
  store i8* (i32)* %26, i8* (i32)** %28, align 8
  %29 = load void (i8*)*, void (i8*)** %5, align 8
  %30 = load %struct.d4d__maing*, %struct.d4d__maing** @d4d__main, align 8
  %31 = getelementptr inbounds %struct.d4d__maing, %struct.d4d__maing* %30, i32 0, i32 1
  store void (i8*)* %29, void (i8*)** %31, align 8
  store %struct.splay_tree_s* null, %struct.splay_tree_s** %6, align 8
  store i64 0, i64* %7, align 8
  store %struct.splay_tree_node_s* null, %struct.splay_tree_node_s** %8, align 8
  %32 = call %struct.splay_tree_s* @splay_tree_new(i32 (i64, i64)* @splay_tree_compare_ints, void (i64)* null, void (i64)* null)
  store %struct.splay_tree_s* %32, %struct.splay_tree_s** %6, align 8
  store i64 0, i64* %7, align 8
  br label %33

33:                                               ; preds = %44, %23
  %34 = load i64, i64* %7, align 8
  %35 = icmp ult i64 %34, 10
  br i1 %35, label %36, label %47

36:                                               ; preds = %33
  %37 = load %struct.splay_tree_s*, %struct.splay_tree_s** %6, align 8
  %38 = load i64, i64* %7, align 8
  %39 = call %struct.splay_tree_node_s* @d4dag___splay_tree_insert(%struct.splay_tree_s* %37, i64 %38, i64 0)
  store %struct.splay_tree_node_s* %39, %struct.splay_tree_node_s** %8, align 8
  %40 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %8, align 8
  %41 = icmp ne %struct.splay_tree_node_s* %40, null
  br i1 %41, label %43, label %42

42:                                               ; preds = %36
  br label %43

43:                                               ; preds = %42, %36
  br label %44

44:                                               ; preds = %43
  %45 = load i64, i64* %7, align 8
  %46 = add i64 %45, 1
  store i64 %46, i64* %7, align 8
  br label %33

47:                                               ; preds = %33
  %48 = load %struct.splay_tree_s*, %struct.splay_tree_s** %6, align 8
  call void @d4dag___splay_tree_delete(%struct.splay_tree_s* %48)
  store i32 0, i32* %3, align 4
  br label %49

49:                                               ; preds = %47, %22, %15, %11
  %50 = load i32, i32* %3, align 4
  ret i32 %50
}

; Function Attrs: noinline nounwind optnone uwtable
define internal void @d4d__memzero(i8* %0, i32 %1) #0 {
  %3 = alloca i8*, align 8
  %4 = alloca i32, align 4
  %5 = alloca i8*, align 8
  store i8* %0, i8** %3, align 8
  store i32 %1, i32* %4, align 4
  store i8* null, i8** %5, align 8
  %6 = load i8*, i8** %3, align 8
  store i8* %6, i8** %5, align 8
  br label %7

7:                                                ; preds = %10, %2
  %8 = load i32, i32* %4, align 4
  %9 = icmp ne i32 %8, 0
  br i1 %9, label %10, label %16

10:                                               ; preds = %7
  %11 = load i8*, i8** %5, align 8
  store i8 0, i8* %11, align 1
  %12 = load i8*, i8** %5, align 8
  %13 = getelementptr inbounds i8, i8* %12, i32 1
  store i8* %13, i8** %5, align 8
  %14 = load i32, i32* %4, align 4
  %15 = add i32 %14, -1
  store i32 %15, i32* %4, align 4
  br label %7

16:                                               ; preds = %7
  ret void
}

; Function Attrs: noinline nounwind optnone uwtable
define internal %struct.splay_tree_s* @splay_tree_new(i32 (i64, i64)* %0, void (i64)* %1, void (i64)* %2) #0 {
  %4 = alloca i32 (i64, i64)*, align 8
  %5 = alloca void (i64)*, align 8
  %6 = alloca void (i64)*, align 8
  store i32 (i64, i64)* %0, i32 (i64, i64)** %4, align 8
  store void (i64)* %1, void (i64)** %5, align 8
  store void (i64)* %2, void (i64)** %6, align 8
  %7 = load i32 (i64, i64)*, i32 (i64, i64)** %4, align 8
  %8 = load void (i64)*, void (i64)** %5, align 8
  %9 = load void (i64)*, void (i64)** %6, align 8
  %10 = call %struct.splay_tree_s* @splay_tree_new_with_allocator(i32 (i64, i64)* %7, void (i64)* %8, void (i64)* %9, i8* (i32, i8*)* @splay_tree_xmalloc_allocate, void (i8*, i8*)* @splay_tree_xmalloc_deallocate, i8* null)
  ret %struct.splay_tree_s* %10
}

; Function Attrs: noinline nounwind optnone uwtable
define internal i32 @splay_tree_compare_ints(i64 %0, i64 %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  store i64 %0, i64* %4, align 8
  store i64 %1, i64* %5, align 8
  %6 = load i64, i64* %4, align 8
  %7 = trunc i64 %6 to i32
  %8 = load i64, i64* %5, align 8
  %9 = trunc i64 %8 to i32
  %10 = icmp slt i32 %7, %9
  br i1 %10, label %11, label %12

11:                                               ; preds = %2
  store i32 -1, i32* %3, align 4
  br label %20

12:                                               ; preds = %2
  %13 = load i64, i64* %4, align 8
  %14 = trunc i64 %13 to i32
  %15 = load i64, i64* %5, align 8
  %16 = trunc i64 %15 to i32
  %17 = icmp sgt i32 %14, %16
  br i1 %17, label %18, label %19

18:                                               ; preds = %12
  store i32 1, i32* %3, align 4
  br label %20

19:                                               ; preds = %12
  store i32 0, i32* %3, align 4
  br label %20

20:                                               ; preds = %19, %18, %11
  %21 = load i32, i32* %3, align 4
  ret i32 %21
}

; Function Attrs: noinline nounwind optnone uwtable
define internal %struct.splay_tree_node_s* @d4dag___splay_tree_insert(%struct.splay_tree_s* %0, i64 %1, i64 %2) #0 {
  %4 = alloca %struct.splay_tree_s*, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  %8 = alloca %struct.splay_tree_node_s*, align 8
  store %struct.splay_tree_s* %0, %struct.splay_tree_s** %4, align 8
  store i64 %1, i64* %5, align 8
  store i64 %2, i64* %6, align 8
  store i32 0, i32* %7, align 4
  store %struct.splay_tree_node_s* null, %struct.splay_tree_node_s** %8, align 8
  %9 = load %struct.splay_tree_s*, %struct.splay_tree_s** %4, align 8
  %10 = load i64, i64* %5, align 8
  call void @splay_tree_splay(%struct.splay_tree_s* %9, i64 %10)
  %11 = load %struct.splay_tree_s*, %struct.splay_tree_s** %4, align 8
  %12 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %11, i32 0, i32 0
  %13 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %12, align 8
  %14 = icmp ne %struct.splay_tree_node_s* %13, null
  br i1 %14, label %15, label %26

15:                                               ; preds = %3
  %16 = load %struct.splay_tree_s*, %struct.splay_tree_s** %4, align 8
  %17 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %16, i32 0, i32 1
  %18 = load i32 (i64, i64)*, i32 (i64, i64)** %17, align 8
  %19 = load %struct.splay_tree_s*, %struct.splay_tree_s** %4, align 8
  %20 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %19, i32 0, i32 0
  %21 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %20, align 8
  %22 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %21, i32 0, i32 0
  %23 = load i64, i64* %22, align 8
  %24 = load i64, i64* %5, align 8
  %25 = call i32 %18(i64 %23, i64 %24)
  store i32 %25, i32* %7, align 4
  br label %26

26:                                               ; preds = %15, %3
  %27 = load %struct.splay_tree_s*, %struct.splay_tree_s** %4, align 8
  %28 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %27, i32 0, i32 0
  %29 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %28, align 8
  %30 = icmp ne %struct.splay_tree_node_s* %29, null
  br i1 %30, label %31, label %73

31:                                               ; preds = %26
  %32 = load i32, i32* %7, align 4
  %33 = icmp eq i32 %32, 0
  br i1 %33, label %34, label %73

34:                                               ; preds = %31
  %35 = load %struct.splay_tree_s*, %struct.splay_tree_s** %4, align 8
  %36 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %35, i32 0, i32 2
  %37 = load void (i64)*, void (i64)** %36, align 8
  %38 = icmp ne void (i64)* %37, null
  br i1 %38, label %39, label %48

39:                                               ; preds = %34
  %40 = load %struct.splay_tree_s*, %struct.splay_tree_s** %4, align 8
  %41 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %40, i32 0, i32 2
  %42 = load void (i64)*, void (i64)** %41, align 8
  %43 = load %struct.splay_tree_s*, %struct.splay_tree_s** %4, align 8
  %44 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %43, i32 0, i32 0
  %45 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %44, align 8
  %46 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %45, i32 0, i32 0
  %47 = load i64, i64* %46, align 8
  call void %42(i64 %47)
  br label %48

48:                                               ; preds = %39, %34
  %49 = load %struct.splay_tree_s*, %struct.splay_tree_s** %4, align 8
  %50 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %49, i32 0, i32 3
  %51 = load void (i64)*, void (i64)** %50, align 8
  %52 = icmp ne void (i64)* %51, null
  br i1 %52, label %53, label %62

53:                                               ; preds = %48
  %54 = load %struct.splay_tree_s*, %struct.splay_tree_s** %4, align 8
  %55 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %54, i32 0, i32 3
  %56 = load void (i64)*, void (i64)** %55, align 8
  %57 = load %struct.splay_tree_s*, %struct.splay_tree_s** %4, align 8
  %58 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %57, i32 0, i32 0
  %59 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %58, align 8
  %60 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %59, i32 0, i32 1
  %61 = load i64, i64* %60, align 8
  call void %56(i64 %61)
  br label %62

62:                                               ; preds = %53, %48
  %63 = load i64, i64* %5, align 8
  %64 = load %struct.splay_tree_s*, %struct.splay_tree_s** %4, align 8
  %65 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %64, i32 0, i32 0
  %66 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %65, align 8
  %67 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %66, i32 0, i32 0
  store i64 %63, i64* %67, align 8
  %68 = load i64, i64* %6, align 8
  %69 = load %struct.splay_tree_s*, %struct.splay_tree_s** %4, align 8
  %70 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %69, i32 0, i32 0
  %71 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %70, align 8
  %72 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %71, i32 0, i32 1
  store i64 %68, i64* %72, align 8
  br label %139

73:                                               ; preds = %31, %26
  %74 = load %struct.splay_tree_s*, %struct.splay_tree_s** %4, align 8
  %75 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %74, i32 0, i32 4
  %76 = load i8* (i32, i8*)*, i8* (i32, i8*)** %75, align 8
  %77 = load %struct.splay_tree_s*, %struct.splay_tree_s** %4, align 8
  %78 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %77, i32 0, i32 6
  %79 = load i8*, i8** %78, align 8
  %80 = call i8* %76(i32 32, i8* %79)
  %81 = bitcast i8* %80 to %struct.splay_tree_node_s*
  store %struct.splay_tree_node_s* %81, %struct.splay_tree_node_s** %8, align 8
  %82 = load i64, i64* %5, align 8
  %83 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %8, align 8
  %84 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %83, i32 0, i32 0
  store i64 %82, i64* %84, align 8
  %85 = load i64, i64* %6, align 8
  %86 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %8, align 8
  %87 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %86, i32 0, i32 1
  store i64 %85, i64* %87, align 8
  %88 = load %struct.splay_tree_s*, %struct.splay_tree_s** %4, align 8
  %89 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %88, i32 0, i32 0
  %90 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %89, align 8
  %91 = icmp ne %struct.splay_tree_node_s* %90, null
  br i1 %91, label %97, label %92

92:                                               ; preds = %73
  %93 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %8, align 8
  %94 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %93, i32 0, i32 2
  store %struct.splay_tree_node_s* null, %struct.splay_tree_node_s** %94, align 8
  %95 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %8, align 8
  %96 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %95, i32 0, i32 3
  store %struct.splay_tree_node_s* null, %struct.splay_tree_node_s** %96, align 8
  br label %135

97:                                               ; preds = %73
  %98 = load i32, i32* %7, align 4
  %99 = icmp slt i32 %98, 0
  br i1 %99, label %100, label %117

100:                                              ; preds = %97
  %101 = load %struct.splay_tree_s*, %struct.splay_tree_s** %4, align 8
  %102 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %101, i32 0, i32 0
  %103 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %102, align 8
  %104 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %8, align 8
  %105 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %104, i32 0, i32 2
  store %struct.splay_tree_node_s* %103, %struct.splay_tree_node_s** %105, align 8
  %106 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %8, align 8
  %107 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %106, i32 0, i32 2
  %108 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %107, align 8
  %109 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %108, i32 0, i32 3
  %110 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %109, align 8
  %111 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %8, align 8
  %112 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %111, i32 0, i32 3
  store %struct.splay_tree_node_s* %110, %struct.splay_tree_node_s** %112, align 8
  %113 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %8, align 8
  %114 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %113, i32 0, i32 2
  %115 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %114, align 8
  %116 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %115, i32 0, i32 3
  store %struct.splay_tree_node_s* null, %struct.splay_tree_node_s** %116, align 8
  br label %134

117:                                              ; preds = %97
  %118 = load %struct.splay_tree_s*, %struct.splay_tree_s** %4, align 8
  %119 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %118, i32 0, i32 0
  %120 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %119, align 8
  %121 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %8, align 8
  %122 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %121, i32 0, i32 3
  store %struct.splay_tree_node_s* %120, %struct.splay_tree_node_s** %122, align 8
  %123 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %8, align 8
  %124 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %123, i32 0, i32 3
  %125 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %124, align 8
  %126 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %125, i32 0, i32 2
  %127 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %126, align 8
  %128 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %8, align 8
  %129 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %128, i32 0, i32 2
  store %struct.splay_tree_node_s* %127, %struct.splay_tree_node_s** %129, align 8
  %130 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %8, align 8
  %131 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %130, i32 0, i32 3
  %132 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %131, align 8
  %133 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %132, i32 0, i32 2
  store %struct.splay_tree_node_s* null, %struct.splay_tree_node_s** %133, align 8
  br label %134

134:                                              ; preds = %117, %100
  br label %135

135:                                              ; preds = %134, %92
  %136 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %8, align 8
  %137 = load %struct.splay_tree_s*, %struct.splay_tree_s** %4, align 8
  %138 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %137, i32 0, i32 0
  store %struct.splay_tree_node_s* %136, %struct.splay_tree_node_s** %138, align 8
  br label %139

139:                                              ; preds = %135, %62
  %140 = load %struct.splay_tree_s*, %struct.splay_tree_s** %4, align 8
  %141 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %140, i32 0, i32 0
  %142 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %141, align 8
  ret %struct.splay_tree_node_s* %142
}

; Function Attrs: noinline nounwind optnone uwtable
define internal void @d4dag___splay_tree_delete(%struct.splay_tree_s* %0) #0 {
  %2 = alloca %struct.splay_tree_s*, align 8
  store %struct.splay_tree_s* %0, %struct.splay_tree_s** %2, align 8
  %3 = load %struct.splay_tree_s*, %struct.splay_tree_s** %2, align 8
  %4 = load %struct.splay_tree_s*, %struct.splay_tree_s** %2, align 8
  %5 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %4, i32 0, i32 0
  %6 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %5, align 8
  call void @splay_tree_delete_helper(%struct.splay_tree_s* %3, %struct.splay_tree_node_s* %6)
  %7 = load %struct.splay_tree_s*, %struct.splay_tree_s** %2, align 8
  %8 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %7, i32 0, i32 5
  %9 = load void (i8*, i8*)*, void (i8*, i8*)** %8, align 8
  %10 = load %struct.splay_tree_s*, %struct.splay_tree_s** %2, align 8
  %11 = bitcast %struct.splay_tree_s* %10 to i8*
  %12 = load %struct.splay_tree_s*, %struct.splay_tree_s** %2, align 8
  %13 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %12, i32 0, i32 6
  %14 = load i8*, i8** %13, align 8
  call void %9(i8* %11, i8* %14)
  ret void
}

; Function Attrs: noinline nounwind optnone uwtable
define dso_local i32 @d4d_deinit() #0 {
  %1 = alloca i32, align 4
  %2 = load %struct.d4d__maing*, %struct.d4d__maing** @d4d__main, align 8
  %3 = icmp ne %struct.d4d__maing* %2, null
  br i1 %3, label %5, label %4

4:                                                ; preds = %0
  store i32 0, i32* %1, align 4
  br label %11

5:                                                ; preds = %0
  %6 = load %struct.d4d__maing*, %struct.d4d__maing** @d4d__main, align 8
  %7 = getelementptr inbounds %struct.d4d__maing, %struct.d4d__maing* %6, i32 0, i32 1
  %8 = load void (i8*)*, void (i8*)** %7, align 8
  %9 = load %struct.d4d__maing*, %struct.d4d__maing** @d4d__main, align 8
  %10 = bitcast %struct.d4d__maing* %9 to i8*
  call void %8(i8* %10)
  store %struct.d4d__maing* null, %struct.d4d__maing** @d4d__main, align 8
  store i32 0, i32* %1, align 4
  br label %11

11:                                               ; preds = %5, %4
  %12 = load i32, i32* %1, align 4
  ret i32 %12
}

; Function Attrs: noinline nounwind optnone uwtable
define internal %struct.splay_tree_s* @splay_tree_new_with_allocator(i32 (i64, i64)* %0, void (i64)* %1, void (i64)* %2, i8* (i32, i8*)* %3, void (i8*, i8*)* %4, i8* %5) #0 {
  %7 = alloca i32 (i64, i64)*, align 8
  %8 = alloca void (i64)*, align 8
  %9 = alloca void (i64)*, align 8
  %10 = alloca i8* (i32, i8*)*, align 8
  %11 = alloca void (i8*, i8*)*, align 8
  %12 = alloca i8*, align 8
  store i32 (i64, i64)* %0, i32 (i64, i64)** %7, align 8
  store void (i64)* %1, void (i64)** %8, align 8
  store void (i64)* %2, void (i64)** %9, align 8
  store i8* (i32, i8*)* %3, i8* (i32, i8*)** %10, align 8
  store void (i8*, i8*)* %4, void (i8*, i8*)** %11, align 8
  store i8* %5, i8** %12, align 8
  %13 = load i32 (i64, i64)*, i32 (i64, i64)** %7, align 8
  %14 = load void (i64)*, void (i64)** %8, align 8
  %15 = load void (i64)*, void (i64)** %9, align 8
  %16 = load i8* (i32, i8*)*, i8* (i32, i8*)** %10, align 8
  %17 = load i8* (i32, i8*)*, i8* (i32, i8*)** %10, align 8
  %18 = load void (i8*, i8*)*, void (i8*, i8*)** %11, align 8
  %19 = load i8*, i8** %12, align 8
  %20 = call %struct.splay_tree_s* @splay_tree_new_typed_alloc(i32 (i64, i64)* %13, void (i64)* %14, void (i64)* %15, i8* (i32, i8*)* %16, i8* (i32, i8*)* %17, void (i8*, i8*)* %18, i8* %19)
  ret %struct.splay_tree_s* %20
}

; Function Attrs: noinline nounwind optnone uwtable
define internal i8* @splay_tree_xmalloc_allocate(i32 %0, i8* %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i8*, align 8
  %5 = alloca i8*, align 8
  store i32 %0, i32* %3, align 4
  store i8* %1, i8** %4, align 8
  store i8* null, i8** %5, align 8
  %6 = load i8*, i8** %4, align 8
  %7 = icmp ne i8* %6, null
  br i1 %7, label %8, label %9

8:                                                ; preds = %2
  br label %9

9:                                                ; preds = %8, %2
  %10 = load %struct.d4d__maing*, %struct.d4d__maing** @d4d__main, align 8
  %11 = getelementptr inbounds %struct.d4d__maing, %struct.d4d__maing* %10, i32 0, i32 0
  %12 = load i8* (i32)*, i8* (i32)** %11, align 8
  %13 = load i32, i32* %3, align 4
  %14 = call i8* %12(i32 %13)
  store i8* %14, i8** %5, align 8
  %15 = load i8*, i8** %5, align 8
  %16 = load i32, i32* %3, align 4
  call void @d4d__memzero(i8* %15, i32 %16)
  %17 = load i8*, i8** %5, align 8
  ret i8* %17
}

; Function Attrs: noinline nounwind optnone uwtable
define internal void @splay_tree_xmalloc_deallocate(i8* %0, i8* %1) #0 {
  %3 = alloca i8*, align 8
  %4 = alloca i8*, align 8
  store i8* %0, i8** %3, align 8
  store i8* %1, i8** %4, align 8
  %5 = load i8*, i8** %3, align 8
  %6 = icmp ne i8* %5, null
  br i1 %6, label %7, label %12

7:                                                ; preds = %2
  %8 = load %struct.d4d__maing*, %struct.d4d__maing** @d4d__main, align 8
  %9 = getelementptr inbounds %struct.d4d__maing, %struct.d4d__maing* %8, i32 0, i32 1
  %10 = load void (i8*)*, void (i8*)** %9, align 8
  %11 = load i8*, i8** %3, align 8
  call void %10(i8* %11)
  br label %12

12:                                               ; preds = %7, %2
  %13 = load i8*, i8** %4, align 8
  %14 = icmp ne i8* %13, null
  br i1 %14, label %15, label %16

15:                                               ; preds = %12
  br label %16

16:                                               ; preds = %15, %12
  ret void
}

; Function Attrs: noinline nounwind optnone uwtable
define internal %struct.splay_tree_s* @splay_tree_new_typed_alloc(i32 (i64, i64)* %0, void (i64)* %1, void (i64)* %2, i8* (i32, i8*)* %3, i8* (i32, i8*)* %4, void (i8*, i8*)* %5, i8* %6) #0 {
  %8 = alloca i32 (i64, i64)*, align 8
  %9 = alloca void (i64)*, align 8
  %10 = alloca void (i64)*, align 8
  %11 = alloca i8* (i32, i8*)*, align 8
  %12 = alloca i8* (i32, i8*)*, align 8
  %13 = alloca void (i8*, i8*)*, align 8
  %14 = alloca i8*, align 8
  %15 = alloca %struct.splay_tree_s*, align 8
  store i32 (i64, i64)* %0, i32 (i64, i64)** %8, align 8
  store void (i64)* %1, void (i64)** %9, align 8
  store void (i64)* %2, void (i64)** %10, align 8
  store i8* (i32, i8*)* %3, i8* (i32, i8*)** %11, align 8
  store i8* (i32, i8*)* %4, i8* (i32, i8*)** %12, align 8
  store void (i8*, i8*)* %5, void (i8*, i8*)** %13, align 8
  store i8* %6, i8** %14, align 8
  %16 = load i8* (i32, i8*)*, i8* (i32, i8*)** %11, align 8
  %17 = load i8*, i8** %14, align 8
  %18 = call i8* %16(i32 56, i8* %17)
  %19 = bitcast i8* %18 to %struct.splay_tree_s*
  store %struct.splay_tree_s* %19, %struct.splay_tree_s** %15, align 8
  %20 = load %struct.splay_tree_s*, %struct.splay_tree_s** %15, align 8
  %21 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %20, i32 0, i32 0
  store %struct.splay_tree_node_s* null, %struct.splay_tree_node_s** %21, align 8
  %22 = load i32 (i64, i64)*, i32 (i64, i64)** %8, align 8
  %23 = load %struct.splay_tree_s*, %struct.splay_tree_s** %15, align 8
  %24 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %23, i32 0, i32 1
  store i32 (i64, i64)* %22, i32 (i64, i64)** %24, align 8
  %25 = load void (i64)*, void (i64)** %9, align 8
  %26 = load %struct.splay_tree_s*, %struct.splay_tree_s** %15, align 8
  %27 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %26, i32 0, i32 2
  store void (i64)* %25, void (i64)** %27, align 8
  %28 = load void (i64)*, void (i64)** %10, align 8
  %29 = load %struct.splay_tree_s*, %struct.splay_tree_s** %15, align 8
  %30 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %29, i32 0, i32 3
  store void (i64)* %28, void (i64)** %30, align 8
  %31 = load i8* (i32, i8*)*, i8* (i32, i8*)** %12, align 8
  %32 = load %struct.splay_tree_s*, %struct.splay_tree_s** %15, align 8
  %33 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %32, i32 0, i32 4
  store i8* (i32, i8*)* %31, i8* (i32, i8*)** %33, align 8
  %34 = load void (i8*, i8*)*, void (i8*, i8*)** %13, align 8
  %35 = load %struct.splay_tree_s*, %struct.splay_tree_s** %15, align 8
  %36 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %35, i32 0, i32 5
  store void (i8*, i8*)* %34, void (i8*, i8*)** %36, align 8
  %37 = load i8*, i8** %14, align 8
  %38 = load %struct.splay_tree_s*, %struct.splay_tree_s** %15, align 8
  %39 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %38, i32 0, i32 6
  store i8* %37, i8** %39, align 8
  %40 = load %struct.splay_tree_s*, %struct.splay_tree_s** %15, align 8
  ret %struct.splay_tree_s* %40
}

; Function Attrs: noinline nounwind optnone uwtable
define internal void @splay_tree_delete_helper(%struct.splay_tree_s* %0, %struct.splay_tree_node_s* %1) #0 {
  %3 = alloca %struct.splay_tree_s*, align 8
  %4 = alloca %struct.splay_tree_node_s*, align 8
  %5 = alloca %struct.splay_tree_node_s*, align 8
  %6 = alloca %struct.splay_tree_node_s*, align 8
  %7 = alloca %struct.splay_tree_node_s*, align 8
  store %struct.splay_tree_s* %0, %struct.splay_tree_s** %3, align 8
  store %struct.splay_tree_node_s* %1, %struct.splay_tree_node_s** %4, align 8
  store %struct.splay_tree_node_s* null, %struct.splay_tree_node_s** %5, align 8
  store %struct.splay_tree_node_s* null, %struct.splay_tree_node_s** %6, align 8
  %8 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %4, align 8
  %9 = icmp ne %struct.splay_tree_node_s* %8, null
  br i1 %9, label %11, label %10

10:                                               ; preds = %2
  br label %151

11:                                               ; preds = %2
  %12 = load %struct.splay_tree_s*, %struct.splay_tree_s** %3, align 8
  %13 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %12, i32 0, i32 2
  %14 = load void (i64)*, void (i64)** %13, align 8
  %15 = icmp ne void (i64)* %14, null
  br i1 %15, label %16, label %23

16:                                               ; preds = %11
  %17 = load %struct.splay_tree_s*, %struct.splay_tree_s** %3, align 8
  %18 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %17, i32 0, i32 2
  %19 = load void (i64)*, void (i64)** %18, align 8
  %20 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %4, align 8
  %21 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %20, i32 0, i32 0
  %22 = load i64, i64* %21, align 8
  call void %19(i64 %22)
  br label %23

23:                                               ; preds = %16, %11
  %24 = load %struct.splay_tree_s*, %struct.splay_tree_s** %3, align 8
  %25 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %24, i32 0, i32 3
  %26 = load void (i64)*, void (i64)** %25, align 8
  %27 = icmp ne void (i64)* %26, null
  br i1 %27, label %28, label %35

28:                                               ; preds = %23
  %29 = load %struct.splay_tree_s*, %struct.splay_tree_s** %3, align 8
  %30 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %29, i32 0, i32 3
  %31 = load void (i64)*, void (i64)** %30, align 8
  %32 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %4, align 8
  %33 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %32, i32 0, i32 1
  %34 = load i64, i64* %33, align 8
  call void %31(i64 %34)
  br label %35

35:                                               ; preds = %28, %23
  %36 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %5, align 8
  %37 = ptrtoint %struct.splay_tree_node_s* %36 to i64
  %38 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %4, align 8
  %39 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %38, i32 0, i32 0
  store i64 %37, i64* %39, align 8
  %40 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %4, align 8
  store %struct.splay_tree_node_s* %40, %struct.splay_tree_node_s** %5, align 8
  br label %41

41:                                               ; preds = %149, %35
  %42 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %5, align 8
  %43 = icmp ne %struct.splay_tree_node_s* %42, null
  br i1 %43, label %44, label %150

44:                                               ; preds = %41
  %45 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %5, align 8
  store %struct.splay_tree_node_s* %45, %struct.splay_tree_node_s** %6, align 8
  store %struct.splay_tree_node_s* null, %struct.splay_tree_node_s** %5, align 8
  br label %46

46:                                               ; preds = %135, %44
  %47 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %6, align 8
  %48 = icmp ne %struct.splay_tree_node_s* %47, null
  br i1 %48, label %49, label %149

49:                                               ; preds = %46
  store %struct.splay_tree_node_s* null, %struct.splay_tree_node_s** %7, align 8
  %50 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %6, align 8
  %51 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %50, i32 0, i32 2
  %52 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %51, align 8
  %53 = icmp ne %struct.splay_tree_node_s* %52, null
  br i1 %53, label %54, label %92

54:                                               ; preds = %49
  %55 = load %struct.splay_tree_s*, %struct.splay_tree_s** %3, align 8
  %56 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %55, i32 0, i32 2
  %57 = load void (i64)*, void (i64)** %56, align 8
  %58 = icmp ne void (i64)* %57, null
  br i1 %58, label %59, label %68

59:                                               ; preds = %54
  %60 = load %struct.splay_tree_s*, %struct.splay_tree_s** %3, align 8
  %61 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %60, i32 0, i32 2
  %62 = load void (i64)*, void (i64)** %61, align 8
  %63 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %6, align 8
  %64 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %63, i32 0, i32 2
  %65 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %64, align 8
  %66 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %65, i32 0, i32 0
  %67 = load i64, i64* %66, align 8
  call void %62(i64 %67)
  br label %68

68:                                               ; preds = %59, %54
  %69 = load %struct.splay_tree_s*, %struct.splay_tree_s** %3, align 8
  %70 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %69, i32 0, i32 3
  %71 = load void (i64)*, void (i64)** %70, align 8
  %72 = icmp ne void (i64)* %71, null
  br i1 %72, label %73, label %82

73:                                               ; preds = %68
  %74 = load %struct.splay_tree_s*, %struct.splay_tree_s** %3, align 8
  %75 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %74, i32 0, i32 3
  %76 = load void (i64)*, void (i64)** %75, align 8
  %77 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %6, align 8
  %78 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %77, i32 0, i32 2
  %79 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %78, align 8
  %80 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %79, i32 0, i32 1
  %81 = load i64, i64* %80, align 8
  call void %76(i64 %81)
  br label %82

82:                                               ; preds = %73, %68
  %83 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %5, align 8
  %84 = ptrtoint %struct.splay_tree_node_s* %83 to i64
  %85 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %6, align 8
  %86 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %85, i32 0, i32 2
  %87 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %86, align 8
  %88 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %87, i32 0, i32 0
  store i64 %84, i64* %88, align 8
  %89 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %6, align 8
  %90 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %89, i32 0, i32 2
  %91 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %90, align 8
  store %struct.splay_tree_node_s* %91, %struct.splay_tree_node_s** %5, align 8
  br label %92

92:                                               ; preds = %82, %49
  %93 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %6, align 8
  %94 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %93, i32 0, i32 3
  %95 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %94, align 8
  %96 = icmp ne %struct.splay_tree_node_s* %95, null
  br i1 %96, label %97, label %135

97:                                               ; preds = %92
  %98 = load %struct.splay_tree_s*, %struct.splay_tree_s** %3, align 8
  %99 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %98, i32 0, i32 2
  %100 = load void (i64)*, void (i64)** %99, align 8
  %101 = icmp ne void (i64)* %100, null
  br i1 %101, label %102, label %111

102:                                              ; preds = %97
  %103 = load %struct.splay_tree_s*, %struct.splay_tree_s** %3, align 8
  %104 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %103, i32 0, i32 2
  %105 = load void (i64)*, void (i64)** %104, align 8
  %106 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %6, align 8
  %107 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %106, i32 0, i32 3
  %108 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %107, align 8
  %109 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %108, i32 0, i32 0
  %110 = load i64, i64* %109, align 8
  call void %105(i64 %110)
  br label %111

111:                                              ; preds = %102, %97
  %112 = load %struct.splay_tree_s*, %struct.splay_tree_s** %3, align 8
  %113 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %112, i32 0, i32 3
  %114 = load void (i64)*, void (i64)** %113, align 8
  %115 = icmp ne void (i64)* %114, null
  br i1 %115, label %116, label %125

116:                                              ; preds = %111
  %117 = load %struct.splay_tree_s*, %struct.splay_tree_s** %3, align 8
  %118 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %117, i32 0, i32 3
  %119 = load void (i64)*, void (i64)** %118, align 8
  %120 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %6, align 8
  %121 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %120, i32 0, i32 3
  %122 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %121, align 8
  %123 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %122, i32 0, i32 1
  %124 = load i64, i64* %123, align 8
  call void %119(i64 %124)
  br label %125

125:                                              ; preds = %116, %111
  %126 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %5, align 8
  %127 = ptrtoint %struct.splay_tree_node_s* %126 to i64
  %128 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %6, align 8
  %129 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %128, i32 0, i32 3
  %130 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %129, align 8
  %131 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %130, i32 0, i32 0
  store i64 %127, i64* %131, align 8
  %132 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %6, align 8
  %133 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %132, i32 0, i32 3
  %134 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %133, align 8
  store %struct.splay_tree_node_s* %134, %struct.splay_tree_node_s** %5, align 8
  br label %135

135:                                              ; preds = %125, %92
  %136 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %6, align 8
  store %struct.splay_tree_node_s* %136, %struct.splay_tree_node_s** %7, align 8
  %137 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %7, align 8
  %138 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %137, i32 0, i32 0
  %139 = load i64, i64* %138, align 8
  %140 = inttoptr i64 %139 to %struct.splay_tree_node_s*
  store %struct.splay_tree_node_s* %140, %struct.splay_tree_node_s** %6, align 8
  %141 = load %struct.splay_tree_s*, %struct.splay_tree_s** %3, align 8
  %142 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %141, i32 0, i32 5
  %143 = load void (i8*, i8*)*, void (i8*, i8*)** %142, align 8
  %144 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %7, align 8
  %145 = bitcast %struct.splay_tree_node_s* %144 to i8*
  %146 = load %struct.splay_tree_s*, %struct.splay_tree_s** %3, align 8
  %147 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %146, i32 0, i32 6
  %148 = load i8*, i8** %147, align 8
  call void %143(i8* %145, i8* %148)
  br label %46

149:                                              ; preds = %46
  br label %41

150:                                              ; preds = %41
  br label %151

151:                                              ; preds = %150, %10
  ret void
}

; Function Attrs: noinline nounwind optnone uwtable
define internal void @splay_tree_splay(%struct.splay_tree_s* %0, i64 %1) #0 {
  %3 = alloca %struct.splay_tree_s*, align 8
  %4 = alloca i64, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %struct.splay_tree_node_s*, align 8
  %8 = alloca %struct.splay_tree_node_s*, align 8
  store %struct.splay_tree_s* %0, %struct.splay_tree_s** %3, align 8
  store i64 %1, i64* %4, align 8
  store i32 0, i32* %5, align 4
  store i32 0, i32* %6, align 4
  store %struct.splay_tree_node_s* null, %struct.splay_tree_node_s** %7, align 8
  store %struct.splay_tree_node_s* null, %struct.splay_tree_node_s** %8, align 8
  %9 = load %struct.splay_tree_s*, %struct.splay_tree_s** %3, align 8
  %10 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %9, i32 0, i32 0
  %11 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %10, align 8
  %12 = icmp ne %struct.splay_tree_node_s* %11, null
  br i1 %12, label %14, label %13

13:                                               ; preds = %2
  br label %169

14:                                               ; preds = %2
  br label %15

15:                                               ; preds = %167, %14
  %16 = load %struct.splay_tree_s*, %struct.splay_tree_s** %3, align 8
  %17 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %16, i32 0, i32 0
  %18 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %17, align 8
  store %struct.splay_tree_node_s* %18, %struct.splay_tree_node_s** %7, align 8
  %19 = load %struct.splay_tree_s*, %struct.splay_tree_s** %3, align 8
  %20 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %19, i32 0, i32 1
  %21 = load i32 (i64, i64)*, i32 (i64, i64)** %20, align 8
  %22 = load i64, i64* %4, align 8
  %23 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %7, align 8
  %24 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %23, i32 0, i32 0
  %25 = load i64, i64* %24, align 8
  %26 = call i32 %21(i64 %22, i64 %25)
  store i32 %26, i32* %5, align 4
  %27 = load i32, i32* %5, align 4
  %28 = icmp eq i32 %27, 0
  br i1 %28, label %29, label %30

29:                                               ; preds = %15
  br label %169

30:                                               ; preds = %15
  %31 = load i32, i32* %5, align 4
  %32 = icmp slt i32 %31, 0
  br i1 %32, label %33, label %37

33:                                               ; preds = %30
  %34 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %7, align 8
  %35 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %34, i32 0, i32 2
  %36 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %35, align 8
  store %struct.splay_tree_node_s* %36, %struct.splay_tree_node_s** %8, align 8
  br label %41

37:                                               ; preds = %30
  %38 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %7, align 8
  %39 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %38, i32 0, i32 3
  %40 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %39, align 8
  store %struct.splay_tree_node_s* %40, %struct.splay_tree_node_s** %8, align 8
  br label %41

41:                                               ; preds = %37, %33
  %42 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %8, align 8
  %43 = icmp ne %struct.splay_tree_node_s* %42, null
  br i1 %43, label %45, label %44

44:                                               ; preds = %41
  br label %169

45:                                               ; preds = %41
  %46 = load %struct.splay_tree_s*, %struct.splay_tree_s** %3, align 8
  %47 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %46, i32 0, i32 1
  %48 = load i32 (i64, i64)*, i32 (i64, i64)** %47, align 8
  %49 = load i64, i64* %4, align 8
  %50 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %8, align 8
  %51 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %50, i32 0, i32 0
  %52 = load i64, i64* %51, align 8
  %53 = call i32 %48(i64 %49, i64 %52)
  store i32 %53, i32* %6, align 4
  %54 = load i32, i32* %6, align 4
  %55 = icmp eq i32 %54, 0
  br i1 %55, label %72, label %56

56:                                               ; preds = %45
  %57 = load i32, i32* %6, align 4
  %58 = icmp slt i32 %57, 0
  br i1 %58, label %59, label %64

59:                                               ; preds = %56
  %60 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %8, align 8
  %61 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %60, i32 0, i32 2
  %62 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %61, align 8
  %63 = icmp ne %struct.splay_tree_node_s* %62, null
  br i1 %63, label %64, label %72

64:                                               ; preds = %59, %56
  %65 = load i32, i32* %6, align 4
  %66 = icmp sgt i32 %65, 0
  br i1 %66, label %67, label %86

67:                                               ; preds = %64
  %68 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %8, align 8
  %69 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %68, i32 0, i32 3
  %70 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %69, align 8
  %71 = icmp ne %struct.splay_tree_node_s* %70, null
  br i1 %71, label %86, label %72

72:                                               ; preds = %67, %59, %45
  %73 = load i32, i32* %5, align 4
  %74 = icmp slt i32 %73, 0
  br i1 %74, label %75, label %80

75:                                               ; preds = %72
  %76 = load %struct.splay_tree_s*, %struct.splay_tree_s** %3, align 8
  %77 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %76, i32 0, i32 0
  %78 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %7, align 8
  %79 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %8, align 8
  call void @rotate_left(%struct.splay_tree_node_s** %77, %struct.splay_tree_node_s* %78, %struct.splay_tree_node_s* %79)
  br label %85

80:                                               ; preds = %72
  %81 = load %struct.splay_tree_s*, %struct.splay_tree_s** %3, align 8
  %82 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %81, i32 0, i32 0
  %83 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %7, align 8
  %84 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %8, align 8
  call void @rotate_right(%struct.splay_tree_node_s** %82, %struct.splay_tree_node_s* %83, %struct.splay_tree_node_s* %84)
  br label %85

85:                                               ; preds = %80, %75
  br label %169

86:                                               ; preds = %67, %64
  %87 = load i32, i32* %5, align 4
  %88 = icmp slt i32 %87, 0
  br i1 %88, label %89, label %105

89:                                               ; preds = %86
  %90 = load i32, i32* %6, align 4
  %91 = icmp slt i32 %90, 0
  br i1 %91, label %92, label %105

92:                                               ; preds = %89
  %93 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %7, align 8
  %94 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %93, i32 0, i32 2
  %95 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %8, align 8
  %96 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %8, align 8
  %97 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %96, i32 0, i32 2
  %98 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %97, align 8
  call void @rotate_left(%struct.splay_tree_node_s** %94, %struct.splay_tree_node_s* %95, %struct.splay_tree_node_s* %98)
  %99 = load %struct.splay_tree_s*, %struct.splay_tree_s** %3, align 8
  %100 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %99, i32 0, i32 0
  %101 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %7, align 8
  %102 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %7, align 8
  %103 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %102, i32 0, i32 2
  %104 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %103, align 8
  call void @rotate_left(%struct.splay_tree_node_s** %100, %struct.splay_tree_node_s* %101, %struct.splay_tree_node_s* %104)
  br label %166

105:                                              ; preds = %89, %86
  %106 = load i32, i32* %5, align 4
  %107 = icmp sgt i32 %106, 0
  br i1 %107, label %108, label %124

108:                                              ; preds = %105
  %109 = load i32, i32* %6, align 4
  %110 = icmp sgt i32 %109, 0
  br i1 %110, label %111, label %124

111:                                              ; preds = %108
  %112 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %7, align 8
  %113 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %112, i32 0, i32 3
  %114 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %8, align 8
  %115 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %8, align 8
  %116 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %115, i32 0, i32 3
  %117 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %116, align 8
  call void @rotate_right(%struct.splay_tree_node_s** %113, %struct.splay_tree_node_s* %114, %struct.splay_tree_node_s* %117)
  %118 = load %struct.splay_tree_s*, %struct.splay_tree_s** %3, align 8
  %119 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %118, i32 0, i32 0
  %120 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %7, align 8
  %121 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %7, align 8
  %122 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %121, i32 0, i32 3
  %123 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %122, align 8
  call void @rotate_right(%struct.splay_tree_node_s** %119, %struct.splay_tree_node_s* %120, %struct.splay_tree_node_s* %123)
  br label %165

124:                                              ; preds = %108, %105
  %125 = load i32, i32* %5, align 4
  %126 = icmp slt i32 %125, 0
  br i1 %126, label %127, label %143

127:                                              ; preds = %124
  %128 = load i32, i32* %6, align 4
  %129 = icmp sgt i32 %128, 0
  br i1 %129, label %130, label %143

130:                                              ; preds = %127
  %131 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %7, align 8
  %132 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %131, i32 0, i32 2
  %133 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %8, align 8
  %134 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %8, align 8
  %135 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %134, i32 0, i32 3
  %136 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %135, align 8
  call void @rotate_right(%struct.splay_tree_node_s** %132, %struct.splay_tree_node_s* %133, %struct.splay_tree_node_s* %136)
  %137 = load %struct.splay_tree_s*, %struct.splay_tree_s** %3, align 8
  %138 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %137, i32 0, i32 0
  %139 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %7, align 8
  %140 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %7, align 8
  %141 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %140, i32 0, i32 2
  %142 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %141, align 8
  call void @rotate_left(%struct.splay_tree_node_s** %138, %struct.splay_tree_node_s* %139, %struct.splay_tree_node_s* %142)
  br label %164

143:                                              ; preds = %127, %124
  %144 = load i32, i32* %5, align 4
  %145 = icmp sgt i32 %144, 0
  br i1 %145, label %146, label %162

146:                                              ; preds = %143
  %147 = load i32, i32* %6, align 4
  %148 = icmp slt i32 %147, 0
  br i1 %148, label %149, label %162

149:                                              ; preds = %146
  %150 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %7, align 8
  %151 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %150, i32 0, i32 3
  %152 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %8, align 8
  %153 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %8, align 8
  %154 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %153, i32 0, i32 2
  %155 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %154, align 8
  call void @rotate_left(%struct.splay_tree_node_s** %151, %struct.splay_tree_node_s* %152, %struct.splay_tree_node_s* %155)
  %156 = load %struct.splay_tree_s*, %struct.splay_tree_s** %3, align 8
  %157 = getelementptr inbounds %struct.splay_tree_s, %struct.splay_tree_s* %156, i32 0, i32 0
  %158 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %7, align 8
  %159 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %7, align 8
  %160 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %159, i32 0, i32 3
  %161 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %160, align 8
  call void @rotate_right(%struct.splay_tree_node_s** %157, %struct.splay_tree_node_s* %158, %struct.splay_tree_node_s* %161)
  br label %163

162:                                              ; preds = %146, %143
  br label %163

163:                                              ; preds = %162, %149
  br label %164

164:                                              ; preds = %163, %130
  br label %165

165:                                              ; preds = %164, %111
  br label %166

166:                                              ; preds = %165, %92
  br label %167

167:                                              ; preds = %166
  br i1 true, label %15, label %168

168:                                              ; preds = %167
  br label %169

169:                                              ; preds = %168, %85, %44, %29, %13
  ret void
}

; Function Attrs: noinline nounwind optnone uwtable
define internal void @rotate_left(%struct.splay_tree_node_s** %0, %struct.splay_tree_node_s* %1, %struct.splay_tree_node_s* %2) #0 {
  %4 = alloca %struct.splay_tree_node_s**, align 8
  %5 = alloca %struct.splay_tree_node_s*, align 8
  %6 = alloca %struct.splay_tree_node_s*, align 8
  %7 = alloca %struct.splay_tree_node_s*, align 8
  store %struct.splay_tree_node_s** %0, %struct.splay_tree_node_s*** %4, align 8
  store %struct.splay_tree_node_s* %1, %struct.splay_tree_node_s** %5, align 8
  store %struct.splay_tree_node_s* %2, %struct.splay_tree_node_s** %6, align 8
  store %struct.splay_tree_node_s* null, %struct.splay_tree_node_s** %7, align 8
  %8 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %6, align 8
  %9 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %8, i32 0, i32 3
  %10 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %9, align 8
  store %struct.splay_tree_node_s* %10, %struct.splay_tree_node_s** %7, align 8
  %11 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %5, align 8
  %12 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %6, align 8
  %13 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %12, i32 0, i32 3
  store %struct.splay_tree_node_s* %11, %struct.splay_tree_node_s** %13, align 8
  %14 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %7, align 8
  %15 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %5, align 8
  %16 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %15, i32 0, i32 2
  store %struct.splay_tree_node_s* %14, %struct.splay_tree_node_s** %16, align 8
  %17 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %6, align 8
  %18 = load %struct.splay_tree_node_s**, %struct.splay_tree_node_s*** %4, align 8
  store %struct.splay_tree_node_s* %17, %struct.splay_tree_node_s** %18, align 8
  ret void
}

; Function Attrs: noinline nounwind optnone uwtable
define internal void @rotate_right(%struct.splay_tree_node_s** %0, %struct.splay_tree_node_s* %1, %struct.splay_tree_node_s* %2) #0 {
  %4 = alloca %struct.splay_tree_node_s**, align 8
  %5 = alloca %struct.splay_tree_node_s*, align 8
  %6 = alloca %struct.splay_tree_node_s*, align 8
  %7 = alloca %struct.splay_tree_node_s*, align 8
  store %struct.splay_tree_node_s** %0, %struct.splay_tree_node_s*** %4, align 8
  store %struct.splay_tree_node_s* %1, %struct.splay_tree_node_s** %5, align 8
  store %struct.splay_tree_node_s* %2, %struct.splay_tree_node_s** %6, align 8
  store %struct.splay_tree_node_s* null, %struct.splay_tree_node_s** %7, align 8
  %8 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %6, align 8
  %9 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %8, i32 0, i32 2
  %10 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %9, align 8
  store %struct.splay_tree_node_s* %10, %struct.splay_tree_node_s** %7, align 8
  %11 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %5, align 8
  %12 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %6, align 8
  %13 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %12, i32 0, i32 2
  store %struct.splay_tree_node_s* %11, %struct.splay_tree_node_s** %13, align 8
  %14 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %7, align 8
  %15 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %5, align 8
  %16 = getelementptr inbounds %struct.splay_tree_node_s, %struct.splay_tree_node_s* %15, i32 0, i32 3
  store %struct.splay_tree_node_s* %14, %struct.splay_tree_node_s** %16, align 8
  %17 = load %struct.splay_tree_node_s*, %struct.splay_tree_node_s** %6, align 8
  %18 = load %struct.splay_tree_node_s**, %struct.splay_tree_node_s*** %4, align 8
  store %struct.splay_tree_node_s* %17, %struct.splay_tree_node_s** %18, align 8
  ret void
}

attributes #0 = { noinline nounwind optnone uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }

!llvm.module.flags = !{!0}
!llvm.ident = !{!1}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"Debian clang version 11.0.1-2"}
