text
stringlengths 2.5k
419k
|
---|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_108 = constant [43 x i32] %wide-string
@global_var_1b8 = constant [43 x i8] c"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\00"
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
ret i64 ptrtoint ([43 x i32]* @global_var_108 to i64), !insn.addr !1
}
define i64 @function_31() local_unnamed_addr {
dec_label_pc_31:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !2
%1 = load i64, i64* %0
%2 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE135_64b_badSink(), !insn.addr !2
%3 = add i64 %1, -8, !insn.addr !3
%4 = inttoptr i64 %3 to i64*, !insn.addr !3
%5 = load i64, i64* %4, align 8, !insn.addr !3
%6 = call i64 @__readfsqword(i64 40), !insn.addr !4
%7 = icmp eq i64 %5, %6, !insn.addr !4
store i64 0, i64* %rax.0.reg2mem, !insn.addr !5
br i1 %7, label %dec_label_pc_4b, label %dec_label_pc_46, !insn.addr !5
dec_label_pc_46: ; preds = %dec_label_pc_31
%8 = call i64 @__stack_chk_fail(), !insn.addr !6
store i64 %8, i64* %rax.0.reg2mem, !insn.addr !6
br label %dec_label_pc_4b, !insn.addr !6
dec_label_pc_4b: ; preds = %dec_label_pc_46, %dec_label_pc_31
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !7
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_4d:
%rax.0.reg2mem = alloca i64, !insn.addr !8
%stack_var_-24 = alloca i8*, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !9
store i8* getelementptr inbounds ([43 x i8], [43 x i8]* @global_var_1b8, i64 0, i64 0), i8** %stack_var_-24, align 8, !insn.addr !10
%1 = bitcast i8** %stack_var_-24 to i64*, !insn.addr !11
%2 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE135_64b_goodG2BSink(i64* nonnull %1), !insn.addr !11
%3 = call i64 @__readfsqword(i64 40), !insn.addr !12
%4 = icmp eq i64 %0, %3, !insn.addr !12
store i64 0, i64* %rax.0.reg2mem, !insn.addr !13
br i1 %4, label %dec_label_pc_98, label %dec_label_pc_93, !insn.addr !13
dec_label_pc_93: ; preds = %dec_label_pc_4d
%5 = call i64 @__stack_chk_fail(), !insn.addr !14
store i64 %5, i64* %rax.0.reg2mem, !insn.addr !14
br label %dec_label_pc_98, !insn.addr !14
dec_label_pc_98: ; preds = %dec_label_pc_93, %dec_label_pc_4d
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !15
}
define i64 @goodB2G() local_unnamed_addr {
dec_label_pc_9a:
%rax.0.reg2mem = alloca i64, !insn.addr !16
%stack_var_-24 = alloca i32*, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !17
store i32* getelementptr inbounds ([43 x i32], [43 x i32]* @global_var_108, i64 0, i64 0), i32** %stack_var_-24, align 8, !insn.addr !18
%1 = bitcast i32** %stack_var_-24 to i64*, !insn.addr !19
%2 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE135_64b_goodB2GSink(i64* nonnull %1), !insn.addr !19
%3 = call i64 @__readfsqword(i64 40), !insn.addr !20
%4 = icmp eq i64 %0, %3, !insn.addr !20
store i64 0, i64* %rax.0.reg2mem, !insn.addr !21
br i1 %4, label %dec_label_pc_e5, label %dec_label_pc_e0, !insn.addr !21
dec_label_pc_e0: ; preds = %dec_label_pc_9a
%5 = call i64 @__stack_chk_fail(), !insn.addr !22
store i64 %5, i64* %rax.0.reg2mem, !insn.addr !22
br label %dec_label_pc_e5, !insn.addr !22
dec_label_pc_e5: ; preds = %dec_label_pc_e0, %dec_label_pc_9a
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !23
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE135_64_good() local_unnamed_addr {
dec_label_pc_e7:
%0 = call i64 @goodG2B(), !insn.addr !24
%1 = call i64 @goodB2G(), !insn.addr !25
ret i64 %1, !insn.addr !26
}
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE135_64b_badSink() local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE135_64b_goodG2BSink(i64*) local_unnamed_addr
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE135_64b_goodB2GSink(i64*) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 8}
!1 = !{i64 31}
!2 = !{i64 49}
!3 = !{i64 55}
!4 = !{i64 59}
!5 = !{i64 68}
!6 = !{i64 70}
!7 = !{i64 76}
!8 = !{i64 77}
!9 = !{i64 85}
!10 = !{i64 115}
!11 = !{i64 126}
!12 = !{i64 136}
!13 = !{i64 145}
!14 = !{i64 147}
!15 = !{i64 153}
!16 = !{i64 154}
!17 = !{i64 162}
!18 = !{i64 192}
!19 = !{i64 203}
!20 = !{i64 213}
!21 = !{i64 222}
!22 = !{i64 224}
!23 = !{i64 230}
!24 = !{i64 240}
!25 = !{i64 250}
!26 = !{i64 257}
### Assistant: @.str = private unnamed_addr constant [43 x i32] [i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 0], align 4
@.str.1 = private unnamed_addr constant [43 x i8] c"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\00", align 1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE135_64_bad() #0 {
entry:
%data = alloca i8*, align 8
store i8* null, i8** %data, align 8
store i8* bitcast ([43 x i32]* @.str to i8*), i8** %data, align 8
%0 = bitcast i8** %data to i8*
call void @CWE121_Stack_Based_Buffer_Overflow__CWE135_64b_badSink(i8* %0)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE135_64b_badSink(i8*) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE135_64_good() #0 {
entry:
call void @goodG2B()
call void @goodB2G()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B() #0 {
entry:
%data = alloca i8*, align 8
store i8* null, i8** %data, align 8
store i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i8** %data, align 8
%0 = bitcast i8** %data to i8*
call void @CWE121_Stack_Based_Buffer_Overflow__CWE135_64b_goodG2BSink(i8* %0)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE135_64b_goodG2BSink(i8*) #1
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodB2G() #0 {
entry:
%data = alloca i8*, align 8
store i8* null, i8** %data, align 8
store i8* bitcast ([43 x i32]* @.str to i8*), i8** %data, align 8
%0 = bitcast i8** %data to i8*
call void @CWE121_Stack_Based_Buffer_Overflow__CWE135_64b_goodB2GSink(i8* %0)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE135_64b_goodB2GSink(i8*) #1
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" }
attributes #1 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_3a8 = local_unnamed_addr constant [11 x i32] %wide-string
@global_var_3b0 = local_unnamed_addr constant [9 x i32] %wide-string
@global_var_3b8 = local_unnamed_addr constant [7 x i32] %wide-string
@global_var_3c0 = local_unnamed_addr constant [5 x i32] %wide-string
@global_var_3c8 = local_unnamed_addr constant [3 x i32] %wide-string
@global_var_3d4 = constant [21 x i8] c"Benign, fixed string\00"
@global_var_4a8 = local_unnamed_addr global i32 0
@global_var_3d0 = local_unnamed_addr constant i32 0
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
ret i64 70, !insn.addr !1
}
define i64 @function_31() local_unnamed_addr {
dec_label_pc_31:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !2
%.pre-phi2.reg2mem = alloca i64*, !insn.addr !2
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = load i64, i64* %0
%4 = load i64, i64* %0
%5 = mul i64 %4, 16, !insn.addr !2
%6 = sub i64 %3, %5, !insn.addr !3
%7 = add i64 %6, 15, !insn.addr !4
%8 = and i64 %7, -16, !insn.addr !5
%9 = add i64 %2, -80, !insn.addr !6
%10 = inttoptr i64 %9 to i64*, !insn.addr !6
store i64 %8, i64* %10, align 8, !insn.addr !6
%11 = add i64 %6, -49, !insn.addr !7
%12 = and i64 %11, -16, !insn.addr !8
%13 = add i64 %2, -72, !insn.addr !9
%14 = inttoptr i64 %13 to i64*, !insn.addr !9
store i64 %12, i64* %14, align 8, !insn.addr !9
%15 = load i32, i32* @global_var_4a8, align 4, !insn.addr !10
%16 = icmp eq i32 %15, 5, !insn.addr !11
%17 = icmp eq i1 %16, false, !insn.addr !12
br i1 %17, label %dec_label_pc_31.dec_label_pc_9c_crit_edge, label %dec_label_pc_8a, !insn.addr !12
dec_label_pc_31.dec_label_pc_9c_crit_edge: ; preds = %dec_label_pc_31
%.pre = add i64 %2, -88, !insn.addr !13
%.pre1 = inttoptr i64 %.pre to i64*, !insn.addr !13
store i64* %.pre1, i64** %.pre-phi2.reg2mem
br label %dec_label_pc_9c
dec_label_pc_8a: ; preds = %dec_label_pc_31
%18 = load i64, i64* %10, align 8, !insn.addr !14
%19 = add i64 %2, -88
%20 = inttoptr i64 %19 to i64*
store i64 %18, i64* %20, align 8, !insn.addr !15
%21 = inttoptr i64 %18 to i32*, !insn.addr !16
store i32 0, i32* %21, align 4, !insn.addr !16
store i64* %20, i64** %.pre-phi2.reg2mem, !insn.addr !16
br label %dec_label_pc_9c, !insn.addr !16
dec_label_pc_9c: ; preds = %dec_label_pc_31.dec_label_pc_9c_crit_edge, %dec_label_pc_8a
%.pre-phi2.reload = load i64*, i64** %.pre-phi2.reg2mem
%22 = add i64 %2, -64, !insn.addr !17
%23 = inttoptr i64 %22 to i64*, !insn.addr !17
store i64 279172874305, i64* %23, align 8, !insn.addr !17
%24 = add i64 %2, -56, !insn.addr !18
%25 = inttoptr i64 %24 to i64*, !insn.addr !18
store i64 279172874305, i64* %25, align 8, !insn.addr !18
%26 = add i64 %2, -48, !insn.addr !19
%27 = inttoptr i64 %26 to i64*, !insn.addr !19
store i64 279172874305, i64* %27, align 8, !insn.addr !19
%28 = add i64 %2, -40, !insn.addr !20
%29 = inttoptr i64 %28 to i64*, !insn.addr !20
store i64 279172874305, i64* %29, align 8, !insn.addr !20
%30 = add i64 %2, -32, !insn.addr !21
%31 = inttoptr i64 %30 to i64*, !insn.addr !21
store i64 279172874305, i64* %31, align 8, !insn.addr !21
%32 = add i64 %2, -24, !insn.addr !22
%33 = inttoptr i64 %32 to i32*, !insn.addr !22
store i32 0, i32* %33, align 4, !insn.addr !22
%34 = call i64 @wcslen(i64 %22, i64 %1, i128 279172874305, i64 16), !insn.addr !23
%35 = mul i64 %34, 4, !insn.addr !24
%36 = add i64 %35, 4, !insn.addr !25
%37 = load i64, i64* %.pre-phi2.reload, align 8, !insn.addr !13
%38 = call i64 @memmove(i64 %37, i64 %22, i64 %36, i64 %22), !insn.addr !26
%39 = load i64, i64* %.pre-phi2.reload, align 8, !insn.addr !27
%40 = call i64 @printWLine(i64 %39), !insn.addr !28
%41 = add i64 %2, -8, !insn.addr !29
%42 = inttoptr i64 %41 to i64*, !insn.addr !29
%43 = load i64, i64* %42, align 8, !insn.addr !29
%44 = call i64 @__readfsqword(i64 40), !insn.addr !30
%45 = icmp eq i64 %43, %44, !insn.addr !30
store i64 0, i64* %rax.0.reg2mem, !insn.addr !31
br i1 %45, label %dec_label_pc_128, label %dec_label_pc_123, !insn.addr !31
dec_label_pc_123: ; preds = %dec_label_pc_9c
%46 = call i64 @__stack_chk_fail(), !insn.addr !32
store i64 %46, i64* %rax.0.reg2mem, !insn.addr !32
br label %dec_label_pc_128, !insn.addr !32
dec_label_pc_128: ; preds = %dec_label_pc_123, %dec_label_pc_9c
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !33
}
define i64 @goodG2B1() local_unnamed_addr {
dec_label_pc_12a:
%rax.0.reg2mem = alloca i64, !insn.addr !34
%stack_var_-96.0.reg2mem = alloca i64, !insn.addr !34
%stack_var_-72 = alloca i32*, align 8
%stack_var_-104 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !35
%1 = load i32, i32* @global_var_4a8, align 4, !insn.addr !36
%2 = icmp eq i32 %1, 5, !insn.addr !37
br i1 %2, label %dec_label_pc_1c2, label %dec_label_pc_1b4, !insn.addr !38
dec_label_pc_1b4: ; preds = %dec_label_pc_12a
%3 = call i64 @printLine(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @global_var_3d4, i64 0, i64 0), i64 16, i128 10, i64 16), !insn.addr !39
br label %dec_label_pc_1d4, !insn.addr !40
dec_label_pc_1c2: ; preds = %dec_label_pc_12a
%4 = ptrtoint i64* %stack_var_-104 to i64, !insn.addr !41
%5 = add i64 %4, -113, !insn.addr !42
%6 = and i64 %5, -16, !insn.addr !43
%7 = inttoptr i64 %6 to i32*, !insn.addr !44
store i32 0, i32* %7, align 16, !insn.addr !45
store i64 %6, i64* %stack_var_-96.0.reg2mem, !insn.addr !45
br label %dec_label_pc_1d4, !insn.addr !45
dec_label_pc_1d4: ; preds = %dec_label_pc_1c2, %dec_label_pc_1b4
%stack_var_-96.0.reload = load i64, i64* %stack_var_-96.0.reg2mem
store i32* inttoptr (i64 279172874305 to i32*), i32** %stack_var_-72, align 8, !insn.addr !46
%8 = ptrtoint i32** %stack_var_-72 to i64, !insn.addr !47
%9 = call i64 @wcslen(i64 %8, i64 16, i128 279172874305, i64 16), !insn.addr !48
%10 = mul i64 %9, 4, !insn.addr !49
%11 = add i64 %10, 4, !insn.addr !50
%12 = call i64 @memmove(i64 %stack_var_-96.0.reload, i64 %8, i64 %11, i64 %8), !insn.addr !51
%13 = call i64 @printWLine(i64 %stack_var_-96.0.reload), !insn.addr !52
%14 = call i64 @__readfsqword(i64 40), !insn.addr !53
%15 = icmp eq i64 %0, %14, !insn.addr !53
store i64 0, i64* %rax.0.reg2mem, !insn.addr !54
br i1 %15, label %dec_label_pc_260, label %dec_label_pc_25b, !insn.addr !54
dec_label_pc_25b: ; preds = %dec_label_pc_1d4
%16 = call i64 @__stack_chk_fail(), !insn.addr !55
store i64 %16, i64* %rax.0.reg2mem, !insn.addr !55
br label %dec_label_pc_260, !insn.addr !55
dec_label_pc_260: ; preds = %dec_label_pc_25b, %dec_label_pc_1d4
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !56
}
define i64 @goodG2B2() local_unnamed_addr {
dec_label_pc_262:
%rax.0.reg2mem = alloca i64, !insn.addr !57
%stack_var_-96.0.reg2mem = alloca i64, !insn.addr !57
%stack_var_-72 = alloca i32*, align 8
%stack_var_-104 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !58
%1 = load i32, i32* @global_var_4a8, align 4, !insn.addr !59
%2 = icmp eq i32 %1, 5, !insn.addr !60
%3 = icmp eq i1 %2, false, !insn.addr !61
br i1 %3, label %dec_label_pc_2fe, label %dec_label_pc_2ec, !insn.addr !61
dec_label_pc_2ec: ; preds = %dec_label_pc_262
%4 = ptrtoint i64* %stack_var_-104 to i64, !insn.addr !62
%5 = add i64 %4, -113, !insn.addr !63
%6 = and i64 %5, -16, !insn.addr !64
%7 = inttoptr i64 %6 to i32*, !insn.addr !65
store i32 0, i32* %7, align 16, !insn.addr !66
store i64 %6, i64* %stack_var_-96.0.reg2mem, !insn.addr !66
br label %dec_label_pc_2fe, !insn.addr !66
dec_label_pc_2fe: ; preds = %dec_label_pc_2ec, %dec_label_pc_262
%stack_var_-96.0.reload = load i64, i64* %stack_var_-96.0.reg2mem
store i32* inttoptr (i64 279172874305 to i32*), i32** %stack_var_-72, align 8, !insn.addr !67
%8 = ptrtoint i32** %stack_var_-72 to i64, !insn.addr !68
%9 = call i64 @wcslen(i64 %8, i64 16, i128 279172874305, i64 16), !insn.addr !69
%10 = mul i64 %9, 4, !insn.addr !70
%11 = add i64 %10, 4, !insn.addr !71
%12 = call i64 @memmove(i64 %stack_var_-96.0.reload, i64 %8, i64 %11, i64 %8), !insn.addr !72
%13 = call i64 @printWLine(i64 %stack_var_-96.0.reload), !insn.addr !73
%14 = call i64 @__readfsqword(i64 40), !insn.addr !74
%15 = icmp eq i64 %0, %14, !insn.addr !74
store i64 0, i64* %rax.0.reg2mem, !insn.addr !75
br i1 %15, label %dec_label_pc_38a, label %dec_label_pc_385, !insn.addr !75
dec_label_pc_385: ; preds = %dec_label_pc_2fe
%16 = call i64 @__stack_chk_fail(), !insn.addr !76
store i64 %16, i64* %rax.0.reg2mem, !insn.addr !76
br label %dec_label_pc_38a, !insn.addr !76
dec_label_pc_38a: ; preds = %dec_label_pc_385, %dec_label_pc_2fe
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !77
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memmove_14_good() local_unnamed_addr {
dec_label_pc_38c:
%0 = call i64 @goodG2B1(), !insn.addr !78
%1 = call i64 @goodG2B2(), !insn.addr !79
ret i64 %1, !insn.addr !80
}
declare i64 @wcslen(i64, i64, i128, i64) local_unnamed_addr
declare i64 @memmove(i64, i64, i64, i64) local_unnamed_addr
declare i64 @printWLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @printLine(i8*, i64, i128, i64) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 8}
!1 = !{i64 32}
!2 = !{i64 49}
!3 = !{i64 53}
!4 = !{i64 59}
!5 = !{i64 63}
!6 = !{i64 71}
!7 = !{i64 111}
!8 = !{i64 115}
!9 = !{i64 123}
!10 = !{i64 127}
!11 = !{i64 133}
!12 = !{i64 136}
!13 = !{i64 248}
!14 = !{i64 138}
!15 = !{i64 142}
!16 = !{i64 150}
!17 = !{i64 170}
!18 = !{i64 174}
!19 = !{i64 192}
!20 = !{i64 196}
!21 = !{i64 207}
!22 = !{i64 217}
!23 = !{i64 227}
!24 = !{i64 232}
!25 = !{i64 236}
!26 = !{i64 258}
!27 = !{i64 263}
!28 = !{i64 270}
!29 = !{i64 276}
!30 = !{i64 280}
!31 = !{i64 289}
!32 = !{i64 291}
!33 = !{i64 297}
!34 = !{i64 298}
!35 = !{i64 306}
!36 = !{i64 425}
!37 = !{i64 431}
!38 = !{i64 434}
!39 = !{i64 443}
!40 = !{i64 448}
!41 = !{i64 302}
!42 = !{i64 409}
!43 = !{i64 413}
!44 = !{i64 421}
!45 = !{i64 462}
!46 = !{i64 482}
!47 = !{i64 536}
!48 = !{i64 539}
!49 = !{i64 544}
!50 = !{i64 548}
!51 = !{i64 570}
!52 = !{i64 582}
!53 = !{i64 592}
!54 = !{i64 601}
!55 = !{i64 603}
!56 = !{i64 609}
!57 = !{i64 610}
!58 = !{i64 618}
!59 = !{i64 737}
!60 = !{i64 743}
!61 = !{i64 746}
!62 = !{i64 614}
!63 = !{i64 721}
!64 = !{i64 725}
!65 = !{i64 733}
!66 = !{i64 760}
!67 = !{i64 780}
!68 = !{i64 834}
!69 = !{i64 837}
!70 = !{i64 842}
!71 = !{i64 846}
!72 = !{i64 868}
!73 = !{i64 880}
!74 = !{i64 890}
!75 = !{i64 899}
!76 = !{i64 901}
!77 = !{i64 907}
!78 = !{i64 917}
!79 = !{i64 927}
!80 = !{i64 934}
### Assistant: @globalFive = external dso_local global i32, align 4
@__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memmove_14_bad.source = private unnamed_addr constant [11 x i32] [i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 0], align 16
@.str = private unnamed_addr constant [21 x i8] c"Benign, fixed string\00", align 1
@__const.goodG2B1.source = private unnamed_addr constant [11 x i32] [i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 0], align 16
@__const.goodG2B2.source = private unnamed_addr constant [11 x i32] [i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 0], align 16
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memmove_14_bad() #0 {
entry:
%data = alloca i32*, align 8
%dataBadBuffer = alloca i32*, align 8
%dataGoodBuffer = alloca i32*, align 8
%source = alloca [11 x i32], align 16
%0 = alloca i8, i64 40, align 16
%1 = bitcast i8* %0 to i32*
store i32* %1, i32** %dataBadBuffer, align 8
%2 = alloca i8, i64 44, align 16
%3 = bitcast i8* %2 to i32*
store i32* %3, i32** %dataGoodBuffer, align 8
%4 = load i32, i32* @globalFive, align 4
%cmp = icmp eq i32 %4, 5
br i1 %cmp, label %if.then, label %if.end
if.then: ; preds = %entry
%5 = load i32*, i32** %dataBadBuffer, align 8
store i32* %5, i32** %data, align 8
%6 = load i32*, i32** %data, align 8
%arrayidx = getelementptr inbounds i32, i32* %6, i64 0
store i32 0, i32* %arrayidx, align 4
br label %if.end
if.end: ; preds = %if.then, %entry
%7 = bitcast [11 x i32]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 %7, i8* align 16 bitcast ([11 x i32]* @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memmove_14_bad.source to i8*), i64 44, i1 false)
%8 = load i32*, i32** %data, align 8
%9 = bitcast i32* %8 to i8*
%arraydecay = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%10 = bitcast i32* %arraydecay to i8*
%arraydecay1 = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%call = call i64 @wcslen(i32* %arraydecay1) #4
%add = add i64 %call, 1
%mul = mul i64 %add, 4
call void @llvm.memmove.p0i8.p0i8.i64(i8* align 4 %9, i8* align 16 %10, i64 %mul, i1 false)
%11 = load i32*, i32** %data, align 8
call void @printWLine(i32* %11)
ret void
}
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #1
; Function Attrs: nounwind readonly
declare dso_local i64 @wcslen(i32*) #2
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memmove.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i1 immarg) #1
declare dso_local void @printWLine(i32*) #3
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memmove_14_good() #0 {
entry:
call void @goodG2B1()
call void @goodG2B2()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B1() #0 {
entry:
%data = alloca i32*, align 8
%dataBadBuffer = alloca i32*, align 8
%dataGoodBuffer = alloca i32*, align 8
%source = alloca [11 x i32], align 16
%0 = alloca i8, i64 40, align 16
%1 = bitcast i8* %0 to i32*
store i32* %1, i32** %dataBadBuffer, align 8
%2 = alloca i8, i64 44, align 16
%3 = bitcast i8* %2 to i32*
store i32* %3, i32** %dataGoodBuffer, align 8
%4 = load i32, i32* @globalFive, align 4
%cmp = icmp ne i32 %4, 5
br i1 %cmp, label %if.then, label %if.else
if.then: ; preds = %entry
call void @printLine(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
br label %if.end
if.else: ; preds = %entry
%5 = load i32*, i32** %dataGoodBuffer, align 8
store i32* %5, i32** %data, align 8
%6 = load i32*, i32** %data, align 8
%arrayidx = getelementptr inbounds i32, i32* %6, i64 0
store i32 0, i32* %arrayidx, align 4
br label %if.end
if.end: ; preds = %if.else, %if.then
%7 = bitcast [11 x i32]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 %7, i8* align 16 bitcast ([11 x i32]* @__const.goodG2B1.source to i8*), i64 44, i1 false)
%8 = load i32*, i32** %data, align 8
%9 = bitcast i32* %8 to i8*
%arraydecay = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%10 = bitcast i32* %arraydecay to i8*
%arraydecay1 = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%call = call i64 @wcslen(i32* %arraydecay1) #4
%add = add i64 %call, 1
%mul = mul i64 %add, 4
call void @llvm.memmove.p0i8.p0i8.i64(i8* align 4 %9, i8* align 16 %10, i64 %mul, i1 false)
%11 = load i32*, i32** %data, align 8
call void @printWLine(i32* %11)
ret void
}
declare dso_local void @printLine(i8*) #3
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B2() #0 {
entry:
%data = alloca i32*, align 8
%dataBadBuffer = alloca i32*, align 8
%dataGoodBuffer = alloca i32*, align 8
%source = alloca [11 x i32], align 16
%0 = alloca i8, i64 40, align 16
%1 = bitcast i8* %0 to i32*
store i32* %1, i32** %dataBadBuffer, align 8
%2 = alloca i8, i64 44, align 16
%3 = bitcast i8* %2 to i32*
store i32* %3, i32** %dataGoodBuffer, align 8
%4 = load i32, i32* @globalFive, align 4
%cmp = icmp eq i32 %4, 5
br i1 %cmp, label %if.then, label %if.end
if.then: ; preds = %entry
%5 = load i32*, i32** %dataGoodBuffer, align 8
store i32* %5, i32** %data, align 8
%6 = load i32*, i32** %data, align 8
%arrayidx = getelementptr inbounds i32, i32* %6, i64 0
store i32 0, i32* %arrayidx, align 4
br label %if.end
if.end: ; preds = %if.then, %entry
%7 = bitcast [11 x i32]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 %7, i8* align 16 bitcast ([11 x i32]* @__const.goodG2B2.source to i8*), i64 44, i1 false)
%8 = load i32*, i32** %data, align 8
%9 = bitcast i32* %8 to i8*
%arraydecay = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%10 = bitcast i32* %arraydecay to i8*
%arraydecay1 = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%call = call i64 @wcslen(i32* %arraydecay1) #4
%add = add i64 %call, 1
%mul = mul i64 %add, 4
call void @llvm.memmove.p0i8.p0i8.i64(i8* align 4 %9, i8* align 16 %10, i64 %mul, i1 false)
%11 = load i32*, i32** %data, align 8
call void @printWLine(i32* %11)
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" }
attributes #1 = { argmemonly nounwind willreturn }
attributes #2 = { nounwind readonly "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #3 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #4 = { nounwind readonly }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
define i64 @_GLOBAL_OFFSET_TABLE_.1(i64 %arg1) local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
ret i64 4702111234474983745, !insn.addr !1
}
define i64 @function_30() local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !2
%.lcssa.reg2mem = alloca i64, !insn.addr !2
%storemerge1.reg2mem = alloca i64, !insn.addr !2
%.reg2mem = alloca i64, !insn.addr !2
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = call i64 @strlen(i64 %2), !insn.addr !3
%4 = add i64 %1, -32, !insn.addr !4
%5 = inttoptr i64 %4 to i64*, !insn.addr !4
store i64 %3, i64* %5, align 8, !insn.addr !4
%6 = add i64 %1, -40, !insn.addr !5
%7 = inttoptr i64 %6 to i64*, !insn.addr !5
store i64 0, i64* %7, align 8
%8 = load i64, i64* %5, align 8, !insn.addr !6
%9 = icmp eq i64 %8, -1, !insn.addr !7
%10 = add i64 %1, -56
%11 = inttoptr i64 %10 to i64*
%12 = load i64, i64* %11, align 8
store i64 %12, i64* %.lcssa.reg2mem, !insn.addr !8
br i1 %9, label %dec_label_pc_7b, label %dec_label_pc_4d.lr.ph, !insn.addr !8
dec_label_pc_4d.lr.ph: ; preds = %dec_label_pc_30
%13 = add i64 %1, -19, !insn.addr !9
store i64 %12, i64* %.reg2mem
store i64 0, i64* %storemerge1.reg2mem
br label %dec_label_pc_4d
dec_label_pc_4d: ; preds = %dec_label_pc_4d.lr.ph, %dec_label_pc_4d
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%.reload = load i64, i64* %.reg2mem
%14 = add i64 %storemerge1.reload, %.reload, !insn.addr !10
%15 = add i64 %13, %storemerge1.reload, !insn.addr !11
%16 = inttoptr i64 %15 to i8*, !insn.addr !12
%17 = load i8, i8* %16, align 1, !insn.addr !12
%18 = inttoptr i64 %14 to i8*, !insn.addr !13
store i8 %17, i8* %18, align 1, !insn.addr !13
%19 = load i64, i64* %7, align 8, !insn.addr !14
%20 = add i64 %19, 1, !insn.addr !14
store i64 %20, i64* %7, align 8
%21 = load i64, i64* %5, align 8, !insn.addr !6
%22 = add i64 %21, 1, !insn.addr !15
%23 = icmp ult i64 %20, %22, !insn.addr !7
%24 = load i64, i64* %11, align 8
store i64 %24, i64* %.reg2mem, !insn.addr !8
store i64 %20, i64* %storemerge1.reg2mem, !insn.addr !8
store i64 %24, i64* %.lcssa.reg2mem, !insn.addr !8
br i1 %23, label %dec_label_pc_4d, label %dec_label_pc_7b, !insn.addr !8
dec_label_pc_7b: ; preds = %dec_label_pc_4d, %dec_label_pc_30
%.lcssa.reload = load i64, i64* %.lcssa.reg2mem
%25 = call i64 @printLine(i64 %.lcssa.reload), !insn.addr !16
%26 = add i64 %1, -8, !insn.addr !17
%27 = inttoptr i64 %26 to i64*, !insn.addr !17
%28 = load i64, i64* %27, align 8, !insn.addr !17
%29 = call i64 @__readfsqword(i64 40), !insn.addr !18
%30 = icmp eq i64 %28, %29, !insn.addr !18
store i64 0, i64* %rax.0.reg2mem, !insn.addr !19
br i1 %30, label %dec_label_pc_9c, label %dec_label_pc_97, !insn.addr !19
dec_label_pc_97: ; preds = %dec_label_pc_7b
%31 = call i64 @__stack_chk_fail(), !insn.addr !20
store i64 %31, i64* %rax.0.reg2mem, !insn.addr !20
br label %dec_label_pc_9c, !insn.addr !20
dec_label_pc_9c: ; preds = %dec_label_pc_97, %dec_label_pc_7b
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !21
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_loop_53d_goodG2BSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_9e:
%rax.0.reg2mem = alloca i64, !insn.addr !22
%storemerge1.reg2mem = alloca i64, !insn.addr !22
%stack_var_-27 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !23
store i64 4702111234474983745, i64* %stack_var_-27, align 8, !insn.addr !24
%1 = ptrtoint i64* %stack_var_-27 to i64, !insn.addr !25
%2 = call i64 @strlen(i64 %1), !insn.addr !26
%3 = add i64 %2, 1, !insn.addr !27
%4 = icmp eq i64 %3, 0, !insn.addr !28
store i64 0, i64* %storemerge1.reg2mem, !insn.addr !29
br i1 %4, label %dec_label_pc_119, label %dec_label_pc_eb, !insn.addr !29
dec_label_pc_eb: ; preds = %dec_label_pc_9e, %dec_label_pc_eb
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%5 = add i64 %storemerge1.reload, %arg1, !insn.addr !30
%6 = add i64 %storemerge1.reload, %1, !insn.addr !31
%7 = inttoptr i64 %6 to i8*, !insn.addr !32
%8 = load i8, i8* %7, align 1, !insn.addr !32
%9 = inttoptr i64 %5 to i8*, !insn.addr !33
store i8 %8, i8* %9, align 1, !insn.addr !33
%10 = add nuw i64 %storemerge1.reload, 1, !insn.addr !34
%exitcond = icmp eq i64 %10, %3
store i64 %10, i64* %storemerge1.reg2mem, !insn.addr !29
br i1 %exitcond, label %dec_label_pc_119, label %dec_label_pc_eb, !insn.addr !29
dec_label_pc_119: ; preds = %dec_label_pc_eb, %dec_label_pc_9e
%11 = call i64 @printLine(i64 %arg1), !insn.addr !35
%12 = call i64 @__readfsqword(i64 40), !insn.addr !36
%13 = icmp eq i64 %0, %12, !insn.addr !36
store i64 0, i64* %rax.0.reg2mem, !insn.addr !37
br i1 %13, label %dec_label_pc_13a, label %dec_label_pc_135, !insn.addr !37
dec_label_pc_135: ; preds = %dec_label_pc_119
%14 = call i64 @__stack_chk_fail(), !insn.addr !38
store i64 %14, i64* %rax.0.reg2mem, !insn.addr !38
br label %dec_label_pc_13a, !insn.addr !38
dec_label_pc_13a: ; preds = %dec_label_pc_135, %dec_label_pc_119
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !39
}
declare i64 @strlen(i64) local_unnamed_addr
declare i64 @printLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 12}
!1 = !{i64 27}
!2 = !{i64 48}
!3 = !{i64 58}
!4 = !{i64 63}
!5 = !{i64 67}
!6 = !{i64 109}
!7 = !{i64 117}
!8 = !{i64 121}
!9 = !{i64 88}
!10 = !{i64 85}
!11 = !{i64 96}
!12 = !{i64 99}
!13 = !{i64 102}
!14 = !{i64 104}
!15 = !{i64 113}
!16 = !{i64 130}
!17 = !{i64 136}
!18 = !{i64 140}
!19 = !{i64 149}
!20 = !{i64 151}
!21 = !{i64 157}
!22 = !{i64 158}
!23 = !{i64 170}
!24 = !{i64 195}
!25 = !{i64 213}
!26 = !{i64 216}
!27 = !{i64 271}
!28 = !{i64 275}
!29 = !{i64 279}
!30 = !{i64 243}
!31 = !{i64 254}
!32 = !{i64 257}
!33 = !{i64 260}
!34 = !{i64 262}
!35 = !{i64 288}
!36 = !{i64 298}
!37 = !{i64 307}
!38 = !{i64 309}
!39 = !{i64 315}
### Assistant: @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_loop_53d_badSink.source = private unnamed_addr constant [11 x i8] c"AAAAAAAAAA\00", align 1
@__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_loop_53d_goodG2BSink.source = private unnamed_addr constant [11 x i8] c"AAAAAAAAAA\00", align 1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_loop_53d_badSink(i8* %data) #0 {
entry:
%data.addr = alloca i8*, align 8
%source = alloca [11 x i8], align 1
%i = alloca i64, align 8
%sourceLen = alloca i64, align 8
store i8* %data, i8** %data.addr, align 8
%0 = bitcast [11 x i8]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %0, i8* align 1 getelementptr inbounds ([11 x i8], [11 x i8]* @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_loop_53d_badSink.source, i32 0, i32 0), i64 11, i1 false)
%arraydecay = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%call = call i64 @strlen(i8* %arraydecay) #4
store i64 %call, i64* %sourceLen, align 8
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %entry
%1 = load i64, i64* %i, align 8
%2 = load i64, i64* %sourceLen, align 8
%add = add i64 %2, 1
%cmp = icmp ult i64 %1, %add
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%3 = load i64, i64* %i, align 8
%arrayidx = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 %3
%4 = load i8, i8* %arrayidx, align 1
%5 = load i8*, i8** %data.addr, align 8
%6 = load i64, i64* %i, align 8
%arrayidx1 = getelementptr inbounds i8, i8* %5, i64 %6
store i8 %4, i8* %arrayidx1, align 1
br label %for.inc
for.inc: ; preds = %for.body
%7 = load i64, i64* %i, align 8
%inc = add i64 %7, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%8 = load i8*, i8** %data.addr, align 8
call void @printLine(i8* %8)
ret void
}
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #1
; Function Attrs: nounwind readonly
declare dso_local i64 @strlen(i8*) #2
declare dso_local void @printLine(i8*) #3
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_loop_53d_goodG2BSink(i8* %data) #0 {
entry:
%data.addr = alloca i8*, align 8
%source = alloca [11 x i8], align 1
%i = alloca i64, align 8
%sourceLen = alloca i64, align 8
store i8* %data, i8** %data.addr, align 8
%0 = bitcast [11 x i8]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %0, i8* align 1 getelementptr inbounds ([11 x i8], [11 x i8]* @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_loop_53d_goodG2BSink.source, i32 0, i32 0), i64 11, i1 false)
%arraydecay = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%call = call i64 @strlen(i8* %arraydecay) #4
store i64 %call, i64* %sourceLen, align 8
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %entry
%1 = load i64, i64* %i, align 8
%2 = load i64, i64* %sourceLen, align 8
%add = add i64 %2, 1
%cmp = icmp ult i64 %1, %add
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%3 = load i64, i64* %i, align 8
%arrayidx = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 %3
%4 = load i8, i8* %arrayidx, align 1
%5 = load i8*, i8** %data.addr, align 8
%6 = load i64, i64* %i, align 8
%arrayidx1 = getelementptr inbounds i8, i8* %5, i64 %6
store i8 %4, i8* %arrayidx1, align 1
br label %for.inc
for.inc: ; preds = %for.body
%7 = load i64, i64* %i, align 8
%inc = add i64 %7, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%8 = load i8*, i8** %data.addr, align 8
call void @printLine(i8* %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" }
attributes #1 = { argmemonly nounwind willreturn }
attributes #2 = { nounwind readonly "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #3 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #4 = { nounwind readonly }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_2b0 = constant [32 x i8] c"ERROR: Array index is negative.\00"
@global_var_2d0 = constant [36 x i8] c"ERROR: Array index is out-of-bounds\00"
@0 = external global i32
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
%1 = call i64 @rand(), !insn.addr !1
%2 = urem i64 %1, 2, !insn.addr !2
ret i64 %2, !insn.addr !2
}
define i64 @function_30() local_unnamed_addr {
dec_label_pc_30:
%0 = call i64 @rand(), !insn.addr !3
%1 = call i64 @rand(), !insn.addr !4
%2 = call i64 @function_65(i64 ptrtoint (i32* @0 to i64), i64 ptrtoint (i32* @0 to i64)), !insn.addr !5
ret i64 %2, !insn.addr !5
}
define i64 @function_48() local_unnamed_addr {
dec_label_pc_48:
%0 = call i64 @rand(), !insn.addr !6
%1 = mul i64 %0, 1073741824, !insn.addr !7
%2 = call i64 @rand(), !insn.addr !8
%3 = mul i64 %2, 32768, !insn.addr !9
%4 = xor i64 %3, %1, !insn.addr !10
%5 = call i64 @rand(), !insn.addr !11
%6 = xor i64 %4, %5, !insn.addr !12
%7 = and i64 %6, 4294967295, !insn.addr !13
%8 = xor i64 %7, 4294967295, !insn.addr !13
ret i64 %8, !insn.addr !13
}
define i64 @function_65(i64 %arg1, i64 %arg2) local_unnamed_addr {
dec_label_pc_65:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !14
%storemerge1.reg2mem = alloca i32, !insn.addr !14
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = trunc i64 %2 to i32, !insn.addr !14
%4 = add i64 %1, -68, !insn.addr !14
%5 = inttoptr i64 %4 to i32*, !insn.addr !14
store i32 %3, i32* %5, align 4, !insn.addr !14
%6 = add i64 %1, -64, !insn.addr !15
%7 = inttoptr i64 %6 to i64*, !insn.addr !15
store i64 0, i64* %7, align 8, !insn.addr !15
%8 = add i64 %1, -56, !insn.addr !16
%9 = inttoptr i64 %8 to i64*, !insn.addr !16
store i64 0, i64* %9, align 8, !insn.addr !16
%10 = add i64 %1, -48, !insn.addr !17
%11 = inttoptr i64 %10 to i64*, !insn.addr !17
store i64 0, i64* %11, align 8, !insn.addr !17
%12 = add i64 %1, -40, !insn.addr !18
%13 = inttoptr i64 %12 to i64*, !insn.addr !18
store i64 0, i64* %13, align 8, !insn.addr !18
%14 = add i64 %1, -32, !insn.addr !19
%15 = inttoptr i64 %14 to i64*, !insn.addr !19
store i64 0, i64* %15, align 8, !insn.addr !19
%16 = load i32, i32* %5, align 4, !insn.addr !20
%17 = icmp slt i32 %16, 0, !insn.addr !20
br i1 %17, label %dec_label_pc_c8, label %dec_label_pc_96, !insn.addr !21
dec_label_pc_96: ; preds = %dec_label_pc_65
%18 = sext i32 %16 to i64, !insn.addr !22
%19 = mul i64 %18, 4, !insn.addr !23
%20 = add i64 %19, %6, !insn.addr !23
%21 = inttoptr i64 %20 to i32*, !insn.addr !23
store i32 1, i32* %21, align 4, !insn.addr !23
%22 = add i64 %1, -72, !insn.addr !24
%23 = inttoptr i64 %22 to i32*, !insn.addr !24
store i32 0, i32* %23, align 4
store i32 0, i32* %storemerge1.reg2mem
br label %dec_label_pc_ac
dec_label_pc_ac: ; preds = %dec_label_pc_96, %dec_label_pc_ac
%storemerge1.reload = load i32, i32* %storemerge1.reg2mem
%24 = sext i32 %storemerge1.reload to i64, !insn.addr !25
%25 = mul i64 %24, 4, !insn.addr !26
%26 = add i64 %25, %6, !insn.addr !26
%27 = inttoptr i64 %26 to i32*, !insn.addr !26
%28 = load i32, i32* %27, align 4, !insn.addr !26
%29 = zext i32 %28 to i64, !insn.addr !27
%30 = call i64 @printIntLine(i64 %29), !insn.addr !28
%31 = load i32, i32* %23, align 4, !insn.addr !29
%32 = add i32 %31, 1, !insn.addr !29
store i32 %32, i32* %23, align 4
%33 = icmp slt i32 %32, 10, !insn.addr !30
store i32 %32, i32* %storemerge1.reg2mem, !insn.addr !30
br i1 %33, label %dec_label_pc_ac, label %dec_label_pc_d4, !insn.addr !30
dec_label_pc_c8: ; preds = %dec_label_pc_65
%34 = call i64 @printLine(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @global_var_2b0, i64 0, i64 0)), !insn.addr !31
br label %dec_label_pc_d4, !insn.addr !31
dec_label_pc_d4: ; preds = %dec_label_pc_ac, %dec_label_pc_c8
%35 = add i64 %1, -24, !insn.addr !32
%36 = inttoptr i64 %35 to i64*, !insn.addr !32
%37 = load i64, i64* %36, align 8, !insn.addr !32
%38 = call i64 @__readfsqword(i64 40), !insn.addr !33
%39 = icmp eq i64 %37, %38, !insn.addr !33
store i64 0, i64* %rax.0.reg2mem, !insn.addr !34
br i1 %39, label %dec_label_pc_e9, label %dec_label_pc_e4, !insn.addr !34
dec_label_pc_e4: ; preds = %dec_label_pc_d4
%40 = call i64 @__stack_chk_fail(), !insn.addr !35
store i64 %40, i64* %rax.0.reg2mem, !insn.addr !35
br label %dec_label_pc_e9, !insn.addr !35
dec_label_pc_e9: ; preds = %dec_label_pc_e4, %dec_label_pc_d4
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !36
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_f0:
%rax.0.reg2mem = alloca i64, !insn.addr !37
%indvars.iv.reg2mem = alloca i64, !insn.addr !37
%stack_var_-8 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !38
%1 = call i64 @__readfsqword(i64 40), !insn.addr !39
%2 = add i64 %0, -20, !insn.addr !40
%3 = inttoptr i64 %2 to i32*, !insn.addr !40
store i32 1, i32* %3, align 4, !insn.addr !40
%4 = add i64 %0, -48, !insn.addr !41
store i64 0, i64* %indvars.iv.reg2mem
br label %dec_label_pc_159
dec_label_pc_159: ; preds = %dec_label_pc_159, %dec_label_pc_f0
%indvars.iv.reload = load i64, i64* %indvars.iv.reg2mem
%5 = mul i64 %indvars.iv.reload, 4, !insn.addr !41
%6 = add i64 %4, %5, !insn.addr !41
%7 = inttoptr i64 %6 to i32*, !insn.addr !41
%8 = load i32, i32* %7, align 4, !insn.addr !41
%9 = zext i32 %8 to i64, !insn.addr !42
%10 = call i64 @printIntLine(i64 %9), !insn.addr !43
%indvars.iv.next = add nuw nsw i64 %indvars.iv.reload, 1
%exitcond = icmp eq i64 %indvars.iv.next, 10
store i64 %indvars.iv.next, i64* %indvars.iv.reg2mem, !insn.addr !44
br i1 %exitcond, label %dec_label_pc_181, label %dec_label_pc_159, !insn.addr !44
dec_label_pc_181: ; preds = %dec_label_pc_159
%11 = call i64 @__readfsqword(i64 40), !insn.addr !45
%12 = icmp eq i64 %1, %11, !insn.addr !45
store i64 0, i64* %rax.0.reg2mem, !insn.addr !46
br i1 %12, label %dec_label_pc_196, label %dec_label_pc_191, !insn.addr !46
dec_label_pc_191: ; preds = %dec_label_pc_181
%13 = call i64 @__stack_chk_fail(), !insn.addr !47
store i64 %13, i64* %rax.0.reg2mem, !insn.addr !47
br label %dec_label_pc_196, !insn.addr !47
dec_label_pc_196: ; preds = %dec_label_pc_191, %dec_label_pc_181
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !48
}
define i64 @goodB2G() local_unnamed_addr {
dec_label_pc_198:
%rax.0.reg2mem = alloca i64, !insn.addr !49
%indvars.iv.reg2mem = alloca i64, !insn.addr !49
%stack_var_-8 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !50
%1 = call i64 @rand(), !insn.addr !51
%2 = urem i64 %1, 2
%3 = icmp eq i64 %2, 0, !insn.addr !52
%4 = call i64 @rand()
%5 = mul i64 %4, 1073741824
%6 = call i64 @rand()
%7 = mul i64 %6, 32768
%8 = xor i64 %7, %5
%9 = call i64 @rand()
%10 = xor i64 %8, %9
%11 = xor i64 %10, 4294967295
%storemerge1 = select i1 %3, i64 %11, i64 %10
%12 = trunc i64 %storemerge1 to i32, !insn.addr !53
%13 = icmp ugt i32 %12, 9
br i1 %13, label %dec_label_pc_266, label %dec_label_pc_234, !insn.addr !54
dec_label_pc_234: ; preds = %dec_label_pc_198
%14 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !55
%sext = mul i64 %storemerge1, 4294967296
%15 = ashr exact i64 %sext, 30, !insn.addr !56
%16 = add i64 %14, -64, !insn.addr !56
%17 = add i64 %15, %16, !insn.addr !56
%18 = inttoptr i64 %17 to i32*, !insn.addr !56
store i32 1, i32* %18, align 4, !insn.addr !56
store i64 0, i64* %indvars.iv.reg2mem
br label %dec_label_pc_24a
dec_label_pc_24a: ; preds = %dec_label_pc_24a, %dec_label_pc_234
%indvars.iv.reload = load i64, i64* %indvars.iv.reg2mem
%19 = mul i64 %indvars.iv.reload, 4, !insn.addr !57
%20 = add i64 %19, %16, !insn.addr !57
%21 = inttoptr i64 %20 to i32*, !insn.addr !57
%22 = load i32, i32* %21, align 4, !insn.addr !57
%23 = zext i32 %22 to i64, !insn.addr !58
%24 = call i64 @printIntLine(i64 %23), !insn.addr !59
%indvars.iv.next = add nuw nsw i64 %indvars.iv.reload, 1
%exitcond = icmp eq i64 %indvars.iv.next, 10
store i64 %indvars.iv.next, i64* %indvars.iv.reg2mem, !insn.addr !60
br i1 %exitcond, label %dec_label_pc_272, label %dec_label_pc_24a, !insn.addr !60
dec_label_pc_266: ; preds = %dec_label_pc_198
%25 = call i64 @printLine(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @global_var_2d0, i64 0, i64 0)), !insn.addr !61
br label %dec_label_pc_272, !insn.addr !61
dec_label_pc_272: ; preds = %dec_label_pc_24a, %dec_label_pc_266
%26 = call i64 @__readfsqword(i64 40), !insn.addr !62
%27 = icmp eq i64 %0, %26, !insn.addr !62
store i64 0, i64* %rax.0.reg2mem, !insn.addr !63
br i1 %27, label %dec_label_pc_287, label %dec_label_pc_282, !insn.addr !63
dec_label_pc_282: ; preds = %dec_label_pc_272
%28 = call i64 @__stack_chk_fail(), !insn.addr !64
store i64 %28, i64* %rax.0.reg2mem, !insn.addr !64
br label %dec_label_pc_287, !insn.addr !64
dec_label_pc_287: ; preds = %dec_label_pc_282, %dec_label_pc_272
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !65
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_rand_01_good() local_unnamed_addr {
dec_label_pc_28e:
%0 = call i64 @goodG2B(), !insn.addr !66
%1 = call i64 @goodB2G(), !insn.addr !67
ret i64 %1, !insn.addr !68
}
declare i64 @rand() local_unnamed_addr
declare i64 @printIntLine(i64) local_unnamed_addr
declare i64 @printLine(i8*) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 9}
!1 = !{i64 31}
!2 = !{i64 36}
!3 = !{i64 53}
!4 = !{i64 63}
!5 = !{i64 70}
!6 = !{i64 72}
!7 = !{i64 77}
!8 = !{i64 82}
!9 = !{i64 87}
!10 = !{i64 90}
!11 = !{i64 92}
!12 = !{i64 97}
!13 = !{i64 99}
!14 = !{i64 101}
!15 = !{i64 104}
!16 = !{i64 112}
!17 = !{i64 120}
!18 = !{i64 128}
!19 = !{i64 136}
!20 = !{i64 144}
!21 = !{i64 148}
!22 = !{i64 153}
!23 = !{i64 155}
!24 = !{i64 163}
!25 = !{i64 175}
!26 = !{i64 177}
!27 = !{i64 181}
!28 = !{i64 183}
!29 = !{i64 188}
!30 = !{i64 196}
!31 = !{i64 207}
!32 = !{i64 213}
!33 = !{i64 217}
!34 = !{i64 226}
!35 = !{i64 228}
!36 = !{i64 239}
!37 = !{i64 240}
!38 = !{i64 241}
!39 = !{i64 248}
!40 = !{i64 328}
!41 = !{i64 350}
!42 = !{i64 354}
!43 = !{i64 356}
!44 = !{i64 369}
!45 = !{i64 390}
!46 = !{i64 399}
!47 = !{i64 401}
!48 = !{i64 407}
!49 = !{i64 408}
!50 = !{i64 417}
!51 = !{i64 439}
!52 = !{i64 447}
!53 = !{i64 509}
!54 = !{i64 556}
!55 = !{i64 409}
!56 = !{i64 569}
!57 = !{i64 591}
!58 = !{i64 595}
!59 = !{i64 597}
!60 = !{i64 610}
!61 = !{i64 621}
!62 = !{i64 631}
!63 = !{i64 640}
!64 = !{i64 642}
!65 = !{i64 653}
!66 = !{i64 663}
!67 = !{i64 673}
!68 = !{i64 680}
### Assistant: @.str = private unnamed_addr constant [32 x i8] c"ERROR: Array index is negative.\00", align 1
@.str.1 = private unnamed_addr constant [36 x i8] c"ERROR: Array index is out-of-bounds\00", align 1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE129_rand_01_bad() #0 {
entry:
%data = alloca i32, align 4
%i = alloca i32, align 4
%buffer = alloca [10 x i32], align 16
store i32 -1, i32* %data, align 4
%call = call i32 @rand() #4
%and = and i32 %call, 1
%tobool = icmp ne i32 %and, 0
br i1 %tobool, label %cond.true, label %cond.false
cond.true: ; preds = %entry
%call1 = call i32 @rand() #4
%shl = shl i32 %call1, 30
%call2 = call i32 @rand() #4
%shl3 = shl i32 %call2, 15
%xor = xor i32 %shl, %shl3
%call4 = call i32 @rand() #4
%xor5 = xor i32 %xor, %call4
br label %cond.end
cond.false: ; preds = %entry
%call6 = call i32 @rand() #4
%shl7 = shl i32 %call6, 30
%call8 = call i32 @rand() #4
%shl9 = shl i32 %call8, 15
%xor10 = xor i32 %shl7, %shl9
%call11 = call i32 @rand() #4
%xor12 = xor i32 %xor10, %call11
%sub = sub i32 0, %xor12
%sub13 = sub i32 %sub, 1
br label %cond.end
cond.end: ; preds = %cond.false, %cond.true
%cond = phi i32 [ %xor5, %cond.true ], [ %sub13, %cond.false ]
store i32 %cond, i32* %data, align 4
%0 = bitcast [10 x i32]* %buffer to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %0, i8 0, i64 40, i1 false)
%1 = load i32, i32* %data, align 4
%cmp = icmp sge i32 %1, 0
br i1 %cmp, label %if.then, label %if.else
if.then: ; preds = %cond.end
%2 = load i32, i32* %data, align 4
%idxprom = sext i32 %2 to i64
%arrayidx = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom
store i32 1, i32* %arrayidx, align 4
store i32 0, i32* %i, align 4
br label %for.cond
for.cond: ; preds = %for.inc, %if.then
%3 = load i32, i32* %i, align 4
%cmp14 = icmp slt i32 %3, 10
br i1 %cmp14, label %for.body, label %for.end
for.body: ; preds = %for.cond
%4 = load i32, i32* %i, align 4
%idxprom15 = sext i32 %4 to i64
%arrayidx16 = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom15
%5 = load i32, i32* %arrayidx16, align 4
call void @printIntLine(i32 %5)
br label %for.inc
for.inc: ; preds = %for.body
%6 = load i32, i32* %i, align 4
%inc = add nsw i32 %6, 1
store i32 %inc, i32* %i, align 4
br label %for.cond
for.end: ; preds = %for.cond
br label %if.end
if.else: ; preds = %cond.end
call void @printLine(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %if.end
if.end: ; preds = %if.else, %for.end
ret void
}
; Function Attrs: nounwind
declare dso_local i32 @rand() #1
; Function Attrs: argmemonly nounwind willreturn writeonly
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #2
declare dso_local void @printIntLine(i32) #3
declare dso_local void @printLine(i8*) #3
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE129_rand_01_good() #0 {
entry:
call void @goodG2B()
call void @goodB2G()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B() #0 {
entry:
%data = alloca i32, align 4
%i = alloca i32, align 4
%buffer = alloca [10 x i32], align 16
store i32 -1, i32* %data, align 4
store i32 7, i32* %data, align 4
%0 = bitcast [10 x i32]* %buffer to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %0, i8 0, i64 40, i1 false)
%1 = load i32, i32* %data, align 4
%cmp = icmp sge i32 %1, 0
br i1 %cmp, label %if.then, label %if.else
if.then: ; preds = %entry
%2 = load i32, i32* %data, align 4
%idxprom = sext i32 %2 to i64
%arrayidx = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom
store i32 1, i32* %arrayidx, align 4
store i32 0, i32* %i, align 4
br label %for.cond
for.cond: ; preds = %for.inc, %if.then
%3 = load i32, i32* %i, align 4
%cmp1 = icmp slt i32 %3, 10
br i1 %cmp1, label %for.body, label %for.end
for.body: ; preds = %for.cond
%4 = load i32, i32* %i, align 4
%idxprom2 = sext i32 %4 to i64
%arrayidx3 = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom2
%5 = load i32, i32* %arrayidx3, align 4
call void @printIntLine(i32 %5)
br label %for.inc
for.inc: ; preds = %for.body
%6 = load i32, i32* %i, align 4
%inc = add nsw i32 %6, 1
store i32 %inc, i32* %i, align 4
br label %for.cond
for.end: ; preds = %for.cond
br label %if.end
if.else: ; preds = %entry
call void @printLine(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %if.end
if.end: ; preds = %if.else, %for.end
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodB2G() #0 {
entry:
%data = alloca i32, align 4
%i = alloca i32, align 4
%buffer = alloca [10 x i32], align 16
store i32 -1, i32* %data, align 4
%call = call i32 @rand() #4
%and = and i32 %call, 1
%tobool = icmp ne i32 %and, 0
br i1 %tobool, label %cond.true, label %cond.false
cond.true: ; preds = %entry
%call1 = call i32 @rand() #4
%shl = shl i32 %call1, 30
%call2 = call i32 @rand() #4
%shl3 = shl i32 %call2, 15
%xor = xor i32 %shl, %shl3
%call4 = call i32 @rand() #4
%xor5 = xor i32 %xor, %call4
br label %cond.end
cond.false: ; preds = %entry
%call6 = call i32 @rand() #4
%shl7 = shl i32 %call6, 30
%call8 = call i32 @rand() #4
%shl9 = shl i32 %call8, 15
%xor10 = xor i32 %shl7, %shl9
%call11 = call i32 @rand() #4
%xor12 = xor i32 %xor10, %call11
%sub = sub i32 0, %xor12
%sub13 = sub i32 %sub, 1
br label %cond.end
cond.end: ; preds = %cond.false, %cond.true
%cond = phi i32 [ %xor5, %cond.true ], [ %sub13, %cond.false ]
store i32 %cond, i32* %data, align 4
%0 = bitcast [10 x i32]* %buffer to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %0, i8 0, i64 40, i1 false)
%1 = load i32, i32* %data, align 4
%cmp = icmp sge i32 %1, 0
br i1 %cmp, label %land.lhs.true, label %if.else
land.lhs.true: ; preds = %cond.end
%2 = load i32, i32* %data, align 4
%cmp14 = icmp slt i32 %2, 10
br i1 %cmp14, label %if.then, label %if.else
if.then: ; preds = %land.lhs.true
%3 = load i32, i32* %data, align 4
%idxprom = sext i32 %3 to i64
%arrayidx = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom
store i32 1, i32* %arrayidx, align 4
store i32 0, i32* %i, align 4
br label %for.cond
for.cond: ; preds = %for.inc, %if.then
%4 = load i32, i32* %i, align 4
%cmp15 = icmp slt i32 %4, 10
br i1 %cmp15, label %for.body, label %for.end
for.body: ; preds = %for.cond
%5 = load i32, i32* %i, align 4
%idxprom16 = sext i32 %5 to i64
%arrayidx17 = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom16
%6 = load i32, i32* %arrayidx17, align 4
call void @printIntLine(i32 %6)
br label %for.inc
for.inc: ; preds = %for.body
%7 = load i32, i32* %i, align 4
%inc = add nsw i32 %7, 1
store i32 %inc, i32* %i, align 4
br label %for.cond
for.end: ; preds = %for.cond
br label %if.end
if.else: ; preds = %land.lhs.true, %cond.end
call void @printLine(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
br label %if.end
if.end: ; preds = %if.else, %for.end
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" }
attributes #1 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #2 = { argmemonly nounwind willreturn writeonly }
attributes #3 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_20 = local_unnamed_addr constant i64 74483322847331
@global_var_10 = constant [3 x i8] c"%(\00"
define i64 @_GLOBAL_OFFSET_TABLE_.1(i64 %arg1) local_unnamed_addr {
dec_label_pc_0:
%stack_var_-120 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
%1 = ptrtoint i64* %stack_var_-120 to i64, !insn.addr !1
ret i64 %1, !insn.addr !2
}
define i64 @function_30(i64 %arg1, i64 %arg2, i64 %arg3, i64 %arg4, i64 %arg5) local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !3
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = add i64 %2, -115, !insn.addr !4
%4 = inttoptr i64 %3 to i8*, !insn.addr !4
%5 = load i8, i8* %4, align 1, !insn.addr !4
%6 = trunc i64 %arg4 to i8, !insn.addr !4
%7 = add i8 %5, %6, !insn.addr !4
store i8 %7, i8* %4, align 1, !insn.addr !4
%8 = add i64 %1, -120, !insn.addr !5
%9 = inttoptr i64 %8 to i64*, !insn.addr !5
%10 = load i64, i64* %9, align 8, !insn.addr !5
%11 = call i64 @memmove(i64 %10, i64 %arg4, i64 100, i64 %arg4), !insn.addr !6
%12 = load i64, i64* %9, align 8, !insn.addr !7
%13 = add i64 %12, 99, !insn.addr !8
%14 = inttoptr i64 %13 to i8*, !insn.addr !9
store i8 0, i8* %14, align 1, !insn.addr !9
%15 = load i64, i64* %9, align 8, !insn.addr !10
%16 = call i64 @printLine(i64 %15), !insn.addr !11
%17 = add i64 %1, -8, !insn.addr !12
%18 = inttoptr i64 %17 to i64*, !insn.addr !12
%19 = load i64, i64* %18, align 8, !insn.addr !12
%20 = call i64 @__readfsqword(i64 40), !insn.addr !13
%21 = icmp eq i64 %19, %20, !insn.addr !13
store i64 0, i64* %rax.0.reg2mem, !insn.addr !14
br i1 %21, label %dec_label_pc_79, label %dec_label_pc_74, !insn.addr !14
dec_label_pc_74: ; preds = %dec_label_pc_30
%22 = call i64 @__stack_chk_fail(), !insn.addr !15
store i64 %22, i64* %rax.0.reg2mem, !insn.addr !15
br label %dec_label_pc_79, !insn.addr !15
dec_label_pc_79: ; preds = %dec_label_pc_74, %dec_label_pc_30
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !16
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_memmove_41_bad() local_unnamed_addr {
dec_label_pc_7b:
%rax.0.reg2mem = alloca i64, !insn.addr !17
%stack_var_-40 = alloca i8*, align 8
%0 = ptrtoint i8** %stack_var_-40 to i64, !insn.addr !18
%1 = call i64 @__readfsqword(i64 40), !insn.addr !19
%2 = add i64 %0, add (i64 sub (i64 0, i64 trunc (i128 mul (i128 sext (i64 trunc (i128 udiv (i128 zext (i64 add (i64 sub (i64 ptrtoint ([3 x i8]* @global_var_10 to i64), i64 1), i64 65) to i128), i128 zext (i64 ptrtoint ([3 x i8]* @global_var_10 to i64) to i128)) to i64) to i128), i128 ptrtoint ([3 x i8]* @global_var_10 to i128)) to i64)), i64 15), !insn.addr !20
%3 = and i64 %2, -16, !insn.addr !21
%4 = inttoptr i64 %3 to i8*, !insn.addr !22
store i8* %4, i8** %stack_var_-40, align 8, !insn.addr !22
store i8 0, i8* %4, align 16, !insn.addr !23
%5 = call i64 @_GLOBAL_OFFSET_TABLE_.1(i64 %3), !insn.addr !24
%6 = call i64 @__readfsqword(i64 40), !insn.addr !25
%7 = icmp eq i64 %1, %6, !insn.addr !25
store i64 0, i64* %rax.0.reg2mem, !insn.addr !26
br i1 %7, label %dec_label_pc_12a, label %dec_label_pc_125, !insn.addr !26
dec_label_pc_125: ; preds = %dec_label_pc_7b
%8 = call i64 @__stack_chk_fail(), !insn.addr !27
store i64 %8, i64* %rax.0.reg2mem, !insn.addr !27
br label %dec_label_pc_12a, !insn.addr !27
dec_label_pc_12a: ; preds = %dec_label_pc_125, %dec_label_pc_7b
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !28
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_memmove_41_goodG2BSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_12c:
%rax.0.reg2mem = alloca i64, !insn.addr !29
%stack_var_-120 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !30
%1 = call i64 @memset(i64* nonnull %stack_var_-120, i64 67, i64 99), !insn.addr !31
%2 = ptrtoint i64* %stack_var_-120 to i64, !insn.addr !32
%3 = call i64 @memmove(i64 %arg1, i64 %2, i64 100, i64 %2), !insn.addr !33
%4 = add i64 %arg1, 99, !insn.addr !34
%5 = inttoptr i64 %4 to i8*, !insn.addr !35
store i8 0, i8* %5, align 1, !insn.addr !35
%6 = call i64 @printLine(i64 %arg1), !insn.addr !36
%7 = call i64 @__readfsqword(i64 40), !insn.addr !37
%8 = icmp eq i64 %0, %7, !insn.addr !37
store i64 0, i64* %rax.0.reg2mem, !insn.addr !38
br i1 %8, label %dec_label_pc_1a5, label %dec_label_pc_1a0, !insn.addr !38
dec_label_pc_1a0: ; preds = %dec_label_pc_12c
%9 = call i64 @__stack_chk_fail(), !insn.addr !39
store i64 %9, i64* %rax.0.reg2mem, !insn.addr !39
br label %dec_label_pc_1a5, !insn.addr !39
dec_label_pc_1a5: ; preds = %dec_label_pc_1a0, %dec_label_pc_12c
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !40
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_1a7:
%rax.0.reg2mem = alloca i64, !insn.addr !41
%stack_var_-40 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-40 to i64, !insn.addr !42
%1 = call i64 @__readfsqword(i64 40), !insn.addr !43
%2 = sub i64 %0, trunc (i128 mul (i128 sext (i64 trunc (i128 udiv (i128 zext (i64 add (i64 sub (i64 ptrtoint ([3 x i8]* @global_var_10 to i64), i64 1), i64 65) to i128), i128 zext (i64 ptrtoint ([3 x i8]* @global_var_10 to i64) to i128)) to i64) to i128), i128 ptrtoint ([3 x i8]* @global_var_10 to i128)) to i64), !insn.addr !44
%3 = add i64 %2, 15, !insn.addr !45
%4 = and i64 %3, -16, !insn.addr !46
store i64 %4, i64* %stack_var_-40, align 8, !insn.addr !47
%5 = add i64 %2, add (i64 sub (i64 0, i64 trunc (i128 mul (i128 sext (i64 trunc (i128 udiv (i128 zext (i64 add (i64 sub (i64 ptrtoint ([3 x i8]* @global_var_10 to i64), i64 1), i64 115) to i128), i128 zext (i64 ptrtoint ([3 x i8]* @global_var_10 to i64) to i128)) to i64) to i128), i128 ptrtoint ([3 x i8]* @global_var_10 to i128)) to i64)), i64 15), !insn.addr !48
%6 = and i64 %5, -16, !insn.addr !49
%7 = inttoptr i64 %6 to i8*, !insn.addr !50
store i8 0, i8* %7, align 16, !insn.addr !50
%8 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_memmove_41_goodG2BSink(i64 %6), !insn.addr !51
%9 = call i64 @__readfsqword(i64 40), !insn.addr !52
%10 = icmp eq i64 %1, %9, !insn.addr !52
store i64 0, i64* %rax.0.reg2mem, !insn.addr !53
br i1 %10, label %dec_label_pc_256, label %dec_label_pc_251, !insn.addr !53
dec_label_pc_251: ; preds = %dec_label_pc_1a7
%11 = call i64 @__stack_chk_fail(), !insn.addr !54
store i64 %11, i64* %rax.0.reg2mem, !insn.addr !54
br label %dec_label_pc_256, !insn.addr !54
dec_label_pc_256: ; preds = %dec_label_pc_251, %dec_label_pc_1a7
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !55
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_memmove_41_good() local_unnamed_addr {
dec_label_pc_258:
%0 = call i64 @goodG2B(), !insn.addr !56
ret i64 %0, !insn.addr !57
}
declare i64 @memset(i64*, i64, i64) local_unnamed_addr
declare i64 @memmove(i64, i64, i64, i64) local_unnamed_addr
declare i64 @printLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 12}
!1 = !{i64 27}
!2 = !{i64 31}
!3 = !{i64 48}
!4 = !{i64 50}
!5 = !{i64 57}
!6 = !{i64 72}
!7 = !{i64 77}
!8 = !{i64 81}
!9 = !{i64 85}
!10 = !{i64 88}
!11 = !{i64 95}
!12 = !{i64 101}
!13 = !{i64 105}
!14 = !{i64 114}
!15 = !{i64 116}
!16 = !{i64 122}
!17 = !{i64 123}
!18 = !{i64 127}
!19 = !{i64 131}
!20 = !{i64 182}
!21 = !{i64 186}
!22 = !{i64 194}
!23 = !{i64 262}
!24 = !{i64 272}
!25 = !{i64 282}
!26 = !{i64 291}
!27 = !{i64 293}
!28 = !{i64 299}
!29 = !{i64 300}
!30 = !{i64 312}
!31 = !{i64 344}
!32 = !{i64 353}
!33 = !{i64 372}
!34 = !{i64 381}
!35 = !{i64 385}
!36 = !{i64 395}
!37 = !{i64 405}
!38 = !{i64 414}
!39 = !{i64 416}
!40 = !{i64 422}
!41 = !{i64 423}
!42 = !{i64 427}
!43 = !{i64 431}
!44 = !{i64 476}
!45 = !{i64 482}
!46 = !{i64 486}
!47 = !{i64 494}
!48 = !{i64 534}
!49 = !{i64 538}
!50 = !{i64 562}
!51 = !{i64 572}
!52 = !{i64 582}
!53 = !{i64 591}
!54 = !{i64 593}
!55 = !{i64 599}
!56 = !{i64 609}
!57 = !{i64 616}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_memmove_41_badSink(i8* %data) #0 {
entry:
%data.addr = alloca i8*, align 8
%source = alloca [100 x i8], align 16
store i8* %data, i8** %data.addr, align 8
%arraydecay = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
call void @llvm.memset.p0i8.i64(i8* align 16 %arraydecay, i8 67, i64 99, i1 false)
%arrayidx = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 99
store i8 0, i8* %arrayidx, align 1
%0 = load i8*, i8** %data.addr, align 8
%arraydecay1 = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
call void @llvm.memmove.p0i8.p0i8.i64(i8* align 1 %0, i8* align 16 %arraydecay1, i64 100, i1 false)
%1 = load i8*, i8** %data.addr, align 8
%arrayidx2 = getelementptr inbounds i8, i8* %1, i64 99
store i8 0, i8* %arrayidx2, align 1
%2 = load i8*, i8** %data.addr, align 8
call void @printLine(i8* %2)
ret void
}
; Function Attrs: argmemonly nounwind willreturn writeonly
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #1
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memmove.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i1 immarg) #2
declare dso_local void @printLine(i8*) #3
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_memmove_41_bad() #0 {
entry:
%data = alloca i8*, align 8
%dataBadBuffer = alloca i8*, align 8
%dataGoodBuffer = alloca i8*, align 8
%0 = alloca i8, i64 50, align 16
store i8* %0, i8** %dataBadBuffer, align 8
%1 = alloca i8, i64 100, align 16
store i8* %1, i8** %dataGoodBuffer, align 8
%2 = load i8*, i8** %dataBadBuffer, align 8
store i8* %2, i8** %data, align 8
%3 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %3, i64 0
store i8 0, i8* %arrayidx, align 1
%4 = load i8*, i8** %data, align 8
call void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_memmove_41_badSink(i8* %4)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_memmove_41_goodG2BSink(i8* %data) #0 {
entry:
%data.addr = alloca i8*, align 8
%source = alloca [100 x i8], align 16
store i8* %data, i8** %data.addr, align 8
%arraydecay = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
call void @llvm.memset.p0i8.i64(i8* align 16 %arraydecay, i8 67, i64 99, i1 false)
%arrayidx = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 99
store i8 0, i8* %arrayidx, align 1
%0 = load i8*, i8** %data.addr, align 8
%arraydecay1 = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
call void @llvm.memmove.p0i8.p0i8.i64(i8* align 1 %0, i8* align 16 %arraydecay1, i64 100, i1 false)
%1 = load i8*, i8** %data.addr, align 8
%arrayidx2 = getelementptr inbounds i8, i8* %1, i64 99
store i8 0, i8* %arrayidx2, align 1
%2 = load i8*, i8** %data.addr, align 8
call void @printLine(i8* %2)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_memmove_41_good() #0 {
entry:
call void @goodG2B()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B() #0 {
entry:
%data = alloca i8*, align 8
%dataBadBuffer = alloca i8*, align 8
%dataGoodBuffer = alloca i8*, align 8
%0 = alloca i8, i64 50, align 16
store i8* %0, i8** %dataBadBuffer, align 8
%1 = alloca i8, i64 100, align 16
store i8* %1, i8** %dataGoodBuffer, align 8
%2 = load i8*, i8** %dataGoodBuffer, align 8
store i8* %2, i8** %data, align 8
%3 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %3, i64 0
store i8 0, i8* %arrayidx, align 1
%4 = load i8*, i8** %data, align 8
call void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_memmove_41_goodG2BSink(i8* %4)
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" }
attributes #1 = { argmemonly nounwind willreturn writeonly }
attributes #2 = { argmemonly nounwind willreturn }
attributes #3 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_1ae = external constant i128
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
ret i64 ptrtoint (i128* @global_var_1ae to i64), !insn.addr !1
}
define i64 @function_30(i64 %arg1, i64 %arg2, i64 %arg3, i64 %arg4) local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !2
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = load i64, i64* %0
%4 = udiv i64 %3, %arg4
%5 = mul i64 %4, 16, !insn.addr !3
%6 = sub i64 %2, %5, !insn.addr !4
%7 = add i64 %6, 15, !insn.addr !5
%8 = and i64 %7, -16, !insn.addr !6
%9 = add i64 %1, -24, !insn.addr !7
%10 = inttoptr i64 %9 to i64*, !insn.addr !7
store i64 %8, i64* %10, align 8, !insn.addr !7
%11 = add i64 %6, -801, !insn.addr !8
%12 = and i64 %11, -16, !insn.addr !9
%13 = add i64 %1, -16, !insn.addr !10
%14 = inttoptr i64 %13 to i64*, !insn.addr !10
store i64 %12, i64* %14, align 8, !insn.addr !10
%15 = load i64, i64* %10, align 8, !insn.addr !11
%16 = add i64 %1, -32, !insn.addr !12
%17 = inttoptr i64 %16 to i64*, !insn.addr !12
store i64 %15, i64* %17, align 8, !insn.addr !12
%18 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_memcpy_64b_badSink(i64 %16, i64 16, i128 14), !insn.addr !13
%19 = add i64 %1, -8, !insn.addr !14
%20 = inttoptr i64 %19 to i64*, !insn.addr !14
%21 = load i64, i64* %20, align 8, !insn.addr !14
%22 = call i64 @__readfsqword(i64 40), !insn.addr !15
%23 = icmp eq i64 %21, %22, !insn.addr !15
store i64 0, i64* %rax.0.reg2mem, !insn.addr !16
br i1 %23, label %dec_label_pc_ac, label %dec_label_pc_a7, !insn.addr !16
dec_label_pc_a7: ; preds = %dec_label_pc_30
%24 = call i64 @__stack_chk_fail(), !insn.addr !17
store i64 %24, i64* %rax.0.reg2mem, !insn.addr !17
br label %dec_label_pc_ac, !insn.addr !17
dec_label_pc_ac: ; preds = %dec_label_pc_a7, %dec_label_pc_30
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !18
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_ae:
%rax.0.reg2mem = alloca i64, !insn.addr !19
%stack_var_-40 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-40 to i64, !insn.addr !20
%1 = call i64 @__readfsqword(i64 40), !insn.addr !21
%2 = add i64 %0, add (i64 sub (i64 0, i64 trunc (i128 mul (i128 sext (i64 trunc (i128 udiv (i128 zext (i64 ptrtoint (i128* @global_var_1ae to i64) to i128), i128 16) to i64) to i128), i128 16) to i64)), i64 -801), !insn.addr !22
%3 = and i64 %2, -16, !insn.addr !23
store i64 %3, i64* %stack_var_-40, align 8, !insn.addr !24
%4 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_memcpy_64b_goodG2BSink(i64* nonnull %stack_var_-40, i64 16, i128 14, i64 16), !insn.addr !25
%5 = call i64 @__readfsqword(i64 40), !insn.addr !26
%6 = icmp eq i64 %1, %5, !insn.addr !26
store i64 0, i64* %rax.0.reg2mem, !insn.addr !27
br i1 %6, label %dec_label_pc_15a, label %dec_label_pc_155, !insn.addr !27
dec_label_pc_155: ; preds = %dec_label_pc_ae
%7 = call i64 @__stack_chk_fail(), !insn.addr !28
store i64 %7, i64* %rax.0.reg2mem, !insn.addr !28
br label %dec_label_pc_15a, !insn.addr !28
dec_label_pc_15a: ; preds = %dec_label_pc_155, %dec_label_pc_ae
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !29
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_memcpy_64_good() local_unnamed_addr {
dec_label_pc_15c:
%0 = call i64 @goodG2B(), !insn.addr !30
ret i64 %0, !insn.addr !31
}
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_memcpy_64b_badSink(i64, i64, i128) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_memcpy_64b_goodG2BSink(i64*, i64, i128, i64) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 8}
!1 = !{i64 32}
!2 = !{i64 48}
!3 = !{i64 51}
!4 = !{i64 55}
!5 = !{i64 61}
!6 = !{i64 65}
!7 = !{i64 73}
!8 = !{i64 115}
!9 = !{i64 119}
!10 = !{i64 127}
!11 = !{i64 131}
!12 = !{i64 135}
!13 = !{i64 146}
!14 = !{i64 152}
!15 = !{i64 156}
!16 = !{i64 165}
!17 = !{i64 167}
!18 = !{i64 173}
!19 = !{i64 174}
!20 = !{i64 178}
!21 = !{i64 182}
!22 = !{i64 289}
!23 = !{i64 293}
!24 = !{i64 309}
!25 = !{i64 320}
!26 = !{i64 330}
!27 = !{i64 339}
!28 = !{i64 341}
!29 = !{i64 347}
!30 = !{i64 357}
!31 = !{i64 364}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_memcpy_64_bad() #0 {
entry:
%data = alloca i64*, align 8
%dataBadBuffer = alloca i64*, align 8
%dataGoodBuffer = alloca i64*, align 8
%0 = alloca i8, i64 400, align 16
%1 = bitcast i8* %0 to i64*
store i64* %1, i64** %dataBadBuffer, align 8
%2 = alloca i8, i64 800, align 16
%3 = bitcast i8* %2 to i64*
store i64* %3, i64** %dataGoodBuffer, align 8
%4 = load i64*, i64** %dataBadBuffer, align 8
store i64* %4, i64** %data, align 8
%5 = bitcast i64** %data to i8*
call void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_memcpy_64b_badSink(i8* %5)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_memcpy_64b_badSink(i8*) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_memcpy_64_good() #0 {
entry:
call void @goodG2B()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B() #0 {
entry:
%data = alloca i64*, align 8
%dataBadBuffer = alloca i64*, align 8
%dataGoodBuffer = alloca i64*, align 8
%0 = alloca i8, i64 400, align 16
%1 = bitcast i8* %0 to i64*
store i64* %1, i64** %dataBadBuffer, align 8
%2 = alloca i8, i64 800, align 16
%3 = bitcast i8* %2 to i64*
store i64* %3, i64** %dataGoodBuffer, align 8
%4 = load i64*, i64** %dataGoodBuffer, align 8
store i64* %4, i64** %data, align 8
%5 = bitcast i64** %data to i8*
call void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_memcpy_64b_goodG2BSink(i8* %5)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_memcpy_64b_goodG2BSink(i8*) #1
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" }
attributes #1 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_10 = constant [3 x i8] c"%(\00"
@0 = external global i32
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%stack_var_-904 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
%1 = ptrtoint i64* %stack_var_-904 to i64, !insn.addr !1
ret i64 %1, !insn.addr !2
}
define i64 @function_31(i64 %arg1, i64 %arg2) local_unnamed_addr {
dec_label_pc_31:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !3
%1 = load i64, i64* %0
%2 = add i64 %1, -904, !insn.addr !3
%3 = inttoptr i64 %2 to i64*, !insn.addr !3
%4 = add i64 %1, -896, !insn.addr !4
%5 = inttoptr i64 %4 to i64*, !insn.addr !5
%6 = inttoptr i64 %2 to i64**, !insn.addr !5
%7 = call i64 @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE9push_backERKS2_(i64* %5, i64** %6), !insn.addr !5
%8 = call i64 @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE9push_backERKS2_(i64* %5, i64** %6), !insn.addr !6
%9 = call i64 @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE9push_backERKS2_(i64* %5, i64** %6), !insn.addr !7
%10 = add i64 %1, -864, !insn.addr !8
%11 = inttoptr i64 %10 to i64*, !insn.addr !9
%12 = call i64 @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EEC1ERKS4_(i64* %11, i64* %5), !insn.addr !9
%13 = call i64 @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_loop_737badSinkENSt7__cxx114listIP14_twoIntsStructSaIS3_EEE(i64 %10), !insn.addr !10
%14 = call i64 @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EED1Ev(i64* %11), !insn.addr !11
%15 = call i64 @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EED1Ev(i64* %5), !insn.addr !12
%16 = add i64 %1, -24, !insn.addr !13
%17 = inttoptr i64 %16 to i64*, !insn.addr !13
%18 = load i64, i64* %17, align 8, !insn.addr !13
%19 = call i64 @__readfsqword(i64 40), !insn.addr !14
%20 = icmp eq i64 %18, %19, !insn.addr !14
store i64 0, i64* %rax.0.reg2mem, !insn.addr !15
br i1 %20, label %dec_label_pc_111, label %dec_label_pc_10c, !insn.addr !15
dec_label_pc_10c: ; preds = %dec_label_pc_31
%21 = call i64 @__stack_chk_fail(), !insn.addr !16
store i64 %21, i64* %rax.0.reg2mem, !insn.addr !16
br label %dec_label_pc_111, !insn.addr !16
dec_label_pc_111: ; preds = %dec_label_pc_10c, %dec_label_pc_31
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !17
}
define i64 @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_loop_73L7goodG2BEv() local_unnamed_addr {
dec_label_pc_11b:
%rax.0.reg2mem = alloca i64, !insn.addr !18
%stack_var_-872 = alloca i64, align 8
%stack_var_-912 = alloca i64, align 8
%stack_var_-840 = alloca i64, align 8
%stack_var_-904 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !19
%1 = call i64 @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EEC1Ev(i64* nonnull %stack_var_-904), !insn.addr !20
%2 = ptrtoint i64* %stack_var_-840 to i64, !insn.addr !21
store i64 %2, i64* %stack_var_-912, align 8, !insn.addr !21
%3 = bitcast i64* %stack_var_-912 to i64**, !insn.addr !22
%4 = call i64 @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE9push_backERKS2_(i64* nonnull %stack_var_-904, i64** nonnull %3), !insn.addr !22
%5 = call i64 @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE9push_backERKS2_(i64* nonnull %stack_var_-904, i64** nonnull %3), !insn.addr !23
%6 = call i64 @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE9push_backERKS2_(i64* nonnull %stack_var_-904, i64** nonnull %3), !insn.addr !24
%7 = call i64 @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EEC1ERKS4_(i64* nonnull %stack_var_-872, i64* nonnull %stack_var_-904), !insn.addr !25
%8 = ptrtoint i64* %stack_var_-872 to i64, !insn.addr !26
%9 = call i64 @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_loop_7311goodG2BSinkENSt7__cxx114listIP14_twoIntsStructSaIS3_EEE(i64 %8), !insn.addr !27
%10 = call i64 @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EED1Ev(i64* nonnull %stack_var_-872), !insn.addr !28
%11 = call i64 @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EED1Ev(i64* nonnull %stack_var_-904), !insn.addr !29
%12 = call i64 @__readfsqword(i64 40), !insn.addr !30
%13 = icmp eq i64 %0, %12, !insn.addr !30
store i64 0, i64* %rax.0.reg2mem, !insn.addr !31
br i1 %13, label %dec_label_pc_22c, label %dec_label_pc_227, !insn.addr !31
dec_label_pc_227: ; preds = %dec_label_pc_11b
%14 = call i64 @__stack_chk_fail(), !insn.addr !32
store i64 %14, i64* %rax.0.reg2mem, !insn.addr !32
br label %dec_label_pc_22c, !insn.addr !32
dec_label_pc_22c: ; preds = %dec_label_pc_227, %dec_label_pc_11b
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !33
}
define i64 @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_loop_734goodEv() local_unnamed_addr {
dec_label_pc_236:
%0 = call i64 @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_loop_73L7goodG2BEv(), !insn.addr !34
ret i64 %0, !insn.addr !35
}
define i64 @_ZnwmPv(i64 %arg1, i64* %arg2) local_unnamed_addr {
dec_label_pc_242:
%0 = ptrtoint i64* %arg2 to i64
ret i64 %0, !insn.addr !36
}
define i64 @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EED1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_256:
%0 = call i64 @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EED1Ev(i64* %result), !insn.addr !37
ret i64 %0, !insn.addr !38
}
define i64 @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EEC1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_2cc:
%0 = call i64 @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EEC1Ev(i64* %result), !insn.addr !39
ret i64 %0, !insn.addr !40
}
define i64 @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE10_List_implD1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_2e8:
%0 = call i64 @_ZNSaISt10_List_nodeIP14_twoIntsStructEED1Ev(i64* %result), !insn.addr !41
ret i64 %0, !insn.addr !42
}
define i64 @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EED1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_304:
%0 = call i64 @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE8_M_clearEv(i64* %result), !insn.addr !43
%1 = call i64 @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE10_List_implD1Ev(i64* %result), !insn.addr !44
ret i64 %1, !insn.addr !45
}
define i64 @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE9push_backERKS2_(i64* %result, i64** %arg2) local_unnamed_addr {
dec_label_pc_32c:
%0 = call i64 @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE3endEv(i64* %result), !insn.addr !46
%1 = ptrtoint i64** %arg2 to i64, !insn.addr !47
call void @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE9_M_insertIJRKS2_EEEvSt14_List_iteratorIS2_EDpOT_(i64* %result, i64 %0, i64 %1), !insn.addr !48
ret i64 ptrtoint (i32* @0 to i64), !insn.addr !49
}
define i64 @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EEC1ERKS4_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_362:
%rax.0.reg2mem = alloca i64, !insn.addr !50
%0 = ptrtoint i64* %result to i64
%stack_var_-33 = alloca i64, align 8
%1 = call i64 @__readfsqword(i64 40), !insn.addr !51
%2 = call i64 @_ZNKSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE21_M_get_Node_allocatorEv(i64* %arg2), !insn.addr !52
%3 = inttoptr i64 %2 to i64*, !insn.addr !53
%4 = call i64 @_ZN9__gnu_cxx14__alloc_traitsISaISt10_List_nodeIP14_twoIntsStructEEE17_S_select_on_copyERKS5_(i64* nonnull %stack_var_-33, i64* %3), !insn.addr !53
%5 = call i64 @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EEC1ERKSaISt10_List_nodeIS2_EE(i64* %result, i64* nonnull %stack_var_-33), !insn.addr !54
%6 = call i64 @_ZNSaISt10_List_nodeIP14_twoIntsStructEED1Ev(i64* nonnull %stack_var_-33), !insn.addr !55
%7 = call i64 @_ZNKSt7__cxx114listIP14_twoIntsStructSaIS2_EE3endEv(i64* %arg2), !insn.addr !56
%8 = call i64 @_ZNKSt7__cxx114listIP14_twoIntsStructSaIS2_EE5beginEv(i64* %arg2), !insn.addr !57
call void @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE22_M_initialize_dispatchISt20_List_const_iteratorIS2_EEEvT_S8_St12__false_type(i64 %0, i64 %8, i64 %7), !insn.addr !58
%9 = call i64 @__readfsqword(i64 40), !insn.addr !59
%10 = icmp eq i64 %1, %9, !insn.addr !59
store i64 0, i64* %rax.0.reg2mem, !insn.addr !60
br i1 %10, label %dec_label_pc_42c, label %dec_label_pc_427, !insn.addr !60
dec_label_pc_427: ; preds = %dec_label_pc_362
%11 = call i64 @__stack_chk_fail(), !insn.addr !61
store i64 %11, i64* %rax.0.reg2mem, !insn.addr !61
br label %dec_label_pc_42c, !insn.addr !61
dec_label_pc_42c: ; preds = %dec_label_pc_427, %dec_label_pc_362
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !62
}
define i64 @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EEC1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_436:
%0 = call i64 @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE10_List_implC1Ev(i64* %result), !insn.addr !63
%1 = call i64 @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE7_M_initEv(i64* %result), !insn.addr !64
ret i64 %1, !insn.addr !65
}
define i64 @_ZNSaISt10_List_nodeIP14_twoIntsStructEED1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_45e:
%0 = call i64 @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIP14_twoIntsStructEED1Ev(i64* %result), !insn.addr !66
ret i64 %0, !insn.addr !67
}
define i64 @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE8_M_clearEv(i64* %result) local_unnamed_addr {
dec_label_pc_4f1:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !68
}
define i64 @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE3endEv(i64* %result) local_unnamed_addr {
dec_label_pc_4f4:
%rax.0.reg2mem = alloca i64, !insn.addr !69
%stack_var_-24 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !70
%1 = call i64 @_ZNSt14_List_iteratorIP14_twoIntsStructEC1EPNSt8__detail15_List_node_baseE(i64* nonnull %stack_var_-24, i64* %result), !insn.addr !71
%2 = load i64, i64* %stack_var_-24, align 8, !insn.addr !72
%3 = call i64 @__readfsqword(i64 40), !insn.addr !73
%4 = icmp eq i64 %0, %3, !insn.addr !73
store i64 %2, i64* %rax.0.reg2mem, !insn.addr !74
br i1 %4, label %dec_label_pc_53a, label %dec_label_pc_535, !insn.addr !74
dec_label_pc_535: ; preds = %dec_label_pc_4f4
%5 = call i64 @__stack_chk_fail(), !insn.addr !75
store i64 %5, i64* %rax.0.reg2mem, !insn.addr !75
br label %dec_label_pc_53a, !insn.addr !75
dec_label_pc_53a: ; preds = %dec_label_pc_535, %dec_label_pc_4f4
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !76
}
define i64*** @_ZSt7forwardIRKP14_twoIntsStructEOT_RNSt16remove_referenceIS4_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_53c:
%0 = bitcast i64* %arg1 to i64***, !insn.addr !77
ret i64*** %0, !insn.addr !77
}
define void @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE9_M_insertIJRKS2_EEEvSt14_List_iteratorIS2_EDpOT_(i64* %result, i64 %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_54a:
%0 = inttoptr i64 %arg3 to i64*, !insn.addr !78
%1 = call i64*** @_ZSt7forwardIRKP14_twoIntsStructEOT_RNSt16remove_referenceIS4_E4typeE(i64* %0), !insn.addr !78
%2 = ptrtoint i64*** %1 to i64, !insn.addr !78
%3 = call i64* @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE14_M_create_nodeIJRKS2_EEEPSt10_List_nodeIS2_EDpOT_(i64* %result, i64 %2), !insn.addr !79
%4 = inttoptr i64 %arg2 to i64*, !insn.addr !80
%5 = call i64 @_ZNSt8__detail15_List_node_base7_M_hookEPS0_(i64* %3, i64* %4), !insn.addr !80
%6 = call i64 @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE11_M_inc_sizeEm(i64* %result, i64 1), !insn.addr !81
ret void, !insn.addr !82
}
define i64 @_ZN9__gnu_cxx14__alloc_traitsISaISt10_List_nodeIP14_twoIntsStructEEE17_S_select_on_copyERKS5_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_5a7:
%rax.0.reg2mem = alloca i64, !insn.addr !83
%0 = ptrtoint i64* %result to i64
%1 = call i64 @__readfsqword(i64 40), !insn.addr !84
%2 = call i64 @_ZNSt16allocator_traitsISaISt10_List_nodeIP14_twoIntsStructEEE37select_on_container_copy_constructionERKS4_(i64* %result, i64* %arg2), !insn.addr !85
%3 = call i64 @__readfsqword(i64 40), !insn.addr !86
%4 = icmp eq i64 %1, %3, !insn.addr !86
store i64 %0, i64* %rax.0.reg2mem, !insn.addr !87
br i1 %4, label %dec_label_pc_5f1, label %dec_label_pc_5ec, !insn.addr !87
dec_label_pc_5ec: ; preds = %dec_label_pc_5a7
%5 = call i64 @__stack_chk_fail(), !insn.addr !88
store i64 %5, i64* %rax.0.reg2mem, !insn.addr !88
br label %dec_label_pc_5f1, !insn.addr !88
dec_label_pc_5f1: ; preds = %dec_label_pc_5ec, %dec_label_pc_5a7
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !89
}
define i64 @_ZNKSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE21_M_get_Node_allocatorEv(i64* %result) local_unnamed_addr {
dec_label_pc_5f4:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !90
}
define i64 @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EEC1ERKSaISt10_List_nodeIS2_EE(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_602:
%0 = call i64 @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE10_List_implC1ERKSaISt10_List_nodeIS2_EE(i64* %result, i64* %arg2), !insn.addr !91
%1 = call i64 @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE7_M_initEv(i64* %result), !insn.addr !92
ret i64 %1, !insn.addr !93
}
define i64 @_ZNKSt7__cxx114listIP14_twoIntsStructSaIS2_EE5beginEv(i64* %result) local_unnamed_addr {
dec_label_pc_634:
%rax.0.reg2mem = alloca i64, !insn.addr !94
%stack_var_-24 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !95
%1 = call i64 @_ZNSt20_List_const_iteratorIP14_twoIntsStructEC1EPKNSt8__detail15_List_node_baseE(i64* nonnull %stack_var_-24, i64* %result), !insn.addr !96
%2 = load i64, i64* %stack_var_-24, align 8, !insn.addr !97
%3 = call i64 @__readfsqword(i64 40), !insn.addr !98
%4 = icmp eq i64 %0, %3, !insn.addr !98
store i64 %2, i64* %rax.0.reg2mem, !insn.addr !99
br i1 %4, label %dec_label_pc_67d, label %dec_label_pc_678, !insn.addr !99
dec_label_pc_678: ; preds = %dec_label_pc_634
%5 = call i64 @__stack_chk_fail(), !insn.addr !100
store i64 %5, i64* %rax.0.reg2mem, !insn.addr !100
br label %dec_label_pc_67d, !insn.addr !100
dec_label_pc_67d: ; preds = %dec_label_pc_678, %dec_label_pc_634
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !101
}
define i64 @_ZNKSt7__cxx114listIP14_twoIntsStructSaIS2_EE3endEv(i64* %result) local_unnamed_addr {
dec_label_pc_680:
%rax.0.reg2mem = alloca i64, !insn.addr !102
%stack_var_-24 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !103
%1 = call i64 @_ZNSt20_List_const_iteratorIP14_twoIntsStructEC1EPKNSt8__detail15_List_node_baseE(i64* nonnull %stack_var_-24, i64* %result), !insn.addr !104
%2 = load i64, i64* %stack_var_-24, align 8, !insn.addr !105
%3 = call i64 @__readfsqword(i64 40), !insn.addr !106
%4 = icmp eq i64 %0, %3, !insn.addr !106
store i64 %2, i64* %rax.0.reg2mem, !insn.addr !107
br i1 %4, label %dec_label_pc_6c6, label %dec_label_pc_6c1, !insn.addr !107
dec_label_pc_6c1: ; preds = %dec_label_pc_680
%5 = call i64 @__stack_chk_fail(), !insn.addr !108
store i64 %5, i64* %rax.0.reg2mem, !insn.addr !108
br label %dec_label_pc_6c6, !insn.addr !108
dec_label_pc_6c6: ; preds = %dec_label_pc_6c1, %dec_label_pc_680
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !109
}
define void @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE22_M_initialize_dispatchISt20_List_const_iteratorIS2_EEEvT_S8_St12__false_type(i64 %arg1, i64 %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_6c8:
%stack_var_-32 = alloca i64, align 8
%stack_var_-24 = alloca i64, align 8
store i64 %arg2, i64* %stack_var_-24, align 8, !insn.addr !110
store i64 %arg3, i64* %stack_var_-32, align 8, !insn.addr !111
%0 = call i64 @_ZNKSt20_List_const_iteratorIP14_twoIntsStructEneERKS2_(i64* nonnull %stack_var_-24, i64* nonnull %stack_var_-32), !insn.addr !112
%1 = trunc i64 %0 to i8, !insn.addr !113
%2 = icmp eq i8 %1, 0, !insn.addr !113
br i1 %2, label %dec_label_pc_71f, label %dec_label_pc_6f3.lr.ph, !insn.addr !114
dec_label_pc_6f3.lr.ph: ; preds = %dec_label_pc_6c8
%3 = inttoptr i64 %arg1 to i64*
br label %dec_label_pc_6f3
dec_label_pc_6f3: ; preds = %dec_label_pc_6f3.lr.ph, %dec_label_pc_6f3
%4 = call i64 @_ZNKSt20_List_const_iteratorIP14_twoIntsStructEdeEv(i64* nonnull %stack_var_-24), !insn.addr !115
call void @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE12emplace_backIJRKS2_EEEvDpOT_(i64* %3, i64 %4), !insn.addr !116
%5 = call i64 @_ZNSt20_List_const_iteratorIP14_twoIntsStructEppEv(i64* nonnull %stack_var_-24), !insn.addr !117
%6 = call i64 @_ZNKSt20_List_const_iteratorIP14_twoIntsStructEneERKS2_(i64* nonnull %stack_var_-24, i64* nonnull %stack_var_-32), !insn.addr !112
%7 = trunc i64 %6 to i8, !insn.addr !113
%8 = icmp eq i8 %7, 0, !insn.addr !113
br i1 %8, label %dec_label_pc_71f, label %dec_label_pc_6f3, !insn.addr !114
dec_label_pc_71f: ; preds = %dec_label_pc_6f3, %dec_label_pc_6c8
ret void, !insn.addr !118
}
define i64 @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE10_List_implC1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_722:
%0 = ptrtoint i64* %result to i64
%1 = call i64 @_ZNSaISt10_List_nodeIP14_twoIntsStructEEC1Ev(i64* %result), !insn.addr !119
store i64 0, i64* %result, align 8, !insn.addr !120
%2 = add i64 %0, 8, !insn.addr !121
%3 = inttoptr i64 %2 to i64*, !insn.addr !121
store i64 0, i64* %3, align 8, !insn.addr !121
%4 = add i64 %0, ptrtoint ([3 x i8]* @global_var_10 to i64), !insn.addr !122
%5 = inttoptr i64 %4 to i64*, !insn.addr !122
store i64 0, i64* %5, align 8, !insn.addr !122
ret i64 %0, !insn.addr !123
}
define i64 @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE7_M_initEv(i64* %result) local_unnamed_addr {
dec_label_pc_758:
%0 = ptrtoint i64* %result to i64
store i64 %0, i64* %result, align 8, !insn.addr !124
%1 = add i64 %0, 8, !insn.addr !125
%2 = inttoptr i64 %1 to i64*, !insn.addr !125
store i64 %0, i64* %2, align 8, !insn.addr !125
%3 = call i64 @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE11_M_set_sizeEm(i64* %result, i64 0), !insn.addr !126
ret i64 %3, !insn.addr !127
}
define i64 @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIP14_twoIntsStructEED1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_790:
%0 = alloca i64
%1 = load i64, i64* %0
ret i64 %1, !insn.addr !128
}
define i64 @_ZNSt10_List_nodeIP14_twoIntsStructE9_M_valptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_79c:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, ptrtoint ([3 x i8]* @global_var_10 to i64), !insn.addr !129
%2 = inttoptr i64 %1 to i64*, !insn.addr !130
%3 = call i64 @_ZN9__gnu_cxx16__aligned_membufIP14_twoIntsStructE6_M_ptrEv(i64* %2), !insn.addr !130
ret i64 %3, !insn.addr !131
}
define i64 @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE21_M_get_Node_allocatorEv(i64* %result) local_unnamed_addr {
dec_label_pc_7ba:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !132
}
define void @_ZNSt16allocator_traitsISaISt10_List_nodeIP14_twoIntsStructEEE7destroyIS2_EEvRS4_PT_(i64* %arg1, i64** %arg2) local_unnamed_addr {
dec_label_pc_7c8:
call void @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIP14_twoIntsStructEE7destroyIS3_EEvPT_(i64* %arg1, i64** %arg2), !insn.addr !133
ret void, !insn.addr !134
}
define i64 @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE11_M_put_nodeEPSt10_List_nodeIS2_E(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_7ee:
%0 = call i64 @_ZNSt16allocator_traitsISaISt10_List_nodeIP14_twoIntsStructEEE10deallocateERS4_PS3_m(i64* %result, i64* %arg2, i64 1), !insn.addr !135
ret i64 %0, !insn.addr !136
}
define i64 @_ZNSt14_List_iteratorIP14_twoIntsStructEC1EPNSt8__detail15_List_node_baseE(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_81a:
%0 = ptrtoint i64* %arg2 to i64
%1 = ptrtoint i64* %result to i64
store i64 %0, i64* %result, align 8, !insn.addr !137
ret i64 %1, !insn.addr !138
}
define i64* @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE14_M_create_nodeIJRKS2_EEEPSt10_List_nodeIS2_EDpOT_(i64* %result, i64 %arg2) local_unnamed_addr {
dec_label_pc_834:
%.pre-phi.reg2mem = alloca i64*, !insn.addr !139
%stack_var_-56 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !140
%1 = call i64 @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE11_M_get_nodeEv(i64* %result), !insn.addr !141
%2 = call i64 @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE21_M_get_Node_allocatorEv(i64* %result), !insn.addr !142
%3 = inttoptr i64 %2 to i64*, !insn.addr !143
%4 = inttoptr i64 %1 to i64*
%5 = call i64 @_ZNSt15__allocated_ptrISaISt10_List_nodeIP14_twoIntsStructEEEC1ERS4_PS3_(i64* nonnull %stack_var_-56, i64* %3, i64* %4), !insn.addr !143
%6 = inttoptr i64 %arg2 to i64*, !insn.addr !144
%7 = call i64*** @_ZSt7forwardIRKP14_twoIntsStructEOT_RNSt16remove_referenceIS4_E4typeE(i64* %6), !insn.addr !144
%8 = ptrtoint i64*** %7 to i64, !insn.addr !144
%9 = call i64 @_ZNSt10_List_nodeIP14_twoIntsStructE9_M_valptrEv(i64* %4), !insn.addr !145
%10 = inttoptr i64 %9 to i64**, !insn.addr !146
call void @_ZNSt16allocator_traitsISaISt10_List_nodeIP14_twoIntsStructEEE9constructIS2_JRKS2_EEEvRS4_PT_DpOT0_(i64* %3, i64** %10, i64 %8), !insn.addr !146
%11 = call i64 @_ZNSt15__allocated_ptrISaISt10_List_nodeIP14_twoIntsStructEEEaSEDn(i64* nonnull %stack_var_-56, i64 0), !insn.addr !147
%12 = call i64 @_ZNSt15__allocated_ptrISaISt10_List_nodeIP14_twoIntsStructEEED1Ev(i64* nonnull %stack_var_-56), !insn.addr !148
%13 = call i64 @__readfsqword(i64 40), !insn.addr !149
%14 = icmp eq i64 %0, %13, !insn.addr !149
store i64* %4, i64** %.pre-phi.reg2mem, !insn.addr !150
br i1 %14, label %dec_label_pc_90f, label %dec_label_pc_90a, !insn.addr !150
dec_label_pc_90a: ; preds = %dec_label_pc_834
%15 = call i64 @__stack_chk_fail(), !insn.addr !151
%.pre = inttoptr i64 %15 to i64*, !insn.addr !152
store i64* %.pre, i64** %.pre-phi.reg2mem, !insn.addr !151
br label %dec_label_pc_90f, !insn.addr !151
dec_label_pc_90f: ; preds = %dec_label_pc_90a, %dec_label_pc_834
%.pre-phi.reload = load i64*, i64** %.pre-phi.reg2mem
ret i64* %.pre-phi.reload, !insn.addr !152
}
define i64 @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE11_M_inc_sizeEm(i64* %result, i64 %arg2) local_unnamed_addr {
dec_label_pc_916:
%0 = call i64 @_ZNSt10_List_nodeImE9_M_valptrEv(i64* %result), !insn.addr !153
%1 = inttoptr i64 %0 to i64*, !insn.addr !154
%2 = load i64, i64* %1, align 8, !insn.addr !154
%3 = add i64 %2, %arg2, !insn.addr !155
store i64 %3, i64* %1, align 8, !insn.addr !156
ret i64 %0, !insn.addr !157
}
define i64 @_ZNSt16allocator_traitsISaISt10_List_nodeIP14_twoIntsStructEEE37select_on_container_copy_constructionERKS4_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_942:
%0 = ptrtoint i64* %result to i64
%1 = call i64 @_ZNSaISt10_List_nodeIP14_twoIntsStructEEC1ERKS3_(i64* %result, i64* %arg2), !insn.addr !158
ret i64 %0, !insn.addr !159
}
define i64 @_ZNSaISt10_List_nodeIP14_twoIntsStructEEC1ERKS3_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_96c:
%0 = call i64 @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIP14_twoIntsStructEEC1ERKS5_(i64* %result, i64* %arg2), !insn.addr !160
ret i64 %0, !insn.addr !161
}
define i64 @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE10_List_implC1ERKSaISt10_List_nodeIS2_EE(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_992:
%0 = ptrtoint i64* %result to i64
%1 = call i64 @_ZNSaISt10_List_nodeIP14_twoIntsStructEEC1ERKS3_(i64* %result, i64* %arg2), !insn.addr !162
store i64 0, i64* %result, align 8, !insn.addr !163
%2 = add i64 %0, 8, !insn.addr !164
%3 = inttoptr i64 %2 to i64*, !insn.addr !164
store i64 0, i64* %3, align 8, !insn.addr !164
%4 = add i64 %0, ptrtoint ([3 x i8]* @global_var_10 to i64), !insn.addr !165
%5 = inttoptr i64 %4 to i64*, !insn.addr !165
store i64 0, i64* %5, align 8, !insn.addr !165
ret i64 %0, !insn.addr !166
}
define i64 @_ZNSt20_List_const_iteratorIP14_twoIntsStructEC1EPKNSt8__detail15_List_node_baseE(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_9d4:
%0 = ptrtoint i64* %arg2 to i64
%1 = ptrtoint i64* %result to i64
store i64 %0, i64* %result, align 8, !insn.addr !167
ret i64 %1, !insn.addr !168
}
define i64 @_ZNKSt20_List_const_iteratorIP14_twoIntsStructEneERKS2_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_9ee:
%0 = ptrtoint i64* %arg2 to i64
%1 = icmp eq i64* %result, %arg2, !insn.addr !169
%2 = icmp eq i1 %1, false, !insn.addr !170
%3 = zext i1 %2 to i64, !insn.addr !170
%4 = and i64 %0, -256, !insn.addr !170
%5 = or i64 %4, %3, !insn.addr !170
ret i64 %5, !insn.addr !171
}
define i64 @_ZNSt20_List_const_iteratorIP14_twoIntsStructEppEv(i64* %result) local_unnamed_addr {
dec_label_pc_a10:
%0 = ptrtoint i64* %result to i64
store i64 %0, i64* %result, align 8, !insn.addr !172
ret i64 %0, !insn.addr !173
}
define i64 @_ZNKSt20_List_const_iteratorIP14_twoIntsStructEdeEv(i64* %result) local_unnamed_addr {
dec_label_pc_a30:
%0 = call i64 @_ZNKSt10_List_nodeIP14_twoIntsStructE9_M_valptrEv(i64* %result), !insn.addr !174
ret i64 %0, !insn.addr !175
}
define void @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE12emplace_backIJRKS2_EEEvDpOT_(i64* %result, i64 %arg2) local_unnamed_addr {
dec_label_pc_a4e:
%0 = inttoptr i64 %arg2 to i64*, !insn.addr !176
%1 = call i64*** @_ZSt7forwardIRKP14_twoIntsStructEOT_RNSt16remove_referenceIS4_E4typeE(i64* %0), !insn.addr !176
%2 = ptrtoint i64*** %1 to i64, !insn.addr !176
%3 = call i64 @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE3endEv(i64* %result), !insn.addr !177
call void @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE9_M_insertIJRKS2_EEEvSt14_List_iteratorIS2_EDpOT_(i64* %result, i64 %3, i64 %2), !insn.addr !178
ret void, !insn.addr !179
}
define i64 @_ZNSaISt10_List_nodeIP14_twoIntsStructEEC1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_a98:
%0 = call i64 @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIP14_twoIntsStructEEC1Ev(i64* %result), !insn.addr !180
ret i64 %0, !insn.addr !181
}
define i64 @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE11_M_set_sizeEm(i64* %result, i64 %arg2) local_unnamed_addr {
dec_label_pc_ab4:
%0 = call i64 @_ZNSt10_List_nodeImE9_M_valptrEv(i64* %result), !insn.addr !182
%1 = inttoptr i64 %0 to i64*, !insn.addr !183
store i64 %arg2, i64* %1, align 8, !insn.addr !183
ret i64 %arg2, !insn.addr !184
}
define i64 @_ZN9__gnu_cxx16__aligned_membufIP14_twoIntsStructE6_M_ptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_ade:
%0 = call i64 @_ZN9__gnu_cxx16__aligned_membufIP14_twoIntsStructE7_M_addrEv(i64* %result), !insn.addr !185
ret i64 %0, !insn.addr !186
}
define void @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIP14_twoIntsStructEE7destroyIS3_EEvPT_(i64* %result, i64** %arg2) local_unnamed_addr {
dec_label_pc_af8:
ret void, !insn.addr !187
}
define i64 @_ZNSt16allocator_traitsISaISt10_List_nodeIP14_twoIntsStructEEE10deallocateERS4_PS3_m(i64* %arg1, i64* %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_b07:
%0 = call i64 @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIP14_twoIntsStructEE10deallocateEPS4_m(i64* %arg1, i64* %arg2, i64 %arg3), !insn.addr !188
ret i64 %0, !insn.addr !189
}
define i64 @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE11_M_get_nodeEv(i64* %result) local_unnamed_addr {
dec_label_pc_b36:
%0 = call i64 @_ZNSt16allocator_traitsISaISt10_List_nodeIP14_twoIntsStructEEE8allocateERS4_m(i64* %result, i64 1), !insn.addr !190
ret i64 %0, !insn.addr !191
}
define i64 @_ZNSt15__allocated_ptrISaISt10_List_nodeIP14_twoIntsStructEEEC1ERS4_PS3_(i64* %result, i64* %arg2, i64* %arg3) local_unnamed_addr {
dec_label_pc_b56:
%0 = ptrtoint i64* %arg3 to i64
%1 = ptrtoint i64* %result to i64
%2 = call i64* @_ZSt11__addressofISaISt10_List_nodeIP14_twoIntsStructEEEPT_RS5_(i64* %arg2), !insn.addr !192
%3 = ptrtoint i64* %2 to i64, !insn.addr !192
store i64 %3, i64* %result, align 8, !insn.addr !193
%4 = add i64 %1, 8, !insn.addr !194
%5 = inttoptr i64 %4 to i64*, !insn.addr !194
store i64 %0, i64* %5, align 8, !insn.addr !194
ret i64 %1, !insn.addr !195
}
define i64 @_ZNSt15__allocated_ptrISaISt10_List_nodeIP14_twoIntsStructEEED1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_b90:
%rax.0.reg2mem = alloca i64, !insn.addr !196
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 8, !insn.addr !197
%2 = inttoptr i64 %1 to i64*, !insn.addr !197
%3 = load i64, i64* %2, align 8, !insn.addr !197
%4 = icmp eq i64 %3, 0, !insn.addr !198
store i64 0, i64* %rax.0.reg2mem, !insn.addr !199
br i1 %4, label %dec_label_pc_bc8, label %dec_label_pc_ba9, !insn.addr !199
dec_label_pc_ba9: ; preds = %dec_label_pc_b90
%5 = inttoptr i64 %3 to i64*, !insn.addr !200
%6 = call i64 @_ZNSt16allocator_traitsISaISt10_List_nodeIP14_twoIntsStructEEE10deallocateERS4_PS3_m(i64* %result, i64* %5, i64 1), !insn.addr !200
store i64 %6, i64* %rax.0.reg2mem, !insn.addr !200
br label %dec_label_pc_bc8, !insn.addr !200
dec_label_pc_bc8: ; preds = %dec_label_pc_ba9, %dec_label_pc_b90
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !201
}
define void @_ZNSt16allocator_traitsISaISt10_List_nodeIP14_twoIntsStructEEE9constructIS2_JRKS2_EEEvRS4_PT_DpOT0_(i64* %arg1, i64** %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_bcb:
%0 = inttoptr i64 %arg3 to i64*, !insn.addr !202
%1 = call i64*** @_ZSt7forwardIRKP14_twoIntsStructEOT_RNSt16remove_referenceIS4_E4typeE(i64* %0), !insn.addr !202
%2 = ptrtoint i64*** %1 to i64, !insn.addr !202
call void @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIP14_twoIntsStructEE9constructIS3_JRKS3_EEEvPT_DpOT0_(i64* %arg1, i64** %arg2, i64 %2), !insn.addr !203
ret void, !insn.addr !204
}
define i64 @_ZNSt15__allocated_ptrISaISt10_List_nodeIP14_twoIntsStructEEEaSEDn(i64* %result, i64 %arg2) local_unnamed_addr {
dec_label_pc_c04:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 8, !insn.addr !205
%2 = inttoptr i64 %1 to i64*, !insn.addr !205
store i64 0, i64* %2, align 8, !insn.addr !205
ret i64 %0, !insn.addr !206
}
define i64 @_ZNSt10_List_nodeImE9_M_valptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_c22:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, ptrtoint ([3 x i8]* @global_var_10 to i64), !insn.addr !207
%2 = inttoptr i64 %1 to i64*, !insn.addr !208
%3 = call i64 @_ZN9__gnu_cxx16__aligned_membufImE6_M_ptrEv(i64* %2), !insn.addr !208
ret i64 %3, !insn.addr !209
}
define i64 @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIP14_twoIntsStructEEC1ERKS5_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_c40:
%0 = alloca i64
%1 = load i64, i64* %0
ret i64 %1, !insn.addr !210
}
define i64 @_ZNKSt10_List_nodeIP14_twoIntsStructE9_M_valptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_c50:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, ptrtoint ([3 x i8]* @global_var_10 to i64), !insn.addr !211
%2 = inttoptr i64 %1 to i64*, !insn.addr !212
%3 = call i64 @_ZNK9__gnu_cxx16__aligned_membufIP14_twoIntsStructE6_M_ptrEv(i64* %2), !insn.addr !212
ret i64 %3, !insn.addr !213
}
define i64 @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIP14_twoIntsStructEEC1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_c6e:
%0 = alloca i64
%1 = load i64, i64* %0
ret i64 %1, !insn.addr !214
}
define i64 @_ZN9__gnu_cxx16__aligned_membufIP14_twoIntsStructE7_M_addrEv(i64* %result) local_unnamed_addr {
dec_label_pc_c7a:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !215
}
define i64 @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIP14_twoIntsStructEE10deallocateEPS4_m(i64* %result, i64* %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_c88:
%0 = call i64 @_ZdlPv(i64* %arg2), !insn.addr !216
ret i64 %0, !insn.addr !217
}
define i64 @_ZNSt16allocator_traitsISaISt10_List_nodeIP14_twoIntsStructEEE8allocateERS4_m(i64* %arg1, i64 %arg2) local_unnamed_addr {
dec_label_pc_cab:
%0 = call i64 @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIP14_twoIntsStructEE8allocateEmPKv(i64* %arg1, i64 %arg2, i64* null), !insn.addr !218
ret i64 %0, !insn.addr !219
}
define i64* @_ZSt11__addressofISaISt10_List_nodeIP14_twoIntsStructEEEPT_RS5_(i64* %arg1) local_unnamed_addr {
dec_label_pc_cd5:
ret i64* %arg1, !insn.addr !220
}
define void @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIP14_twoIntsStructEE9constructIS3_JRKS3_EEEvPT_DpOT0_(i64* %result, i64** %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_ce4:
%0 = inttoptr i64 %arg3 to i64*, !insn.addr !221
%1 = call i64*** @_ZSt7forwardIRKP14_twoIntsStructEOT_RNSt16remove_referenceIS4_E4typeE(i64* %0), !insn.addr !221
%2 = load i64**, i64*** %1, align 8, !insn.addr !222
%3 = bitcast i64** %arg2 to i64*, !insn.addr !223
%4 = call i64 @_ZnwmPv(i64 8, i64* %3), !insn.addr !223
%5 = icmp eq i64 %4, 0, !insn.addr !224
br i1 %5, label %dec_label_pc_d21, label %dec_label_pc_d1e, !insn.addr !225
dec_label_pc_d1e: ; preds = %dec_label_pc_ce4
%6 = ptrtoint i64** %2 to i64, !insn.addr !222
%7 = inttoptr i64 %4 to i64*, !insn.addr !226
store i64 %6, i64* %7, align 8, !insn.addr !226
br label %dec_label_pc_d21, !insn.addr !226
dec_label_pc_d21: ; preds = %dec_label_pc_d1e, %dec_label_pc_ce4
ret void, !insn.addr !227
}
define i64 @_ZN9__gnu_cxx16__aligned_membufImE6_M_ptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_d2a:
%0 = call i64 @_ZN9__gnu_cxx16__aligned_membufImE7_M_addrEv(i64* %result), !insn.addr !228
ret i64 %0, !insn.addr !229
}
define i64 @_ZNK9__gnu_cxx16__aligned_membufIP14_twoIntsStructE6_M_ptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_d44:
%0 = call i64 @_ZNK9__gnu_cxx16__aligned_membufIP14_twoIntsStructE7_M_addrEv(i64* %result), !insn.addr !230
ret i64 %0, !insn.addr !231
}
define i64 @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIP14_twoIntsStructEE8allocateEmPKv(i64* %result, i64 %arg2, i64* %arg3) local_unnamed_addr {
dec_label_pc_d5e:
%0 = call i64 @_ZNK9__gnu_cxx13new_allocatorISt10_List_nodeIP14_twoIntsStructEE8max_sizeEv(i64* %result), !insn.addr !232
%1 = icmp uge i64 %0, %arg2
%2 = icmp ne i1 %1, true, !insn.addr !233
%3 = icmp eq i1 %2, false, !insn.addr !234
br i1 %3, label %dec_label_pc_d8e, label %dec_label_pc_d89, !insn.addr !235
dec_label_pc_d89: ; preds = %dec_label_pc_d5e
%4 = call i64 @_ZSt17__throw_bad_allocv(), !insn.addr !236
br label %dec_label_pc_d8e, !insn.addr !236
dec_label_pc_d8e: ; preds = %dec_label_pc_d89, %dec_label_pc_d5e
%5 = mul i64 %arg2, 24, !insn.addr !237
%6 = call i64 @_Znwm(i64 %5), !insn.addr !238
ret i64 %6, !insn.addr !239
}
define i64 @_ZN9__gnu_cxx16__aligned_membufImE7_M_addrEv(i64* %result) local_unnamed_addr {
dec_label_pc_daa:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !240
}
define i64 @_ZNK9__gnu_cxx16__aligned_membufIP14_twoIntsStructE7_M_addrEv(i64* %result) local_unnamed_addr {
dec_label_pc_db8:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !241
}
define i64 @_ZNK9__gnu_cxx13new_allocatorISt10_List_nodeIP14_twoIntsStructEE8max_sizeEv(i64* %result) local_unnamed_addr {
dec_label_pc_dc6:
ret i64 768614336404564650, !insn.addr !242
}
declare i64 @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_loop_737badSinkENSt7__cxx114listIP14_twoIntsStructSaIS3_EEE(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_loop_7311goodG2BSinkENSt7__cxx114listIP14_twoIntsStructSaIS3_EEE(i64) local_unnamed_addr
declare i64 @_ZNSt8__detail15_List_node_base7_M_hookEPS0_(i64*, i64*) local_unnamed_addr
declare i64 @_ZdlPv(i64*) local_unnamed_addr
declare i64 @_ZSt17__throw_bad_allocv() local_unnamed_addr
declare i64 @_Znwm(i64) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 12}
!1 = !{i64 27}
!2 = !{i64 34}
!3 = !{i64 49}
!4 = !{i64 63}
!5 = !{i64 76}
!6 = !{i64 101}
!7 = !{i64 126}
!8 = !{i64 138}
!9 = !{i64 151}
!10 = !{i64 166}
!11 = !{i64 181}
!12 = !{i64 196}
!13 = !{i64 202}
!14 = !{i64 206}
!15 = !{i64 215}
!16 = !{i64 268}
!17 = !{i64 282}
!18 = !{i64 283}
!19 = !{i64 295}
!20 = !{i64 320}
!21 = !{i64 332}
!22 = !{i64 359}
!23 = !{i64 384}
!24 = !{i64 409}
!25 = !{i64 434}
!26 = !{i64 446}
!27 = !{i64 449}
!28 = !{i64 464}
!29 = !{i64 479}
!30 = !{i64 489}
!31 = !{i64 498}
!32 = !{i64 551}
!33 = !{i64 565}
!34 = !{i64 570}
!35 = !{i64 577}
!36 = !{i64 595}
!37 = !{i64 617}
!38 = !{i64 624}
!39 = !{i64 735}
!40 = !{i64 742}
!41 = !{i64 763}
!42 = !{i64 770}
!43 = !{i64 791}
!44 = !{i64 803}
!45 = !{i64 810}
!46 = !{i64 835}
!47 = !{i64 843}
!48 = !{i64 857}
!49 = !{i64 864}
!50 = !{i64 866}
!51 = !{i64 885}
!52 = !{i64 911}
!53 = !{i64 929}
!54 = !{i64 944}
!55 = !{i64 956}
!56 = !{i64 968}
!57 = !{i64 983}
!58 = !{i64 1010}
!59 = !{i64 1024}
!60 = !{i64 1033}
!61 = !{i64 1063}
!62 = !{i64 1076}
!63 = !{i64 1097}
!64 = !{i64 1109}
!65 = !{i64 1116}
!66 = !{i64 1137}
!67 = !{i64 1144}
!68 = !{i64 1267}
!69 = !{i64 1268}
!70 = !{i64 1280}
!71 = !{i64 1309}
!72 = !{i64 1314}
!73 = !{i64 1322}
!74 = !{i64 1331}
!75 = !{i64 1333}
!76 = !{i64 1339}
!77 = !{i64 1353}
!78 = !{i64 1381}
!79 = !{i64 1399}
!80 = !{i64 1422}
!81 = !{i64 1439}
!82 = !{i64 1446}
!83 = !{i64 1447}
!84 = !{i64 1463}
!85 = !{i64 1492}
!86 = !{i64 1505}
!87 = !{i64 1514}
!88 = !{i64 1516}
!89 = !{i64 1522}
!90 = !{i64 1537}
!91 = !{i64 1568}
!92 = !{i64 1580}
!93 = !{i64 1587}
!94 = !{i64 1588}
!95 = !{i64 1600}
!96 = !{i64 1632}
!97 = !{i64 1637}
!98 = !{i64 1645}
!99 = !{i64 1654}
!100 = !{i64 1656}
!101 = !{i64 1662}
!102 = !{i64 1664}
!103 = !{i64 1676}
!104 = !{i64 1705}
!105 = !{i64 1710}
!106 = !{i64 1718}
!107 = !{i64 1727}
!108 = !{i64 1729}
!109 = !{i64 1735}
!110 = !{i64 1748}
!111 = !{i64 1752}
!112 = !{i64 1770}
!113 = !{i64 1775}
!114 = !{i64 1777}
!115 = !{i64 1786}
!116 = !{i64 1804}
!117 = !{i64 1816}
!118 = !{i64 1825}
!119 = !{i64 1845}
!120 = !{i64 1854}
!121 = !{i64 1861}
!122 = !{i64 1869}
!123 = !{i64 1879}
!124 = !{i64 1900}
!125 = !{i64 1911}
!126 = !{i64 1927}
!127 = !{i64 1934}
!128 = !{i64 1946}
!129 = !{i64 1964}
!130 = !{i64 1971}
!131 = !{i64 1977}
!132 = !{i64 1991}
!133 = !{i64 2022}
!134 = !{i64 2029}
!135 = !{i64 2065}
!136 = !{i64 2072}
!137 = !{i64 2094}
!138 = !{i64 2099}
!139 = !{i64 2100}
!140 = !{i64 2117}
!141 = !{i64 2139}
!142 = !{i64 2155}
!143 = !{i64 2182}
!144 = !{i64 2194}
!145 = !{i64 2209}
!146 = !{i64 2230}
!147 = !{i64 2247}
!148 = !{i64 2263}
!149 = !{i64 2275}
!150 = !{i64 2284}
!151 = !{i64 2314}
!152 = !{i64 2325}
!153 = !{i64 2349}
!154 = !{i64 2354}
!155 = !{i64 2361}
!156 = !{i64 2364}
!157 = !{i64 2369}
!158 = !{i64 2400}
!159 = !{i64 2410}
!160 = !{i64 2442}
!161 = !{i64 2449}
!162 = !{i64 2480}
!163 = !{i64 2489}
!164 = !{i64 2496}
!165 = !{i64 2504}
!166 = !{i64 2514}
!167 = !{i64 2536}
!168 = !{i64 2541}
!169 = !{i64 2568}
!170 = !{i64 2571}
!171 = !{i64 2575}
!172 = !{i64 2598}
!173 = !{i64 2606}
!174 = !{i64 2630}
!175 = !{i64 2636}
!176 = !{i64 2662}
!177 = !{i64 2677}
!178 = !{i64 2698}
!179 = !{i64 2710}
!180 = !{i64 2731}
!181 = !{i64 2738}
!182 = !{i64 2763}
!183 = !{i64 2775}
!184 = !{i64 2780}
!185 = !{i64 2801}
!186 = !{i64 2807}
!187 = !{i64 2822}
!188 = !{i64 2861}
!189 = !{i64 2868}
!190 = !{i64 2894}
!191 = !{i64 2900}
!192 = !{i64 2929}
!193 = !{i64 2941}
!194 = !{i64 2952}
!195 = !{i64 2958}
!196 = !{i64 2960}
!197 = !{i64 2976}
!198 = !{i64 2980}
!199 = !{i64 2983}
!200 = !{i64 3011}
!201 = !{i64 3018}
!202 = !{i64 3046}
!203 = !{i64 3068}
!204 = !{i64 3075}
!205 = !{i64 3092}
!206 = !{i64 3105}
!207 = !{i64 3122}
!208 = !{i64 3129}
!209 = !{i64 3135}
!210 = !{i64 3150}
!211 = !{i64 3168}
!212 = !{i64 3175}
!213 = !{i64 3181}
!214 = !{i64 3192}
!215 = !{i64 3207}
!216 = !{i64 3235}
!217 = !{i64 3242}
!218 = !{i64 3278}
!219 = !{i64 3284}
!220 = !{i64 3298}
!221 = !{i64 3328}
!222 = !{i64 3333}
!223 = !{i64 3348}
!224 = !{i64 3353}
!225 = !{i64 3356}
!226 = !{i64 3358}
!227 = !{i64 3368}
!228 = !{i64 3389}
!229 = !{i64 3395}
!230 = !{i64 3415}
!231 = !{i64 3421}
!232 = !{i64 3449}
!233 = !{i64 3458}
!234 = !{i64 3461}
!235 = !{i64 3463}
!236 = !{i64 3465}
!237 = !{i64 3483}
!238 = !{i64 3490}
!239 = !{i64 3496}
!240 = !{i64 3511}
!241 = !{i64 3525}
!242 = !{i64 3545}
### Assistant: %struct._twoIntsStruct = type { i32, i32 }
%"class.std::__cxx11::list" = type { %"class.std::__cxx11::_List_base" }
%"class.std::__cxx11::_List_base" = type { %"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl" }
%"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"* }
%"struct.std::_List_iterator" = type { %"struct.std::__detail::_List_node_base"* }
%"class.std::allocator" = type { i8 }
%"struct.std::_List_const_iterator" = type { %"struct.std::__detail::_List_node_base"* }
%"struct.std::__false_type" = type { i8 }
%"class.__gnu_cxx::new_allocator" = type { i8 }
%"struct.std::_List_node" = type { %"struct.std::__detail::_List_node_base", %"struct.__gnu_cxx::__aligned_membuf" }
%"struct.__gnu_cxx::__aligned_membuf" = type { [8 x i8] }
%"struct.std::__allocated_ptr" = type { %"class.std::allocator"*, %"struct.std::_List_node"* }
$_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EEC2Ev = comdat any
$_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE9push_backERKS2_ = comdat any
$_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EEC2ERKS4_ = comdat any
$_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EED2Ev = comdat any
$_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EEC2Ev = comdat any
$_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE10_List_implC2Ev = comdat any
$_ZNSaISt10_List_nodeIP14_twoIntsStructEEC2Ev = comdat any
$_ZNSt8__detail17_List_node_headerC2Ev = comdat any
$_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIP14_twoIntsStructEEC2Ev = comdat any
$_ZNSt8__detail17_List_node_header7_M_initEv = comdat any
$_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EED2Ev = comdat any
$_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE8_M_clearEv = comdat any
$_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE10_List_implD2Ev = comdat any
$_ZNSt10_List_nodeIP14_twoIntsStructE9_M_valptrEv = comdat any
$__clang_call_terminate = comdat any
$_ZNSt16allocator_traitsISaISt10_List_nodeIP14_twoIntsStructEEE7destroyIS2_EEvRS4_PT_ = comdat any
$_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE21_M_get_Node_allocatorEv = comdat any
$_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE11_M_put_nodeEPSt10_List_nodeIS2_E = comdat any
$_ZN9__gnu_cxx16__aligned_membufIP14_twoIntsStructE6_M_ptrEv = comdat any
$_ZN9__gnu_cxx16__aligned_membufIP14_twoIntsStructE7_M_addrEv = comdat any
$_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIP14_twoIntsStructEE7destroyIS3_EEvPT_ = comdat any
$_ZNSt16allocator_traitsISaISt10_List_nodeIP14_twoIntsStructEEE10deallocateERS4_PS3_m = comdat any
$_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIP14_twoIntsStructEE10deallocateEPS4_m = comdat any
$_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIP14_twoIntsStructEED2Ev = comdat any
$_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE9_M_insertIJRKS2_EEEvSt14_List_iteratorIS2_EDpOT_ = comdat any
$_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE3endEv = comdat any
$_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE14_M_create_nodeIJRKS2_EEEPSt10_List_nodeIS2_EDpOT_ = comdat any
$_ZSt7forwardIRKP14_twoIntsStructEOT_RNSt16remove_referenceIS4_E4typeE = comdat any
$_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE11_M_inc_sizeEm = comdat any
$_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE11_M_get_nodeEv = comdat any
$_ZNSt15__allocated_ptrISaISt10_List_nodeIP14_twoIntsStructEEEC2ERS4_PS3_ = comdat any
$_ZNSt16allocator_traitsISaISt10_List_nodeIP14_twoIntsStructEEE9constructIS2_JRKS2_EEEvRS4_PT_DpOT0_ = comdat any
$_ZNSt15__allocated_ptrISaISt10_List_nodeIP14_twoIntsStructEEEaSEDn = comdat any
$_ZNSt15__allocated_ptrISaISt10_List_nodeIP14_twoIntsStructEEED2Ev = comdat any
$_ZNSt16allocator_traitsISaISt10_List_nodeIP14_twoIntsStructEEE8allocateERS4_m = comdat any
$_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIP14_twoIntsStructEE8allocateEmPKv = comdat any
$_ZNK9__gnu_cxx13new_allocatorISt10_List_nodeIP14_twoIntsStructEE11_M_max_sizeEv = comdat any
$_ZSt11__addressofISaISt10_List_nodeIP14_twoIntsStructEEEPT_RS5_ = comdat any
$_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIP14_twoIntsStructEE9constructIS3_JRKS3_EEEvPT_DpOT0_ = comdat any
$_ZNSt14_List_iteratorIP14_twoIntsStructEC2EPNSt8__detail15_List_node_baseE = comdat any
$_ZN9__gnu_cxx14__alloc_traitsISaISt10_List_nodeIP14_twoIntsStructEES4_E17_S_select_on_copyERKS5_ = comdat any
$_ZNKSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE21_M_get_Node_allocatorEv = comdat any
$_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EEC2EOSaISt10_List_nodeIS2_EE = comdat any
$_ZNSaISt10_List_nodeIP14_twoIntsStructEED2Ev = comdat any
$_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE22_M_initialize_dispatchISt20_List_const_iteratorIS2_EEEvT_S8_St12__false_type = comdat any
$_ZNKSt7__cxx114listIP14_twoIntsStructSaIS2_EE5beginEv = comdat any
$_ZNKSt7__cxx114listIP14_twoIntsStructSaIS2_EE3endEv = comdat any
$_ZNSt16allocator_traitsISaISt10_List_nodeIP14_twoIntsStructEEE37select_on_container_copy_constructionERKS4_ = comdat any
$_ZNSaISt10_List_nodeIP14_twoIntsStructEEC2ERKS3_ = comdat any
$_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIP14_twoIntsStructEEC2ERKS5_ = comdat any
$_ZSt4moveIRSaISt10_List_nodeIP14_twoIntsStructEEEONSt16remove_referenceIT_E4typeEOS7_ = comdat any
$_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE10_List_implC2EOSaISt10_List_nodeIS2_EE = comdat any
$_ZStneRKSt20_List_const_iteratorIP14_twoIntsStructES4_ = comdat any
$_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE12emplace_backIJRKS2_EEEvDpOT_ = comdat any
$_ZNKSt20_List_const_iteratorIP14_twoIntsStructEdeEv = comdat any
$_ZNSt20_List_const_iteratorIP14_twoIntsStructEppEv = comdat any
$_ZNKSt10_List_nodeIP14_twoIntsStructE9_M_valptrEv = comdat any
$_ZNK9__gnu_cxx16__aligned_membufIP14_twoIntsStructE6_M_ptrEv = comdat any
$_ZNK9__gnu_cxx16__aligned_membufIP14_twoIntsStructE7_M_addrEv = comdat any
$_ZNSt20_List_const_iteratorIP14_twoIntsStructEC2EPKNSt8__detail15_List_node_baseE = comdat any
; Function Attrs: noinline optnone uwtable
define dso_local void @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_loop_733badEv() #0 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%data = alloca %struct._twoIntsStruct*, align 8
%dataList = alloca %"class.std::__cxx11::list", align 8
%dataBadBuffer = alloca [50 x %struct._twoIntsStruct], align 16
%dataGoodBuffer = alloca [100 x %struct._twoIntsStruct], align 16
%exn.slot = alloca i8*, align 8
%ehselector.slot = alloca i32, align 4
%agg.tmp = alloca %"class.std::__cxx11::list", align 8
call void @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EEC2Ev(%"class.std::__cxx11::list"* %dataList) #8
%arraydecay = getelementptr inbounds [50 x %struct._twoIntsStruct], [50 x %struct._twoIntsStruct]* %dataBadBuffer, i64 0, i64 0
store %struct._twoIntsStruct* %arraydecay, %struct._twoIntsStruct** %data, align 8
invoke void @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE9push_backERKS2_(%"class.std::__cxx11::list"* %dataList, %struct._twoIntsStruct** nonnull align 8 dereferenceable(8) %data)
to label %invoke.cont unwind label %lpad
invoke.cont: ; preds = %entry
invoke void @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE9push_backERKS2_(%"class.std::__cxx11::list"* %dataList, %struct._twoIntsStruct** nonnull align 8 dereferenceable(8) %data)
to label %invoke.cont1 unwind label %lpad
invoke.cont1: ; preds = %invoke.cont
invoke void @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE9push_backERKS2_(%"class.std::__cxx11::list"* %dataList, %struct._twoIntsStruct** nonnull align 8 dereferenceable(8) %data)
to label %invoke.cont2 unwind label %lpad
invoke.cont2: ; preds = %invoke.cont1
invoke void @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EEC2ERKS4_(%"class.std::__cxx11::list"* %agg.tmp, %"class.std::__cxx11::list"* nonnull align 8 dereferenceable(24) %dataList)
to label %invoke.cont3 unwind label %lpad
invoke.cont3: ; preds = %invoke.cont2
invoke void @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_loop_737badSinkENSt7__cxx114listIP14_twoIntsStructSaIS3_EEE(%"class.std::__cxx11::list"* %agg.tmp)
to label %invoke.cont5 unwind label %lpad4
invoke.cont5: ; preds = %invoke.cont3
call void @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EED2Ev(%"class.std::__cxx11::list"* %agg.tmp) #8
call void @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EED2Ev(%"class.std::__cxx11::list"* %dataList) #8
ret void
lpad: ; preds = %invoke.cont2, %invoke.cont1, %invoke.cont, %entry
%0 = landingpad { i8*, i32 }
cleanup
%1 = extractvalue { i8*, i32 } %0, 0
store i8* %1, i8** %exn.slot, align 8
%2 = extractvalue { i8*, i32 } %0, 1
store i32 %2, i32* %ehselector.slot, align 4
br label %ehcleanup
lpad4: ; preds = %invoke.cont3
%3 = landingpad { i8*, i32 }
cleanup
%4 = extractvalue { i8*, i32 } %3, 0
store i8* %4, i8** %exn.slot, align 8
%5 = extractvalue { i8*, i32 } %3, 1
store i32 %5, i32* %ehselector.slot, align 4
call void @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EED2Ev(%"class.std::__cxx11::list"* %agg.tmp) #8
br label %ehcleanup
ehcleanup: ; preds = %lpad4, %lpad
call void @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EED2Ev(%"class.std::__cxx11::list"* %dataList) #8
br label %eh.resume
eh.resume: ; preds = %ehcleanup
%exn = load i8*, i8** %exn.slot, align 8
%sel = load i32, i32* %ehselector.slot, align 4
%lpad.val = insertvalue { i8*, i32 } undef, i8* %exn, 0
%lpad.val6 = insertvalue { i8*, i32 } %lpad.val, i32 %sel, 1
resume { i8*, i32 } %lpad.val6
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EEC2Ev(%"class.std::__cxx11::list"* %this) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::__cxx11::list"*, align 8
store %"class.std::__cxx11::list"* %this, %"class.std::__cxx11::list"** %this.addr, align 8
%this1 = load %"class.std::__cxx11::list"*, %"class.std::__cxx11::list"** %this.addr, align 8
%0 = bitcast %"class.std::__cxx11::list"* %this1 to %"class.std::__cxx11::_List_base"*
call void @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EEC2Ev(%"class.std::__cxx11::_List_base"* %0) #8
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE9push_backERKS2_(%"class.std::__cxx11::list"* %this, %struct._twoIntsStruct** nonnull align 8 dereferenceable(8) %__x) #0 comdat align 2 {
entry:
%this.addr = alloca %"class.std::__cxx11::list"*, align 8
%__x.addr = alloca %struct._twoIntsStruct**, align 8
%agg.tmp = alloca %"struct.std::_List_iterator", align 8
store %"class.std::__cxx11::list"* %this, %"class.std::__cxx11::list"** %this.addr, align 8
store %struct._twoIntsStruct** %__x, %struct._twoIntsStruct*** %__x.addr, align 8
%this1 = load %"class.std::__cxx11::list"*, %"class.std::__cxx11::list"** %this.addr, align 8
%call = call %"struct.std::__detail::_List_node_base"* @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE3endEv(%"class.std::__cxx11::list"* %this1) #8
%coerce.dive = getelementptr inbounds %"struct.std::_List_iterator", %"struct.std::_List_iterator"* %agg.tmp, i32 0, i32 0
store %"struct.std::__detail::_List_node_base"* %call, %"struct.std::__detail::_List_node_base"** %coerce.dive, align 8
%0 = load %struct._twoIntsStruct**, %struct._twoIntsStruct*** %__x.addr, align 8
%coerce.dive2 = getelementptr inbounds %"struct.std::_List_iterator", %"struct.std::_List_iterator"* %agg.tmp, i32 0, i32 0
%1 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %coerce.dive2, align 8
call void @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE9_M_insertIJRKS2_EEEvSt14_List_iteratorIS2_EDpOT_(%"class.std::__cxx11::list"* %this1, %"struct.std::__detail::_List_node_base"* %1, %struct._twoIntsStruct** nonnull align 8 dereferenceable(8) %0)
ret void
}
declare dso_local i32 @__gxx_personality_v0(...)
declare dso_local void @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_loop_737badSinkENSt7__cxx114listIP14_twoIntsStructSaIS3_EEE(%"class.std::__cxx11::list"*) #2
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EEC2ERKS4_(%"class.std::__cxx11::list"* %this, %"class.std::__cxx11::list"* nonnull align 8 dereferenceable(24) %__x) unnamed_addr #0 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%this.addr = alloca %"class.std::__cxx11::list"*, align 8
%__x.addr = alloca %"class.std::__cxx11::list"*, align 8
%ref.tmp = alloca %"class.std::allocator", align 1
%exn.slot = alloca i8*, align 8
%ehselector.slot = alloca i32, align 4
%agg.tmp = alloca %"struct.std::_List_const_iterator", align 8
%agg.tmp3 = alloca %"struct.std::_List_const_iterator", align 8
%agg.tmp6 = alloca %"struct.std::__false_type", align 1
store %"class.std::__cxx11::list"* %this, %"class.std::__cxx11::list"** %this.addr, align 8
store %"class.std::__cxx11::list"* %__x, %"class.std::__cxx11::list"** %__x.addr, align 8
%this1 = load %"class.std::__cxx11::list"*, %"class.std::__cxx11::list"** %this.addr, align 8
%0 = bitcast %"class.std::__cxx11::list"* %this1 to %"class.std::__cxx11::_List_base"*
%1 = load %"class.std::__cxx11::list"*, %"class.std::__cxx11::list"** %__x.addr, align 8
%2 = bitcast %"class.std::__cxx11::list"* %1 to %"class.std::__cxx11::_List_base"*
%call = call nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZNKSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE21_M_get_Node_allocatorEv(%"class.std::__cxx11::_List_base"* %2) #8
call void @_ZN9__gnu_cxx14__alloc_traitsISaISt10_List_nodeIP14_twoIntsStructEES4_E17_S_select_on_copyERKS5_(%"class.std::allocator"* sret align 1 %ref.tmp, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %call)
invoke void @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EEC2EOSaISt10_List_nodeIS2_EE(%"class.std::__cxx11::_List_base"* %0, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %ref.tmp)
to label %invoke.cont unwind label %lpad
invoke.cont: ; preds = %entry
call void @_ZNSaISt10_List_nodeIP14_twoIntsStructEED2Ev(%"class.std::allocator"* %ref.tmp) #8
%3 = load %"class.std::__cxx11::list"*, %"class.std::__cxx11::list"** %__x.addr, align 8
%call2 = call %"struct.std::__detail::_List_node_base"* @_ZNKSt7__cxx114listIP14_twoIntsStructSaIS2_EE5beginEv(%"class.std::__cxx11::list"* %3) #8
%coerce.dive = getelementptr inbounds %"struct.std::_List_const_iterator", %"struct.std::_List_const_iterator"* %agg.tmp, i32 0, i32 0
store %"struct.std::__detail::_List_node_base"* %call2, %"struct.std::__detail::_List_node_base"** %coerce.dive, align 8
%4 = load %"class.std::__cxx11::list"*, %"class.std::__cxx11::list"** %__x.addr, align 8
%call4 = call %"struct.std::__detail::_List_node_base"* @_ZNKSt7__cxx114listIP14_twoIntsStructSaIS2_EE3endEv(%"class.std::__cxx11::list"* %4) #8
%coerce.dive5 = getelementptr inbounds %"struct.std::_List_const_iterator", %"struct.std::_List_const_iterator"* %agg.tmp3, i32 0, i32 0
store %"struct.std::__detail::_List_node_base"* %call4, %"struct.std::__detail::_List_node_base"** %coerce.dive5, align 8
%coerce.dive7 = getelementptr inbounds %"struct.std::_List_const_iterator", %"struct.std::_List_const_iterator"* %agg.tmp, i32 0, i32 0
%5 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %coerce.dive7, align 8
%coerce.dive8 = getelementptr inbounds %"struct.std::_List_const_iterator", %"struct.std::_List_const_iterator"* %agg.tmp3, i32 0, i32 0
%6 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %coerce.dive8, align 8
invoke void @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE22_M_initialize_dispatchISt20_List_const_iteratorIS2_EEEvT_S8_St12__false_type(%"class.std::__cxx11::list"* %this1, %"struct.std::__detail::_List_node_base"* %5, %"struct.std::__detail::_List_node_base"* %6)
to label %invoke.cont10 unwind label %lpad9
invoke.cont10: ; preds = %invoke.cont
ret void
lpad: ; preds = %entry
%7 = landingpad { i8*, i32 }
cleanup
%8 = extractvalue { i8*, i32 } %7, 0
store i8* %8, i8** %exn.slot, align 8
%9 = extractvalue { i8*, i32 } %7, 1
store i32 %9, i32* %ehselector.slot, align 4
call void @_ZNSaISt10_List_nodeIP14_twoIntsStructEED2Ev(%"class.std::allocator"* %ref.tmp) #8
br label %eh.resume
lpad9: ; preds = %invoke.cont
%10 = landingpad { i8*, i32 }
cleanup
%11 = extractvalue { i8*, i32 } %10, 0
store i8* %11, i8** %exn.slot, align 8
%12 = extractvalue { i8*, i32 } %10, 1
store i32 %12, i32* %ehselector.slot, align 4
%13 = bitcast %"class.std::__cxx11::list"* %this1 to %"class.std::__cxx11::_List_base"*
call void @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EED2Ev(%"class.std::__cxx11::_List_base"* %13) #8
br label %eh.resume
eh.resume: ; preds = %lpad9, %lpad
%exn = load i8*, i8** %exn.slot, align 8
%sel = load i32, i32* %ehselector.slot, align 4
%lpad.val = insertvalue { i8*, i32 } undef, i8* %exn, 0
%lpad.val11 = insertvalue { i8*, i32 } %lpad.val, i32 %sel, 1
resume { i8*, i32 } %lpad.val11
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EED2Ev(%"class.std::__cxx11::list"* %this) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::__cxx11::list"*, align 8
store %"class.std::__cxx11::list"* %this, %"class.std::__cxx11::list"** %this.addr, align 8
%this1 = load %"class.std::__cxx11::list"*, %"class.std::__cxx11::list"** %this.addr, align 8
%0 = bitcast %"class.std::__cxx11::list"* %this1 to %"class.std::__cxx11::_List_base"*
call void @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EED2Ev(%"class.std::__cxx11::_List_base"* %0) #8
ret void
}
; Function Attrs: noinline optnone uwtable
define dso_local void @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_loop_734goodEv() #0 {
entry:
call void @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_loop_73L7goodG2BEv()
ret void
}
; Function Attrs: noinline optnone uwtable
define internal void @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_loop_73L7goodG2BEv() #0 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%data = alloca %struct._twoIntsStruct*, align 8
%dataList = alloca %"class.std::__cxx11::list", align 8
%dataBadBuffer = alloca [50 x %struct._twoIntsStruct], align 16
%dataGoodBuffer = alloca [100 x %struct._twoIntsStruct], align 16
%exn.slot = alloca i8*, align 8
%ehselector.slot = alloca i32, align 4
%agg.tmp = alloca %"class.std::__cxx11::list", align 8
call void @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EEC2Ev(%"class.std::__cxx11::list"* %dataList) #8
%arraydecay = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %dataGoodBuffer, i64 0, i64 0
store %struct._twoIntsStruct* %arraydecay, %struct._twoIntsStruct** %data, align 8
invoke void @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE9push_backERKS2_(%"class.std::__cxx11::list"* %dataList, %struct._twoIntsStruct** nonnull align 8 dereferenceable(8) %data)
to label %invoke.cont unwind label %lpad
invoke.cont: ; preds = %entry
invoke void @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE9push_backERKS2_(%"class.std::__cxx11::list"* %dataList, %struct._twoIntsStruct** nonnull align 8 dereferenceable(8) %data)
to label %invoke.cont1 unwind label %lpad
invoke.cont1: ; preds = %invoke.cont
invoke void @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE9push_backERKS2_(%"class.std::__cxx11::list"* %dataList, %struct._twoIntsStruct** nonnull align 8 dereferenceable(8) %data)
to label %invoke.cont2 unwind label %lpad
invoke.cont2: ; preds = %invoke.cont1
invoke void @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EEC2ERKS4_(%"class.std::__cxx11::list"* %agg.tmp, %"class.std::__cxx11::list"* nonnull align 8 dereferenceable(24) %dataList)
to label %invoke.cont3 unwind label %lpad
invoke.cont3: ; preds = %invoke.cont2
invoke void @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_loop_7311goodG2BSinkENSt7__cxx114listIP14_twoIntsStructSaIS3_EEE(%"class.std::__cxx11::list"* %agg.tmp)
to label %invoke.cont5 unwind label %lpad4
invoke.cont5: ; preds = %invoke.cont3
call void @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EED2Ev(%"class.std::__cxx11::list"* %agg.tmp) #8
call void @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EED2Ev(%"class.std::__cxx11::list"* %dataList) #8
ret void
lpad: ; preds = %invoke.cont2, %invoke.cont1, %invoke.cont, %entry
%0 = landingpad { i8*, i32 }
cleanup
%1 = extractvalue { i8*, i32 } %0, 0
store i8* %1, i8** %exn.slot, align 8
%2 = extractvalue { i8*, i32 } %0, 1
store i32 %2, i32* %ehselector.slot, align 4
br label %ehcleanup
lpad4: ; preds = %invoke.cont3
%3 = landingpad { i8*, i32 }
cleanup
%4 = extractvalue { i8*, i32 } %3, 0
store i8* %4, i8** %exn.slot, align 8
%5 = extractvalue { i8*, i32 } %3, 1
store i32 %5, i32* %ehselector.slot, align 4
call void @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EED2Ev(%"class.std::__cxx11::list"* %agg.tmp) #8
br label %ehcleanup
ehcleanup: ; preds = %lpad4, %lpad
call void @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EED2Ev(%"class.std::__cxx11::list"* %dataList) #8
br label %eh.resume
eh.resume: ; preds = %ehcleanup
%exn = load i8*, i8** %exn.slot, align 8
%sel = load i32, i32* %ehselector.slot, align 4
%lpad.val = insertvalue { i8*, i32 } undef, i8* %exn, 0
%lpad.val6 = insertvalue { i8*, i32 } %lpad.val, i32 %sel, 1
resume { i8*, i32 } %lpad.val6
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EEC2Ev(%"class.std::__cxx11::_List_base"* %this) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::__cxx11::_List_base"*, align 8
store %"class.std::__cxx11::_List_base"* %this, %"class.std::__cxx11::_List_base"** %this.addr, align 8
%this1 = load %"class.std::__cxx11::_List_base"*, %"class.std::__cxx11::_List_base"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::__cxx11::_List_base", %"class.std::__cxx11::_List_base"* %this1, i32 0, i32 0
call void @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE10_List_implC2Ev(%"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl"* %_M_impl) #8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE10_List_implC2Ev(%"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl"* %this) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl"*, align 8
store %"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl"* %this, %"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl"** %this.addr, align 8
%this1 = load %"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl"*, %"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl"** %this.addr, align 8
%0 = bitcast %"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl"* %this1 to %"class.std::allocator"*
call void @_ZNSaISt10_List_nodeIP14_twoIntsStructEEC2Ev(%"class.std::allocator"* %0) #8
%_M_node = getelementptr inbounds %"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl", %"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl"* %this1, i32 0, i32 0
call void @_ZNSt8__detail17_List_node_headerC2Ev(%"struct.std::__detail::_List_node_header"* %_M_node) #8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSaISt10_List_nodeIP14_twoIntsStructEEC2Ev(%"class.std::allocator"* %this) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::allocator"*, align 8
store %"class.std::allocator"* %this, %"class.std::allocator"** %this.addr, align 8
%this1 = load %"class.std::allocator"*, %"class.std::allocator"** %this.addr, align 8
%0 = bitcast %"class.std::allocator"* %this1 to %"class.__gnu_cxx::new_allocator"*
call void @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIP14_twoIntsStructEEC2Ev(%"class.__gnu_cxx::new_allocator"* %0) #8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt8__detail17_List_node_headerC2Ev(%"struct.std::__detail::_List_node_header"* %this) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::__detail::_List_node_header"*, align 8
store %"struct.std::__detail::_List_node_header"* %this, %"struct.std::__detail::_List_node_header"** %this.addr, align 8
%this1 = load %"struct.std::__detail::_List_node_header"*, %"struct.std::__detail::_List_node_header"** %this.addr, align 8
%0 = bitcast %"struct.std::__detail::_List_node_header"* %this1 to %"struct.std::__detail::_List_node_base"*
call void @_ZNSt8__detail17_List_node_header7_M_initEv(%"struct.std::__detail::_List_node_header"* %this1) #8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIP14_twoIntsStructEEC2Ev(%"class.__gnu_cxx::new_allocator"* %this) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
%this1 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt8__detail17_List_node_header7_M_initEv(%"struct.std::__detail::_List_node_header"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::__detail::_List_node_header"*, align 8
store %"struct.std::__detail::_List_node_header"* %this, %"struct.std::__detail::_List_node_header"** %this.addr, align 8
%this1 = load %"struct.std::__detail::_List_node_header"*, %"struct.std::__detail::_List_node_header"** %this.addr, align 8
%0 = bitcast %"struct.std::__detail::_List_node_header"* %this1 to %"struct.std::__detail::_List_node_base"*
%1 = bitcast %"struct.std::__detail::_List_node_header"* %this1 to %"struct.std::__detail::_List_node_base"*
%_M_prev = getelementptr inbounds %"struct.std::__detail::_List_node_base", %"struct.std::__detail::_List_node_base"* %1, i32 0, i32 1
store %"struct.std::__detail::_List_node_base"* %0, %"struct.std::__detail::_List_node_base"** %_M_prev, align 8
%2 = bitcast %"struct.std::__detail::_List_node_header"* %this1 to %"struct.std::__detail::_List_node_base"*
%_M_next = getelementptr inbounds %"struct.std::__detail::_List_node_base", %"struct.std::__detail::_List_node_base"* %2, i32 0, i32 0
store %"struct.std::__detail::_List_node_base"* %0, %"struct.std::__detail::_List_node_base"** %_M_next, align 8
%_M_size = getelementptr inbounds %"struct.std::__detail::_List_node_header", %"struct.std::__detail::_List_node_header"* %this1, i32 0, i32 1
store i64 0, i64* %_M_size, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EED2Ev(%"class.std::__cxx11::_List_base"* %this) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::__cxx11::_List_base"*, align 8
store %"class.std::__cxx11::_List_base"* %this, %"class.std::__cxx11::_List_base"** %this.addr, align 8
%this1 = load %"class.std::__cxx11::_List_base"*, %"class.std::__cxx11::_List_base"** %this.addr, align 8
call void @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE8_M_clearEv(%"class.std::__cxx11::_List_base"* %this1) #8
%_M_impl = getelementptr inbounds %"class.std::__cxx11::_List_base", %"class.std::__cxx11::_List_base"* %this1, i32 0, i32 0
call void @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE10_List_implD2Ev(%"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl"* %_M_impl) #8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE8_M_clearEv(%"class.std::__cxx11::_List_base"* %this) #1 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%this.addr = alloca %"class.std::__cxx11::_List_base"*, align 8
%__cur = alloca %"struct.std::__detail::_List_node_base"*, align 8
%__tmp = alloca %"struct.std::_List_node"*, align 8
%__val = alloca %struct._twoIntsStruct**, align 8
store %"class.std::__cxx11::_List_base"* %this, %"class.std::__cxx11::_List_base"** %this.addr, align 8
%this1 = load %"class.std::__cxx11::_List_base"*, %"class.std::__cxx11::_List_base"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::__cxx11::_List_base", %"class.std::__cxx11::_List_base"* %this1, i32 0, i32 0
%_M_node = getelementptr inbounds %"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl", %"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl"* %_M_impl, i32 0, i32 0
%0 = bitcast %"struct.std::__detail::_List_node_header"* %_M_node to %"struct.std::__detail::_List_node_base"*
%_M_next = getelementptr inbounds %"struct.std::__detail::_List_node_base", %"struct.std::__detail::_List_node_base"* %0, i32 0, i32 0
%1 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %_M_next, align 8
store %"struct.std::__detail::_List_node_base"* %1, %"struct.std::__detail::_List_node_base"** %__cur, align 8
br label %while.cond
while.cond: ; preds = %invoke.cont, %entry
%2 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %__cur, align 8
%_M_impl2 = getelementptr inbounds %"class.std::__cxx11::_List_base", %"class.std::__cxx11::_List_base"* %this1, i32 0, i32 0
%_M_node3 = getelementptr inbounds %"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl", %"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl"* %_M_impl2, i32 0, i32 0
%3 = bitcast %"struct.std::__detail::_List_node_header"* %_M_node3 to %"struct.std::__detail::_List_node_base"*
%cmp = icmp ne %"struct.std::__detail::_List_node_base"* %2, %3
br i1 %cmp, label %while.body, label %while.end
while.body: ; preds = %while.cond
%4 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %__cur, align 8
%5 = bitcast %"struct.std::__detail::_List_node_base"* %4 to %"struct.std::_List_node"*
store %"struct.std::_List_node"* %5, %"struct.std::_List_node"** %__tmp, align 8
%6 = load %"struct.std::_List_node"*, %"struct.std::_List_node"** %__tmp, align 8
%7 = bitcast %"struct.std::_List_node"* %6 to %"struct.std::__detail::_List_node_base"*
%_M_next4 = getelementptr inbounds %"struct.std::__detail::_List_node_base", %"struct.std::__detail::_List_node_base"* %7, i32 0, i32 0
%8 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %_M_next4, align 8
store %"struct.std::__detail::_List_node_base"* %8, %"struct.std::__detail::_List_node_base"** %__cur, align 8
%9 = load %"struct.std::_List_node"*, %"struct.std::_List_node"** %__tmp, align 8
%call = invoke %struct._twoIntsStruct** @_ZNSt10_List_nodeIP14_twoIntsStructE9_M_valptrEv(%"struct.std::_List_node"* %9)
to label %invoke.cont unwind label %terminate.lpad
invoke.cont: ; preds = %while.body
store %struct._twoIntsStruct** %call, %struct._twoIntsStruct*** %__val, align 8
%call5 = call nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE21_M_get_Node_allocatorEv(%"class.std::__cxx11::_List_base"* %this1) #8
%10 = load %struct._twoIntsStruct**, %struct._twoIntsStruct*** %__val, align 8
call void @_ZNSt16allocator_traitsISaISt10_List_nodeIP14_twoIntsStructEEE7destroyIS2_EEvRS4_PT_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %call5, %struct._twoIntsStruct** %10) #8
%11 = load %"struct.std::_List_node"*, %"struct.std::_List_node"** %__tmp, align 8
call void @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE11_M_put_nodeEPSt10_List_nodeIS2_E(%"class.std::__cxx11::_List_base"* %this1, %"struct.std::_List_node"* %11) #8
br label %while.cond
while.end: ; preds = %while.cond
ret void
terminate.lpad: ; preds = %while.body
%12 = landingpad { i8*, i32 }
catch i8* null
%13 = extractvalue { i8*, i32 } %12, 0
call void @__clang_call_terminate(i8* %13) #9
unreachable
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE10_List_implD2Ev(%"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl"* %this) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl"*, align 8
store %"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl"* %this, %"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl"** %this.addr, align 8
%this1 = load %"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl"*, %"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl"** %this.addr, align 8
%0 = bitcast %"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl"* %this1 to %"class.std::allocator"*
call void @_ZNSaISt10_List_nodeIP14_twoIntsStructEED2Ev(%"class.std::allocator"* %0) #8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %struct._twoIntsStruct** @_ZNSt10_List_nodeIP14_twoIntsStructE9_M_valptrEv(%"struct.std::_List_node"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_List_node"*, align 8
store %"struct.std::_List_node"* %this, %"struct.std::_List_node"** %this.addr, align 8
%this1 = load %"struct.std::_List_node"*, %"struct.std::_List_node"** %this.addr, align 8
%_M_storage = getelementptr inbounds %"struct.std::_List_node", %"struct.std::_List_node"* %this1, i32 0, i32 1
%call = call %struct._twoIntsStruct** @_ZN9__gnu_cxx16__aligned_membufIP14_twoIntsStructE6_M_ptrEv(%"struct.__gnu_cxx::__aligned_membuf"* %_M_storage) #8
ret %struct._twoIntsStruct** %call
}
; Function Attrs: noinline noreturn nounwind
define linkonce_odr hidden void @__clang_call_terminate(i8* %0) #3 comdat {
%2 = call i8* @__cxa_begin_catch(i8* %0) #8
call void @_ZSt9terminatev() #9
unreachable
}
declare dso_local i8* @__cxa_begin_catch(i8*)
declare dso_local void @_ZSt9terminatev()
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt16allocator_traitsISaISt10_List_nodeIP14_twoIntsStructEEE7destroyIS2_EEvRS4_PT_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a, %struct._twoIntsStruct** %__p) #1 comdat align 2 {
entry:
%__a.addr = alloca %"class.std::allocator"*, align 8
%__p.addr = alloca %struct._twoIntsStruct**, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
store %struct._twoIntsStruct** %__p, %struct._twoIntsStruct*** %__p.addr, align 8
%0 = load %"class.std::allocator"*, %"class.std::allocator"** %__a.addr, align 8
%1 = bitcast %"class.std::allocator"* %0 to %"class.__gnu_cxx::new_allocator"*
%2 = load %struct._twoIntsStruct**, %struct._twoIntsStruct*** %__p.addr, align 8
call void @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIP14_twoIntsStructEE7destroyIS3_EEvPT_(%"class.__gnu_cxx::new_allocator"* %1, %struct._twoIntsStruct** %2) #8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE21_M_get_Node_allocatorEv(%"class.std::__cxx11::_List_base"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::__cxx11::_List_base"*, align 8
store %"class.std::__cxx11::_List_base"* %this, %"class.std::__cxx11::_List_base"** %this.addr, align 8
%this1 = load %"class.std::__cxx11::_List_base"*, %"class.std::__cxx11::_List_base"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::__cxx11::_List_base", %"class.std::__cxx11::_List_base"* %this1, i32 0, i32 0
%0 = bitcast %"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl"* %_M_impl to %"class.std::allocator"*
ret %"class.std::allocator"* %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE11_M_put_nodeEPSt10_List_nodeIS2_E(%"class.std::__cxx11::_List_base"* %this, %"struct.std::_List_node"* %__p) #1 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%this.addr = alloca %"class.std::__cxx11::_List_base"*, align 8
%__p.addr = alloca %"struct.std::_List_node"*, align 8
store %"class.std::__cxx11::_List_base"* %this, %"class.std::__cxx11::_List_base"** %this.addr, align 8
store %"struct.std::_List_node"* %__p, %"struct.std::_List_node"** %__p.addr, align 8
%this1 = load %"class.std::__cxx11::_List_base"*, %"class.std::__cxx11::_List_base"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::__cxx11::_List_base", %"class.std::__cxx11::_List_base"* %this1, i32 0, i32 0
%0 = bitcast %"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl"* %_M_impl to %"class.std::allocator"*
%1 = load %"struct.std::_List_node"*, %"struct.std::_List_node"** %__p.addr, align 8
invoke void @_ZNSt16allocator_traitsISaISt10_List_nodeIP14_twoIntsStructEEE10deallocateERS4_PS3_m(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %0, %"struct.std::_List_node"* %1, i64 1)
to label %invoke.cont unwind label %terminate.lpad
invoke.cont: ; preds = %entry
ret void
terminate.lpad: ; preds = %entry
%2 = landingpad { i8*, i32 }
catch i8* null
%3 = extractvalue { i8*, i32 } %2, 0
call void @__clang_call_terminate(i8* %3) #9
unreachable
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %struct._twoIntsStruct** @_ZN9__gnu_cxx16__aligned_membufIP14_twoIntsStructE6_M_ptrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.__gnu_cxx::__aligned_membuf"*, align 8
store %"struct.__gnu_cxx::__aligned_membuf"* %this, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%this1 = load %"struct.__gnu_cxx::__aligned_membuf"*, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%call = call i8* @_ZN9__gnu_cxx16__aligned_membufIP14_twoIntsStructE7_M_addrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this1) #8
%0 = bitcast i8* %call to %struct._twoIntsStruct**
ret %struct._twoIntsStruct** %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i8* @_ZN9__gnu_cxx16__aligned_membufIP14_twoIntsStructE7_M_addrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.__gnu_cxx::__aligned_membuf"*, align 8
store %"struct.__gnu_cxx::__aligned_membuf"* %this, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%this1 = load %"struct.__gnu_cxx::__aligned_membuf"*, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%_M_storage = getelementptr inbounds %"struct.__gnu_cxx::__aligned_membuf", %"struct.__gnu_cxx::__aligned_membuf"* %this1, i32 0, i32 0
%0 = bitcast [8 x i8]* %_M_storage to i8*
ret i8* %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIP14_twoIntsStructEE7destroyIS3_EEvPT_(%"class.__gnu_cxx::new_allocator"* %this, %struct._twoIntsStruct** %__p) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
%__p.addr = alloca %struct._twoIntsStruct**, align 8
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
store %struct._twoIntsStruct** %__p, %struct._twoIntsStruct*** %__p.addr, align 8
%this1 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt16allocator_traitsISaISt10_List_nodeIP14_twoIntsStructEEE10deallocateERS4_PS3_m(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a, %"struct.std::_List_node"* %__p, i64 %__n) #0 comdat align 2 {
entry:
%__a.addr = alloca %"class.std::allocator"*, align 8
%__p.addr = alloca %"struct.std::_List_node"*, align 8
%__n.addr = alloca i64, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
store %"struct.std::_List_node"* %__p, %"struct.std::_List_node"** %__p.addr, align 8
store i64 %__n, i64* %__n.addr, align 8
%0 = load %"class.std::allocator"*, %"class.std::allocator"** %__a.addr, align 8
%1 = bitcast %"class.std::allocator"* %0 to %"class.__gnu_cxx::new_allocator"*
%2 = load %"struct.std::_List_node"*, %"struct.std::_List_node"** %__p.addr, align 8
%3 = load i64, i64* %__n.addr, align 8
call void @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIP14_twoIntsStructEE10deallocateEPS4_m(%"class.__gnu_cxx::new_allocator"* %1, %"struct.std::_List_node"* %2, i64 %3)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIP14_twoIntsStructEE10deallocateEPS4_m(%"class.__gnu_cxx::new_allocator"* %this, %"struct.std::_List_node"* %__p, i64 %__t) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
%__p.addr = alloca %"struct.std::_List_node"*, align 8
%__t.addr = alloca i64, align 8
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
store %"struct.std::_List_node"* %__p, %"struct.std::_List_node"** %__p.addr, align 8
store i64 %__t, i64* %__t.addr, align 8
%this1 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
%0 = load %"struct.std::_List_node"*, %"struct.std::_List_node"** %__p.addr, align 8
%1 = bitcast %"struct.std::_List_node"* %0 to i8*
call void @_ZdlPv(i8* %1) #8
ret void
}
; Function Attrs: nobuiltin nounwind
declare dso_local void @_ZdlPv(i8*) #4
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIP14_twoIntsStructEED2Ev(%"class.__gnu_cxx::new_allocator"* %this) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
%this1 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
ret void
}
declare dso_local void @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_loop_7311goodG2BSinkENSt7__cxx114listIP14_twoIntsStructSaIS3_EEE(%"class.std::__cxx11::list"*) #2
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE9_M_insertIJRKS2_EEEvSt14_List_iteratorIS2_EDpOT_(%"class.std::__cxx11::list"* %this, %"struct.std::__detail::_List_node_base"* %__position.coerce, %struct._twoIntsStruct** nonnull align 8 dereferenceable(8) %__args) #0 comdat align 2 {
entry:
%__position = alloca %"struct.std::_List_iterator", align 8
%this.addr = alloca %"class.std::__cxx11::list"*, align 8
%__args.addr = alloca %struct._twoIntsStruct**, align 8
%__tmp = alloca %"struct.std::_List_node"*, align 8
%coerce.dive = getelementptr inbounds %"struct.std::_List_iterator", %"struct.std::_List_iterator"* %__position, i32 0, i32 0
store %"struct.std::__detail::_List_node_base"* %__position.coerce, %"struct.std::__detail::_List_node_base"** %coerce.dive, align 8
store %"class.std::__cxx11::list"* %this, %"class.std::__cxx11::list"** %this.addr, align 8
store %struct._twoIntsStruct** %__args, %struct._twoIntsStruct*** %__args.addr, align 8
%this1 = load %"class.std::__cxx11::list"*, %"class.std::__cxx11::list"** %this.addr, align 8
%0 = load %struct._twoIntsStruct**, %struct._twoIntsStruct*** %__args.addr, align 8
%call = call nonnull align 8 dereferenceable(8) %struct._twoIntsStruct** @_ZSt7forwardIRKP14_twoIntsStructEOT_RNSt16remove_referenceIS4_E4typeE(%struct._twoIntsStruct** nonnull align 8 dereferenceable(8) %0) #8
%call2 = call %"struct.std::_List_node"* @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE14_M_create_nodeIJRKS2_EEEPSt10_List_nodeIS2_EDpOT_(%"class.std::__cxx11::list"* %this1, %struct._twoIntsStruct** nonnull align 8 dereferenceable(8) %call)
store %"struct.std::_List_node"* %call2, %"struct.std::_List_node"** %__tmp, align 8
%1 = load %"struct.std::_List_node"*, %"struct.std::_List_node"** %__tmp, align 8
%2 = bitcast %"struct.std::_List_node"* %1 to %"struct.std::__detail::_List_node_base"*
%_M_node = getelementptr inbounds %"struct.std::_List_iterator", %"struct.std::_List_iterator"* %__position, i32 0, i32 0
%3 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %_M_node, align 8
call void @_ZNSt8__detail15_List_node_base7_M_hookEPS0_(%"struct.std::__detail::_List_node_base"* %2, %"struct.std::__detail::_List_node_base"* %3) #8
%4 = bitcast %"class.std::__cxx11::list"* %this1 to %"class.std::__cxx11::_List_base"*
call void @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE11_M_inc_sizeEm(%"class.std::__cxx11::_List_base"* %4, i64 1)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::__detail::_List_node_base"* @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE3endEv(%"class.std::__cxx11::list"* %this) #1 comdat align 2 {
entry:
%retval = alloca %"struct.std::_List_iterator", align 8
%this.addr = alloca %"class.std::__cxx11::list"*, align 8
store %"class.std::__cxx11::list"* %this, %"class.std::__cxx11::list"** %this.addr, align 8
%this1 = load %"class.std::__cxx11::list"*, %"class.std::__cxx11::list"** %this.addr, align 8
%0 = bitcast %"class.std::__cxx11::list"* %this1 to %"class.std::__cxx11::_List_base"*
%_M_impl = getelementptr inbounds %"class.std::__cxx11::_List_base", %"class.std::__cxx11::_List_base"* %0, i32 0, i32 0
%_M_node = getelementptr inbounds %"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl", %"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl"* %_M_impl, i32 0, i32 0
%1 = bitcast %"struct.std::__detail::_List_node_header"* %_M_node to %"struct.std::__detail::_List_node_base"*
call void @_ZNSt14_List_iteratorIP14_twoIntsStructEC2EPNSt8__detail15_List_node_baseE(%"struct.std::_List_iterator"* %retval, %"struct.std::__detail::_List_node_base"* %1) #8
%coerce.dive = getelementptr inbounds %"struct.std::_List_iterator", %"struct.std::_List_iterator"* %retval, i32 0, i32 0
%2 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %coerce.dive, align 8
ret %"struct.std::__detail::_List_node_base"* %2
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_List_node"* @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE14_M_create_nodeIJRKS2_EEEPSt10_List_nodeIS2_EDpOT_(%"class.std::__cxx11::list"* %this, %struct._twoIntsStruct** nonnull align 8 dereferenceable(8) %__args) #0 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%this.addr = alloca %"class.std::__cxx11::list"*, align 8
%__args.addr = alloca %struct._twoIntsStruct**, align 8
%__p = alloca %"struct.std::_List_node"*, align 8
%__alloc = alloca %"class.std::allocator"*, align 8
%__guard = alloca %"struct.std::__allocated_ptr", align 8
%exn.slot = alloca i8*, align 8
%ehselector.slot = alloca i32, align 4
store %"class.std::__cxx11::list"* %this, %"class.std::__cxx11::list"** %this.addr, align 8
store %struct._twoIntsStruct** %__args, %struct._twoIntsStruct*** %__args.addr, align 8
%this1 = load %"class.std::__cxx11::list"*, %"class.std::__cxx11::list"** %this.addr, align 8
%0 = bitcast %"class.std::__cxx11::list"* %this1 to %"class.std::__cxx11::_List_base"*
%call = call %"struct.std::_List_node"* @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE11_M_get_nodeEv(%"class.std::__cxx11::_List_base"* %0)
store %"struct.std::_List_node"* %call, %"struct.std::_List_node"** %__p, align 8
%1 = bitcast %"class.std::__cxx11::list"* %this1 to %"class.std::__cxx11::_List_base"*
%call2 = call nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE21_M_get_Node_allocatorEv(%"class.std::__cxx11::_List_base"* %1) #8
store %"class.std::allocator"* %call2, %"class.std::allocator"** %__alloc, align 8
%2 = load %"class.std::allocator"*, %"class.std::allocator"** %__alloc, align 8
%3 = load %"struct.std::_List_node"*, %"struct.std::_List_node"** %__p, align 8
call void @_ZNSt15__allocated_ptrISaISt10_List_nodeIP14_twoIntsStructEEEC2ERS4_PS3_(%"struct.std::__allocated_ptr"* %__guard, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %2, %"struct.std::_List_node"* %3) #8
%4 = load %"class.std::allocator"*, %"class.std::allocator"** %__alloc, align 8
%5 = load %"struct.std::_List_node"*, %"struct.std::_List_node"** %__p, align 8
%call3 = invoke %struct._twoIntsStruct** @_ZNSt10_List_nodeIP14_twoIntsStructE9_M_valptrEv(%"struct.std::_List_node"* %5)
to label %invoke.cont unwind label %lpad
invoke.cont: ; preds = %entry
%6 = load %struct._twoIntsStruct**, %struct._twoIntsStruct*** %__args.addr, align 8
%call4 = call nonnull align 8 dereferenceable(8) %struct._twoIntsStruct** @_ZSt7forwardIRKP14_twoIntsStructEOT_RNSt16remove_referenceIS4_E4typeE(%struct._twoIntsStruct** nonnull align 8 dereferenceable(8) %6) #8
call void @_ZNSt16allocator_traitsISaISt10_List_nodeIP14_twoIntsStructEEE9constructIS2_JRKS2_EEEvRS4_PT_DpOT0_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %4, %struct._twoIntsStruct** %call3, %struct._twoIntsStruct** nonnull align 8 dereferenceable(8) %call4) #8
%call5 = call nonnull align 8 dereferenceable(16) %"struct.std::__allocated_ptr"* @_ZNSt15__allocated_ptrISaISt10_List_nodeIP14_twoIntsStructEEEaSEDn(%"struct.std::__allocated_ptr"* %__guard, i8* null) #8
%7 = load %"struct.std::_List_node"*, %"struct.std::_List_node"** %__p, align 8
call void @_ZNSt15__allocated_ptrISaISt10_List_nodeIP14_twoIntsStructEEED2Ev(%"struct.std::__allocated_ptr"* %__guard) #8
ret %"struct.std::_List_node"* %7
lpad: ; preds = %entry
%8 = landingpad { i8*, i32 }
cleanup
%9 = extractvalue { i8*, i32 } %8, 0
store i8* %9, i8** %exn.slot, align 8
%10 = extractvalue { i8*, i32 } %8, 1
store i32 %10, i32* %ehselector.slot, align 4
call void @_ZNSt15__allocated_ptrISaISt10_List_nodeIP14_twoIntsStructEEED2Ev(%"struct.std::__allocated_ptr"* %__guard) #8
br label %eh.resume
eh.resume: ; preds = %lpad
%exn = load i8*, i8** %exn.slot, align 8
%sel = load i32, i32* %ehselector.slot, align 4
%lpad.val = insertvalue { i8*, i32 } undef, i8* %exn, 0
%lpad.val6 = insertvalue { i8*, i32 } %lpad.val, i32 %sel, 1
resume { i8*, i32 } %lpad.val6
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) %struct._twoIntsStruct** @_ZSt7forwardIRKP14_twoIntsStructEOT_RNSt16remove_referenceIS4_E4typeE(%struct._twoIntsStruct** nonnull align 8 dereferenceable(8) %__t) #1 comdat {
entry:
%__t.addr = alloca %struct._twoIntsStruct**, align 8
store %struct._twoIntsStruct** %__t, %struct._twoIntsStruct*** %__t.addr, align 8
%0 = load %struct._twoIntsStruct**, %struct._twoIntsStruct*** %__t.addr, align 8
ret %struct._twoIntsStruct** %0
}
; Function Attrs: nounwind
declare dso_local void @_ZNSt8__detail15_List_node_base7_M_hookEPS0_(%"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"*) #5
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE11_M_inc_sizeEm(%"class.std::__cxx11::_List_base"* %this, i64 %__n) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::__cxx11::_List_base"*, align 8
%__n.addr = alloca i64, align 8
store %"class.std::__cxx11::_List_base"* %this, %"class.std::__cxx11::_List_base"** %this.addr, align 8
store i64 %__n, i64* %__n.addr, align 8
%this1 = load %"class.std::__cxx11::_List_base"*, %"class.std::__cxx11::_List_base"** %this.addr, align 8
%0 = load i64, i64* %__n.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::__cxx11::_List_base", %"class.std::__cxx11::_List_base"* %this1, i32 0, i32 0
%_M_node = getelementptr inbounds %"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl", %"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl"* %_M_impl, i32 0, i32 0
%_M_size = getelementptr inbounds %"struct.std::__detail::_List_node_header", %"struct.std::__detail::_List_node_header"* %_M_node, i32 0, i32 1
%1 = load i64, i64* %_M_size, align 8
%add = add i64 %1, %0
store i64 %add, i64* %_M_size, align 8
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_List_node"* @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE11_M_get_nodeEv(%"class.std::__cxx11::_List_base"* %this) #0 comdat align 2 {
entry:
%this.addr = alloca %"class.std::__cxx11::_List_base"*, align 8
store %"class.std::__cxx11::_List_base"* %this, %"class.std::__cxx11::_List_base"** %this.addr, align 8
%this1 = load %"class.std::__cxx11::_List_base"*, %"class.std::__cxx11::_List_base"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::__cxx11::_List_base", %"class.std::__cxx11::_List_base"* %this1, i32 0, i32 0
%0 = bitcast %"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl"* %_M_impl to %"class.std::allocator"*
%call = call %"struct.std::_List_node"* @_ZNSt16allocator_traitsISaISt10_List_nodeIP14_twoIntsStructEEE8allocateERS4_m(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %0, i64 1)
ret %"struct.std::_List_node"* %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt15__allocated_ptrISaISt10_List_nodeIP14_twoIntsStructEEEC2ERS4_PS3_(%"struct.std::__allocated_ptr"* %this, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a, %"struct.std::_List_node"* %__ptr) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::__allocated_ptr"*, align 8
%__a.addr = alloca %"class.std::allocator"*, align 8
%__ptr.addr = alloca %"struct.std::_List_node"*, align 8
store %"struct.std::__allocated_ptr"* %this, %"struct.std::__allocated_ptr"** %this.addr, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
store %"struct.std::_List_node"* %__ptr, %"struct.std::_List_node"** %__ptr.addr, align 8
%this1 = load %"struct.std::__allocated_ptr"*, %"struct.std::__allocated_ptr"** %this.addr, align 8
%_M_alloc = getelementptr inbounds %"struct.std::__allocated_ptr", %"struct.std::__allocated_ptr"* %this1, i32 0, i32 0
%0 = load %"class.std::allocator"*, %"class.std::allocator"** %__a.addr, align 8
%call = call %"class.std::allocator"* @_ZSt11__addressofISaISt10_List_nodeIP14_twoIntsStructEEEPT_RS5_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %0) #8
store %"class.std::allocator"* %call, %"class.std::allocator"** %_M_alloc, align 8
%_M_ptr = getelementptr inbounds %"struct.std::__allocated_ptr", %"struct.std::__allocated_ptr"* %this1, i32 0, i32 1
%1 = load %"struct.std::_List_node"*, %"struct.std::_List_node"** %__ptr.addr, align 8
store %"struct.std::_List_node"* %1, %"struct.std::_List_node"** %_M_ptr, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt16allocator_traitsISaISt10_List_nodeIP14_twoIntsStructEEE9constructIS2_JRKS2_EEEvRS4_PT_DpOT0_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a, %struct._twoIntsStruct** %__p, %struct._twoIntsStruct** nonnull align 8 dereferenceable(8) %__args) #1 comdat align 2 {
entry:
%__a.addr = alloca %"class.std::allocator"*, align 8
%__p.addr = alloca %struct._twoIntsStruct**, align 8
%__args.addr = alloca %struct._twoIntsStruct**, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
store %struct._twoIntsStruct** %__p, %struct._twoIntsStruct*** %__p.addr, align 8
store %struct._twoIntsStruct** %__args, %struct._twoIntsStruct*** %__args.addr, align 8
%0 = load %"class.std::allocator"*, %"class.std::allocator"** %__a.addr, align 8
%1 = bitcast %"class.std::allocator"* %0 to %"class.__gnu_cxx::new_allocator"*
%2 = load %struct._twoIntsStruct**, %struct._twoIntsStruct*** %__p.addr, align 8
%3 = load %struct._twoIntsStruct**, %struct._twoIntsStruct*** %__args.addr, align 8
%call = call nonnull align 8 dereferenceable(8) %struct._twoIntsStruct** @_ZSt7forwardIRKP14_twoIntsStructEOT_RNSt16remove_referenceIS4_E4typeE(%struct._twoIntsStruct** nonnull align 8 dereferenceable(8) %3) #8
call void @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIP14_twoIntsStructEE9constructIS3_JRKS3_EEEvPT_DpOT0_(%"class.__gnu_cxx::new_allocator"* %1, %struct._twoIntsStruct** %2, %struct._twoIntsStruct** nonnull align 8 dereferenceable(8) %call) #8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(16) %"struct.std::__allocated_ptr"* @_ZNSt15__allocated_ptrISaISt10_List_nodeIP14_twoIntsStructEEEaSEDn(%"struct.std::__allocated_ptr"* %this, i8* %0) #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::__allocated_ptr"*, align 8
%.addr = alloca i8*, align 8
store %"struct.std::__allocated_ptr"* %this, %"struct.std::__allocated_ptr"** %this.addr, align 8
store i8* %0, i8** %.addr, align 8
%this1 = load %"struct.std::__allocated_ptr"*, %"struct.std::__allocated_ptr"** %this.addr, align 8
%_M_ptr = getelementptr inbounds %"struct.std::__allocated_ptr", %"struct.std::__allocated_ptr"* %this1, i32 0, i32 1
store %"struct.std::_List_node"* null, %"struct.std::_List_node"** %_M_ptr, align 8
ret %"struct.std::__allocated_ptr"* %this1
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt15__allocated_ptrISaISt10_List_nodeIP14_twoIntsStructEEED2Ev(%"struct.std::__allocated_ptr"* %this) unnamed_addr #1 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%this.addr = alloca %"struct.std::__allocated_ptr"*, align 8
store %"struct.std::__allocated_ptr"* %this, %"struct.std::__allocated_ptr"** %this.addr, align 8
%this1 = load %"struct.std::__allocated_ptr"*, %"struct.std::__allocated_ptr"** %this.addr, align 8
%_M_ptr = getelementptr inbounds %"struct.std::__allocated_ptr", %"struct.std::__allocated_ptr"* %this1, i32 0, i32 1
%0 = load %"struct.std::_List_node"*, %"struct.std::_List_node"** %_M_ptr, align 8
%cmp = icmp ne %"struct.std::_List_node"* %0, null
br i1 %cmp, label %if.then, label %if.end
if.then: ; preds = %entry
%_M_alloc = getelementptr inbounds %"struct.std::__allocated_ptr", %"struct.std::__allocated_ptr"* %this1, i32 0, i32 0
%1 = load %"class.std::allocator"*, %"class.std::allocator"** %_M_alloc, align 8
%_M_ptr2 = getelementptr inbounds %"struct.std::__allocated_ptr", %"struct.std::__allocated_ptr"* %this1, i32 0, i32 1
%2 = load %"struct.std::_List_node"*, %"struct.std::_List_node"** %_M_ptr2, align 8
invoke void @_ZNSt16allocator_traitsISaISt10_List_nodeIP14_twoIntsStructEEE10deallocateERS4_PS3_m(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %1, %"struct.std::_List_node"* %2, i64 1)
to label %invoke.cont unwind label %terminate.lpad
invoke.cont: ; preds = %if.then
br label %if.end
if.end: ; preds = %invoke.cont, %entry
ret void
terminate.lpad: ; preds = %if.then
%3 = landingpad { i8*, i32 }
catch i8* null
%4 = extractvalue { i8*, i32 } %3, 0
call void @__clang_call_terminate(i8* %4) #9
unreachable
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_List_node"* @_ZNSt16allocator_traitsISaISt10_List_nodeIP14_twoIntsStructEEE8allocateERS4_m(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a, i64 %__n) #0 comdat align 2 {
entry:
%__a.addr = alloca %"class.std::allocator"*, align 8
%__n.addr = alloca i64, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
store i64 %__n, i64* %__n.addr, align 8
%0 = load %"class.std::allocator"*, %"class.std::allocator"** %__a.addr, align 8
%1 = bitcast %"class.std::allocator"* %0 to %"class.__gnu_cxx::new_allocator"*
%2 = load i64, i64* %__n.addr, align 8
%call = call %"struct.std::_List_node"* @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIP14_twoIntsStructEE8allocateEmPKv(%"class.__gnu_cxx::new_allocator"* %1, i64 %2, i8* null)
ret %"struct.std::_List_node"* %call
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_List_node"* @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIP14_twoIntsStructEE8allocateEmPKv(%"class.__gnu_cxx::new_allocator"* %this, i64 %__n, i8* %0) #0 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
%__n.addr = alloca i64, align 8
%.addr = alloca i8*, align 8
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
store i64 %__n, i64* %__n.addr, align 8
store i8* %0, i8** %.addr, align 8
%this1 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
%1 = load i64, i64* %__n.addr, align 8
%call = call i64 @_ZNK9__gnu_cxx13new_allocatorISt10_List_nodeIP14_twoIntsStructEE11_M_max_sizeEv(%"class.__gnu_cxx::new_allocator"* %this1) #8
%cmp = icmp ugt i64 %1, %call
br i1 %cmp, label %if.then, label %if.end4
if.then: ; preds = %entry
%2 = load i64, i64* %__n.addr, align 8
%cmp2 = icmp ugt i64 %2, 768614336404564650
br i1 %cmp2, label %if.then3, label %if.end
if.then3: ; preds = %if.then
call void @_ZSt28__throw_bad_array_new_lengthv() #10
unreachable
if.end: ; preds = %if.then
call void @_ZSt17__throw_bad_allocv() #10
unreachable
if.end4: ; preds = %entry
%3 = load i64, i64* %__n.addr, align 8
%mul = mul i64 %3, 24
%call5 = call noalias nonnull i8* @_Znwm(i64 %mul) #11
%4 = bitcast i8* %call5 to %"struct.std::_List_node"*
ret %"struct.std::_List_node"* %4
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i64 @_ZNK9__gnu_cxx13new_allocatorISt10_List_nodeIP14_twoIntsStructEE11_M_max_sizeEv(%"class.__gnu_cxx::new_allocator"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
%this1 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
ret i64 384307168202282325
}
; Function Attrs: noreturn
declare dso_local void @_ZSt28__throw_bad_array_new_lengthv() #6
; Function Attrs: noreturn
declare dso_local void @_ZSt17__throw_bad_allocv() #6
; Function Attrs: nobuiltin allocsize(0)
declare dso_local nonnull i8* @_Znwm(i64) #7
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"class.std::allocator"* @_ZSt11__addressofISaISt10_List_nodeIP14_twoIntsStructEEEPT_RS5_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %__r) #1 comdat {
entry:
%__r.addr = alloca %"class.std::allocator"*, align 8
store %"class.std::allocator"* %__r, %"class.std::allocator"** %__r.addr, align 8
%0 = load %"class.std::allocator"*, %"class.std::allocator"** %__r.addr, align 8
ret %"class.std::allocator"* %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIP14_twoIntsStructEE9constructIS3_JRKS3_EEEvPT_DpOT0_(%"class.__gnu_cxx::new_allocator"* %this, %struct._twoIntsStruct** %__p, %struct._twoIntsStruct** nonnull align 8 dereferenceable(8) %__args) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
%__p.addr = alloca %struct._twoIntsStruct**, align 8
%__args.addr = alloca %struct._twoIntsStruct**, align 8
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
store %struct._twoIntsStruct** %__p, %struct._twoIntsStruct*** %__p.addr, align 8
store %struct._twoIntsStruct** %__args, %struct._twoIntsStruct*** %__args.addr, align 8
%this1 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
%0 = load %struct._twoIntsStruct**, %struct._twoIntsStruct*** %__p.addr, align 8
%1 = bitcast %struct._twoIntsStruct** %0 to i8*
%2 = bitcast i8* %1 to %struct._twoIntsStruct**
%3 = load %struct._twoIntsStruct**, %struct._twoIntsStruct*** %__args.addr, align 8
%call = call nonnull align 8 dereferenceable(8) %struct._twoIntsStruct** @_ZSt7forwardIRKP14_twoIntsStructEOT_RNSt16remove_referenceIS4_E4typeE(%struct._twoIntsStruct** nonnull align 8 dereferenceable(8) %3) #8
%4 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %call, align 8
store %struct._twoIntsStruct* %4, %struct._twoIntsStruct** %2, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt14_List_iteratorIP14_twoIntsStructEC2EPNSt8__detail15_List_node_baseE(%"struct.std::_List_iterator"* %this, %"struct.std::__detail::_List_node_base"* %__x) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_List_iterator"*, align 8
%__x.addr = alloca %"struct.std::__detail::_List_node_base"*, align 8
store %"struct.std::_List_iterator"* %this, %"struct.std::_List_iterator"** %this.addr, align 8
store %"struct.std::__detail::_List_node_base"* %__x, %"struct.std::__detail::_List_node_base"** %__x.addr, align 8
%this1 = load %"struct.std::_List_iterator"*, %"struct.std::_List_iterator"** %this.addr, align 8
%_M_node = getelementptr inbounds %"struct.std::_List_iterator", %"struct.std::_List_iterator"* %this1, i32 0, i32 0
%0 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %__x.addr, align 8
store %"struct.std::__detail::_List_node_base"* %0, %"struct.std::__detail::_List_node_base"** %_M_node, align 8
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx14__alloc_traitsISaISt10_List_nodeIP14_twoIntsStructEES4_E17_S_select_on_copyERKS5_(%"class.std::allocator"* noalias sret align 1 %agg.result, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a) #0 comdat align 2 {
entry:
%result.ptr = alloca i8*, align 8
%__a.addr = alloca %"class.std::allocator"*, align 8
%0 = bitcast %"class.std::allocator"* %agg.result to i8*
store i8* %0, i8** %result.ptr, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
%1 = load %"class.std::allocator"*, %"class.std::allocator"** %__a.addr, align 8
call void @_ZNSt16allocator_traitsISaISt10_List_nodeIP14_twoIntsStructEEE37select_on_container_copy_constructionERKS4_(%"class.std::allocator"* sret align 1 %agg.result, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %1)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZNKSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE21_M_get_Node_allocatorEv(%"class.std::__cxx11::_List_base"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::__cxx11::_List_base"*, align 8
store %"class.std::__cxx11::_List_base"* %this, %"class.std::__cxx11::_List_base"** %this.addr, align 8
%this1 = load %"class.std::__cxx11::_List_base"*, %"class.std::__cxx11::_List_base"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::__cxx11::_List_base", %"class.std::__cxx11::_List_base"* %this1, i32 0, i32 0
%0 = bitcast %"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl"* %_M_impl to %"class.std::allocator"*
ret %"class.std::allocator"* %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EEC2EOSaISt10_List_nodeIS2_EE(%"class.std::__cxx11::_List_base"* %this, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::__cxx11::_List_base"*, align 8
%__a.addr = alloca %"class.std::allocator"*, align 8
store %"class.std::__cxx11::_List_base"* %this, %"class.std::__cxx11::_List_base"** %this.addr, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
%this1 = load %"class.std::__cxx11::_List_base"*, %"class.std::__cxx11::_List_base"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::__cxx11::_List_base", %"class.std::__cxx11::_List_base"* %this1, i32 0, i32 0
%0 = load %"class.std::allocator"*, %"class.std::allocator"** %__a.addr, align 8
%call = call nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZSt4moveIRSaISt10_List_nodeIP14_twoIntsStructEEEONSt16remove_referenceIT_E4typeEOS7_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %0) #8
call void @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE10_List_implC2EOSaISt10_List_nodeIS2_EE(%"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl"* %_M_impl, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %call) #8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSaISt10_List_nodeIP14_twoIntsStructEED2Ev(%"class.std::allocator"* %this) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::allocator"*, align 8
store %"class.std::allocator"* %this, %"class.std::allocator"** %this.addr, align 8
%this1 = load %"class.std::allocator"*, %"class.std::allocator"** %this.addr, align 8
%0 = bitcast %"class.std::allocator"* %this1 to %"class.__gnu_cxx::new_allocator"*
call void @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIP14_twoIntsStructEED2Ev(%"class.__gnu_cxx::new_allocator"* %0) #8
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE22_M_initialize_dispatchISt20_List_const_iteratorIS2_EEEvT_S8_St12__false_type(%"class.std::__cxx11::list"* %this, %"struct.std::__detail::_List_node_base"* %__first.coerce, %"struct.std::__detail::_List_node_base"* %__last.coerce) #0 comdat align 2 {
entry:
%__first = alloca %"struct.std::_List_const_iterator", align 8
%__last = alloca %"struct.std::_List_const_iterator", align 8
%0 = alloca %"struct.std::__false_type", align 1
%this.addr = alloca %"class.std::__cxx11::list"*, align 8
%coerce.dive = getelementptr inbounds %"struct.std::_List_const_iterator", %"struct.std::_List_const_iterator"* %__first, i32 0, i32 0
store %"struct.std::__detail::_List_node_base"* %__first.coerce, %"struct.std::__detail::_List_node_base"** %coerce.dive, align 8
%coerce.dive1 = getelementptr inbounds %"struct.std::_List_const_iterator", %"struct.std::_List_const_iterator"* %__last, i32 0, i32 0
store %"struct.std::__detail::_List_node_base"* %__last.coerce, %"struct.std::__detail::_List_node_base"** %coerce.dive1, align 8
store %"class.std::__cxx11::list"* %this, %"class.std::__cxx11::list"** %this.addr, align 8
%this2 = load %"class.std::__cxx11::list"*, %"class.std::__cxx11::list"** %this.addr, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %entry
%call = call zeroext i1 @_ZStneRKSt20_List_const_iteratorIP14_twoIntsStructES4_(%"struct.std::_List_const_iterator"* nonnull align 8 dereferenceable(8) %__first, %"struct.std::_List_const_iterator"* nonnull align 8 dereferenceable(8) %__last) #8
br i1 %call, label %for.body, label %for.end
for.body: ; preds = %for.cond
%call3 = call nonnull align 8 dereferenceable(8) %struct._twoIntsStruct** @_ZNKSt20_List_const_iteratorIP14_twoIntsStructEdeEv(%"struct.std::_List_const_iterator"* %__first) #8
call void @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE12emplace_backIJRKS2_EEEvDpOT_(%"class.std::__cxx11::list"* %this2, %struct._twoIntsStruct** nonnull align 8 dereferenceable(8) %call3)
br label %for.inc
for.inc: ; preds = %for.body
%call4 = call nonnull align 8 dereferenceable(8) %"struct.std::_List_const_iterator"* @_ZNSt20_List_const_iteratorIP14_twoIntsStructEppEv(%"struct.std::_List_const_iterator"* %__first) #8
br label %for.cond
for.end: ; preds = %for.cond
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::__detail::_List_node_base"* @_ZNKSt7__cxx114listIP14_twoIntsStructSaIS2_EE5beginEv(%"class.std::__cxx11::list"* %this) #1 comdat align 2 {
entry:
%retval = alloca %"struct.std::_List_const_iterator", align 8
%this.addr = alloca %"class.std::__cxx11::list"*, align 8
store %"class.std::__cxx11::list"* %this, %"class.std::__cxx11::list"** %this.addr, align 8
%this1 = load %"class.std::__cxx11::list"*, %"class.std::__cxx11::list"** %this.addr, align 8
%0 = bitcast %"class.std::__cxx11::list"* %this1 to %"class.std::__cxx11::_List_base"*
%_M_impl = getelementptr inbounds %"class.std::__cxx11::_List_base", %"class.std::__cxx11::_List_base"* %0, i32 0, i32 0
%_M_node = getelementptr inbounds %"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl", %"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl"* %_M_impl, i32 0, i32 0
%1 = bitcast %"struct.std::__detail::_List_node_header"* %_M_node to %"struct.std::__detail::_List_node_base"*
%_M_next = getelementptr inbounds %"struct.std::__detail::_List_node_base", %"struct.std::__detail::_List_node_base"* %1, i32 0, i32 0
%2 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %_M_next, align 8
call void @_ZNSt20_List_const_iteratorIP14_twoIntsStructEC2EPKNSt8__detail15_List_node_baseE(%"struct.std::_List_const_iterator"* %retval, %"struct.std::__detail::_List_node_base"* %2) #8
%coerce.dive = getelementptr inbounds %"struct.std::_List_const_iterator", %"struct.std::_List_const_iterator"* %retval, i32 0, i32 0
%3 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %coerce.dive, align 8
ret %"struct.std::__detail::_List_node_base"* %3
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::__detail::_List_node_base"* @_ZNKSt7__cxx114listIP14_twoIntsStructSaIS2_EE3endEv(%"class.std::__cxx11::list"* %this) #1 comdat align 2 {
entry:
%retval = alloca %"struct.std::_List_const_iterator", align 8
%this.addr = alloca %"class.std::__cxx11::list"*, align 8
store %"class.std::__cxx11::list"* %this, %"class.std::__cxx11::list"** %this.addr, align 8
%this1 = load %"class.std::__cxx11::list"*, %"class.std::__cxx11::list"** %this.addr, align 8
%0 = bitcast %"class.std::__cxx11::list"* %this1 to %"class.std::__cxx11::_List_base"*
%_M_impl = getelementptr inbounds %"class.std::__cxx11::_List_base", %"class.std::__cxx11::_List_base"* %0, i32 0, i32 0
%_M_node = getelementptr inbounds %"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl", %"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl"* %_M_impl, i32 0, i32 0
%1 = bitcast %"struct.std::__detail::_List_node_header"* %_M_node to %"struct.std::__detail::_List_node_base"*
call void @_ZNSt20_List_const_iteratorIP14_twoIntsStructEC2EPKNSt8__detail15_List_node_baseE(%"struct.std::_List_const_iterator"* %retval, %"struct.std::__detail::_List_node_base"* %1) #8
%coerce.dive = getelementptr inbounds %"struct.std::_List_const_iterator", %"struct.std::_List_const_iterator"* %retval, i32 0, i32 0
%2 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %coerce.dive, align 8
ret %"struct.std::__detail::_List_node_base"* %2
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt16allocator_traitsISaISt10_List_nodeIP14_twoIntsStructEEE37select_on_container_copy_constructionERKS4_(%"class.std::allocator"* noalias sret align 1 %agg.result, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %__rhs) #1 comdat align 2 {
entry:
%result.ptr = alloca i8*, align 8
%__rhs.addr = alloca %"class.std::allocator"*, align 8
%0 = bitcast %"class.std::allocator"* %agg.result to i8*
store i8* %0, i8** %result.ptr, align 8
store %"class.std::allocator"* %__rhs, %"class.std::allocator"** %__rhs.addr, align 8
%1 = load %"class.std::allocator"*, %"class.std::allocator"** %__rhs.addr, align 8
call void @_ZNSaISt10_List_nodeIP14_twoIntsStructEEC2ERKS3_(%"class.std::allocator"* %agg.result, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %1) #8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSaISt10_List_nodeIP14_twoIntsStructEEC2ERKS3_(%"class.std::allocator"* %this, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::allocator"*, align 8
%__a.addr = alloca %"class.std::allocator"*, align 8
store %"class.std::allocator"* %this, %"class.std::allocator"** %this.addr, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
%this1 = load %"class.std::allocator"*, %"class.std::allocator"** %this.addr, align 8
%0 = bitcast %"class.std::allocator"* %this1 to %"class.__gnu_cxx::new_allocator"*
%1 = load %"class.std::allocator"*, %"class.std::allocator"** %__a.addr, align 8
%2 = bitcast %"class.std::allocator"* %1 to %"class.__gnu_cxx::new_allocator"*
call void @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIP14_twoIntsStructEEC2ERKS5_(%"class.__gnu_cxx::new_allocator"* %0, %"class.__gnu_cxx::new_allocator"* nonnull align 1 dereferenceable(1) %2) #8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIP14_twoIntsStructEEC2ERKS5_(%"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"* nonnull align 1 dereferenceable(1) %0) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
%.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
store %"class.__gnu_cxx::new_allocator"* %0, %"class.__gnu_cxx::new_allocator"** %.addr, align 8
%this1 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZSt4moveIRSaISt10_List_nodeIP14_twoIntsStructEEEONSt16remove_referenceIT_E4typeEOS7_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %__t) #1 comdat {
entry:
%__t.addr = alloca %"class.std::allocator"*, align 8
store %"class.std::allocator"* %__t, %"class.std::allocator"** %__t.addr, align 8
%0 = load %"class.std::allocator"*, %"class.std::allocator"** %__t.addr, align 8
ret %"class.std::allocator"* %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt7__cxx1110_List_baseIP14_twoIntsStructSaIS2_EE10_List_implC2EOSaISt10_List_nodeIS2_EE(%"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl"* %this, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl"*, align 8
%__a.addr = alloca %"class.std::allocator"*, align 8
store %"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl"* %this, %"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl"** %this.addr, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
%this1 = load %"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl"*, %"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl"** %this.addr, align 8
%0 = bitcast %"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl"* %this1 to %"class.std::allocator"*
%1 = load %"class.std::allocator"*, %"class.std::allocator"** %__a.addr, align 8
%call = call nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZSt4moveIRSaISt10_List_nodeIP14_twoIntsStructEEEONSt16remove_referenceIT_E4typeEOS7_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %1) #8
call void @_ZNSaISt10_List_nodeIP14_twoIntsStructEEC2ERKS3_(%"class.std::allocator"* %0, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %call) #8
%_M_node = getelementptr inbounds %"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl", %"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl"* %this1, i32 0, i32 0
call void @_ZNSt8__detail17_List_node_headerC2Ev(%"struct.std::__detail::_List_node_header"* %_M_node) #8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local zeroext i1 @_ZStneRKSt20_List_const_iteratorIP14_twoIntsStructES4_(%"struct.std::_List_const_iterator"* nonnull align 8 dereferenceable(8) %__x, %"struct.std::_List_const_iterator"* nonnull align 8 dereferenceable(8) %__y) #1 comdat {
entry:
%__x.addr = alloca %"struct.std::_List_const_iterator"*, align 8
%__y.addr = alloca %"struct.std::_List_const_iterator"*, align 8
store %"struct.std::_List_const_iterator"* %__x, %"struct.std::_List_const_iterator"** %__x.addr, align 8
store %"struct.std::_List_const_iterator"* %__y, %"struct.std::_List_const_iterator"** %__y.addr, align 8
%0 = load %"struct.std::_List_const_iterator"*, %"struct.std::_List_const_iterator"** %__x.addr, align 8
%_M_node = getelementptr inbounds %"struct.std::_List_const_iterator", %"struct.std::_List_const_iterator"* %0, i32 0, i32 0
%1 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %_M_node, align 8
%2 = load %"struct.std::_List_const_iterator"*, %"struct.std::_List_const_iterator"** %__y.addr, align 8
%_M_node1 = getelementptr inbounds %"struct.std::_List_const_iterator", %"struct.std::_List_const_iterator"* %2, i32 0, i32 0
%3 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %_M_node1, align 8
%cmp = icmp ne %"struct.std::__detail::_List_node_base"* %1, %3
ret i1 %cmp
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE12emplace_backIJRKS2_EEEvDpOT_(%"class.std::__cxx11::list"* %this, %struct._twoIntsStruct** nonnull align 8 dereferenceable(8) %__args) #0 comdat align 2 {
entry:
%this.addr = alloca %"class.std::__cxx11::list"*, align 8
%__args.addr = alloca %struct._twoIntsStruct**, align 8
%agg.tmp = alloca %"struct.std::_List_iterator", align 8
store %"class.std::__cxx11::list"* %this, %"class.std::__cxx11::list"** %this.addr, align 8
store %struct._twoIntsStruct** %__args, %struct._twoIntsStruct*** %__args.addr, align 8
%this1 = load %"class.std::__cxx11::list"*, %"class.std::__cxx11::list"** %this.addr, align 8
%call = call %"struct.std::__detail::_List_node_base"* @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE3endEv(%"class.std::__cxx11::list"* %this1) #8
%coerce.dive = getelementptr inbounds %"struct.std::_List_iterator", %"struct.std::_List_iterator"* %agg.tmp, i32 0, i32 0
store %"struct.std::__detail::_List_node_base"* %call, %"struct.std::__detail::_List_node_base"** %coerce.dive, align 8
%0 = load %struct._twoIntsStruct**, %struct._twoIntsStruct*** %__args.addr, align 8
%call2 = call nonnull align 8 dereferenceable(8) %struct._twoIntsStruct** @_ZSt7forwardIRKP14_twoIntsStructEOT_RNSt16remove_referenceIS4_E4typeE(%struct._twoIntsStruct** nonnull align 8 dereferenceable(8) %0) #8
%coerce.dive3 = getelementptr inbounds %"struct.std::_List_iterator", %"struct.std::_List_iterator"* %agg.tmp, i32 0, i32 0
%1 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %coerce.dive3, align 8
call void @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE9_M_insertIJRKS2_EEEvSt14_List_iteratorIS2_EDpOT_(%"class.std::__cxx11::list"* %this1, %"struct.std::__detail::_List_node_base"* %1, %struct._twoIntsStruct** nonnull align 8 dereferenceable(8) %call2)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) %struct._twoIntsStruct** @_ZNKSt20_List_const_iteratorIP14_twoIntsStructEdeEv(%"struct.std::_List_const_iterator"* %this) #1 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%this.addr = alloca %"struct.std::_List_const_iterator"*, align 8
store %"struct.std::_List_const_iterator"* %this, %"struct.std::_List_const_iterator"** %this.addr, align 8
%this1 = load %"struct.std::_List_const_iterator"*, %"struct.std::_List_const_iterator"** %this.addr, align 8
%_M_node = getelementptr inbounds %"struct.std::_List_const_iterator", %"struct.std::_List_const_iterator"* %this1, i32 0, i32 0
%0 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %_M_node, align 8
%1 = bitcast %"struct.std::__detail::_List_node_base"* %0 to %"struct.std::_List_node"*
%call = invoke %struct._twoIntsStruct** @_ZNKSt10_List_nodeIP14_twoIntsStructE9_M_valptrEv(%"struct.std::_List_node"* %1)
to label %invoke.cont unwind label %terminate.lpad
invoke.cont: ; preds = %entry
ret %struct._twoIntsStruct** %call
terminate.lpad: ; preds = %entry
%2 = landingpad { i8*, i32 }
catch i8* null
%3 = extractvalue { i8*, i32 } %2, 0
call void @__clang_call_terminate(i8* %3) #9
unreachable
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) %"struct.std::_List_const_iterator"* @_ZNSt20_List_const_iteratorIP14_twoIntsStructEppEv(%"struct.std::_List_const_iterator"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_List_const_iterator"*, align 8
store %"struct.std::_List_const_iterator"* %this, %"struct.std::_List_const_iterator"** %this.addr, align 8
%this1 = load %"struct.std::_List_const_iterator"*, %"struct.std::_List_const_iterator"** %this.addr, align 8
%_M_node = getelementptr inbounds %"struct.std::_List_const_iterator", %"struct.std::_List_const_iterator"* %this1, i32 0, i32 0
%0 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %_M_node, align 8
%_M_next = getelementptr inbounds %"struct.std::__detail::_List_node_base", %"struct.std::__detail::_List_node_base"* %0, i32 0, i32 0
%1 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %_M_next, align 8
%_M_node2 = getelementptr inbounds %"struct.std::_List_const_iterator", %"struct.std::_List_const_iterator"* %this1, i32 0, i32 0
store %"struct.std::__detail::_List_node_base"* %1, %"struct.std::__detail::_List_node_base"** %_M_node2, align 8
ret %"struct.std::_List_const_iterator"* %this1
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %struct._twoIntsStruct** @_ZNKSt10_List_nodeIP14_twoIntsStructE9_M_valptrEv(%"struct.std::_List_node"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_List_node"*, align 8
store %"struct.std::_List_node"* %this, %"struct.std::_List_node"** %this.addr, align 8
%this1 = load %"struct.std::_List_node"*, %"struct.std::_List_node"** %this.addr, align 8
%_M_storage = getelementptr inbounds %"struct.std::_List_node", %"struct.std::_List_node"* %this1, i32 0, i32 1
%call = call %struct._twoIntsStruct** @_ZNK9__gnu_cxx16__aligned_membufIP14_twoIntsStructE6_M_ptrEv(%"struct.__gnu_cxx::__aligned_membuf"* %_M_storage) #8
ret %struct._twoIntsStruct** %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %struct._twoIntsStruct** @_ZNK9__gnu_cxx16__aligned_membufIP14_twoIntsStructE6_M_ptrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.__gnu_cxx::__aligned_membuf"*, align 8
store %"struct.__gnu_cxx::__aligned_membuf"* %this, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%this1 = load %"struct.__gnu_cxx::__aligned_membuf"*, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%call = call i8* @_ZNK9__gnu_cxx16__aligned_membufIP14_twoIntsStructE7_M_addrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this1) #8
%0 = bitcast i8* %call to %struct._twoIntsStruct**
ret %struct._twoIntsStruct** %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i8* @_ZNK9__gnu_cxx16__aligned_membufIP14_twoIntsStructE7_M_addrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.__gnu_cxx::__aligned_membuf"*, align 8
store %"struct.__gnu_cxx::__aligned_membuf"* %this, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%this1 = load %"struct.__gnu_cxx::__aligned_membuf"*, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%_M_storage = getelementptr inbounds %"struct.__gnu_cxx::__aligned_membuf", %"struct.__gnu_cxx::__aligned_membuf"* %this1, i32 0, i32 0
%0 = bitcast [8 x i8]* %_M_storage to i8*
ret i8* %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt20_List_const_iteratorIP14_twoIntsStructEC2EPKNSt8__detail15_List_node_baseE(%"struct.std::_List_const_iterator"* %this, %"struct.std::__detail::_List_node_base"* %__x) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_List_const_iterator"*, align 8
%__x.addr = alloca %"struct.std::__detail::_List_node_base"*, align 8
store %"struct.std::_List_const_iterator"* %this, %"struct.std::_List_const_iterator"** %this.addr, align 8
store %"struct.std::__detail::_List_node_base"* %__x, %"struct.std::__detail::_List_node_base"** %__x.addr, align 8
%this1 = load %"struct.std::_List_const_iterator"*, %"struct.std::_List_const_iterator"** %this.addr, align 8
%_M_node = getelementptr inbounds %"struct.std::_List_const_iterator", %"struct.std::_List_const_iterator"* %this1, i32 0, i32 0
%0 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %__x.addr, align 8
store %"struct.std::__detail::_List_node_base"* %0, %"struct.std::__detail::_List_node_base"** %_M_node, align 8
ret void
}
attributes #0 = { noinline 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" }
attributes #1 = { 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" }
attributes #2 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #3 = { noinline noreturn nounwind }
attributes #4 = { nobuiltin nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #5 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #6 = { noreturn "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #7 = { nobuiltin allocsize(0) "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #8 = { nounwind }
attributes #9 = { noreturn nounwind }
attributes #10 = { noreturn }
attributes #11 = { allocsize(0) }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%stack_var_-27 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
%1 = ptrtoint i64* %stack_var_-27 to i64, !insn.addr !1
ret i64 %1, !insn.addr !2
}
define i64 @function_31() local_unnamed_addr {
dec_label_pc_31:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !3
%1 = load i64, i64* %0
%2 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memmove_68b_badSink(), !insn.addr !4
%3 = add i64 %1, -8, !insn.addr !5
%4 = inttoptr i64 %3 to i64*, !insn.addr !5
%5 = load i64, i64* %4, align 8, !insn.addr !5
%6 = call i64 @__readfsqword(i64 40), !insn.addr !6
%7 = icmp eq i64 %5, %6, !insn.addr !6
store i64 0, i64* %rax.0.reg2mem, !insn.addr !7
br i1 %7, label %dec_label_pc_50, label %dec_label_pc_4b, !insn.addr !7
dec_label_pc_4b: ; preds = %dec_label_pc_31
%8 = call i64 @__stack_chk_fail(), !insn.addr !8
store i64 %8, i64* %rax.0.reg2mem, !insn.addr !8
br label %dec_label_pc_50, !insn.addr !8
dec_label_pc_50: ; preds = %dec_label_pc_4b, %dec_label_pc_31
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !9
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_52:
%rax.0.reg2mem = alloca i64, !insn.addr !10
%stack_var_-27 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !11
%1 = bitcast i64* %stack_var_-27 to i8*
store i8 0, i8* %1, align 8, !insn.addr !12
%2 = ptrtoint i64* %stack_var_-27 to i64, !insn.addr !13
store i64 %2, i64* inttoptr (i64 8 to i64*), align 8, !insn.addr !14
%3 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memmove_68b_goodG2BSink(), !insn.addr !15
%4 = call i64 @__readfsqword(i64 40), !insn.addr !16
%5 = icmp eq i64 %0, %4, !insn.addr !16
store i64 0, i64* %rax.0.reg2mem, !insn.addr !17
br i1 %5, label %dec_label_pc_a2, label %dec_label_pc_9d, !insn.addr !17
dec_label_pc_9d: ; preds = %dec_label_pc_52
%6 = call i64 @__stack_chk_fail(), !insn.addr !18
store i64 %6, i64* %rax.0.reg2mem, !insn.addr !18
br label %dec_label_pc_a2, !insn.addr !18
dec_label_pc_a2: ; preds = %dec_label_pc_9d, %dec_label_pc_52
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !19
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memmove_68_good() local_unnamed_addr {
dec_label_pc_a4:
%0 = call i64 @goodG2B(), !insn.addr !20
ret i64 %0, !insn.addr !21
}
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memmove_68b_badSink() local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memmove_68b_goodG2BSink() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 8}
!1 = !{i64 31}
!2 = !{i64 35}
!3 = !{i64 49}
!4 = !{i64 54}
!5 = !{i64 60}
!6 = !{i64 64}
!7 = !{i64 73}
!8 = !{i64 75}
!9 = !{i64 81}
!10 = !{i64 82}
!11 = !{i64 90}
!12 = !{i64 117}
!13 = !{i64 120}
!14 = !{i64 124}
!15 = !{i64 136}
!16 = !{i64 146}
!17 = !{i64 155}
!18 = !{i64 157}
!19 = !{i64 163}
!20 = !{i64 173}
!21 = !{i64 180}
### Assistant: @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memmove_68_badData = dso_local global i8* null, align 8
@CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memmove_68_goodG2BData = dso_local global i8* null, align 8
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memmove_68_bad() #0 {
entry:
%data = alloca i8*, align 8
%dataBadBuffer = alloca [10 x i8], align 1
%dataGoodBuffer = alloca [11 x i8], align 1
%arraydecay = getelementptr inbounds [10 x i8], [10 x i8]* %dataBadBuffer, i64 0, i64 0
store i8* %arraydecay, i8** %data, align 8
%0 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %0, i64 0
store i8 0, i8* %arrayidx, align 1
%1 = load i8*, i8** %data, align 8
store i8* %1, i8** @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memmove_68_badData, align 8
call void (...) @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memmove_68b_badSink()
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memmove_68b_badSink(...) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memmove_68_good() #0 {
entry:
call void @goodG2B()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B() #0 {
entry:
%data = alloca i8*, align 8
%dataBadBuffer = alloca [10 x i8], align 1
%dataGoodBuffer = alloca [11 x i8], align 1
%arraydecay = getelementptr inbounds [11 x i8], [11 x i8]* %dataGoodBuffer, i64 0, i64 0
store i8* %arraydecay, i8** %data, align 8
%0 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %0, i64 0
store i8 0, i8* %arrayidx, align 1
%1 = load i8*, i8** %data, align 8
store i8* %1, i8** @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memmove_68_goodG2BData, align 8
call void (...) @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memmove_68b_goodG2BSink()
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memmove_68b_goodG2BSink(...) #1
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" }
attributes #1 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_f = constant [3 x i8] c"%(\00"
@global_var_10 = external constant i128
@global_var_32f = external constant i128
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
ret i64 sub (i64 ptrtoint (i128* @global_var_10 to i64), i64 1), !insn.addr !1
}
define i64 @function_31(i64 %arg1, i64 %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_31:
%0 = alloca i64
%.reg2mem = alloca i64, !insn.addr !2
%storemerge12.reg2mem = alloca i64, !insn.addr !2
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = load i64, i64* %0
%4 = trunc i64 %3 to i8
%5 = mul i8 %4, 2, !insn.addr !2
%6 = inttoptr i64 %3 to i8*, !insn.addr !2
store i8 %5, i8* %6, align 1, !insn.addr !2
%7 = udiv i64 %3, %arg2
%8 = mul i64 %7, ptrtoint (i128* @global_var_10 to i64), !insn.addr !3
%9 = sub i64 %2, %8, !insn.addr !4
%10 = add i64 %9, ptrtoint ([3 x i8]* @global_var_f to i64), !insn.addr !5
%11 = and i64 %10, -16, !insn.addr !6
%12 = add i64 %1, -832, !insn.addr !7
%13 = inttoptr i64 %12 to i64*, !insn.addr !7
store i64 %11, i64* %13, align 8, !insn.addr !7
%14 = add i64 %9, add (i64 ptrtoint ([3 x i8]* @global_var_f to i64), i64 sub (i64 0, i64 trunc (i128 mul (i128 sext (i64 trunc (i128 udiv (i128 zext (i64 add (i64 sub (i64 ptrtoint (i128* @global_var_10 to i64), i64 1), i64 ptrtoint (i128* @global_var_32f to i64)) to i128), i128 zext (i64 ptrtoint (i128* @global_var_10 to i64) to i128)) to i64) to i128), i128 ptrtoint (i128* @global_var_10 to i128)) to i64))), !insn.addr !8
%15 = and i64 %14, -16, !insn.addr !9
%16 = add i64 %1, -824, !insn.addr !10
%17 = inttoptr i64 %16 to i64*, !insn.addr !10
store i64 %15, i64* %17, align 8, !insn.addr !10
%18 = add i64 %1, -852, !insn.addr !11
%19 = inttoptr i64 %18 to i32*, !insn.addr !11
store i32 0, i32* %19, align 4
%20 = add i64 %1, -848
%21 = inttoptr i64 %20 to i64*
br label %dec_label_pc_98
dec_label_pc_98: ; preds = %dec_label_pc_31, %dec_label_pc_98
%22 = load i64, i64* %13, align 8, !insn.addr !12
store i64 %22, i64* %21, align 8, !insn.addr !13
%23 = load i32, i32* %19, align 4, !insn.addr !14
%24 = add i32 %23, 1, !insn.addr !14
store i32 %24, i32* %19, align 4
%25 = icmp slt i32 %24, 1, !insn.addr !15
br i1 %25, label %dec_label_pc_98, label %dec_label_pc_b6, !insn.addr !15
dec_label_pc_b6: ; preds = %dec_label_pc_98
%26 = add i64 %1, -816, !insn.addr !16
%27 = inttoptr i64 %26 to i8*, !insn.addr !17
call void @__asm_rep_stosq_memset(i8* %27, i64 0, i64 100), !insn.addr !17
%28 = add i64 %1, -840, !insn.addr !18
%29 = inttoptr i64 %28 to i64*, !insn.addr !18
store i64 0, i64* %29, align 8
store i64 0, i64* %storemerge12.reg2mem
br label %dec_label_pc_da
dec_label_pc_da: ; preds = %dec_label_pc_b6, %dec_label_pc_da
%storemerge12.reload = load i64, i64* %storemerge12.reg2mem
%30 = mul i64 %storemerge12.reload, 8, !insn.addr !19
%31 = load i64, i64* %21, align 8, !insn.addr !20
%32 = add i64 %31, %30, !insn.addr !21
%33 = add i64 %30, %26, !insn.addr !22
%34 = inttoptr i64 %33 to i64*, !insn.addr !22
%35 = load i64, i64* %34, align 8, !insn.addr !22
%36 = inttoptr i64 %32 to i64*, !insn.addr !23
store i64 %35, i64* %36, align 8, !insn.addr !23
%37 = load i64, i64* %29, align 8, !insn.addr !24
%38 = add i64 %37, 1, !insn.addr !24
store i64 %38, i64* %29, align 8
%39 = icmp ult i64 %38, 100
store i64 %38, i64* %storemerge12.reg2mem, !insn.addr !25
br i1 %39, label %dec_label_pc_da, label %dec_label_pc_117, !insn.addr !25
dec_label_pc_117: ; preds = %dec_label_pc_da
%40 = load i64, i64* %21, align 8, !insn.addr !26
%41 = inttoptr i64 %40 to i64*, !insn.addr !27
%42 = load i64, i64* %41, align 8, !insn.addr !27
%43 = call i64 @printLongLongLine(i64 %42), !insn.addr !28
%44 = add i64 %1, -8, !insn.addr !29
%45 = inttoptr i64 %44 to i64*, !insn.addr !29
%46 = load i64, i64* %45, align 8, !insn.addr !29
%47 = call i64 @__readfsqword(i64 40), !insn.addr !30
%48 = icmp eq i64 %47, %46, !insn.addr !30
store i64 0, i64* %.reg2mem, !insn.addr !31
br i1 %48, label %dec_label_pc_13e, label %dec_label_pc_139, !insn.addr !31
dec_label_pc_139: ; preds = %dec_label_pc_117
%49 = call i64 @__stack_chk_fail(), !insn.addr !32
store i64 %49, i64* %.reg2mem, !insn.addr !32
br label %dec_label_pc_13e, !insn.addr !32
dec_label_pc_13e: ; preds = %dec_label_pc_139, %dec_label_pc_117
%.reload = load i64, i64* %.reg2mem, !insn.addr !33
ret i64 %.reload, !insn.addr !33
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_140:
%rax.0.reg2mem = alloca i64, !insn.addr !34
%storemerge2.reg2mem = alloca i64, !insn.addr !34
%storemerge1.reg2mem = alloca i32, !insn.addr !34
%stack_var_-856.0.reg2mem = alloca i64, !insn.addr !34
%stack_var_-824 = alloca i64, align 8
%stack_var_-872 = alloca i64, align 8
%stack_var_-8 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-872 to i64, !insn.addr !35
%1 = call i64 @__readfsqword(i64 40), !insn.addr !36
%2 = add i64 %0, add (i64 ptrtoint ([3 x i8]* @global_var_f to i64), i64 add (i64 sub (i64 0, i64 trunc (i128 mul (i128 sext (i64 trunc (i128 udiv (i128 zext (i64 add (i64 sub (i64 ptrtoint (i128* @global_var_10 to i64), i64 1), i64 ptrtoint (i128* @global_var_32f to i64)) to i128), i128 zext (i64 ptrtoint (i128* @global_var_10 to i64) to i128)) to i64) to i128), i128 ptrtoint (i128* @global_var_10 to i128)) to i64)), i64 sub (i64 0, i64 trunc (i128 mul (i128 sext (i64 trunc (i128 udiv (i128 zext (i64 add (i64 sub (i64 ptrtoint (i128* @global_var_10 to i64), i64 1), i64 415) to i128), i128 zext (i64 ptrtoint (i128* @global_var_10 to i64) to i128)) to i64) to i128), i128 ptrtoint (i128* @global_var_10 to i128)) to i64)))), !insn.addr !37
%3 = and i64 %2, -16, !insn.addr !38
store i32 0, i32* %storemerge1.reg2mem, !insn.addr !39
br label %dec_label_pc_1ed, !insn.addr !39
dec_label_pc_1ed: ; preds = %dec_label_pc_1ed, %dec_label_pc_140
%storemerge1.reload = load i32, i32* %storemerge1.reg2mem
%stack_var_-856.0.reload = load i64, i64* %stack_var_-856.0.reg2mem
%4 = add nuw nsw i32 %storemerge1.reload, 1, !insn.addr !40
%exitcond3 = icmp eq i32 %4, 2
store i64 %3, i64* %stack_var_-856.0.reg2mem, !insn.addr !41
store i32 %4, i32* %storemerge1.reg2mem, !insn.addr !41
br i1 %exitcond3, label %dec_label_pc_1f6, label %dec_label_pc_1ed, !insn.addr !41
dec_label_pc_1f6: ; preds = %dec_label_pc_1ed
%5 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !42
%6 = bitcast i64* %stack_var_-824 to i8*, !insn.addr !43
call void @__asm_rep_stosq_memset(i8* nonnull %6, i64 0, i64 100), !insn.addr !43
%7 = add i64 %5, -816, !insn.addr !44
store i64 0, i64* %storemerge2.reg2mem
br label %dec_label_pc_21a
dec_label_pc_21a: ; preds = %dec_label_pc_21a, %dec_label_pc_1f6
%storemerge2.reload = load i64, i64* %storemerge2.reg2mem
%8 = mul i64 %storemerge2.reload, 8, !insn.addr !45
%9 = add i64 %8, %stack_var_-856.0.reload, !insn.addr !46
%10 = add i64 %7, %8, !insn.addr !44
%11 = inttoptr i64 %10 to i64*, !insn.addr !44
%12 = load i64, i64* %11, align 8, !insn.addr !44
%13 = inttoptr i64 %9 to i64*, !insn.addr !47
store i64 %12, i64* %13, align 8, !insn.addr !47
%14 = add nuw nsw i64 %storemerge2.reload, 1, !insn.addr !48
%exitcond = icmp eq i64 %14, 100
store i64 %14, i64* %storemerge2.reg2mem, !insn.addr !49
br i1 %exitcond, label %dec_label_pc_257, label %dec_label_pc_21a, !insn.addr !49
dec_label_pc_257: ; preds = %dec_label_pc_21a
%15 = inttoptr i64 %stack_var_-856.0.reload to i64*, !insn.addr !50
%16 = load i64, i64* %15, align 8, !insn.addr !50
%17 = call i64 @printLongLongLine(i64 %16), !insn.addr !51
%18 = call i64 @__readfsqword(i64 40), !insn.addr !52
%19 = icmp eq i64 %1, %18, !insn.addr !52
store i64 0, i64* %rax.0.reg2mem, !insn.addr !53
br i1 %19, label %dec_label_pc_27e, label %dec_label_pc_279, !insn.addr !53
dec_label_pc_279: ; preds = %dec_label_pc_257
%20 = call i64 @__stack_chk_fail(), !insn.addr !54
store i64 %20, i64* %rax.0.reg2mem, !insn.addr !54
br label %dec_label_pc_27e, !insn.addr !54
dec_label_pc_27e: ; preds = %dec_label_pc_279, %dec_label_pc_257
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !55
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_17_good() local_unnamed_addr {
dec_label_pc_280:
%0 = call i64 @goodG2B(), !insn.addr !56
ret i64 %0, !insn.addr !57
}
declare i64 @printLongLongLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare void @__asm_rep_stosq_memset(i8*, i64, i64) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 11}
!1 = !{i64 31}
!2 = !{i64 49}
!3 = !{i64 54}
!4 = !{i64 58}
!5 = !{i64 64}
!6 = !{i64 68}
!7 = !{i64 76}
!8 = !{i64 121}
!9 = !{i64 125}
!10 = !{i64 133}
!11 = !{i64 140}
!12 = !{i64 152}
!13 = !{i64 159}
!14 = !{i64 166}
!15 = !{i64 180}
!16 = !{i64 182}
!17 = !{i64 202}
!18 = !{i64 205}
!19 = !{i64 225}
!20 = !{i64 233}
!21 = !{i64 240}
!22 = !{i64 250}
!23 = !{i64 258}
!24 = !{i64 261}
!25 = !{i64 277}
!26 = !{i64 279}
!27 = !{i64 286}
!28 = !{i64 292}
!29 = !{i64 298}
!30 = !{i64 302}
!31 = !{i64 311}
!32 = !{i64 313}
!33 = !{i64 319}
!34 = !{i64 320}
!35 = !{i64 324}
!36 = !{i64 331}
!37 = !{i64 441}
!38 = !{i64 445}
!39 = !{i64 470}
!40 = !{i64 486}
!41 = !{i64 500}
!42 = !{i64 321}
!43 = !{i64 522}
!44 = !{i64 570}
!45 = !{i64 545}
!46 = !{i64 560}
!47 = !{i64 578}
!48 = !{i64 581}
!49 = !{i64 597}
!50 = !{i64 606}
!51 = !{i64 612}
!52 = !{i64 622}
!53 = !{i64 631}
!54 = !{i64 633}
!55 = !{i64 639}
!56 = !{i64 649}
!57 = !{i64 656}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_17_bad() #0 {
entry:
%i = alloca i32, align 4
%data = alloca i64*, align 8
%dataBadBuffer = alloca i64*, align 8
%dataGoodBuffer = alloca i64*, align 8
%source = alloca [100 x i64], align 16
%i1 = alloca i64, align 8
%0 = alloca i8, i64 400, align 16
%1 = bitcast i8* %0 to i64*
store i64* %1, i64** %dataBadBuffer, align 8
%2 = alloca i8, i64 800, align 16
%3 = bitcast i8* %2 to i64*
store i64* %3, i64** %dataGoodBuffer, align 8
store i32 0, i32* %i, align 4
br label %for.cond
for.cond: ; preds = %for.inc, %entry
%4 = load i32, i32* %i, align 4
%cmp = icmp slt i32 %4, 1
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%5 = load i64*, i64** %dataBadBuffer, align 8
store i64* %5, i64** %data, align 8
br label %for.inc
for.inc: ; preds = %for.body
%6 = load i32, i32* %i, align 4
%inc = add nsw i32 %6, 1
store i32 %inc, i32* %i, align 4
br label %for.cond
for.end: ; preds = %for.cond
%7 = bitcast [100 x i64]* %source to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %7, i8 0, i64 800, i1 false)
store i64 0, i64* %i1, align 8
br label %for.cond2
for.cond2: ; preds = %for.inc6, %for.end
%8 = load i64, i64* %i1, align 8
%cmp3 = icmp ult i64 %8, 100
br i1 %cmp3, label %for.body4, label %for.end8
for.body4: ; preds = %for.cond2
%9 = load i64, i64* %i1, align 8
%arrayidx = getelementptr inbounds [100 x i64], [100 x i64]* %source, i64 0, i64 %9
%10 = load i64, i64* %arrayidx, align 8
%11 = load i64*, i64** %data, align 8
%12 = load i64, i64* %i1, align 8
%arrayidx5 = getelementptr inbounds i64, i64* %11, i64 %12
store i64 %10, i64* %arrayidx5, align 8
br label %for.inc6
for.inc6: ; preds = %for.body4
%13 = load i64, i64* %i1, align 8
%inc7 = add i64 %13, 1
store i64 %inc7, i64* %i1, align 8
br label %for.cond2
for.end8: ; preds = %for.cond2
%14 = load i64*, i64** %data, align 8
%arrayidx9 = getelementptr inbounds i64, i64* %14, i64 0
%15 = load i64, i64* %arrayidx9, align 8
call void @printLongLongLine(i64 %15)
ret void
}
; Function Attrs: argmemonly nounwind willreturn writeonly
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #1
declare dso_local void @printLongLongLine(i64) #2
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_17_good() #0 {
entry:
call void @goodG2B()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B() #0 {
entry:
%h = alloca i32, align 4
%data = alloca i64*, align 8
%dataBadBuffer = alloca i64*, align 8
%dataGoodBuffer = alloca i64*, align 8
%source = alloca [100 x i64], align 16
%i = alloca i64, align 8
%0 = alloca i8, i64 400, align 16
%1 = bitcast i8* %0 to i64*
store i64* %1, i64** %dataBadBuffer, align 8
%2 = alloca i8, i64 800, align 16
%3 = bitcast i8* %2 to i64*
store i64* %3, i64** %dataGoodBuffer, align 8
store i32 0, i32* %h, align 4
br label %for.cond
for.cond: ; preds = %for.inc, %entry
%4 = load i32, i32* %h, align 4
%cmp = icmp slt i32 %4, 1
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%5 = load i64*, i64** %dataGoodBuffer, align 8
store i64* %5, i64** %data, align 8
br label %for.inc
for.inc: ; preds = %for.body
%6 = load i32, i32* %h, align 4
%inc = add nsw i32 %6, 1
store i32 %inc, i32* %h, align 4
br label %for.cond
for.end: ; preds = %for.cond
%7 = bitcast [100 x i64]* %source to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %7, i8 0, i64 800, i1 false)
store i64 0, i64* %i, align 8
br label %for.cond1
for.cond1: ; preds = %for.inc5, %for.end
%8 = load i64, i64* %i, align 8
%cmp2 = icmp ult i64 %8, 100
br i1 %cmp2, label %for.body3, label %for.end7
for.body3: ; preds = %for.cond1
%9 = load i64, i64* %i, align 8
%arrayidx = getelementptr inbounds [100 x i64], [100 x i64]* %source, i64 0, i64 %9
%10 = load i64, i64* %arrayidx, align 8
%11 = load i64*, i64** %data, align 8
%12 = load i64, i64* %i, align 8
%arrayidx4 = getelementptr inbounds i64, i64* %11, i64 %12
store i64 %10, i64* %arrayidx4, align 8
br label %for.inc5
for.inc5: ; preds = %for.body3
%13 = load i64, i64* %i, align 8
%inc6 = add i64 %13, 1
store i64 %inc6, i64* %i, align 8
br label %for.cond1
for.end7: ; preds = %for.cond1
%14 = load i64*, i64** %data, align 8
%arrayidx8 = getelementptr inbounds i64, i64* %14, i64 0
%15 = load i64, i64* %arrayidx8, align 8
call void @printLongLongLine(i64 %15)
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" }
attributes #1 = { argmemonly nounwind willreturn writeonly }
attributes #2 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_10 = constant [3 x i8] c"%(\00"
define i64 @_GLOBAL_OFFSET_TABLE_.1(i64 %arg1) local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
%1 = add i64 %arg1, ptrtoint ([3 x i8]* @global_var_10 to i64), !insn.addr !1
%2 = inttoptr i64 %1 to i64*, !insn.addr !1
%3 = load i64, i64* %2, align 8, !insn.addr !1
ret i64 %3, !insn.addr !2
}
define i64 @function_30() local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !3
%1 = load i64, i64* %0
%2 = add i64 %1, -19, !insn.addr !3
%3 = inttoptr i64 %2 to i64*, !insn.addr !3
%4 = add i64 %1, -11, !insn.addr !4
%5 = inttoptr i64 %4 to i16*, !insn.addr !4
store i16 16705, i16* %5, align 2, !insn.addr !4
%6 = add i64 %1, -9, !insn.addr !5
%7 = inttoptr i64 %6 to i8*, !insn.addr !5
store i8 0, i8* %7, align 1, !insn.addr !5
%8 = add i64 %1, -32, !insn.addr !6
%9 = inttoptr i64 %8 to i64*, !insn.addr !6
%10 = load i64, i64* %9, align 8, !insn.addr !6
%11 = call i64 @strcpy(i64 %10, i64 %2, i64 %2), !insn.addr !7
%12 = load i64, i64* %9, align 8, !insn.addr !8
%13 = call i64 @printLine(i64 %12), !insn.addr !9
%14 = add i64 %1, -8, !insn.addr !10
%15 = inttoptr i64 %14 to i64*, !insn.addr !10
%16 = load i64, i64* %15, align 8, !insn.addr !10
%17 = call i64 @__readfsqword(i64 40), !insn.addr !11
%18 = icmp eq i64 %16, %17, !insn.addr !11
store i64 0, i64* %rax.0.reg2mem, !insn.addr !12
br i1 %18, label %dec_label_pc_73, label %dec_label_pc_6e, !insn.addr !12
dec_label_pc_6e: ; preds = %dec_label_pc_30
%19 = call i64 @__stack_chk_fail(), !insn.addr !13
store i64 %19, i64* %rax.0.reg2mem, !insn.addr !13
br label %dec_label_pc_73, !insn.addr !13
dec_label_pc_73: ; preds = %dec_label_pc_6e, %dec_label_pc_30
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !14
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_cpy_66b_goodG2BSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_75:
%rax.0.reg2mem = alloca i64, !insn.addr !15
%stack_var_-27 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !16
%1 = add i64 %arg1, ptrtoint ([3 x i8]* @global_var_10 to i64), !insn.addr !17
%2 = inttoptr i64 %1 to i64*, !insn.addr !17
%3 = load i64, i64* %2, align 8, !insn.addr !17
store i64 4702111234474983745, i64* %stack_var_-27, align 8, !insn.addr !18
%4 = ptrtoint i64* %stack_var_-27 to i64, !insn.addr !19
%5 = call i64 @strcpy(i64 %3, i64 %4, i64 %4), !insn.addr !20
%6 = call i64 @printLine(i64 %3), !insn.addr !21
%7 = call i64 @__readfsqword(i64 40), !insn.addr !22
%8 = icmp eq i64 %0, %7, !insn.addr !22
store i64 0, i64* %rax.0.reg2mem, !insn.addr !23
br i1 %8, label %dec_label_pc_e8, label %dec_label_pc_e3, !insn.addr !23
dec_label_pc_e3: ; preds = %dec_label_pc_75
%9 = call i64 @__stack_chk_fail(), !insn.addr !24
store i64 %9, i64* %rax.0.reg2mem, !insn.addr !24
br label %dec_label_pc_e8, !insn.addr !24
dec_label_pc_e8: ; preds = %dec_label_pc_e3, %dec_label_pc_75
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !25
}
declare i64 @strcpy(i64, i64, i64) local_unnamed_addr
declare i64 @printLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 12}
!1 = !{i64 31}
!2 = !{i64 35}
!3 = !{i64 48}
!4 = !{i64 53}
!5 = !{i64 59}
!6 = !{i64 67}
!7 = !{i64 77}
!8 = !{i64 82}
!9 = !{i64 89}
!10 = !{i64 95}
!11 = !{i64 99}
!12 = !{i64 108}
!13 = !{i64 110}
!14 = !{i64 116}
!15 = !{i64 117}
!16 = !{i64 129}
!17 = !{i64 148}
!18 = !{i64 166}
!19 = !{i64 180}
!20 = !{i64 194}
!21 = !{i64 206}
!22 = !{i64 216}
!23 = !{i64 225}
!24 = !{i64 227}
!25 = !{i64 233}
### Assistant: @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_cpy_66b_badSink.source = private unnamed_addr constant [11 x i8] c"AAAAAAAAAA\00", align 1
@__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_cpy_66b_goodG2BSink.source = private unnamed_addr constant [11 x i8] c"AAAAAAAAAA\00", align 1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_cpy_66b_badSink(i8** %dataArray) #0 {
entry:
%dataArray.addr = alloca i8**, align 8
%data = alloca i8*, align 8
%source = alloca [11 x i8], align 1
store i8** %dataArray, i8*** %dataArray.addr, align 8
%0 = load i8**, i8*** %dataArray.addr, align 8
%arrayidx = getelementptr inbounds i8*, i8** %0, i64 2
%1 = load i8*, i8** %arrayidx, align 8
store i8* %1, i8** %data, align 8
%2 = bitcast [11 x i8]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %2, i8* align 1 getelementptr inbounds ([11 x i8], [11 x i8]* @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_cpy_66b_badSink.source, i32 0, i32 0), i64 11, i1 false)
%3 = load i8*, i8** %data, align 8
%arraydecay = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%call = call i8* @strcpy(i8* %3, i8* %arraydecay) #4
%4 = load i8*, i8** %data, align 8
call void @printLine(i8* %4)
ret void
}
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #1
; Function Attrs: nounwind
declare dso_local i8* @strcpy(i8*, i8*) #2
declare dso_local void @printLine(i8*) #3
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_cpy_66b_goodG2BSink(i8** %dataArray) #0 {
entry:
%dataArray.addr = alloca i8**, align 8
%data = alloca i8*, align 8
%source = alloca [11 x i8], align 1
store i8** %dataArray, i8*** %dataArray.addr, align 8
%0 = load i8**, i8*** %dataArray.addr, align 8
%arrayidx = getelementptr inbounds i8*, i8** %0, i64 2
%1 = load i8*, i8** %arrayidx, align 8
store i8* %1, i8** %data, align 8
%2 = bitcast [11 x i8]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %2, i8* align 1 getelementptr inbounds ([11 x i8], [11 x i8]* @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_cpy_66b_goodG2BSink.source, i32 0, i32 0), i64 11, i1 false)
%3 = load i8*, i8** %data, align 8
%arraydecay = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%call = call i8* @strcpy(i8* %3, i8* %arraydecay) #4
%4 = load i8*, i8** %data, align 8
call void @printLine(i8* %4)
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" }
attributes #1 = { argmemonly nounwind willreturn }
attributes #2 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #3 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
define i64 @_GLOBAL_OFFSET_TABLE_.1(i64 %arg1) local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_ncpy_53d_badSink(i64 %arg1), !insn.addr !0
ret i64 %0, !insn.addr !1
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_ncpy_53c_goodG2BSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_1b:
%0 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_ncpy_53d_goodG2BSink(i64 %arg1), !insn.addr !2
ret i64 %0, !insn.addr !3
}
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_ncpy_53d_badSink(i64) local_unnamed_addr
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_ncpy_53d_goodG2BSink(i64) local_unnamed_addr
!0 = !{i64 19}
!1 = !{i64 26}
!2 = !{i64 46}
!3 = !{i64 53}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_ncpy_53c_badSink(i8* %data) #0 {
entry:
%data.addr = alloca i8*, align 8
store i8* %data, i8** %data.addr, align 8
%0 = load i8*, i8** %data.addr, align 8
call void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_ncpy_53d_badSink(i8* %0)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_ncpy_53d_badSink(i8*) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_ncpy_53c_goodG2BSink(i8* %data) #0 {
entry:
%data.addr = alloca i8*, align 8
store i8* %data, i8** %data.addr, align 8
%0 = load i8*, i8** %data.addr, align 8
call void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_ncpy_53d_goodG2BSink(i8* %0)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_ncpy_53d_goodG2BSink(i8*) #1
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" }
attributes #1 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
define i64 @_GLOBAL_OFFSET_TABLE_.1(i64 %arg1) local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
ret i64 %arg1, !insn.addr !1
}
define i64 @function_30() local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !2
%storemerge1.reg2mem = alloca i64, !insn.addr !2
%.reg2mem = alloca i64, !insn.addr !2
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = load i64, i64* %0
%4 = inttoptr i64 %1 to i64*, !insn.addr !2
%5 = call i64 @_ZNSt6vectorIPcSaIS0_EEixEm(i64* %4, i64 %2), !insn.addr !2
%6 = inttoptr i64 %5 to i64*, !insn.addr !3
%7 = load i64, i64* %6, align 8, !insn.addr !3
%8 = add i64 %3, -120, !insn.addr !4
%9 = inttoptr i64 %8 to i64*, !insn.addr !4
store i64 %7, i64* %9, align 8, !insn.addr !4
%10 = add i64 %3, -112, !insn.addr !5
%11 = call i64 @memset(i64 %10, i64 67, i64 99), !insn.addr !6
%12 = add i64 %3, -13, !insn.addr !7
%13 = inttoptr i64 %12 to i8*, !insn.addr !7
store i8 0, i8* %13, align 1, !insn.addr !7
%14 = add i64 %3, -128, !insn.addr !8
%15 = inttoptr i64 %14 to i64*, !insn.addr !8
store i64 0, i64* %15, align 8
%16 = load i64, i64* %9, align 8
store i64 %16, i64* %.reg2mem
store i64 0, i64* %storemerge1.reg2mem
br label %dec_label_pc_65
dec_label_pc_65: ; preds = %dec_label_pc_30, %dec_label_pc_65
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%.reload = load i64, i64* %.reg2mem
%17 = add i64 %storemerge1.reload, %.reload, !insn.addr !9
%18 = add i64 %storemerge1.reload, %10, !insn.addr !10
%19 = inttoptr i64 %18 to i8*, !insn.addr !11
%20 = load i8, i8* %19, align 1, !insn.addr !11
%21 = inttoptr i64 %17 to i8*, !insn.addr !12
store i8 %20, i8* %21, align 1, !insn.addr !12
%22 = load i64, i64* %15, align 8, !insn.addr !13
%23 = add i64 %22, 1, !insn.addr !13
store i64 %23, i64* %15, align 8
%24 = icmp ult i64 %23, 100
%25 = load i64, i64* %9, align 8
store i64 %25, i64* %.reg2mem, !insn.addr !14
store i64 %23, i64* %storemerge1.reg2mem, !insn.addr !14
br i1 %24, label %dec_label_pc_65, label %dec_label_pc_87, !insn.addr !14
dec_label_pc_87: ; preds = %dec_label_pc_65
%26 = add i64 %25, 99, !insn.addr !15
%27 = inttoptr i64 %26 to i8*, !insn.addr !16
store i8 0, i8* %27, align 1, !insn.addr !16
%28 = load i64, i64* %9, align 8, !insn.addr !17
%29 = call i64 @printLine(i64 %28), !insn.addr !18
%30 = add i64 %3, -8, !insn.addr !19
%31 = inttoptr i64 %30 to i64*, !insn.addr !19
%32 = load i64, i64* %31, align 8, !insn.addr !19
%33 = call i64 @__readfsqword(i64 40), !insn.addr !20
%34 = icmp eq i64 %32, %33, !insn.addr !20
store i64 0, i64* %rax.0.reg2mem, !insn.addr !21
br i1 %34, label %dec_label_pc_b3, label %dec_label_pc_ae, !insn.addr !21
dec_label_pc_ae: ; preds = %dec_label_pc_87
%35 = call i64 @__stack_chk_fail(), !insn.addr !22
store i64 %35, i64* %rax.0.reg2mem, !insn.addr !22
br label %dec_label_pc_b3, !insn.addr !22
dec_label_pc_b3: ; preds = %dec_label_pc_ae, %dec_label_pc_87
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !23
}
define i64 @_ZN63CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_loop_7211goodG2BSinkESt6vectorIPcSaIS1_EE(i64 %arg1) local_unnamed_addr {
dec_label_pc_b5:
%rax.0.reg2mem = alloca i64, !insn.addr !24
%storemerge1.reg2mem = alloca i64, !insn.addr !24
%stack_var_-120 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !25
%1 = inttoptr i64 %arg1 to i64*, !insn.addr !26
%2 = call i64 @_ZNSt6vectorIPcSaIS0_EEixEm(i64* %1, i64 2), !insn.addr !26
%3 = inttoptr i64 %2 to i64*, !insn.addr !27
%4 = load i64, i64* %3, align 8, !insn.addr !27
%5 = ptrtoint i64* %stack_var_-120 to i64, !insn.addr !28
%6 = call i64 @memset(i64 %5, i64 67, i64 99), !insn.addr !29
store i64 0, i64* %storemerge1.reg2mem
br label %dec_label_pc_11a
dec_label_pc_11a: ; preds = %dec_label_pc_11a, %dec_label_pc_b5
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%7 = add i64 %storemerge1.reload, %4, !insn.addr !30
%8 = add i64 %storemerge1.reload, %5, !insn.addr !31
%9 = inttoptr i64 %8 to i8*, !insn.addr !32
%10 = load i8, i8* %9, align 1, !insn.addr !32
%11 = inttoptr i64 %7 to i8*, !insn.addr !33
store i8 %10, i8* %11, align 1, !insn.addr !33
%12 = add nuw nsw i64 %storemerge1.reload, 1, !insn.addr !34
%exitcond = icmp eq i64 %12, 100
store i64 %12, i64* %storemerge1.reg2mem, !insn.addr !35
br i1 %exitcond, label %dec_label_pc_13c, label %dec_label_pc_11a, !insn.addr !35
dec_label_pc_13c: ; preds = %dec_label_pc_11a
%13 = add i64 %4, 99, !insn.addr !36
%14 = inttoptr i64 %13 to i8*, !insn.addr !37
store i8 0, i8* %14, align 1, !insn.addr !37
%15 = call i64 @printLine(i64 %4), !insn.addr !38
%16 = call i64 @__readfsqword(i64 40), !insn.addr !39
%17 = icmp eq i64 %0, %16, !insn.addr !39
store i64 0, i64* %rax.0.reg2mem, !insn.addr !40
br i1 %17, label %dec_label_pc_168, label %dec_label_pc_163, !insn.addr !40
dec_label_pc_163: ; preds = %dec_label_pc_13c
%18 = call i64 @__stack_chk_fail(), !insn.addr !41
store i64 %18, i64* %rax.0.reg2mem, !insn.addr !41
br label %dec_label_pc_168, !insn.addr !41
dec_label_pc_168: ; preds = %dec_label_pc_163, %dec_label_pc_13c
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !42
}
define i64 @_ZNSt6vectorIPcSaIS0_EEixEm(i64* %result, i64 %arg2) local_unnamed_addr {
dec_label_pc_16c:
%0 = ptrtoint i64* %result to i64
%1 = mul i64 %arg2, 8, !insn.addr !43
%2 = add i64 %1, %0, !insn.addr !44
ret i64 %2, !insn.addr !45
}
declare i64 @memset(i64, i64, i64) local_unnamed_addr
declare i64 @printLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 18}
!1 = !{i64 33}
!2 = !{i64 48}
!3 = !{i64 53}
!4 = !{i64 56}
!5 = !{i64 60}
!6 = !{i64 77}
!7 = !{i64 82}
!8 = !{i64 86}
!9 = !{i64 109}
!10 = !{i64 120}
!11 = !{i64 123}
!12 = !{i64 126}
!13 = !{i64 128}
!14 = !{i64 99}
!15 = !{i64 139}
!16 = !{i64 143}
!17 = !{i64 146}
!18 = !{i64 153}
!19 = !{i64 159}
!20 = !{i64 163}
!21 = !{i64 172}
!22 = !{i64 174}
!23 = !{i64 180}
!24 = !{i64 181}
!25 = !{i64 199}
!26 = !{i64 229}
!27 = !{i64 234}
!28 = !{i64 255}
!29 = !{i64 258}
!30 = !{i64 290}
!31 = !{i64 301}
!32 = !{i64 304}
!33 = !{i64 307}
!34 = !{i64 309}
!35 = !{i64 280}
!36 = !{i64 320}
!37 = !{i64 324}
!38 = !{i64 334}
!39 = !{i64 344}
!40 = !{i64 353}
!41 = !{i64 355}
!42 = !{i64 361}
!43 = !{i64 387}
!44 = !{i64 391}
!45 = !{i64 395}
### Assistant: %"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<char *, std::allocator<char *>>::_Vector_impl" }
%"struct.std::_Vector_base<char *, std::allocator<char *>>::_Vector_impl" = type { %"struct.std::_Vector_base<char *, std::allocator<char *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<char *, std::allocator<char *>>::_Vector_impl_data" = type { i8**, i8**, i8** }
$_ZNSt6vectorIPcSaIS0_EEixEm = comdat any
; Function Attrs: noinline optnone uwtable
define dso_local void @_ZN63CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_loop_727badSinkESt6vectorIPcSaIS1_EE(%"class.std::vector"* %dataVector) #0 {
entry:
%data = alloca i8*, align 8
%i = alloca i64, align 8
%source = alloca [100 x i8], align 16
%call = call nonnull align 8 dereferenceable(8) i8** @_ZNSt6vectorIPcSaIS0_EEixEm(%"class.std::vector"* %dataVector, i64 2) #4
%0 = load i8*, i8** %call, align 8
store i8* %0, i8** %data, align 8
%arraydecay = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
call void @llvm.memset.p0i8.i64(i8* align 16 %arraydecay, i8 67, i64 99, i1 false)
%arrayidx = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 99
store i8 0, i8* %arrayidx, align 1
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %entry
%1 = load i64, i64* %i, align 8
%cmp = icmp ult i64 %1, 100
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%2 = load i64, i64* %i, align 8
%arrayidx1 = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 %2
%3 = load i8, i8* %arrayidx1, align 1
%4 = load i8*, i8** %data, align 8
%5 = load i64, i64* %i, align 8
%arrayidx2 = getelementptr inbounds i8, i8* %4, i64 %5
store i8 %3, i8* %arrayidx2, align 1
br label %for.inc
for.inc: ; preds = %for.body
%6 = load i64, i64* %i, align 8
%inc = add i64 %6, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%7 = load i8*, i8** %data, align 8
%arrayidx3 = getelementptr inbounds i8, i8* %7, i64 99
store i8 0, i8* %arrayidx3, align 1
%8 = load i8*, i8** %data, align 8
call void @printLine(i8* %8)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) i8** @_ZNSt6vectorIPcSaIS0_EEixEm(%"class.std::vector"* %this, i64 %__n) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::vector"*, align 8
%__n.addr = alloca i64, align 8
store %"class.std::vector"* %this, %"class.std::vector"** %this.addr, align 8
store i64 %__n, i64* %__n.addr, align 8
%this1 = load %"class.std::vector"*, %"class.std::vector"** %this.addr, align 8
%0 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%_M_impl = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %0, i32 0, i32 0
%1 = bitcast %"struct.std::_Vector_base<char *, std::allocator<char *>>::_Vector_impl"* %_M_impl to %"struct.std::_Vector_base<char *, std::allocator<char *>>::_Vector_impl_data"*
%_M_start = getelementptr inbounds %"struct.std::_Vector_base<char *, std::allocator<char *>>::_Vector_impl_data", %"struct.std::_Vector_base<char *, std::allocator<char *>>::_Vector_impl_data"* %1, i32 0, i32 0
%2 = load i8**, i8*** %_M_start, align 8
%3 = load i64, i64* %__n.addr, align 8
%add.ptr = getelementptr inbounds i8*, i8** %2, i64 %3
ret i8** %add.ptr
}
; Function Attrs: argmemonly nounwind willreturn writeonly
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #2
declare dso_local void @printLine(i8*) #3
; Function Attrs: noinline optnone uwtable
define dso_local void @_ZN63CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_loop_7211goodG2BSinkESt6vectorIPcSaIS1_EE(%"class.std::vector"* %dataVector) #0 {
entry:
%data = alloca i8*, align 8
%i = alloca i64, align 8
%source = alloca [100 x i8], align 16
%call = call nonnull align 8 dereferenceable(8) i8** @_ZNSt6vectorIPcSaIS0_EEixEm(%"class.std::vector"* %dataVector, i64 2) #4
%0 = load i8*, i8** %call, align 8
store i8* %0, i8** %data, align 8
%arraydecay = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
call void @llvm.memset.p0i8.i64(i8* align 16 %arraydecay, i8 67, i64 99, i1 false)
%arrayidx = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 99
store i8 0, i8* %arrayidx, align 1
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %entry
%1 = load i64, i64* %i, align 8
%cmp = icmp ult i64 %1, 100
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%2 = load i64, i64* %i, align 8
%arrayidx1 = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 %2
%3 = load i8, i8* %arrayidx1, align 1
%4 = load i8*, i8** %data, align 8
%5 = load i64, i64* %i, align 8
%arrayidx2 = getelementptr inbounds i8, i8* %4, i64 %5
store i8 %3, i8* %arrayidx2, align 1
br label %for.inc
for.inc: ; preds = %for.body
%6 = load i64, i64* %i, align 8
%inc = add i64 %6, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%7 = load i8*, i8** %data, align 8
%arrayidx3 = getelementptr inbounds i8, i8* %7, i64 99
store i8 0, i8* %arrayidx3, align 1
%8 = load i8*, i8** %data, align 8
call void @printLine(i8* %8)
ret void
}
attributes #0 = { noinline 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" }
attributes #1 = { 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" }
attributes #2 = { argmemonly nounwind willreturn writeonly }
attributes #3 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_f = constant [3 x i8] c"%(\00"
@global_var_10 = external constant i128
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
ret i64 add (i64 sub (i64 ptrtoint (i128* @global_var_10 to i64), i64 1), i64 65), !insn.addr !1
}
define i64 @function_30(i64 %arg1, i64 %arg2, i64 %arg3, i64 %arg4) local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !2
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = load i64, i64* %0
%4 = add i64 %3, -9, !insn.addr !2
%5 = inttoptr i64 %4 to i8*, !insn.addr !2
%6 = load i8, i8* %5, align 1, !insn.addr !2
%7 = trunc i64 %arg4 to i8, !insn.addr !2
%8 = add i8 %6, %7, !insn.addr !2
store i8 %8, i8* %5, align 1, !insn.addr !2
%9 = call i64 @__asm_int1(), !insn.addr !3
%10 = mul i64 %9, ptrtoint (i128* @global_var_10 to i64), !insn.addr !4
%11 = sub i64 %2, %10, !insn.addr !5
%12 = add i64 %11, ptrtoint ([3 x i8]* @global_var_f to i64), !insn.addr !6
%13 = and i64 %12, -16, !insn.addr !7
%14 = add i64 %1, -152, !insn.addr !8
%15 = inttoptr i64 %14 to i64*, !insn.addr !8
store i64 %13, i64* %15, align 8, !insn.addr !8
%16 = add i64 %11, add (i64 ptrtoint ([3 x i8]* @global_var_f to i64), i64 sub (i64 0, i64 trunc (i128 mul (i128 sext (i64 trunc (i128 udiv (i128 zext (i64 add (i64 sub (i64 ptrtoint (i128* @global_var_10 to i64), i64 1), i64 115) to i128), i128 zext (i64 ptrtoint (i128* @global_var_10 to i64) to i128)) to i64) to i128), i128 ptrtoint (i128* @global_var_10 to i128)) to i64))), !insn.addr !9
%17 = and i64 %16, -16, !insn.addr !10
%18 = add i64 %1, -144, !insn.addr !11
%19 = inttoptr i64 %18 to i64*, !insn.addr !11
store i64 %17, i64* %19, align 8, !insn.addr !11
%20 = load i64, i64* %15, align 8, !insn.addr !12
%21 = add i64 %1, -136, !insn.addr !13
%22 = inttoptr i64 %21 to i64*, !insn.addr !13
store i64 %20, i64* %22, align 8, !insn.addr !13
%23 = inttoptr i64 %20 to i8*, !insn.addr !14
store i8 0, i8* %23, align 1, !insn.addr !14
%24 = load i64, i64* %22, align 8, !insn.addr !15
%25 = add i64 %1, -128, !insn.addr !16
%26 = inttoptr i64 %25 to i64*, !insn.addr !16
store i64 %24, i64* %26, align 8, !insn.addr !16
%27 = add i64 %1, -120, !insn.addr !17
%28 = inttoptr i64 %27 to i64*, !insn.addr !17
store i64 %24, i64* %28, align 8, !insn.addr !17
%29 = add i64 %1, -112, !insn.addr !18
%30 = call i64 @memset(i64 %29, i64 67, i64 99, i64 %arg4), !insn.addr !19
%31 = add i64 %1, -13, !insn.addr !20
%32 = inttoptr i64 %31 to i8*, !insn.addr !20
store i8 0, i8* %32, align 1, !insn.addr !20
%33 = load i64, i64* %28, align 8, !insn.addr !21
%34 = call i64 @strncat(i64 %33, i64 %29, i64 100, i64 %29), !insn.addr !22
%35 = load i64, i64* %28, align 8, !insn.addr !23
%36 = call i64 @printLine(i64 %35), !insn.addr !24
%37 = add i64 %1, -8, !insn.addr !25
%38 = inttoptr i64 %37 to i64*, !insn.addr !25
%39 = load i64, i64* %38, align 8, !insn.addr !25
%40 = call i64 @__readfsqword(i64 40), !insn.addr !26
%41 = icmp eq i64 %39, %40, !insn.addr !26
store i64 0, i64* %rax.0.reg2mem, !insn.addr !27
br i1 %41, label %dec_label_pc_106, label %dec_label_pc_101, !insn.addr !27
dec_label_pc_101: ; preds = %dec_label_pc_30
%42 = call i64 @__stack_chk_fail(), !insn.addr !28
store i64 %42, i64* %rax.0.reg2mem, !insn.addr !28
br label %dec_label_pc_106, !insn.addr !28
dec_label_pc_106: ; preds = %dec_label_pc_101, %dec_label_pc_30
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !29
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_108:
%rax.0.reg2mem = alloca i64, !insn.addr !30
%stack_var_-120 = alloca i64, align 8
%stack_var_-168 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-168 to i64, !insn.addr !31
%1 = call i64 @__readfsqword(i64 40), !insn.addr !32
%2 = add i64 %0, add (i64 ptrtoint ([3 x i8]* @global_var_f to i64), i64 add (i64 sub (i64 0, i64 trunc (i128 mul (i128 sext (i64 trunc (i128 udiv (i128 zext (i64 add (i64 sub (i64 ptrtoint (i128* @global_var_10 to i64), i64 1), i64 115) to i128), i128 zext (i64 ptrtoint (i128* @global_var_10 to i64) to i128)) to i64) to i128), i128 ptrtoint (i128* @global_var_10 to i128)) to i64)), i64 sub (i64 0, i64 trunc (i128 mul (i128 sext (i64 trunc (i128 udiv (i128 zext (i64 add (i64 sub (i64 ptrtoint (i128* @global_var_10 to i64), i64 1), i64 65) to i128), i128 zext (i64 ptrtoint (i128* @global_var_10 to i64) to i128)) to i64) to i128), i128 ptrtoint (i128* @global_var_10 to i128)) to i64)))), !insn.addr !33
%3 = and i64 %2, -16, !insn.addr !34
%4 = inttoptr i64 %3 to i8*, !insn.addr !35
store i8 0, i8* %4, align 16, !insn.addr !35
%5 = ptrtoint i64* %stack_var_-120 to i64, !insn.addr !36
%6 = call i64 @memset(i64 %5, i64 67, i64 99, i64 ptrtoint (i128* @global_var_10 to i64)), !insn.addr !37
%7 = call i64 @strncat(i64 %3, i64 %5, i64 100, i64 %5), !insn.addr !38
%8 = call i64 @printLine(i64 %3), !insn.addr !39
%9 = call i64 @__readfsqword(i64 40), !insn.addr !40
%10 = icmp eq i64 %1, %9, !insn.addr !40
store i64 0, i64* %rax.0.reg2mem, !insn.addr !41
br i1 %10, label %dec_label_pc_20e, label %dec_label_pc_209, !insn.addr !41
dec_label_pc_209: ; preds = %dec_label_pc_108
%11 = call i64 @__stack_chk_fail(), !insn.addr !42
store i64 %11, i64* %rax.0.reg2mem, !insn.addr !42
br label %dec_label_pc_20e, !insn.addr !42
dec_label_pc_20e: ; preds = %dec_label_pc_209, %dec_label_pc_108
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !43
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_ncat_31_good() local_unnamed_addr {
dec_label_pc_210:
%0 = call i64 @goodG2B(), !insn.addr !44
ret i64 %0, !insn.addr !45
}
declare i64 @memset(i64, i64, i64, i64) local_unnamed_addr
declare i64 @strncat(i64, i64, i64, i64) local_unnamed_addr
declare i64 @printLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @__asm_int1() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 11}
!1 = !{i64 35}
!2 = !{i64 48}
!3 = !{i64 51}
!4 = !{i64 52}
!5 = !{i64 56}
!6 = !{i64 62}
!7 = !{i64 66}
!8 = !{i64 74}
!9 = !{i64 117}
!10 = !{i64 121}
!11 = !{i64 129}
!12 = !{i64 136}
!13 = !{i64 143}
!14 = !{i64 157}
!15 = !{i64 160}
!16 = !{i64 167}
!17 = !{i64 175}
!18 = !{i64 179}
!19 = !{i64 196}
!20 = !{i64 201}
!21 = !{i64 209}
!22 = !{i64 224}
!23 = !{i64 229}
!24 = !{i64 236}
!25 = !{i64 242}
!26 = !{i64 246}
!27 = !{i64 255}
!28 = !{i64 257}
!29 = !{i64 263}
!30 = !{i64 264}
!31 = !{i64 268}
!32 = !{i64 275}
!33 = !{i64 381}
!34 = !{i64 385}
!35 = !{i64 421}
!36 = !{i64 457}
!37 = !{i64 460}
!38 = !{i64 488}
!39 = !{i64 500}
!40 = !{i64 510}
!41 = !{i64 519}
!42 = !{i64 521}
!43 = !{i64 527}
!44 = !{i64 537}
!45 = !{i64 544}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_ncat_31_bad() #0 {
entry:
%data = alloca i8*, align 8
%dataBadBuffer = alloca i8*, align 8
%dataGoodBuffer = alloca i8*, align 8
%dataCopy = alloca i8*, align 8
%data1 = alloca i8*, align 8
%source = alloca [100 x i8], align 16
%0 = alloca i8, i64 50, align 16
store i8* %0, i8** %dataBadBuffer, align 8
%1 = alloca i8, i64 100, align 16
store i8* %1, i8** %dataGoodBuffer, align 8
%2 = load i8*, i8** %dataBadBuffer, align 8
store i8* %2, i8** %data, align 8
%3 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %3, i64 0
store i8 0, i8* %arrayidx, align 1
%4 = load i8*, i8** %data, align 8
store i8* %4, i8** %dataCopy, align 8
%5 = load i8*, i8** %dataCopy, align 8
store i8* %5, i8** %data1, align 8
%arraydecay = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
call void @llvm.memset.p0i8.i64(i8* align 16 %arraydecay, i8 67, i64 99, i1 false)
%arrayidx2 = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 99
store i8 0, i8* %arrayidx2, align 1
%6 = load i8*, i8** %data1, align 8
%arraydecay3 = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
%call = call i8* @strncat(i8* %6, i8* %arraydecay3, i64 100) #4
%7 = load i8*, i8** %data1, align 8
call void @printLine(i8* %7)
ret void
}
; Function Attrs: argmemonly nounwind willreturn writeonly
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #1
; Function Attrs: nounwind
declare dso_local i8* @strncat(i8*, i8*, i64) #2
declare dso_local void @printLine(i8*) #3
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_ncat_31_good() #0 {
entry:
call void @goodG2B()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B() #0 {
entry:
%data = alloca i8*, align 8
%dataBadBuffer = alloca i8*, align 8
%dataGoodBuffer = alloca i8*, align 8
%dataCopy = alloca i8*, align 8
%data1 = alloca i8*, align 8
%source = alloca [100 x i8], align 16
%0 = alloca i8, i64 50, align 16
store i8* %0, i8** %dataBadBuffer, align 8
%1 = alloca i8, i64 100, align 16
store i8* %1, i8** %dataGoodBuffer, align 8
%2 = load i8*, i8** %dataGoodBuffer, align 8
store i8* %2, i8** %data, align 8
%3 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %3, i64 0
store i8 0, i8* %arrayidx, align 1
%4 = load i8*, i8** %data, align 8
store i8* %4, i8** %dataCopy, align 8
%5 = load i8*, i8** %dataCopy, align 8
store i8* %5, i8** %data1, align 8
%arraydecay = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
call void @llvm.memset.p0i8.i64(i8* align 16 %arraydecay, i8 67, i64 99, i1 false)
%arrayidx2 = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 99
store i8 0, i8* %arrayidx2, align 1
%6 = load i8*, i8** %data1, align 8
%arraydecay3 = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
%call = call i8* @strncat(i8* %6, i8* %arraydecay3, i64 100) #4
%7 = load i8*, i8** %data1, align 8
call void @printLine(i8* %7)
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" }
attributes #1 = { argmemonly nounwind willreturn writeonly }
attributes #2 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #3 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
ret i64 40, !insn.addr !1
}
define i64 @function_30() local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !2
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = call i64 @__asm_int1(), !insn.addr !2
%4 = mul i64 %3, 16, !insn.addr !3
%5 = sub i64 %2, %4, !insn.addr !4
%6 = add i64 %5, 15, !insn.addr !5
%7 = and i64 %6, -16, !insn.addr !6
%8 = add i64 %1, -24, !insn.addr !7
%9 = inttoptr i64 %8 to i64*, !insn.addr !7
store i64 %7, i64* %9, align 8, !insn.addr !7
%10 = add i64 %5, -17, !insn.addr !8
%11 = and i64 %10, -16, !insn.addr !9
%12 = add i64 %1, -16, !insn.addr !10
%13 = inttoptr i64 %12 to i64*, !insn.addr !10
store i64 %11, i64* %13, align 8, !insn.addr !10
%14 = load i64, i64* %9, align 8, !insn.addr !11
%15 = add i64 %1, -32, !insn.addr !12
%16 = inttoptr i64 %15 to i64*, !insn.addr !12
store i64 %14, i64* %16, align 8, !insn.addr !12
%17 = inttoptr i64 %14 to i8*, !insn.addr !13
store i8 0, i8* %17, align 1, !insn.addr !13
%18 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memcpy_63b_badSink(i64 %15, i64 16, i128 9), !insn.addr !14
%19 = add i64 %1, -8, !insn.addr !15
%20 = inttoptr i64 %19 to i64*, !insn.addr !15
%21 = load i64, i64* %20, align 8, !insn.addr !15
%22 = call i64 @__readfsqword(i64 40), !insn.addr !16
%23 = icmp eq i64 %21, %22, !insn.addr !16
store i64 0, i64* %rax.0.reg2mem, !insn.addr !17
br i1 %23, label %dec_label_pc_af, label %dec_label_pc_aa, !insn.addr !17
dec_label_pc_aa: ; preds = %dec_label_pc_30
%24 = call i64 @__stack_chk_fail(), !insn.addr !18
store i64 %24, i64* %rax.0.reg2mem, !insn.addr !18
br label %dec_label_pc_af, !insn.addr !18
dec_label_pc_af: ; preds = %dec_label_pc_aa, %dec_label_pc_30
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !19
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_b1:
%rax.0.reg2mem = alloca i64, !insn.addr !20
%stack_var_-40 = alloca i8*, align 8
%0 = ptrtoint i8** %stack_var_-40 to i64, !insn.addr !21
%1 = call i64 @__readfsqword(i64 40), !insn.addr !22
%2 = add i64 %0, -49, !insn.addr !23
%3 = and i64 %2, -16, !insn.addr !24
%4 = inttoptr i64 %3 to i8*, !insn.addr !25
store i8* %4, i8** %stack_var_-40, align 8, !insn.addr !25
store i8 0, i8* %4, align 16, !insn.addr !26
%5 = bitcast i8** %stack_var_-40 to i64*, !insn.addr !27
%6 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memcpy_63b_goodG2BSink(i64* nonnull %5, i64 16, i128 9, i64 16), !insn.addr !27
%7 = call i64 @__readfsqword(i64 40), !insn.addr !28
%8 = icmp eq i64 %1, %7, !insn.addr !28
store i64 0, i64* %rax.0.reg2mem, !insn.addr !29
br i1 %8, label %dec_label_pc_160, label %dec_label_pc_15b, !insn.addr !29
dec_label_pc_15b: ; preds = %dec_label_pc_b1
%9 = call i64 @__stack_chk_fail(), !insn.addr !30
store i64 %9, i64* %rax.0.reg2mem, !insn.addr !30
br label %dec_label_pc_160, !insn.addr !30
dec_label_pc_160: ; preds = %dec_label_pc_15b, %dec_label_pc_b1
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !31
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memcpy_63_good() local_unnamed_addr {
dec_label_pc_162:
%0 = call i64 @goodG2B(), !insn.addr !32
ret i64 %0, !insn.addr !33
}
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memcpy_63b_badSink(i64, i64, i128) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memcpy_63b_goodG2BSink(i64*, i64, i128, i64) local_unnamed_addr
declare i64 @__asm_int1() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 8}
!1 = !{i64 32}
!2 = !{i64 48}
!3 = !{i64 49}
!4 = !{i64 53}
!5 = !{i64 59}
!6 = !{i64 63}
!7 = !{i64 71}
!8 = !{i64 111}
!9 = !{i64 115}
!10 = !{i64 123}
!11 = !{i64 127}
!12 = !{i64 131}
!13 = !{i64 139}
!14 = !{i64 149}
!15 = !{i64 155}
!16 = !{i64 159}
!17 = !{i64 168}
!18 = !{i64 170}
!19 = !{i64 176}
!20 = !{i64 177}
!21 = !{i64 181}
!22 = !{i64 185}
!23 = !{i64 288}
!24 = !{i64 292}
!25 = !{i64 308}
!26 = !{i64 316}
!27 = !{i64 326}
!28 = !{i64 336}
!29 = !{i64 345}
!30 = !{i64 347}
!31 = !{i64 353}
!32 = !{i64 363}
!33 = !{i64 370}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memcpy_63_bad() #0 {
entry:
%data = alloca i8*, align 8
%dataBadBuffer = alloca i8*, align 8
%dataGoodBuffer = alloca i8*, align 8
%0 = alloca i8, i64 10, align 16
store i8* %0, i8** %dataBadBuffer, align 8
%1 = alloca i8, i64 11, align 16
store i8* %1, i8** %dataGoodBuffer, align 8
%2 = load i8*, i8** %dataBadBuffer, align 8
store i8* %2, i8** %data, align 8
%3 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %3, i64 0
store i8 0, i8* %arrayidx, align 1
call void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memcpy_63b_badSink(i8** %data)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memcpy_63b_badSink(i8**) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memcpy_63_good() #0 {
entry:
call void @goodG2B()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B() #0 {
entry:
%data = alloca i8*, align 8
%dataBadBuffer = alloca i8*, align 8
%dataGoodBuffer = alloca i8*, align 8
%0 = alloca i8, i64 10, align 16
store i8* %0, i8** %dataBadBuffer, align 8
%1 = alloca i8, i64 11, align 16
store i8* %1, i8** %dataGoodBuffer, align 8
%2 = load i8*, i8** %dataGoodBuffer, align 8
store i8* %2, i8** %data, align 8
%3 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %3, i64 0
store i8 0, i8* %arrayidx, align 1
call void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memcpy_63b_goodG2BSink(i8** %data)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memcpy_63b_goodG2BSink(i8**) #1
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" }
attributes #1 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
define i64 @_GLOBAL_OFFSET_TABLE_.1(i64 %arg1) local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
ret i64 %arg1, !insn.addr !1
}
define i64 @function_30(i64 %arg1, i64 %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !2
%1 = load i64, i64* %0
%2 = trunc i64 %arg3 to i16, !insn.addr !2
%3 = call i32 @__asm_in(i16 %2), !insn.addr !2
%4 = add i64 %1, -11, !insn.addr !3
%5 = inttoptr i64 %4 to i16*, !insn.addr !3
store i16 16705, i16* %5, align 2, !insn.addr !3
%6 = add i64 %1, -9, !insn.addr !4
%7 = inttoptr i64 %6 to i8*, !insn.addr !4
store i8 0, i8* %7, align 1, !insn.addr !4
%8 = add i64 %1, -19, !insn.addr !5
%9 = call i64 @strlen(i64 %8), !insn.addr !6
%10 = add i64 %9, 1, !insn.addr !7
%11 = add i64 %1, -32, !insn.addr !8
%12 = inttoptr i64 %11 to i64*, !insn.addr !8
%13 = load i64, i64* %12, align 8, !insn.addr !8
%14 = call i64 @memmove(i64 %13, i64 %8, i64 %10, i64 %8), !insn.addr !9
%15 = load i64, i64* %12, align 8, !insn.addr !10
%16 = call i64 @printLine(i64 %15), !insn.addr !11
%17 = add i64 %1, -8, !insn.addr !12
%18 = inttoptr i64 %17 to i64*, !insn.addr !12
%19 = load i64, i64* %18, align 8, !insn.addr !12
%20 = call i64 @__readfsqword(i64 40), !insn.addr !13
%21 = icmp eq i64 %19, %20, !insn.addr !13
store i64 0, i64* %rax.0.reg2mem, !insn.addr !14
br i1 %21, label %dec_label_pc_7f, label %dec_label_pc_7a, !insn.addr !14
dec_label_pc_7a: ; preds = %dec_label_pc_30
%22 = call i64 @__stack_chk_fail(), !insn.addr !15
store i64 %22, i64* %rax.0.reg2mem, !insn.addr !15
br label %dec_label_pc_7f, !insn.addr !15
dec_label_pc_7f: ; preds = %dec_label_pc_7a, %dec_label_pc_30
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !16
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memmove_67b_goodG2BSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_81:
%rax.0.reg2mem = alloca i64, !insn.addr !17
%stack_var_-27 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !18
store i64 4702111234474983745, i64* %stack_var_-27, align 8, !insn.addr !19
%1 = ptrtoint i64* %stack_var_-27 to i64, !insn.addr !20
%2 = call i64 @strlen(i64 %1), !insn.addr !21
%3 = add i64 %2, 1, !insn.addr !22
%4 = call i64 @memmove(i64 %arg1, i64 %1, i64 %3, i64 %1), !insn.addr !23
%5 = call i64 @printLine(i64 %arg1), !insn.addr !24
%6 = call i64 @__readfsqword(i64 40), !insn.addr !25
%7 = icmp eq i64 %0, %6, !insn.addr !25
store i64 0, i64* %rax.0.reg2mem, !insn.addr !26
br i1 %7, label %dec_label_pc_100, label %dec_label_pc_fb, !insn.addr !26
dec_label_pc_fb: ; preds = %dec_label_pc_81
%8 = call i64 @__stack_chk_fail(), !insn.addr !27
store i64 %8, i64* %rax.0.reg2mem, !insn.addr !27
br label %dec_label_pc_100, !insn.addr !27
dec_label_pc_100: ; preds = %dec_label_pc_fb, %dec_label_pc_81
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !28
}
declare i64 @strlen(i64) local_unnamed_addr
declare i64 @memmove(i64, i64, i64, i64) local_unnamed_addr
declare i64 @printLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i32 @__asm_in(i16) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 12}
!1 = !{i64 31}
!2 = !{i64 48}
!3 = !{i64 49}
!4 = !{i64 55}
!5 = !{i64 59}
!6 = !{i64 66}
!7 = !{i64 71}
!8 = !{i64 79}
!9 = !{i64 89}
!10 = !{i64 94}
!11 = !{i64 101}
!12 = !{i64 107}
!13 = !{i64 111}
!14 = !{i64 120}
!15 = !{i64 122}
!16 = !{i64 128}
!17 = !{i64 129}
!18 = !{i64 141}
!19 = !{i64 174}
!20 = !{i64 192}
!21 = !{i64 195}
!22 = !{i64 200}
!23 = !{i64 218}
!24 = !{i64 230}
!25 = !{i64 240}
!26 = !{i64 249}
!27 = !{i64 251}
!28 = !{i64 257}
### Assistant: %struct._CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memmove_67_structType = type { i8* }
@__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memmove_67b_badSink.source = private unnamed_addr constant [11 x i8] c"AAAAAAAAAA\00", align 1
@__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memmove_67b_goodG2BSink.source = private unnamed_addr constant [11 x i8] c"AAAAAAAAAA\00", align 1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memmove_67b_badSink(i8* %myStruct.coerce) #0 {
entry:
%myStruct = alloca %struct._CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memmove_67_structType, align 8
%data = alloca i8*, align 8
%source = alloca [11 x i8], align 1
%coerce.dive = getelementptr inbounds %struct._CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memmove_67_structType, %struct._CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memmove_67_structType* %myStruct, i32 0, i32 0
store i8* %myStruct.coerce, i8** %coerce.dive, align 8
%structFirst = getelementptr inbounds %struct._CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memmove_67_structType, %struct._CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memmove_67_structType* %myStruct, i32 0, i32 0
%0 = load i8*, i8** %structFirst, align 8
store i8* %0, i8** %data, align 8
%1 = bitcast [11 x i8]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %1, i8* align 1 getelementptr inbounds ([11 x i8], [11 x i8]* @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memmove_67b_badSink.source, i32 0, i32 0), i64 11, i1 false)
%2 = load i8*, i8** %data, align 8
%arraydecay = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%arraydecay1 = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%call = call i64 @strlen(i8* %arraydecay1) #4
%add = add i64 %call, 1
%mul = mul i64 %add, 1
call void @llvm.memmove.p0i8.p0i8.i64(i8* align 1 %2, i8* align 1 %arraydecay, i64 %mul, i1 false)
%3 = load i8*, i8** %data, align 8
call void @printLine(i8* %3)
ret void
}
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #1
; Function Attrs: nounwind readonly
declare dso_local i64 @strlen(i8*) #2
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memmove.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i1 immarg) #1
declare dso_local void @printLine(i8*) #3
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memmove_67b_goodG2BSink(i8* %myStruct.coerce) #0 {
entry:
%myStruct = alloca %struct._CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memmove_67_structType, align 8
%data = alloca i8*, align 8
%source = alloca [11 x i8], align 1
%coerce.dive = getelementptr inbounds %struct._CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memmove_67_structType, %struct._CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memmove_67_structType* %myStruct, i32 0, i32 0
store i8* %myStruct.coerce, i8** %coerce.dive, align 8
%structFirst = getelementptr inbounds %struct._CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memmove_67_structType, %struct._CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memmove_67_structType* %myStruct, i32 0, i32 0
%0 = load i8*, i8** %structFirst, align 8
store i8* %0, i8** %data, align 8
%1 = bitcast [11 x i8]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %1, i8* align 1 getelementptr inbounds ([11 x i8], [11 x i8]* @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memmove_67b_goodG2BSink.source, i32 0, i32 0), i64 11, i1 false)
%2 = load i8*, i8** %data, align 8
%arraydecay = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%arraydecay1 = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%call = call i64 @strlen(i8* %arraydecay1) #4
%add = add i64 %call, 1
%mul = mul i64 %add, 1
call void @llvm.memmove.p0i8.p0i8.i64(i8* align 1 %2, i8* align 1 %arraydecay, i64 %mul, i1 false)
%3 = load i8*, i8** %data, align 8
call void @printLine(i8* %3)
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" }
attributes #1 = { argmemonly nounwind willreturn }
attributes #2 = { nounwind readonly "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #3 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #4 = { nounwind readonly }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_178 = local_unnamed_addr constant [11 x i32] %wide-string
@global_var_180 = local_unnamed_addr constant [9 x i32] %wide-string
@global_var_188 = local_unnamed_addr constant [7 x i32] %wide-string
@global_var_190 = local_unnamed_addr constant [5 x i32] %wide-string
@global_var_198 = local_unnamed_addr constant [3 x i32] %wide-string
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%stack_var_-120 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
%1 = ptrtoint i64* %stack_var_-120 to i64, !insn.addr !1
ret i64 %1, !insn.addr !2
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_b2:
%rax.0.reg2mem = alloca i64, !insn.addr !3
%stack_var_-72 = alloca i32*, align 8
%stack_var_-120 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !4
%1 = bitcast i64* %stack_var_-120 to i32*, !insn.addr !5
store i32 0, i32* %1, align 8, !insn.addr !5
%2 = ptrtoint i64* %stack_var_-120 to i64, !insn.addr !6
store i32* inttoptr (i64 279172874305 to i32*), i32** %stack_var_-72, align 8, !insn.addr !7
%3 = bitcast i32** %stack_var_-72 to i64*, !insn.addr !8
%4 = call i64 @wcscpy(i64 %2, i64* nonnull %3, i64* nonnull %3), !insn.addr !8
%5 = call i64 @printWLine(i64 %2), !insn.addr !9
%6 = call i64 @__readfsqword(i64 40), !insn.addr !10
%7 = icmp eq i64 %0, %6, !insn.addr !10
store i64 0, i64* %rax.0.reg2mem, !insn.addr !11
br i1 %7, label %dec_label_pc_162, label %dec_label_pc_15d, !insn.addr !11
dec_label_pc_15d: ; preds = %dec_label_pc_b2
%8 = call i64 @__stack_chk_fail(), !insn.addr !12
store i64 %8, i64* %rax.0.reg2mem, !insn.addr !12
br label %dec_label_pc_162, !insn.addr !12
dec_label_pc_162: ; preds = %dec_label_pc_15d, %dec_label_pc_b2
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !13
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_cpy_17_good() local_unnamed_addr {
dec_label_pc_164:
%0 = call i64 @goodG2B(), !insn.addr !14
ret i64 %0, !insn.addr !15
}
declare i64 @wcscpy(i64, i64*, i64*) local_unnamed_addr
declare i64 @printWLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 8}
!1 = !{i64 32}
!2 = !{i64 36}
!3 = !{i64 178}
!4 = !{i64 186}
!5 = !{i64 222}
!6 = !{i64 214}
!7 = !{i64 252}
!8 = !{i64 316}
!9 = !{i64 328}
!10 = !{i64 338}
!11 = !{i64 347}
!12 = !{i64 349}
!13 = !{i64 355}
!14 = !{i64 365}
!15 = !{i64 372}
### Assistant: @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_cpy_17_bad.source = private unnamed_addr constant [11 x i32] [i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 0], align 16
@__const.goodG2B.source = private unnamed_addr constant [11 x i32] [i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 0], align 16
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_cpy_17_bad() #0 {
entry:
%i = alloca i32, align 4
%data = alloca i32*, align 8
%dataBadBuffer = alloca [10 x i32], align 16
%dataGoodBuffer = alloca [11 x i32], align 16
%source = alloca [11 x i32], align 16
store i32 0, i32* %i, align 4
br label %for.cond
for.cond: ; preds = %for.inc, %entry
%0 = load i32, i32* %i, align 4
%cmp = icmp slt i32 %0, 1
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%arraydecay = getelementptr inbounds [10 x i32], [10 x i32]* %dataBadBuffer, i64 0, i64 0
store i32* %arraydecay, i32** %data, align 8
%1 = load i32*, i32** %data, align 8
%arrayidx = getelementptr inbounds i32, i32* %1, i64 0
store i32 0, i32* %arrayidx, align 4
br label %for.inc
for.inc: ; preds = %for.body
%2 = load i32, i32* %i, align 4
%inc = add nsw i32 %2, 1
store i32 %inc, i32* %i, align 4
br label %for.cond
for.end: ; preds = %for.cond
%3 = bitcast [11 x i32]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 %3, i8* align 16 bitcast ([11 x i32]* @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_cpy_17_bad.source to i8*), i64 44, i1 false)
%4 = load i32*, i32** %data, align 8
%arraydecay1 = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%call = call i32* @wcscpy(i32* %4, i32* %arraydecay1) #4
%5 = load i32*, i32** %data, align 8
call void @printWLine(i32* %5)
ret void
}
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #1
; Function Attrs: nounwind
declare dso_local i32* @wcscpy(i32*, i32*) #2
declare dso_local void @printWLine(i32*) #3
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_cpy_17_good() #0 {
entry:
call void @goodG2B()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B() #0 {
entry:
%h = alloca i32, align 4
%data = alloca i32*, align 8
%dataBadBuffer = alloca [10 x i32], align 16
%dataGoodBuffer = alloca [11 x i32], align 16
%source = alloca [11 x i32], align 16
store i32 0, i32* %h, align 4
br label %for.cond
for.cond: ; preds = %for.inc, %entry
%0 = load i32, i32* %h, align 4
%cmp = icmp slt i32 %0, 1
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%arraydecay = getelementptr inbounds [11 x i32], [11 x i32]* %dataGoodBuffer, i64 0, i64 0
store i32* %arraydecay, i32** %data, align 8
%1 = load i32*, i32** %data, align 8
%arrayidx = getelementptr inbounds i32, i32* %1, i64 0
store i32 0, i32* %arrayidx, align 4
br label %for.inc
for.inc: ; preds = %for.body
%2 = load i32, i32* %h, align 4
%inc = add nsw i32 %2, 1
store i32 %inc, i32* %h, align 4
br label %for.cond
for.end: ; preds = %for.cond
%3 = bitcast [11 x i32]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 %3, i8* align 16 bitcast ([11 x i32]* @__const.goodG2B.source to i8*), i64 44, i1 false)
%4 = load i32*, i32** %data, align 8
%arraydecay1 = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%call = call i32* @wcscpy(i32* %4, i32* %arraydecay1) #4
%5 = load i32*, i32** %data, align 8
call void @printWLine(i32* %5)
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" }
attributes #1 = { argmemonly nounwind willreturn }
attributes #2 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #3 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_f = constant [3 x i8] c"%(\00"
@global_var_10 = external constant i128
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
ret i64 sub (i64 ptrtoint (i128* @global_var_10 to i64), i64 1), !insn.addr !1
}
define i64 @function_31(i64 %arg1, i64 %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_31:
%0 = alloca i64
%.reg2mem = alloca i64, !insn.addr !2
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = load i64, i64* %0
%4 = trunc i64 %3 to i8
%5 = mul i8 %4, 2, !insn.addr !2
%6 = inttoptr i64 %3 to i8*, !insn.addr !2
store i8 %5, i8* %6, align 1, !insn.addr !2
%7 = udiv i64 %3, %arg2
%8 = mul i64 %7, ptrtoint (i128* @global_var_10 to i64), !insn.addr !3
%9 = sub i64 %2, %8, !insn.addr !4
%10 = add i64 %9, ptrtoint ([3 x i8]* @global_var_f to i64), !insn.addr !5
%11 = and i64 %10, -16, !insn.addr !6
%12 = add i64 %1, -456, !insn.addr !7
%13 = inttoptr i64 %12 to i64*, !insn.addr !7
store i64 %11, i64* %13, align 8, !insn.addr !7
%14 = add i64 %9, add (i64 ptrtoint ([3 x i8]* @global_var_f to i64), i64 sub (i64 0, i64 trunc (i128 mul (i128 sext (i64 trunc (i128 udiv (i128 zext (i64 add (i64 sub (i64 ptrtoint (i128* @global_var_10 to i64), i64 1), i64 415) to i128), i128 zext (i64 ptrtoint (i128* @global_var_10 to i64) to i128)) to i64) to i128), i128 ptrtoint (i128* @global_var_10 to i128)) to i64))), !insn.addr !8
%15 = and i64 %14, -16, !insn.addr !9
%16 = add i64 %1, -448, !insn.addr !10
%17 = inttoptr i64 %16 to i64*, !insn.addr !10
store i64 %15, i64* %17, align 8, !insn.addr !10
%18 = load i64, i64* %13, align 8, !insn.addr !11
%19 = add i64 %1, -440, !insn.addr !12
%20 = inttoptr i64 %19 to i64*, !insn.addr !12
store i64 %18, i64* %20, align 8, !insn.addr !12
%21 = add i64 %1, -432, !insn.addr !13
%22 = inttoptr i64 %21 to i64*, !insn.addr !13
store i64 %18, i64* %22, align 8, !insn.addr !13
%23 = add i64 %1, -424, !insn.addr !14
%24 = inttoptr i64 %23 to i64*, !insn.addr !14
store i64 %18, i64* %24, align 8, !insn.addr !14
%25 = add i64 %1, -416, !insn.addr !15
%26 = inttoptr i64 %25 to i8*, !insn.addr !16
call void @__asm_rep_stosq_memset(i8* %26, i64 0, i64 50), !insn.addr !16
%27 = load i64, i64* %24, align 8, !insn.addr !17
%28 = call i64 @memcpy(i64 %27, i64 %25, i64 400, i64 %25), !insn.addr !18
%29 = load i64, i64* %24, align 8, !insn.addr !19
%30 = inttoptr i64 %29 to i32*, !insn.addr !20
%31 = load i32, i32* %30, align 4, !insn.addr !20
%32 = zext i32 %31 to i64, !insn.addr !21
%33 = call i64 @printIntLine(i64 %32), !insn.addr !22
%34 = add i64 %1, -8, !insn.addr !23
%35 = inttoptr i64 %34 to i64*, !insn.addr !23
%36 = load i64, i64* %35, align 8, !insn.addr !23
%37 = call i64 @__readfsqword(i64 40), !insn.addr !24
%38 = icmp eq i64 %37, %36, !insn.addr !24
store i64 0, i64* %.reg2mem, !insn.addr !25
br i1 %38, label %dec_label_pc_110, label %dec_label_pc_10b, !insn.addr !25
dec_label_pc_10b: ; preds = %dec_label_pc_31
%39 = call i64 @__stack_chk_fail(), !insn.addr !26
store i64 %39, i64* %.reg2mem, !insn.addr !26
br label %dec_label_pc_110, !insn.addr !26
dec_label_pc_110: ; preds = %dec_label_pc_10b, %dec_label_pc_31
%.reload = load i64, i64* %.reg2mem, !insn.addr !27
ret i64 %.reload, !insn.addr !27
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_112:
%rax.0.reg2mem = alloca i64, !insn.addr !28
%stack_var_-424 = alloca i64, align 8
%stack_var_-472 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-472 to i64, !insn.addr !29
%1 = call i64 @__readfsqword(i64 40), !insn.addr !30
%2 = add i64 %0, add (i64 ptrtoint ([3 x i8]* @global_var_f to i64), i64 add (i64 sub (i64 0, i64 trunc (i128 mul (i128 sext (i64 trunc (i128 udiv (i128 zext (i64 add (i64 sub (i64 ptrtoint (i128* @global_var_10 to i64), i64 1), i64 415) to i128), i128 zext (i64 ptrtoint (i128* @global_var_10 to i64) to i128)) to i64) to i128), i128 ptrtoint (i128* @global_var_10 to i128)) to i64)), i64 sub (i64 0, i64 trunc (i128 mul (i128 sext (i64 trunc (i128 udiv (i128 zext (i64 add (i64 sub (i64 ptrtoint (i128* @global_var_10 to i64), i64 1), i64 215) to i128), i128 zext (i64 ptrtoint (i128* @global_var_10 to i64) to i128)) to i64) to i128), i128 ptrtoint (i128* @global_var_10 to i128)) to i64)))), !insn.addr !31
%3 = and i64 %2, -16, !insn.addr !32
%4 = bitcast i64* %stack_var_-424 to i8*, !insn.addr !33
call void @__asm_rep_stosq_memset(i8* nonnull %4, i64 0, i64 50), !insn.addr !33
%5 = ptrtoint i64* %stack_var_-424 to i64, !insn.addr !34
%6 = call i64 @memcpy(i64 %3, i64 %5, i64 400, i64 %5), !insn.addr !35
%7 = inttoptr i64 %3 to i32*, !insn.addr !36
%8 = load i32, i32* %7, align 16, !insn.addr !36
%9 = zext i32 %8 to i64, !insn.addr !37
%10 = call i64 @printIntLine(i64 %9), !insn.addr !38
%11 = call i64 @__readfsqword(i64 40), !insn.addr !39
%12 = icmp eq i64 %1, %11, !insn.addr !39
store i64 0, i64* %rax.0.reg2mem, !insn.addr !40
br i1 %12, label %dec_label_pc_222, label %dec_label_pc_21d, !insn.addr !40
dec_label_pc_21d: ; preds = %dec_label_pc_112
%13 = call i64 @__stack_chk_fail(), !insn.addr !41
store i64 %13, i64* %rax.0.reg2mem, !insn.addr !41
br label %dec_label_pc_222, !insn.addr !41
dec_label_pc_222: ; preds = %dec_label_pc_21d, %dec_label_pc_112
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !42
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_memcpy_31_good() local_unnamed_addr {
dec_label_pc_224:
%0 = call i64 @goodG2B(), !insn.addr !43
ret i64 %0, !insn.addr !44
}
declare i64 @memcpy(i64, i64, i64, i64) local_unnamed_addr
declare i64 @printIntLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare void @__asm_rep_stosq_memset(i8*, i64, i64) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 11}
!1 = !{i64 31}
!2 = !{i64 49}
!3 = !{i64 54}
!4 = !{i64 58}
!5 = !{i64 64}
!6 = !{i64 68}
!7 = !{i64 76}
!8 = !{i64 121}
!9 = !{i64 125}
!10 = !{i64 133}
!11 = !{i64 140}
!12 = !{i64 147}
!13 = !{i64 161}
!14 = !{i64 175}
!15 = !{i64 182}
!16 = !{i64 202}
!17 = !{i64 212}
!18 = !{i64 230}
!19 = !{i64 235}
!20 = !{i64 242}
!21 = !{i64 244}
!22 = !{i64 246}
!23 = !{i64 252}
!24 = !{i64 256}
!25 = !{i64 265}
!26 = !{i64 267}
!27 = !{i64 273}
!28 = !{i64 274}
!29 = !{i64 278}
!30 = !{i64 285}
!31 = !{i64 395}
!32 = !{i64 399}
!33 = !{i64 476}
!34 = !{i64 479}
!35 = !{i64 504}
!36 = !{i64 516}
!37 = !{i64 518}
!38 = !{i64 520}
!39 = !{i64 530}
!40 = !{i64 539}
!41 = !{i64 541}
!42 = !{i64 547}
!43 = !{i64 557}
!44 = !{i64 564}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_memcpy_31_bad() #0 {
entry:
%data = alloca i32*, align 8
%dataBadBuffer = alloca i32*, align 8
%dataGoodBuffer = alloca i32*, align 8
%dataCopy = alloca i32*, align 8
%data1 = alloca i32*, align 8
%source = alloca [100 x i32], align 16
%0 = alloca i8, i64 200, align 16
%1 = bitcast i8* %0 to i32*
store i32* %1, i32** %dataBadBuffer, align 8
%2 = alloca i8, i64 400, align 16
%3 = bitcast i8* %2 to i32*
store i32* %3, i32** %dataGoodBuffer, align 8
%4 = load i32*, i32** %dataBadBuffer, align 8
store i32* %4, i32** %data, align 8
%5 = load i32*, i32** %data, align 8
store i32* %5, i32** %dataCopy, align 8
%6 = load i32*, i32** %dataCopy, align 8
store i32* %6, i32** %data1, align 8
%7 = bitcast [100 x i32]* %source to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %7, i8 0, i64 400, i1 false)
%8 = load i32*, i32** %data1, align 8
%9 = bitcast i32* %8 to i8*
%arraydecay = getelementptr inbounds [100 x i32], [100 x i32]* %source, i64 0, i64 0
%10 = bitcast i32* %arraydecay to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 %9, i8* align 16 %10, i64 400, i1 false)
%11 = load i32*, i32** %data1, align 8
%arrayidx = getelementptr inbounds i32, i32* %11, i64 0
%12 = load i32, i32* %arrayidx, align 4
call void @printIntLine(i32 %12)
ret void
}
; Function Attrs: argmemonly nounwind willreturn writeonly
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #1
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #2
declare dso_local void @printIntLine(i32) #3
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_memcpy_31_good() #0 {
entry:
call void @goodG2B()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B() #0 {
entry:
%data = alloca i32*, align 8
%dataBadBuffer = alloca i32*, align 8
%dataGoodBuffer = alloca i32*, align 8
%dataCopy = alloca i32*, align 8
%data1 = alloca i32*, align 8
%source = alloca [100 x i32], align 16
%0 = alloca i8, i64 200, align 16
%1 = bitcast i8* %0 to i32*
store i32* %1, i32** %dataBadBuffer, align 8
%2 = alloca i8, i64 400, align 16
%3 = bitcast i8* %2 to i32*
store i32* %3, i32** %dataGoodBuffer, align 8
%4 = load i32*, i32** %dataGoodBuffer, align 8
store i32* %4, i32** %data, align 8
%5 = load i32*, i32** %data, align 8
store i32* %5, i32** %dataCopy, align 8
%6 = load i32*, i32** %dataCopy, align 8
store i32* %6, i32** %data1, align 8
%7 = bitcast [100 x i32]* %source to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %7, i8 0, i64 400, i1 false)
%8 = load i32*, i32** %data1, align 8
%9 = bitcast i32* %8 to i8*
%arraydecay = getelementptr inbounds [100 x i32], [100 x i32]* %source, i64 0, i64 0
%10 = bitcast i32* %arraydecay to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 %9, i8* align 16 %10, i64 400, i1 false)
%11 = load i32*, i32** %data1, align 8
%arrayidx = getelementptr inbounds i32, i32* %11, i64 0
%12 = load i32, i32* %arrayidx, align 4
call void @printIntLine(i32 %12)
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" }
attributes #1 = { argmemonly nounwind willreturn writeonly }
attributes #2 = { argmemonly nounwind willreturn }
attributes #3 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_1d3 = constant [21 x i8] c"Benign, fixed string\00"
@global_var_2a8 = local_unnamed_addr global i32 0
@global_var_2d8 = local_unnamed_addr global i32 0
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !0
%1 = load i64, i64* %0
%stack_var_-27 = alloca i64, align 8
%stack_var_-37 = alloca i64, align 8
%2 = call i64 @__readfsqword(i64 40), !insn.addr !1
%3 = load i32, i32* @global_var_2a8, align 4, !insn.addr !2
%4 = icmp eq i32 %3, 0, !insn.addr !3
br i1 %4, label %dec_label_pc_30, label %dec_label_pc_21, !insn.addr !4
dec_label_pc_21: ; preds = %dec_label_pc_0
%5 = ptrtoint i64* %stack_var_-37 to i64, !insn.addr !5
ret i64 %5, !insn.addr !5
dec_label_pc_30: ; preds = %dec_label_pc_0
store i64 4702111234474983745, i64* %stack_var_-27, align 8, !insn.addr !6
%6 = call i64 @strlen(i64* nonnull %stack_var_-27), !insn.addr !7
%7 = add i64 %6, 1, !insn.addr !8
%8 = call i64 @memcpy(i64 %1, i64* nonnull %stack_var_-27, i64 %7, i64* nonnull %stack_var_-27), !insn.addr !9
%9 = call i64 @printLine(i64 %1), !insn.addr !10
%10 = call i64 @__readfsqword(i64 40), !insn.addr !11
%11 = icmp eq i64 %2, %10, !insn.addr !11
store i64 0, i64* %rax.0.reg2mem, !insn.addr !12
br i1 %11, label %dec_label_pc_8c, label %dec_label_pc_87, !insn.addr !12
dec_label_pc_87: ; preds = %dec_label_pc_30
%12 = call i64 @__stack_chk_fail(), !insn.addr !13
store i64 %12, i64* %rax.0.reg2mem, !insn.addr !13
br label %dec_label_pc_8c, !insn.addr !13
dec_label_pc_8c: ; preds = %dec_label_pc_87, %dec_label_pc_30
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !14
}
define i64 @goodG2B1() local_unnamed_addr {
dec_label_pc_8e:
%rax.0.reg2mem = alloca i64, !insn.addr !15
%stack_var_-48.0.reg2mem = alloca i64, !insn.addr !15
%stack_var_-27 = alloca i64, align 8
%stack_var_-38 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !16
%1 = load i32, i32* @global_var_2d8, align 4, !insn.addr !17
%2 = icmp eq i32 %1, 0, !insn.addr !18
br i1 %2, label %dec_label_pc_bd, label %dec_label_pc_af, !insn.addr !19
dec_label_pc_af: ; preds = %dec_label_pc_8e
%3 = call i64 @printLine(i64 ptrtoint ([21 x i8]* @global_var_1d3 to i64)), !insn.addr !20
br label %dec_label_pc_cc, !insn.addr !21
dec_label_pc_bd: ; preds = %dec_label_pc_8e
%4 = ptrtoint i64* %stack_var_-38 to i64, !insn.addr !22
%5 = bitcast i64* %stack_var_-38 to i8*, !insn.addr !23
store i8 0, i8* %5, align 8, !insn.addr !23
store i64 %4, i64* %stack_var_-48.0.reg2mem, !insn.addr !23
br label %dec_label_pc_cc, !insn.addr !23
dec_label_pc_cc: ; preds = %dec_label_pc_bd, %dec_label_pc_af
%stack_var_-48.0.reload = load i64, i64* %stack_var_-48.0.reg2mem
store i64 4702111234474983745, i64* %stack_var_-27, align 8, !insn.addr !24
%6 = call i64 @strlen(i64* nonnull %stack_var_-27), !insn.addr !25
%7 = add i64 %6, 1, !insn.addr !26
%8 = call i64 @memcpy(i64 %stack_var_-48.0.reload, i64* nonnull %stack_var_-27, i64 %7, i64* nonnull %stack_var_-27), !insn.addr !27
%9 = call i64 @printLine(i64 %stack_var_-48.0.reload), !insn.addr !28
%10 = call i64 @__readfsqword(i64 40), !insn.addr !29
%11 = icmp eq i64 %0, %10, !insn.addr !29
store i64 0, i64* %rax.0.reg2mem, !insn.addr !30
br i1 %11, label %dec_label_pc_128, label %dec_label_pc_123, !insn.addr !30
dec_label_pc_123: ; preds = %dec_label_pc_cc
%12 = call i64 @__stack_chk_fail(), !insn.addr !31
store i64 %12, i64* %rax.0.reg2mem, !insn.addr !31
br label %dec_label_pc_128, !insn.addr !31
dec_label_pc_128: ; preds = %dec_label_pc_123, %dec_label_pc_cc
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !32
}
define i64 @goodG2B2() local_unnamed_addr {
dec_label_pc_12a:
%rax.0.reg2mem = alloca i64, !insn.addr !33
%stack_var_-48.0.reg2mem = alloca i64, !insn.addr !33
%stack_var_-27 = alloca i64, align 8
%stack_var_-38 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !34
%1 = load i32, i32* @global_var_2a8, align 4, !insn.addr !35
%2 = icmp eq i32 %1, 0, !insn.addr !36
br i1 %2, label %dec_label_pc_15a, label %dec_label_pc_14b, !insn.addr !37
dec_label_pc_14b: ; preds = %dec_label_pc_12a
%3 = ptrtoint i64* %stack_var_-38 to i64, !insn.addr !38
%4 = bitcast i64* %stack_var_-38 to i8*, !insn.addr !39
store i8 0, i8* %4, align 8, !insn.addr !39
store i64 %3, i64* %stack_var_-48.0.reg2mem, !insn.addr !39
br label %dec_label_pc_15a, !insn.addr !39
dec_label_pc_15a: ; preds = %dec_label_pc_14b, %dec_label_pc_12a
%stack_var_-48.0.reload = load i64, i64* %stack_var_-48.0.reg2mem
store i64 4702111234474983745, i64* %stack_var_-27, align 8, !insn.addr !40
%5 = call i64 @strlen(i64* nonnull %stack_var_-27), !insn.addr !41
%6 = add i64 %5, 1, !insn.addr !42
%7 = call i64 @memcpy(i64 %stack_var_-48.0.reload, i64* nonnull %stack_var_-27, i64 %6, i64* nonnull %stack_var_-27), !insn.addr !43
%8 = call i64 @printLine(i64 %stack_var_-48.0.reload), !insn.addr !44
%9 = call i64 @__readfsqword(i64 40), !insn.addr !45
%10 = icmp eq i64 %0, %9, !insn.addr !45
store i64 0, i64* %rax.0.reg2mem, !insn.addr !46
br i1 %10, label %dec_label_pc_1b6, label %dec_label_pc_1b1, !insn.addr !46
dec_label_pc_1b1: ; preds = %dec_label_pc_15a
%11 = call i64 @__stack_chk_fail(), !insn.addr !47
store i64 %11, i64* %rax.0.reg2mem, !insn.addr !47
br label %dec_label_pc_1b6, !insn.addr !47
dec_label_pc_1b6: ; preds = %dec_label_pc_1b1, %dec_label_pc_15a
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !48
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memcpy_09_good() local_unnamed_addr {
dec_label_pc_1b8:
%0 = call i64 @goodG2B1(), !insn.addr !49
%1 = call i64 @goodG2B2(), !insn.addr !50
ret i64 %1, !insn.addr !51
}
declare i64 @strlen(i64*) local_unnamed_addr
declare i64 @memcpy(i64, i64*, i64, i64*) local_unnamed_addr
declare i64 @printLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 0}
!1 = !{i64 8}
!2 = !{i64 23}
!3 = !{i64 29}
!4 = !{i64 31}
!5 = !{i64 33}
!6 = !{i64 58}
!7 = !{i64 79}
!8 = !{i64 84}
!9 = !{i64 102}
!10 = !{i64 114}
!11 = !{i64 124}
!12 = !{i64 133}
!13 = !{i64 135}
!14 = !{i64 141}
!15 = !{i64 142}
!16 = !{i64 150}
!17 = !{i64 165}
!18 = !{i64 171}
!19 = !{i64 173}
!20 = !{i64 182}
!21 = !{i64 187}
!22 = !{i64 193}
!23 = !{i64 201}
!24 = !{i64 214}
!25 = !{i64 235}
!26 = !{i64 240}
!27 = !{i64 258}
!28 = !{i64 270}
!29 = !{i64 280}
!30 = !{i64 289}
!31 = !{i64 291}
!32 = !{i64 297}
!33 = !{i64 298}
!34 = !{i64 306}
!35 = !{i64 321}
!36 = !{i64 327}
!37 = !{i64 329}
!38 = !{i64 335}
!39 = !{i64 343}
!40 = !{i64 356}
!41 = !{i64 377}
!42 = !{i64 382}
!43 = !{i64 400}
!44 = !{i64 412}
!45 = !{i64 422}
!46 = !{i64 431}
!47 = !{i64 433}
!48 = !{i64 439}
!49 = !{i64 449}
!50 = !{i64 459}
!51 = !{i64 466}
### Assistant: @GLOBAL_CONST_TRUE = external dso_local constant i32, align 4
@__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memcpy_09_bad.source = private unnamed_addr constant [11 x i8] c"AAAAAAAAAA\00", align 1
@GLOBAL_CONST_FALSE = external dso_local constant i32, align 4
@.str = private unnamed_addr constant [21 x i8] c"Benign, fixed string\00", align 1
@__const.goodG2B1.source = private unnamed_addr constant [11 x i8] c"AAAAAAAAAA\00", align 1
@__const.goodG2B2.source = private unnamed_addr constant [11 x i8] c"AAAAAAAAAA\00", align 1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memcpy_09_bad() #0 {
entry:
%data = alloca i8*, align 8
%dataBadBuffer = alloca [10 x i8], align 1
%dataGoodBuffer = alloca [11 x i8], align 1
%source = alloca [11 x i8], align 1
%0 = load i32, i32* @GLOBAL_CONST_TRUE, align 4
%tobool = icmp ne i32 %0, 0
br i1 %tobool, label %if.then, label %if.end
if.then: ; preds = %entry
%arraydecay = getelementptr inbounds [10 x i8], [10 x i8]* %dataBadBuffer, i64 0, i64 0
store i8* %arraydecay, i8** %data, align 8
%1 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %1, i64 0
store i8 0, i8* %arrayidx, align 1
br label %if.end
if.end: ; preds = %if.then, %entry
%2 = bitcast [11 x i8]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %2, i8* align 1 getelementptr inbounds ([11 x i8], [11 x i8]* @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memcpy_09_bad.source, i32 0, i32 0), i64 11, i1 false)
%3 = load i8*, i8** %data, align 8
%arraydecay1 = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%arraydecay2 = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%call = call i64 @strlen(i8* %arraydecay2) #4
%add = add i64 %call, 1
%mul = mul i64 %add, 1
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %3, i8* align 1 %arraydecay1, i64 %mul, i1 false)
%4 = load i8*, i8** %data, align 8
call void @printLine(i8* %4)
ret void
}
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #1
; Function Attrs: nounwind readonly
declare dso_local i64 @strlen(i8*) #2
declare dso_local void @printLine(i8*) #3
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memcpy_09_good() #0 {
entry:
call void @goodG2B1()
call void @goodG2B2()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B1() #0 {
entry:
%data = alloca i8*, align 8
%dataBadBuffer = alloca [10 x i8], align 1
%dataGoodBuffer = alloca [11 x i8], align 1
%source = alloca [11 x i8], align 1
%0 = load i32, i32* @GLOBAL_CONST_FALSE, align 4
%tobool = icmp ne i32 %0, 0
br i1 %tobool, label %if.then, label %if.else
if.then: ; preds = %entry
call void @printLine(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
br label %if.end
if.else: ; preds = %entry
%arraydecay = getelementptr inbounds [11 x i8], [11 x i8]* %dataGoodBuffer, i64 0, i64 0
store i8* %arraydecay, i8** %data, align 8
%1 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %1, i64 0
store i8 0, i8* %arrayidx, align 1
br label %if.end
if.end: ; preds = %if.else, %if.then
%2 = bitcast [11 x i8]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %2, i8* align 1 getelementptr inbounds ([11 x i8], [11 x i8]* @__const.goodG2B1.source, i32 0, i32 0), i64 11, i1 false)
%3 = load i8*, i8** %data, align 8
%arraydecay1 = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%arraydecay2 = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%call = call i64 @strlen(i8* %arraydecay2) #4
%add = add i64 %call, 1
%mul = mul i64 %add, 1
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %3, i8* align 1 %arraydecay1, i64 %mul, i1 false)
%4 = load i8*, i8** %data, align 8
call void @printLine(i8* %4)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B2() #0 {
entry:
%data = alloca i8*, align 8
%dataBadBuffer = alloca [10 x i8], align 1
%dataGoodBuffer = alloca [11 x i8], align 1
%source = alloca [11 x i8], align 1
%0 = load i32, i32* @GLOBAL_CONST_TRUE, align 4
%tobool = icmp ne i32 %0, 0
br i1 %tobool, label %if.then, label %if.end
if.then: ; preds = %entry
%arraydecay = getelementptr inbounds [11 x i8], [11 x i8]* %dataGoodBuffer, i64 0, i64 0
store i8* %arraydecay, i8** %data, align 8
%1 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %1, i64 0
store i8 0, i8* %arrayidx, align 1
br label %if.end
if.end: ; preds = %if.then, %entry
%2 = bitcast [11 x i8]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %2, i8* align 1 getelementptr inbounds ([11 x i8], [11 x i8]* @__const.goodG2B2.source, i32 0, i32 0), i64 11, i1 false)
%3 = load i8*, i8** %data, align 8
%arraydecay1 = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%arraydecay2 = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%call = call i64 @strlen(i8* %arraydecay2) #4
%add = add i64 %call, 1
%mul = mul i64 %add, 1
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %3, i8* align 1 %arraydecay1, i64 %mul, i1 false)
%4 = load i8*, i8** %data, align 8
call void @printLine(i8* %4)
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" }
attributes #1 = { argmemonly nounwind willreturn }
attributes #2 = { nounwind readonly "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #3 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #4 = { nounwind readonly }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_f = constant [3 x i8] c"%(\00"
@global_var_10 = external constant i128
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
ret i64 sub (i64 ptrtoint (i128* @global_var_10 to i64), i64 1), !insn.addr !1
}
define i64 @function_31(i64 %arg1, i64 %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_31:
%0 = alloca i64
%.reg2mem = alloca i64, !insn.addr !2
%storemerge1.reg2mem = alloca i64, !insn.addr !2
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = load i64, i64* %0
%4 = trunc i64 %3 to i8
%5 = mul i8 %4, 2, !insn.addr !2
%6 = inttoptr i64 %3 to i8*, !insn.addr !2
store i8 %5, i8* %6, align 1, !insn.addr !2
%7 = udiv i64 %3, %arg2
%8 = mul i64 %7, ptrtoint (i128* @global_var_10 to i64), !insn.addr !3
%9 = sub i64 %2, %8, !insn.addr !4
%10 = add i64 %9, ptrtoint ([3 x i8]* @global_var_f to i64), !insn.addr !5
%11 = and i64 %10, -16, !insn.addr !6
%12 = add i64 %1, -840, !insn.addr !7
%13 = inttoptr i64 %12 to i64*, !insn.addr !7
store i64 %11, i64* %13, align 8, !insn.addr !7
%14 = add i64 %9, add (i64 ptrtoint ([3 x i8]* @global_var_f to i64), i64 sub (i64 0, i64 trunc (i128 mul (i128 sext (i64 trunc (i128 udiv (i128 zext (i64 add (i64 sub (i64 ptrtoint (i128* @global_var_10 to i64), i64 1), i64 815) to i128), i128 zext (i64 ptrtoint (i128* @global_var_10 to i64) to i128)) to i64) to i128), i128 ptrtoint (i128* @global_var_10 to i128)) to i64))), !insn.addr !8
%15 = and i64 %14, -16, !insn.addr !9
%16 = add i64 %1, -832, !insn.addr !10
%17 = inttoptr i64 %16 to i64*, !insn.addr !10
store i64 %15, i64* %17, align 8, !insn.addr !10
%18 = load i64, i64* %13, align 8, !insn.addr !11
%19 = add i64 %1, -824, !insn.addr !12
%20 = inttoptr i64 %19 to i64*, !insn.addr !12
store i64 %18, i64* %20, align 8, !insn.addr !12
%21 = add i64 %1, -816, !insn.addr !13
%22 = inttoptr i64 %21 to i8*, !insn.addr !14
call void @__asm_rep_stosq_memset(i8* %22, i64 0, i64 100), !insn.addr !14
%23 = add i64 %1, -848, !insn.addr !15
%24 = inttoptr i64 %23 to i64*, !insn.addr !15
store i64 0, i64* %24, align 8
store i64 0, i64* %storemerge1.reg2mem
br label %dec_label_pc_bf
dec_label_pc_bf: ; preds = %dec_label_pc_31, %dec_label_pc_bf
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%25 = mul i64 %storemerge1.reload, 8, !insn.addr !16
%26 = load i64, i64* %20, align 8, !insn.addr !17
%27 = add i64 %26, %25, !insn.addr !18
%28 = add i64 %25, %21, !insn.addr !19
%29 = inttoptr i64 %28 to i64*, !insn.addr !19
%30 = load i64, i64* %29, align 8, !insn.addr !19
%31 = inttoptr i64 %27 to i64*, !insn.addr !20
store i64 %30, i64* %31, align 8, !insn.addr !20
%32 = load i64, i64* %24, align 8, !insn.addr !21
%33 = add i64 %32, 1, !insn.addr !21
store i64 %33, i64* %24, align 8
%34 = icmp ult i64 %33, 100
store i64 %33, i64* %storemerge1.reg2mem, !insn.addr !22
br i1 %34, label %dec_label_pc_bf, label %dec_label_pc_fc, !insn.addr !22
dec_label_pc_fc: ; preds = %dec_label_pc_bf
%35 = load i64, i64* %20, align 8, !insn.addr !23
%36 = inttoptr i64 %35 to i64*, !insn.addr !24
%37 = load i64, i64* %36, align 8, !insn.addr !24
%38 = call i64 @printLongLongLine(i64 %37), !insn.addr !25
%39 = add i64 %1, -8, !insn.addr !26
%40 = inttoptr i64 %39 to i64*, !insn.addr !26
%41 = load i64, i64* %40, align 8, !insn.addr !26
%42 = call i64 @__readfsqword(i64 40), !insn.addr !27
%43 = icmp eq i64 %42, %41, !insn.addr !27
store i64 0, i64* %.reg2mem, !insn.addr !28
br i1 %43, label %dec_label_pc_123, label %dec_label_pc_11e, !insn.addr !28
dec_label_pc_11e: ; preds = %dec_label_pc_fc
%44 = call i64 @__stack_chk_fail(), !insn.addr !29
store i64 %44, i64* %.reg2mem, !insn.addr !29
br label %dec_label_pc_123, !insn.addr !29
dec_label_pc_123: ; preds = %dec_label_pc_11e, %dec_label_pc_fc
%.reload = load i64, i64* %.reg2mem, !insn.addr !30
ret i64 %.reload, !insn.addr !30
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_125:
%rax.0.reg2mem = alloca i64, !insn.addr !31
%storemerge1.reg2mem = alloca i64, !insn.addr !31
%stack_var_-824 = alloca i64, align 8
%stack_var_-856 = alloca i64, align 8
%stack_var_-8 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !32
%1 = ptrtoint i64* %stack_var_-856 to i64, !insn.addr !33
%2 = call i64 @__readfsqword(i64 40), !insn.addr !34
%3 = add i64 %1, add (i64 ptrtoint ([3 x i8]* @global_var_f to i64), i64 add (i64 sub (i64 0, i64 trunc (i128 mul (i128 sext (i64 trunc (i128 udiv (i128 zext (i64 add (i64 sub (i64 ptrtoint (i128* @global_var_10 to i64), i64 1), i64 815) to i128), i128 zext (i64 ptrtoint (i128* @global_var_10 to i64) to i128)) to i64) to i128), i128 ptrtoint (i128* @global_var_10 to i128)) to i64)), i64 sub (i64 0, i64 trunc (i128 mul (i128 sext (i64 trunc (i128 udiv (i128 zext (i64 add (i64 sub (i64 ptrtoint (i128* @global_var_10 to i64), i64 1), i64 415) to i128), i128 zext (i64 ptrtoint (i128* @global_var_10 to i64) to i128)) to i64) to i128), i128 ptrtoint (i128* @global_var_10 to i128)) to i64)))), !insn.addr !35
%4 = and i64 %3, -16, !insn.addr !36
%5 = bitcast i64* %stack_var_-824 to i8*, !insn.addr !37
call void @__asm_rep_stosq_memset(i8* nonnull %5, i64 0, i64 100), !insn.addr !37
store i64 0, i64* %stack_var_-856, align 8
%6 = add i64 %0, -816, !insn.addr !38
store i64 0, i64* %storemerge1.reg2mem
br label %dec_label_pc_1e4
dec_label_pc_1e4: ; preds = %dec_label_pc_125, %dec_label_pc_1e4
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%7 = mul i64 %storemerge1.reload, 8, !insn.addr !39
%8 = add i64 %7, %4, !insn.addr !40
%9 = add i64 %6, %7, !insn.addr !38
%10 = inttoptr i64 %9 to i64*, !insn.addr !38
%11 = load i64, i64* %10, align 8, !insn.addr !38
%12 = inttoptr i64 %8 to i64*, !insn.addr !41
store i64 %11, i64* %12, align 8, !insn.addr !41
%13 = load i64, i64* %stack_var_-856, align 8, !insn.addr !42
%14 = add i64 %13, 1, !insn.addr !42
store i64 %14, i64* %stack_var_-856, align 8
%15 = icmp ult i64 %14, 100
store i64 %14, i64* %storemerge1.reg2mem, !insn.addr !43
br i1 %15, label %dec_label_pc_1e4, label %dec_label_pc_221, !insn.addr !43
dec_label_pc_221: ; preds = %dec_label_pc_1e4
%16 = inttoptr i64 %4 to i64*, !insn.addr !44
%17 = load i64, i64* %16, align 16, !insn.addr !44
%18 = call i64 @printLongLongLine(i64 %17), !insn.addr !45
%19 = call i64 @__readfsqword(i64 40), !insn.addr !46
%20 = icmp eq i64 %2, %19, !insn.addr !46
store i64 0, i64* %rax.0.reg2mem, !insn.addr !47
br i1 %20, label %dec_label_pc_248, label %dec_label_pc_243, !insn.addr !47
dec_label_pc_243: ; preds = %dec_label_pc_221
%21 = call i64 @__stack_chk_fail(), !insn.addr !48
store i64 %21, i64* %rax.0.reg2mem, !insn.addr !48
br label %dec_label_pc_248, !insn.addr !48
dec_label_pc_248: ; preds = %dec_label_pc_243, %dec_label_pc_221
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !49
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_18_good() local_unnamed_addr {
dec_label_pc_24a:
%0 = call i64 @goodG2B(), !insn.addr !50
ret i64 %0, !insn.addr !51
}
declare i64 @printLongLongLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare void @__asm_rep_stosq_memset(i8*, i64, i64) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 11}
!1 = !{i64 31}
!2 = !{i64 49}
!3 = !{i64 54}
!4 = !{i64 58}
!5 = !{i64 64}
!6 = !{i64 68}
!7 = !{i64 76}
!8 = !{i64 121}
!9 = !{i64 125}
!10 = !{i64 133}
!11 = !{i64 141}
!12 = !{i64 148}
!13 = !{i64 155}
!14 = !{i64 175}
!15 = !{i64 178}
!16 = !{i64 198}
!17 = !{i64 206}
!18 = !{i64 213}
!19 = !{i64 223}
!20 = !{i64 231}
!21 = !{i64 234}
!22 = !{i64 250}
!23 = !{i64 252}
!24 = !{i64 259}
!25 = !{i64 265}
!26 = !{i64 271}
!27 = !{i64 275}
!28 = !{i64 284}
!29 = !{i64 286}
!30 = !{i64 292}
!31 = !{i64 293}
!32 = !{i64 294}
!33 = !{i64 297}
!34 = !{i64 304}
!35 = !{i64 414}
!36 = !{i64 418}
!37 = !{i64 468}
!38 = !{i64 516}
!39 = !{i64 491}
!40 = !{i64 506}
!41 = !{i64 524}
!42 = !{i64 527}
!43 = !{i64 543}
!44 = !{i64 552}
!45 = !{i64 558}
!46 = !{i64 568}
!47 = !{i64 577}
!48 = !{i64 579}
!49 = !{i64 585}
!50 = !{i64 595}
!51 = !{i64 602}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_18_bad() #0 {
entry:
%data = alloca i64*, align 8
%dataBadBuffer = alloca i64*, align 8
%dataGoodBuffer = alloca i64*, align 8
%source1 = alloca [100 x i64], align 16
%i = alloca i64, align 8
%0 = alloca i8, i64 400, align 16
%1 = bitcast i8* %0 to i64*
store i64* %1, i64** %dataBadBuffer, align 8
%2 = alloca i8, i64 800, align 16
%3 = bitcast i8* %2 to i64*
store i64* %3, i64** %dataGoodBuffer, align 8
br label %source
source: ; preds = %entry
%4 = load i64*, i64** %dataBadBuffer, align 8
store i64* %4, i64** %data, align 8
%5 = bitcast [100 x i64]* %source1 to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %5, i8 0, i64 800, i1 false)
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %source
%6 = load i64, i64* %i, align 8
%cmp = icmp ult i64 %6, 100
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%7 = load i64, i64* %i, align 8
%arrayidx = getelementptr inbounds [100 x i64], [100 x i64]* %source1, i64 0, i64 %7
%8 = load i64, i64* %arrayidx, align 8
%9 = load i64*, i64** %data, align 8
%10 = load i64, i64* %i, align 8
%arrayidx2 = getelementptr inbounds i64, i64* %9, i64 %10
store i64 %8, i64* %arrayidx2, align 8
br label %for.inc
for.inc: ; preds = %for.body
%11 = load i64, i64* %i, align 8
%inc = add i64 %11, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%12 = load i64*, i64** %data, align 8
%arrayidx3 = getelementptr inbounds i64, i64* %12, i64 0
%13 = load i64, i64* %arrayidx3, align 8
call void @printLongLongLine(i64 %13)
ret void
}
; Function Attrs: argmemonly nounwind willreturn writeonly
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #1
declare dso_local void @printLongLongLine(i64) #2
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_18_good() #0 {
entry:
call void @goodG2B()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B() #0 {
entry:
%data = alloca i64*, align 8
%dataBadBuffer = alloca i64*, align 8
%dataGoodBuffer = alloca i64*, align 8
%source1 = alloca [100 x i64], align 16
%i = alloca i64, align 8
%0 = alloca i8, i64 400, align 16
%1 = bitcast i8* %0 to i64*
store i64* %1, i64** %dataBadBuffer, align 8
%2 = alloca i8, i64 800, align 16
%3 = bitcast i8* %2 to i64*
store i64* %3, i64** %dataGoodBuffer, align 8
br label %source
source: ; preds = %entry
%4 = load i64*, i64** %dataGoodBuffer, align 8
store i64* %4, i64** %data, align 8
%5 = bitcast [100 x i64]* %source1 to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %5, i8 0, i64 800, i1 false)
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %source
%6 = load i64, i64* %i, align 8
%cmp = icmp ult i64 %6, 100
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%7 = load i64, i64* %i, align 8
%arrayidx = getelementptr inbounds [100 x i64], [100 x i64]* %source1, i64 0, i64 %7
%8 = load i64, i64* %arrayidx, align 8
%9 = load i64*, i64** %data, align 8
%10 = load i64, i64* %i, align 8
%arrayidx2 = getelementptr inbounds i64, i64* %9, i64 %10
store i64 %8, i64* %arrayidx2, align 8
br label %for.inc
for.inc: ; preds = %for.body
%11 = load i64, i64* %i, align 8
%inc = add i64 %11, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%12 = load i64*, i64** %data, align 8
%arrayidx3 = getelementptr inbounds i64, i64* %12, i64 0
%13 = load i64, i64* %arrayidx3, align 8
call void @printLongLongLine(i64 %13)
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" }
attributes #1 = { argmemonly nounwind willreturn writeonly }
attributes #2 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%stack_var_-72 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
%1 = ptrtoint i64* %stack_var_-72 to i64, !insn.addr !1
ret i64 %1, !insn.addr !2
}
define i64 @function_34() local_unnamed_addr {
dec_label_pc_34:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !3
%1 = load i64, i64* %0
%2 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_cpy_68b_badSink(), !insn.addr !4
%3 = add i64 %1, -8, !insn.addr !5
%4 = inttoptr i64 %3 to i64*, !insn.addr !5
%5 = load i64, i64* %4, align 8, !insn.addr !5
%6 = call i64 @__readfsqword(i64 40), !insn.addr !6
%7 = icmp eq i64 %5, %6, !insn.addr !6
store i64 0, i64* %rax.0.reg2mem, !insn.addr !7
br i1 %7, label %dec_label_pc_53, label %dec_label_pc_4e, !insn.addr !7
dec_label_pc_4e: ; preds = %dec_label_pc_34
%8 = call i64 @__stack_chk_fail(), !insn.addr !8
store i64 %8, i64* %rax.0.reg2mem, !insn.addr !8
br label %dec_label_pc_53, !insn.addr !8
dec_label_pc_53: ; preds = %dec_label_pc_4e, %dec_label_pc_34
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !9
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_55:
%rax.0.reg2mem = alloca i64, !insn.addr !10
%stack_var_-72 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !11
%1 = ptrtoint i64* %stack_var_-72 to i64, !insn.addr !12
%2 = bitcast i64* %stack_var_-72 to i32*, !insn.addr !13
store i32 0, i32* %2, align 8, !insn.addr !13
store i64 %1, i64* inttoptr (i64 8 to i64*), align 8, !insn.addr !14
%3 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_cpy_68b_goodG2BSink(), !insn.addr !15
%4 = call i64 @__readfsqword(i64 40), !insn.addr !16
%5 = icmp eq i64 %0, %4, !insn.addr !16
store i64 0, i64* %rax.0.reg2mem, !insn.addr !17
br i1 %5, label %dec_label_pc_a8, label %dec_label_pc_a3, !insn.addr !17
dec_label_pc_a3: ; preds = %dec_label_pc_55
%6 = call i64 @__stack_chk_fail(), !insn.addr !18
store i64 %6, i64* %rax.0.reg2mem, !insn.addr !18
br label %dec_label_pc_a8, !insn.addr !18
dec_label_pc_a8: ; preds = %dec_label_pc_a3, %dec_label_pc_55
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !19
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_cpy_68_good() local_unnamed_addr {
dec_label_pc_aa:
%0 = call i64 @goodG2B(), !insn.addr !20
ret i64 %0, !insn.addr !21
}
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_cpy_68b_badSink() local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_cpy_68b_goodG2BSink() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 8}
!1 = !{i64 27}
!2 = !{i64 31}
!3 = !{i64 52}
!4 = !{i64 57}
!5 = !{i64 63}
!6 = !{i64 67}
!7 = !{i64 76}
!8 = !{i64 78}
!9 = !{i64 84}
!10 = !{i64 85}
!11 = !{i64 93}
!12 = !{i64 112}
!13 = !{i64 120}
!14 = !{i64 130}
!15 = !{i64 142}
!16 = !{i64 152}
!17 = !{i64 161}
!18 = !{i64 163}
!19 = !{i64 169}
!20 = !{i64 179}
!21 = !{i64 186}
### Assistant: @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_cpy_68_badData = dso_local global i32* null, align 8
@CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_cpy_68_goodG2BData = dso_local global i32* null, align 8
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_cpy_68_bad() #0 {
entry:
%data = alloca i32*, align 8
%dataBadBuffer = alloca [10 x i32], align 16
%dataGoodBuffer = alloca [11 x i32], align 16
%arraydecay = getelementptr inbounds [10 x i32], [10 x i32]* %dataBadBuffer, i64 0, i64 0
store i32* %arraydecay, i32** %data, align 8
%0 = load i32*, i32** %data, align 8
%arrayidx = getelementptr inbounds i32, i32* %0, i64 0
store i32 0, i32* %arrayidx, align 4
%1 = load i32*, i32** %data, align 8
store i32* %1, i32** @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_cpy_68_badData, align 8
call void (...) @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_cpy_68b_badSink()
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_cpy_68b_badSink(...) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_cpy_68_good() #0 {
entry:
call void @goodG2B()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B() #0 {
entry:
%data = alloca i32*, align 8
%dataBadBuffer = alloca [10 x i32], align 16
%dataGoodBuffer = alloca [11 x i32], align 16
%arraydecay = getelementptr inbounds [11 x i32], [11 x i32]* %dataGoodBuffer, i64 0, i64 0
store i32* %arraydecay, i32** %data, align 8
%0 = load i32*, i32** %data, align 8
%arrayidx = getelementptr inbounds i32, i32* %0, i64 0
store i32 0, i32* %arrayidx, align 4
%1 = load i32*, i32** %data, align 8
store i32* %1, i32** @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_cpy_68_goodG2BData, align 8
call void (...) @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_cpy_68b_goodG2BSink()
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_cpy_68b_goodG2BSink(...) #1
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" }
attributes #1 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_10 = constant [3 x i8] c"%(\00"
define i64 @_GLOBAL_OFFSET_TABLE_.1(i64 %arg1) local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
%1 = call i64 @strlen(i64 %arg1), !insn.addr !1
ret i64 %1, !insn.addr !1
}
define i64 @function_30() local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !2
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = load i64, i64* %0
%4 = mul i64 %3, 4, !insn.addr !2
%5 = add i64 %4, 4, !insn.addr !2
%6 = and i64 %5, 17179869180, !insn.addr !3
%7 = add i64 %6, add (i64 sub (i64 ptrtoint ([3 x i8]* @global_var_10 to i64), i64 1), i64 15), !insn.addr !4
%8 = urem i64 %7, ptrtoint ([3 x i8]* @global_var_10 to i64)
%9 = add i64 %2, add (i64 sub (i64 0, i64 add (i64 sub (i64 ptrtoint ([3 x i8]* @global_var_10 to i64), i64 1), i64 15)), i64 15)
%10 = add i64 %9, %8, !insn.addr !5
%11 = sub i64 %10, %6, !insn.addr !6
%12 = and i64 %11, -16, !insn.addr !7
%13 = add i64 %1, -16, !insn.addr !8
%14 = inttoptr i64 %13 to i64*, !insn.addr !8
store i64 %12, i64* %14, align 8, !insn.addr !8
%15 = add i64 %1, -40, !insn.addr !9
%16 = inttoptr i64 %15 to i64*, !insn.addr !9
%17 = load i64, i64* %16, align 8, !insn.addr !9
%18 = call i64 @wcscpy(i64 %12, i64 %17), !insn.addr !10
%19 = load i64, i64* %14, align 8, !insn.addr !11
%20 = call i64 @printLine(i64 %19), !insn.addr !12
%21 = add i64 %1, -8, !insn.addr !13
%22 = inttoptr i64 %21 to i64*, !insn.addr !13
%23 = load i64, i64* %22, align 8, !insn.addr !13
%24 = call i64 @__readfsqword(i64 40), !insn.addr !14
%25 = icmp eq i64 %23, %24, !insn.addr !14
store i64 0, i64* %rax.0.reg2mem, !insn.addr !15
br i1 %25, label %dec_label_pc_a2, label %dec_label_pc_9d, !insn.addr !15
dec_label_pc_9d: ; preds = %dec_label_pc_30
%26 = call i64 @__stack_chk_fail(), !insn.addr !16
store i64 %26, i64* %rax.0.reg2mem, !insn.addr !16
br label %dec_label_pc_a2, !insn.addr !16
dec_label_pc_a2: ; preds = %dec_label_pc_9d, %dec_label_pc_30
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !17
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE135_54e_goodG2BSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_a4:
%rax.0.reg2mem = alloca i64, !insn.addr !18
%stack_var_-56 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-56 to i64, !insn.addr !19
%1 = call i64 @__readfsqword(i64 40), !insn.addr !20
%2 = call i64 @strlen(i64 %arg1), !insn.addr !21
%3 = add i64 %2, add (i64 sub (i64 ptrtoint ([3 x i8]* @global_var_10 to i64), i64 1), i64 16), !insn.addr !22
%4 = urem i64 %3, ptrtoint ([3 x i8]* @global_var_10 to i64)
%5 = add i64 %0, add (i64 sub (i64 0, i64 add (i64 sub (i64 ptrtoint ([3 x i8]* @global_var_10 to i64), i64 1), i64 16)), i64 15)
%6 = sub i64 %5, %2, !insn.addr !23
%7 = add i64 %6, %4, !insn.addr !24
%8 = and i64 %7, -16, !insn.addr !25
%9 = call i64 @strcpy(i64 %8, i64 %arg1), !insn.addr !26
%10 = call i64 @printLine(i64 %8), !insn.addr !27
%11 = call i64 @__readfsqword(i64 40), !insn.addr !28
%12 = icmp eq i64 %1, %11, !insn.addr !28
store i64 0, i64* %rax.0.reg2mem, !insn.addr !29
br i1 %12, label %dec_label_pc_142, label %dec_label_pc_13d, !insn.addr !29
dec_label_pc_13d: ; preds = %dec_label_pc_a4
%13 = call i64 @__stack_chk_fail(), !insn.addr !30
store i64 %13, i64* %rax.0.reg2mem, !insn.addr !30
br label %dec_label_pc_142, !insn.addr !30
dec_label_pc_142: ; preds = %dec_label_pc_13d, %dec_label_pc_a4
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !31
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE135_54e_goodB2GSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_144:
%rax.0.reg2mem = alloca i64, !insn.addr !32
%stack_var_-56 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-56 to i64, !insn.addr !33
%1 = call i64 @__readfsqword(i64 40), !insn.addr !34
%2 = call i64 @wcslen(i64 %arg1), !insn.addr !35
%3 = mul i64 %2, 4, !insn.addr !36
%4 = add i64 %3, add (i64 sub (i64 ptrtoint ([3 x i8]* @global_var_10 to i64), i64 1), i64 19), !insn.addr !37
%5 = urem i64 %4, ptrtoint ([3 x i8]* @global_var_10 to i64)
%6 = add i64 %0, add (i64 sub (i64 0, i64 add (i64 sub (i64 ptrtoint ([3 x i8]* @global_var_10 to i64), i64 1), i64 19)), i64 15)
%7 = add i64 %6, %5, !insn.addr !38
%8 = sub i64 %7, %3, !insn.addr !39
%9 = and i64 %8, -16, !insn.addr !40
%10 = call i64 @wcscpy(i64 %9, i64 %arg1), !insn.addr !41
%11 = call i64 @printWLine(i64 %9), !insn.addr !42
%12 = call i64 @__readfsqword(i64 40), !insn.addr !43
%13 = icmp eq i64 %1, %12, !insn.addr !43
store i64 0, i64* %rax.0.reg2mem, !insn.addr !44
br i1 %13, label %dec_label_pc_1e6, label %dec_label_pc_1e1, !insn.addr !44
dec_label_pc_1e1: ; preds = %dec_label_pc_144
%14 = call i64 @__stack_chk_fail(), !insn.addr !45
store i64 %14, i64* %rax.0.reg2mem, !insn.addr !45
br label %dec_label_pc_1e6, !insn.addr !45
dec_label_pc_1e6: ; preds = %dec_label_pc_1e1, %dec_label_pc_144
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !46
}
declare i64 @strlen(i64) local_unnamed_addr
declare i64 @wcscpy(i64, i64) local_unnamed_addr
declare i64 @printLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @strcpy(i64, i64) local_unnamed_addr
declare i64 @wcslen(i64) local_unnamed_addr
declare i64 @printWLine(i64) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 12}
!1 = !{i64 34}
!2 = !{i64 48}
!3 = !{i64 51}
!4 = !{i64 68}
!5 = !{i64 88}
!6 = !{i64 94}
!7 = !{i64 98}
!8 = !{i64 106}
!9 = !{i64 110}
!10 = !{i64 124}
!11 = !{i64 129}
!12 = !{i64 136}
!13 = !{i64 142}
!14 = !{i64 146}
!15 = !{i64 155}
!16 = !{i64 157}
!17 = !{i64 163}
!18 = !{i64 164}
!19 = !{i64 168}
!20 = !{i64 176}
!21 = !{i64 198}
!22 = !{i64 228}
!23 = !{i64 248}
!24 = !{i64 254}
!25 = !{i64 258}
!26 = !{i64 284}
!27 = !{i64 296}
!28 = !{i64 306}
!29 = !{i64 315}
!30 = !{i64 317}
!31 = !{i64 323}
!32 = !{i64 324}
!33 = !{i64 328}
!34 = !{i64 336}
!35 = !{i64 358}
!36 = !{i64 371}
!37 = !{i64 392}
!38 = !{i64 412}
!39 = !{i64 418}
!40 = !{i64 422}
!41 = !{i64 448}
!42 = !{i64 460}
!43 = !{i64 470}
!44 = !{i64 479}
!45 = !{i64 481}
!46 = !{i64 487}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE135_54e_badSink(i8* %data) #0 {
entry:
%data.addr = alloca i8*, align 8
%dataLen = alloca i64, align 8
%dest = alloca i8*, align 8
store i8* %data, i8** %data.addr, align 8
%0 = load i8*, i8** %data.addr, align 8
%call = call i64 @strlen(i8* %0) #4
store i64 %call, i64* %dataLen, align 8
%1 = load i64, i64* %dataLen, align 8
%add = add i64 %1, 1
%mul = mul i64 %add, 4
%2 = alloca i8, i64 %mul, align 16
store i8* %2, i8** %dest, align 8
%3 = load i8*, i8** %dest, align 8
%4 = bitcast i8* %3 to i32*
%5 = load i8*, i8** %data.addr, align 8
%6 = bitcast i8* %5 to i32*
%call1 = call i32* @wcscpy(i32* %4, i32* %6) #5
%7 = load i8*, i8** %dest, align 8
call void @printLine(i8* %7)
ret void
}
; Function Attrs: nounwind readonly
declare dso_local i64 @strlen(i8*) #1
; Function Attrs: nounwind
declare dso_local i32* @wcscpy(i32*, i32*) #2
declare dso_local void @printLine(i8*) #3
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE135_54e_goodG2BSink(i8* %data) #0 {
entry:
%data.addr = alloca i8*, align 8
%dataLen = alloca i64, align 8
%dest = alloca i8*, align 8
store i8* %data, i8** %data.addr, align 8
%0 = load i8*, i8** %data.addr, align 8
%call = call i64 @strlen(i8* %0) #4
store i64 %call, i64* %dataLen, align 8
%1 = load i64, i64* %dataLen, align 8
%add = add i64 %1, 1
%mul = mul i64 %add, 1
%2 = alloca i8, i64 %mul, align 16
store i8* %2, i8** %dest, align 8
%3 = load i8*, i8** %dest, align 8
%4 = load i8*, i8** %data.addr, align 8
%call1 = call i8* @strcpy(i8* %3, i8* %4) #5
%5 = load i8*, i8** %dest, align 8
call void @printLine(i8* %5)
ret void
}
; Function Attrs: nounwind
declare dso_local i8* @strcpy(i8*, i8*) #2
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE135_54e_goodB2GSink(i8* %data) #0 {
entry:
%data.addr = alloca i8*, align 8
%dataLen = alloca i64, align 8
%dest = alloca i8*, align 8
store i8* %data, i8** %data.addr, align 8
%0 = load i8*, i8** %data.addr, align 8
%1 = bitcast i8* %0 to i32*
%call = call i64 @wcslen(i32* %1) #4
store i64 %call, i64* %dataLen, align 8
%2 = load i64, i64* %dataLen, align 8
%add = add i64 %2, 1
%mul = mul i64 %add, 4
%3 = alloca i8, i64 %mul, align 16
store i8* %3, i8** %dest, align 8
%4 = load i8*, i8** %dest, align 8
%5 = bitcast i8* %4 to i32*
%6 = load i8*, i8** %data.addr, align 8
%7 = bitcast i8* %6 to i32*
%call1 = call i32* @wcscpy(i32* %5, i32* %7) #5
%8 = load i8*, i8** %dest, align 8
%9 = bitcast i8* %8 to i32*
call void @printWLine(i32* %9)
ret void
}
; Function Attrs: nounwind readonly
declare dso_local i64 @wcslen(i32*) #1
declare dso_local void @printWLine(i32*) #3
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" }
attributes #1 = { nounwind readonly "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #2 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #3 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #4 = { nounwind readonly }
attributes #5 = { nounwind }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_4f0 = constant [32 x i8] c"ERROR: Array index is negative.\00"
@global_var_510 = constant [21 x i8] c"Benign, fixed string\00"
@global_var_528 = constant [36 x i8] c"ERROR: Array index is out-of-bounds\00"
@0 = external global i32
@global_var_4ec = local_unnamed_addr global i32 5
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
%1 = load i32, i32* inttoptr (i64 1260 to i32*), align 4, !insn.addr !1
%2 = zext i32 %1 to i64, !insn.addr !1
ret i64 %2, !insn.addr !2
}
define i64 @function_30(i64 %arg1, i64 %arg2, i64 %arg3, i64 %arg4) local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%1 = alloca i1
%2 = load i64, i64* %0
%3 = load i64, i64* %0
%4 = load i64, i64* %0
%5 = load i1, i1* %1
%6 = icmp eq i64 %arg4, 1, !insn.addr !3
%7 = or i1 %6, %5, !insn.addr !3
br i1 %7, label %dec_label_pc_32, label %dec_label_pc_33, !insn.addr !3
dec_label_pc_32: ; preds = %dec_label_pc_30
ret i64 %4, !insn.addr !3
dec_label_pc_33: ; preds = %dec_label_pc_30
%8 = add i64 %2, -24, !insn.addr !4
%9 = add i64 %8, %3, !insn.addr !4
%10 = inttoptr i64 %9 to i8*, !insn.addr !4
%11 = load i8, i8* %10, align 1, !insn.addr !4
%12 = mul i8 %11, 32, !insn.addr !4
store i8 %12, i8* %10, align 1, !insn.addr !4
ret i64 %4, !insn.addr !4
}
define i64 @function_39() local_unnamed_addr {
dec_label_pc_39:
%0 = alloca i64
%1 = load i64, i64* %0
%2 = trunc i64 %1 to i8
%3 = mul i8 %2, 2, !insn.addr !5
%4 = inttoptr i64 %1 to i8*, !insn.addr !5
store i8 %3, i8* %4, align 1, !insn.addr !5
%5 = call i64 @rand(), !insn.addr !6
%6 = call i64 @rand(), !insn.addr !7
%7 = call i64 @function_70(i64 ptrtoint (i32* @0 to i64), i64 ptrtoint (i32* @0 to i64)), !insn.addr !8
ret i64 %7, !insn.addr !8
}
define i64 @function_53() local_unnamed_addr {
dec_label_pc_53:
%0 = call i64 @rand(), !insn.addr !9
%1 = mul i64 %0, 1073741824, !insn.addr !10
%2 = call i64 @rand(), !insn.addr !11
%3 = mul i64 %2, 32768, !insn.addr !12
%4 = xor i64 %3, %1, !insn.addr !13
%5 = call i64 @rand(), !insn.addr !14
%6 = xor i64 %4, %5, !insn.addr !15
%7 = and i64 %6, 4294967295, !insn.addr !16
%8 = xor i64 %7, 4294967295, !insn.addr !16
ret i64 %8, !insn.addr !16
}
define i64 @function_70(i64 %arg1, i64 %arg2) local_unnamed_addr {
dec_label_pc_70:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !17
%storemerge1.reg2mem = alloca i32, !insn.addr !17
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = trunc i64 %2 to i32, !insn.addr !17
%4 = add i64 %1, -72, !insn.addr !17
%5 = inttoptr i64 %4 to i32*, !insn.addr !17
store i32 %3, i32* %5, align 4, !insn.addr !17
%6 = load i32, i32* @global_var_4ec, align 4, !insn.addr !18
%7 = icmp eq i32 %6, 5, !insn.addr !19
%8 = icmp eq i1 %7, false, !insn.addr !20
br i1 %8, label %dec_label_pc_ea, label %dec_label_pc_7e, !insn.addr !20
dec_label_pc_7e: ; preds = %dec_label_pc_70
%9 = add i64 %1, -64, !insn.addr !21
%10 = inttoptr i64 %9 to i64*, !insn.addr !21
store i64 0, i64* %10, align 8, !insn.addr !21
%11 = add i64 %1, -56, !insn.addr !22
%12 = inttoptr i64 %11 to i64*, !insn.addr !22
store i64 0, i64* %12, align 8, !insn.addr !22
%13 = add i64 %1, -48, !insn.addr !23
%14 = inttoptr i64 %13 to i64*, !insn.addr !23
store i64 0, i64* %14, align 8, !insn.addr !23
%15 = add i64 %1, -40, !insn.addr !24
%16 = inttoptr i64 %15 to i64*, !insn.addr !24
store i64 0, i64* %16, align 8, !insn.addr !24
%17 = add i64 %1, -32, !insn.addr !25
%18 = inttoptr i64 %17 to i64*, !insn.addr !25
store i64 0, i64* %18, align 8, !insn.addr !25
%19 = load i32, i32* %5, align 4, !insn.addr !26
%20 = icmp slt i32 %19, 0, !insn.addr !26
br i1 %20, label %dec_label_pc_de, label %dec_label_pc_ac, !insn.addr !27
dec_label_pc_ac: ; preds = %dec_label_pc_7e
%21 = sext i32 %19 to i64, !insn.addr !28
%22 = mul i64 %21, 4, !insn.addr !29
%23 = add i64 %22, %9, !insn.addr !29
%24 = inttoptr i64 %23 to i32*, !insn.addr !29
store i32 1, i32* %24, align 4, !insn.addr !29
%25 = add i64 %1, -68, !insn.addr !30
%26 = inttoptr i64 %25 to i32*, !insn.addr !30
store i32 0, i32* %26, align 4
store i32 0, i32* %storemerge1.reg2mem
br label %dec_label_pc_c2
dec_label_pc_c2: ; preds = %dec_label_pc_ac, %dec_label_pc_c2
%storemerge1.reload = load i32, i32* %storemerge1.reg2mem
%27 = sext i32 %storemerge1.reload to i64, !insn.addr !31
%28 = mul i64 %27, 4, !insn.addr !32
%29 = add i64 %28, %9, !insn.addr !32
%30 = inttoptr i64 %29 to i32*, !insn.addr !32
%31 = load i32, i32* %30, align 4, !insn.addr !32
%32 = zext i32 %31 to i64, !insn.addr !33
%33 = call i64 @printIntLine(i64 %32), !insn.addr !34
%34 = load i32, i32* %26, align 4, !insn.addr !35
%35 = add i32 %34, 1, !insn.addr !35
store i32 %35, i32* %26, align 4
%36 = icmp slt i32 %35, 10, !insn.addr !36
store i32 %35, i32* %storemerge1.reg2mem, !insn.addr !36
br i1 %36, label %dec_label_pc_c2, label %dec_label_pc_ea, !insn.addr !36
dec_label_pc_de: ; preds = %dec_label_pc_7e
%37 = call i64 @printLine(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @global_var_4f0, i64 0, i64 0)), !insn.addr !37
br label %dec_label_pc_ea, !insn.addr !37
dec_label_pc_ea: ; preds = %dec_label_pc_c2, %dec_label_pc_de, %dec_label_pc_70
%38 = add i64 %1, -24, !insn.addr !38
%39 = inttoptr i64 %38 to i64*, !insn.addr !38
%40 = load i64, i64* %39, align 8, !insn.addr !38
%41 = call i64 @__readfsqword(i64 40), !insn.addr !39
%42 = icmp eq i64 %40, %41, !insn.addr !39
store i64 0, i64* %rax.0.reg2mem, !insn.addr !40
br i1 %42, label %dec_label_pc_ff, label %dec_label_pc_fa, !insn.addr !40
dec_label_pc_fa: ; preds = %dec_label_pc_ea
%43 = call i64 @__stack_chk_fail(), !insn.addr !41
store i64 %43, i64* %rax.0.reg2mem, !insn.addr !41
br label %dec_label_pc_ff, !insn.addr !41
dec_label_pc_ff: ; preds = %dec_label_pc_fa, %dec_label_pc_ea
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !42
}
define i64 @goodB2G1() local_unnamed_addr {
dec_label_pc_106:
%rax.0.reg2mem = alloca i64, !insn.addr !43
%indvars.iv.reg2mem = alloca i64, !insn.addr !43
%stack_var_-80.0.reg2mem = alloca i32, !insn.addr !43
%.reg2mem = alloca i32, !insn.addr !43
%stack_var_-8 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !44
%1 = load i32, i32* @global_var_4ec, align 4
%2 = icmp eq i32 %1, 5, !insn.addr !45
%3 = icmp eq i1 %2, false, !insn.addr !46
store i32 %1, i32* %.reg2mem, !insn.addr !46
store i32 -1, i32* %stack_var_-80.0.reg2mem, !insn.addr !46
br i1 %3, label %dec_label_pc_179, label %dec_label_pc_130, !insn.addr !46
dec_label_pc_130: ; preds = %dec_label_pc_106
%4 = call i64 @rand(), !insn.addr !47
%5 = urem i64 %4, 2
%6 = icmp eq i64 %5, 0, !insn.addr !48
%7 = call i64 @rand()
%8 = mul i64 %7, 1073741824
%9 = call i64 @rand()
%10 = mul i64 %9, 32768
%11 = xor i64 %10, %8
%12 = call i64 @rand()
%13 = xor i64 %11, %12
%14 = xor i64 %13, 4294967295
%storemerge1 = select i1 %6, i64 %14, i64 %13
%15 = trunc i64 %storemerge1 to i32, !insn.addr !49
%.pr = load i32, i32* @global_var_4ec, align 4
store i32 %.pr, i32* %.reg2mem, !insn.addr !49
store i32 %15, i32* %stack_var_-80.0.reg2mem, !insn.addr !49
br label %dec_label_pc_179, !insn.addr !49
dec_label_pc_179: ; preds = %dec_label_pc_130, %dec_label_pc_106
%.reload = load i32, i32* %.reg2mem, !insn.addr !50
%16 = icmp eq i32 %.reload, 5, !insn.addr !51
br i1 %16, label %dec_label_pc_192, label %dec_label_pc_184, !insn.addr !52
dec_label_pc_184: ; preds = %dec_label_pc_179
%17 = call i64 @printLine(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @global_var_510, i64 0, i64 0)), !insn.addr !53
br label %dec_label_pc_206, !insn.addr !54
dec_label_pc_192: ; preds = %dec_label_pc_179
%stack_var_-80.0.reload = load i32, i32* %stack_var_-80.0.reg2mem
%18 = icmp ugt i32 %stack_var_-80.0.reload, 9
br i1 %18, label %dec_label_pc_1f8, label %dec_label_pc_1c6, !insn.addr !55
dec_label_pc_1c6: ; preds = %dec_label_pc_192
%19 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !56
%20 = sext i32 %stack_var_-80.0.reload to i64, !insn.addr !57
%21 = mul i64 %20, 4, !insn.addr !58
%22 = add i64 %19, -64, !insn.addr !58
%23 = add i64 %21, %22, !insn.addr !58
%24 = inttoptr i64 %23 to i32*, !insn.addr !58
store i32 1, i32* %24, align 4, !insn.addr !58
store i64 0, i64* %indvars.iv.reg2mem
br label %dec_label_pc_1dc
dec_label_pc_1dc: ; preds = %dec_label_pc_1dc, %dec_label_pc_1c6
%indvars.iv.reload = load i64, i64* %indvars.iv.reg2mem
%25 = mul i64 %indvars.iv.reload, 4, !insn.addr !59
%26 = add i64 %25, %22, !insn.addr !59
%27 = inttoptr i64 %26 to i32*, !insn.addr !59
%28 = load i32, i32* %27, align 4, !insn.addr !59
%29 = zext i32 %28 to i64, !insn.addr !60
%30 = call i64 @printIntLine(i64 %29), !insn.addr !61
%indvars.iv.next = add nuw nsw i64 %indvars.iv.reload, 1
%exitcond = icmp eq i64 %indvars.iv.next, 10
store i64 %indvars.iv.next, i64* %indvars.iv.reg2mem, !insn.addr !62
br i1 %exitcond, label %dec_label_pc_206, label %dec_label_pc_1dc, !insn.addr !62
dec_label_pc_1f8: ; preds = %dec_label_pc_192
%31 = call i64 @printLine(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @global_var_528, i64 0, i64 0)), !insn.addr !63
br label %dec_label_pc_206, !insn.addr !64
dec_label_pc_206: ; preds = %dec_label_pc_1dc, %dec_label_pc_1f8, %dec_label_pc_184
%32 = call i64 @__readfsqword(i64 40), !insn.addr !65
%33 = icmp eq i64 %0, %32, !insn.addr !65
store i64 0, i64* %rax.0.reg2mem, !insn.addr !66
br i1 %33, label %dec_label_pc_21b, label %dec_label_pc_216, !insn.addr !66
dec_label_pc_216: ; preds = %dec_label_pc_206
%34 = call i64 @__stack_chk_fail(), !insn.addr !67
store i64 %34, i64* %rax.0.reg2mem, !insn.addr !67
br label %dec_label_pc_21b, !insn.addr !67
dec_label_pc_21b: ; preds = %dec_label_pc_216, %dec_label_pc_206
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !68
}
define i64 @goodB2G2() local_unnamed_addr {
dec_label_pc_222:
%rax.0.reg2mem = alloca i64, !insn.addr !69
%indvars.iv.reg2mem = alloca i64, !insn.addr !69
%stack_var_-80.0.reg2mem = alloca i32, !insn.addr !69
%.reg2mem = alloca i32, !insn.addr !69
%stack_var_-8 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !70
%1 = load i32, i32* @global_var_4ec, align 4, !insn.addr !71
%2 = icmp eq i32 %1, 5, !insn.addr !72
%3 = icmp eq i1 %2, false, !insn.addr !73
store i32 %1, i32* %.reg2mem, !insn.addr !73
store i32 -1, i32* %stack_var_-80.0.reg2mem, !insn.addr !73
br i1 %3, label %dec_label_pc_295, label %dec_label_pc_24c, !insn.addr !73
dec_label_pc_24c: ; preds = %dec_label_pc_222
%4 = call i64 @rand(), !insn.addr !74
%5 = urem i64 %4, 2
%6 = icmp eq i64 %5, 0, !insn.addr !75
%7 = call i64 @rand()
%8 = mul i64 %7, 1073741824
%9 = call i64 @rand()
%10 = mul i64 %9, 32768
%11 = xor i64 %10, %8
%12 = call i64 @rand()
%13 = xor i64 %11, %12
%14 = xor i64 %13, 4294967295
%storemerge1 = select i1 %6, i64 %14, i64 %13
%15 = trunc i64 %storemerge1 to i32, !insn.addr !76
%.pre = load i32, i32* @global_var_4ec, align 4
store i32 %.pre, i32* %.reg2mem, !insn.addr !76
store i32 %15, i32* %stack_var_-80.0.reg2mem, !insn.addr !76
br label %dec_label_pc_295, !insn.addr !76
dec_label_pc_295: ; preds = %dec_label_pc_24c, %dec_label_pc_222
%.reload = load i32, i32* %.reg2mem, !insn.addr !77
%16 = icmp eq i32 %.reload, 5, !insn.addr !78
%17 = icmp eq i1 %16, false, !insn.addr !79
br i1 %17, label %dec_label_pc_314, label %dec_label_pc_2a0, !insn.addr !79
dec_label_pc_2a0: ; preds = %dec_label_pc_295
%stack_var_-80.0.reload = load i32, i32* %stack_var_-80.0.reg2mem
%18 = icmp ugt i32 %stack_var_-80.0.reload, 9
br i1 %18, label %dec_label_pc_306, label %dec_label_pc_2d4, !insn.addr !80
dec_label_pc_2d4: ; preds = %dec_label_pc_2a0
%19 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !81
%20 = sext i32 %stack_var_-80.0.reload to i64, !insn.addr !82
%21 = mul i64 %20, 4, !insn.addr !83
%22 = add i64 %19, -64, !insn.addr !83
%23 = add i64 %21, %22, !insn.addr !83
%24 = inttoptr i64 %23 to i32*, !insn.addr !83
store i32 1, i32* %24, align 4, !insn.addr !83
store i64 0, i64* %indvars.iv.reg2mem
br label %dec_label_pc_2ea
dec_label_pc_2ea: ; preds = %dec_label_pc_2ea, %dec_label_pc_2d4
%indvars.iv.reload = load i64, i64* %indvars.iv.reg2mem
%25 = mul i64 %indvars.iv.reload, 4, !insn.addr !84
%26 = add i64 %25, %22, !insn.addr !84
%27 = inttoptr i64 %26 to i32*, !insn.addr !84
%28 = load i32, i32* %27, align 4, !insn.addr !84
%29 = zext i32 %28 to i64, !insn.addr !85
%30 = call i64 @printIntLine(i64 %29), !insn.addr !86
%indvars.iv.next = add nuw nsw i64 %indvars.iv.reload, 1
%exitcond = icmp eq i64 %indvars.iv.next, 10
store i64 %indvars.iv.next, i64* %indvars.iv.reg2mem, !insn.addr !87
br i1 %exitcond, label %dec_label_pc_314, label %dec_label_pc_2ea, !insn.addr !87
dec_label_pc_306: ; preds = %dec_label_pc_2a0
%31 = call i64 @printLine(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @global_var_528, i64 0, i64 0)), !insn.addr !88
br label %dec_label_pc_314, !insn.addr !89
dec_label_pc_314: ; preds = %dec_label_pc_2ea, %dec_label_pc_306, %dec_label_pc_295
%32 = call i64 @__readfsqword(i64 40), !insn.addr !90
%33 = icmp eq i64 %0, %32, !insn.addr !90
store i64 0, i64* %rax.0.reg2mem, !insn.addr !91
br i1 %33, label %dec_label_pc_329, label %dec_label_pc_324, !insn.addr !91
dec_label_pc_324: ; preds = %dec_label_pc_314
%34 = call i64 @__stack_chk_fail(), !insn.addr !92
store i64 %34, i64* %rax.0.reg2mem, !insn.addr !92
br label %dec_label_pc_329, !insn.addr !92
dec_label_pc_329: ; preds = %dec_label_pc_324, %dec_label_pc_314
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !93
}
define i64 @goodG2B1() local_unnamed_addr {
dec_label_pc_330:
%rax.0.reg2mem = alloca i64, !insn.addr !94
%indvars.iv.reg2mem = alloca i64, !insn.addr !94
%stack_var_-8 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !95
%1 = load i32, i32* @global_var_4ec, align 4, !insn.addr !96
%2 = icmp eq i32 %1, 5, !insn.addr !97
br i1 %2, label %dec_label_pc_3a7, label %dec_label_pc_36e, !insn.addr !98
dec_label_pc_36e: ; preds = %dec_label_pc_330
%3 = call i64 @printLine(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @global_var_510, i64 0, i64 0)), !insn.addr !99
%.pre = load i32, i32* @global_var_4ec, align 4
%phitmp = icmp eq i32 %.pre, 5
%phitmp2 = icmp eq i1 %phitmp, false
br i1 %phitmp2, label %dec_label_pc_3e5, label %dec_label_pc_3d9, !insn.addr !100
dec_label_pc_3a7: ; preds = %dec_label_pc_330
%4 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !101
%5 = add i64 %4, -48, !insn.addr !102
%6 = add i64 %4, -20, !insn.addr !102
%7 = inttoptr i64 %6 to i32*, !insn.addr !102
store i32 1, i32* %7, align 4, !insn.addr !102
store i64 0, i64* %indvars.iv.reg2mem
br label %dec_label_pc_3bd
dec_label_pc_3bd: ; preds = %dec_label_pc_3bd, %dec_label_pc_3a7
%indvars.iv.reload = load i64, i64* %indvars.iv.reg2mem
%8 = mul i64 %indvars.iv.reload, 4, !insn.addr !103
%9 = add i64 %5, %8, !insn.addr !103
%10 = inttoptr i64 %9 to i32*, !insn.addr !103
%11 = load i32, i32* %10, align 4, !insn.addr !103
%12 = zext i32 %11 to i64, !insn.addr !104
%13 = call i64 @printIntLine(i64 %12), !insn.addr !105
%indvars.iv.next = add nuw nsw i64 %indvars.iv.reload, 1
%exitcond = icmp eq i64 %indvars.iv.next, 10
store i64 %indvars.iv.next, i64* %indvars.iv.reg2mem, !insn.addr !106
br i1 %exitcond, label %dec_label_pc_3e5, label %dec_label_pc_3bd, !insn.addr !106
dec_label_pc_3d9: ; preds = %dec_label_pc_36e
%14 = call i64 @printLine(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @global_var_4f0, i64 0, i64 0)), !insn.addr !107
br label %dec_label_pc_3e5, !insn.addr !107
dec_label_pc_3e5: ; preds = %dec_label_pc_3bd, %dec_label_pc_3d9, %dec_label_pc_36e
%15 = call i64 @__readfsqword(i64 40), !insn.addr !108
%16 = icmp eq i64 %0, %15, !insn.addr !108
store i64 0, i64* %rax.0.reg2mem, !insn.addr !109
br i1 %16, label %dec_label_pc_3fa, label %dec_label_pc_3f5, !insn.addr !109
dec_label_pc_3f5: ; preds = %dec_label_pc_3e5
%17 = call i64 @__stack_chk_fail(), !insn.addr !110
store i64 %17, i64* %rax.0.reg2mem, !insn.addr !110
br label %dec_label_pc_3fa, !insn.addr !110
dec_label_pc_3fa: ; preds = %dec_label_pc_3f5, %dec_label_pc_3e5
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !111
}
define i64 @goodG2B2() local_unnamed_addr {
dec_label_pc_3fc:
%rax.0.reg2mem = alloca i64, !insn.addr !112
%indvars.iv.reg2mem = alloca i64, !insn.addr !112
%stack_var_-8 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !113
%1 = load i32, i32* @global_var_4ec, align 4
%2 = icmp eq i32 %1, 5, !insn.addr !114
%3 = icmp eq i1 %2, false, !insn.addr !115
br i1 %3, label %dec_label_pc_4a3, label %dec_label_pc_465, !insn.addr !115
dec_label_pc_465: ; preds = %dec_label_pc_3fc
%4 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !116
%5 = add i64 %4, -20, !insn.addr !117
%6 = inttoptr i64 %5 to i32*, !insn.addr !117
store i32 1, i32* %6, align 4, !insn.addr !117
%7 = add i64 %4, -48, !insn.addr !118
store i64 0, i64* %indvars.iv.reg2mem
br label %dec_label_pc_47b
dec_label_pc_47b: ; preds = %dec_label_pc_47b, %dec_label_pc_465
%indvars.iv.reload = load i64, i64* %indvars.iv.reg2mem
%8 = mul i64 %indvars.iv.reload, 4, !insn.addr !118
%9 = add i64 %7, %8, !insn.addr !118
%10 = inttoptr i64 %9 to i32*, !insn.addr !118
%11 = load i32, i32* %10, align 4, !insn.addr !118
%12 = zext i32 %11 to i64, !insn.addr !119
%13 = call i64 @printIntLine(i64 %12), !insn.addr !120
%indvars.iv.next = add nuw nsw i64 %indvars.iv.reload, 1
%exitcond = icmp eq i64 %indvars.iv.next, 10
store i64 %indvars.iv.next, i64* %indvars.iv.reg2mem, !insn.addr !121
br i1 %exitcond, label %dec_label_pc_4a3, label %dec_label_pc_47b, !insn.addr !121
dec_label_pc_4a3: ; preds = %dec_label_pc_47b, %dec_label_pc_3fc
%14 = call i64 @__readfsqword(i64 40), !insn.addr !122
%15 = icmp eq i64 %0, %14, !insn.addr !122
store i64 0, i64* %rax.0.reg2mem, !insn.addr !123
br i1 %15, label %dec_label_pc_4b8, label %dec_label_pc_4b3, !insn.addr !123
dec_label_pc_4b3: ; preds = %dec_label_pc_4a3
%16 = call i64 @__stack_chk_fail(), !insn.addr !124
store i64 %16, i64* %rax.0.reg2mem, !insn.addr !124
br label %dec_label_pc_4b8, !insn.addr !124
dec_label_pc_4b8: ; preds = %dec_label_pc_4b3, %dec_label_pc_4a3
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !125
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_rand_07_good() local_unnamed_addr {
dec_label_pc_4ba:
%0 = call i64 @goodB2G1(), !insn.addr !126
%1 = call i64 @goodB2G2(), !insn.addr !127
%2 = call i64 @goodG2B1(), !insn.addr !128
%3 = call i64 @goodG2B2(), !insn.addr !129
ret i64 %3, !insn.addr !130
}
declare i64 @rand() local_unnamed_addr
declare i64 @printIntLine(i64) local_unnamed_addr
declare i64 @printLine(i8*) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 9}
!1 = !{i64 31}
!2 = !{i64 37}
!3 = !{i64 48}
!4 = !{i64 51}
!5 = !{i64 57}
!6 = !{i64 64}
!7 = !{i64 74}
!8 = !{i64 81}
!9 = !{i64 83}
!10 = !{i64 88}
!11 = !{i64 93}
!12 = !{i64 98}
!13 = !{i64 101}
!14 = !{i64 103}
!15 = !{i64 108}
!16 = !{i64 110}
!17 = !{i64 112}
!18 = !{i64 115}
!19 = !{i64 121}
!20 = !{i64 124}
!21 = !{i64 126}
!22 = !{i64 134}
!23 = !{i64 142}
!24 = !{i64 150}
!25 = !{i64 158}
!26 = !{i64 166}
!27 = !{i64 170}
!28 = !{i64 175}
!29 = !{i64 177}
!30 = !{i64 185}
!31 = !{i64 197}
!32 = !{i64 199}
!33 = !{i64 203}
!34 = !{i64 205}
!35 = !{i64 210}
!36 = !{i64 218}
!37 = !{i64 229}
!38 = !{i64 235}
!39 = !{i64 239}
!40 = !{i64 248}
!41 = !{i64 250}
!42 = !{i64 261}
!43 = !{i64 262}
!44 = !{i64 271}
!45 = !{i64 299}
!46 = !{i64 302}
!47 = !{i64 304}
!48 = !{i64 312}
!49 = !{i64 374}
!50 = !{i64 377}
!51 = !{i64 383}
!52 = !{i64 386}
!53 = !{i64 395}
!54 = !{i64 400}
!55 = !{i64 446}
!56 = !{i64 263}
!57 = !{i64 457}
!58 = !{i64 459}
!59 = !{i64 481}
!60 = !{i64 485}
!61 = !{i64 487}
!62 = !{i64 500}
!63 = !{i64 511}
!64 = !{i64 516}
!65 = !{i64 523}
!66 = !{i64 532}
!67 = !{i64 534}
!68 = !{i64 545}
!69 = !{i64 546}
!70 = !{i64 555}
!71 = !{i64 577}
!72 = !{i64 583}
!73 = !{i64 586}
!74 = !{i64 588}
!75 = !{i64 596}
!76 = !{i64 658}
!77 = !{i64 661}
!78 = !{i64 667}
!79 = !{i64 670}
!80 = !{i64 716}
!81 = !{i64 547}
!82 = !{i64 727}
!83 = !{i64 729}
!84 = !{i64 751}
!85 = !{i64 755}
!86 = !{i64 757}
!87 = !{i64 770}
!88 = !{i64 781}
!89 = !{i64 786}
!90 = !{i64 793}
!91 = !{i64 802}
!92 = !{i64 804}
!93 = !{i64 815}
!94 = !{i64 816}
!95 = !{i64 824}
!96 = !{i64 846}
!97 = !{i64 852}
!98 = !{i64 855}
!99 = !{i64 864}
!100 = !{i64 887}
!101 = !{i64 817}
!102 = !{i64 940}
!103 = !{i64 962}
!104 = !{i64 966}
!105 = !{i64 968}
!106 = !{i64 981}
!107 = !{i64 992}
!108 = !{i64 1002}
!109 = !{i64 1011}
!110 = !{i64 1013}
!111 = !{i64 1019}
!112 = !{i64 1020}
!113 = !{i64 1028}
!114 = !{i64 1074}
!115 = !{i64 1077}
!116 = !{i64 1021}
!117 = !{i64 1130}
!118 = !{i64 1152}
!119 = !{i64 1156}
!120 = !{i64 1158}
!121 = !{i64 1171}
!122 = !{i64 1192}
!123 = !{i64 1201}
!124 = !{i64 1203}
!125 = !{i64 1209}
!126 = !{i64 1219}
!127 = !{i64 1229}
!128 = !{i64 1239}
!129 = !{i64 1249}
!130 = !{i64 1256}
### Assistant: @staticFive = internal global i32 5, align 4
@.str = private unnamed_addr constant [32 x i8] c"ERROR: Array index is negative.\00", align 1
@.str.1 = private unnamed_addr constant [21 x i8] c"Benign, fixed string\00", align 1
@.str.2 = private unnamed_addr constant [36 x i8] c"ERROR: Array index is out-of-bounds\00", align 1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE129_rand_07_bad() #0 {
entry:
%data = alloca i32, align 4
%i = alloca i32, align 4
%buffer = alloca [10 x i32], align 16
store i32 -1, i32* %data, align 4
%0 = load i32, i32* @staticFive, align 4
%cmp = icmp eq i32 %0, 5
br i1 %cmp, label %if.then, label %if.end
if.then: ; preds = %entry
%call = call i32 @rand() #4
%and = and i32 %call, 1
%tobool = icmp ne i32 %and, 0
br i1 %tobool, label %cond.true, label %cond.false
cond.true: ; preds = %if.then
%call1 = call i32 @rand() #4
%shl = shl i32 %call1, 30
%call2 = call i32 @rand() #4
%shl3 = shl i32 %call2, 15
%xor = xor i32 %shl, %shl3
%call4 = call i32 @rand() #4
%xor5 = xor i32 %xor, %call4
br label %cond.end
cond.false: ; preds = %if.then
%call6 = call i32 @rand() #4
%shl7 = shl i32 %call6, 30
%call8 = call i32 @rand() #4
%shl9 = shl i32 %call8, 15
%xor10 = xor i32 %shl7, %shl9
%call11 = call i32 @rand() #4
%xor12 = xor i32 %xor10, %call11
%sub = sub i32 0, %xor12
%sub13 = sub i32 %sub, 1
br label %cond.end
cond.end: ; preds = %cond.false, %cond.true
%cond = phi i32 [ %xor5, %cond.true ], [ %sub13, %cond.false ]
store i32 %cond, i32* %data, align 4
br label %if.end
if.end: ; preds = %cond.end, %entry
%1 = load i32, i32* @staticFive, align 4
%cmp14 = icmp eq i32 %1, 5
br i1 %cmp14, label %if.then15, label %if.end22
if.then15: ; preds = %if.end
%2 = bitcast [10 x i32]* %buffer to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %2, i8 0, i64 40, i1 false)
%3 = load i32, i32* %data, align 4
%cmp16 = icmp sge i32 %3, 0
br i1 %cmp16, label %if.then17, label %if.else
if.then17: ; preds = %if.then15
%4 = load i32, i32* %data, align 4
%idxprom = sext i32 %4 to i64
%arrayidx = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom
store i32 1, i32* %arrayidx, align 4
store i32 0, i32* %i, align 4
br label %for.cond
for.cond: ; preds = %for.inc, %if.then17
%5 = load i32, i32* %i, align 4
%cmp18 = icmp slt i32 %5, 10
br i1 %cmp18, label %for.body, label %for.end
for.body: ; preds = %for.cond
%6 = load i32, i32* %i, align 4
%idxprom19 = sext i32 %6 to i64
%arrayidx20 = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom19
%7 = load i32, i32* %arrayidx20, align 4
call void @printIntLine(i32 %7)
br label %for.inc
for.inc: ; preds = %for.body
%8 = load i32, i32* %i, align 4
%inc = add nsw i32 %8, 1
store i32 %inc, i32* %i, align 4
br label %for.cond
for.end: ; preds = %for.cond
br label %if.end21
if.else: ; preds = %if.then15
call void @printLine(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %if.end21
if.end21: ; preds = %if.else, %for.end
br label %if.end22
if.end22: ; preds = %if.end21, %if.end
ret void
}
; Function Attrs: nounwind
declare dso_local i32 @rand() #1
; Function Attrs: argmemonly nounwind willreturn writeonly
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #2
declare dso_local void @printIntLine(i32) #3
declare dso_local void @printLine(i8*) #3
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE129_rand_07_good() #0 {
entry:
call void @goodB2G1()
call void @goodB2G2()
call void @goodG2B1()
call void @goodG2B2()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodB2G1() #0 {
entry:
%data = alloca i32, align 4
%i = alloca i32, align 4
%buffer = alloca [10 x i32], align 16
store i32 -1, i32* %data, align 4
%0 = load i32, i32* @staticFive, align 4
%cmp = icmp eq i32 %0, 5
br i1 %cmp, label %if.then, label %if.end
if.then: ; preds = %entry
%call = call i32 @rand() #4
%and = and i32 %call, 1
%tobool = icmp ne i32 %and, 0
br i1 %tobool, label %cond.true, label %cond.false
cond.true: ; preds = %if.then
%call1 = call i32 @rand() #4
%shl = shl i32 %call1, 30
%call2 = call i32 @rand() #4
%shl3 = shl i32 %call2, 15
%xor = xor i32 %shl, %shl3
%call4 = call i32 @rand() #4
%xor5 = xor i32 %xor, %call4
br label %cond.end
cond.false: ; preds = %if.then
%call6 = call i32 @rand() #4
%shl7 = shl i32 %call6, 30
%call8 = call i32 @rand() #4
%shl9 = shl i32 %call8, 15
%xor10 = xor i32 %shl7, %shl9
%call11 = call i32 @rand() #4
%xor12 = xor i32 %xor10, %call11
%sub = sub i32 0, %xor12
%sub13 = sub i32 %sub, 1
br label %cond.end
cond.end: ; preds = %cond.false, %cond.true
%cond = phi i32 [ %xor5, %cond.true ], [ %sub13, %cond.false ]
store i32 %cond, i32* %data, align 4
br label %if.end
if.end: ; preds = %cond.end, %entry
%1 = load i32, i32* @staticFive, align 4
%cmp14 = icmp ne i32 %1, 5
br i1 %cmp14, label %if.then15, label %if.else
if.then15: ; preds = %if.end
call void @printLine(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
br label %if.end24
if.else: ; preds = %if.end
%2 = bitcast [10 x i32]* %buffer to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %2, i8 0, i64 40, i1 false)
%3 = load i32, i32* %data, align 4
%cmp16 = icmp sge i32 %3, 0
br i1 %cmp16, label %land.lhs.true, label %if.else22
land.lhs.true: ; preds = %if.else
%4 = load i32, i32* %data, align 4
%cmp17 = icmp slt i32 %4, 10
br i1 %cmp17, label %if.then18, label %if.else22
if.then18: ; preds = %land.lhs.true
%5 = load i32, i32* %data, align 4
%idxprom = sext i32 %5 to i64
%arrayidx = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom
store i32 1, i32* %arrayidx, align 4
store i32 0, i32* %i, align 4
br label %for.cond
for.cond: ; preds = %for.inc, %if.then18
%6 = load i32, i32* %i, align 4
%cmp19 = icmp slt i32 %6, 10
br i1 %cmp19, label %for.body, label %for.end
for.body: ; preds = %for.cond
%7 = load i32, i32* %i, align 4
%idxprom20 = sext i32 %7 to i64
%arrayidx21 = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom20
%8 = load i32, i32* %arrayidx21, align 4
call void @printIntLine(i32 %8)
br label %for.inc
for.inc: ; preds = %for.body
%9 = load i32, i32* %i, align 4
%inc = add nsw i32 %9, 1
store i32 %inc, i32* %i, align 4
br label %for.cond
for.end: ; preds = %for.cond
br label %if.end23
if.else22: ; preds = %land.lhs.true, %if.else
call void @printLine(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
br label %if.end23
if.end23: ; preds = %if.else22, %for.end
br label %if.end24
if.end24: ; preds = %if.end23, %if.then15
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodB2G2() #0 {
entry:
%data = alloca i32, align 4
%i = alloca i32, align 4
%buffer = alloca [10 x i32], align 16
store i32 -1, i32* %data, align 4
%0 = load i32, i32* @staticFive, align 4
%cmp = icmp eq i32 %0, 5
br i1 %cmp, label %if.then, label %if.end
if.then: ; preds = %entry
%call = call i32 @rand() #4
%and = and i32 %call, 1
%tobool = icmp ne i32 %and, 0
br i1 %tobool, label %cond.true, label %cond.false
cond.true: ; preds = %if.then
%call1 = call i32 @rand() #4
%shl = shl i32 %call1, 30
%call2 = call i32 @rand() #4
%shl3 = shl i32 %call2, 15
%xor = xor i32 %shl, %shl3
%call4 = call i32 @rand() #4
%xor5 = xor i32 %xor, %call4
br label %cond.end
cond.false: ; preds = %if.then
%call6 = call i32 @rand() #4
%shl7 = shl i32 %call6, 30
%call8 = call i32 @rand() #4
%shl9 = shl i32 %call8, 15
%xor10 = xor i32 %shl7, %shl9
%call11 = call i32 @rand() #4
%xor12 = xor i32 %xor10, %call11
%sub = sub i32 0, %xor12
%sub13 = sub i32 %sub, 1
br label %cond.end
cond.end: ; preds = %cond.false, %cond.true
%cond = phi i32 [ %xor5, %cond.true ], [ %sub13, %cond.false ]
store i32 %cond, i32* %data, align 4
br label %if.end
if.end: ; preds = %cond.end, %entry
%1 = load i32, i32* @staticFive, align 4
%cmp14 = icmp eq i32 %1, 5
br i1 %cmp14, label %if.then15, label %if.end23
if.then15: ; preds = %if.end
%2 = bitcast [10 x i32]* %buffer to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %2, i8 0, i64 40, i1 false)
%3 = load i32, i32* %data, align 4
%cmp16 = icmp sge i32 %3, 0
br i1 %cmp16, label %land.lhs.true, label %if.else
land.lhs.true: ; preds = %if.then15
%4 = load i32, i32* %data, align 4
%cmp17 = icmp slt i32 %4, 10
br i1 %cmp17, label %if.then18, label %if.else
if.then18: ; preds = %land.lhs.true
%5 = load i32, i32* %data, align 4
%idxprom = sext i32 %5 to i64
%arrayidx = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom
store i32 1, i32* %arrayidx, align 4
store i32 0, i32* %i, align 4
br label %for.cond
for.cond: ; preds = %for.inc, %if.then18
%6 = load i32, i32* %i, align 4
%cmp19 = icmp slt i32 %6, 10
br i1 %cmp19, label %for.body, label %for.end
for.body: ; preds = %for.cond
%7 = load i32, i32* %i, align 4
%idxprom20 = sext i32 %7 to i64
%arrayidx21 = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom20
%8 = load i32, i32* %arrayidx21, align 4
call void @printIntLine(i32 %8)
br label %for.inc
for.inc: ; preds = %for.body
%9 = load i32, i32* %i, align 4
%inc = add nsw i32 %9, 1
store i32 %inc, i32* %i, align 4
br label %for.cond
for.end: ; preds = %for.cond
br label %if.end22
if.else: ; preds = %land.lhs.true, %if.then15
call void @printLine(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
br label %if.end22
if.end22: ; preds = %if.else, %for.end
br label %if.end23
if.end23: ; preds = %if.end22, %if.end
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B1() #0 {
entry:
%data = alloca i32, align 4
%i = alloca i32, align 4
%buffer = alloca [10 x i32], align 16
store i32 -1, i32* %data, align 4
%0 = load i32, i32* @staticFive, align 4
%cmp = icmp ne i32 %0, 5
br i1 %cmp, label %if.then, label %if.else
if.then: ; preds = %entry
call void @printLine(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
br label %if.end
if.else: ; preds = %entry
store i32 7, i32* %data, align 4
br label %if.end
if.end: ; preds = %if.else, %if.then
%1 = load i32, i32* @staticFive, align 4
%cmp1 = icmp eq i32 %1, 5
br i1 %cmp1, label %if.then2, label %if.end10
if.then2: ; preds = %if.end
%2 = bitcast [10 x i32]* %buffer to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %2, i8 0, i64 40, i1 false)
%3 = load i32, i32* %data, align 4
%cmp3 = icmp sge i32 %3, 0
br i1 %cmp3, label %if.then4, label %if.else8
if.then4: ; preds = %if.then2
%4 = load i32, i32* %data, align 4
%idxprom = sext i32 %4 to i64
%arrayidx = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom
store i32 1, i32* %arrayidx, align 4
store i32 0, i32* %i, align 4
br label %for.cond
for.cond: ; preds = %for.inc, %if.then4
%5 = load i32, i32* %i, align 4
%cmp5 = icmp slt i32 %5, 10
br i1 %cmp5, label %for.body, label %for.end
for.body: ; preds = %for.cond
%6 = load i32, i32* %i, align 4
%idxprom6 = sext i32 %6 to i64
%arrayidx7 = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom6
%7 = load i32, i32* %arrayidx7, align 4
call void @printIntLine(i32 %7)
br label %for.inc
for.inc: ; preds = %for.body
%8 = load i32, i32* %i, align 4
%inc = add nsw i32 %8, 1
store i32 %inc, i32* %i, align 4
br label %for.cond
for.end: ; preds = %for.cond
br label %if.end9
if.else8: ; preds = %if.then2
call void @printLine(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %if.end9
if.end9: ; preds = %if.else8, %for.end
br label %if.end10
if.end10: ; preds = %if.end9, %if.end
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B2() #0 {
entry:
%data = alloca i32, align 4
%i = alloca i32, align 4
%buffer = alloca [10 x i32], align 16
store i32 -1, i32* %data, align 4
%0 = load i32, i32* @staticFive, align 4
%cmp = icmp eq i32 %0, 5
br i1 %cmp, label %if.then, label %if.end
if.then: ; preds = %entry
store i32 7, i32* %data, align 4
br label %if.end
if.end: ; preds = %if.then, %entry
%1 = load i32, i32* @staticFive, align 4
%cmp1 = icmp eq i32 %1, 5
br i1 %cmp1, label %if.then2, label %if.end9
if.then2: ; preds = %if.end
%2 = bitcast [10 x i32]* %buffer to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %2, i8 0, i64 40, i1 false)
%3 = load i32, i32* %data, align 4
%cmp3 = icmp sge i32 %3, 0
br i1 %cmp3, label %if.then4, label %if.else
if.then4: ; preds = %if.then2
%4 = load i32, i32* %data, align 4
%idxprom = sext i32 %4 to i64
%arrayidx = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom
store i32 1, i32* %arrayidx, align 4
store i32 0, i32* %i, align 4
br label %for.cond
for.cond: ; preds = %for.inc, %if.then4
%5 = load i32, i32* %i, align 4
%cmp5 = icmp slt i32 %5, 10
br i1 %cmp5, label %for.body, label %for.end
for.body: ; preds = %for.cond
%6 = load i32, i32* %i, align 4
%idxprom6 = sext i32 %6 to i64
%arrayidx7 = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom6
%7 = load i32, i32* %arrayidx7, align 4
call void @printIntLine(i32 %7)
br label %for.inc
for.inc: ; preds = %for.body
%8 = load i32, i32* %i, align 4
%inc = add nsw i32 %8, 1
store i32 %inc, i32* %i, align 4
br label %for.cond
for.end: ; preds = %for.cond
br label %if.end8
if.else: ; preds = %if.then2
call void @printLine(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %if.end8
if.end8: ; preds = %if.else, %for.end
br label %if.end9
if.end9: ; preds = %if.end8, %if.end
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" }
attributes #1 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #2 = { argmemonly nounwind willreturn writeonly }
attributes #3 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_2c0 = constant [21 x i8] c"Benign, fixed string\00"
@global_var_398 = local_unnamed_addr global i32 0
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
%1 = load i32, i32* @global_var_398, align 4, !insn.addr !1
%2 = zext i32 %1 to i64, !insn.addr !1
ret i64 %2, !insn.addr !2
}
define i64 @function_30() local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !3
%storemerge1.reg2mem = alloca i64, !insn.addr !3
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = load i64, i64* %0
%4 = add i64 %3, 4294967295, !insn.addr !3
%5 = and i64 %4, 4294967295, !insn.addr !3
%6 = add nuw nsw i64 %5, 25, !insn.addr !4
%7 = udiv i64 %6, 16
%8 = mul i64 %7, 16
%9 = add i64 %2, 15, !insn.addr !5
%10 = sub i64 %9, %8, !insn.addr !6
%11 = and i64 %10, -16, !insn.addr !7
%12 = add i64 %1, -64, !insn.addr !8
%13 = inttoptr i64 %12 to i64*, !insn.addr !8
store i64 %11, i64* %13, align 8, !insn.addr !8
%14 = add i64 %1, -48, !insn.addr !9
%15 = inttoptr i64 %14 to i64*, !insn.addr !9
store i64 0, i64* %15, align 8, !insn.addr !9
%16 = add i64 %1, -40, !insn.addr !10
%17 = inttoptr i64 %16 to i64*, !insn.addr !10
store i64 0, i64* %17, align 8, !insn.addr !10
%18 = add i64 %1, -32, !insn.addr !11
%19 = inttoptr i64 %18 to i64*, !insn.addr !11
store i64 0, i64* %19, align 8, !insn.addr !11
%20 = add i64 %1, -24, !insn.addr !12
%21 = inttoptr i64 %20 to i64*, !insn.addr !12
store i64 0, i64* %21, align 8, !insn.addr !12
%22 = add i64 %1, -16, !insn.addr !13
%23 = inttoptr i64 %22 to i64*, !insn.addr !13
store i64 0, i64* %23, align 8, !insn.addr !13
%24 = add i64 %1, -56, !insn.addr !14
%25 = inttoptr i64 %24 to i64*, !insn.addr !14
store i64 0, i64* %25, align 8
store i64 0, i64* %storemerge1.reg2mem
br label %dec_label_pc_90
dec_label_pc_90: ; preds = %dec_label_pc_30, %dec_label_pc_90
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%26 = mul i64 %storemerge1.reload, 4, !insn.addr !15
%27 = load i64, i64* %13, align 8, !insn.addr !16
%28 = add i64 %27, %26, !insn.addr !17
%29 = add i64 %26, %14, !insn.addr !18
%30 = inttoptr i64 %29 to i32*, !insn.addr !18
%31 = load i32, i32* %30, align 4, !insn.addr !18
%32 = inttoptr i64 %28 to i32*, !insn.addr !19
store i32 %31, i32* %32, align 4, !insn.addr !19
%33 = load i64, i64* %25, align 8, !insn.addr !20
%34 = add i64 %33, 1, !insn.addr !20
store i64 %34, i64* %25, align 8
%35 = icmp ult i64 %34, 10
store i64 %34, i64* %storemerge1.reg2mem, !insn.addr !21
br i1 %35, label %dec_label_pc_90, label %dec_label_pc_b9, !insn.addr !21
dec_label_pc_b9: ; preds = %dec_label_pc_90
%36 = load i64, i64* %13, align 8, !insn.addr !22
%37 = inttoptr i64 %36 to i32*, !insn.addr !23
%38 = load i32, i32* %37, align 4, !insn.addr !23
%39 = zext i32 %38 to i64, !insn.addr !24
%40 = call i64 @printIntLine(i64 %39), !insn.addr !25
%41 = add i64 %1, -8, !insn.addr !26
%42 = inttoptr i64 %41 to i64*, !insn.addr !26
%43 = load i64, i64* %42, align 8, !insn.addr !26
%44 = call i64 @__readfsqword(i64 40), !insn.addr !27
%45 = icmp eq i64 %43, %44, !insn.addr !27
store i64 0, i64* %rax.0.reg2mem, !insn.addr !28
br i1 %45, label %dec_label_pc_db, label %dec_label_pc_d6, !insn.addr !28
dec_label_pc_d6: ; preds = %dec_label_pc_b9
%46 = call i64 @__stack_chk_fail(), !insn.addr !29
store i64 %46, i64* %rax.0.reg2mem, !insn.addr !29
br label %dec_label_pc_db, !insn.addr !29
dec_label_pc_db: ; preds = %dec_label_pc_d6, %dec_label_pc_b9
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !30
}
define i64 @goodG2B1() local_unnamed_addr {
dec_label_pc_dd:
%rax.0.reg2mem = alloca i64, !insn.addr !31
%storemerge2.reg2mem = alloca i64, !insn.addr !31
%stack_var_-72 = alloca i32*, align 8
%stack_var_-8 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !32
store i32* null, i32** %stack_var_-72, align 8, !insn.addr !33
%1 = load i32, i32* @global_var_398, align 4, !insn.addr !34
%2 = icmp eq i32 %1, 5, !insn.addr !35
br i1 %2, label %dec_label_pc_115, label %dec_label_pc_107, !insn.addr !36
dec_label_pc_107: ; preds = %dec_label_pc_dd
%3 = call i64 @printLine(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @global_var_2c0, i64 0, i64 0)), !insn.addr !37
br label %dec_label_pc_149, !insn.addr !38
dec_label_pc_115: ; preds = %dec_label_pc_dd
%4 = ptrtoint i32** %stack_var_-72 to i64, !insn.addr !39
%5 = add i64 %4, -49, !insn.addr !40
%6 = and i64 %5, -16, !insn.addr !41
%7 = inttoptr i64 %6 to i32*, !insn.addr !42
store i32* %7, i32** %stack_var_-72, align 8, !insn.addr !42
br label %dec_label_pc_149, !insn.addr !42
dec_label_pc_149: ; preds = %dec_label_pc_115, %dec_label_pc_107
%8 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !43
%9 = add i64 %8, -48, !insn.addr !44
store i64 0, i64* %storemerge2.reg2mem
br label %dec_label_pc_17b
dec_label_pc_17b: ; preds = %dec_label_pc_17b, %dec_label_pc_149
%storemerge2.reload = load i64, i64* %storemerge2.reg2mem
%10 = mul i64 %storemerge2.reload, 4, !insn.addr !45
%11 = load i32*, i32** %stack_var_-72, align 8, !insn.addr !46
%12 = ptrtoint i32* %11 to i64, !insn.addr !46
%13 = add i64 %10, %12, !insn.addr !47
%14 = add i64 %9, %10, !insn.addr !44
%15 = inttoptr i64 %14 to i32*, !insn.addr !44
%16 = load i32, i32* %15, align 4, !insn.addr !44
%17 = inttoptr i64 %13 to i32*, !insn.addr !48
store i32 %16, i32* %17, align 4, !insn.addr !48
%18 = add nuw nsw i64 %storemerge2.reload, 1, !insn.addr !49
%exitcond = icmp eq i64 %18, 10
store i64 %18, i64* %storemerge2.reg2mem, !insn.addr !50
br i1 %exitcond, label %dec_label_pc_1a4, label %dec_label_pc_17b, !insn.addr !50
dec_label_pc_1a4: ; preds = %dec_label_pc_17b
%19 = load i32*, i32** %stack_var_-72, align 8, !insn.addr !51
%20 = load i32, i32* %19, align 4, !insn.addr !52
%21 = zext i32 %20 to i64, !insn.addr !53
%22 = call i64 @printIntLine(i64 %21), !insn.addr !54
%23 = call i64 @__readfsqword(i64 40), !insn.addr !55
%24 = icmp eq i64 %0, %23, !insn.addr !55
store i64 0, i64* %rax.0.reg2mem, !insn.addr !56
br i1 %24, label %dec_label_pc_1c6, label %dec_label_pc_1c1, !insn.addr !56
dec_label_pc_1c1: ; preds = %dec_label_pc_1a4
%25 = call i64 @__stack_chk_fail(), !insn.addr !57
store i64 %25, i64* %rax.0.reg2mem, !insn.addr !57
br label %dec_label_pc_1c6, !insn.addr !57
dec_label_pc_1c6: ; preds = %dec_label_pc_1c1, %dec_label_pc_1a4
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !58
}
define i64 @goodG2B2() local_unnamed_addr {
dec_label_pc_1c8:
%rax.0.reg2mem = alloca i64, !insn.addr !59
%storemerge2.reg2mem = alloca i64, !insn.addr !59
%.reg2mem3 = alloca i32*, !insn.addr !59
%.reg2mem = alloca i32*, !insn.addr !59
%stack_var_-72 = alloca i32*, align 8
%stack_var_-8 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !60
store i32* null, i32** %stack_var_-72, align 8, !insn.addr !61
%1 = load i32, i32* @global_var_398, align 4, !insn.addr !62
%2 = icmp eq i32 %1, 5, !insn.addr !63
%3 = icmp eq i1 %2, false, !insn.addr !64
store i32* null, i32** %.reg2mem, !insn.addr !64
br i1 %3, label %dec_label_pc_226, label %dec_label_pc_1f2, !insn.addr !64
dec_label_pc_1f2: ; preds = %dec_label_pc_1c8
%4 = ptrtoint i32** %stack_var_-72 to i64, !insn.addr !65
%5 = add i64 %4, -49, !insn.addr !66
%6 = and i64 %5, -16, !insn.addr !67
%7 = inttoptr i64 %6 to i32*, !insn.addr !68
store i32* %7, i32** %stack_var_-72, align 8, !insn.addr !68
store i32* %7, i32** %.reg2mem, !insn.addr !68
br label %dec_label_pc_226, !insn.addr !68
dec_label_pc_226: ; preds = %dec_label_pc_1f2, %dec_label_pc_1c8
%8 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !69
%.reload = load i32*, i32** %.reg2mem
%9 = add i64 %8, -48, !insn.addr !70
store i32* %.reload, i32** %.reg2mem3
store i64 0, i64* %storemerge2.reg2mem
br label %dec_label_pc_258
dec_label_pc_258: ; preds = %dec_label_pc_258, %dec_label_pc_226
%storemerge2.reload = load i64, i64* %storemerge2.reg2mem
%.reload4 = load i32*, i32** %.reg2mem3, !insn.addr !71
%10 = mul i64 %storemerge2.reload, 4, !insn.addr !72
%11 = ptrtoint i32* %.reload4 to i64, !insn.addr !71
%12 = add i64 %10, %11, !insn.addr !73
%13 = add i64 %9, %10, !insn.addr !70
%14 = inttoptr i64 %13 to i32*, !insn.addr !70
%15 = load i32, i32* %14, align 4, !insn.addr !70
%16 = inttoptr i64 %12 to i32*, !insn.addr !74
store i32 %15, i32* %16, align 4, !insn.addr !74
%17 = add nuw nsw i64 %storemerge2.reload, 1, !insn.addr !75
%exitcond = icmp eq i64 %17, 10
%18 = load i32*, i32** %stack_var_-72, align 8
store i32* %18, i32** %.reg2mem3, !insn.addr !76
store i64 %17, i64* %storemerge2.reg2mem, !insn.addr !76
br i1 %exitcond, label %dec_label_pc_281, label %dec_label_pc_258, !insn.addr !76
dec_label_pc_281: ; preds = %dec_label_pc_258
%19 = load i32, i32* %18, align 4, !insn.addr !77
%20 = zext i32 %19 to i64, !insn.addr !78
%21 = call i64 @printIntLine(i64 %20), !insn.addr !79
%22 = call i64 @__readfsqword(i64 40), !insn.addr !80
%23 = icmp eq i64 %0, %22, !insn.addr !80
store i64 0, i64* %rax.0.reg2mem, !insn.addr !81
br i1 %23, label %dec_label_pc_2a3, label %dec_label_pc_29e, !insn.addr !81
dec_label_pc_29e: ; preds = %dec_label_pc_281
%24 = call i64 @__stack_chk_fail(), !insn.addr !82
store i64 %24, i64* %rax.0.reg2mem, !insn.addr !82
br label %dec_label_pc_2a3, !insn.addr !82
dec_label_pc_2a3: ; preds = %dec_label_pc_29e, %dec_label_pc_281
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !83
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE131_loop_13_good() local_unnamed_addr {
dec_label_pc_2a5:
%0 = call i64 @goodG2B1(), !insn.addr !84
%1 = call i64 @goodG2B2(), !insn.addr !85
ret i64 %1, !insn.addr !86
}
declare i64 @printIntLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @printLine(i8*) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 8}
!1 = !{i64 31}
!2 = !{i64 37}
!3 = !{i64 48}
!4 = !{i64 51}
!5 = !{i64 72}
!6 = !{i64 78}
!7 = !{i64 82}
!8 = !{i64 90}
!9 = !{i64 94}
!10 = !{i64 102}
!11 = !{i64 110}
!12 = !{i64 118}
!13 = !{i64 126}
!14 = !{i64 134}
!15 = !{i64 148}
!16 = !{i64 156}
!17 = !{i64 160}
!18 = !{i64 167}
!19 = !{i64 171}
!20 = !{i64 173}
!21 = !{i64 183}
!22 = !{i64 185}
!23 = !{i64 189}
!24 = !{i64 191}
!25 = !{i64 193}
!26 = !{i64 199}
!27 = !{i64 203}
!28 = !{i64 212}
!29 = !{i64 214}
!30 = !{i64 220}
!31 = !{i64 221}
!32 = !{i64 229}
!33 = !{i64 244}
!34 = !{i64 252}
!35 = !{i64 258}
!36 = !{i64 261}
!37 = !{i64 270}
!38 = !{i64 275}
!39 = !{i64 225}
!40 = !{i64 313}
!41 = !{i64 317}
!42 = !{i64 325}
!43 = !{i64 222}
!44 = !{i64 402}
!45 = !{i64 383}
!46 = !{i64 391}
!47 = !{i64 395}
!48 = !{i64 406}
!49 = !{i64 408}
!50 = !{i64 418}
!51 = !{i64 420}
!52 = !{i64 424}
!53 = !{i64 426}
!54 = !{i64 428}
!55 = !{i64 438}
!56 = !{i64 447}
!57 = !{i64 449}
!58 = !{i64 455}
!59 = !{i64 456}
!60 = !{i64 464}
!61 = !{i64 479}
!62 = !{i64 487}
!63 = !{i64 493}
!64 = !{i64 496}
!65 = !{i64 460}
!66 = !{i64 534}
!67 = !{i64 538}
!68 = !{i64 546}
!69 = !{i64 457}
!70 = !{i64 623}
!71 = !{i64 612}
!72 = !{i64 604}
!73 = !{i64 616}
!74 = !{i64 627}
!75 = !{i64 629}
!76 = !{i64 639}
!77 = !{i64 645}
!78 = !{i64 647}
!79 = !{i64 649}
!80 = !{i64 659}
!81 = !{i64 668}
!82 = !{i64 670}
!83 = !{i64 676}
!84 = !{i64 686}
!85 = !{i64 696}
!86 = !{i64 703}
### Assistant: @GLOBAL_CONST_FIVE = external dso_local constant i32, align 4
@.str = private unnamed_addr constant [21 x i8] c"Benign, fixed string\00", align 1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE131_loop_13_bad() #0 {
entry:
%data = alloca i32*, align 8
%source = alloca [10 x i32], align 16
%i = alloca i64, align 8
store i32* null, i32** %data, align 8
%0 = load i32, i32* @GLOBAL_CONST_FIVE, align 4
%cmp = icmp eq i32 %0, 5
br i1 %cmp, label %if.then, label %if.end
if.then: ; preds = %entry
%1 = alloca i8, i64 10, align 16
%2 = bitcast i8* %1 to i32*
store i32* %2, i32** %data, align 8
br label %if.end
if.end: ; preds = %if.then, %entry
%3 = bitcast [10 x i32]* %source to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %3, i8 0, i64 40, i1 false)
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %if.end
%4 = load i64, i64* %i, align 8
%cmp1 = icmp ult i64 %4, 10
br i1 %cmp1, label %for.body, label %for.end
for.body: ; preds = %for.cond
%5 = load i64, i64* %i, align 8
%arrayidx = getelementptr inbounds [10 x i32], [10 x i32]* %source, i64 0, i64 %5
%6 = load i32, i32* %arrayidx, align 4
%7 = load i32*, i32** %data, align 8
%8 = load i64, i64* %i, align 8
%arrayidx2 = getelementptr inbounds i32, i32* %7, i64 %8
store i32 %6, i32* %arrayidx2, align 4
br label %for.inc
for.inc: ; preds = %for.body
%9 = load i64, i64* %i, align 8
%inc = add i64 %9, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%10 = load i32*, i32** %data, align 8
%arrayidx3 = getelementptr inbounds i32, i32* %10, i64 0
%11 = load i32, i32* %arrayidx3, align 4
call void @printIntLine(i32 %11)
ret void
}
; Function Attrs: argmemonly nounwind willreturn writeonly
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #1
declare dso_local void @printIntLine(i32) #2
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE131_loop_13_good() #0 {
entry:
call void @goodG2B1()
call void @goodG2B2()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B1() #0 {
entry:
%data = alloca i32*, align 8
%source = alloca [10 x i32], align 16
%i = alloca i64, align 8
store i32* null, i32** %data, align 8
%0 = load i32, i32* @GLOBAL_CONST_FIVE, align 4
%cmp = icmp ne i32 %0, 5
br i1 %cmp, label %if.then, label %if.else
if.then: ; preds = %entry
call void @printLine(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
br label %if.end
if.else: ; preds = %entry
%1 = alloca i8, i64 40, align 16
%2 = bitcast i8* %1 to i32*
store i32* %2, i32** %data, align 8
br label %if.end
if.end: ; preds = %if.else, %if.then
%3 = bitcast [10 x i32]* %source to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %3, i8 0, i64 40, i1 false)
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %if.end
%4 = load i64, i64* %i, align 8
%cmp1 = icmp ult i64 %4, 10
br i1 %cmp1, label %for.body, label %for.end
for.body: ; preds = %for.cond
%5 = load i64, i64* %i, align 8
%arrayidx = getelementptr inbounds [10 x i32], [10 x i32]* %source, i64 0, i64 %5
%6 = load i32, i32* %arrayidx, align 4
%7 = load i32*, i32** %data, align 8
%8 = load i64, i64* %i, align 8
%arrayidx2 = getelementptr inbounds i32, i32* %7, i64 %8
store i32 %6, i32* %arrayidx2, align 4
br label %for.inc
for.inc: ; preds = %for.body
%9 = load i64, i64* %i, align 8
%inc = add i64 %9, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%10 = load i32*, i32** %data, align 8
%arrayidx3 = getelementptr inbounds i32, i32* %10, i64 0
%11 = load i32, i32* %arrayidx3, align 4
call void @printIntLine(i32 %11)
ret void
}
declare dso_local void @printLine(i8*) #2
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B2() #0 {
entry:
%data = alloca i32*, align 8
%source = alloca [10 x i32], align 16
%i = alloca i64, align 8
store i32* null, i32** %data, align 8
%0 = load i32, i32* @GLOBAL_CONST_FIVE, align 4
%cmp = icmp eq i32 %0, 5
br i1 %cmp, label %if.then, label %if.end
if.then: ; preds = %entry
%1 = alloca i8, i64 40, align 16
%2 = bitcast i8* %1 to i32*
store i32* %2, i32** %data, align 8
br label %if.end
if.end: ; preds = %if.then, %entry
%3 = bitcast [10 x i32]* %source to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %3, i8 0, i64 40, i1 false)
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %if.end
%4 = load i64, i64* %i, align 8
%cmp1 = icmp ult i64 %4, 10
br i1 %cmp1, label %for.body, label %for.end
for.body: ; preds = %for.cond
%5 = load i64, i64* %i, align 8
%arrayidx = getelementptr inbounds [10 x i32], [10 x i32]* %source, i64 0, i64 %5
%6 = load i32, i32* %arrayidx, align 4
%7 = load i32*, i32** %data, align 8
%8 = load i64, i64* %i, align 8
%arrayidx2 = getelementptr inbounds i32, i32* %7, i64 %8
store i32 %6, i32* %arrayidx2, align 4
br label %for.inc
for.inc: ; preds = %for.body
%9 = load i64, i64* %i, align 8
%inc = add i64 %9, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%10 = load i32*, i32** %data, align 8
%arrayidx3 = getelementptr inbounds i32, i32* %10, i64 0
%11 = load i32, i32* %arrayidx3, align 4
call void @printIntLine(i32 %11)
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" }
attributes #1 = { argmemonly nounwind willreturn writeonly }
attributes #2 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%stack_var_-120 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
%1 = ptrtoint i64* %stack_var_-120 to i64, !insn.addr !1
ret i64 %1, !insn.addr !2
}
define i64 @function_30() local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%.reg2mem = alloca i64, !insn.addr !3
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = trunc i64 %2 to i8
%4 = mul i8 %3, 2, !insn.addr !3
%5 = inttoptr i64 %2 to i8*, !insn.addr !3
store i8 %4, i8* %5, align 1, !insn.addr !3
%6 = add i64 %1, -8, !insn.addr !4
%7 = inttoptr i64 %6 to i64*, !insn.addr !4
%8 = load i64, i64* %7, align 8, !insn.addr !4
%9 = call i64 @__readfsqword(i64 40), !insn.addr !5
%10 = icmp eq i64 %9, %8, !insn.addr !5
store i64 0, i64* %.reg2mem, !insn.addr !6
br i1 %10, label %dec_label_pc_47, label %dec_label_pc_42, !insn.addr !6
dec_label_pc_42: ; preds = %dec_label_pc_30
%11 = call i64 @__stack_chk_fail(), !insn.addr !7
store i64 %11, i64* %.reg2mem, !insn.addr !7
br label %dec_label_pc_47, !insn.addr !7
dec_label_pc_47: ; preds = %dec_label_pc_42, %dec_label_pc_30
%.reload = load i64, i64* %.reg2mem, !insn.addr !8
ret i64 %.reload, !insn.addr !8
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_49:
%rax.0.reg2mem = alloca i64, !insn.addr !9
%stack_var_-128 = alloca i8*, align 8
%stack_var_-120 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !10
%1 = bitcast i64* %stack_var_-120 to i8*
store i8* %1, i8** %stack_var_-128, align 8, !insn.addr !11
store i8 0, i8* %1, align 8, !insn.addr !12
%2 = bitcast i8** %stack_var_-128 to i64*, !insn.addr !13
%3 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memmove_64b_goodG2BSink(i64* nonnull %2), !insn.addr !13
%4 = call i64 @__readfsqword(i64 40), !insn.addr !14
%5 = icmp eq i64 %0, %4, !insn.addr !14
store i64 0, i64* %rax.0.reg2mem, !insn.addr !15
br i1 %5, label %dec_label_pc_90, label %dec_label_pc_8b, !insn.addr !15
dec_label_pc_8b: ; preds = %dec_label_pc_49
%6 = call i64 @__stack_chk_fail(), !insn.addr !16
store i64 %6, i64* %rax.0.reg2mem, !insn.addr !16
br label %dec_label_pc_90, !insn.addr !16
dec_label_pc_90: ; preds = %dec_label_pc_8b, %dec_label_pc_49
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !17
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memmove_64_good() local_unnamed_addr {
dec_label_pc_92:
%0 = call i64 @goodG2B(), !insn.addr !18
ret i64 %0, !insn.addr !19
}
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memmove_64b_goodG2BSink(i64*) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 8}
!1 = !{i64 27}
!2 = !{i64 35}
!3 = !{i64 48}
!4 = !{i64 51}
!5 = !{i64 55}
!6 = !{i64 64}
!7 = !{i64 66}
!8 = !{i64 72}
!9 = !{i64 73}
!10 = !{i64 81}
!11 = !{i64 100}
!12 = !{i64 108}
!13 = !{i64 118}
!14 = !{i64 128}
!15 = !{i64 137}
!16 = !{i64 139}
!17 = !{i64 145}
!18 = !{i64 155}
!19 = !{i64 162}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memmove_64_bad() #0 {
entry:
%data = alloca i8*, align 8
%dataBadBuffer = alloca [50 x i8], align 16
%dataGoodBuffer = alloca [100 x i8], align 16
%arraydecay = getelementptr inbounds [50 x i8], [50 x i8]* %dataBadBuffer, i64 0, i64 0
store i8* %arraydecay, i8** %data, align 8
%0 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %0, i64 0
store i8 0, i8* %arrayidx, align 1
%1 = bitcast i8** %data to i8*
call void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memmove_64b_badSink(i8* %1)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memmove_64b_badSink(i8*) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memmove_64_good() #0 {
entry:
call void @goodG2B()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B() #0 {
entry:
%data = alloca i8*, align 8
%dataBadBuffer = alloca [50 x i8], align 16
%dataGoodBuffer = alloca [100 x i8], align 16
%arraydecay = getelementptr inbounds [100 x i8], [100 x i8]* %dataGoodBuffer, i64 0, i64 0
store i8* %arraydecay, i8** %data, align 8
%0 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %0, i64 0
store i8 0, i8* %arrayidx, align 1
%1 = bitcast i8** %data to i8*
call void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memmove_64b_goodG2BSink(i8* %1)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memmove_64b_goodG2BSink(i8*) #1
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" }
attributes #1 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%stack_var_-37 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
%1 = ptrtoint i64* %stack_var_-37 to i64, !insn.addr !1
ret i64 %1, !insn.addr !2
}
define i64 @function_30(i64 %arg1, i64 %arg2, i64 %arg3, i64 %arg4, i64 %arg5) local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !3
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = add i64 %arg5, -117, !insn.addr !3
%4 = inttoptr i64 %3 to i8*, !insn.addr !3
%5 = load i8, i8* %4, align 1, !insn.addr !3
%6 = udiv i8 %5, 2, !insn.addr !3
%7 = shl i8 %5, 7, !insn.addr !3
%8 = or i8 %6, %7, !insn.addr !3
store i8 %8, i8* %4, align 1, !insn.addr !3
%9 = add i64 %2, -119, !insn.addr !4
%10 = inttoptr i64 %9 to i8*, !insn.addr !4
%11 = load i8, i8* %10, align 1, !insn.addr !4
%12 = trunc i64 %arg4 to i8, !insn.addr !4
%13 = add i8 %11, %12, !insn.addr !4
store i8 %13, i8* %10, align 1, !insn.addr !4
%14 = add i64 %1, -19, !insn.addr !5
%15 = inttoptr i64 %14 to i64*, !insn.addr !5
%16 = add i64 %1, -11, !insn.addr !6
%17 = inttoptr i64 %16 to i16*, !insn.addr !6
store i16 16705, i16* %17, align 2, !insn.addr !6
%18 = add i64 %1, -9, !insn.addr !7
%19 = inttoptr i64 %18 to i8*, !insn.addr !7
store i8 0, i8* %19, align 1, !insn.addr !7
%20 = call i64 @strlen(i64 %14), !insn.addr !8
%21 = add i64 %20, 1, !insn.addr !9
%22 = add i64 %1, -40, !insn.addr !10
%23 = inttoptr i64 %22 to i64*, !insn.addr !10
%24 = load i64, i64* %23, align 8, !insn.addr !10
%25 = call i64 @memcpy(i64 %24, i64 %14, i64 %21, i64 %14), !insn.addr !11
%26 = load i64, i64* %23, align 8, !insn.addr !12
%27 = call i64 @printLine(i64 %26), !insn.addr !13
%28 = add i64 %1, -8, !insn.addr !14
%29 = inttoptr i64 %28 to i64*, !insn.addr !14
%30 = load i64, i64* %29, align 8, !insn.addr !14
%31 = call i64 @__readfsqword(i64 40), !insn.addr !15
%32 = icmp eq i64 %30, %31, !insn.addr !15
store i64 0, i64* %rax.0.reg2mem, !insn.addr !16
br i1 %32, label %dec_label_pc_95, label %dec_label_pc_90, !insn.addr !16
dec_label_pc_90: ; preds = %dec_label_pc_30
%33 = call i64 @__stack_chk_fail(), !insn.addr !17
store i64 %33, i64* %rax.0.reg2mem, !insn.addr !17
br label %dec_label_pc_95, !insn.addr !17
dec_label_pc_95: ; preds = %dec_label_pc_90, %dec_label_pc_30
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !18
}
define i64 @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memcpy_33L7goodG2BEv() local_unnamed_addr {
dec_label_pc_97:
%rax.0.reg2mem = alloca i64, !insn.addr !19
%stack_var_-27 = alloca i64, align 8
%stack_var_-38 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !20
%1 = bitcast i64* %stack_var_-38 to i8*
store i8 0, i8* %1, align 8, !insn.addr !21
%2 = ptrtoint i64* %stack_var_-38 to i64, !insn.addr !22
store i64 4702111234474983745, i64* %stack_var_-27, align 8, !insn.addr !23
%3 = ptrtoint i64* %stack_var_-27 to i64, !insn.addr !24
%4 = call i64 @strlen(i64 %3), !insn.addr !25
%5 = add i64 %4, 1, !insn.addr !26
%6 = call i64 @memcpy(i64 %2, i64 %3, i64 %5, i64 %3), !insn.addr !27
%7 = call i64 @printLine(i64 %2), !insn.addr !28
%8 = call i64 @__readfsqword(i64 40), !insn.addr !29
%9 = icmp eq i64 %0, %8, !insn.addr !29
store i64 0, i64* %rax.0.reg2mem, !insn.addr !30
br i1 %9, label %dec_label_pc_12c, label %dec_label_pc_127, !insn.addr !30
dec_label_pc_127: ; preds = %dec_label_pc_97
%10 = call i64 @__stack_chk_fail(), !insn.addr !31
store i64 %10, i64* %rax.0.reg2mem, !insn.addr !31
br label %dec_label_pc_12c, !insn.addr !31
dec_label_pc_12c: ; preds = %dec_label_pc_127, %dec_label_pc_97
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !32
}
define i64 @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memcpy_334goodEv() local_unnamed_addr {
dec_label_pc_12e:
%0 = call i64 @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memcpy_33L7goodG2BEv(), !insn.addr !33
ret i64 %0, !insn.addr !34
}
declare i64 @strlen(i64) local_unnamed_addr
declare i64 @memcpy(i64, i64, i64, i64) local_unnamed_addr
declare i64 @printLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 8}
!1 = !{i64 31}
!2 = !{i64 35}
!3 = !{i64 48}
!4 = !{i64 52}
!5 = !{i64 59}
!6 = !{i64 71}
!7 = !{i64 77}
!8 = !{i64 88}
!9 = !{i64 93}
!10 = !{i64 101}
!11 = !{i64 111}
!12 = !{i64 116}
!13 = !{i64 123}
!14 = !{i64 129}
!15 = !{i64 133}
!16 = !{i64 142}
!17 = !{i64 144}
!18 = !{i64 150}
!19 = !{i64 151}
!20 = !{i64 159}
!21 = !{i64 194}
!22 = !{i64 201}
!23 = !{i64 218}
!24 = !{i64 236}
!25 = !{i64 239}
!26 = !{i64 244}
!27 = !{i64 262}
!28 = !{i64 274}
!29 = !{i64 284}
!30 = !{i64 293}
!31 = !{i64 295}
!32 = !{i64 301}
!33 = !{i64 306}
!34 = !{i64 313}
### Assistant: @__const._ZN65CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memcpy_333badEv.source = private unnamed_addr constant [11 x i8] c"AAAAAAAAAA\00", align 1
@__const._ZN65CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memcpy_33L7goodG2BEv.source = private unnamed_addr constant [11 x i8] c"AAAAAAAAAA\00", align 1
; Function Attrs: noinline optnone uwtable
define dso_local void @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memcpy_333badEv() #0 {
entry:
%data = alloca i8*, align 8
%dataRef = alloca i8**, align 8
%dataBadBuffer = alloca [10 x i8], align 1
%dataGoodBuffer = alloca [11 x i8], align 1
%data1 = alloca i8*, align 8
%source = alloca [11 x i8], align 1
store i8** %data, i8*** %dataRef, align 8
%arraydecay = getelementptr inbounds [10 x i8], [10 x i8]* %dataBadBuffer, i64 0, i64 0
store i8* %arraydecay, i8** %data, align 8
%0 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %0, i64 0
store i8 0, i8* %arrayidx, align 1
%1 = load i8**, i8*** %dataRef, align 8
%2 = load i8*, i8** %1, align 8
store i8* %2, i8** %data1, align 8
%3 = bitcast [11 x i8]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %3, i8* align 1 getelementptr inbounds ([11 x i8], [11 x i8]* @__const._ZN65CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memcpy_333badEv.source, i32 0, i32 0), i64 11, i1 false)
%4 = load i8*, i8** %data1, align 8
%arraydecay2 = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%arraydecay3 = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%call = call i64 @strlen(i8* %arraydecay3) #4
%add = add i64 %call, 1
%mul = mul i64 %add, 1
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %4, i8* align 1 %arraydecay2, i64 %mul, i1 false)
%5 = load i8*, i8** %data1, align 8
call void @printLine(i8* %5)
ret void
}
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #1
; Function Attrs: nounwind readonly
declare dso_local i64 @strlen(i8*) #2
declare dso_local void @printLine(i8*) #3
; Function Attrs: noinline optnone uwtable
define dso_local void @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memcpy_334goodEv() #0 {
entry:
call void @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memcpy_33L7goodG2BEv()
ret void
}
; Function Attrs: noinline optnone uwtable
define internal void @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memcpy_33L7goodG2BEv() #0 {
entry:
%data = alloca i8*, align 8
%dataRef = alloca i8**, align 8
%dataBadBuffer = alloca [10 x i8], align 1
%dataGoodBuffer = alloca [11 x i8], align 1
%data1 = alloca i8*, align 8
%source = alloca [11 x i8], align 1
store i8** %data, i8*** %dataRef, align 8
%arraydecay = getelementptr inbounds [11 x i8], [11 x i8]* %dataGoodBuffer, i64 0, i64 0
store i8* %arraydecay, i8** %data, align 8
%0 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %0, i64 0
store i8 0, i8* %arrayidx, align 1
%1 = load i8**, i8*** %dataRef, align 8
%2 = load i8*, i8** %1, align 8
store i8* %2, i8** %data1, align 8
%3 = bitcast [11 x i8]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %3, i8* align 1 getelementptr inbounds ([11 x i8], [11 x i8]* @__const._ZN65CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memcpy_33L7goodG2BEv.source, i32 0, i32 0), i64 11, i1 false)
%4 = load i8*, i8** %data1, align 8
%arraydecay2 = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%arraydecay3 = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%call = call i64 @strlen(i8* %arraydecay3) #4
%add = add i64 %call, 1
%mul = mul i64 %add, 1
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %4, i8* align 1 %arraydecay2, i64 %mul, i1 false)
%5 = load i8*, i8** %data1, align 8
call void @printLine(i8* %5)
ret void
}
attributes #0 = { noinline 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" }
attributes #1 = { argmemonly nounwind willreturn }
attributes #2 = { nounwind readonly "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #3 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #4 = { nounwind readonly }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_f = local_unnamed_addr constant [3 x i8] c"%(\00"
@global_var_348 = constant [16 x i8] c"fgets() failed.\00"
@global_var_358 = constant [32 x i8] c"ERROR: Array index is negative.\00"
@global_var_378 = constant [36 x i8] c"ERROR: Array index is out-of-bounds\00"
@global_var_4b8 = local_unnamed_addr global i32 0
define i64 @_GLOBAL_OFFSET_TABLE_.1(i64 %arg1) local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
ret i64 0, !insn.addr !1
}
define i64 @function_30() local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !2
%.reg2mem = alloca i32, !insn.addr !2
%1 = load i64, i64* %0
%2 = load i32, i32* @global_var_4b8, align 4, !insn.addr !2
%3 = add i64 %1, -22, !insn.addr !3
%4 = call i64 @fgets(i64 %3, i64 14, i32 %2), !insn.addr !4
%5 = icmp eq i64 %4, 0, !insn.addr !5
br i1 %5, label %dec_label_pc_5d, label %dec_label_pc_4c, !insn.addr !6
dec_label_pc_4c: ; preds = %dec_label_pc_30
%6 = call i64 @atoi(i64 %3), !insn.addr !7
%7 = trunc i64 %6 to i32, !insn.addr !8
%8 = add i64 %1, -36
%9 = inttoptr i64 %8 to i32*
store i32 %7, i32* %9, align 4, !insn.addr !8
store i32 %7, i32* %.reg2mem, !insn.addr !9
br label %dec_label_pc_69, !insn.addr !9
dec_label_pc_5d: ; preds = %dec_label_pc_30
%10 = call i64 @printLine(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @global_var_348, i64 0, i64 0)), !insn.addr !10
%.pre = add i64 %1, -36, !insn.addr !11
%.pre1 = inttoptr i64 %.pre to i32*, !insn.addr !11
%.pre3 = load i32, i32* %.pre1, align 4
store i32 %.pre3, i32* %.reg2mem, !insn.addr !10
br label %dec_label_pc_69, !insn.addr !10
dec_label_pc_69: ; preds = %dec_label_pc_5d, %dec_label_pc_4c
%.reload = load i32, i32* %.reg2mem, !insn.addr !11
%11 = zext i32 %.reload to i64, !insn.addr !11
%12 = add i64 %1, -8, !insn.addr !12
%13 = inttoptr i64 %12 to i64*, !insn.addr !12
%14 = load i64, i64* %13, align 8, !insn.addr !12
%15 = call i64 @__readfsqword(i64 40), !insn.addr !13
%16 = icmp eq i64 %14, %15, !insn.addr !13
store i64 %11, i64* %rax.0.reg2mem, !insn.addr !14
br i1 %16, label %dec_label_pc_80, label %dec_label_pc_7b, !insn.addr !14
dec_label_pc_7b: ; preds = %dec_label_pc_69
%17 = call i64 @__stack_chk_fail(), !insn.addr !15
store i64 %17, i64* %rax.0.reg2mem, !insn.addr !15
br label %dec_label_pc_80, !insn.addr !15
dec_label_pc_80: ; preds = %dec_label_pc_7b, %dec_label_pc_69
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !16
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_42_bad() local_unnamed_addr {
dec_label_pc_82:
%rax.0.reg2mem = alloca i64, !insn.addr !17
%indvars.iv.reg2mem = alloca i64, !insn.addr !17
%stack_var_-8 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !18
%1 = call i64 @_GLOBAL_OFFSET_TABLE_.1(i64 4294967295), !insn.addr !19
%2 = trunc i64 %1 to i32, !insn.addr !20
%3 = icmp slt i32 %2, 0, !insn.addr !21
br i1 %3, label %dec_label_pc_10d, label %dec_label_pc_db, !insn.addr !22
dec_label_pc_db: ; preds = %dec_label_pc_82
%4 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !23
%sext = mul i64 %1, 4294967296
%5 = ashr exact i64 %sext, 30, !insn.addr !24
%6 = add i64 %4, -48, !insn.addr !24
%7 = add i64 %5, %6, !insn.addr !24
%8 = inttoptr i64 %7 to i32*, !insn.addr !24
store i32 1, i32* %8, align 4, !insn.addr !24
store i64 0, i64* %indvars.iv.reg2mem
br label %dec_label_pc_f1
dec_label_pc_f1: ; preds = %dec_label_pc_f1, %dec_label_pc_db
%indvars.iv.reload = load i64, i64* %indvars.iv.reg2mem
%9 = mul i64 %indvars.iv.reload, 4, !insn.addr !25
%10 = add i64 %9, %6, !insn.addr !25
%11 = inttoptr i64 %10 to i32*, !insn.addr !25
%12 = load i32, i32* %11, align 4, !insn.addr !25
%13 = zext i32 %12 to i64, !insn.addr !26
%14 = call i64 @printIntLine(i64 %13), !insn.addr !27
%indvars.iv.next = add nuw nsw i64 %indvars.iv.reload, 1
%exitcond = icmp eq i64 %indvars.iv.next, 10
store i64 %indvars.iv.next, i64* %indvars.iv.reg2mem, !insn.addr !28
br i1 %exitcond, label %dec_label_pc_119, label %dec_label_pc_f1, !insn.addr !28
dec_label_pc_10d: ; preds = %dec_label_pc_82
%15 = call i64 @printLine(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @global_var_358, i64 0, i64 0)), !insn.addr !29
br label %dec_label_pc_119, !insn.addr !29
dec_label_pc_119: ; preds = %dec_label_pc_f1, %dec_label_pc_10d
%16 = call i64 @__readfsqword(i64 40), !insn.addr !30
%17 = icmp eq i64 %0, %16, !insn.addr !30
store i64 0, i64* %rax.0.reg2mem, !insn.addr !31
br i1 %17, label %dec_label_pc_12e, label %dec_label_pc_129, !insn.addr !31
dec_label_pc_129: ; preds = %dec_label_pc_119
%18 = call i64 @__stack_chk_fail(), !insn.addr !32
store i64 %18, i64* %rax.0.reg2mem, !insn.addr !32
br label %dec_label_pc_12e, !insn.addr !32
dec_label_pc_12e: ; preds = %dec_label_pc_129, %dec_label_pc_119
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !33
}
define i64 @goodG2BSource(i64 %arg1) local_unnamed_addr {
dec_label_pc_130:
ret i64 7, !insn.addr !34
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_143:
%rax.0.reg2mem = alloca i64, !insn.addr !35
%indvars.iv.reg2mem = alloca i64, !insn.addr !35
%stack_var_-8 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !36
%1 = call i64 @goodG2BSource(i64 4294967295), !insn.addr !37
%2 = trunc i64 %1 to i32, !insn.addr !38
%3 = icmp slt i32 %2, 0, !insn.addr !39
br i1 %3, label %dec_label_pc_1ce, label %dec_label_pc_19c, !insn.addr !40
dec_label_pc_19c: ; preds = %dec_label_pc_143
%4 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !41
%sext = mul i64 %1, 4294967296
%5 = ashr exact i64 %sext, 30, !insn.addr !42
%6 = add i64 %4, -48, !insn.addr !42
%7 = add i64 %5, %6, !insn.addr !42
%8 = inttoptr i64 %7 to i32*, !insn.addr !42
store i32 1, i32* %8, align 4, !insn.addr !42
store i64 0, i64* %indvars.iv.reg2mem
br label %dec_label_pc_1b2
dec_label_pc_1b2: ; preds = %dec_label_pc_1b2, %dec_label_pc_19c
%indvars.iv.reload = load i64, i64* %indvars.iv.reg2mem
%9 = mul i64 %indvars.iv.reload, 4, !insn.addr !43
%10 = add i64 %9, %6, !insn.addr !43
%11 = inttoptr i64 %10 to i32*, !insn.addr !43
%12 = load i32, i32* %11, align 4, !insn.addr !43
%13 = zext i32 %12 to i64, !insn.addr !44
%14 = call i64 @printIntLine(i64 %13), !insn.addr !45
%indvars.iv.next = add nuw nsw i64 %indvars.iv.reload, 1
%exitcond = icmp eq i64 %indvars.iv.next, 10
store i64 %indvars.iv.next, i64* %indvars.iv.reg2mem, !insn.addr !46
br i1 %exitcond, label %dec_label_pc_1da, label %dec_label_pc_1b2, !insn.addr !46
dec_label_pc_1ce: ; preds = %dec_label_pc_143
%15 = call i64 @printLine(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @global_var_358, i64 0, i64 0)), !insn.addr !47
br label %dec_label_pc_1da, !insn.addr !47
dec_label_pc_1da: ; preds = %dec_label_pc_1b2, %dec_label_pc_1ce
%16 = call i64 @__readfsqword(i64 40), !insn.addr !48
%17 = icmp eq i64 %0, %16, !insn.addr !48
store i64 0, i64* %rax.0.reg2mem, !insn.addr !49
br i1 %17, label %dec_label_pc_1ef, label %dec_label_pc_1ea, !insn.addr !49
dec_label_pc_1ea: ; preds = %dec_label_pc_1da
%18 = call i64 @__stack_chk_fail(), !insn.addr !50
store i64 %18, i64* %rax.0.reg2mem, !insn.addr !50
br label %dec_label_pc_1ef, !insn.addr !50
dec_label_pc_1ef: ; preds = %dec_label_pc_1ea, %dec_label_pc_1da
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !51
}
define i64 @goodB2GSource(i64 %arg1) local_unnamed_addr {
dec_label_pc_1f1:
%rax.0.reg2mem = alloca i64, !insn.addr !52
%stack_var_-44.0.in.in.reg2mem = alloca i64, !insn.addr !52
%stack_var_-30 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !53
store i64 0, i64* %stack_var_-30, align 8, !insn.addr !54
%1 = load i32, i32* @global_var_4b8, align 4, !insn.addr !55
%2 = ptrtoint i64* %stack_var_-30 to i64, !insn.addr !56
%3 = call i64 @fgets(i64 %2, i64 14, i32 %1), !insn.addr !57
%4 = icmp eq i64 %3, 0, !insn.addr !58
br i1 %4, label %dec_label_pc_24e, label %dec_label_pc_23d, !insn.addr !59
dec_label_pc_23d: ; preds = %dec_label_pc_1f1
%5 = call i64 @atoi(i64 %2), !insn.addr !60
store i64 %5, i64* %stack_var_-44.0.in.in.reg2mem, !insn.addr !61
br label %dec_label_pc_25a, !insn.addr !61
dec_label_pc_24e: ; preds = %dec_label_pc_1f1
%6 = call i64 @printLine(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @global_var_348, i64 0, i64 0)), !insn.addr !62
store i64 %arg1, i64* %stack_var_-44.0.in.in.reg2mem, !insn.addr !62
br label %dec_label_pc_25a, !insn.addr !62
dec_label_pc_25a: ; preds = %dec_label_pc_24e, %dec_label_pc_23d
%stack_var_-44.0.in.in.reload = load i64, i64* %stack_var_-44.0.in.in.reg2mem
%7 = and i64 %stack_var_-44.0.in.in.reload, 4294967295
%8 = call i64 @__readfsqword(i64 40), !insn.addr !63
%9 = icmp eq i64 %0, %8, !insn.addr !63
store i64 %7, i64* %rax.0.reg2mem, !insn.addr !64
br i1 %9, label %dec_label_pc_271, label %dec_label_pc_26c, !insn.addr !64
dec_label_pc_26c: ; preds = %dec_label_pc_25a
%10 = call i64 @__stack_chk_fail(), !insn.addr !65
store i64 %10, i64* %rax.0.reg2mem, !insn.addr !65
br label %dec_label_pc_271, !insn.addr !65
dec_label_pc_271: ; preds = %dec_label_pc_26c, %dec_label_pc_25a
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !66
}
define i64 @goodB2G() local_unnamed_addr {
dec_label_pc_273:
%rax.0.reg2mem = alloca i64, !insn.addr !67
%indvars.iv.reg2mem = alloca i64, !insn.addr !67
%stack_var_-8 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !68
%1 = call i64 @goodB2GSource(i64 4294967295), !insn.addr !69
%2 = trunc i64 %1 to i32, !insn.addr !70
%3 = icmp ugt i32 %2, 9
br i1 %3, label %dec_label_pc_304, label %dec_label_pc_2d2, !insn.addr !71
dec_label_pc_2d2: ; preds = %dec_label_pc_273
%4 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !72
%sext = mul i64 %1, 4294967296
%5 = ashr exact i64 %sext, 30, !insn.addr !73
%6 = add i64 %4, -48, !insn.addr !73
%7 = add i64 %5, %6, !insn.addr !73
%8 = inttoptr i64 %7 to i32*, !insn.addr !73
store i32 1, i32* %8, align 4, !insn.addr !73
store i64 0, i64* %indvars.iv.reg2mem
br label %dec_label_pc_2e8
dec_label_pc_2e8: ; preds = %dec_label_pc_2e8, %dec_label_pc_2d2
%indvars.iv.reload = load i64, i64* %indvars.iv.reg2mem
%9 = mul i64 %indvars.iv.reload, 4, !insn.addr !74
%10 = add i64 %9, %6, !insn.addr !74
%11 = inttoptr i64 %10 to i32*, !insn.addr !74
%12 = load i32, i32* %11, align 4, !insn.addr !74
%13 = zext i32 %12 to i64, !insn.addr !75
%14 = call i64 @printIntLine(i64 %13), !insn.addr !76
%indvars.iv.next = add nuw nsw i64 %indvars.iv.reload, 1
%exitcond = icmp eq i64 %indvars.iv.next, 10
store i64 %indvars.iv.next, i64* %indvars.iv.reg2mem, !insn.addr !77
br i1 %exitcond, label %dec_label_pc_310, label %dec_label_pc_2e8, !insn.addr !77
dec_label_pc_304: ; preds = %dec_label_pc_273
%15 = call i64 @printLine(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @global_var_378, i64 0, i64 0)), !insn.addr !78
br label %dec_label_pc_310, !insn.addr !78
dec_label_pc_310: ; preds = %dec_label_pc_2e8, %dec_label_pc_304
%16 = call i64 @__readfsqword(i64 40), !insn.addr !79
%17 = icmp eq i64 %0, %16, !insn.addr !79
store i64 0, i64* %rax.0.reg2mem, !insn.addr !80
br i1 %17, label %dec_label_pc_325, label %dec_label_pc_320, !insn.addr !80
dec_label_pc_320: ; preds = %dec_label_pc_310
%18 = call i64 @__stack_chk_fail(), !insn.addr !81
store i64 %18, i64* %rax.0.reg2mem, !insn.addr !81
br label %dec_label_pc_325, !insn.addr !81
dec_label_pc_325: ; preds = %dec_label_pc_320, %dec_label_pc_310
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !82
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_42_good() local_unnamed_addr {
dec_label_pc_327:
%0 = call i64 @goodB2G(), !insn.addr !83
%1 = call i64 @goodG2B(), !insn.addr !84
ret i64 %1, !insn.addr !85
}
declare i64 @fgets(i64, i64, i32) local_unnamed_addr
declare i64 @atoi(i64) local_unnamed_addr
declare i64 @printLine(i8*) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @printIntLine(i64) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 11}
!1 = !{i64 26}
!2 = !{i64 48}
!3 = !{i64 54}
!4 = !{i64 66}
!5 = !{i64 71}
!6 = !{i64 74}
!7 = !{i64 83}
!8 = !{i64 88}
!9 = !{i64 91}
!10 = !{i64 100}
!11 = !{i64 105}
!12 = !{i64 108}
!13 = !{i64 112}
!14 = !{i64 121}
!15 = !{i64 123}
!16 = !{i64 129}
!17 = !{i64 130}
!18 = !{i64 138}
!19 = !{i64 165}
!20 = !{i64 170}
!21 = !{i64 213}
!22 = !{i64 217}
!23 = !{i64 131}
!24 = !{i64 224}
!25 = !{i64 246}
!26 = !{i64 250}
!27 = !{i64 252}
!28 = !{i64 265}
!29 = !{i64 276}
!30 = !{i64 286}
!31 = !{i64 295}
!32 = !{i64 297}
!33 = !{i64 303}
!34 = !{i64 322}
!35 = !{i64 323}
!36 = !{i64 331}
!37 = !{i64 358}
!38 = !{i64 363}
!39 = !{i64 406}
!40 = !{i64 410}
!41 = !{i64 324}
!42 = !{i64 417}
!43 = !{i64 439}
!44 = !{i64 443}
!45 = !{i64 445}
!46 = !{i64 458}
!47 = !{i64 469}
!48 = !{i64 479}
!49 = !{i64 488}
!50 = !{i64 490}
!51 = !{i64 496}
!52 = !{i64 497}
!53 = !{i64 508}
!54 = !{i64 523}
!55 = !{i64 544}
!56 = !{i64 560}
!57 = !{i64 563}
!58 = !{i64 568}
!59 = !{i64 571}
!60 = !{i64 580}
!61 = !{i64 588}
!62 = !{i64 597}
!63 = !{i64 609}
!64 = !{i64 618}
!65 = !{i64 620}
!66 = !{i64 626}
!67 = !{i64 627}
!68 = !{i64 635}
!69 = !{i64 662}
!70 = !{i64 667}
!71 = !{i64 714}
!72 = !{i64 628}
!73 = !{i64 727}
!74 = !{i64 749}
!75 = !{i64 753}
!76 = !{i64 755}
!77 = !{i64 768}
!78 = !{i64 779}
!79 = !{i64 789}
!80 = !{i64 798}
!81 = !{i64 800}
!82 = !{i64 806}
!83 = !{i64 816}
!84 = !{i64 826}
!85 = !{i64 833}
### Assistant: %struct._IO_FILE = type { i32, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, %struct._IO_marker*, %struct._IO_FILE*, i32, i32, i64, i16, i8, [1 x i8], i8*, i64, %struct._IO_codecvt*, %struct._IO_wide_data*, %struct._IO_FILE*, i8*, i64, i32, [20 x i8] }
%struct._IO_marker = type opaque
%struct._IO_codecvt = type opaque
%struct._IO_wide_data = type opaque
@.str = private unnamed_addr constant [32 x i8] c"ERROR: Array index is negative.\00", align 1
@stdin = external dso_local global %struct._IO_FILE*, align 8
@.str.1 = private unnamed_addr constant [16 x i8] c"fgets() failed.\00", align 1
@.str.2 = private unnamed_addr constant [36 x i8] c"ERROR: Array index is out-of-bounds\00", align 1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_42_bad() #0 {
entry:
%data = alloca i32, align 4
%i = alloca i32, align 4
%buffer = alloca [10 x i32], align 16
store i32 -1, i32* %data, align 4
%0 = load i32, i32* %data, align 4
%call = call i32 @badSource(i32 %0)
store i32 %call, i32* %data, align 4
%1 = bitcast [10 x i32]* %buffer to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %1, i8 0, i64 40, i1 false)
%2 = load i32, i32* %data, align 4
%cmp = icmp sge i32 %2, 0
br i1 %cmp, label %if.then, label %if.else
if.then: ; preds = %entry
%3 = load i32, i32* %data, align 4
%idxprom = sext i32 %3 to i64
%arrayidx = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom
store i32 1, i32* %arrayidx, align 4
store i32 0, i32* %i, align 4
br label %for.cond
for.cond: ; preds = %for.inc, %if.then
%4 = load i32, i32* %i, align 4
%cmp1 = icmp slt i32 %4, 10
br i1 %cmp1, label %for.body, label %for.end
for.body: ; preds = %for.cond
%5 = load i32, i32* %i, align 4
%idxprom2 = sext i32 %5 to i64
%arrayidx3 = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom2
%6 = load i32, i32* %arrayidx3, align 4
call void @printIntLine(i32 %6)
br label %for.inc
for.inc: ; preds = %for.body
%7 = load i32, i32* %i, align 4
%inc = add nsw i32 %7, 1
store i32 %inc, i32* %i, align 4
br label %for.cond
for.end: ; preds = %for.cond
br label %if.end
if.else: ; preds = %entry
call void @printLine(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %if.end
if.end: ; preds = %if.else, %for.end
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal i32 @badSource(i32 %data) #0 {
entry:
%data.addr = alloca i32, align 4
%inputBuffer = alloca [14 x i8], align 1
store i32 %data, i32* %data.addr, align 4
%0 = bitcast [14 x i8]* %inputBuffer to i8*
call void @llvm.memset.p0i8.i64(i8* align 1 %0, i8 0, i64 14, i1 false)
%arraydecay = getelementptr inbounds [14 x i8], [14 x i8]* %inputBuffer, i64 0, i64 0
%1 = load %struct._IO_FILE*, %struct._IO_FILE** @stdin, align 8
%call = call i8* @fgets(i8* %arraydecay, i32 14, %struct._IO_FILE* %1)
%cmp = icmp ne i8* %call, null
br i1 %cmp, label %if.then, label %if.else
if.then: ; preds = %entry
%arraydecay1 = getelementptr inbounds [14 x i8], [14 x i8]* %inputBuffer, i64 0, i64 0
%call2 = call i32 @atoi(i8* %arraydecay1) #4
store i32 %call2, i32* %data.addr, align 4
br label %if.end
if.else: ; preds = %entry
call void @printLine(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
br label %if.end
if.end: ; preds = %if.else, %if.then
%2 = load i32, i32* %data.addr, align 4
ret i32 %2
}
; Function Attrs: argmemonly nounwind willreturn writeonly
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #1
declare dso_local void @printIntLine(i32) #2
declare dso_local void @printLine(i8*) #2
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_42_good() #0 {
entry:
call void @goodB2G()
call void @goodG2B()
ret void
}
declare dso_local i8* @fgets(i8*, i32, %struct._IO_FILE*) #2
; Function Attrs: nounwind readonly
declare dso_local i32 @atoi(i8*) #3
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodB2G() #0 {
entry:
%data = alloca i32, align 4
%i = alloca i32, align 4
%buffer = alloca [10 x i32], align 16
store i32 -1, i32* %data, align 4
%0 = load i32, i32* %data, align 4
%call = call i32 @goodB2GSource(i32 %0)
store i32 %call, i32* %data, align 4
%1 = bitcast [10 x i32]* %buffer to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %1, i8 0, i64 40, i1 false)
%2 = load i32, i32* %data, align 4
%cmp = icmp sge i32 %2, 0
br i1 %cmp, label %land.lhs.true, label %if.else
land.lhs.true: ; preds = %entry
%3 = load i32, i32* %data, align 4
%cmp1 = icmp slt i32 %3, 10
br i1 %cmp1, label %if.then, label %if.else
if.then: ; preds = %land.lhs.true
%4 = load i32, i32* %data, align 4
%idxprom = sext i32 %4 to i64
%arrayidx = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom
store i32 1, i32* %arrayidx, align 4
store i32 0, i32* %i, align 4
br label %for.cond
for.cond: ; preds = %for.inc, %if.then
%5 = load i32, i32* %i, align 4
%cmp2 = icmp slt i32 %5, 10
br i1 %cmp2, label %for.body, label %for.end
for.body: ; preds = %for.cond
%6 = load i32, i32* %i, align 4
%idxprom3 = sext i32 %6 to i64
%arrayidx4 = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom3
%7 = load i32, i32* %arrayidx4, align 4
call void @printIntLine(i32 %7)
br label %for.inc
for.inc: ; preds = %for.body
%8 = load i32, i32* %i, align 4
%inc = add nsw i32 %8, 1
store i32 %inc, i32* %i, align 4
br label %for.cond
for.end: ; preds = %for.cond
br label %if.end
if.else: ; preds = %land.lhs.true, %entry
call void @printLine(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
br label %if.end
if.end: ; preds = %if.else, %for.end
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal i32 @goodB2GSource(i32 %data) #0 {
entry:
%data.addr = alloca i32, align 4
%inputBuffer = alloca [14 x i8], align 1
store i32 %data, i32* %data.addr, align 4
%0 = bitcast [14 x i8]* %inputBuffer to i8*
call void @llvm.memset.p0i8.i64(i8* align 1 %0, i8 0, i64 14, i1 false)
%arraydecay = getelementptr inbounds [14 x i8], [14 x i8]* %inputBuffer, i64 0, i64 0
%1 = load %struct._IO_FILE*, %struct._IO_FILE** @stdin, align 8
%call = call i8* @fgets(i8* %arraydecay, i32 14, %struct._IO_FILE* %1)
%cmp = icmp ne i8* %call, null
br i1 %cmp, label %if.then, label %if.else
if.then: ; preds = %entry
%arraydecay1 = getelementptr inbounds [14 x i8], [14 x i8]* %inputBuffer, i64 0, i64 0
%call2 = call i32 @atoi(i8* %arraydecay1) #4
store i32 %call2, i32* %data.addr, align 4
br label %if.end
if.else: ; preds = %entry
call void @printLine(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
br label %if.end
if.end: ; preds = %if.else, %if.then
%2 = load i32, i32* %data.addr, align 4
ret i32 %2
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B() #0 {
entry:
%data = alloca i32, align 4
%i = alloca i32, align 4
%buffer = alloca [10 x i32], align 16
store i32 -1, i32* %data, align 4
%0 = load i32, i32* %data, align 4
%call = call i32 @goodG2BSource(i32 %0)
store i32 %call, i32* %data, align 4
%1 = bitcast [10 x i32]* %buffer to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %1, i8 0, i64 40, i1 false)
%2 = load i32, i32* %data, align 4
%cmp = icmp sge i32 %2, 0
br i1 %cmp, label %if.then, label %if.else
if.then: ; preds = %entry
%3 = load i32, i32* %data, align 4
%idxprom = sext i32 %3 to i64
%arrayidx = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom
store i32 1, i32* %arrayidx, align 4
store i32 0, i32* %i, align 4
br label %for.cond
for.cond: ; preds = %for.inc, %if.then
%4 = load i32, i32* %i, align 4
%cmp1 = icmp slt i32 %4, 10
br i1 %cmp1, label %for.body, label %for.end
for.body: ; preds = %for.cond
%5 = load i32, i32* %i, align 4
%idxprom2 = sext i32 %5 to i64
%arrayidx3 = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom2
%6 = load i32, i32* %arrayidx3, align 4
call void @printIntLine(i32 %6)
br label %for.inc
for.inc: ; preds = %for.body
%7 = load i32, i32* %i, align 4
%inc = add nsw i32 %7, 1
store i32 %inc, i32* %i, align 4
br label %for.cond
for.end: ; preds = %for.cond
br label %if.end
if.else: ; preds = %entry
call void @printLine(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %if.end
if.end: ; preds = %if.else, %for.end
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal i32 @goodG2BSource(i32 %data) #0 {
entry:
%data.addr = alloca i32, align 4
store i32 %data, i32* %data.addr, align 4
store i32 7, i32* %data.addr, align 4
%0 = load i32, i32* %data.addr, align 4
ret i32 %0
}
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" }
attributes #1 = { argmemonly nounwind willreturn writeonly }
attributes #2 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #3 = { nounwind readonly "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #4 = { nounwind readonly }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
ret i64 16, !insn.addr !1
}
define i64 @function_30(i64 %arg1, i64 %arg2, i64 %arg3, i64 %arg4) local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%1 = alloca i1
%.reg2mem = alloca i64, !insn.addr !2
%2 = load i64, i64* %0
%3 = load i64, i64* %0
%rax = alloca i64, align 8
%4 = load i64, i64* %0
%5 = load i1, i1* %1
%6 = bitcast i64* %rax to i8*
%7 = trunc i64 %4 to i8
%8 = zext i1 %5 to i8, !insn.addr !2
%9 = mul i8 %7, 2, !insn.addr !2
%10 = or i8 %9, %8, !insn.addr !2
%11 = inttoptr i64 %4 to i8*, !insn.addr !2
store i8 %10, i8* %11, align 1, !insn.addr !2
%12 = load i8, i8* %6, align 8, !insn.addr !3
%13 = load i64, i64* %rax, align 8
%14 = trunc i64 %13 to i8, !insn.addr !3
%15 = add i8 %12, %14, !insn.addr !3
%16 = inttoptr i64 %13 to i8*, !insn.addr !3
store i8 %15, i8* %16, align 1, !insn.addr !3
%17 = load i64, i64* %rax, align 8, !insn.addr !4
%18 = udiv i64 %17, %arg4
%19 = mul i64 %18, 16, !insn.addr !5
%20 = sub i64 %3, %19, !insn.addr !6
%21 = add i64 %20, 15, !insn.addr !7
%22 = and i64 %21, -16, !insn.addr !8
%23 = add i64 %2, -32, !insn.addr !9
%24 = inttoptr i64 %23 to i64*, !insn.addr !9
store i64 %22, i64* %24, align 8, !insn.addr !9
%25 = add i64 %20, -17, !insn.addr !10
%26 = and i64 %25, -16, !insn.addr !11
%27 = add i64 %2, -24, !insn.addr !12
%28 = inttoptr i64 %27 to i64*, !insn.addr !12
store i64 %26, i64* %28, align 8, !insn.addr !12
%29 = load i64, i64* %24, align 8, !insn.addr !13
%30 = add i64 %2, -16, !insn.addr !14
%31 = inttoptr i64 %30 to i64*, !insn.addr !14
store i64 %29, i64* %31, align 8, !insn.addr !14
%32 = inttoptr i64 %29 to i8*, !insn.addr !15
store i8 0, i8* %32, align 1, !insn.addr !15
%33 = add i64 %2, -8, !insn.addr !16
%34 = inttoptr i64 %33 to i64*, !insn.addr !16
%35 = load i64, i64* %34, align 8, !insn.addr !16
%36 = call i64 @__readfsqword(i64 40), !insn.addr !17
%37 = xor i64 %36, %35, !insn.addr !17
%38 = icmp eq i64 %37, 0, !insn.addr !17
store i64 %37, i64* %rax, align 8, !insn.addr !17
store i64 0, i64* %.reg2mem, !insn.addr !18
br i1 %38, label %dec_label_pc_bb, label %dec_label_pc_b6, !insn.addr !18
dec_label_pc_b6: ; preds = %dec_label_pc_30
%39 = call i64 @__stack_chk_fail(), !insn.addr !19
store i64 %39, i64* %rax, align 8, !insn.addr !19
store i64 %39, i64* %.reg2mem, !insn.addr !19
br label %dec_label_pc_bb, !insn.addr !19
dec_label_pc_bb: ; preds = %dec_label_pc_b6, %dec_label_pc_30
%.reload = load i64, i64* %.reg2mem, !insn.addr !20
ret i64 %.reload, !insn.addr !20
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_bd:
%rax.0.reg2mem = alloca i64, !insn.addr !21
%stack_var_-56 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-56 to i64, !insn.addr !22
%1 = call i64 @__readfsqword(i64 40), !insn.addr !23
%2 = add i64 %0, -49, !insn.addr !24
%3 = and i64 %2, -16, !insn.addr !25
%4 = inttoptr i64 %3 to i8*, !insn.addr !26
store i8 0, i8* %4, align 16, !insn.addr !26
%5 = call i64 @__readfsqword(i64 40), !insn.addr !27
%6 = icmp eq i64 %1, %5, !insn.addr !27
store i64 0, i64* %rax.0.reg2mem, !insn.addr !28
br i1 %6, label %dec_label_pc_178, label %dec_label_pc_173, !insn.addr !28
dec_label_pc_173: ; preds = %dec_label_pc_bd
%7 = call i64 @__stack_chk_fail(), !insn.addr !29
store i64 %7, i64* %rax.0.reg2mem, !insn.addr !29
br label %dec_label_pc_178, !insn.addr !29
dec_label_pc_178: ; preds = %dec_label_pc_173, %dec_label_pc_bd
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !30
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_loop_65_good() local_unnamed_addr {
dec_label_pc_17a:
%0 = call i64 @goodG2B(), !insn.addr !31
ret i64 %0, !insn.addr !32
}
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 8}
!1 = !{i64 34}
!2 = !{i64 48}
!3 = !{i64 50}
!4 = !{i64 57}
!5 = !{i64 60}
!6 = !{i64 64}
!7 = !{i64 70}
!8 = !{i64 74}
!9 = !{i64 82}
!10 = !{i64 122}
!11 = !{i64 126}
!12 = !{i64 134}
!13 = !{i64 138}
!14 = !{i64 142}
!15 = !{i64 150}
!16 = !{i64 167}
!17 = !{i64 171}
!18 = !{i64 180}
!19 = !{i64 182}
!20 = !{i64 188}
!21 = !{i64 189}
!22 = !{i64 193}
!23 = !{i64 197}
!24 = !{i64 311}
!25 = !{i64 315}
!26 = !{i64 339}
!27 = !{i64 360}
!28 = !{i64 369}
!29 = !{i64 371}
!30 = !{i64 377}
!31 = !{i64 387}
!32 = !{i64 394}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_loop_65_bad() #0 {
entry:
%data = alloca i8*, align 8
%funcPtr = alloca void (i8*)*, align 8
%dataBadBuffer = alloca i8*, align 8
%dataGoodBuffer = alloca i8*, align 8
store void (i8*)* @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_loop_65b_badSink, void (i8*)** %funcPtr, align 8
%0 = alloca i8, i64 10, align 16
store i8* %0, i8** %dataBadBuffer, align 8
%1 = alloca i8, i64 11, align 16
store i8* %1, i8** %dataGoodBuffer, align 8
%2 = load i8*, i8** %dataBadBuffer, align 8
store i8* %2, i8** %data, align 8
%3 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %3, i64 0
store i8 0, i8* %arrayidx, align 1
%4 = load void (i8*)*, void (i8*)** %funcPtr, align 8
%5 = load i8*, i8** %data, align 8
call void %4(i8* %5)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_loop_65b_badSink(i8*) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_loop_65_good() #0 {
entry:
call void @goodG2B()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B() #0 {
entry:
%data = alloca i8*, align 8
%funcPtr = alloca void (i8*)*, align 8
%dataBadBuffer = alloca i8*, align 8
%dataGoodBuffer = alloca i8*, align 8
store void (i8*)* @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_loop_65b_goodG2BSink, void (i8*)** %funcPtr, align 8
%0 = alloca i8, i64 10, align 16
store i8* %0, i8** %dataBadBuffer, align 8
%1 = alloca i8, i64 11, align 16
store i8* %1, i8** %dataGoodBuffer, align 8
%2 = load i8*, i8** %dataGoodBuffer, align 8
store i8* %2, i8** %data, align 8
%3 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %3, i64 0
store i8 0, i8* %arrayidx, align 1
%4 = load void (i8*)*, void (i8*)** %funcPtr, align 8
%5 = load i8*, i8** %data, align 8
call void %4(i8* %5)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_loop_65b_goodG2BSink(i8*) #1
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" }
attributes #1 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_37d = constant [21 x i8] c"Benign, fixed string\00"
@global_var_450 = local_unnamed_addr global i32 0
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
ret i64 40, !insn.addr !1
}
define i64 @function_31() local_unnamed_addr {
dec_label_pc_31:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !2
%.lcssa.reg2mem = alloca i64, !insn.addr !2
%rcx.0.lcssa.reg2mem = alloca i64, !insn.addr !2
%rdx.0.lcssa.reg2mem = alloca i64, !insn.addr !2
%storemerge1.reg2mem = alloca i64, !insn.addr !2
%.reg2mem = alloca i64, !insn.addr !2
%.pre-phi7.reg2mem = alloca i64*, !insn.addr !2
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = load i64, i64* %0
%4 = load i64, i64* %0
%5 = mul i64 %4, 16, !insn.addr !2
%6 = sub i64 %3, %5, !insn.addr !3
%7 = add i64 %6, 15, !insn.addr !4
%8 = and i64 %7, -16, !insn.addr !5
%9 = add i64 %2, -48, !insn.addr !6
%10 = inttoptr i64 %9 to i64*, !insn.addr !6
store i64 %8, i64* %10, align 8, !insn.addr !6
%11 = add i64 %6, -17, !insn.addr !7
%12 = and i64 %11, -16, !insn.addr !8
%13 = add i64 %2, -40, !insn.addr !9
%14 = inttoptr i64 %13 to i64*, !insn.addr !9
store i64 %12, i64* %14, align 8, !insn.addr !9
%15 = load i32, i32* @global_var_450, align 4, !insn.addr !10
%16 = icmp eq i32 %15, 5, !insn.addr !11
%17 = icmp eq i1 %16, false, !insn.addr !12
br i1 %17, label %dec_label_pc_31.dec_label_pc_99_crit_edge, label %dec_label_pc_8a, !insn.addr !12
dec_label_pc_31.dec_label_pc_99_crit_edge: ; preds = %dec_label_pc_31
%.pre = add i64 %2, -64
%.pre6 = inttoptr i64 %.pre to i64*
store i64* %.pre6, i64** %.pre-phi7.reg2mem
br label %dec_label_pc_99
dec_label_pc_8a: ; preds = %dec_label_pc_31
%18 = load i64, i64* %10, align 8, !insn.addr !13
%19 = add i64 %2, -64
%20 = inttoptr i64 %19 to i64*
store i64 %18, i64* %20, align 8, !insn.addr !14
%21 = inttoptr i64 %18 to i8*, !insn.addr !15
store i8 0, i8* %21, align 1, !insn.addr !15
store i64* %20, i64** %.pre-phi7.reg2mem, !insn.addr !15
br label %dec_label_pc_99, !insn.addr !15
dec_label_pc_99: ; preds = %dec_label_pc_31.dec_label_pc_99_crit_edge, %dec_label_pc_8a
%.pre-phi7.reload = load i64*, i64** %.pre-phi7.reg2mem
%22 = add i64 %2, -19, !insn.addr !16
%23 = inttoptr i64 %22 to i64*, !insn.addr !16
store i64 4702111234474983745, i64* %23, align 8, !insn.addr !16
%24 = add i64 %2, -11, !insn.addr !17
%25 = inttoptr i64 %24 to i16*, !insn.addr !17
store i16 16705, i16* %25, align 2, !insn.addr !17
%26 = add i64 %2, -9, !insn.addr !18
%27 = inttoptr i64 %26 to i8*, !insn.addr !18
store i8 0, i8* %27, align 1, !insn.addr !18
%28 = call i64 @strlen(i64 %22, i64 %1, i128 9, i64 16), !insn.addr !19
%29 = add i64 %2, -32, !insn.addr !20
%30 = inttoptr i64 %29 to i64*, !insn.addr !20
store i64 %28, i64* %30, align 8, !insn.addr !20
%31 = add i64 %2, -56, !insn.addr !21
%32 = inttoptr i64 %31 to i64*, !insn.addr !21
store i64 0, i64* %32, align 8
%33 = load i64, i64* %30, align 8, !insn.addr !22
%34 = icmp eq i64 %33, -1, !insn.addr !23
%35 = load i64, i64* %.pre-phi7.reload, align 8
store i64 %35, i64* %.reg2mem, !insn.addr !24
store i64 0, i64* %storemerge1.reg2mem, !insn.addr !24
store i64 9, i64* %rdx.0.lcssa.reg2mem, !insn.addr !24
store i64 16, i64* %rcx.0.lcssa.reg2mem, !insn.addr !24
store i64 %35, i64* %.lcssa.reg2mem, !insn.addr !24
br i1 %34, label %dec_label_pc_f9, label %dec_label_pc_cb, !insn.addr !24
dec_label_pc_cb: ; preds = %dec_label_pc_99, %dec_label_pc_cb
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%.reload = load i64, i64* %.reg2mem
%36 = add i64 %storemerge1.reload, %.reload, !insn.addr !25
%37 = add i64 %storemerge1.reload, %22, !insn.addr !26
%38 = inttoptr i64 %37 to i8*, !insn.addr !27
%39 = load i8, i8* %38, align 1, !insn.addr !27
%40 = inttoptr i64 %36 to i8*, !insn.addr !28
store i8 %39, i8* %40, align 1, !insn.addr !28
%41 = load i64, i64* %32, align 8, !insn.addr !29
%42 = add i64 %41, 1, !insn.addr !29
store i64 %42, i64* %32, align 8
%43 = load i64, i64* %30, align 8, !insn.addr !22
%44 = add i64 %43, 1, !insn.addr !30
%45 = icmp ult i64 %42, %44, !insn.addr !23
%46 = load i64, i64* %.pre-phi7.reload, align 8
store i64 %46, i64* %.reg2mem, !insn.addr !24
store i64 %42, i64* %storemerge1.reg2mem, !insn.addr !24
store i64 %36, i64* %rdx.0.lcssa.reg2mem, !insn.addr !24
store i64 %22, i64* %rcx.0.lcssa.reg2mem, !insn.addr !24
store i64 %46, i64* %.lcssa.reg2mem, !insn.addr !24
br i1 %45, label %dec_label_pc_cb, label %dec_label_pc_f9, !insn.addr !24
dec_label_pc_f9: ; preds = %dec_label_pc_cb, %dec_label_pc_99
%.lcssa.reload = load i64, i64* %.lcssa.reg2mem
%rcx.0.lcssa.reload = load i64, i64* %rcx.0.lcssa.reg2mem
%rdx.0.lcssa.reload = load i64, i64* %rdx.0.lcssa.reg2mem
%47 = call i64 @printLine(i64 %.lcssa.reload, i64 %1, i64 %rdx.0.lcssa.reload, i64 %rcx.0.lcssa.reload), !insn.addr !31
%48 = add i64 %2, -8, !insn.addr !32
%49 = inttoptr i64 %48 to i64*, !insn.addr !32
%50 = load i64, i64* %49, align 8, !insn.addr !32
%51 = call i64 @__readfsqword(i64 40), !insn.addr !33
%52 = icmp eq i64 %50, %51, !insn.addr !33
store i64 0, i64* %rax.0.reg2mem, !insn.addr !34
br i1 %52, label %dec_label_pc_11a, label %dec_label_pc_115, !insn.addr !34
dec_label_pc_115: ; preds = %dec_label_pc_f9
%53 = call i64 @__stack_chk_fail(), !insn.addr !35
store i64 %53, i64* %rax.0.reg2mem, !insn.addr !35
br label %dec_label_pc_11a, !insn.addr !35
dec_label_pc_11a: ; preds = %dec_label_pc_115, %dec_label_pc_f9
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !36
}
define i64 @goodG2B1() local_unnamed_addr {
dec_label_pc_11c:
%rax.0.reg2mem = alloca i64, !insn.addr !37
%.lcssa.reg2mem = alloca i64, !insn.addr !37
%rdx.0.lcssa.reg2mem = alloca i64, !insn.addr !37
%rcx.0.lcssa.reg2mem = alloca i64, !insn.addr !37
%storemerge3.reg2mem = alloca i64, !insn.addr !37
%.reg2mem = alloca i64, !insn.addr !37
%stack_var_-27 = alloca i64, align 8
%stack_var_-72 = alloca i8*, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !38
%1 = load i32, i32* @global_var_450, align 4, !insn.addr !39
%2 = icmp eq i32 %1, 5, !insn.addr !40
br i1 %2, label %dec_label_pc_1b4, label %dec_label_pc_1a6, !insn.addr !41
dec_label_pc_1a6: ; preds = %dec_label_pc_11c
%3 = call i64 @printLine(i64 ptrtoint ([21 x i8]* @global_var_37d to i64), i64 16, i64 9, i64 16), !insn.addr !42
br label %dec_label_pc_1c3, !insn.addr !43
dec_label_pc_1b4: ; preds = %dec_label_pc_11c
%4 = ptrtoint i8** %stack_var_-72 to i64, !insn.addr !44
%5 = add i64 %4, -49, !insn.addr !45
%6 = and i64 %5, -16, !insn.addr !46
%7 = inttoptr i64 %6 to i8*, !insn.addr !47
%8 = bitcast i8** %stack_var_-72 to i64*
store i64 %6, i64* %8, align 8
store i8 0, i8* %7, align 16, !insn.addr !48
br label %dec_label_pc_1c3, !insn.addr !48
dec_label_pc_1c3: ; preds = %dec_label_pc_1b4, %dec_label_pc_1a6
store i64 4702111234474983745, i64* %stack_var_-27, align 8, !insn.addr !49
%9 = ptrtoint i64* %stack_var_-27 to i64, !insn.addr !50
%10 = call i64 @strlen(i64 %9, i64 16, i128 9, i64 16), !insn.addr !51
%11 = add i64 %10, 1, !insn.addr !52
%12 = icmp eq i64 %11, 0, !insn.addr !53
%13 = load i8*, i8** %stack_var_-72, align 8
%14 = ptrtoint i8* %13 to i64
store i64 %14, i64* %.reg2mem, !insn.addr !54
store i64 0, i64* %storemerge3.reg2mem, !insn.addr !54
store i64 16, i64* %rcx.0.lcssa.reg2mem, !insn.addr !54
store i64 9, i64* %rdx.0.lcssa.reg2mem, !insn.addr !54
store i64 %14, i64* %.lcssa.reg2mem, !insn.addr !54
br i1 %12, label %dec_label_pc_223, label %dec_label_pc_1f5, !insn.addr !54
dec_label_pc_1f5: ; preds = %dec_label_pc_1c3, %dec_label_pc_1f5
%storemerge3.reload = load i64, i64* %storemerge3.reg2mem
%.reload = load i64, i64* %.reg2mem
%15 = add i64 %storemerge3.reload, %.reload, !insn.addr !55
%16 = add i64 %storemerge3.reload, %9, !insn.addr !56
%17 = inttoptr i64 %16 to i8*, !insn.addr !57
%18 = load i8, i8* %17, align 1, !insn.addr !57
%19 = inttoptr i64 %15 to i8*, !insn.addr !58
store i8 %18, i8* %19, align 1, !insn.addr !58
%20 = add nuw i64 %storemerge3.reload, 1, !insn.addr !59
%21 = load i8*, i8** %stack_var_-72, align 8
%22 = ptrtoint i8* %21 to i64
%exitcond = icmp eq i64 %20, %11
store i64 %22, i64* %.reg2mem, !insn.addr !54
store i64 %20, i64* %storemerge3.reg2mem, !insn.addr !54
store i64 %9, i64* %rcx.0.lcssa.reg2mem, !insn.addr !54
store i64 %15, i64* %rdx.0.lcssa.reg2mem, !insn.addr !54
store i64 %22, i64* %.lcssa.reg2mem, !insn.addr !54
br i1 %exitcond, label %dec_label_pc_223, label %dec_label_pc_1f5, !insn.addr !54
dec_label_pc_223: ; preds = %dec_label_pc_1f5, %dec_label_pc_1c3
%.lcssa.reload = load i64, i64* %.lcssa.reg2mem
%rdx.0.lcssa.reload = load i64, i64* %rdx.0.lcssa.reg2mem
%rcx.0.lcssa.reload = load i64, i64* %rcx.0.lcssa.reg2mem
%23 = call i64 @printLine(i64 %.lcssa.reload, i64 16, i64 %rdx.0.lcssa.reload, i64 %rcx.0.lcssa.reload), !insn.addr !60
%24 = call i64 @__readfsqword(i64 40), !insn.addr !61
%25 = icmp eq i64 %0, %24, !insn.addr !61
store i64 0, i64* %rax.0.reg2mem, !insn.addr !62
br i1 %25, label %dec_label_pc_244, label %dec_label_pc_23f, !insn.addr !62
dec_label_pc_23f: ; preds = %dec_label_pc_223
%26 = call i64 @__stack_chk_fail(), !insn.addr !63
store i64 %26, i64* %rax.0.reg2mem, !insn.addr !63
br label %dec_label_pc_244, !insn.addr !63
dec_label_pc_244: ; preds = %dec_label_pc_23f, %dec_label_pc_223
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !64
}
define i64 @goodG2B2() local_unnamed_addr {
dec_label_pc_246:
%rax.0.reg2mem = alloca i64, !insn.addr !65
%.lcssa.reg2mem = alloca i64, !insn.addr !65
%rdx.0.lcssa.reg2mem = alloca i64, !insn.addr !65
%rcx.0.lcssa.reg2mem = alloca i64, !insn.addr !65
%storemerge3.reg2mem = alloca i64, !insn.addr !65
%.reg2mem = alloca i64, !insn.addr !65
%stack_var_-27 = alloca i64, align 8
%stack_var_-72 = alloca i8*, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !66
%1 = load i32, i32* @global_var_450, align 4, !insn.addr !67
%2 = icmp eq i32 %1, 5, !insn.addr !68
%3 = icmp eq i1 %2, false, !insn.addr !69
br i1 %3, label %dec_label_pc_2df, label %dec_label_pc_2d0, !insn.addr !69
dec_label_pc_2d0: ; preds = %dec_label_pc_246
%4 = ptrtoint i8** %stack_var_-72 to i64, !insn.addr !70
%5 = add i64 %4, -49, !insn.addr !71
%6 = and i64 %5, -16, !insn.addr !72
%7 = inttoptr i64 %6 to i8*, !insn.addr !73
%8 = bitcast i8** %stack_var_-72 to i64*
store i64 %6, i64* %8, align 8
store i8 0, i8* %7, align 16, !insn.addr !74
br label %dec_label_pc_2df, !insn.addr !74
dec_label_pc_2df: ; preds = %dec_label_pc_2d0, %dec_label_pc_246
store i64 4702111234474983745, i64* %stack_var_-27, align 8, !insn.addr !75
%9 = ptrtoint i64* %stack_var_-27 to i64, !insn.addr !76
%10 = call i64 @strlen(i64 %9, i64 16, i128 9, i64 16), !insn.addr !77
%11 = add i64 %10, 1, !insn.addr !78
%12 = icmp eq i64 %11, 0, !insn.addr !79
%13 = load i8*, i8** %stack_var_-72, align 8
%14 = ptrtoint i8* %13 to i64
store i64 %14, i64* %.reg2mem, !insn.addr !80
store i64 0, i64* %storemerge3.reg2mem, !insn.addr !80
store i64 16, i64* %rcx.0.lcssa.reg2mem, !insn.addr !80
store i64 9, i64* %rdx.0.lcssa.reg2mem, !insn.addr !80
store i64 %14, i64* %.lcssa.reg2mem, !insn.addr !80
br i1 %12, label %dec_label_pc_33f, label %dec_label_pc_311, !insn.addr !80
dec_label_pc_311: ; preds = %dec_label_pc_2df, %dec_label_pc_311
%storemerge3.reload = load i64, i64* %storemerge3.reg2mem
%.reload = load i64, i64* %.reg2mem
%15 = add i64 %storemerge3.reload, %.reload, !insn.addr !81
%16 = add i64 %storemerge3.reload, %9, !insn.addr !82
%17 = inttoptr i64 %16 to i8*, !insn.addr !83
%18 = load i8, i8* %17, align 1, !insn.addr !83
%19 = inttoptr i64 %15 to i8*, !insn.addr !84
store i8 %18, i8* %19, align 1, !insn.addr !84
%20 = add nuw i64 %storemerge3.reload, 1, !insn.addr !85
%21 = load i8*, i8** %stack_var_-72, align 8
%22 = ptrtoint i8* %21 to i64
%exitcond = icmp eq i64 %20, %11
store i64 %22, i64* %.reg2mem, !insn.addr !80
store i64 %20, i64* %storemerge3.reg2mem, !insn.addr !80
store i64 %9, i64* %rcx.0.lcssa.reg2mem, !insn.addr !80
store i64 %15, i64* %rdx.0.lcssa.reg2mem, !insn.addr !80
store i64 %22, i64* %.lcssa.reg2mem, !insn.addr !80
br i1 %exitcond, label %dec_label_pc_33f, label %dec_label_pc_311, !insn.addr !80
dec_label_pc_33f: ; preds = %dec_label_pc_311, %dec_label_pc_2df
%.lcssa.reload = load i64, i64* %.lcssa.reg2mem
%rdx.0.lcssa.reload = load i64, i64* %rdx.0.lcssa.reg2mem
%rcx.0.lcssa.reload = load i64, i64* %rcx.0.lcssa.reg2mem
%23 = call i64 @printLine(i64 %.lcssa.reload, i64 16, i64 %rdx.0.lcssa.reload, i64 %rcx.0.lcssa.reload), !insn.addr !86
%24 = call i64 @__readfsqword(i64 40), !insn.addr !87
%25 = icmp eq i64 %0, %24, !insn.addr !87
store i64 0, i64* %rax.0.reg2mem, !insn.addr !88
br i1 %25, label %dec_label_pc_360, label %dec_label_pc_35b, !insn.addr !88
dec_label_pc_35b: ; preds = %dec_label_pc_33f
%26 = call i64 @__stack_chk_fail(), !insn.addr !89
store i64 %26, i64* %rax.0.reg2mem, !insn.addr !89
br label %dec_label_pc_360, !insn.addr !89
dec_label_pc_360: ; preds = %dec_label_pc_35b, %dec_label_pc_33f
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !90
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_loop_13_good() local_unnamed_addr {
dec_label_pc_362:
%0 = call i64 @goodG2B1(), !insn.addr !91
%1 = call i64 @goodG2B2(), !insn.addr !92
ret i64 %1, !insn.addr !93
}
declare i64 @strlen(i64, i64, i128, i64) local_unnamed_addr
declare i64 @printLine(i64, i64, i64, i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 8}
!1 = !{i64 32}
!2 = !{i64 49}
!3 = !{i64 53}
!4 = !{i64 59}
!5 = !{i64 63}
!6 = !{i64 71}
!7 = !{i64 111}
!8 = !{i64 115}
!9 = !{i64 123}
!10 = !{i64 127}
!11 = !{i64 133}
!12 = !{i64 136}
!13 = !{i64 138}
!14 = !{i64 142}
!15 = !{i64 150}
!16 = !{i64 163}
!17 = !{i64 167}
!18 = !{i64 173}
!19 = !{i64 184}
!20 = !{i64 189}
!21 = !{i64 193}
!22 = !{i64 235}
!23 = !{i64 243}
!24 = !{i64 247}
!25 = !{i64 211}
!26 = !{i64 222}
!27 = !{i64 225}
!28 = !{i64 228}
!29 = !{i64 230}
!30 = !{i64 239}
!31 = !{i64 256}
!32 = !{i64 262}
!33 = !{i64 266}
!34 = !{i64 275}
!35 = !{i64 277}
!36 = !{i64 283}
!37 = !{i64 284}
!38 = !{i64 292}
!39 = !{i64 411}
!40 = !{i64 417}
!41 = !{i64 420}
!42 = !{i64 429}
!43 = !{i64 434}
!44 = !{i64 288}
!45 = !{i64 395}
!46 = !{i64 399}
!47 = !{i64 407}
!48 = !{i64 448}
!49 = !{i64 461}
!50 = !{i64 479}
!51 = !{i64 482}
!52 = !{i64 537}
!53 = !{i64 541}
!54 = !{i64 545}
!55 = !{i64 509}
!56 = !{i64 520}
!57 = !{i64 523}
!58 = !{i64 526}
!59 = !{i64 528}
!60 = !{i64 554}
!61 = !{i64 564}
!62 = !{i64 573}
!63 = !{i64 575}
!64 = !{i64 581}
!65 = !{i64 582}
!66 = !{i64 590}
!67 = !{i64 709}
!68 = !{i64 715}
!69 = !{i64 718}
!70 = !{i64 586}
!71 = !{i64 693}
!72 = !{i64 697}
!73 = !{i64 705}
!74 = !{i64 732}
!75 = !{i64 745}
!76 = !{i64 763}
!77 = !{i64 766}
!78 = !{i64 821}
!79 = !{i64 825}
!80 = !{i64 829}
!81 = !{i64 793}
!82 = !{i64 804}
!83 = !{i64 807}
!84 = !{i64 810}
!85 = !{i64 812}
!86 = !{i64 838}
!87 = !{i64 848}
!88 = !{i64 857}
!89 = !{i64 859}
!90 = !{i64 865}
!91 = !{i64 875}
!92 = !{i64 885}
!93 = !{i64 892}
### Assistant: @GLOBAL_CONST_FIVE = external dso_local constant i32, align 4
@__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_loop_13_bad.source = private unnamed_addr constant [11 x i8] c"AAAAAAAAAA\00", align 1
@.str = private unnamed_addr constant [21 x i8] c"Benign, fixed string\00", align 1
@__const.goodG2B1.source = private unnamed_addr constant [11 x i8] c"AAAAAAAAAA\00", align 1
@__const.goodG2B2.source = private unnamed_addr constant [11 x i8] c"AAAAAAAAAA\00", align 1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_loop_13_bad() #0 {
entry:
%data = alloca i8*, align 8
%dataBadBuffer = alloca i8*, align 8
%dataGoodBuffer = alloca i8*, align 8
%source = alloca [11 x i8], align 1
%i = alloca i64, align 8
%sourceLen = alloca i64, align 8
%0 = alloca i8, i64 10, align 16
store i8* %0, i8** %dataBadBuffer, align 8
%1 = alloca i8, i64 11, align 16
store i8* %1, i8** %dataGoodBuffer, align 8
%2 = load i32, i32* @GLOBAL_CONST_FIVE, align 4
%cmp = icmp eq i32 %2, 5
br i1 %cmp, label %if.then, label %if.end
if.then: ; preds = %entry
%3 = load i8*, i8** %dataBadBuffer, align 8
store i8* %3, i8** %data, align 8
%4 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %4, i64 0
store i8 0, i8* %arrayidx, align 1
br label %if.end
if.end: ; preds = %if.then, %entry
%5 = bitcast [11 x i8]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %5, i8* align 1 getelementptr inbounds ([11 x i8], [11 x i8]* @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_loop_13_bad.source, i32 0, i32 0), i64 11, i1 false)
%arraydecay = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%call = call i64 @strlen(i8* %arraydecay) #4
store i64 %call, i64* %sourceLen, align 8
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %if.end
%6 = load i64, i64* %i, align 8
%7 = load i64, i64* %sourceLen, align 8
%add = add i64 %7, 1
%cmp1 = icmp ult i64 %6, %add
br i1 %cmp1, label %for.body, label %for.end
for.body: ; preds = %for.cond
%8 = load i64, i64* %i, align 8
%arrayidx2 = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 %8
%9 = load i8, i8* %arrayidx2, align 1
%10 = load i8*, i8** %data, align 8
%11 = load i64, i64* %i, align 8
%arrayidx3 = getelementptr inbounds i8, i8* %10, i64 %11
store i8 %9, i8* %arrayidx3, align 1
br label %for.inc
for.inc: ; preds = %for.body
%12 = load i64, i64* %i, align 8
%inc = add i64 %12, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%13 = load i8*, i8** %data, align 8
call void @printLine(i8* %13)
ret void
}
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #1
; Function Attrs: nounwind readonly
declare dso_local i64 @strlen(i8*) #2
declare dso_local void @printLine(i8*) #3
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_loop_13_good() #0 {
entry:
call void @goodG2B1()
call void @goodG2B2()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B1() #0 {
entry:
%data = alloca i8*, align 8
%dataBadBuffer = alloca i8*, align 8
%dataGoodBuffer = alloca i8*, align 8
%source = alloca [11 x i8], align 1
%i = alloca i64, align 8
%sourceLen = alloca i64, align 8
%0 = alloca i8, i64 10, align 16
store i8* %0, i8** %dataBadBuffer, align 8
%1 = alloca i8, i64 11, align 16
store i8* %1, i8** %dataGoodBuffer, align 8
%2 = load i32, i32* @GLOBAL_CONST_FIVE, align 4
%cmp = icmp ne i32 %2, 5
br i1 %cmp, label %if.then, label %if.else
if.then: ; preds = %entry
call void @printLine(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
br label %if.end
if.else: ; preds = %entry
%3 = load i8*, i8** %dataGoodBuffer, align 8
store i8* %3, i8** %data, align 8
%4 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %4, i64 0
store i8 0, i8* %arrayidx, align 1
br label %if.end
if.end: ; preds = %if.else, %if.then
%5 = bitcast [11 x i8]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %5, i8* align 1 getelementptr inbounds ([11 x i8], [11 x i8]* @__const.goodG2B1.source, i32 0, i32 0), i64 11, i1 false)
%arraydecay = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%call = call i64 @strlen(i8* %arraydecay) #4
store i64 %call, i64* %sourceLen, align 8
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %if.end
%6 = load i64, i64* %i, align 8
%7 = load i64, i64* %sourceLen, align 8
%add = add i64 %7, 1
%cmp1 = icmp ult i64 %6, %add
br i1 %cmp1, label %for.body, label %for.end
for.body: ; preds = %for.cond
%8 = load i64, i64* %i, align 8
%arrayidx2 = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 %8
%9 = load i8, i8* %arrayidx2, align 1
%10 = load i8*, i8** %data, align 8
%11 = load i64, i64* %i, align 8
%arrayidx3 = getelementptr inbounds i8, i8* %10, i64 %11
store i8 %9, i8* %arrayidx3, align 1
br label %for.inc
for.inc: ; preds = %for.body
%12 = load i64, i64* %i, align 8
%inc = add i64 %12, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%13 = load i8*, i8** %data, align 8
call void @printLine(i8* %13)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B2() #0 {
entry:
%data = alloca i8*, align 8
%dataBadBuffer = alloca i8*, align 8
%dataGoodBuffer = alloca i8*, align 8
%source = alloca [11 x i8], align 1
%i = alloca i64, align 8
%sourceLen = alloca i64, align 8
%0 = alloca i8, i64 10, align 16
store i8* %0, i8** %dataBadBuffer, align 8
%1 = alloca i8, i64 11, align 16
store i8* %1, i8** %dataGoodBuffer, align 8
%2 = load i32, i32* @GLOBAL_CONST_FIVE, align 4
%cmp = icmp eq i32 %2, 5
br i1 %cmp, label %if.then, label %if.end
if.then: ; preds = %entry
%3 = load i8*, i8** %dataGoodBuffer, align 8
store i8* %3, i8** %data, align 8
%4 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %4, i64 0
store i8 0, i8* %arrayidx, align 1
br label %if.end
if.end: ; preds = %if.then, %entry
%5 = bitcast [11 x i8]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %5, i8* align 1 getelementptr inbounds ([11 x i8], [11 x i8]* @__const.goodG2B2.source, i32 0, i32 0), i64 11, i1 false)
%arraydecay = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%call = call i64 @strlen(i8* %arraydecay) #4
store i64 %call, i64* %sourceLen, align 8
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %if.end
%6 = load i64, i64* %i, align 8
%7 = load i64, i64* %sourceLen, align 8
%add = add i64 %7, 1
%cmp1 = icmp ult i64 %6, %add
br i1 %cmp1, label %for.body, label %for.end
for.body: ; preds = %for.cond
%8 = load i64, i64* %i, align 8
%arrayidx2 = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 %8
%9 = load i8, i8* %arrayidx2, align 1
%10 = load i8*, i8** %data, align 8
%11 = load i64, i64* %i, align 8
%arrayidx3 = getelementptr inbounds i8, i8* %10, i64 %11
store i8 %9, i8* %arrayidx3, align 1
br label %for.inc
for.inc: ; preds = %for.body
%12 = load i64, i64* %i, align 8
%inc = add i64 %12, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%13 = load i8*, i8** %data, align 8
call void @printLine(i8* %13)
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" }
attributes #1 = { argmemonly nounwind willreturn }
attributes #2 = { nounwind readonly "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #3 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #4 = { nounwind readonly }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
define i64 @_GLOBAL_OFFSET_TABLE_.1(i64 %arg1) local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
ret i64 %arg1, !insn.addr !1
}
define i64 @function_30() local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !2
%storemerge1.reg2mem = alloca i64, !insn.addr !2
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = load i64, i64* %0
%4 = inttoptr i64 %1 to i64*, !insn.addr !2
%5 = call i64 @_ZNSt6vectorIPlSaIS0_EEixEm(i64* %4, i64 %2), !insn.addr !2
%6 = inttoptr i64 %5 to i64*, !insn.addr !3
%7 = load i64, i64* %6, align 8, !insn.addr !3
%8 = add i64 %3, -824, !insn.addr !4
%9 = inttoptr i64 %8 to i64*, !insn.addr !4
store i64 %7, i64* %9, align 8, !insn.addr !4
%10 = add i64 %3, -816, !insn.addr !5
%11 = inttoptr i64 %10 to i8*, !insn.addr !6
call void @__asm_rep_stosq_memset(i8* %11, i64 0, i64 100), !insn.addr !6
%12 = add i64 %3, -832, !insn.addr !7
%13 = inttoptr i64 %12 to i64*, !insn.addr !7
store i64 0, i64* %13, align 8
store i64 0, i64* %storemerge1.reg2mem
br label %dec_label_pc_6b
dec_label_pc_6b: ; preds = %dec_label_pc_30, %dec_label_pc_6b
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%14 = mul i64 %storemerge1.reload, 8, !insn.addr !8
%15 = load i64, i64* %9, align 8, !insn.addr !9
%16 = add i64 %15, %14, !insn.addr !10
%17 = add i64 %14, %10, !insn.addr !11
%18 = inttoptr i64 %17 to i64*, !insn.addr !11
%19 = load i64, i64* %18, align 8, !insn.addr !11
%20 = inttoptr i64 %16 to i64*, !insn.addr !12
store i64 %19, i64* %20, align 8, !insn.addr !12
%21 = load i64, i64* %13, align 8, !insn.addr !13
%22 = add i64 %21, 1, !insn.addr !13
store i64 %22, i64* %13, align 8
%23 = icmp ult i64 %22, 100
store i64 %22, i64* %storemerge1.reg2mem, !insn.addr !14
br i1 %23, label %dec_label_pc_6b, label %dec_label_pc_a0, !insn.addr !14
dec_label_pc_a0: ; preds = %dec_label_pc_6b
%24 = load i64, i64* %9, align 8, !insn.addr !15
%25 = inttoptr i64 %24 to i64*, !insn.addr !16
%26 = load i64, i64* %25, align 8, !insn.addr !16
%27 = call i64 @printLongLongLine(i64 %26), !insn.addr !17
%28 = add i64 %3, -8, !insn.addr !18
%29 = inttoptr i64 %28 to i64*, !insn.addr !18
%30 = load i64, i64* %29, align 8, !insn.addr !18
%31 = call i64 @__readfsqword(i64 40), !insn.addr !19
%32 = icmp eq i64 %30, %31, !insn.addr !19
store i64 0, i64* %rax.0.reg2mem, !insn.addr !20
br i1 %32, label %dec_label_pc_c7, label %dec_label_pc_c2, !insn.addr !20
dec_label_pc_c2: ; preds = %dec_label_pc_a0
%33 = call i64 @__stack_chk_fail(), !insn.addr !21
store i64 %33, i64* %rax.0.reg2mem, !insn.addr !21
br label %dec_label_pc_c7, !insn.addr !21
dec_label_pc_c7: ; preds = %dec_label_pc_c2, %dec_label_pc_a0
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !22
}
define i64 @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_7211goodG2BSinkESt6vectorIPlSaIS1_EE(i64 %arg1) local_unnamed_addr {
dec_label_pc_c9:
%rax.0.reg2mem = alloca i64, !insn.addr !23
%storemerge1.reg2mem = alloca i64, !insn.addr !23
%stack_var_-824 = alloca i64, align 8
%stack_var_-8 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !24
%1 = call i64 @__readfsqword(i64 40), !insn.addr !25
%2 = inttoptr i64 %arg1 to i64*, !insn.addr !26
%3 = call i64 @_ZNSt6vectorIPlSaIS0_EEixEm(i64* %2, i64 2), !insn.addr !26
%4 = inttoptr i64 %3 to i64*, !insn.addr !27
%5 = load i64, i64* %4, align 8, !insn.addr !27
%6 = bitcast i64* %stack_var_-824 to i8*, !insn.addr !28
call void @__asm_rep_stosq_memset(i8* nonnull %6, i64 0, i64 100), !insn.addr !28
%7 = add i64 %0, -816, !insn.addr !29
store i64 0, i64* %storemerge1.reg2mem
br label %dec_label_pc_134
dec_label_pc_134: ; preds = %dec_label_pc_134, %dec_label_pc_c9
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%8 = mul i64 %storemerge1.reload, 8, !insn.addr !30
%9 = add i64 %8, %5, !insn.addr !31
%10 = add i64 %7, %8, !insn.addr !29
%11 = inttoptr i64 %10 to i64*, !insn.addr !29
%12 = load i64, i64* %11, align 8, !insn.addr !29
%13 = inttoptr i64 %9 to i64*, !insn.addr !32
store i64 %12, i64* %13, align 8, !insn.addr !32
%14 = add nuw nsw i64 %storemerge1.reload, 1, !insn.addr !33
%exitcond = icmp eq i64 %14, 100
store i64 %14, i64* %storemerge1.reg2mem, !insn.addr !34
br i1 %exitcond, label %dec_label_pc_169, label %dec_label_pc_134, !insn.addr !34
dec_label_pc_169: ; preds = %dec_label_pc_134
%15 = inttoptr i64 %5 to i64*, !insn.addr !35
%16 = load i64, i64* %15, align 8, !insn.addr !35
%17 = call i64 @printLongLongLine(i64 %16), !insn.addr !36
%18 = call i64 @__readfsqword(i64 40), !insn.addr !37
%19 = icmp eq i64 %1, %18, !insn.addr !37
store i64 0, i64* %rax.0.reg2mem, !insn.addr !38
br i1 %19, label %dec_label_pc_190, label %dec_label_pc_18b, !insn.addr !38
dec_label_pc_18b: ; preds = %dec_label_pc_169
%20 = call i64 @__stack_chk_fail(), !insn.addr !39
store i64 %20, i64* %rax.0.reg2mem, !insn.addr !39
br label %dec_label_pc_190, !insn.addr !39
dec_label_pc_190: ; preds = %dec_label_pc_18b, %dec_label_pc_169
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !40
}
define i64 @_ZNSt6vectorIPlSaIS0_EEixEm(i64* %result, i64 %arg2) local_unnamed_addr {
dec_label_pc_194:
%0 = ptrtoint i64* %result to i64
%1 = mul i64 %arg2, 8, !insn.addr !41
%2 = add i64 %1, %0, !insn.addr !42
ret i64 %2, !insn.addr !43
}
declare i64 @printLongLongLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare void @__asm_rep_stosq_memset(i8*, i64, i64) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 18}
!1 = !{i64 33}
!2 = !{i64 48}
!3 = !{i64 53}
!4 = !{i64 56}
!5 = !{i64 63}
!6 = !{i64 83}
!7 = !{i64 86}
!8 = !{i64 114}
!9 = !{i64 122}
!10 = !{i64 129}
!11 = !{i64 139}
!12 = !{i64 147}
!13 = !{i64 150}
!14 = !{i64 105}
!15 = !{i64 160}
!16 = !{i64 167}
!17 = !{i64 173}
!18 = !{i64 179}
!19 = !{i64 183}
!20 = !{i64 192}
!21 = !{i64 194}
!22 = !{i64 200}
!23 = !{i64 201}
!24 = !{i64 202}
!25 = !{i64 219}
!26 = !{i64 249}
!27 = !{i64 254}
!28 = !{i64 284}
!29 = !{i64 340}
!30 = !{i64 315}
!31 = !{i64 330}
!32 = !{i64 348}
!33 = !{i64 351}
!34 = !{i64 306}
!35 = !{i64 368}
!36 = !{i64 374}
!37 = !{i64 384}
!38 = !{i64 393}
!39 = !{i64 395}
!40 = !{i64 401}
!41 = !{i64 427}
!42 = !{i64 431}
!43 = !{i64 435}
### Assistant: %"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl" }
%"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl" = type { %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data" = type { i64**, i64**, i64** }
$_ZNSt6vectorIPlSaIS0_EEixEm = comdat any
; Function Attrs: noinline optnone uwtable
define dso_local void @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_727badSinkESt6vectorIPlSaIS1_EE(%"class.std::vector"* %dataVector) #0 {
entry:
%data = alloca i64*, align 8
%source = alloca [100 x i64], align 16
%i = alloca i64, align 8
%call = call nonnull align 8 dereferenceable(8) i64** @_ZNSt6vectorIPlSaIS0_EEixEm(%"class.std::vector"* %dataVector, i64 2) #4
%0 = load i64*, i64** %call, align 8
store i64* %0, i64** %data, align 8
%1 = bitcast [100 x i64]* %source to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %1, i8 0, i64 800, i1 false)
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %entry
%2 = load i64, i64* %i, align 8
%cmp = icmp ult i64 %2, 100
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%3 = load i64, i64* %i, align 8
%arrayidx = getelementptr inbounds [100 x i64], [100 x i64]* %source, i64 0, i64 %3
%4 = load i64, i64* %arrayidx, align 8
%5 = load i64*, i64** %data, align 8
%6 = load i64, i64* %i, align 8
%arrayidx1 = getelementptr inbounds i64, i64* %5, i64 %6
store i64 %4, i64* %arrayidx1, align 8
br label %for.inc
for.inc: ; preds = %for.body
%7 = load i64, i64* %i, align 8
%inc = add i64 %7, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%8 = load i64*, i64** %data, align 8
%arrayidx2 = getelementptr inbounds i64, i64* %8, i64 0
%9 = load i64, i64* %arrayidx2, align 8
call void @printLongLongLine(i64 %9)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) i64** @_ZNSt6vectorIPlSaIS0_EEixEm(%"class.std::vector"* %this, i64 %__n) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::vector"*, align 8
%__n.addr = alloca i64, align 8
store %"class.std::vector"* %this, %"class.std::vector"** %this.addr, align 8
store i64 %__n, i64* %__n.addr, align 8
%this1 = load %"class.std::vector"*, %"class.std::vector"** %this.addr, align 8
%0 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%_M_impl = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %0, i32 0, i32 0
%1 = bitcast %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl"* %_M_impl to %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"*
%_M_start = getelementptr inbounds %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data", %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data"* %1, i32 0, i32 0
%2 = load i64**, i64*** %_M_start, align 8
%3 = load i64, i64* %__n.addr, align 8
%add.ptr = getelementptr inbounds i64*, i64** %2, i64 %3
ret i64** %add.ptr
}
; Function Attrs: argmemonly nounwind willreturn writeonly
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #2
declare dso_local void @printLongLongLine(i64) #3
; Function Attrs: noinline optnone uwtable
define dso_local void @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_7211goodG2BSinkESt6vectorIPlSaIS1_EE(%"class.std::vector"* %dataVector) #0 {
entry:
%data = alloca i64*, align 8
%source = alloca [100 x i64], align 16
%i = alloca i64, align 8
%call = call nonnull align 8 dereferenceable(8) i64** @_ZNSt6vectorIPlSaIS0_EEixEm(%"class.std::vector"* %dataVector, i64 2) #4
%0 = load i64*, i64** %call, align 8
store i64* %0, i64** %data, align 8
%1 = bitcast [100 x i64]* %source to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %1, i8 0, i64 800, i1 false)
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %entry
%2 = load i64, i64* %i, align 8
%cmp = icmp ult i64 %2, 100
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%3 = load i64, i64* %i, align 8
%arrayidx = getelementptr inbounds [100 x i64], [100 x i64]* %source, i64 0, i64 %3
%4 = load i64, i64* %arrayidx, align 8
%5 = load i64*, i64** %data, align 8
%6 = load i64, i64* %i, align 8
%arrayidx1 = getelementptr inbounds i64, i64* %5, i64 %6
store i64 %4, i64* %arrayidx1, align 8
br label %for.inc
for.inc: ; preds = %for.body
%7 = load i64, i64* %i, align 8
%inc = add i64 %7, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%8 = load i64*, i64** %data, align 8
%arrayidx2 = getelementptr inbounds i64, i64* %8, i64 0
%9 = load i64, i64* %arrayidx2, align 8
call void @printLongLongLine(i64 %9)
ret void
}
attributes #0 = { noinline 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" }
attributes #1 = { 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" }
attributes #2 = { argmemonly nounwind willreturn writeonly }
attributes #3 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_10 = constant [3 x i8] c"%(\00"
define i64 @_GLOBAL_OFFSET_TABLE_.1(i64 %arg1) local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
%1 = add i64 %arg1, ptrtoint ([3 x i8]* @global_var_10 to i64), !insn.addr !1
%2 = inttoptr i64 %1 to i64*, !insn.addr !1
%3 = load i64, i64* %2, align 8, !insn.addr !1
ret i64 %3, !insn.addr !2
}
define i64 @function_30() local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !3
%1 = load i64, i64* %0
%2 = add i64 %1, -19, !insn.addr !3
%3 = inttoptr i64 %2 to i64*, !insn.addr !3
%4 = add i64 %1, -11, !insn.addr !4
%5 = inttoptr i64 %4 to i16*, !insn.addr !4
store i16 16705, i16* %5, align 2, !insn.addr !4
%6 = add i64 %1, -9, !insn.addr !5
%7 = inttoptr i64 %6 to i8*, !insn.addr !5
store i8 0, i8* %7, align 1, !insn.addr !5
%8 = call i64 @strlen(i64 %2), !insn.addr !6
%9 = add i64 %8, 1, !insn.addr !7
%10 = add i64 %1, -32, !insn.addr !8
%11 = inttoptr i64 %10 to i64*, !insn.addr !8
%12 = load i64, i64* %11, align 8, !insn.addr !8
%13 = call i64 @memcpy(i64 %12, i64 %2, i64 %9, i64 %2), !insn.addr !9
%14 = load i64, i64* %11, align 8, !insn.addr !10
%15 = call i64 @printLine(i64 %14), !insn.addr !11
%16 = add i64 %1, -8, !insn.addr !12
%17 = inttoptr i64 %16 to i64*, !insn.addr !12
%18 = load i64, i64* %17, align 8, !insn.addr !12
%19 = call i64 @__readfsqword(i64 40), !insn.addr !13
%20 = icmp eq i64 %18, %19, !insn.addr !13
store i64 0, i64* %rax.0.reg2mem, !insn.addr !14
br i1 %20, label %dec_label_pc_83, label %dec_label_pc_7e, !insn.addr !14
dec_label_pc_7e: ; preds = %dec_label_pc_30
%21 = call i64 @__stack_chk_fail(), !insn.addr !15
store i64 %21, i64* %rax.0.reg2mem, !insn.addr !15
br label %dec_label_pc_83, !insn.addr !15
dec_label_pc_83: ; preds = %dec_label_pc_7e, %dec_label_pc_30
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !16
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memcpy_66b_goodG2BSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_85:
%rax.0.reg2mem = alloca i64, !insn.addr !17
%stack_var_-27 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !18
%1 = add i64 %arg1, ptrtoint ([3 x i8]* @global_var_10 to i64), !insn.addr !19
%2 = inttoptr i64 %1 to i64*, !insn.addr !19
%3 = load i64, i64* %2, align 8, !insn.addr !19
store i64 4702111234474983745, i64* %stack_var_-27, align 8, !insn.addr !20
%4 = ptrtoint i64* %stack_var_-27 to i64, !insn.addr !21
%5 = call i64 @strlen(i64 %4), !insn.addr !22
%6 = add i64 %5, 1, !insn.addr !23
%7 = call i64 @memcpy(i64 %3, i64 %4, i64 %6, i64 %4), !insn.addr !24
%8 = call i64 @printLine(i64 %3), !insn.addr !25
%9 = call i64 @__readfsqword(i64 40), !insn.addr !26
%10 = icmp eq i64 %0, %9, !insn.addr !26
store i64 0, i64* %rax.0.reg2mem, !insn.addr !27
br i1 %10, label %dec_label_pc_108, label %dec_label_pc_103, !insn.addr !27
dec_label_pc_103: ; preds = %dec_label_pc_85
%11 = call i64 @__stack_chk_fail(), !insn.addr !28
store i64 %11, i64* %rax.0.reg2mem, !insn.addr !28
br label %dec_label_pc_108, !insn.addr !28
dec_label_pc_108: ; preds = %dec_label_pc_103, %dec_label_pc_85
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !29
}
declare i64 @strlen(i64) local_unnamed_addr
declare i64 @memcpy(i64, i64, i64, i64) local_unnamed_addr
declare i64 @printLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 12}
!1 = !{i64 31}
!2 = !{i64 35}
!3 = !{i64 48}
!4 = !{i64 53}
!5 = !{i64 59}
!6 = !{i64 70}
!7 = !{i64 75}
!8 = !{i64 83}
!9 = !{i64 93}
!10 = !{i64 98}
!11 = !{i64 105}
!12 = !{i64 111}
!13 = !{i64 115}
!14 = !{i64 124}
!15 = !{i64 126}
!16 = !{i64 132}
!17 = !{i64 133}
!18 = !{i64 145}
!19 = !{i64 164}
!20 = !{i64 182}
!21 = !{i64 200}
!22 = !{i64 203}
!23 = !{i64 208}
!24 = !{i64 226}
!25 = !{i64 238}
!26 = !{i64 248}
!27 = !{i64 257}
!28 = !{i64 259}
!29 = !{i64 265}
### Assistant: @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memcpy_66b_badSink.source = private unnamed_addr constant [11 x i8] c"AAAAAAAAAA\00", align 1
@__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memcpy_66b_goodG2BSink.source = private unnamed_addr constant [11 x i8] c"AAAAAAAAAA\00", align 1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memcpy_66b_badSink(i8** %dataArray) #0 {
entry:
%dataArray.addr = alloca i8**, align 8
%data = alloca i8*, align 8
%source = alloca [11 x i8], align 1
store i8** %dataArray, i8*** %dataArray.addr, align 8
%0 = load i8**, i8*** %dataArray.addr, align 8
%arrayidx = getelementptr inbounds i8*, i8** %0, i64 2
%1 = load i8*, i8** %arrayidx, align 8
store i8* %1, i8** %data, align 8
%2 = bitcast [11 x i8]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %2, i8* align 1 getelementptr inbounds ([11 x i8], [11 x i8]* @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memcpy_66b_badSink.source, i32 0, i32 0), i64 11, i1 false)
%3 = load i8*, i8** %data, align 8
%arraydecay = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%arraydecay1 = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%call = call i64 @strlen(i8* %arraydecay1) #4
%add = add i64 %call, 1
%mul = mul i64 %add, 1
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %3, i8* align 1 %arraydecay, i64 %mul, i1 false)
%4 = load i8*, i8** %data, align 8
call void @printLine(i8* %4)
ret void
}
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #1
; Function Attrs: nounwind readonly
declare dso_local i64 @strlen(i8*) #2
declare dso_local void @printLine(i8*) #3
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memcpy_66b_goodG2BSink(i8** %dataArray) #0 {
entry:
%dataArray.addr = alloca i8**, align 8
%data = alloca i8*, align 8
%source = alloca [11 x i8], align 1
store i8** %dataArray, i8*** %dataArray.addr, align 8
%0 = load i8**, i8*** %dataArray.addr, align 8
%arrayidx = getelementptr inbounds i8*, i8** %0, i64 2
%1 = load i8*, i8** %arrayidx, align 8
store i8* %1, i8** %data, align 8
%2 = bitcast [11 x i8]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %2, i8* align 1 getelementptr inbounds ([11 x i8], [11 x i8]* @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memcpy_66b_goodG2BSink.source, i32 0, i32 0), i64 11, i1 false)
%3 = load i8*, i8** %data, align 8
%arraydecay = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%arraydecay1 = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%call = call i64 @strlen(i8* %arraydecay1) #4
%add = add i64 %call, 1
%mul = mul i64 %add, 1
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %3, i8* align 1 %arraydecay, i64 %mul, i1 false)
%4 = load i8*, i8** %data, align 8
call void @printLine(i8* %4)
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" }
attributes #1 = { argmemonly nounwind willreturn }
attributes #2 = { nounwind readonly "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #3 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #4 = { nounwind readonly }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_1d8 = constant [21 x i8] c"Benign, fixed string\00"
@global_var_1d4 = local_unnamed_addr global i32 1
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !0
%1 = load i64, i64* %0
%stack_var_-27 = alloca i64, align 8
%stack_var_-37 = alloca i64, align 8
%2 = call i64 @__readfsqword(i64 40), !insn.addr !1
%3 = load i32, i32* inttoptr (i64 468 to i32*), align 4, !insn.addr !2
%4 = icmp eq i32 %3, 0, !insn.addr !3
br i1 %4, label %dec_label_pc_30, label %dec_label_pc_21, !insn.addr !4
dec_label_pc_21: ; preds = %dec_label_pc_0
%5 = ptrtoint i64* %stack_var_-37 to i64, !insn.addr !5
ret i64 %5, !insn.addr !5
dec_label_pc_30: ; preds = %dec_label_pc_0
store i64 4702111234474983745, i64* %stack_var_-27, align 8, !insn.addr !6
%6 = call i64 @strlen(i64* nonnull %stack_var_-27), !insn.addr !7
%7 = add i64 %6, 1, !insn.addr !8
%8 = call i64 @strncpy(i64 %1, i64* nonnull %stack_var_-27, i64 %7, i64* nonnull %stack_var_-27), !insn.addr !9
%9 = call i64 @printLine(i64 %1), !insn.addr !10
%10 = call i64 @__readfsqword(i64 40), !insn.addr !11
%11 = icmp eq i64 %2, %10, !insn.addr !11
store i64 0, i64* %rax.0.reg2mem, !insn.addr !12
br i1 %11, label %dec_label_pc_8c, label %dec_label_pc_87, !insn.addr !12
dec_label_pc_87: ; preds = %dec_label_pc_30
%12 = call i64 @__stack_chk_fail(), !insn.addr !13
store i64 %12, i64* %rax.0.reg2mem, !insn.addr !13
br label %dec_label_pc_8c, !insn.addr !13
dec_label_pc_8c: ; preds = %dec_label_pc_87, %dec_label_pc_30
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !14
}
define i64 @goodG2B1() local_unnamed_addr {
dec_label_pc_8e:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !15
%stack_var_-27 = alloca i64, align 8
%1 = load i64, i64* %0
%2 = call i64 @__readfsqword(i64 40), !insn.addr !16
%3 = call i64 @printLine(i64 ptrtoint ([21 x i8]* @global_var_1d8 to i64)), !insn.addr !17
store i64 4702111234474983745, i64* %stack_var_-27, align 8, !insn.addr !18
%4 = call i64 @strlen(i64* nonnull %stack_var_-27), !insn.addr !19
%5 = add i64 %4, 1, !insn.addr !20
%6 = call i64 @strncpy(i64 %1, i64* nonnull %stack_var_-27, i64 %5, i64* nonnull %stack_var_-27), !insn.addr !21
%7 = call i64 @printLine(i64 %1), !insn.addr !22
%8 = call i64 @__readfsqword(i64 40), !insn.addr !23
%9 = icmp eq i64 %2, %8, !insn.addr !23
store i64 0, i64* %rax.0.reg2mem, !insn.addr !24
br i1 %9, label %dec_label_pc_128, label %dec_label_pc_123, !insn.addr !24
dec_label_pc_123: ; preds = %dec_label_pc_8e
%10 = call i64 @__stack_chk_fail(), !insn.addr !25
store i64 %10, i64* %rax.0.reg2mem, !insn.addr !25
br label %dec_label_pc_128, !insn.addr !25
dec_label_pc_128: ; preds = %dec_label_pc_123, %dec_label_pc_8e
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !26
}
define i64 @goodG2B2() local_unnamed_addr {
dec_label_pc_12a:
%rax.0.reg2mem = alloca i64, !insn.addr !27
%stack_var_-48.0.reg2mem = alloca i64, !insn.addr !27
%stack_var_-27 = alloca i64, align 8
%stack_var_-38 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !28
%1 = load i32, i32* @global_var_1d4, align 4, !insn.addr !29
%2 = icmp eq i32 %1, 0, !insn.addr !30
br i1 %2, label %dec_label_pc_15a, label %dec_label_pc_14b, !insn.addr !31
dec_label_pc_14b: ; preds = %dec_label_pc_12a
%3 = ptrtoint i64* %stack_var_-38 to i64, !insn.addr !32
%4 = bitcast i64* %stack_var_-38 to i8*, !insn.addr !33
store i8 0, i8* %4, align 8, !insn.addr !33
store i64 %3, i64* %stack_var_-48.0.reg2mem, !insn.addr !33
br label %dec_label_pc_15a, !insn.addr !33
dec_label_pc_15a: ; preds = %dec_label_pc_14b, %dec_label_pc_12a
%stack_var_-48.0.reload = load i64, i64* %stack_var_-48.0.reg2mem
store i64 4702111234474983745, i64* %stack_var_-27, align 8, !insn.addr !34
%5 = call i64 @strlen(i64* nonnull %stack_var_-27), !insn.addr !35
%6 = add i64 %5, 1, !insn.addr !36
%7 = call i64 @strncpy(i64 %stack_var_-48.0.reload, i64* nonnull %stack_var_-27, i64 %6, i64* nonnull %stack_var_-27), !insn.addr !37
%8 = call i64 @printLine(i64 %stack_var_-48.0.reload), !insn.addr !38
%9 = call i64 @__readfsqword(i64 40), !insn.addr !39
%10 = icmp eq i64 %0, %9, !insn.addr !39
store i64 0, i64* %rax.0.reg2mem, !insn.addr !40
br i1 %10, label %dec_label_pc_1b6, label %dec_label_pc_1b1, !insn.addr !40
dec_label_pc_1b1: ; preds = %dec_label_pc_15a
%11 = call i64 @__stack_chk_fail(), !insn.addr !41
store i64 %11, i64* %rax.0.reg2mem, !insn.addr !41
br label %dec_label_pc_1b6, !insn.addr !41
dec_label_pc_1b6: ; preds = %dec_label_pc_1b1, %dec_label_pc_15a
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !42
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_ncpy_05_good() local_unnamed_addr {
dec_label_pc_1b8:
%0 = call i64 @goodG2B1(), !insn.addr !43
%1 = call i64 @goodG2B2(), !insn.addr !44
ret i64 %1, !insn.addr !45
}
declare i64 @strlen(i64*) local_unnamed_addr
declare i64 @strncpy(i64, i64*, i64, i64*) local_unnamed_addr
declare i64 @printLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 0}
!1 = !{i64 8}
!2 = !{i64 23}
!3 = !{i64 29}
!4 = !{i64 31}
!5 = !{i64 33}
!6 = !{i64 58}
!7 = !{i64 79}
!8 = !{i64 84}
!9 = !{i64 102}
!10 = !{i64 114}
!11 = !{i64 124}
!12 = !{i64 133}
!13 = !{i64 135}
!14 = !{i64 141}
!15 = !{i64 142}
!16 = !{i64 150}
!17 = !{i64 182}
!18 = !{i64 214}
!19 = !{i64 235}
!20 = !{i64 240}
!21 = !{i64 258}
!22 = !{i64 270}
!23 = !{i64 280}
!24 = !{i64 289}
!25 = !{i64 291}
!26 = !{i64 297}
!27 = !{i64 298}
!28 = !{i64 306}
!29 = !{i64 321}
!30 = !{i64 327}
!31 = !{i64 329}
!32 = !{i64 335}
!33 = !{i64 343}
!34 = !{i64 356}
!35 = !{i64 377}
!36 = !{i64 382}
!37 = !{i64 400}
!38 = !{i64 412}
!39 = !{i64 422}
!40 = !{i64 431}
!41 = !{i64 433}
!42 = !{i64 439}
!43 = !{i64 449}
!44 = !{i64 459}
!45 = !{i64 466}
### Assistant: @staticTrue = internal global i32 1, align 4
@__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_ncpy_05_bad.source = private unnamed_addr constant [11 x i8] c"AAAAAAAAAA\00", align 1
@staticFalse = internal global i32 0, align 4
@.str = private unnamed_addr constant [21 x i8] c"Benign, fixed string\00", align 1
@__const.goodG2B1.source = private unnamed_addr constant [11 x i8] c"AAAAAAAAAA\00", align 1
@__const.goodG2B2.source = private unnamed_addr constant [11 x i8] c"AAAAAAAAAA\00", align 1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_ncpy_05_bad() #0 {
entry:
%data = alloca i8*, align 8
%dataBadBuffer = alloca [10 x i8], align 1
%dataGoodBuffer = alloca [11 x i8], align 1
%source = alloca [11 x i8], align 1
%0 = load i32, i32* @staticTrue, align 4
%tobool = icmp ne i32 %0, 0
br i1 %tobool, label %if.then, label %if.end
if.then: ; preds = %entry
%arraydecay = getelementptr inbounds [10 x i8], [10 x i8]* %dataBadBuffer, i64 0, i64 0
store i8* %arraydecay, i8** %data, align 8
%1 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %1, i64 0
store i8 0, i8* %arrayidx, align 1
br label %if.end
if.end: ; preds = %if.then, %entry
%2 = bitcast [11 x i8]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %2, i8* align 1 getelementptr inbounds ([11 x i8], [11 x i8]* @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_ncpy_05_bad.source, i32 0, i32 0), i64 11, i1 false)
%3 = load i8*, i8** %data, align 8
%arraydecay1 = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%arraydecay2 = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%call = call i64 @strlen(i8* %arraydecay2) #5
%add = add i64 %call, 1
%call3 = call i8* @strncpy(i8* %3, i8* %arraydecay1, i64 %add) #6
%4 = load i8*, i8** %data, align 8
call void @printLine(i8* %4)
ret void
}
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #1
; Function Attrs: nounwind
declare dso_local i8* @strncpy(i8*, i8*, i64) #2
; Function Attrs: nounwind readonly
declare dso_local i64 @strlen(i8*) #3
declare dso_local void @printLine(i8*) #4
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_ncpy_05_good() #0 {
entry:
call void @goodG2B1()
call void @goodG2B2()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B1() #0 {
entry:
%data = alloca i8*, align 8
%dataBadBuffer = alloca [10 x i8], align 1
%dataGoodBuffer = alloca [11 x i8], align 1
%source = alloca [11 x i8], align 1
%0 = load i32, i32* @staticFalse, align 4
%tobool = icmp ne i32 %0, 0
br i1 %tobool, label %if.then, label %if.else
if.then: ; preds = %entry
call void @printLine(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
br label %if.end
if.else: ; preds = %entry
%arraydecay = getelementptr inbounds [11 x i8], [11 x i8]* %dataGoodBuffer, i64 0, i64 0
store i8* %arraydecay, i8** %data, align 8
%1 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %1, i64 0
store i8 0, i8* %arrayidx, align 1
br label %if.end
if.end: ; preds = %if.else, %if.then
%2 = bitcast [11 x i8]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %2, i8* align 1 getelementptr inbounds ([11 x i8], [11 x i8]* @__const.goodG2B1.source, i32 0, i32 0), i64 11, i1 false)
%3 = load i8*, i8** %data, align 8
%arraydecay1 = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%arraydecay2 = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%call = call i64 @strlen(i8* %arraydecay2) #5
%add = add i64 %call, 1
%call3 = call i8* @strncpy(i8* %3, i8* %arraydecay1, i64 %add) #6
%4 = load i8*, i8** %data, align 8
call void @printLine(i8* %4)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B2() #0 {
entry:
%data = alloca i8*, align 8
%dataBadBuffer = alloca [10 x i8], align 1
%dataGoodBuffer = alloca [11 x i8], align 1
%source = alloca [11 x i8], align 1
%0 = load i32, i32* @staticTrue, align 4
%tobool = icmp ne i32 %0, 0
br i1 %tobool, label %if.then, label %if.end
if.then: ; preds = %entry
%arraydecay = getelementptr inbounds [11 x i8], [11 x i8]* %dataGoodBuffer, i64 0, i64 0
store i8* %arraydecay, i8** %data, align 8
%1 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %1, i64 0
store i8 0, i8* %arrayidx, align 1
br label %if.end
if.end: ; preds = %if.then, %entry
%2 = bitcast [11 x i8]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %2, i8* align 1 getelementptr inbounds ([11 x i8], [11 x i8]* @__const.goodG2B2.source, i32 0, i32 0), i64 11, i1 false)
%3 = load i8*, i8** %data, align 8
%arraydecay1 = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%arraydecay2 = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%call = call i64 @strlen(i8* %arraydecay2) #5
%add = add i64 %call, 1
%call3 = call i8* @strncpy(i8* %3, i8* %arraydecay1, i64 %add) #6
%4 = load i8*, i8** %data, align 8
call void @printLine(i8* %4)
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" }
attributes #1 = { argmemonly nounwind willreturn }
attributes #2 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #3 = { nounwind readonly "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #4 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #5 = { nounwind readonly }
attributes #6 = { nounwind }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_1c8 = local_unnamed_addr constant [11 x i32] %wide-string
@global_var_1d0 = local_unnamed_addr constant [9 x i32] %wide-string
@global_var_1d8 = local_unnamed_addr constant [7 x i32] %wide-string
@global_var_1e0 = local_unnamed_addr constant [5 x i32] %wide-string
@global_var_1e8 = local_unnamed_addr constant [3 x i32] %wide-string
define i64 @_GLOBAL_OFFSET_TABLE_.1(i64 %arg1) local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
ret i64 %arg1, !insn.addr !1
}
define i64 @function_30() local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !2
%storemerge1.reg2mem = alloca i64, !insn.addr !2
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = trunc i64 %2 to i32, !insn.addr !2
%4 = add i64 %1, -80, !insn.addr !2
%5 = inttoptr i64 %4 to i32*, !insn.addr !2
store i32 %3, i32* %5, align 4, !insn.addr !2
%6 = add i64 %1, -64, !insn.addr !3
%7 = inttoptr i64 %6 to i64*, !insn.addr !3
store i64 279172874305, i64* %7, align 8, !insn.addr !3
%8 = add i64 %1, -56, !insn.addr !4
%9 = inttoptr i64 %8 to i64*, !insn.addr !4
store i64 279172874305, i64* %9, align 8, !insn.addr !4
%10 = add i64 %1, -48, !insn.addr !5
%11 = inttoptr i64 %10 to i64*, !insn.addr !5
store i64 279172874305, i64* %11, align 8, !insn.addr !5
%12 = add i64 %1, -40, !insn.addr !6
%13 = inttoptr i64 %12 to i64*, !insn.addr !6
store i64 279172874305, i64* %13, align 8, !insn.addr !6
%14 = add i64 %1, -32, !insn.addr !7
%15 = inttoptr i64 %14 to i64*, !insn.addr !7
store i64 279172874305, i64* %15, align 8, !insn.addr !7
%16 = load i32, i32* inttoptr (i64 496 to i32*), align 16, !insn.addr !8
%17 = add i64 %1, -24, !insn.addr !9
%18 = inttoptr i64 %17 to i32*, !insn.addr !9
store i32 %16, i32* %18, align 4, !insn.addr !9
%19 = call i64 @wcslen(i64 %6), !insn.addr !10
%20 = add i64 %1, -72, !insn.addr !11
%21 = inttoptr i64 %20 to i64*, !insn.addr !11
store i64 %19, i64* %21, align 8, !insn.addr !11
%22 = add i64 %1, -88, !insn.addr !12
%23 = inttoptr i64 %22 to i64*, !insn.addr !12
store i64 0, i64* %23, align 8
%24 = load i64, i64* %21, align 8, !insn.addr !13
%25 = icmp ne i64 %24, -1, !insn.addr !14
%26 = icmp eq i1 %25, false, !insn.addr !15
%.pre = inttoptr i64 %4 to i64*
store i64 0, i64* %storemerge1.reg2mem, !insn.addr !15
br i1 %26, label %dec_label_pc_bd, label %dec_label_pc_99, !insn.addr !15
dec_label_pc_99: ; preds = %dec_label_pc_30, %dec_label_pc_99
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%27 = mul i64 %storemerge1.reload, 4, !insn.addr !16
%28 = load i64, i64* %.pre, align 8, !insn.addr !17
%29 = add i64 %28, %27, !insn.addr !18
%30 = add i64 %27, %6, !insn.addr !19
%31 = inttoptr i64 %30 to i32*, !insn.addr !19
%32 = load i32, i32* %31, align 4, !insn.addr !19
%33 = inttoptr i64 %29 to i32*, !insn.addr !20
store i32 %32, i32* %33, align 4, !insn.addr !20
%34 = load i64, i64* %23, align 8, !insn.addr !21
%35 = add i64 %34, 1, !insn.addr !21
store i64 %35, i64* %23, align 8
%36 = load i64, i64* %21, align 8, !insn.addr !13
%37 = add i64 %36, 1, !insn.addr !22
%38 = icmp ult i64 %35, %37, !insn.addr !14
%39 = icmp eq i1 %38, false, !insn.addr !15
store i64 %35, i64* %storemerge1.reg2mem, !insn.addr !15
br i1 %39, label %dec_label_pc_bd, label %dec_label_pc_99, !insn.addr !15
dec_label_pc_bd: ; preds = %dec_label_pc_99, %dec_label_pc_30
%40 = load i64, i64* %.pre, align 8, !insn.addr !23
%41 = call i64 @printWLine(i64 %40), !insn.addr !24
%42 = add i64 %1, -8, !insn.addr !25
%43 = inttoptr i64 %42 to i64*, !insn.addr !25
%44 = load i64, i64* %43, align 8, !insn.addr !25
%45 = call i64 @__readfsqword(i64 40), !insn.addr !26
%46 = icmp eq i64 %44, %45, !insn.addr !26
store i64 0, i64* %rax.0.reg2mem, !insn.addr !27
br i1 %46, label %dec_label_pc_de, label %dec_label_pc_d9, !insn.addr !27
dec_label_pc_d9: ; preds = %dec_label_pc_bd
%47 = call i64 @__stack_chk_fail(), !insn.addr !28
store i64 %47, i64* %rax.0.reg2mem, !insn.addr !28
br label %dec_label_pc_de, !insn.addr !28
dec_label_pc_de: ; preds = %dec_label_pc_d9, %dec_label_pc_bd
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !29
}
define i64 @_ZN66CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_loop_7211goodG2BSinkESt6vectorIPwSaIS1_EE(i64 %arg1) local_unnamed_addr {
dec_label_pc_e0:
%rax.0.reg2mem = alloca i64, !insn.addr !30
%storemerge2.reg2mem = alloca i64, !insn.addr !30
%stack_var_-72 = alloca i32*, align 8
%stack_var_-8 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !31
%1 = inttoptr i64 %arg1 to i64*, !insn.addr !32
%2 = call i64 @_ZNSt6vectorIPwSaIS0_EEixEm(i64* %1, i64 2), !insn.addr !32
%3 = inttoptr i64 %2 to i64*, !insn.addr !33
%4 = load i64, i64* %3, align 8, !insn.addr !33
store i32* inttoptr (i64 279172874305 to i32*), i32** %stack_var_-72, align 8, !insn.addr !34
%5 = ptrtoint i32** %stack_var_-72 to i64, !insn.addr !35
%6 = call i64 @wcslen(i64 %5), !insn.addr !36
%7 = add i64 %6, 1, !insn.addr !37
%8 = icmp ne i64 %7, 0, !insn.addr !38
%9 = icmp eq i1 %8, false, !insn.addr !39
br i1 %9, label %dec_label_pc_19d, label %dec_label_pc_179.lr.ph, !insn.addr !39
dec_label_pc_179.lr.ph: ; preds = %dec_label_pc_e0
%10 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !40
%11 = add i64 %10, -64, !insn.addr !41
store i64 0, i64* %storemerge2.reg2mem
br label %dec_label_pc_179
dec_label_pc_179: ; preds = %dec_label_pc_179.lr.ph, %dec_label_pc_179
%storemerge2.reload = load i64, i64* %storemerge2.reg2mem
%12 = mul i64 %storemerge2.reload, 4, !insn.addr !42
%13 = add i64 %12, %4, !insn.addr !43
%14 = add i64 %11, %12, !insn.addr !41
%15 = inttoptr i64 %14 to i32*, !insn.addr !41
%16 = load i32, i32* %15, align 4, !insn.addr !41
%17 = inttoptr i64 %13 to i32*, !insn.addr !44
store i32 %16, i32* %17, align 4, !insn.addr !44
%18 = add i64 %storemerge2.reload, 1, !insn.addr !45
%19 = icmp ult i64 %18, %7, !insn.addr !38
%20 = icmp eq i1 %19, false, !insn.addr !39
store i64 %18, i64* %storemerge2.reg2mem, !insn.addr !39
br i1 %20, label %dec_label_pc_19d, label %dec_label_pc_179, !insn.addr !39
dec_label_pc_19d: ; preds = %dec_label_pc_179, %dec_label_pc_e0
%21 = call i64 @printWLine(i64 %4), !insn.addr !46
%22 = call i64 @__readfsqword(i64 40), !insn.addr !47
%23 = icmp eq i64 %0, %22, !insn.addr !47
store i64 0, i64* %rax.0.reg2mem, !insn.addr !48
br i1 %23, label %dec_label_pc_1be, label %dec_label_pc_1b9, !insn.addr !48
dec_label_pc_1b9: ; preds = %dec_label_pc_19d
%24 = call i64 @__stack_chk_fail(), !insn.addr !49
store i64 %24, i64* %rax.0.reg2mem, !insn.addr !49
br label %dec_label_pc_1be, !insn.addr !49
dec_label_pc_1be: ; preds = %dec_label_pc_1b9, %dec_label_pc_19d
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !50
}
define i64 @_ZNSt6vectorIPwSaIS0_EEixEm(i64* %result, i64 %arg2) local_unnamed_addr {
dec_label_pc_1f4:
%0 = ptrtoint i64* %result to i64
%1 = mul i64 %arg2, 8, !insn.addr !51
%2 = add i64 %1, %0, !insn.addr !52
ret i64 %2, !insn.addr !53
}
declare i64 @wcslen(i64) local_unnamed_addr
declare i64 @printWLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 12}
!1 = !{i64 36}
!2 = !{i64 48}
!3 = !{i64 65}
!4 = !{i64 69}
!5 = !{i64 87}
!6 = !{i64 91}
!7 = !{i64 102}
!8 = !{i64 106}
!9 = !{i64 112}
!10 = !{i64 122}
!11 = !{i64 127}
!12 = !{i64 131}
!13 = !{i64 139}
!14 = !{i64 147}
!15 = !{i64 151}
!16 = !{i64 157}
!17 = !{i64 165}
!18 = !{i64 169}
!19 = !{i64 176}
!20 = !{i64 180}
!21 = !{i64 182}
!22 = !{i64 143}
!23 = !{i64 189}
!24 = !{i64 196}
!25 = !{i64 202}
!26 = !{i64 206}
!27 = !{i64 215}
!28 = !{i64 217}
!29 = !{i64 223}
!30 = !{i64 224}
!31 = !{i64 236}
!32 = !{i64 263}
!33 = !{i64 268}
!34 = !{i64 289}
!35 = !{i64 343}
!36 = !{i64 346}
!37 = !{i64 367}
!38 = !{i64 371}
!39 = !{i64 375}
!40 = !{i64 225}
!41 = !{i64 400}
!42 = !{i64 381}
!43 = !{i64 393}
!44 = !{i64 404}
!45 = !{i64 406}
!46 = !{i64 420}
!47 = !{i64 430}
!48 = !{i64 439}
!49 = !{i64 441}
!50 = !{i64 447}
!51 = !{i64 523}
!52 = !{i64 527}
!53 = !{i64 531}
### Assistant: %"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<wchar_t *, std::allocator<wchar_t *>>::_Vector_impl" }
%"struct.std::_Vector_base<wchar_t *, std::allocator<wchar_t *>>::_Vector_impl" = type { %"struct.std::_Vector_base<wchar_t *, std::allocator<wchar_t *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<wchar_t *, std::allocator<wchar_t *>>::_Vector_impl_data" = type { i32**, i32**, i32** }
$_ZNSt6vectorIPwSaIS0_EEixEm = comdat any
@__const._ZN66CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_loop_727badSinkESt6vectorIPwSaIS1_EE.source = private unnamed_addr constant [11 x i32] [i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 0], align 16
@__const._ZN66CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_loop_7211goodG2BSinkESt6vectorIPwSaIS1_EE.source = private unnamed_addr constant [11 x i32] [i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 0], align 16
; Function Attrs: noinline optnone uwtable
define dso_local void @_ZN66CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_loop_727badSinkESt6vectorIPwSaIS1_EE(%"class.std::vector"* %dataVector) #0 {
entry:
%data = alloca i32*, align 8
%source = alloca [11 x i32], align 16
%i = alloca i64, align 8
%sourceLen = alloca i64, align 8
%call = call nonnull align 8 dereferenceable(8) i32** @_ZNSt6vectorIPwSaIS0_EEixEm(%"class.std::vector"* %dataVector, i64 2) #5
%0 = load i32*, i32** %call, align 8
store i32* %0, i32** %data, align 8
%1 = bitcast [11 x i32]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 %1, i8* align 16 bitcast ([11 x i32]* @__const._ZN66CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_loop_727badSinkESt6vectorIPwSaIS1_EE.source to i8*), i64 44, i1 false)
%arraydecay = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%call1 = call i64 @wcslen(i32* %arraydecay) #6
store i64 %call1, i64* %sourceLen, align 8
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %entry
%2 = load i64, i64* %i, align 8
%3 = load i64, i64* %sourceLen, align 8
%add = add i64 %3, 1
%cmp = icmp ult i64 %2, %add
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%4 = load i64, i64* %i, align 8
%arrayidx = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 %4
%5 = load i32, i32* %arrayidx, align 4
%6 = load i32*, i32** %data, align 8
%7 = load i64, i64* %i, align 8
%arrayidx2 = getelementptr inbounds i32, i32* %6, i64 %7
store i32 %5, i32* %arrayidx2, align 4
br label %for.inc
for.inc: ; preds = %for.body
%8 = load i64, i64* %i, align 8
%inc = add i64 %8, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%9 = load i32*, i32** %data, align 8
call void @printWLine(i32* %9)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) i32** @_ZNSt6vectorIPwSaIS0_EEixEm(%"class.std::vector"* %this, i64 %__n) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::vector"*, align 8
%__n.addr = alloca i64, align 8
store %"class.std::vector"* %this, %"class.std::vector"** %this.addr, align 8
store i64 %__n, i64* %__n.addr, align 8
%this1 = load %"class.std::vector"*, %"class.std::vector"** %this.addr, align 8
%0 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%_M_impl = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %0, i32 0, i32 0
%1 = bitcast %"struct.std::_Vector_base<wchar_t *, std::allocator<wchar_t *>>::_Vector_impl"* %_M_impl to %"struct.std::_Vector_base<wchar_t *, std::allocator<wchar_t *>>::_Vector_impl_data"*
%_M_start = getelementptr inbounds %"struct.std::_Vector_base<wchar_t *, std::allocator<wchar_t *>>::_Vector_impl_data", %"struct.std::_Vector_base<wchar_t *, std::allocator<wchar_t *>>::_Vector_impl_data"* %1, i32 0, i32 0
%2 = load i32**, i32*** %_M_start, align 8
%3 = load i64, i64* %__n.addr, align 8
%add.ptr = getelementptr inbounds i32*, i32** %2, i64 %3
ret i32** %add.ptr
}
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #2
; Function Attrs: nounwind readonly
declare dso_local i64 @wcslen(i32*) #3
declare dso_local void @printWLine(i32*) #4
; Function Attrs: noinline optnone uwtable
define dso_local void @_ZN66CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_loop_7211goodG2BSinkESt6vectorIPwSaIS1_EE(%"class.std::vector"* %dataVector) #0 {
entry:
%data = alloca i32*, align 8
%source = alloca [11 x i32], align 16
%i = alloca i64, align 8
%sourceLen = alloca i64, align 8
%call = call nonnull align 8 dereferenceable(8) i32** @_ZNSt6vectorIPwSaIS0_EEixEm(%"class.std::vector"* %dataVector, i64 2) #5
%0 = load i32*, i32** %call, align 8
store i32* %0, i32** %data, align 8
%1 = bitcast [11 x i32]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 %1, i8* align 16 bitcast ([11 x i32]* @__const._ZN66CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_loop_7211goodG2BSinkESt6vectorIPwSaIS1_EE.source to i8*), i64 44, i1 false)
%arraydecay = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%call1 = call i64 @wcslen(i32* %arraydecay) #6
store i64 %call1, i64* %sourceLen, align 8
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %entry
%2 = load i64, i64* %i, align 8
%3 = load i64, i64* %sourceLen, align 8
%add = add i64 %3, 1
%cmp = icmp ult i64 %2, %add
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%4 = load i64, i64* %i, align 8
%arrayidx = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 %4
%5 = load i32, i32* %arrayidx, align 4
%6 = load i32*, i32** %data, align 8
%7 = load i64, i64* %i, align 8
%arrayidx2 = getelementptr inbounds i32, i32* %6, i64 %7
store i32 %5, i32* %arrayidx2, align 4
br label %for.inc
for.inc: ; preds = %for.body
%8 = load i64, i64* %i, align 8
%inc = add i64 %8, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%9 = load i32*, i32** %data, align 8
call void @printWLine(i32* %9)
ret void
}
attributes #0 = { noinline 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" }
attributes #1 = { 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" }
attributes #2 = { argmemonly nounwind willreturn }
attributes #3 = { nounwind readonly "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #4 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #5 = { nounwind }
attributes #6 = { nounwind readonly }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_1e8 = local_unnamed_addr global i64 0
@global_var_123 = constant [3 x i8] c"%d\00"
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
%1 = load i64, i64* @global_var_1e8, align 8, !insn.addr !1
ret i64 %1, !insn.addr !1
}
define i64 @function_30() local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !2
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = load i64, i64* %0
%4 = load i64, i64* %0
%5 = call i64 @__isoc99_fscanf(i64 %4, i64 %1, i64 %3), !insn.addr !3
%6 = add i64 %2, -12, !insn.addr !4
%7 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_fscanf_63b_badSink(i64 %6), !insn.addr !5
%8 = add i64 %2, -8, !insn.addr !6
%9 = inttoptr i64 %8 to i64*, !insn.addr !6
%10 = load i64, i64* %9, align 8, !insn.addr !6
%11 = call i64 @__readfsqword(i64 40), !insn.addr !7
%12 = icmp eq i64 %10, %11, !insn.addr !7
store i64 0, i64* %rax.0.reg2mem, !insn.addr !8
br i1 %12, label %dec_label_pc_5e, label %dec_label_pc_59, !insn.addr !8
dec_label_pc_59: ; preds = %dec_label_pc_30
%13 = call i64 @__stack_chk_fail(), !insn.addr !9
store i64 %13, i64* %rax.0.reg2mem, !insn.addr !9
br label %dec_label_pc_5e, !insn.addr !9
dec_label_pc_5e: ; preds = %dec_label_pc_59, %dec_label_pc_30
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !10
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_60:
%rax.0.reg2mem = alloca i64, !insn.addr !11
%stack_var_-20 = alloca i32, align 4
%0 = call i64 @__readfsqword(i64 40), !insn.addr !12
store i32 7, i32* %stack_var_-20, align 4, !insn.addr !13
%1 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_fscanf_63b_goodG2BSink(i32* nonnull %stack_var_-20), !insn.addr !14
%2 = call i64 @__readfsqword(i64 40), !insn.addr !15
%3 = icmp eq i64 %0, %2, !insn.addr !15
store i64 0, i64* %rax.0.reg2mem, !insn.addr !16
br i1 %3, label %dec_label_pc_a6, label %dec_label_pc_a1, !insn.addr !16
dec_label_pc_a1: ; preds = %dec_label_pc_60
%4 = call i64 @__stack_chk_fail(), !insn.addr !17
store i64 %4, i64* %rax.0.reg2mem, !insn.addr !17
br label %dec_label_pc_a6, !insn.addr !17
dec_label_pc_a6: ; preds = %dec_label_pc_a1, %dec_label_pc_60
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !18
}
define i64 @goodB2G() local_unnamed_addr {
dec_label_pc_a8:
%rax.0.reg2mem = alloca i64, !insn.addr !19
%stack_var_-20 = alloca i32, align 4
%0 = call i64 @__readfsqword(i64 40), !insn.addr !20
store i32 -1, i32* %stack_var_-20, align 4, !insn.addr !21
%1 = load i64, i64* @global_var_1e8, align 8, !insn.addr !22
%2 = ptrtoint i32* %stack_var_-20 to i64, !insn.addr !23
%3 = call i64 @__isoc99_fscanf(i64 %1, i64 ptrtoint ([3 x i8]* @global_var_123 to i64), i64 %2), !insn.addr !24
%4 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_fscanf_63b_goodB2GSink(i32* nonnull %stack_var_-20), !insn.addr !25
%5 = call i64 @__readfsqword(i64 40), !insn.addr !26
%6 = icmp eq i64 %0, %5, !insn.addr !26
store i64 0, i64* %rax.0.reg2mem, !insn.addr !27
br i1 %6, label %dec_label_pc_106, label %dec_label_pc_101, !insn.addr !27
dec_label_pc_101: ; preds = %dec_label_pc_a8
%7 = call i64 @__stack_chk_fail(), !insn.addr !28
store i64 %7, i64* %rax.0.reg2mem, !insn.addr !28
br label %dec_label_pc_106, !insn.addr !28
dec_label_pc_106: ; preds = %dec_label_pc_101, %dec_label_pc_a8
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !29
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_fscanf_63_good() local_unnamed_addr {
dec_label_pc_108:
%0 = call i64 @goodG2B(), !insn.addr !30
%1 = call i64 @goodB2G(), !insn.addr !31
ret i64 %1, !insn.addr !32
}
declare i64 @__isoc99_fscanf(i64, i64, i64) local_unnamed_addr
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_fscanf_63b_badSink(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_fscanf_63b_goodG2BSink(i32*) local_unnamed_addr
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_fscanf_63b_goodB2GSink(i32*) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 8}
!1 = !{i64 30}
!2 = !{i64 48}
!3 = !{i64 56}
!4 = !{i64 61}
!5 = !{i64 68}
!6 = !{i64 74}
!7 = !{i64 78}
!8 = !{i64 87}
!9 = !{i64 89}
!10 = !{i64 95}
!11 = !{i64 96}
!12 = !{i64 104}
!13 = !{i64 126}
!14 = !{i64 140}
!15 = !{i64 150}
!16 = !{i64 159}
!17 = !{i64 161}
!18 = !{i64 167}
!19 = !{i64 168}
!20 = !{i64 176}
!21 = !{i64 191}
!22 = !{i64 198}
!23 = !{i64 205}
!24 = !{i64 224}
!25 = !{i64 236}
!26 = !{i64 246}
!27 = !{i64 255}
!28 = !{i64 257}
!29 = !{i64 263}
!30 = !{i64 273}
!31 = !{i64 283}
!32 = !{i64 290}
### Assistant: %struct._IO_FILE = type { i32, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, %struct._IO_marker*, %struct._IO_FILE*, i32, i32, i64, i16, i8, [1 x i8], i8*, i64, %struct._IO_codecvt*, %struct._IO_wide_data*, %struct._IO_FILE*, i8*, i64, i32, [20 x i8] }
%struct._IO_marker = type opaque
%struct._IO_codecvt = type opaque
%struct._IO_wide_data = type opaque
@stdin = external dso_local global %struct._IO_FILE*, align 8
@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE129_fscanf_63_bad() #0 {
entry:
%data = alloca i32, align 4
store i32 -1, i32* %data, align 4
%0 = load %struct._IO_FILE*, %struct._IO_FILE** @stdin, align 8
%call = call i32 (%struct._IO_FILE*, i8*, ...) @__isoc99_fscanf(%struct._IO_FILE* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %data)
call void @CWE121_Stack_Based_Buffer_Overflow__CWE129_fscanf_63b_badSink(i32* %data)
ret void
}
declare dso_local i32 @__isoc99_fscanf(%struct._IO_FILE*, i8*, ...) #1
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE129_fscanf_63b_badSink(i32*) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE129_fscanf_63_good() #0 {
entry:
call void @goodG2B()
call void @goodB2G()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B() #0 {
entry:
%data = alloca i32, align 4
store i32 -1, i32* %data, align 4
store i32 7, i32* %data, align 4
call void @CWE121_Stack_Based_Buffer_Overflow__CWE129_fscanf_63b_goodG2BSink(i32* %data)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE129_fscanf_63b_goodG2BSink(i32*) #1
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodB2G() #0 {
entry:
%data = alloca i32, align 4
store i32 -1, i32* %data, align 4
%0 = load %struct._IO_FILE*, %struct._IO_FILE** @stdin, align 8
%call = call i32 (%struct._IO_FILE*, i8*, ...) @__isoc99_fscanf(%struct._IO_FILE* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %data)
call void @CWE121_Stack_Based_Buffer_Overflow__CWE129_fscanf_63b_goodB2GSink(i32* %data)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE129_fscanf_63b_goodB2GSink(i32*) #1
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" }
attributes #1 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_f = local_unnamed_addr constant [3 x i8] c"%(\00"
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%stack_var_-120 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
%1 = ptrtoint i64* %stack_var_-120 to i64, !insn.addr !1
ret i64 %1, !insn.addr !2
}
define i64 @function_30() local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !3
%1 = load i64, i64* %0
%2 = add i64 %1, -168, !insn.addr !3
%3 = inttoptr i64 %2 to i32*, !insn.addr !3
%4 = load i32, i32* %3, align 4, !insn.addr !3
%5 = zext i32 %4 to i64, !insn.addr !3
%6 = add i64 %1, -144, !insn.addr !4
%7 = inttoptr i64 %6 to i64*, !insn.addr !4
store i64 %5, i64* %7, align 8, !insn.addr !4
%8 = add i64 %1, -160, !insn.addr !5
%9 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_ncpy_66b_badSink(i64 %8), !insn.addr !6
%10 = add i64 %1, -8, !insn.addr !7
%11 = inttoptr i64 %10 to i64*, !insn.addr !7
%12 = load i64, i64* %11, align 8, !insn.addr !7
%13 = call i64 @__readfsqword(i64 40), !insn.addr !8
%14 = icmp eq i64 %12, %13, !insn.addr !8
store i64 0, i64* %rax.0.reg2mem, !insn.addr !9
br i1 %14, label %dec_label_pc_61, label %dec_label_pc_5c, !insn.addr !9
dec_label_pc_5c: ; preds = %dec_label_pc_30
%15 = call i64 @__stack_chk_fail(), !insn.addr !10
store i64 %15, i64* %rax.0.reg2mem, !insn.addr !10
br label %dec_label_pc_61, !insn.addr !10
dec_label_pc_61: ; preds = %dec_label_pc_5c, %dec_label_pc_30
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !11
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_63:
%rax.0.reg2mem = alloca i64, !insn.addr !12
%stack_var_-168 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !13
%1 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_ncpy_66b_goodG2BSink(i64* nonnull %stack_var_-168), !insn.addr !14
%2 = call i64 @__readfsqword(i64 40), !insn.addr !15
%3 = icmp eq i64 %0, %2, !insn.addr !15
store i64 0, i64* %rax.0.reg2mem, !insn.addr !16
br i1 %3, label %dec_label_pc_c4, label %dec_label_pc_bf, !insn.addr !16
dec_label_pc_bf: ; preds = %dec_label_pc_63
%4 = call i64 @__stack_chk_fail(), !insn.addr !17
store i64 %4, i64* %rax.0.reg2mem, !insn.addr !17
br label %dec_label_pc_c4, !insn.addr !17
dec_label_pc_c4: ; preds = %dec_label_pc_bf, %dec_label_pc_63
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !18
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_ncpy_66_good() local_unnamed_addr {
dec_label_pc_c6:
%0 = call i64 @goodG2B(), !insn.addr !19
ret i64 %0, !insn.addr !20
}
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_ncpy_66b_badSink(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_ncpy_66b_goodG2BSink(i64*) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 11}
!1 = !{i64 26}
!2 = !{i64 30}
!3 = !{i64 48}
!4 = !{i64 54}
!5 = !{i64 61}
!6 = !{i64 71}
!7 = !{i64 77}
!8 = !{i64 81}
!9 = !{i64 90}
!10 = !{i64 92}
!11 = !{i64 98}
!12 = !{i64 99}
!13 = !{i64 110}
!14 = !{i64 170}
!15 = !{i64 180}
!16 = !{i64 189}
!17 = !{i64 191}
!18 = !{i64 197}
!19 = !{i64 207}
!20 = !{i64 214}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_ncpy_66_bad() #0 {
entry:
%data = alloca i8*, align 8
%dataArray = alloca [5 x i8*], align 16
%dataBadBuffer = alloca [50 x i8], align 16
%dataGoodBuffer = alloca [100 x i8], align 16
%arraydecay = getelementptr inbounds [50 x i8], [50 x i8]* %dataBadBuffer, i64 0, i64 0
store i8* %arraydecay, i8** %data, align 8
%0 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %0, i64 0
store i8 0, i8* %arrayidx, align 1
%1 = load i8*, i8** %data, align 8
%arrayidx1 = getelementptr inbounds [5 x i8*], [5 x i8*]* %dataArray, i64 0, i64 2
store i8* %1, i8** %arrayidx1, align 16
%arraydecay2 = getelementptr inbounds [5 x i8*], [5 x i8*]* %dataArray, i64 0, i64 0
call void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_ncpy_66b_badSink(i8** %arraydecay2)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_ncpy_66b_badSink(i8**) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_ncpy_66_good() #0 {
entry:
call void @goodG2B()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B() #0 {
entry:
%data = alloca i8*, align 8
%dataArray = alloca [5 x i8*], align 16
%dataBadBuffer = alloca [50 x i8], align 16
%dataGoodBuffer = alloca [100 x i8], align 16
%arraydecay = getelementptr inbounds [100 x i8], [100 x i8]* %dataGoodBuffer, i64 0, i64 0
store i8* %arraydecay, i8** %data, align 8
%0 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %0, i64 0
store i8 0, i8* %arrayidx, align 1
%1 = load i8*, i8** %data, align 8
%arrayidx1 = getelementptr inbounds [5 x i8*], [5 x i8*]* %dataArray, i64 0, i64 2
store i8* %1, i8** %arrayidx1, align 16
%arraydecay2 = getelementptr inbounds [5 x i8*], [5 x i8*]* %dataArray, i64 0, i64 0
call void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_ncpy_66b_goodG2BSink(i8** %arraydecay2)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_ncpy_66b_goodG2BSink(i8**) #1
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" }
attributes #1 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_10 = constant [3 x i8] c"%(\00"
@global_var_3b7 = constant [23 x i8] c"vector::_M_fill_insert\00"
@0 = external global i32
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%stack_var_-504 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
%1 = ptrtoint i64* %stack_var_-504 to i64, !insn.addr !1
ret i64 %1, !insn.addr !2
}
define i64 @function_31(i64 %arg1, i64 %arg2) local_unnamed_addr {
dec_label_pc_31:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !3
%1 = load i64, i64* %0
%2 = add i64 %1, -512, !insn.addr !3
%3 = inttoptr i64 %2 to i64*, !insn.addr !3
%4 = add i64 %1, -496, !insn.addr !4
%5 = inttoptr i64 %4 to i64*, !insn.addr !5
%6 = call i64 @_ZNSt6vectorIPiSaIS0_EE3endEv(i64* %5), !insn.addr !5
%7 = add i64 %1, -504, !insn.addr !6
%8 = inttoptr i64 %7 to i64*, !insn.addr !6
store i64 %6, i64* %8, align 8, !insn.addr !6
%9 = add i64 %1, -464, !insn.addr !7
%10 = call i64 @_ZN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS1_SaIS1_EEEC1IPS1_EERKNS0_IT_NS_11__enable_ifIXsrSt10__are_sameISA_S9_E7__valueES6_E6__typeEEE(i64 %9, i64 %7), !insn.addr !8
%11 = inttoptr i64 %9 to i64*, !insn.addr !9
%12 = load i64, i64* %11, align 8, !insn.addr !9
%13 = inttoptr i64 %2 to i32**, !insn.addr !10
%14 = call i64 @_ZNSt6vectorIPiSaIS0_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS0_S2_EEmRS5_(i64* %5, i64 %12, i64 1, i32** %13), !insn.addr !10
%15 = call i64 @_ZNSt6vectorIPiSaIS0_EE3endEv(i64* %5), !insn.addr !11
store i64 %15, i64* %8, align 8, !insn.addr !12
%16 = call i64 @_ZN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS1_SaIS1_EEEC1IPS1_EERKNS0_IT_NS_11__enable_ifIXsrSt10__are_sameISA_S9_E7__valueES6_E6__typeEEE(i64 %9, i64 %7), !insn.addr !13
%17 = load i64, i64* %11, align 8, !insn.addr !14
%18 = call i64 @_ZNSt6vectorIPiSaIS0_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS0_S2_EEmRS5_(i64* %5, i64 %17, i64 1, i32** %13), !insn.addr !15
%19 = call i64 @_ZNSt6vectorIPiSaIS0_EE3endEv(i64* %5), !insn.addr !16
store i64 %19, i64* %8, align 8, !insn.addr !17
%20 = call i64 @_ZN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS1_SaIS1_EEEC1IPS1_EERKNS0_IT_NS_11__enable_ifIXsrSt10__are_sameISA_S9_E7__valueES6_E6__typeEEE(i64 %9, i64 %7), !insn.addr !18
%21 = load i64, i64* %11, align 8, !insn.addr !19
%22 = call i64 @_ZNSt6vectorIPiSaIS0_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS0_S2_EEmRS5_(i64* %5, i64 %21, i64 1, i32** %13), !insn.addr !20
%23 = call i64 @_ZNSt6vectorIPiSaIS0_EEC1ERKS2_(i64* %11, i64* %5), !insn.addr !21
%24 = call i64 @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove_727badSinkESt6vectorIPiSaIS1_EE(i64 %9), !insn.addr !22
%25 = call i64 @_ZNSt6vectorIPiSaIS0_EED1Ev(i64* %11), !insn.addr !23
%26 = call i64 @_ZNSt6vectorIPiSaIS0_EED1Ev(i64* %5), !insn.addr !24
%27 = add i64 %1, -24, !insn.addr !25
%28 = inttoptr i64 %27 to i64*, !insn.addr !25
%29 = load i64, i64* %28, align 8, !insn.addr !25
%30 = call i64 @__readfsqword(i64 40), !insn.addr !26
%31 = icmp eq i64 %29, %30, !insn.addr !26
store i64 0, i64* %rax.0.reg2mem, !insn.addr !27
br i1 %31, label %dec_label_pc_1c2, label %dec_label_pc_1bd, !insn.addr !27
dec_label_pc_1bd: ; preds = %dec_label_pc_31
%32 = call i64 @__stack_chk_fail(), !insn.addr !28
store i64 %32, i64* %rax.0.reg2mem, !insn.addr !28
br label %dec_label_pc_1c2, !insn.addr !28
dec_label_pc_1c2: ; preds = %dec_label_pc_1bd, %dec_label_pc_31
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !29
}
define i64 @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove_72L7goodG2BEv() local_unnamed_addr {
dec_label_pc_1cc:
%rax.0.reg2mem = alloca i64, !insn.addr !30
%stack_var_-472 = alloca i64, align 8
%stack_var_-512 = alloca i64, align 8
%stack_var_-440 = alloca i64, align 8
%stack_var_-504 = alloca i64, align 8
%stack_var_-520 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !31
%1 = call i64 @_ZNSt6vectorIPiSaIS0_EEC1Ev(i64* nonnull %stack_var_-504), !insn.addr !32
%2 = ptrtoint i64* %stack_var_-440 to i64, !insn.addr !33
store i64 %2, i64* %stack_var_-520, align 8, !insn.addr !33
%3 = call i64 @_ZNSt6vectorIPiSaIS0_EE3endEv(i64* nonnull %stack_var_-504), !insn.addr !34
store i64 %3, i64* %stack_var_-512, align 8, !insn.addr !35
%4 = ptrtoint i64* %stack_var_-512 to i64, !insn.addr !36
%5 = ptrtoint i64* %stack_var_-472 to i64, !insn.addr !37
%6 = call i64 @_ZN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS1_SaIS1_EEEC1IPS1_EERKNS0_IT_NS_11__enable_ifIXsrSt10__are_sameISA_S9_E7__valueES6_E6__typeEEE(i64 %5, i64 %4), !insn.addr !38
%7 = load i64, i64* %stack_var_-472, align 8, !insn.addr !39
%8 = bitcast i64* %stack_var_-520 to i32**, !insn.addr !40
%9 = call i64 @_ZNSt6vectorIPiSaIS0_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS0_S2_EEmRS5_(i64* nonnull %stack_var_-504, i64 %7, i64 1, i32** nonnull %8), !insn.addr !40
%10 = call i64 @_ZNSt6vectorIPiSaIS0_EE3endEv(i64* nonnull %stack_var_-504), !insn.addr !41
store i64 %10, i64* %stack_var_-512, align 8, !insn.addr !42
%11 = call i64 @_ZN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS1_SaIS1_EEEC1IPS1_EERKNS0_IT_NS_11__enable_ifIXsrSt10__are_sameISA_S9_E7__valueES6_E6__typeEEE(i64 %5, i64 %4), !insn.addr !43
%12 = load i64, i64* %stack_var_-472, align 8, !insn.addr !44
%13 = call i64 @_ZNSt6vectorIPiSaIS0_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS0_S2_EEmRS5_(i64* nonnull %stack_var_-504, i64 %12, i64 1, i32** nonnull %8), !insn.addr !45
%14 = call i64 @_ZNSt6vectorIPiSaIS0_EE3endEv(i64* nonnull %stack_var_-504), !insn.addr !46
store i64 %14, i64* %stack_var_-512, align 8, !insn.addr !47
%15 = call i64 @_ZN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS1_SaIS1_EEEC1IPS1_EERKNS0_IT_NS_11__enable_ifIXsrSt10__are_sameISA_S9_E7__valueES6_E6__typeEEE(i64 %5, i64 %4), !insn.addr !48
%16 = load i64, i64* %stack_var_-472, align 8, !insn.addr !49
%17 = call i64 @_ZNSt6vectorIPiSaIS0_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS0_S2_EEmRS5_(i64* nonnull %stack_var_-504, i64 %16, i64 1, i32** nonnull %8), !insn.addr !50
%18 = call i64 @_ZNSt6vectorIPiSaIS0_EEC1ERKS2_(i64* nonnull %stack_var_-472, i64* nonnull %stack_var_-504), !insn.addr !51
%19 = call i64 @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove_7211goodG2BSinkESt6vectorIPiSaIS1_EE(i64 %5), !insn.addr !52
%20 = call i64 @_ZNSt6vectorIPiSaIS0_EED1Ev(i64* nonnull %stack_var_-472), !insn.addr !53
%21 = call i64 @_ZNSt6vectorIPiSaIS0_EED1Ev(i64* nonnull %stack_var_-504), !insn.addr !54
%22 = call i64 @__readfsqword(i64 40), !insn.addr !55
%23 = icmp eq i64 %0, %22, !insn.addr !55
store i64 0, i64* %rax.0.reg2mem, !insn.addr !56
br i1 %23, label %dec_label_pc_38e, label %dec_label_pc_389, !insn.addr !56
dec_label_pc_389: ; preds = %dec_label_pc_1cc
%24 = call i64 @__stack_chk_fail(), !insn.addr !57
store i64 %24, i64* %rax.0.reg2mem, !insn.addr !57
br label %dec_label_pc_38e, !insn.addr !57
dec_label_pc_38e: ; preds = %dec_label_pc_389, %dec_label_pc_1cc
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !58
}
define i64 @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove_724goodEv() local_unnamed_addr {
dec_label_pc_398:
%0 = call i64 @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove_72L7goodG2BEv(), !insn.addr !59
ret i64 %0, !insn.addr !60
}
define i64 @_ZnwmPv(i64 %arg1, i64* %arg2) local_unnamed_addr {
dec_label_pc_3a4:
%0 = ptrtoint i64* %arg2 to i64
ret i64 %0, !insn.addr !61
}
define i64 @_ZNSt6vectorIPiSaIS0_EEC1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_464:
%0 = call i64 @_ZNSt12_Vector_baseIPiSaIS0_EEC1Ev(i64* %result), !insn.addr !62
ret i64 %0, !insn.addr !63
}
define i64 @_ZNSt6vectorIPiSaIS0_EED1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_480:
%0 = ptrtoint i64* %result to i64
%1 = call i64 @_ZNSt12_Vector_baseIPiSaIS0_EE19_M_get_Tp_allocatorEv(i64* %result), !insn.addr !64
%2 = add i64 %0, 8, !insn.addr !65
%3 = inttoptr i64 %2 to i64*, !insn.addr !65
%4 = load i64, i64* %3, align 8, !insn.addr !65
%5 = bitcast i64* %result to i32**, !insn.addr !66
%6 = inttoptr i64 %4 to i32**, !insn.addr !66
%7 = inttoptr i64 %1 to i64*, !insn.addr !66
call void @_ZSt8_DestroyIPPiS0_EvT_S2_RSaIT0_E(i32** %5, i32** %6, i64* %7), !insn.addr !66
%8 = call i64 @_ZNSt12_Vector_baseIPiSaIS0_EED1Ev(i64* %result), !insn.addr !67
ret i64 %8, !insn.addr !68
}
define i64 @_ZNSt6vectorIPiSaIS0_EE3endEv(i64* %result) local_unnamed_addr {
dec_label_pc_4c4:
%rax.0.reg2mem = alloca i64, !insn.addr !69
%0 = ptrtoint i64* %result to i64
%stack_var_-24 = alloca i64, align 8
%1 = call i64 @__readfsqword(i64 40), !insn.addr !70
%2 = add i64 %0, 8, !insn.addr !71
%3 = inttoptr i64 %2 to i32***, !insn.addr !72
%4 = call i64 @_ZN9__gnu_cxx17__normal_iteratorIPPiSt6vectorIS1_SaIS1_EEEC1ERKS2_(i64* nonnull %stack_var_-24, i32*** %3), !insn.addr !72
%5 = load i64, i64* %stack_var_-24, align 8, !insn.addr !73
%6 = call i64 @__readfsqword(i64 40), !insn.addr !74
%7 = icmp eq i64 %1, %6, !insn.addr !74
store i64 %5, i64* %rax.0.reg2mem, !insn.addr !75
br i1 %7, label %dec_label_pc_50e, label %dec_label_pc_509, !insn.addr !75
dec_label_pc_509: ; preds = %dec_label_pc_4c4
%8 = call i64 @__stack_chk_fail(), !insn.addr !76
store i64 %8, i64* %rax.0.reg2mem, !insn.addr !76
br label %dec_label_pc_50e, !insn.addr !76
dec_label_pc_50e: ; preds = %dec_label_pc_509, %dec_label_pc_4c4
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !77
}
define i64 @_ZN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS1_SaIS1_EEEC1IPS1_EERKNS0_IT_NS_11__enable_ifIXsrSt10__are_sameISA_S9_E7__valueES6_E6__typeEEE(i64 %arg1, i64 %arg2) local_unnamed_addr {
dec_label_pc_510:
%0 = inttoptr i64 %arg2 to i64*, !insn.addr !78
%1 = call i64 @_ZNK9__gnu_cxx17__normal_iteratorIPPiSt6vectorIS1_SaIS1_EEE4baseEv(i64* %0), !insn.addr !78
%2 = inttoptr i64 %1 to i64*, !insn.addr !79
%3 = load i64, i64* %2, align 8, !insn.addr !79
%4 = inttoptr i64 %arg1 to i64*, !insn.addr !80
store i64 %3, i64* %4, align 8, !insn.addr !80
ret i64 %arg1, !insn.addr !81
}
define i64 @_ZNSt6vectorIPiSaIS0_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS0_S2_EEmRS5_(i64* %result, i64 %arg2, i64 %arg3, i32** %arg4) local_unnamed_addr {
dec_label_pc_53a:
%rax.0.reg2mem = alloca i64, !insn.addr !82
%stack_var_-32 = alloca i64, align 8
%stack_var_-56 = alloca i64, align 8
store i64 %arg2, i64* %stack_var_-56, align 8, !insn.addr !83
%0 = call i64 @__readfsqword(i64 40), !insn.addr !84
%1 = call i64 @_ZNKSt6vectorIPiSaIS0_EE6cbeginEv(i64* %result), !insn.addr !85
store i64 %1, i64* %stack_var_-32, align 8, !insn.addr !86
%2 = call i64 @_ZN9__gnu_cxxmiIPKPiSt6vectorIS1_SaIS1_EEEENS_17__normal_iteratorIT_T0_E15difference_typeERKSA_SD_(i64* nonnull %stack_var_-56, i64* nonnull %stack_var_-32), !insn.addr !87
%3 = call i64 @_ZNSt6vectorIPiSaIS0_EE5beginEv(i64* %result), !insn.addr !88
store i64 %3, i64* %stack_var_-32, align 8, !insn.addr !89
%4 = trunc i64 %2 to i32, !insn.addr !90
%5 = call i64 @_ZNK9__gnu_cxx17__normal_iteratorIPPiSt6vectorIS1_SaIS1_EEEplEl(i64* nonnull %stack_var_-32, i32 %4), !insn.addr !90
%6 = call i64 @_ZNSt6vectorIPiSaIS0_EE14_M_fill_insertEN9__gnu_cxx17__normal_iteratorIPS0_S2_EEmRKS0_(i64* %result, i64 %5, i64 %arg3, i32** %arg4), !insn.addr !91
%7 = call i64 @_ZNSt6vectorIPiSaIS0_EE5beginEv(i64* %result), !insn.addr !92
store i64 %7, i64* %stack_var_-32, align 8, !insn.addr !93
%8 = call i64 @_ZNK9__gnu_cxx17__normal_iteratorIPPiSt6vectorIS1_SaIS1_EEEplEl(i64* nonnull %stack_var_-32, i32 %4), !insn.addr !94
%9 = call i64 @__readfsqword(i64 40), !insn.addr !95
%10 = icmp eq i64 %0, %9, !insn.addr !95
store i64 %8, i64* %rax.0.reg2mem, !insn.addr !96
br i1 %10, label %dec_label_pc_5f9, label %dec_label_pc_5f4, !insn.addr !96
dec_label_pc_5f4: ; preds = %dec_label_pc_53a
%11 = call i64 @__stack_chk_fail(), !insn.addr !97
store i64 %11, i64* %rax.0.reg2mem, !insn.addr !97
br label %dec_label_pc_5f9, !insn.addr !97
dec_label_pc_5f9: ; preds = %dec_label_pc_5f4, %dec_label_pc_53a
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !98
}
define i64 @_ZNSt6vectorIPiSaIS0_EEC1ERKS2_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_5fc:
%rax.0.reg2mem = alloca i64, !insn.addr !99
%0 = ptrtoint i64* %result to i64
%stack_var_-49 = alloca i64, align 8
%1 = call i64 @__readfsqword(i64 40), !insn.addr !100
%2 = call i64 @_ZNKSt12_Vector_baseIPiSaIS0_EE19_M_get_Tp_allocatorEv(i64* %arg2), !insn.addr !101
%3 = inttoptr i64 %2 to i64*, !insn.addr !102
%4 = call i64 @_ZN9__gnu_cxx14__alloc_traitsISaIPiEE17_S_select_on_copyERKS2_(i64* nonnull %stack_var_-49, i64* %3), !insn.addr !102
%5 = call i64 @_ZNKSt6vectorIPiSaIS0_EE4sizeEv(i64* %arg2), !insn.addr !103
%6 = call i64 @_ZNSt12_Vector_baseIPiSaIS0_EEC1EmRKS1_(i64* %result, i64 %5, i64* nonnull %stack_var_-49), !insn.addr !104
%7 = call i64 @_ZNSaIPiED1Ev(i64* nonnull %stack_var_-49), !insn.addr !105
%8 = call i64 @_ZNSt12_Vector_baseIPiSaIS0_EE19_M_get_Tp_allocatorEv(i64* %result), !insn.addr !106
%9 = call i64 @_ZNKSt6vectorIPiSaIS0_EE3endEv(i64* %arg2), !insn.addr !107
%10 = call i64 @_ZNKSt6vectorIPiSaIS0_EE5beginEv(i64* %arg2), !insn.addr !108
%11 = bitcast i64* %result to i32**, !insn.addr !109
%12 = inttoptr i64 %8 to i64*, !insn.addr !109
%13 = call i32** @_ZSt22__uninitialized_copy_aIN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS2_SaIS2_EEEEPS2_S2_ET0_T_SB_SA_RSaIT1_E(i64 %10, i64 %9, i32** %11, i64* %12), !insn.addr !109
%14 = ptrtoint i32** %13 to i64, !insn.addr !109
%15 = add i64 %0, 8, !insn.addr !110
%16 = inttoptr i64 %15 to i64*, !insn.addr !110
store i64 %14, i64* %16, align 8, !insn.addr !110
%17 = call i64 @__readfsqword(i64 40), !insn.addr !111
%18 = icmp eq i64 %1, %17, !insn.addr !111
store i64 0, i64* %rax.0.reg2mem, !insn.addr !112
br i1 %18, label %dec_label_pc_707, label %dec_label_pc_702, !insn.addr !112
dec_label_pc_702: ; preds = %dec_label_pc_5fc
%19 = call i64 @__stack_chk_fail(), !insn.addr !113
store i64 %19, i64* %rax.0.reg2mem, !insn.addr !113
br label %dec_label_pc_707, !insn.addr !113
dec_label_pc_707: ; preds = %dec_label_pc_702, %dec_label_pc_5fc
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !114
}
define i64 @_ZNSt12_Vector_baseIPiSaIS0_EE12_Vector_implD1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_712:
%0 = call i64 @_ZNSaIPiED1Ev(i64* %result), !insn.addr !115
ret i64 %0, !insn.addr !116
}
define i64 @_ZNSt12_Vector_baseIPiSaIS0_EEC1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_72e:
%0 = call i64 @_ZNSt12_Vector_baseIPiSaIS0_EE12_Vector_implC1Ev(i64* %result), !insn.addr !117
ret i64 %0, !insn.addr !118
}
define i64 @_ZNSt12_Vector_baseIPiSaIS0_EED1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_74a:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, ptrtoint ([3 x i8]* @global_var_10 to i64), !insn.addr !119
%2 = inttoptr i64 %1 to i64*, !insn.addr !119
%3 = load i64, i64* %2, align 8, !insn.addr !119
%4 = sub i64 %3, %0, !insn.addr !120
%5 = ashr i64 %4, 3, !insn.addr !121
%6 = bitcast i64* %result to i32**, !insn.addr !122
%7 = call i64 @_ZNSt12_Vector_baseIPiSaIS0_EE13_M_deallocateEPS0_m(i64* %result, i32** %6, i64 %5), !insn.addr !122
%8 = call i64 @_ZNSt12_Vector_baseIPiSaIS0_EE12_Vector_implD1Ev(i64* %result), !insn.addr !123
ret i64 %8, !insn.addr !124
}
define i64 @_ZNSt12_Vector_baseIPiSaIS0_EE19_M_get_Tp_allocatorEv(i64* %result) local_unnamed_addr {
dec_label_pc_79a:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !125
}
define void @_ZSt8_DestroyIPPiS0_EvT_S2_RSaIT0_E(i32** %arg1, i32** %arg2, i64* %arg3) local_unnamed_addr {
dec_label_pc_7a8:
call void @_ZSt8_DestroyIPPiEvT_S2_(i32** %arg1, i32** %arg2), !insn.addr !126
ret void, !insn.addr !127
}
define i64 @_ZN9__gnu_cxx17__normal_iteratorIPPiSt6vectorIS1_SaIS1_EEEC1ERKS2_(i64* %result, i32*** %arg2) local_unnamed_addr {
dec_label_pc_7d2:
%0 = ptrtoint i32*** %arg2 to i64
%1 = ptrtoint i64* %result to i64
store i64 %0, i64* %result, align 8, !insn.addr !128
ret i64 %1, !insn.addr !129
}
define i64 @_ZNK9__gnu_cxx17__normal_iteratorIPPiSt6vectorIS1_SaIS1_EEE4baseEv(i64* %result) local_unnamed_addr {
dec_label_pc_7f0:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !130
}
define i64 @_ZNKSt6vectorIPiSaIS0_EE6cbeginEv(i64* %result) local_unnamed_addr {
dec_label_pc_7fe:
%rax.0.reg2mem = alloca i64, !insn.addr !131
%0 = ptrtoint i64* %result to i64
%stack_var_-24 = alloca i64, align 8
%stack_var_-32 = alloca i64, align 8
%1 = call i64 @__readfsqword(i64 40), !insn.addr !132
store i64 %0, i64* %stack_var_-32, align 8, !insn.addr !133
%2 = bitcast i64* %stack_var_-32 to i32***, !insn.addr !134
%3 = call i64 @_ZN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS1_SaIS1_EEEC1ERKS3_(i64* nonnull %stack_var_-24, i32*** nonnull %2), !insn.addr !134
%4 = load i64, i64* %stack_var_-24, align 8, !insn.addr !135
%5 = call i64 @__readfsqword(i64 40), !insn.addr !136
%6 = icmp eq i64 %1, %5, !insn.addr !136
store i64 %4, i64* %rax.0.reg2mem, !insn.addr !137
br i1 %6, label %dec_label_pc_84f, label %dec_label_pc_84a, !insn.addr !137
dec_label_pc_84a: ; preds = %dec_label_pc_7fe
%7 = call i64 @__stack_chk_fail(), !insn.addr !138
store i64 %7, i64* %rax.0.reg2mem, !insn.addr !138
br label %dec_label_pc_84f, !insn.addr !138
dec_label_pc_84f: ; preds = %dec_label_pc_84a, %dec_label_pc_7fe
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !139
}
define i64 @_ZN9__gnu_cxxmiIPKPiSt6vectorIS1_SaIS1_EEEENS_17__normal_iteratorIT_T0_E15difference_typeERKSA_SD_(i64* %arg1, i64* %arg2) local_unnamed_addr {
dec_label_pc_851:
%0 = call i64 @_ZNK9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS1_SaIS1_EEE4baseEv(i64* %arg1), !insn.addr !140
%1 = inttoptr i64 %0 to i64*, !insn.addr !141
%2 = load i64, i64* %1, align 8, !insn.addr !141
%3 = call i64 @_ZNK9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS1_SaIS1_EEE4baseEv(i64* %arg2), !insn.addr !142
%4 = inttoptr i64 %3 to i64*, !insn.addr !143
%5 = load i64, i64* %4, align 8, !insn.addr !143
%6 = sub i64 %2, %5, !insn.addr !144
%7 = ashr i64 %6, 3, !insn.addr !145
ret i64 %7, !insn.addr !146
}
define i64 @_ZNSt6vectorIPiSaIS0_EE14_M_fill_insertEN9__gnu_cxx17__normal_iteratorIPS0_S2_EEmRKS0_(i64* %result, i64 %arg2, i64 %arg3, i32** %arg4) local_unnamed_addr {
dec_label_pc_894:
%rax.0.reg2mem = alloca i64, !insn.addr !147
%stack_var_-120 = alloca i64, align 8
%stack_var_-56 = alloca i64, align 8
%stack_var_-136 = alloca i64, align 8
store i64 %arg2, i64* %stack_var_-136, align 8, !insn.addr !148
%0 = call i64 @__readfsqword(i64 40), !insn.addr !149
%1 = icmp eq i64 %arg3, 0, !insn.addr !150
br i1 %1, label %dec_label_pc_d93, label %dec_label_pc_8d2, !insn.addr !151
dec_label_pc_8d2: ; preds = %dec_label_pc_894
%2 = ptrtoint i64* %result to i64
%3 = add i64 %2, ptrtoint ([3 x i8]* @global_var_10 to i64), !insn.addr !152
%4 = inttoptr i64 %3 to i64*, !insn.addr !152
%5 = load i64, i64* %4, align 8, !insn.addr !152
%6 = add i64 %2, 8, !insn.addr !153
%7 = inttoptr i64 %6 to i64*, !insn.addr !153
%8 = load i64, i64* %7, align 8, !insn.addr !153
%9 = sub i64 %5, %8, !insn.addr !154
%10 = ashr i64 %9, 3, !insn.addr !155
%11 = icmp ult i64 %10, %arg3
br i1 %11, label %dec_label_pc_b06, label %dec_label_pc_8fc, !insn.addr !156
dec_label_pc_8fc: ; preds = %dec_label_pc_8d2
%12 = ptrtoint i32** %arg4 to i64, !insn.addr !157
%13 = call i64 @_ZNSt6vectorIPiSaIS0_EE16_Temporary_valueC1IJRKS0_EEEPS2_DpOT_(i64* nonnull %stack_var_-56, i64* %result, i64 %12), !insn.addr !158
%14 = call i64 @_ZNSt6vectorIPiSaIS0_EE16_Temporary_value6_M_valEv(i64* nonnull %stack_var_-56), !insn.addr !159
%15 = inttoptr i64 %14 to i32**, !insn.addr !160
%16 = call i64 @_ZNSt6vectorIPiSaIS0_EE3endEv(i64* %result), !insn.addr !161
store i64 %16, i64* %stack_var_-120, align 8, !insn.addr !162
%17 = call i64 @_ZN9__gnu_cxxmiIPPiSt6vectorIS1_SaIS1_EEEENS_17__normal_iteratorIT_T0_E15difference_typeERKS9_SC_(i64* nonnull %stack_var_-120, i64* nonnull %stack_var_-136), !insn.addr !163
%18 = load i64, i64* %7, align 8, !insn.addr !164
%19 = inttoptr i64 %18 to i32**, !insn.addr !165
%20 = icmp ugt i64 %17, %arg3
%21 = call i64 @_ZNSt12_Vector_baseIPiSaIS0_EE19_M_get_Tp_allocatorEv(i64* %result)
br i1 %20, label %dec_label_pc_96a, label %dec_label_pc_a44, !insn.addr !166
dec_label_pc_96a: ; preds = %dec_label_pc_8fc
%22 = load i64, i64* %7, align 8, !insn.addr !167
%23 = mul i64 %arg3, 8, !insn.addr !168
%24 = sub i64 %22, %23, !insn.addr !169
%25 = inttoptr i64 %24 to i32**, !insn.addr !170
%26 = inttoptr i64 %22 to i32**, !insn.addr !170
%27 = inttoptr i64 %21 to i64*, !insn.addr !170
%28 = call i32** @_ZSt22__uninitialized_move_aIPPiS1_SaIS0_EET0_T_S4_S3_RT1_(i32** %25, i32** %26, i32** %26, i64* %27), !insn.addr !170
%29 = load i64, i64* %7, align 8, !insn.addr !171
%30 = add i64 %29, %23, !insn.addr !172
store i64 %30, i64* %7, align 8, !insn.addr !173
%31 = sub i64 %18, %23, !insn.addr !174
%32 = call i64 @_ZNK9__gnu_cxx17__normal_iteratorIPPiSt6vectorIS1_SaIS1_EEE4baseEv(i64* nonnull %stack_var_-136), !insn.addr !175
%33 = inttoptr i64 %32 to i64*, !insn.addr !176
%34 = load i64, i64* %33, align 8, !insn.addr !176
%35 = inttoptr i64 %34 to i32**, !insn.addr !177
%36 = inttoptr i64 %31 to i32**, !insn.addr !177
%37 = call i32** @_ZSt13move_backwardIPPiS1_ET0_T_S3_S2_(i32** %35, i32** %36, i32** %19), !insn.addr !177
%38 = call i64 @_ZNK9__gnu_cxx17__normal_iteratorIPPiSt6vectorIS1_SaIS1_EEE4baseEv(i64* nonnull %stack_var_-136), !insn.addr !178
%39 = inttoptr i64 %38 to i64*, !insn.addr !179
%40 = load i64, i64* %39, align 8, !insn.addr !179
%41 = add i64 %40, %23, !insn.addr !180
%42 = call i64 @_ZNK9__gnu_cxx17__normal_iteratorIPPiSt6vectorIS1_SaIS1_EEE4baseEv(i64* nonnull %stack_var_-136), !insn.addr !181
%43 = inttoptr i64 %42 to i64*, !insn.addr !182
%44 = load i64, i64* %43, align 8, !insn.addr !182
%45 = inttoptr i64 %44 to i32**, !insn.addr !183
%46 = inttoptr i64 %41 to i32**, !insn.addr !183
call void @_ZSt4fillIPPiS0_EvT_S2_RKT0_(i32** %45, i32** %46, i32** %15), !insn.addr !183
br label %dec_label_pc_af5, !insn.addr !184
dec_label_pc_a44: ; preds = %dec_label_pc_8fc
%47 = sub i64 %arg3, %17, !insn.addr !185
%48 = load i64, i64* %7, align 8, !insn.addr !186
%49 = inttoptr i64 %48 to i32**, !insn.addr !187
%50 = inttoptr i64 %21 to i64*, !insn.addr !187
%51 = call i32** @_ZSt24__uninitialized_fill_n_aIPPimS0_S0_ET_S2_T0_RKT1_RSaIT2_E(i32** %49, i64 %47, i32** %15, i64* %50), !insn.addr !187
%52 = ptrtoint i32** %51 to i64, !insn.addr !187
store i64 %52, i64* %7, align 8, !insn.addr !188
%53 = call i64 @_ZNSt12_Vector_baseIPiSaIS0_EE19_M_get_Tp_allocatorEv(i64* %result), !insn.addr !189
%54 = load i64, i64* %7, align 8, !insn.addr !190
%55 = call i64 @_ZNK9__gnu_cxx17__normal_iteratorIPPiSt6vectorIS1_SaIS1_EEE4baseEv(i64* nonnull %stack_var_-136), !insn.addr !191
%56 = inttoptr i64 %55 to i64*, !insn.addr !192
%57 = load i64, i64* %56, align 8, !insn.addr !192
%58 = inttoptr i64 %57 to i32**, !insn.addr !193
%59 = inttoptr i64 %54 to i32**, !insn.addr !193
%60 = inttoptr i64 %53 to i64*, !insn.addr !193
%61 = call i32** @_ZSt22__uninitialized_move_aIPPiS1_SaIS0_EET0_T_S4_S3_RT1_(i32** %58, i32** %19, i32** %59, i64* %60), !insn.addr !193
%62 = load i64, i64* %7, align 8, !insn.addr !194
%63 = mul i64 %17, 8, !insn.addr !195
%64 = add i64 %62, %63, !insn.addr !196
store i64 %64, i64* %7, align 8, !insn.addr !197
%65 = call i64 @_ZNK9__gnu_cxx17__normal_iteratorIPPiSt6vectorIS1_SaIS1_EEE4baseEv(i64* nonnull %stack_var_-136), !insn.addr !198
%66 = inttoptr i64 %65 to i64*, !insn.addr !199
%67 = load i64, i64* %66, align 8, !insn.addr !199
%68 = inttoptr i64 %67 to i32**, !insn.addr !200
call void @_ZSt4fillIPPiS0_EvT_S2_RKT0_(i32** %68, i32** %19, i32** %15), !insn.addr !200
br label %dec_label_pc_af5, !insn.addr !200
dec_label_pc_af5: ; preds = %dec_label_pc_a44, %dec_label_pc_96a
%69 = call i64 @_ZNSt6vectorIPiSaIS0_EE16_Temporary_valueD1Ev(i64* nonnull %stack_var_-56), !insn.addr !201
br label %dec_label_pc_d93, !insn.addr !202
dec_label_pc_b06: ; preds = %dec_label_pc_8d2
%70 = call i64 @_ZNKSt6vectorIPiSaIS0_EE12_M_check_lenEmPKc(i64* %result, i64 %arg3, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @global_var_3b7, i64 0, i64 0)), !insn.addr !203
%71 = call i64 @_ZNSt6vectorIPiSaIS0_EE5beginEv(i64* %result), !insn.addr !204
store i64 %71, i64* %stack_var_-120, align 8, !insn.addr !205
%72 = call i64 @_ZN9__gnu_cxxmiIPPiSt6vectorIS1_SaIS1_EEEENS_17__normal_iteratorIT_T0_E15difference_typeERKS9_SC_(i64* nonnull %stack_var_-136, i64* nonnull %stack_var_-120), !insn.addr !206
%73 = call i64 @_ZNSt12_Vector_baseIPiSaIS0_EE11_M_allocateEm(i64* %result, i64 %70), !insn.addr !207
%74 = call i64 @_ZNSt12_Vector_baseIPiSaIS0_EE19_M_get_Tp_allocatorEv(i64* %result), !insn.addr !208
%75 = mul i64 %72, 8, !insn.addr !209
%76 = add i64 %75, %73, !insn.addr !210
%77 = inttoptr i64 %76 to i32**, !insn.addr !211
%78 = inttoptr i64 %74 to i64*, !insn.addr !211
%79 = call i32** @_ZSt24__uninitialized_fill_n_aIPPimS0_S0_ET_S2_T0_RKT1_RSaIT2_E(i32** %77, i64 %arg3, i32** %arg4, i64* %78), !insn.addr !211
%80 = call i64 @_ZNSt12_Vector_baseIPiSaIS0_EE19_M_get_Tp_allocatorEv(i64* %result), !insn.addr !212
%81 = call i64 @_ZNK9__gnu_cxx17__normal_iteratorIPPiSt6vectorIS1_SaIS1_EEE4baseEv(i64* nonnull %stack_var_-136), !insn.addr !213
%82 = inttoptr i64 %81 to i64*, !insn.addr !214
%83 = load i64, i64* %82, align 8, !insn.addr !214
%84 = bitcast i64* %stack_var_-136 to i32**, !insn.addr !215
%85 = inttoptr i64 %83 to i32**, !insn.addr !215
%86 = inttoptr i64 %73 to i32**, !insn.addr !215
%87 = inttoptr i64 %80 to i64*, !insn.addr !215
%88 = call i32** @_ZSt34__uninitialized_move_if_noexcept_aIPPiS1_SaIS0_EET0_T_S4_S3_RT1_(i32** nonnull %84, i32** %85, i32** %86, i64* %87), !insn.addr !215
%89 = ptrtoint i32** %88 to i64, !insn.addr !215
%90 = mul i64 %arg3, 8, !insn.addr !216
%91 = add i64 %90, %89, !insn.addr !217
%92 = call i64 @_ZNSt12_Vector_baseIPiSaIS0_EE19_M_get_Tp_allocatorEv(i64* %result), !insn.addr !218
%93 = load i64, i64* %7, align 8, !insn.addr !219
%94 = call i64 @_ZNK9__gnu_cxx17__normal_iteratorIPPiSt6vectorIS1_SaIS1_EEE4baseEv(i64* nonnull %stack_var_-136), !insn.addr !220
%95 = inttoptr i64 %94 to i64*, !insn.addr !221
%96 = load i64, i64* %95, align 8, !insn.addr !221
%97 = inttoptr i64 %96 to i32**, !insn.addr !222
%98 = inttoptr i64 %93 to i32**, !insn.addr !222
%99 = inttoptr i64 %91 to i32**, !insn.addr !222
%100 = inttoptr i64 %92 to i64*, !insn.addr !222
%101 = call i32** @_ZSt34__uninitialized_move_if_noexcept_aIPPiS1_SaIS0_EET0_T_S4_S3_RT1_(i32** %97, i32** %98, i32** %99, i64* %100), !insn.addr !222
%102 = ptrtoint i32** %101 to i64, !insn.addr !222
%103 = call i64 @_ZNSt12_Vector_baseIPiSaIS0_EE19_M_get_Tp_allocatorEv(i64* %result), !insn.addr !223
%104 = load i64, i64* %7, align 8, !insn.addr !224
%105 = bitcast i64* %result to i32**, !insn.addr !225
%106 = inttoptr i64 %104 to i32**, !insn.addr !225
%107 = inttoptr i64 %103 to i64*, !insn.addr !225
call void @_ZSt8_DestroyIPPiS0_EvT_S2_RSaIT0_E(i32** %105, i32** %106, i64* %107), !insn.addr !225
%108 = load i64, i64* %4, align 8, !insn.addr !226
%109 = sub i64 %108, %2, !insn.addr !227
%110 = ashr i64 %109, 3, !insn.addr !228
%111 = call i64 @_ZNSt12_Vector_baseIPiSaIS0_EE13_M_deallocateEPS0_m(i64* %result, i32** %105, i64 %110), !insn.addr !229
store i64 %73, i64* %result, align 8, !insn.addr !230
store i64 %102, i64* %7, align 8, !insn.addr !231
%112 = mul i64 %70, 8, !insn.addr !232
%113 = add i64 %73, %112, !insn.addr !233
store i64 %113, i64* %4, align 8, !insn.addr !234
br label %dec_label_pc_d93, !insn.addr !235
dec_label_pc_d93: ; preds = %dec_label_pc_b06, %dec_label_pc_af5, %dec_label_pc_894
%114 = call i64 @__readfsqword(i64 40), !insn.addr !236
%115 = icmp eq i64 %0, %114, !insn.addr !236
store i64 0, i64* %rax.0.reg2mem, !insn.addr !237
br i1 %115, label %dec_label_pc_da8, label %dec_label_pc_da3, !insn.addr !237
dec_label_pc_da3: ; preds = %dec_label_pc_d93
%116 = call i64 @__stack_chk_fail(), !insn.addr !238
store i64 %116, i64* %rax.0.reg2mem, !insn.addr !238
br label %dec_label_pc_da8, !insn.addr !238
dec_label_pc_da8: ; preds = %dec_label_pc_da3, %dec_label_pc_d93
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !239
}
define i64 @_ZNSt6vectorIPiSaIS0_EE5beginEv(i64* %result) local_unnamed_addr {
dec_label_pc_db2:
%rax.0.reg2mem = alloca i64, !insn.addr !240
%stack_var_-24 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !241
%1 = bitcast i64* %result to i32***, !insn.addr !242
%2 = call i64 @_ZN9__gnu_cxx17__normal_iteratorIPPiSt6vectorIS1_SaIS1_EEEC1ERKS2_(i64* nonnull %stack_var_-24, i32*** %1), !insn.addr !242
%3 = load i64, i64* %stack_var_-24, align 8, !insn.addr !243
%4 = call i64 @__readfsqword(i64 40), !insn.addr !244
%5 = icmp eq i64 %0, %4, !insn.addr !244
store i64 %3, i64* %rax.0.reg2mem, !insn.addr !245
br i1 %5, label %dec_label_pc_df8, label %dec_label_pc_df3, !insn.addr !245
dec_label_pc_df3: ; preds = %dec_label_pc_db2
%6 = call i64 @__stack_chk_fail(), !insn.addr !246
store i64 %6, i64* %rax.0.reg2mem, !insn.addr !246
br label %dec_label_pc_df8, !insn.addr !246
dec_label_pc_df8: ; preds = %dec_label_pc_df3, %dec_label_pc_db2
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !247
}
define i64 @_ZNK9__gnu_cxx17__normal_iteratorIPPiSt6vectorIS1_SaIS1_EEEplEl(i64* %result, i32 %arg2) local_unnamed_addr {
dec_label_pc_dfa:
%rax.0.reg2mem = alloca i64, !insn.addr !248
%0 = ptrtoint i64* %result to i64
%stack_var_-24 = alloca i64, align 8
%stack_var_-32 = alloca i64, align 8
%1 = call i64 @__readfsqword(i64 40), !insn.addr !249
%2 = sext i32 %arg2 to i64, !insn.addr !250
%3 = mul i64 %2, 8, !insn.addr !251
%4 = add i64 %3, %0, !insn.addr !252
store i64 %4, i64* %stack_var_-32, align 8, !insn.addr !253
%5 = bitcast i64* %stack_var_-32 to i32***, !insn.addr !254
%6 = call i64 @_ZN9__gnu_cxx17__normal_iteratorIPPiSt6vectorIS1_SaIS1_EEEC1ERKS2_(i64* nonnull %stack_var_-24, i32*** nonnull %5), !insn.addr !254
%7 = load i64, i64* %stack_var_-24, align 8, !insn.addr !255
%8 = call i64 @__readfsqword(i64 40), !insn.addr !256
%9 = icmp eq i64 %1, %8, !insn.addr !256
store i64 %7, i64* %rax.0.reg2mem, !insn.addr !257
br i1 %9, label %dec_label_pc_e5a, label %dec_label_pc_e55, !insn.addr !257
dec_label_pc_e55: ; preds = %dec_label_pc_dfa
%10 = call i64 @__stack_chk_fail(), !insn.addr !258
store i64 %10, i64* %rax.0.reg2mem, !insn.addr !258
br label %dec_label_pc_e5a, !insn.addr !258
dec_label_pc_e5a: ; preds = %dec_label_pc_e55, %dec_label_pc_dfa
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !259
}
define i64 @_ZNKSt6vectorIPiSaIS0_EE4sizeEv(i64* %result) local_unnamed_addr {
dec_label_pc_e5c:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 8, !insn.addr !260
%2 = inttoptr i64 %1 to i64*, !insn.addr !260
%3 = load i64, i64* %2, align 8, !insn.addr !260
%4 = sub i64 %3, %0, !insn.addr !261
%5 = ashr i64 %4, 3, !insn.addr !262
ret i64 %5, !insn.addr !263
}
define i64 @_ZN9__gnu_cxx14__alloc_traitsISaIPiEE17_S_select_on_copyERKS2_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_e82:
%rax.0.reg2mem = alloca i64, !insn.addr !264
%0 = ptrtoint i64* %result to i64
%1 = call i64 @__readfsqword(i64 40), !insn.addr !265
%2 = call i64 @_ZNSt16allocator_traitsISaIPiEE37select_on_container_copy_constructionERKS1_(i64* %result, i64* %arg2), !insn.addr !266
%3 = call i64 @__readfsqword(i64 40), !insn.addr !267
%4 = icmp eq i64 %1, %3, !insn.addr !267
store i64 %0, i64* %rax.0.reg2mem, !insn.addr !268
br i1 %4, label %dec_label_pc_ecc, label %dec_label_pc_ec7, !insn.addr !268
dec_label_pc_ec7: ; preds = %dec_label_pc_e82
%5 = call i64 @__stack_chk_fail(), !insn.addr !269
store i64 %5, i64* %rax.0.reg2mem, !insn.addr !269
br label %dec_label_pc_ecc, !insn.addr !269
dec_label_pc_ecc: ; preds = %dec_label_pc_ec7, %dec_label_pc_e82
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !270
}
define i64 @_ZNKSt12_Vector_baseIPiSaIS0_EE19_M_get_Tp_allocatorEv(i64* %result) local_unnamed_addr {
dec_label_pc_ece:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !271
}
define i64 @_ZNSaIPiED1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_edc:
%0 = call i64 @_ZN9__gnu_cxx13new_allocatorIPiED1Ev(i64* %result), !insn.addr !272
ret i64 %0, !insn.addr !273
}
define i64 @_ZNSt12_Vector_baseIPiSaIS0_EEC1EmRKS1_(i64* %result, i64 %arg2, i64* %arg3) local_unnamed_addr {
dec_label_pc_ef8:
%0 = call i64 @_ZNSt12_Vector_baseIPiSaIS0_EE12_Vector_implC1ERKS1_(i64* %result, i64* %arg3), !insn.addr !274
%1 = call i64 @_ZNSt12_Vector_baseIPiSaIS0_EE17_M_create_storageEm(i64* %result, i64 %arg2), !insn.addr !275
ret i64 %1, !insn.addr !276
}
define i64 @_ZNKSt6vectorIPiSaIS0_EE5beginEv(i64* %result) local_unnamed_addr {
dec_label_pc_f56:
%rax.0.reg2mem = alloca i64, !insn.addr !277
%0 = ptrtoint i64* %result to i64
%stack_var_-24 = alloca i64, align 8
%stack_var_-32 = alloca i64, align 8
%1 = call i64 @__readfsqword(i64 40), !insn.addr !278
store i64 %0, i64* %stack_var_-32, align 8, !insn.addr !279
%2 = bitcast i64* %stack_var_-32 to i32***, !insn.addr !280
%3 = call i64 @_ZN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS1_SaIS1_EEEC1ERKS3_(i64* nonnull %stack_var_-24, i32*** nonnull %2), !insn.addr !280
%4 = load i64, i64* %stack_var_-24, align 8, !insn.addr !281
%5 = call i64 @__readfsqword(i64 40), !insn.addr !282
%6 = icmp eq i64 %1, %5, !insn.addr !282
store i64 %4, i64* %rax.0.reg2mem, !insn.addr !283
br i1 %6, label %dec_label_pc_fa7, label %dec_label_pc_fa2, !insn.addr !283
dec_label_pc_fa2: ; preds = %dec_label_pc_f56
%7 = call i64 @__stack_chk_fail(), !insn.addr !284
store i64 %7, i64* %rax.0.reg2mem, !insn.addr !284
br label %dec_label_pc_fa7, !insn.addr !284
dec_label_pc_fa7: ; preds = %dec_label_pc_fa2, %dec_label_pc_f56
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !285
}
define i64 @_ZNKSt6vectorIPiSaIS0_EE3endEv(i64* %result) local_unnamed_addr {
dec_label_pc_faa:
%rax.0.reg2mem = alloca i64, !insn.addr !286
%0 = ptrtoint i64* %result to i64
%stack_var_-24 = alloca i64, align 8
%stack_var_-32 = alloca i64, align 8
%1 = call i64 @__readfsqword(i64 40), !insn.addr !287
%2 = add i64 %0, 8, !insn.addr !288
%3 = inttoptr i64 %2 to i64*, !insn.addr !288
%4 = load i64, i64* %3, align 8, !insn.addr !288
store i64 %4, i64* %stack_var_-32, align 8, !insn.addr !289
%5 = bitcast i64* %stack_var_-32 to i32***, !insn.addr !290
%6 = call i64 @_ZN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS1_SaIS1_EEEC1ERKS3_(i64* nonnull %stack_var_-24, i32*** nonnull %5), !insn.addr !290
%7 = load i64, i64* %stack_var_-24, align 8, !insn.addr !291
%8 = call i64 @__readfsqword(i64 40), !insn.addr !292
%9 = icmp eq i64 %1, %8, !insn.addr !292
store i64 %7, i64* %rax.0.reg2mem, !insn.addr !293
br i1 %9, label %dec_label_pc_ffc, label %dec_label_pc_ff7, !insn.addr !293
dec_label_pc_ff7: ; preds = %dec_label_pc_faa
%10 = call i64 @__stack_chk_fail(), !insn.addr !294
store i64 %10, i64* %rax.0.reg2mem, !insn.addr !294
br label %dec_label_pc_ffc, !insn.addr !294
dec_label_pc_ffc: ; preds = %dec_label_pc_ff7, %dec_label_pc_faa
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !295
}
define i32** @_ZSt22__uninitialized_copy_aIN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS2_SaIS2_EEEEPS2_S2_ET0_T_SB_SA_RSaIT1_E(i64 %arg1, i64 %arg2, i32** %arg3, i64* %arg4) local_unnamed_addr {
dec_label_pc_ffe:
%0 = call i32** @_ZSt18uninitialized_copyIN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS2_SaIS2_EEEEPS2_ET0_T_SB_SA_(i64 %arg1, i64 %arg2, i32** %arg3), !insn.addr !296
ret i32** %0, !insn.addr !297
}
define i64 @_ZNSt12_Vector_baseIPiSaIS0_EE12_Vector_implC1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_1030:
%0 = ptrtoint i64* %result to i64
%1 = call i64 @_ZNSaIPiEC1Ev(i64* %result), !insn.addr !298
store i64 0, i64* %result, align 8, !insn.addr !299
%2 = add i64 %0, 8, !insn.addr !300
%3 = inttoptr i64 %2 to i64*, !insn.addr !300
store i64 0, i64* %3, align 8, !insn.addr !300
%4 = add i64 %0, ptrtoint ([3 x i8]* @global_var_10 to i64), !insn.addr !301
%5 = inttoptr i64 %4 to i64*, !insn.addr !301
store i64 0, i64* %5, align 8, !insn.addr !301
ret i64 %0, !insn.addr !302
}
define i64 @_ZNSt12_Vector_baseIPiSaIS0_EE13_M_deallocateEPS0_m(i64* %result, i32** %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_106e:
%rax.0.reg2mem = alloca i64, !insn.addr !303
%0 = icmp eq i32** %arg2, null, !insn.addr !304
br i1 %0, label %dec_label_pc_10a0, label %dec_label_pc_1089, !insn.addr !305
dec_label_pc_1089: ; preds = %dec_label_pc_106e
%1 = call i64 @_ZNSt16allocator_traitsISaIPiEE10deallocateERS1_PS0_m(i64* %result, i32** nonnull %arg2, i64 %arg3), !insn.addr !306
store i64 %1, i64* %rax.0.reg2mem, !insn.addr !306
br label %dec_label_pc_10a0, !insn.addr !306
dec_label_pc_10a0: ; preds = %dec_label_pc_1089, %dec_label_pc_106e
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !307
}
define void @_ZSt8_DestroyIPPiEvT_S2_(i32** %arg1, i32** %arg2) local_unnamed_addr {
dec_label_pc_10a3:
call void @_ZNSt12_Destroy_auxILb1EE9__destroyIPPiEEvT_S4_(i32** %arg1, i32** %arg2), !insn.addr !308
ret void, !insn.addr !309
}
define i64 @_ZN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS1_SaIS1_EEEC1ERKS3_(i64* %result, i32*** %arg2) local_unnamed_addr {
dec_label_pc_10ca:
%0 = ptrtoint i32*** %arg2 to i64
%1 = ptrtoint i64* %result to i64
store i64 %0, i64* %result, align 8, !insn.addr !310
ret i64 %1, !insn.addr !311
}
define i64 @_ZNK9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS1_SaIS1_EEE4baseEv(i64* %result) local_unnamed_addr {
dec_label_pc_10e8:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !312
}
define i32*** @_ZSt7forwardIRKPiEOT_RNSt16remove_referenceIS3_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_10f6:
%0 = bitcast i64* %arg1 to i32***, !insn.addr !313
ret i32*** %0, !insn.addr !313
}
define i64 @_ZNSt6vectorIPiSaIS0_EE16_Temporary_valueC1IJRKS0_EEEPS2_DpOT_(i64* %result, i64* %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_1104:
%0 = ptrtoint i64* %arg2 to i64
store i64 %0, i64* %result, align 8, !insn.addr !314
%1 = inttoptr i64 %arg3 to i64*, !insn.addr !315
%2 = call i32*** @_ZSt7forwardIRKPiEOT_RNSt16remove_referenceIS3_E4typeE(i64* %1), !insn.addr !315
%3 = ptrtoint i32*** %2 to i64, !insn.addr !315
%4 = call i64 @_ZNSt6vectorIPiSaIS0_EE16_Temporary_value6_M_ptrEv(i64* %result), !insn.addr !316
%5 = inttoptr i64 %4 to i32**, !insn.addr !317
call void @_ZNSt16allocator_traitsISaIPiEE9constructIS0_JRKS0_EEEvRS1_PT_DpOT0_(i64* %result, i32** %5, i64 %3), !insn.addr !317
ret i64 ptrtoint (i32* @0 to i64), !insn.addr !318
}
define i64 @_ZNSt6vectorIPiSaIS0_EE16_Temporary_valueD1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_1160:
%0 = call i64 @_ZNSt6vectorIPiSaIS0_EE16_Temporary_value6_M_ptrEv(i64* %result), !insn.addr !319
%1 = inttoptr i64 %0 to i32**, !insn.addr !320
call void @_ZNSt16allocator_traitsISaIPiEE7destroyIS0_EEvRS1_PT_(i64* %result, i32** %1), !insn.addr !320
ret i64 ptrtoint (i32* @0 to i64), !insn.addr !321
}
define i64 @_ZNSt6vectorIPiSaIS0_EE16_Temporary_value6_M_valEv(i64* %result) local_unnamed_addr {
dec_label_pc_1190:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 8, !insn.addr !322
ret i64 %1, !insn.addr !323
}
define i64 @_ZN9__gnu_cxxmiIPPiSt6vectorIS1_SaIS1_EEEENS_17__normal_iteratorIT_T0_E15difference_typeERKS9_SC_(i64* %arg1, i64* %arg2) local_unnamed_addr {
dec_label_pc_11a2:
%0 = call i64 @_ZNK9__gnu_cxx17__normal_iteratorIPPiSt6vectorIS1_SaIS1_EEE4baseEv(i64* %arg1), !insn.addr !324
%1 = inttoptr i64 %0 to i64*, !insn.addr !325
%2 = load i64, i64* %1, align 8, !insn.addr !325
%3 = call i64 @_ZNK9__gnu_cxx17__normal_iteratorIPPiSt6vectorIS1_SaIS1_EEE4baseEv(i64* %arg2), !insn.addr !326
%4 = inttoptr i64 %3 to i64*, !insn.addr !327
%5 = load i64, i64* %4, align 8, !insn.addr !327
%6 = sub i64 %2, %5, !insn.addr !328
%7 = ashr i64 %6, 3, !insn.addr !329
ret i64 %7, !insn.addr !330
}
define i32** @_ZSt22__uninitialized_move_aIPPiS1_SaIS0_EET0_T_S4_S3_RT1_(i32** %arg1, i32** %arg2, i32** %arg3, i64* %arg4) local_unnamed_addr {
dec_label_pc_11e5:
%0 = call i64 @_ZSt18make_move_iteratorIPPiESt13move_iteratorIT_ES3_(i32** %arg2), !insn.addr !331
%1 = call i64 @_ZSt18make_move_iteratorIPPiESt13move_iteratorIT_ES3_(i32** %arg1), !insn.addr !332
%2 = call i32** @_ZSt22__uninitialized_copy_aISt13move_iteratorIPPiES2_S1_ET0_T_S5_S4_RSaIT1_E(i64 %1, i64 %0, i32** %arg3, i64* %arg4), !insn.addr !333
ret i32** %2, !insn.addr !334
}
define i32** @_ZSt13move_backwardIPPiS1_ET0_T_S3_S2_(i32** %arg1, i32** %arg2, i32** %arg3) local_unnamed_addr {
dec_label_pc_1239:
%0 = call i32** @_ZSt12__miter_baseIPPiET_S2_(i32** %arg2), !insn.addr !335
%1 = call i32** @_ZSt12__miter_baseIPPiET_S2_(i32** %arg1), !insn.addr !336
%2 = call i32** @_ZSt23__copy_move_backward_a2ILb1EPPiS1_ET1_T0_S3_S2_(i32** %1, i32** %0, i32** %arg3), !insn.addr !337
ret i32** %2, !insn.addr !338
}
define void @_ZSt4fillIPPiS0_EvT_S2_RKT0_(i32** %arg1, i32** %arg2, i32** %arg3) local_unnamed_addr {
dec_label_pc_1285:
%0 = ptrtoint i32** %arg3 to i64
%1 = call i32** @_ZSt12__niter_baseIPPiET_S2_(i32** %arg2), !insn.addr !339
%2 = ptrtoint i32** %1 to i64, !insn.addr !339
%3 = call i32** @_ZSt12__niter_baseIPPiET_S2_(i32** %arg1), !insn.addr !340
%4 = ptrtoint i32** %3 to i64, !insn.addr !340
%5 = call i64 @_ZSt8__fill_aIPPiS0_EN9__gnu_cxx11__enable_ifIXsrSt11__is_scalarIT0_E7__valueEvE6__typeET_S9_RKS5_(i64 %4, i64 %2, i64 %0), !insn.addr !341
ret void, !insn.addr !342
}
define i32** @_ZSt24__uninitialized_fill_n_aIPPimS0_S0_ET_S2_T0_RKT1_RSaIT2_E(i32** %arg1, i64 %arg2, i32** %arg3, i64* %arg4) local_unnamed_addr {
dec_label_pc_12d2:
%0 = call i32** @_ZSt20uninitialized_fill_nIPPimS0_ET_S2_T0_RKT1_(i32** %arg1, i64 %arg2, i32** %arg3), !insn.addr !343
ret i32** %0, !insn.addr !344
}
define i64 @_ZNKSt6vectorIPiSaIS0_EE12_M_check_lenEmPKc(i64* %result, i64 %arg2, i8* %arg3) local_unnamed_addr {
dec_label_pc_1304:
%rax.0.reg2mem = alloca i64, !insn.addr !345
%storemerge.reg2mem = alloca i64, !insn.addr !345
%stack_var_-48 = alloca i64, align 8
%stack_var_-72 = alloca i64, align 8
store i64 %arg2, i64* %stack_var_-72, align 8, !insn.addr !346
%0 = call i64 @__readfsqword(i64 40), !insn.addr !347
%1 = call i64 @_ZNKSt6vectorIPiSaIS0_EE8max_sizeEv(i64* %result), !insn.addr !348
%2 = call i64 @_ZNKSt6vectorIPiSaIS0_EE4sizeEv(i64* %result), !insn.addr !349
%3 = sub i64 %1, %2, !insn.addr !350
%4 = icmp ult i64 %3, %arg2, !insn.addr !351
%5 = icmp eq i1 %4, false, !insn.addr !352
br i1 %5, label %dec_label_pc_1363, label %dec_label_pc_1357, !insn.addr !353
dec_label_pc_1357: ; preds = %dec_label_pc_1304
%6 = call i64 @_ZSt20__throw_length_errorPKc(i8* %arg3), !insn.addr !354
br label %dec_label_pc_1363, !insn.addr !354
dec_label_pc_1363: ; preds = %dec_label_pc_1357, %dec_label_pc_1304
%7 = call i64 @_ZNKSt6vectorIPiSaIS0_EE4sizeEv(i64* %result), !insn.addr !355
%8 = call i64 @_ZNKSt6vectorIPiSaIS0_EE4sizeEv(i64* %result), !insn.addr !356
store i64 %8, i64* %stack_var_-48, align 8, !insn.addr !357
%9 = call i64* @_ZSt3maxImERKT_S2_S2_(i64* nonnull %stack_var_-48, i64* nonnull %stack_var_-72), !insn.addr !358
%10 = load i64, i64* %9, align 8, !insn.addr !359
%11 = add i64 %10, %7, !insn.addr !360
%12 = call i64 @_ZNKSt6vectorIPiSaIS0_EE4sizeEv(i64* %result), !insn.addr !361
%13 = icmp ult i64 %11, %12, !insn.addr !362
br i1 %13, label %dec_label_pc_13c3, label %dec_label_pc_13b1, !insn.addr !363
dec_label_pc_13b1: ; preds = %dec_label_pc_1363
%14 = call i64 @_ZNKSt6vectorIPiSaIS0_EE8max_sizeEv(i64* %result), !insn.addr !364
%15 = icmp ugt i64 %11, %14
store i64 %11, i64* %storemerge.reg2mem, !insn.addr !365
br i1 %15, label %dec_label_pc_13c3, label %dec_label_pc_13d5, !insn.addr !365
dec_label_pc_13c3: ; preds = %dec_label_pc_13b1, %dec_label_pc_1363
%16 = call i64 @_ZNKSt6vectorIPiSaIS0_EE8max_sizeEv(i64* %result), !insn.addr !366
store i64 %16, i64* %storemerge.reg2mem, !insn.addr !367
br label %dec_label_pc_13d5, !insn.addr !367
dec_label_pc_13d5: ; preds = %dec_label_pc_13b1, %dec_label_pc_13c3
%storemerge.reload = load i64, i64* %storemerge.reg2mem
%17 = call i64 @__readfsqword(i64 40), !insn.addr !368
%18 = icmp eq i64 %0, %17, !insn.addr !368
store i64 %storemerge.reload, i64* %rax.0.reg2mem, !insn.addr !369
br i1 %18, label %dec_label_pc_13e9, label %dec_label_pc_13e4, !insn.addr !369
dec_label_pc_13e4: ; preds = %dec_label_pc_13d5
%19 = call i64 @__stack_chk_fail(), !insn.addr !370
store i64 %19, i64* %rax.0.reg2mem, !insn.addr !370
br label %dec_label_pc_13e9, !insn.addr !370
dec_label_pc_13e9: ; preds = %dec_label_pc_13e4, %dec_label_pc_13d5
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !371
}
define i64 @_ZNSt12_Vector_baseIPiSaIS0_EE11_M_allocateEm(i64* %result, i64 %arg2) local_unnamed_addr {
dec_label_pc_13f0:
%storemerge.reg2mem = alloca i64, !insn.addr !372
%0 = icmp eq i64 %arg2, 0, !insn.addr !373
store i64 0, i64* %storemerge.reg2mem, !insn.addr !374
br i1 %0, label %dec_label_pc_1421, label %dec_label_pc_1407, !insn.addr !374
dec_label_pc_1407: ; preds = %dec_label_pc_13f0
%1 = call i64 @_ZNSt16allocator_traitsISaIPiEE8allocateERS1_m(i64* %result, i64 %arg2), !insn.addr !375
store i64 %1, i64* %storemerge.reg2mem, !insn.addr !376
br label %dec_label_pc_1421, !insn.addr !376
dec_label_pc_1421: ; preds = %dec_label_pc_13f0, %dec_label_pc_1407
%storemerge.reload = load i64, i64* %storemerge.reg2mem
ret i64 %storemerge.reload, !insn.addr !377
}
define i32** @_ZSt34__uninitialized_move_if_noexcept_aIPPiS1_SaIS0_EET0_T_S4_S3_RT1_(i32** %arg1, i32** %arg2, i32** %arg3, i64* %arg4) local_unnamed_addr {
dec_label_pc_1423:
%0 = call i64 @_ZSt32__make_move_if_noexcept_iteratorIPiSt13move_iteratorIPS0_EET0_PT_(i32** %arg2), !insn.addr !378
%1 = call i64 @_ZSt32__make_move_if_noexcept_iteratorIPiSt13move_iteratorIPS0_EET0_PT_(i32** %arg1), !insn.addr !379
%2 = call i32** @_ZSt22__uninitialized_copy_aISt13move_iteratorIPPiES2_S1_ET0_T_S5_S4_RSaIT1_E(i64 %1, i64 %0, i32** %arg3, i64* %arg4), !insn.addr !380
ret i32** %2, !insn.addr !381
}
define i64 @_ZNSt16allocator_traitsISaIPiEE37select_on_container_copy_constructionERKS1_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_1477:
%0 = ptrtoint i64* %result to i64
%1 = call i64 @_ZNSaIPiEC1ERKS0_(i64* %result, i64* %arg2), !insn.addr !382
ret i64 %0, !insn.addr !383
}
define i64 @_ZNSaIPiEC1ERKS0_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_14a0:
%0 = call i64 @_ZN9__gnu_cxx13new_allocatorIPiEC1ERKS2_(i64* %result, i64* %arg2), !insn.addr !384
ret i64 %0, !insn.addr !385
}
define i64 @_ZN9__gnu_cxx13new_allocatorIPiED1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_14c6:
%0 = alloca i64
%1 = load i64, i64* %0
ret i64 %1, !insn.addr !386
}
define i64 @_ZNSt12_Vector_baseIPiSaIS0_EE12_Vector_implC1ERKS1_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_14d2:
%0 = ptrtoint i64* %result to i64
%1 = call i64 @_ZNSaIPiEC1ERKS0_(i64* %result, i64* %arg2), !insn.addr !387
store i64 0, i64* %result, align 8, !insn.addr !388
%2 = add i64 %0, 8, !insn.addr !389
%3 = inttoptr i64 %2 to i64*, !insn.addr !389
store i64 0, i64* %3, align 8, !insn.addr !389
%4 = add i64 %0, ptrtoint ([3 x i8]* @global_var_10 to i64), !insn.addr !390
%5 = inttoptr i64 %4 to i64*, !insn.addr !390
store i64 0, i64* %5, align 8, !insn.addr !390
ret i64 %0, !insn.addr !391
}
define i64 @_ZNSt12_Vector_baseIPiSaIS0_EE17_M_create_storageEm(i64* %result, i64 %arg2) local_unnamed_addr {
dec_label_pc_151c:
%0 = ptrtoint i64* %result to i64
%1 = call i64 @_ZNSt12_Vector_baseIPiSaIS0_EE11_M_allocateEm(i64* %result, i64 %arg2), !insn.addr !392
store i64 %1, i64* %result, align 8, !insn.addr !393
%2 = add i64 %0, 8, !insn.addr !394
%3 = inttoptr i64 %2 to i64*, !insn.addr !394
store i64 %0, i64* %3, align 8, !insn.addr !394
%4 = mul i64 %arg2, 8, !insn.addr !395
%5 = add i64 %4, %0, !insn.addr !396
%6 = add i64 %0, ptrtoint ([3 x i8]* @global_var_10 to i64), !insn.addr !397
%7 = inttoptr i64 %6 to i64*, !insn.addr !397
store i64 %5, i64* %7, align 8, !insn.addr !397
ret i64 %0, !insn.addr !398
}
define i32** @_ZSt18uninitialized_copyIN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS2_SaIS2_EEEEPS2_ET0_T_SB_SA_(i64 %arg1, i64 %arg2, i32** %arg3) local_unnamed_addr {
dec_label_pc_1575:
%0 = call i32** @_ZNSt20__uninitialized_copyILb1EE13__uninit_copyIN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS4_SaIS4_EEEEPS4_EET0_T_SD_SC_(i64 %arg1, i64 %arg2, i32** %arg3), !insn.addr !399
ret i32** %0, !insn.addr !400
}
define i64 @_ZNSaIPiEC1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_15a6:
%0 = call i64 @_ZN9__gnu_cxx13new_allocatorIPiEC1Ev(i64* %result), !insn.addr !401
ret i64 %0, !insn.addr !402
}
define i64 @_ZNSt16allocator_traitsISaIPiEE10deallocateERS1_PS0_m(i64* %arg1, i32** %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_15c1:
%0 = call i64 @_ZN9__gnu_cxx13new_allocatorIPiE10deallocateEPS1_m(i64* %arg1, i32** %arg2, i64 %arg3), !insn.addr !403
ret i64 %0, !insn.addr !404
}
define void @_ZNSt12_Destroy_auxILb1EE9__destroyIPPiEEvT_S4_(i32** %arg1, i32** %arg2) local_unnamed_addr {
dec_label_pc_15ef:
ret void, !insn.addr !405
}
define i64 @_ZNSt6vectorIPiSaIS0_EE16_Temporary_value6_M_ptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_15fe:
%0 = call i64 @_ZNSt6vectorIPiSaIS0_EE16_Temporary_value6_M_valEv(i64* %result), !insn.addr !406
%1 = inttoptr i64 %0 to i32**, !insn.addr !407
%2 = call i64 @_ZNSt14pointer_traitsIPPiE10pointer_toERS0_(i32** %1), !insn.addr !407
ret i64 %2, !insn.addr !408
}
define void @_ZNSt16allocator_traitsISaIPiEE9constructIS0_JRKS0_EEEvRS1_PT_DpOT0_(i64* %arg1, i32** %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_1620:
%0 = inttoptr i64 %arg3 to i64*, !insn.addr !409
%1 = call i32*** @_ZSt7forwardIRKPiEOT_RNSt16remove_referenceIS3_E4typeE(i64* %0), !insn.addr !409
%2 = ptrtoint i32*** %1 to i64, !insn.addr !409
call void @_ZN9__gnu_cxx13new_allocatorIPiE9constructIS1_JRKS1_EEEvPT_DpOT0_(i64* %arg1, i32** %arg2, i64 %2), !insn.addr !410
ret void, !insn.addr !411
}
define void @_ZNSt16allocator_traitsISaIPiEE7destroyIS0_EEvRS1_PT_(i64* %arg1, i32** %arg2) local_unnamed_addr {
dec_label_pc_1659:
call void @_ZN9__gnu_cxx13new_allocatorIPiE7destroyIS1_EEvPT_(i64* %arg1, i32** %arg2), !insn.addr !412
ret void, !insn.addr !413
}
define i64 @_ZSt18make_move_iteratorIPPiESt13move_iteratorIT_ES3_(i32** %arg1) local_unnamed_addr {
dec_label_pc_167f:
%rax.0.reg2mem = alloca i64, !insn.addr !414
%stack_var_-24 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !415
%1 = call i64 @_ZNSt13move_iteratorIPPiEC1ES1_(i64* nonnull %stack_var_-24, i32** %arg1), !insn.addr !416
%2 = load i64, i64* %stack_var_-24, align 8, !insn.addr !417
%3 = call i64 @__readfsqword(i64 40), !insn.addr !418
%4 = icmp eq i64 %0, %3, !insn.addr !418
store i64 %2, i64* %rax.0.reg2mem, !insn.addr !419
br i1 %4, label %dec_label_pc_16c5, label %dec_label_pc_16c0, !insn.addr !419
dec_label_pc_16c0: ; preds = %dec_label_pc_167f
%5 = call i64 @__stack_chk_fail(), !insn.addr !420
store i64 %5, i64* %rax.0.reg2mem, !insn.addr !420
br label %dec_label_pc_16c5, !insn.addr !420
dec_label_pc_16c5: ; preds = %dec_label_pc_16c0, %dec_label_pc_167f
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !421
}
define i32** @_ZSt22__uninitialized_copy_aISt13move_iteratorIPPiES2_S1_ET0_T_S5_S4_RSaIT1_E(i64 %arg1, i64 %arg2, i32** %arg3, i64* %arg4) local_unnamed_addr {
dec_label_pc_16c7:
%0 = call i32** @_ZSt18uninitialized_copyISt13move_iteratorIPPiES2_ET0_T_S5_S4_(i64 %arg1, i64 %arg2, i32** %arg3), !insn.addr !422
ret i32** %0, !insn.addr !423
}
define i32** @_ZSt12__miter_baseIPPiET_S2_(i32** %arg1) local_unnamed_addr {
dec_label_pc_16f8:
ret i32** %arg1, !insn.addr !424
}
define i32** @_ZSt23__copy_move_backward_a2ILb1EPPiS1_ET1_T0_S3_S2_(i32** %arg1, i32** %arg2, i32** %arg3) local_unnamed_addr {
dec_label_pc_1706:
%0 = call i32** @_ZSt12__niter_baseIPPiET_S2_(i32** %arg3), !insn.addr !425
%1 = call i32** @_ZSt12__niter_baseIPPiET_S2_(i32** %arg2), !insn.addr !426
%2 = call i32** @_ZSt12__niter_baseIPPiET_S2_(i32** %arg1), !insn.addr !427
%3 = call i32** @_ZSt22__copy_move_backward_aILb1EPPiS1_ET1_T0_S3_S2_(i32** %2, i32** %1, i32** %0), !insn.addr !428
ret i32** %3, !insn.addr !429
}
define i32** @_ZSt12__niter_baseIPPiET_S2_(i32** %arg1) local_unnamed_addr {
dec_label_pc_175e:
ret i32** %arg1, !insn.addr !430
}
define i64 @_ZSt8__fill_aIPPiS0_EN9__gnu_cxx11__enable_ifIXsrSt11__is_scalarIT0_E7__valueEvE6__typeET_S9_RKS5_(i64 %arg1, i64 %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_176c:
%stack_var_-32.0.lcssa.reg2mem = alloca i64, !insn.addr !431
%stack_var_-32.01.reg2mem = alloca i64, !insn.addr !431
%0 = icmp eq i64 %arg1, %arg2, !insn.addr !432
store i64 %arg1, i64* %stack_var_-32.01.reg2mem, !insn.addr !433
store i64 %arg1, i64* %stack_var_-32.0.lcssa.reg2mem, !insn.addr !433
br i1 %0, label %dec_label_pc_17a3, label %dec_label_pc_1791, !insn.addr !433
dec_label_pc_1791: ; preds = %dec_label_pc_176c, %dec_label_pc_1791
%stack_var_-32.01.reload = load i64, i64* %stack_var_-32.01.reg2mem
%1 = inttoptr i64 %stack_var_-32.01.reload to i64*, !insn.addr !434
store i64 %arg3, i64* %1, align 8, !insn.addr !434
%2 = add i64 %stack_var_-32.01.reload, 8, !insn.addr !435
%3 = icmp eq i64 %2, %arg2, !insn.addr !432
store i64 %2, i64* %stack_var_-32.01.reg2mem, !insn.addr !433
store i64 %arg2, i64* %stack_var_-32.0.lcssa.reg2mem, !insn.addr !433
br i1 %3, label %dec_label_pc_17a3, label %dec_label_pc_1791, !insn.addr !433
dec_label_pc_17a3: ; preds = %dec_label_pc_1791, %dec_label_pc_176c
%stack_var_-32.0.lcssa.reload = load i64, i64* %stack_var_-32.0.lcssa.reg2mem
ret i64 %stack_var_-32.0.lcssa.reload, !insn.addr !436
}
define i32** @_ZSt20uninitialized_fill_nIPPimS0_ET_S2_T0_RKT1_(i32** %arg1, i64 %arg2, i32** %arg3) local_unnamed_addr {
dec_label_pc_17a6:
%0 = call i32** @_ZNSt22__uninitialized_fill_nILb1EE15__uninit_fill_nIPPimS2_EET_S4_T0_RKT1_(i32** %arg1, i64 %arg2, i32** %arg3), !insn.addr !437
ret i32** %0, !insn.addr !438
}
define i64 @_ZNKSt6vectorIPiSaIS0_EE8max_sizeEv(i64* %result) local_unnamed_addr {
dec_label_pc_17d8:
%0 = call i64 @_ZNKSt12_Vector_baseIPiSaIS0_EE19_M_get_Tp_allocatorEv(i64* %result), !insn.addr !439
%1 = inttoptr i64 %0 to i64*, !insn.addr !440
%2 = call i64 @_ZNSt16allocator_traitsISaIPiEE8max_sizeERKS1_(i64* %1), !insn.addr !440
ret i64 %2, !insn.addr !441
}
define i64* @_ZSt3maxImERKT_S2_S2_(i64* %arg1, i64* %arg2) local_unnamed_addr {
dec_label_pc_17fa:
%0 = icmp ult i64* %arg1, %arg2, !insn.addr !442
%1 = icmp eq i1 %0, false, !insn.addr !443
%storemerge.v = select i1 %1, i64* %arg1, i64* %arg2
ret i64* %storemerge.v, !insn.addr !444
}
define i64 @_ZNSt16allocator_traitsISaIPiEE8allocateERS1_m(i64* %arg1, i64 %arg2) local_unnamed_addr {
dec_label_pc_1825:
%0 = call i64 @_ZN9__gnu_cxx13new_allocatorIPiE8allocateEmPKv(i64* %arg1, i64 %arg2, i64* null), !insn.addr !445
ret i64 %0, !insn.addr !446
}
define i64 @_ZSt32__make_move_if_noexcept_iteratorIPiSt13move_iteratorIPS0_EET0_PT_(i32** %arg1) local_unnamed_addr {
dec_label_pc_184f:
%rax.0.reg2mem = alloca i64, !insn.addr !447
%stack_var_-24 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !448
%1 = call i64 @_ZNSt13move_iteratorIPPiEC1ES1_(i64* nonnull %stack_var_-24, i32** %arg1), !insn.addr !449
%2 = load i64, i64* %stack_var_-24, align 8, !insn.addr !450
%3 = call i64 @__readfsqword(i64 40), !insn.addr !451
%4 = icmp eq i64 %0, %3, !insn.addr !451
store i64 %2, i64* %rax.0.reg2mem, !insn.addr !452
br i1 %4, label %dec_label_pc_1895, label %dec_label_pc_1890, !insn.addr !452
dec_label_pc_1890: ; preds = %dec_label_pc_184f
%5 = call i64 @__stack_chk_fail(), !insn.addr !453
store i64 %5, i64* %rax.0.reg2mem, !insn.addr !453
br label %dec_label_pc_1895, !insn.addr !453
dec_label_pc_1895: ; preds = %dec_label_pc_1890, %dec_label_pc_184f
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !454
}
define i64 @_ZN9__gnu_cxx13new_allocatorIPiEC1ERKS2_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_1898:
%0 = alloca i64
%1 = load i64, i64* %0
ret i64 %1, !insn.addr !455
}
define i32** @_ZNSt20__uninitialized_copyILb1EE13__uninit_copyIN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS4_SaIS4_EEEEPS4_EET0_T_SD_SC_(i64 %arg1, i64 %arg2, i32** %arg3) local_unnamed_addr {
dec_label_pc_18a7:
%0 = call i32** @_ZSt4copyIN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS2_SaIS2_EEEEPS2_ET0_T_SB_SA_(i64 %arg1, i64 %arg2, i32** %arg3), !insn.addr !456
ret i32** %0, !insn.addr !457
}
define i64 @_ZN9__gnu_cxx13new_allocatorIPiEC1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_18d4:
%0 = alloca i64
%1 = load i64, i64* %0
ret i64 %1, !insn.addr !458
}
define i64 @_ZN9__gnu_cxx13new_allocatorIPiE10deallocateEPS1_m(i64* %result, i32** %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_18e0:
%0 = bitcast i32** %arg2 to i64*, !insn.addr !459
%1 = call i64 @_ZdlPv(i64* %0), !insn.addr !459
ret i64 %1, !insn.addr !460
}
define i64 @_ZNSt14pointer_traitsIPPiE10pointer_toERS0_(i32** %arg1) local_unnamed_addr {
dec_label_pc_1903:
%0 = call i32** @_ZSt9addressofIPiEPT_RS1_(i32** %arg1), !insn.addr !461
%1 = ptrtoint i32** %0 to i64, !insn.addr !461
ret i64 %1, !insn.addr !462
}
define void @_ZN9__gnu_cxx13new_allocatorIPiE9constructIS1_JRKS1_EEEvPT_DpOT0_(i64* %result, i32** %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_191e:
%0 = inttoptr i64 %arg3 to i64*, !insn.addr !463
%1 = call i32*** @_ZSt7forwardIRKPiEOT_RNSt16remove_referenceIS3_E4typeE(i64* %0), !insn.addr !463
%2 = load i32**, i32*** %1, align 8, !insn.addr !464
%3 = bitcast i32** %arg2 to i64*, !insn.addr !465
%4 = call i64 @_ZnwmPv(i64 8, i64* %3), !insn.addr !465
%5 = icmp eq i64 %4, 0, !insn.addr !466
br i1 %5, label %dec_label_pc_195b, label %dec_label_pc_1958, !insn.addr !467
dec_label_pc_1958: ; preds = %dec_label_pc_191e
%6 = ptrtoint i32** %2 to i64, !insn.addr !464
%7 = inttoptr i64 %4 to i64*, !insn.addr !468
store i64 %6, i64* %7, align 8, !insn.addr !468
br label %dec_label_pc_195b, !insn.addr !468
dec_label_pc_195b: ; preds = %dec_label_pc_1958, %dec_label_pc_191e
ret void, !insn.addr !469
}
define void @_ZN9__gnu_cxx13new_allocatorIPiE7destroyIS1_EEvPT_(i64* %result, i32** %arg2) local_unnamed_addr {
dec_label_pc_1964:
ret void, !insn.addr !470
}
define i64 @_ZNSt13move_iteratorIPPiEC1ES1_(i64* %result, i32** %arg2) local_unnamed_addr {
dec_label_pc_1974:
%0 = ptrtoint i32** %arg2 to i64
%1 = ptrtoint i64* %result to i64
store i64 %0, i64* %result, align 8, !insn.addr !471
ret i64 %1, !insn.addr !472
}
define i32** @_ZSt18uninitialized_copyISt13move_iteratorIPPiES2_ET0_T_S5_S4_(i64 %arg1, i64 %arg2, i32** %arg3) local_unnamed_addr {
dec_label_pc_198e:
%0 = call i32** @_ZNSt20__uninitialized_copyILb1EE13__uninit_copyISt13move_iteratorIPPiES4_EET0_T_S7_S6_(i64 %arg1, i64 %arg2, i32** %arg3), !insn.addr !473
ret i32** %0, !insn.addr !474
}
define i32** @_ZSt22__copy_move_backward_aILb1EPPiS1_ET1_T0_S3_S2_(i32** %arg1, i32** %arg2, i32** %arg3) local_unnamed_addr {
dec_label_pc_19bf:
%0 = call i32** @_ZNSt20__copy_move_backwardILb1ELb1ESt26random_access_iterator_tagE13__copy_move_bIPiEEPT_PKS4_S7_S5_(i32** %arg1, i32** %arg2, i32** %arg3), !insn.addr !475
ret i32** %0, !insn.addr !476
}
define i32** @_ZNSt22__uninitialized_fill_nILb1EE15__uninit_fill_nIPPimS2_EET_S4_T0_RKT1_(i32** %arg1, i64 %arg2, i32** %arg3) local_unnamed_addr {
dec_label_pc_19f0:
%0 = call i32** @_ZSt6fill_nIPPimS0_ET_S2_T0_RKT1_(i32** %arg1, i64 %arg2, i32** %arg3), !insn.addr !477
ret i32** %0, !insn.addr !478
}
define i64 @_ZNSt16allocator_traitsISaIPiEE8max_sizeERKS1_(i64* %arg1) local_unnamed_addr {
dec_label_pc_1a1d:
%0 = call i64 @_ZNK9__gnu_cxx13new_allocatorIPiE8max_sizeEv(i64* %arg1), !insn.addr !479
ret i64 %0, !insn.addr !480
}
define i64 @_ZN9__gnu_cxx13new_allocatorIPiE8allocateEmPKv(i64* %result, i64 %arg2, i64* %arg3) local_unnamed_addr {
dec_label_pc_1a38:
%0 = call i64 @_ZNK9__gnu_cxx13new_allocatorIPiE8max_sizeEv(i64* %result), !insn.addr !481
%1 = icmp uge i64 %0, %arg2
%2 = icmp ne i1 %1, true, !insn.addr !482
%3 = icmp eq i1 %2, false, !insn.addr !483
br i1 %3, label %dec_label_pc_1a68, label %dec_label_pc_1a63, !insn.addr !484
dec_label_pc_1a63: ; preds = %dec_label_pc_1a38
%4 = call i64 @_ZSt17__throw_bad_allocv(), !insn.addr !485
br label %dec_label_pc_1a68, !insn.addr !485
dec_label_pc_1a68: ; preds = %dec_label_pc_1a63, %dec_label_pc_1a38
%5 = mul i64 %arg2, 8, !insn.addr !486
%6 = call i64 @_Znwm(i64 %5), !insn.addr !487
ret i64 %6, !insn.addr !488
}
define i32** @_ZSt4copyIN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS2_SaIS2_EEEEPS2_ET0_T_SB_SA_(i64 %arg1, i64 %arg2, i32** %arg3) local_unnamed_addr {
dec_label_pc_1a7a:
%0 = call i64 @_ZSt12__miter_baseIN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS2_SaIS2_EEEEET_S9_(i64 %arg2), !insn.addr !489
%1 = call i64 @_ZSt12__miter_baseIN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS2_SaIS2_EEEEET_S9_(i64 %arg1), !insn.addr !490
%2 = call i32** @_ZSt14__copy_move_a2ILb0EN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS2_SaIS2_EEEEPS2_ET1_T0_SB_SA_(i64 %1, i64 %0, i32** %arg3), !insn.addr !491
ret i32** %2, !insn.addr !492
}
define i32** @_ZSt9addressofIPiEPT_RS1_(i32** %arg1) local_unnamed_addr {
dec_label_pc_1ac6:
%0 = call i32** @_ZSt11__addressofIPiEPT_RS1_(i32** %arg1), !insn.addr !493
ret i32** %0, !insn.addr !494
}
define i32** @_ZNSt20__uninitialized_copyILb1EE13__uninit_copyISt13move_iteratorIPPiES4_EET0_T_S7_S6_(i64 %arg1, i64 %arg2, i32** %arg3) local_unnamed_addr {
dec_label_pc_1ae0:
%0 = call i32** @_ZSt4copyISt13move_iteratorIPPiES2_ET0_T_S5_S4_(i64 %arg1, i64 %arg2, i32** %arg3), !insn.addr !495
ret i32** %0, !insn.addr !496
}
define i32** @_ZNSt20__copy_move_backwardILb1ELb1ESt26random_access_iterator_tagE13__copy_move_bIPiEEPT_PKS4_S7_S5_(i32** %arg1, i32** %arg2, i32** %arg3) local_unnamed_addr {
dec_label_pc_1b0d:
%0 = ptrtoint i32** %arg2 to i64
%1 = ptrtoint i32** %arg1 to i64
%2 = sub i64 %0, %1, !insn.addr !497
%3 = icmp ult i64 %2, 8, !insn.addr !498
%.pre = and i64 %2, -8
%.pre3 = ptrtoint i32** %arg3 to i64
%.pre5 = sub i64 %.pre3, %.pre
br i1 %3, label %dec_label_pc_1b6e, label %dec_label_pc_1b3e, !insn.addr !499
dec_label_pc_1b3e: ; preds = %dec_label_pc_1b0d
%4 = call i64 @memmove(i64 %.pre5, i64 %1, i64 %.pre), !insn.addr !500
br label %dec_label_pc_1b6e, !insn.addr !500
dec_label_pc_1b6e: ; preds = %dec_label_pc_1b0d, %dec_label_pc_1b3e
%5 = inttoptr i64 %.pre5 to i32**, !insn.addr !501
ret i32** %5, !insn.addr !501
}
define i32** @_ZSt6fill_nIPPimS0_ET_S2_T0_RKT1_(i32** %arg1, i64 %arg2, i32** %arg3) local_unnamed_addr {
dec_label_pc_1b85:
%0 = ptrtoint i32** %arg3 to i64
%1 = call i32** @_ZSt12__niter_baseIPPiET_S2_(i32** %arg1), !insn.addr !502
%2 = ptrtoint i32** %1 to i64, !insn.addr !502
%3 = call i64 @_ZSt10__fill_n_aIPPimS0_EN9__gnu_cxx11__enable_ifIXsrSt11__is_scalarIT1_E7__valueET_E6__typeES7_T0_RKS5_(i64 %2, i64 %arg2, i64 %0), !insn.addr !503
%4 = inttoptr i64 %3 to i32**, !insn.addr !504
ret i32** %4, !insn.addr !504
}
define i64 @_ZNK9__gnu_cxx13new_allocatorIPiE8max_sizeEv(i64* %result) local_unnamed_addr {
dec_label_pc_1bbe:
ret i64 2305843009213693951, !insn.addr !505
}
define i64 @_ZSt12__miter_baseIN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS2_SaIS2_EEEEET_S9_(i64 %arg1) local_unnamed_addr {
dec_label_pc_1bd2:
ret i64 %arg1, !insn.addr !506
}
define i32** @_ZSt14__copy_move_a2ILb0EN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS2_SaIS2_EEEEPS2_ET1_T0_SB_SA_(i64 %arg1, i64 %arg2, i32** %arg3) local_unnamed_addr {
dec_label_pc_1be0:
%0 = call i32** @_ZSt12__niter_baseIPPiET_S2_(i32** %arg3), !insn.addr !507
%1 = call i32** @_ZSt12__niter_baseIPKPiSt6vectorIS0_SaIS0_EEET_N9__gnu_cxx17__normal_iteratorIS6_T0_EE(i64 %arg2), !insn.addr !508
%2 = call i32** @_ZSt12__niter_baseIPKPiSt6vectorIS0_SaIS0_EEET_N9__gnu_cxx17__normal_iteratorIS6_T0_EE(i64 %arg1), !insn.addr !509
%3 = call i32** @_ZSt13__copy_move_aILb0EPKPiPS0_ET1_T0_S5_S4_(i32** %2, i32** %1, i32** %0), !insn.addr !510
ret i32** %3, !insn.addr !511
}
define i32** @_ZSt11__addressofIPiEPT_RS1_(i32** %arg1) local_unnamed_addr {
dec_label_pc_1c38:
ret i32** %arg1, !insn.addr !512
}
define i32** @_ZSt4copyISt13move_iteratorIPPiES2_ET0_T_S5_S4_(i64 %arg1, i64 %arg2, i32** %arg3) local_unnamed_addr {
dec_label_pc_1c46:
%0 = call i64 @_ZSt12__miter_baseIPPiEDTcl12__miter_basecldtfp_4baseEEESt13move_iteratorIT_E(i64 %arg2), !insn.addr !513
%1 = call i64 @_ZSt12__miter_baseIPPiEDTcl12__miter_basecldtfp_4baseEEESt13move_iteratorIT_E(i64 %arg1), !insn.addr !514
%2 = inttoptr i64 %1 to i32**, !insn.addr !515
%3 = inttoptr i64 %0 to i32**, !insn.addr !515
%4 = call i32** @_ZSt14__copy_move_a2ILb1EPPiS1_ET1_T0_S3_S2_(i32** %2, i32** %3, i32** %arg3), !insn.addr !515
ret i32** %4, !insn.addr !516
}
define i64 @_ZSt10__fill_n_aIPPimS0_EN9__gnu_cxx11__enable_ifIXsrSt11__is_scalarIT1_E7__valueET_E6__typeES7_T0_RKS5_(i64 %arg1, i64 %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_1c92:
%stack_var_-32.0.lcssa.reg2mem = alloca i64, !insn.addr !517
%stack_var_-32.01.reg2mem = alloca i64, !insn.addr !517
%stack_var_-24.02.reg2mem = alloca i64, !insn.addr !517
%0 = icmp eq i64 %arg2, 0, !insn.addr !518
store i64 %arg2, i64* %stack_var_-24.02.reg2mem, !insn.addr !519
store i64 %arg1, i64* %stack_var_-32.01.reg2mem, !insn.addr !519
store i64 %arg1, i64* %stack_var_-32.0.lcssa.reg2mem, !insn.addr !519
br i1 %0, label %dec_label_pc_1cd3, label %dec_label_pc_1cbc, !insn.addr !519
dec_label_pc_1cbc: ; preds = %dec_label_pc_1c92, %dec_label_pc_1cbc
%stack_var_-32.01.reload = load i64, i64* %stack_var_-32.01.reg2mem
%stack_var_-24.02.reload = load i64, i64* %stack_var_-24.02.reg2mem
%1 = inttoptr i64 %stack_var_-32.01.reload to i64*, !insn.addr !520
store i64 %arg3, i64* %1, align 8, !insn.addr !520
%2 = add i64 %stack_var_-24.02.reload, -1, !insn.addr !521
%3 = add i64 %stack_var_-32.01.reload, 8, !insn.addr !522
%4 = icmp eq i64 %2, 0, !insn.addr !518
store i64 %2, i64* %stack_var_-24.02.reg2mem, !insn.addr !519
store i64 %3, i64* %stack_var_-32.01.reg2mem, !insn.addr !519
store i64 %3, i64* %stack_var_-32.0.lcssa.reg2mem, !insn.addr !519
br i1 %4, label %dec_label_pc_1cd3, label %dec_label_pc_1cbc, !insn.addr !519
dec_label_pc_1cd3: ; preds = %dec_label_pc_1cbc, %dec_label_pc_1c92
%stack_var_-32.0.lcssa.reload = load i64, i64* %stack_var_-32.0.lcssa.reg2mem
ret i64 %stack_var_-32.0.lcssa.reload, !insn.addr !523
}
define i32** @_ZSt12__niter_baseIPKPiSt6vectorIS0_SaIS0_EEET_N9__gnu_cxx17__normal_iteratorIS6_T0_EE(i64 %arg1) local_unnamed_addr {
dec_label_pc_1cd9:
%stack_var_-16 = alloca i64, align 8
store i64 %arg1, i64* %stack_var_-16, align 8, !insn.addr !524
%0 = call i64 @_ZNK9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS1_SaIS1_EEE4baseEv(i64* nonnull %stack_var_-16), !insn.addr !525
%1 = inttoptr i64 %0 to i64*, !insn.addr !526
%2 = load i64, i64* %1, align 8, !insn.addr !526
%3 = inttoptr i64 %2 to i32**, !insn.addr !527
ret i32** %3, !insn.addr !527
}
define i32** @_ZSt13__copy_move_aILb0EPKPiPS0_ET1_T0_S5_S4_(i32** %arg1, i32** %arg2, i32** %arg3) local_unnamed_addr {
dec_label_pc_1cf6:
%0 = call i32** @_ZNSt11__copy_moveILb0ELb1ESt26random_access_iterator_tagE8__copy_mIPiEEPT_PKS4_S7_S5_(i32** %arg1, i32** %arg2, i32** %arg3), !insn.addr !528
ret i32** %0, !insn.addr !529
}
define i64 @_ZSt12__miter_baseIPPiEDTcl12__miter_basecldtfp_4baseEEESt13move_iteratorIT_E(i64 %arg1) local_unnamed_addr {
dec_label_pc_1d27:
%stack_var_-16 = alloca i64, align 8
store i64 %arg1, i64* %stack_var_-16, align 8, !insn.addr !530
%0 = call i64 @_ZNKSt13move_iteratorIPPiE4baseEv(i64* nonnull %stack_var_-16), !insn.addr !531
%1 = inttoptr i64 %0 to i32**, !insn.addr !532
%2 = call i32** @_ZSt12__miter_baseIPPiET_S2_(i32** %1), !insn.addr !532
%3 = ptrtoint i32** %2 to i64, !insn.addr !532
ret i64 %3, !insn.addr !533
}
define i32** @_ZSt14__copy_move_a2ILb1EPPiS1_ET1_T0_S3_S2_(i32** %arg1, i32** %arg2, i32** %arg3) local_unnamed_addr {
dec_label_pc_1d49:
%0 = call i32** @_ZSt12__niter_baseIPPiET_S2_(i32** %arg3), !insn.addr !534
%1 = call i32** @_ZSt12__niter_baseIPPiET_S2_(i32** %arg2), !insn.addr !535
%2 = call i32** @_ZSt12__niter_baseIPPiET_S2_(i32** %arg1), !insn.addr !536
%3 = call i32** @_ZSt13__copy_move_aILb1EPPiS1_ET1_T0_S3_S2_(i32** %2, i32** %1, i32** %0), !insn.addr !537
ret i32** %3, !insn.addr !538
}
define i32** @_ZNSt11__copy_moveILb0ELb1ESt26random_access_iterator_tagE8__copy_mIPiEEPT_PKS4_S7_S5_(i32** %arg1, i32** %arg2, i32** %arg3) local_unnamed_addr {
dec_label_pc_1da1:
%0 = ptrtoint i32** %arg2 to i64
%1 = ptrtoint i32** %arg1 to i64
%2 = sub i64 %0, %1, !insn.addr !539
%3 = icmp ult i64 %2, 8, !insn.addr !540
%.pre = and i64 %2, -8
%.pre3 = ptrtoint i32** %arg3 to i64
br i1 %3, label %dec_label_pc_1df1, label %dec_label_pc_1dd2, !insn.addr !541
dec_label_pc_1dd2: ; preds = %dec_label_pc_1da1
%4 = call i64 @memmove(i64 %.pre3, i64 %1, i64 %.pre), !insn.addr !542
br label %dec_label_pc_1df1, !insn.addr !542
dec_label_pc_1df1: ; preds = %dec_label_pc_1da1, %dec_label_pc_1dd2
%5 = add i64 %.pre, %.pre3, !insn.addr !543
%6 = inttoptr i64 %5 to i32**, !insn.addr !544
ret i32** %6, !insn.addr !544
}
define i64 @_ZNKSt13move_iteratorIPPiE4baseEv(i64* %result) local_unnamed_addr {
dec_label_pc_1e06:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !545
}
define i32** @_ZSt13__copy_move_aILb1EPPiS1_ET1_T0_S3_S2_(i32** %arg1, i32** %arg2, i32** %arg3) local_unnamed_addr {
dec_label_pc_1e17:
%0 = call i32** @_ZNSt11__copy_moveILb1ELb1ESt26random_access_iterator_tagE8__copy_mIPiEEPT_PKS4_S7_S5_(i32** %arg1, i32** %arg2, i32** %arg3), !insn.addr !546
ret i32** %0, !insn.addr !547
}
define i32** @_ZNSt11__copy_moveILb1ELb1ESt26random_access_iterator_tagE8__copy_mIPiEEPT_PKS4_S7_S5_(i32** %arg1, i32** %arg2, i32** %arg3) local_unnamed_addr {
dec_label_pc_1e48:
%0 = ptrtoint i32** %arg2 to i64
%1 = ptrtoint i32** %arg1 to i64
%2 = sub i64 %0, %1, !insn.addr !548
%3 = icmp ult i64 %2, 8, !insn.addr !549
%.pre = and i64 %2, -8
%.pre3 = ptrtoint i32** %arg3 to i64
br i1 %3, label %dec_label_pc_1e98, label %dec_label_pc_1e79, !insn.addr !550
dec_label_pc_1e79: ; preds = %dec_label_pc_1e48
%4 = call i64 @memmove(i64 %.pre3, i64 %1, i64 %.pre), !insn.addr !551
br label %dec_label_pc_1e98, !insn.addr !551
dec_label_pc_1e98: ; preds = %dec_label_pc_1e48, %dec_label_pc_1e79
%5 = add i64 %.pre, %.pre3, !insn.addr !552
%6 = inttoptr i64 %5 to i32**, !insn.addr !553
ret i32** %6, !insn.addr !553
}
declare i64 @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove_727badSinkESt6vectorIPiSaIS1_EE(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove_7211goodG2BSinkESt6vectorIPiSaIS1_EE(i64) local_unnamed_addr
declare i64 @_ZSt20__throw_length_errorPKc(i8*) local_unnamed_addr
declare i64 @_ZdlPv(i64*) local_unnamed_addr
declare i64 @_ZSt17__throw_bad_allocv() local_unnamed_addr
declare i64 @_Znwm(i64) local_unnamed_addr
declare i64 @memmove(i64, i64, i64) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 12}
!1 = !{i64 27}
!2 = !{i64 34}
!3 = !{i64 49}
!4 = !{i64 56}
!5 = !{i64 66}
!6 = !{i64 71}
!7 = !{i64 85}
!8 = !{i64 98}
!9 = !{i64 110}
!10 = !{i64 135}
!11 = !{i64 150}
!12 = !{i64 155}
!13 = !{i64 182}
!14 = !{i64 194}
!15 = !{i64 219}
!16 = !{i64 234}
!17 = !{i64 239}
!18 = !{i64 266}
!19 = !{i64 278}
!20 = !{i64 303}
!21 = !{i64 328}
!22 = !{i64 343}
!23 = !{i64 358}
!24 = !{i64 373}
!25 = !{i64 379}
!26 = !{i64 383}
!27 = !{i64 392}
!28 = !{i64 445}
!29 = !{i64 459}
!30 = !{i64 460}
!31 = !{i64 472}
!32 = !{i64 497}
!33 = !{i64 509}
!34 = !{i64 526}
!35 = !{i64 531}
!36 = !{i64 552}
!37 = !{i64 555}
!38 = !{i64 558}
!39 = !{i64 570}
!40 = !{i64 595}
!41 = !{i64 610}
!42 = !{i64 615}
!43 = !{i64 642}
!44 = !{i64 654}
!45 = !{i64 679}
!46 = !{i64 694}
!47 = !{i64 699}
!48 = !{i64 726}
!49 = !{i64 738}
!50 = !{i64 763}
!51 = !{i64 788}
!52 = !{i64 803}
!53 = !{i64 818}
!54 = !{i64 833}
!55 = !{i64 843}
!56 = !{i64 852}
!57 = !{i64 905}
!58 = !{i64 919}
!59 = !{i64 924}
!60 = !{i64 931}
!61 = !{i64 949}
!62 = !{i64 1143}
!63 = !{i64 1150}
!64 = !{i64 1171}
!65 = !{i64 1183}
!66 = !{i64 1200}
!67 = !{i64 1212}
!68 = !{i64 1219}
!69 = !{i64 1220}
!70 = !{i64 1232}
!71 = !{i64 1251}
!72 = !{i64 1265}
!73 = !{i64 1270}
!74 = !{i64 1278}
!75 = !{i64 1287}
!76 = !{i64 1289}
!77 = !{i64 1295}
!78 = !{i64 1319}
!79 = !{i64 1324}
!80 = !{i64 1331}
!81 = !{i64 1336}
!82 = !{i64 1338}
!83 = !{i64 1350}
!84 = !{i64 1362}
!85 = !{i64 1384}
!86 = !{i64 1389}
!87 = !{i64 1407}
!88 = !{i64 1423}
!89 = !{i64 1428}
!90 = !{i64 1446}
!91 = !{i64 1469}
!92 = !{i64 1481}
!93 = !{i64 1486}
!94 = !{i64 1504}
!95 = !{i64 1513}
!96 = !{i64 1522}
!97 = !{i64 1524}
!98 = !{i64 1530}
!99 = !{i64 1532}
!100 = !{i64 1553}
!101 = !{i64 1579}
!102 = !{i64 1597}
!103 = !{i64 1609}
!104 = !{i64 1630}
!105 = !{i64 1642}
!106 = !{i64 1654}
!107 = !{i64 1676}
!108 = !{i64 1691}
!109 = !{i64 1708}
!110 = !{i64 1720}
!111 = !{i64 1729}
!112 = !{i64 1738}
!113 = !{i64 1794}
!114 = !{i64 1809}
!115 = !{i64 1829}
!116 = !{i64 1836}
!117 = !{i64 1857}
!118 = !{i64 1864}
!119 = !{i64 1882}
!120 = !{i64 1896}
!121 = !{i64 1902}
!122 = !{i64 1926}
!123 = !{i64 1938}
!124 = !{i64 1945}
!125 = !{i64 1959}
!126 = !{i64 1994}
!127 = !{i64 2001}
!128 = !{i64 2025}
!129 = !{i64 2030}
!130 = !{i64 2045}
!131 = !{i64 2046}
!132 = !{i64 2058}
!133 = !{i64 2080}
!134 = !{i64 2098}
!135 = !{i64 2103}
!136 = !{i64 2111}
!137 = !{i64 2120}
!138 = !{i64 2122}
!139 = !{i64 2128}
!140 = !{i64 2153}
!141 = !{i64 2158}
!142 = !{i64 2171}
!143 = !{i64 2176}
!144 = !{i64 2179}
!145 = !{i64 2185}
!146 = !{i64 2195}
!147 = !{i64 2196}
!148 = !{i64 2211}
!149 = !{i64 2229}
!150 = !{i64 2244}
!151 = !{i64 2252}
!152 = !{i64 2262}
!153 = !{i64 2273}
!154 = !{i64 2277}
!155 = !{i64 2283}
!156 = !{i64 2294}
!157 = !{i64 2300}
!158 = !{i64 2321}
!159 = !{i64 2333}
!160 = !{i64 2338}
!161 = !{i64 2349}
!162 = !{i64 2354}
!163 = !{i64 2372}
!164 = !{i64 2385}
!165 = !{i64 2389}
!166 = !{i64 2404}
!167 = !{i64 2429}
!168 = !{i64 2456}
!169 = !{i64 2463}
!170 = !{i64 2473}
!171 = !{i64 2482}
!172 = !{i64 2497}
!173 = !{i64 2504}
!174 = !{i64 2529}
!175 = !{i64 2540}
!176 = !{i64 2545}
!177 = !{i64 2558}
!178 = !{i64 2570}
!179 = !{i64 2575}
!180 = !{i64 2589}
!181 = !{i64 2600}
!182 = !{i64 2605}
!183 = !{i64 2618}
!184 = !{i64 2623}
!185 = !{i64 2650}
!186 = !{i64 2661}
!187 = !{i64 2672}
!188 = !{i64 2684}
!189 = !{i64 2695}
!190 = !{i64 2707}
!191 = !{i64 2718}
!192 = !{i64 2723}
!193 = !{i64 2739}
!194 = !{i64 2748}
!195 = !{i64 2756}
!196 = !{i64 2760}
!197 = !{i64 2767}
!198 = !{i64 2778}
!199 = !{i64 2783}
!200 = !{i64 2800}
!201 = !{i64 2812}
!202 = !{i64 2817}
!203 = !{i64 2846}
!204 = !{i64 2862}
!205 = !{i64 2867}
!206 = !{i64 2885}
!207 = !{i64 2908}
!208 = !{i64 2932}
!209 = !{i64 2944}
!210 = !{i64 2956}
!211 = !{i64 2977}
!212 = !{i64 2997}
!213 = !{i64 3012}
!214 = !{i64 3017}
!215 = !{i64 3037}
!216 = !{i64 3053}
!217 = !{i64 3057}
!218 = !{i64 3068}
!219 = !{i64 3080}
!220 = !{i64 3091}
!221 = !{i64 3096}
!222 = !{i64 3112}
!223 = !{i64 3128}
!224 = !{i64 3140}
!225 = !{i64 3157}
!226 = !{i64 3170}
!227 = !{i64 3184}
!228 = !{i64 3190}
!229 = !{i64 3213}
!230 = !{i64 3226}
!231 = !{i64 3237}
!232 = !{i64 3245}
!233 = !{i64 3257}
!234 = !{i64 3264}
!235 = !{i64 3268}
!236 = !{i64 3480}
!237 = !{i64 3489}
!238 = !{i64 3491}
!239 = !{i64 3504}
!240 = !{i64 3506}
!241 = !{i64 3518}
!242 = !{i64 3547}
!243 = !{i64 3552}
!244 = !{i64 3560}
!245 = !{i64 3569}
!246 = !{i64 3571}
!247 = !{i64 3577}
!248 = !{i64 3578}
!249 = !{i64 3594}
!250 = !{i64 3616}
!251 = !{i64 3620}
!252 = !{i64 3624}
!253 = !{i64 3627}
!254 = !{i64 3645}
!255 = !{i64 3650}
!256 = !{i64 3658}
!257 = !{i64 3667}
!258 = !{i64 3669}
!259 = !{i64 3675}
!260 = !{i64 3688}
!261 = !{i64 3702}
!262 = !{i64 3708}
!263 = !{i64 3713}
!264 = !{i64 3714}
!265 = !{i64 3730}
!266 = !{i64 3759}
!267 = !{i64 3772}
!268 = !{i64 3781}
!269 = !{i64 3783}
!270 = !{i64 3789}
!271 = !{i64 3803}
!272 = !{i64 3823}
!273 = !{i64 3830}
!274 = !{i64 3867}
!275 = !{i64 3886}
!276 = !{i64 3925}
!277 = !{i64 3926}
!278 = !{i64 3938}
!279 = !{i64 3960}
!280 = !{i64 3978}
!281 = !{i64 3983}
!282 = !{i64 3991}
!283 = !{i64 4000}
!284 = !{i64 4002}
!285 = !{i64 4008}
!286 = !{i64 4010}
!287 = !{i64 4022}
!288 = !{i64 4041}
!289 = !{i64 4045}
!290 = !{i64 4063}
!291 = !{i64 4068}
!292 = !{i64 4076}
!293 = !{i64 4085}
!294 = !{i64 4087}
!295 = !{i64 4093}
!296 = !{i64 4136}
!297 = !{i64 4142}
!298 = !{i64 4163}
!299 = !{i64 4172}
!300 = !{i64 4183}
!301 = !{i64 4195}
!302 = !{i64 4205}
!303 = !{i64 4206}
!304 = !{i64 4226}
!305 = !{i64 4231}
!306 = !{i64 4251}
!307 = !{i64 4258}
!308 = !{i64 4289}
!309 = !{i64 4296}
!310 = !{i64 4321}
!311 = !{i64 4326}
!312 = !{i64 4341}
!313 = !{i64 4355}
!314 = !{i64 4385}
!315 = !{i64 4395}
!316 = !{i64 4410}
!317 = !{i64 4434}
!318 = !{i64 4446}
!319 = !{i64 4467}
!320 = !{i64 4488}
!321 = !{i64 4495}
!322 = !{i64 4508}
!323 = !{i64 4513}
!324 = !{i64 4538}
!325 = !{i64 4543}
!326 = !{i64 4556}
!327 = !{i64 4561}
!328 = !{i64 4564}
!329 = !{i64 4570}
!330 = !{i64 4580}
!331 = !{i64 4613}
!332 = !{i64 4628}
!333 = !{i64 4653}
!334 = !{i64 4664}
!335 = !{i64 4693}
!336 = !{i64 4708}
!337 = !{i64 4729}
!338 = !{i64 4740}
!339 = !{i64 4769}
!340 = !{i64 4784}
!341 = !{i64 4805}
!342 = !{i64 4817}
!343 = !{i64 4860}
!344 = !{i64 4866}
!345 = !{i64 4868}
!346 = !{i64 4881}
!347 = !{i64 4889}
!348 = !{i64 4911}
!349 = !{i64 4926}
!350 = !{i64 4931}
!351 = !{i64 4941}
!352 = !{i64 4947}
!353 = !{i64 4949}
!354 = !{i64 4958}
!355 = !{i64 4970}
!356 = !{i64 4985}
!357 = !{i64 4990}
!358 = !{i64 5008}
!359 = !{i64 5013}
!360 = !{i64 5016}
!361 = !{i64 5030}
!362 = !{i64 5035}
!363 = !{i64 5039}
!364 = !{i64 5048}
!365 = !{i64 5057}
!366 = !{i64 5066}
!367 = !{i64 5071}
!368 = !{i64 5081}
!369 = !{i64 5090}
!370 = !{i64 5092}
!371 = !{i64 5103}
!372 = !{i64 5104}
!373 = !{i64 5120}
!374 = !{i64 5125}
!375 = !{i64 5141}
!376 = !{i64 5146}
!377 = !{i64 5154}
!378 = !{i64 5187}
!379 = !{i64 5202}
!380 = !{i64 5227}
!381 = !{i64 5238}
!382 = !{i64 5269}
!383 = !{i64 5279}
!384 = !{i64 5310}
!385 = !{i64 5317}
!386 = !{i64 5328}
!387 = !{i64 5360}
!388 = !{i64 5369}
!389 = !{i64 5380}
!390 = !{i64 5392}
!391 = !{i64 5402}
!392 = !{i64 5434}
!393 = !{i64 5446}
!394 = !{i64 5460}
!395 = !{i64 5475}
!396 = !{i64 5479}
!397 = !{i64 5486}
!398 = !{i64 5492}
!399 = !{i64 5535}
!400 = !{i64 5541}
!401 = !{i64 5561}
!402 = !{i64 5568}
!403 = !{i64 5607}
!404 = !{i64 5614}
!405 = !{i64 5629}
!406 = !{i64 5649}
!407 = !{i64 5657}
!408 = !{i64 5663}
!409 = !{i64 5691}
!410 = !{i64 5713}
!411 = !{i64 5720}
!412 = !{i64 5751}
!413 = !{i64 5758}
!414 = !{i64 5759}
!415 = !{i64 5771}
!416 = !{i64 5800}
!417 = !{i64 5805}
!418 = !{i64 5813}
!419 = !{i64 5822}
!420 = !{i64 5824}
!421 = !{i64 5830}
!422 = !{i64 5873}
!423 = !{i64 5879}
!424 = !{i64 5893}
!425 = !{i64 5924}
!426 = !{i64 5939}
!427 = !{i64 5954}
!428 = !{i64 5968}
!429 = !{i64 5981}
!430 = !{i64 5995}
!431 = !{i64 5996}
!432 = !{i64 6027}
!433 = !{i64 6031}
!434 = !{i64 6041}
!435 = !{i64 6044}
!436 = !{i64 6053}
!437 = !{i64 6096}
!438 = !{i64 6102}
!439 = !{i64 6123}
!440 = !{i64 6131}
!441 = !{i64 6137}
!442 = !{i64 6164}
!443 = !{i64 6167}
!444 = !{i64 6180}
!445 = !{i64 6216}
!446 = !{i64 6222}
!447 = !{i64 6223}
!448 = !{i64 6235}
!449 = !{i64 6264}
!450 = !{i64 6269}
!451 = !{i64 6277}
!452 = !{i64 6286}
!453 = !{i64 6288}
!454 = !{i64 6294}
!455 = !{i64 6310}
!456 = !{i64 6349}
!457 = !{i64 6355}
!458 = !{i64 6366}
!459 = !{i64 6395}
!460 = !{i64 6402}
!461 = !{i64 6422}
!462 = !{i64 6428}
!463 = !{i64 6458}
!464 = !{i64 6463}
!465 = !{i64 6478}
!466 = !{i64 6483}
!467 = !{i64 6486}
!468 = !{i64 6488}
!469 = !{i64 6498}
!470 = !{i64 6514}
!471 = !{i64 6536}
!472 = !{i64 6541}
!473 = !{i64 6584}
!474 = !{i64 6590}
!475 = !{i64 6633}
!476 = !{i64 6639}
!477 = !{i64 6678}
!478 = !{i64 6684}
!479 = !{i64 6704}
!480 = !{i64 6710}
!481 = !{i64 6739}
!482 = !{i64 6748}
!483 = !{i64 6751}
!484 = !{i64 6753}
!485 = !{i64 6755}
!486 = !{i64 6764}
!487 = !{i64 6771}
!488 = !{i64 6777}
!489 = !{i64 6806}
!490 = !{i64 6821}
!491 = !{i64 6842}
!492 = !{i64 6853}
!493 = !{i64 6873}
!494 = !{i64 6879}
!495 = !{i64 6918}
!496 = !{i64 6924}
!497 = !{i64 6953}
!498 = !{i64 6967}
!499 = !{i64 6972}
!500 = !{i64 7017}
!501 = !{i64 7044}
!502 = !{i64 7072}
!503 = !{i64 7094}
!504 = !{i64 7100}
!505 = !{i64 7121}
!506 = !{i64 7135}
!507 = !{i64 7166}
!508 = !{i64 7181}
!509 = !{i64 7196}
!510 = !{i64 7210}
!511 = !{i64 7223}
!512 = !{i64 7237}
!513 = !{i64 7266}
!514 = !{i64 7281}
!515 = !{i64 7302}
!516 = !{i64 7313}
!517 = !{i64 7314}
!518 = !{i64 7349}
!519 = !{i64 7354}
!520 = !{i64 7364}
!521 = !{i64 7367}
!522 = !{i64 7372}
!523 = !{i64 7384}
!524 = !{i64 7393}
!525 = !{i64 7404}
!526 = !{i64 7409}
!527 = !{i64 7413}
!528 = !{i64 7456}
!529 = !{i64 7462}
!530 = !{i64 7471}
!531 = !{i64 7482}
!532 = !{i64 7490}
!533 = !{i64 7496}
!534 = !{i64 7527}
!535 = !{i64 7542}
!536 = !{i64 7557}
!537 = !{i64 7571}
!538 = !{i64 7584}
!539 = !{i64 7613}
!540 = !{i64 7627}
!541 = !{i64 7632}
!542 = !{i64 7660}
!543 = !{i64 7681}
!544 = !{i64 7685}
!545 = !{i64 7702}
!546 = !{i64 7745}
!547 = !{i64 7751}
!548 = !{i64 7780}
!549 = !{i64 7794}
!550 = !{i64 7799}
!551 = !{i64 7827}
!552 = !{i64 7848}
!553 = !{i64 7852}
### Assistant: %"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl" }
%"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl" = type { %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data" = type { i32**, i32**, i32** }
%"class.__gnu_cxx::__normal_iterator.0" = type { i32** }
%"class.__gnu_cxx::__normal_iterator" = type { i32** }
%"class.std::allocator" = type { i8 }
%"class.__gnu_cxx::new_allocator" = type { i8 }
%"struct.std::vector<int *, std::allocator<int *>>::_Temporary_value" = type { %"class.std::vector"*, %"union.std::aligned_storage<8, 8>::type" }
%"union.std::aligned_storage<8, 8>::type" = type { [8 x i8] }
%"class.std::move_iterator" = type { i32** }
%"struct.std::random_access_iterator_tag" = type { i8 }
$_ZNSt6vectorIPiSaIS0_EEC2Ev = comdat any
$_ZNSt6vectorIPiSaIS0_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS0_S2_EEmRS5_ = comdat any
$_ZNSt6vectorIPiSaIS0_EE3endEv = comdat any
$_ZN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS1_SaIS1_EEEC2IPS1_EERKNS0_IT_NS_11__enable_ifIXsr3std10__are_sameISA_S9_EE7__valueES6_E6__typeEEE = comdat any
$_ZNSt6vectorIPiSaIS0_EEC2ERKS2_ = comdat any
$_ZNSt6vectorIPiSaIS0_EED2Ev = comdat any
$_ZNSt12_Vector_baseIPiSaIS0_EEC2Ev = comdat any
$_ZNSt12_Vector_baseIPiSaIS0_EE12_Vector_implC2Ev = comdat any
$_ZNSaIPiEC2Ev = comdat any
$_ZNSt12_Vector_baseIPiSaIS0_EE17_Vector_impl_dataC2Ev = comdat any
$_ZN9__gnu_cxx13new_allocatorIPiEC2Ev = comdat any
$_ZSt8_DestroyIPPiS0_EvT_S2_RSaIT0_E = comdat any
$_ZNSt12_Vector_baseIPiSaIS0_EE19_M_get_Tp_allocatorEv = comdat any
$_ZNSt12_Vector_baseIPiSaIS0_EED2Ev = comdat any
$__clang_call_terminate = comdat any
$_ZSt8_DestroyIPPiEvT_S2_ = comdat any
$_ZNSt12_Destroy_auxILb1EE9__destroyIPPiEEvT_S4_ = comdat any
$_ZNSt12_Vector_baseIPiSaIS0_EE13_M_deallocateEPS0_m = comdat any
$_ZNSt12_Vector_baseIPiSaIS0_EE12_Vector_implD2Ev = comdat any
$_ZNSt16allocator_traitsISaIPiEE10deallocateERS1_PS0_m = comdat any
$_ZN9__gnu_cxx13new_allocatorIPiE10deallocateEPS1_m = comdat any
$_ZN9__gnu_cxx13new_allocatorIPiED2Ev = comdat any
$_ZN9__gnu_cxx17__normal_iteratorIPPiSt6vectorIS1_SaIS1_EEEC2ERKS2_ = comdat any
$_ZN9__gnu_cxxmiIPKPiSt6vectorIS1_SaIS1_EEEENS_17__normal_iteratorIT_T0_E15difference_typeERKSA_SD_ = comdat any
$_ZNKSt6vectorIPiSaIS0_EE6cbeginEv = comdat any
$_ZNSt6vectorIPiSaIS0_EE14_M_fill_insertEN9__gnu_cxx17__normal_iteratorIPS0_S2_EEmRKS0_ = comdat any
$_ZNSt6vectorIPiSaIS0_EE5beginEv = comdat any
$_ZNK9__gnu_cxx17__normal_iteratorIPPiSt6vectorIS1_SaIS1_EEEplEl = comdat any
$_ZNK9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS1_SaIS1_EEE4baseEv = comdat any
$_ZN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS1_SaIS1_EEEC2ERKS3_ = comdat any
$_ZNSt6vectorIPiSaIS0_EE16_Temporary_valueC2IJRKS0_EEEPS2_DpOT_ = comdat any
$_ZNSt6vectorIPiSaIS0_EE16_Temporary_value6_M_valEv = comdat any
$_ZN9__gnu_cxxmiIPPiSt6vectorIS1_SaIS1_EEEENS_17__normal_iteratorIT_T0_E15difference_typeERKS9_SC_ = comdat any
$_ZSt22__uninitialized_move_aIPPiS1_SaIS0_EET0_T_S4_S3_RT1_ = comdat any
$_ZSt13move_backwardIPPiS1_ET0_T_S3_S2_ = comdat any
$_ZNK9__gnu_cxx17__normal_iteratorIPPiSt6vectorIS1_SaIS1_EEE4baseEv = comdat any
$_ZSt4fillIPPiS0_EvT_S2_RKT0_ = comdat any
$_ZSt24__uninitialized_fill_n_aIPPimS0_S0_ET_S2_T0_RKT1_RSaIT2_E = comdat any
$_ZNSt6vectorIPiSaIS0_EE16_Temporary_valueD2Ev = comdat any
$_ZNKSt6vectorIPiSaIS0_EE12_M_check_lenEmPKc = comdat any
$_ZNSt12_Vector_baseIPiSaIS0_EE11_M_allocateEm = comdat any
$_ZSt34__uninitialized_move_if_noexcept_aIPPiS1_SaIS0_EET0_T_S4_S3_RT1_ = comdat any
$_ZNSt16allocator_traitsISaIPiEE9constructIS0_JRKS0_EEEvRS1_PT_DpOT0_ = comdat any
$_ZNSt6vectorIPiSaIS0_EE16_Temporary_value6_M_ptrEv = comdat any
$_ZSt7forwardIRKPiEOT_RNSt16remove_referenceIS3_E4typeE = comdat any
$_ZN9__gnu_cxx13new_allocatorIPiE9constructIS1_JRKS1_EEEvPT_DpOT0_ = comdat any
$_ZSt22__uninitialized_copy_aISt13move_iteratorIPPiES2_S1_ET0_T_S5_S4_RSaIT1_E = comdat any
$_ZSt18make_move_iteratorIPPiESt13move_iteratorIT_ES3_ = comdat any
$_ZSt18uninitialized_copyISt13move_iteratorIPPiES2_ET0_T_S5_S4_ = comdat any
$_ZNSt20__uninitialized_copyILb1EE13__uninit_copyISt13move_iteratorIPPiES4_EET0_T_S7_S6_ = comdat any
$_ZSt4copyISt13move_iteratorIPPiES2_ET0_T_S5_S4_ = comdat any
$_ZSt13__copy_move_aILb1EPPiS1_ET1_T0_S3_S2_ = comdat any
$_ZSt12__miter_baseIPPiEDTcl12__miter_basecldtfp_4baseEEESt13move_iteratorIT_E = comdat any
$_ZSt12__niter_wrapIPPiET_RKS2_S2_ = comdat any
$_ZSt14__copy_move_a1ILb1EPPiS1_ET1_T0_S3_S2_ = comdat any
$_ZSt12__niter_baseIPPiET_S2_ = comdat any
$_ZSt14__copy_move_a2ILb1EPPiS1_ET1_T0_S3_S2_ = comdat any
$_ZNSt11__copy_moveILb1ELb1ESt26random_access_iterator_tagE8__copy_mIPiEEPT_PKS4_S7_S5_ = comdat any
$_ZSt12__miter_baseIPPiET_S2_ = comdat any
$_ZNKSt13move_iteratorIPPiE4baseEv = comdat any
$_ZSt4moveIRPPiEONSt16remove_referenceIT_E4typeEOS4_ = comdat any
$_ZNSt13move_iteratorIPPiEC2ES1_ = comdat any
$_ZSt22__copy_move_backward_aILb1EPPiS1_ET1_T0_S3_S2_ = comdat any
$_ZSt23__copy_move_backward_a1ILb1EPPiS1_ET1_T0_S3_S2_ = comdat any
$_ZSt23__copy_move_backward_a2ILb1EPPiS1_ET1_T0_S3_S2_ = comdat any
$_ZNSt20__copy_move_backwardILb1ELb1ESt26random_access_iterator_tagE13__copy_move_bIPiEEPT_PKS4_S7_S5_ = comdat any
$_ZSt8__fill_aIPPiS0_EvT_S2_RKT0_ = comdat any
$_ZSt9__fill_a1IPPiS0_EN9__gnu_cxx11__enable_ifIXsr11__is_scalarIT0_EE7__valueEvE6__typeET_S7_RKS4_ = comdat any
$_ZSt20uninitialized_fill_nIPPimS0_ET_S2_T0_RKT1_ = comdat any
$_ZNSt22__uninitialized_fill_nILb1EE15__uninit_fill_nIPPimS2_EET_S4_T0_RKT1_ = comdat any
$_ZSt6fill_nIPPimS0_ET_S2_T0_RKT1_ = comdat any
$_ZSt10__fill_n_aIPPimS0_ET_S2_T0_RKT1_St26random_access_iterator_tag = comdat any
$_ZSt17__size_to_integerm = comdat any
$_ZSt19__iterator_categoryIPPiENSt15iterator_traitsIT_E17iterator_categoryERKS3_ = comdat any
$_ZNSt16allocator_traitsISaIPiEE7destroyIS0_EEvRS1_PT_ = comdat any
$_ZN9__gnu_cxx13new_allocatorIPiE7destroyIS1_EEvPT_ = comdat any
$_ZNKSt6vectorIPiSaIS0_EE8max_sizeEv = comdat any
$_ZNKSt6vectorIPiSaIS0_EE4sizeEv = comdat any
$_ZSt3maxImERKT_S2_S2_ = comdat any
$_ZNSt6vectorIPiSaIS0_EE11_S_max_sizeERKS1_ = comdat any
$_ZNKSt12_Vector_baseIPiSaIS0_EE19_M_get_Tp_allocatorEv = comdat any
$_ZNSt16allocator_traitsISaIPiEE8max_sizeERKS1_ = comdat any
$_ZSt3minImERKT_S2_S2_ = comdat any
$_ZNK9__gnu_cxx13new_allocatorIPiE8max_sizeEv = comdat any
$_ZNK9__gnu_cxx13new_allocatorIPiE11_M_max_sizeEv = comdat any
$_ZNSt16allocator_traitsISaIPiEE8allocateERS1_m = comdat any
$_ZN9__gnu_cxx13new_allocatorIPiE8allocateEmPKv = comdat any
$_ZSt32__make_move_if_noexcept_iteratorIPiSt13move_iteratorIPS0_EET0_PT_ = comdat any
$_ZN9__gnu_cxx14__alloc_traitsISaIPiES1_E17_S_select_on_copyERKS2_ = comdat any
$_ZNSt12_Vector_baseIPiSaIS0_EEC2EmRKS1_ = comdat any
$_ZNSaIPiED2Ev = comdat any
$_ZSt22__uninitialized_copy_aIN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS2_SaIS2_EEEEPS2_S2_ET0_T_SB_SA_RSaIT1_E = comdat any
$_ZNKSt6vectorIPiSaIS0_EE5beginEv = comdat any
$_ZNKSt6vectorIPiSaIS0_EE3endEv = comdat any
$_ZNSt16allocator_traitsISaIPiEE37select_on_container_copy_constructionERKS1_ = comdat any
$_ZNSaIPiEC2ERKS0_ = comdat any
$_ZN9__gnu_cxx13new_allocatorIPiEC2ERKS2_ = comdat any
$_ZNSt12_Vector_baseIPiSaIS0_EE12_Vector_implC2ERKS1_ = comdat any
$_ZNSt12_Vector_baseIPiSaIS0_EE17_M_create_storageEm = comdat any
$_ZSt18uninitialized_copyIN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS2_SaIS2_EEEEPS2_ET0_T_SB_SA_ = comdat any
$_ZNSt20__uninitialized_copyILb1EE13__uninit_copyIN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS4_SaIS4_EEEEPS4_EET0_T_SD_SC_ = comdat any
$_ZSt4copyIN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS2_SaIS2_EEEEPS2_ET0_T_SB_SA_ = comdat any
$_ZSt13__copy_move_aILb0EN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS2_SaIS2_EEEEPS2_ET1_T0_SB_SA_ = comdat any
$_ZSt12__miter_baseIN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS2_SaIS2_EEEEET_S9_ = comdat any
$_ZSt14__copy_move_a1ILb0EPKPiPS0_ET1_T0_S5_S4_ = comdat any
$_ZSt12__niter_baseIPKPiSt6vectorIS0_SaIS0_EEET_N9__gnu_cxx17__normal_iteratorIS6_T0_EE = comdat any
$_ZSt14__copy_move_a2ILb0EPKPiPS0_ET1_T0_S5_S4_ = comdat any
$_ZNSt11__copy_moveILb0ELb1ESt26random_access_iterator_tagE8__copy_mIPiEEPT_PKS4_S7_S5_ = comdat any
@.str = private unnamed_addr constant [23 x i8] c"vector::_M_fill_insert\00", align 1
; Function Attrs: noinline optnone uwtable
define dso_local void @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove_723badEv() #0 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%data = alloca i32*, align 8
%dataVector = alloca %"class.std::vector", align 8
%dataBadBuffer = alloca [50 x i32], align 16
%dataGoodBuffer = alloca [100 x i32], align 16
%agg.tmp = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
%ref.tmp = alloca %"class.__gnu_cxx::__normal_iterator", align 8
%exn.slot = alloca i8*, align 8
%ehselector.slot = alloca i32, align 4
%coerce = alloca %"class.__gnu_cxx::__normal_iterator", align 8
%agg.tmp4 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
%ref.tmp5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
%coerce11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
%agg.tmp13 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
%ref.tmp14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
%coerce20 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
%agg.tmp22 = alloca %"class.std::vector", align 8
call void @_ZNSt6vectorIPiSaIS0_EEC2Ev(%"class.std::vector"* %dataVector) #8
%arraydecay = getelementptr inbounds [50 x i32], [50 x i32]* %dataBadBuffer, i64 0, i64 0
store i32* %arraydecay, i32** %data, align 8
%call = call i32** @_ZNSt6vectorIPiSaIS0_EE3endEv(%"class.std::vector"* %dataVector) #8
%coerce.dive = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", %"class.__gnu_cxx::__normal_iterator"* %ref.tmp, i32 0, i32 0
store i32** %call, i32*** %coerce.dive, align 8
call void @_ZN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS1_SaIS1_EEEC2IPS1_EERKNS0_IT_NS_11__enable_ifIXsr3std10__are_sameISA_S9_EE7__valueES6_E6__typeEEE(%"class.__gnu_cxx::__normal_iterator.0"* %agg.tmp, %"class.__gnu_cxx::__normal_iterator"* nonnull align 8 dereferenceable(8) %ref.tmp) #8
%coerce.dive1 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", %"class.__gnu_cxx::__normal_iterator.0"* %agg.tmp, i32 0, i32 0
%0 = load i32**, i32*** %coerce.dive1, align 8
%call2 = invoke i32** @_ZNSt6vectorIPiSaIS0_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS0_S2_EEmRS5_(%"class.std::vector"* %dataVector, i32** %0, i64 1, i32** nonnull align 8 dereferenceable(8) %data)
to label %invoke.cont unwind label %lpad
invoke.cont: ; preds = %entry
%coerce.dive3 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", %"class.__gnu_cxx::__normal_iterator"* %coerce, i32 0, i32 0
store i32** %call2, i32*** %coerce.dive3, align 8
%call6 = call i32** @_ZNSt6vectorIPiSaIS0_EE3endEv(%"class.std::vector"* %dataVector) #8
%coerce.dive7 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", %"class.__gnu_cxx::__normal_iterator"* %ref.tmp5, i32 0, i32 0
store i32** %call6, i32*** %coerce.dive7, align 8
call void @_ZN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS1_SaIS1_EEEC2IPS1_EERKNS0_IT_NS_11__enable_ifIXsr3std10__are_sameISA_S9_EE7__valueES6_E6__typeEEE(%"class.__gnu_cxx::__normal_iterator.0"* %agg.tmp4, %"class.__gnu_cxx::__normal_iterator"* nonnull align 8 dereferenceable(8) %ref.tmp5) #8
%coerce.dive8 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", %"class.__gnu_cxx::__normal_iterator.0"* %agg.tmp4, i32 0, i32 0
%1 = load i32**, i32*** %coerce.dive8, align 8
%call10 = invoke i32** @_ZNSt6vectorIPiSaIS0_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS0_S2_EEmRS5_(%"class.std::vector"* %dataVector, i32** %1, i64 1, i32** nonnull align 8 dereferenceable(8) %data)
to label %invoke.cont9 unwind label %lpad
invoke.cont9: ; preds = %invoke.cont
%coerce.dive12 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", %"class.__gnu_cxx::__normal_iterator"* %coerce11, i32 0, i32 0
store i32** %call10, i32*** %coerce.dive12, align 8
%call15 = call i32** @_ZNSt6vectorIPiSaIS0_EE3endEv(%"class.std::vector"* %dataVector) #8
%coerce.dive16 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", %"class.__gnu_cxx::__normal_iterator"* %ref.tmp14, i32 0, i32 0
store i32** %call15, i32*** %coerce.dive16, align 8
call void @_ZN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS1_SaIS1_EEEC2IPS1_EERKNS0_IT_NS_11__enable_ifIXsr3std10__are_sameISA_S9_EE7__valueES6_E6__typeEEE(%"class.__gnu_cxx::__normal_iterator.0"* %agg.tmp13, %"class.__gnu_cxx::__normal_iterator"* nonnull align 8 dereferenceable(8) %ref.tmp14) #8
%coerce.dive17 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", %"class.__gnu_cxx::__normal_iterator.0"* %agg.tmp13, i32 0, i32 0
%2 = load i32**, i32*** %coerce.dive17, align 8
%call19 = invoke i32** @_ZNSt6vectorIPiSaIS0_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS0_S2_EEmRS5_(%"class.std::vector"* %dataVector, i32** %2, i64 1, i32** nonnull align 8 dereferenceable(8) %data)
to label %invoke.cont18 unwind label %lpad
invoke.cont18: ; preds = %invoke.cont9
%coerce.dive21 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", %"class.__gnu_cxx::__normal_iterator"* %coerce20, i32 0, i32 0
store i32** %call19, i32*** %coerce.dive21, align 8
invoke void @_ZNSt6vectorIPiSaIS0_EEC2ERKS2_(%"class.std::vector"* %agg.tmp22, %"class.std::vector"* nonnull align 8 dereferenceable(24) %dataVector)
to label %invoke.cont23 unwind label %lpad
invoke.cont23: ; preds = %invoke.cont18
invoke void @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove_727badSinkESt6vectorIPiSaIS1_EE(%"class.std::vector"* %agg.tmp22)
to label %invoke.cont25 unwind label %lpad24
invoke.cont25: ; preds = %invoke.cont23
call void @_ZNSt6vectorIPiSaIS0_EED2Ev(%"class.std::vector"* %agg.tmp22) #8
call void @_ZNSt6vectorIPiSaIS0_EED2Ev(%"class.std::vector"* %dataVector) #8
ret void
lpad: ; preds = %invoke.cont18, %invoke.cont9, %invoke.cont, %entry
%3 = landingpad { i8*, i32 }
cleanup
%4 = extractvalue { i8*, i32 } %3, 0
store i8* %4, i8** %exn.slot, align 8
%5 = extractvalue { i8*, i32 } %3, 1
store i32 %5, i32* %ehselector.slot, align 4
br label %ehcleanup
lpad24: ; preds = %invoke.cont23
%6 = landingpad { i8*, i32 }
cleanup
%7 = extractvalue { i8*, i32 } %6, 0
store i8* %7, i8** %exn.slot, align 8
%8 = extractvalue { i8*, i32 } %6, 1
store i32 %8, i32* %ehselector.slot, align 4
call void @_ZNSt6vectorIPiSaIS0_EED2Ev(%"class.std::vector"* %agg.tmp22) #8
br label %ehcleanup
ehcleanup: ; preds = %lpad24, %lpad
call void @_ZNSt6vectorIPiSaIS0_EED2Ev(%"class.std::vector"* %dataVector) #8
br label %eh.resume
eh.resume: ; preds = %ehcleanup
%exn = load i8*, i8** %exn.slot, align 8
%sel = load i32, i32* %ehselector.slot, align 4
%lpad.val = insertvalue { i8*, i32 } undef, i8* %exn, 0
%lpad.val26 = insertvalue { i8*, i32 } %lpad.val, i32 %sel, 1
resume { i8*, i32 } %lpad.val26
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt6vectorIPiSaIS0_EEC2Ev(%"class.std::vector"* %this) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::vector"*, align 8
store %"class.std::vector"* %this, %"class.std::vector"** %this.addr, align 8
%this1 = load %"class.std::vector"*, %"class.std::vector"** %this.addr, align 8
%0 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
call void @_ZNSt12_Vector_baseIPiSaIS0_EEC2Ev(%"struct.std::_Vector_base"* %0) #8
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i32** @_ZNSt6vectorIPiSaIS0_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS0_S2_EEmRS5_(%"class.std::vector"* %this, i32** %__position.coerce, i64 %__n, i32** nonnull align 8 dereferenceable(8) %__x) #0 comdat align 2 {
entry:
%retval = alloca %"class.__gnu_cxx::__normal_iterator", align 8
%__position = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
%this.addr = alloca %"class.std::vector"*, align 8
%__n.addr = alloca i64, align 8
%__x.addr = alloca i32**, align 8
%__offset = alloca i64, align 8
%ref.tmp = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
%agg.tmp = alloca %"class.__gnu_cxx::__normal_iterator", align 8
%ref.tmp4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
%ref.tmp10 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
%coerce.dive = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", %"class.__gnu_cxx::__normal_iterator.0"* %__position, i32 0, i32 0
store i32** %__position.coerce, i32*** %coerce.dive, align 8
store %"class.std::vector"* %this, %"class.std::vector"** %this.addr, align 8
store i64 %__n, i64* %__n.addr, align 8
store i32** %__x, i32*** %__x.addr, align 8
%this1 = load %"class.std::vector"*, %"class.std::vector"** %this.addr, align 8
%call = call i32** @_ZNKSt6vectorIPiSaIS0_EE6cbeginEv(%"class.std::vector"* %this1) #8
%coerce.dive2 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", %"class.__gnu_cxx::__normal_iterator.0"* %ref.tmp, i32 0, i32 0
store i32** %call, i32*** %coerce.dive2, align 8
%call3 = call i64 @_ZN9__gnu_cxxmiIPKPiSt6vectorIS1_SaIS1_EEEENS_17__normal_iteratorIT_T0_E15difference_typeERKSA_SD_(%"class.__gnu_cxx::__normal_iterator.0"* nonnull align 8 dereferenceable(8) %__position, %"class.__gnu_cxx::__normal_iterator.0"* nonnull align 8 dereferenceable(8) %ref.tmp) #8
store i64 %call3, i64* %__offset, align 8
%call5 = call i32** @_ZNSt6vectorIPiSaIS0_EE5beginEv(%"class.std::vector"* %this1) #8
%coerce.dive6 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", %"class.__gnu_cxx::__normal_iterator"* %ref.tmp4, i32 0, i32 0
store i32** %call5, i32*** %coerce.dive6, align 8
%0 = load i64, i64* %__offset, align 8
%call7 = call i32** @_ZNK9__gnu_cxx17__normal_iteratorIPPiSt6vectorIS1_SaIS1_EEEplEl(%"class.__gnu_cxx::__normal_iterator"* %ref.tmp4, i64 %0) #8
%coerce.dive8 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", %"class.__gnu_cxx::__normal_iterator"* %agg.tmp, i32 0, i32 0
store i32** %call7, i32*** %coerce.dive8, align 8
%1 = load i64, i64* %__n.addr, align 8
%2 = load i32**, i32*** %__x.addr, align 8
%coerce.dive9 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", %"class.__gnu_cxx::__normal_iterator"* %agg.tmp, i32 0, i32 0
%3 = load i32**, i32*** %coerce.dive9, align 8
call void @_ZNSt6vectorIPiSaIS0_EE14_M_fill_insertEN9__gnu_cxx17__normal_iteratorIPS0_S2_EEmRKS0_(%"class.std::vector"* %this1, i32** %3, i64 %1, i32** nonnull align 8 dereferenceable(8) %2)
%call11 = call i32** @_ZNSt6vectorIPiSaIS0_EE5beginEv(%"class.std::vector"* %this1) #8
%coerce.dive12 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", %"class.__gnu_cxx::__normal_iterator"* %ref.tmp10, i32 0, i32 0
store i32** %call11, i32*** %coerce.dive12, align 8
%4 = load i64, i64* %__offset, align 8
%call13 = call i32** @_ZNK9__gnu_cxx17__normal_iteratorIPPiSt6vectorIS1_SaIS1_EEEplEl(%"class.__gnu_cxx::__normal_iterator"* %ref.tmp10, i64 %4) #8
%coerce.dive14 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", %"class.__gnu_cxx::__normal_iterator"* %retval, i32 0, i32 0
store i32** %call13, i32*** %coerce.dive14, align 8
%coerce.dive15 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", %"class.__gnu_cxx::__normal_iterator"* %retval, i32 0, i32 0
%5 = load i32**, i32*** %coerce.dive15, align 8
ret i32** %5
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i32** @_ZNSt6vectorIPiSaIS0_EE3endEv(%"class.std::vector"* %this) #1 comdat align 2 {
entry:
%retval = alloca %"class.__gnu_cxx::__normal_iterator", align 8
%this.addr = alloca %"class.std::vector"*, align 8
store %"class.std::vector"* %this, %"class.std::vector"** %this.addr, align 8
%this1 = load %"class.std::vector"*, %"class.std::vector"** %this.addr, align 8
%0 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%_M_impl = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %0, i32 0, i32 0
%1 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl to %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"*
%_M_finish = getelementptr inbounds %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data", %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"* %1, i32 0, i32 1
call void @_ZN9__gnu_cxx17__normal_iteratorIPPiSt6vectorIS1_SaIS1_EEEC2ERKS2_(%"class.__gnu_cxx::__normal_iterator"* %retval, i32*** nonnull align 8 dereferenceable(8) %_M_finish) #8
%coerce.dive = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", %"class.__gnu_cxx::__normal_iterator"* %retval, i32 0, i32 0
%2 = load i32**, i32*** %coerce.dive, align 8
ret i32** %2
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS1_SaIS1_EEEC2IPS1_EERKNS0_IT_NS_11__enable_ifIXsr3std10__are_sameISA_S9_EE7__valueES6_E6__typeEEE(%"class.__gnu_cxx::__normal_iterator.0"* %this, %"class.__gnu_cxx::__normal_iterator"* nonnull align 8 dereferenceable(8) %__i) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::__normal_iterator.0"*, align 8
%__i.addr = alloca %"class.__gnu_cxx::__normal_iterator"*, align 8
store %"class.__gnu_cxx::__normal_iterator.0"* %this, %"class.__gnu_cxx::__normal_iterator.0"** %this.addr, align 8
store %"class.__gnu_cxx::__normal_iterator"* %__i, %"class.__gnu_cxx::__normal_iterator"** %__i.addr, align 8
%this1 = load %"class.__gnu_cxx::__normal_iterator.0"*, %"class.__gnu_cxx::__normal_iterator.0"** %this.addr, align 8
%_M_current = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", %"class.__gnu_cxx::__normal_iterator.0"* %this1, i32 0, i32 0
%0 = load %"class.__gnu_cxx::__normal_iterator"*, %"class.__gnu_cxx::__normal_iterator"** %__i.addr, align 8
%call = call nonnull align 8 dereferenceable(8) i32*** @_ZNK9__gnu_cxx17__normal_iteratorIPPiSt6vectorIS1_SaIS1_EEE4baseEv(%"class.__gnu_cxx::__normal_iterator"* %0) #8
%1 = load i32**, i32*** %call, align 8
store i32** %1, i32*** %_M_current, align 8
ret void
}
declare dso_local i32 @__gxx_personality_v0(...)
declare dso_local void @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove_727badSinkESt6vectorIPiSaIS1_EE(%"class.std::vector"*) #2
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt6vectorIPiSaIS0_EEC2ERKS2_(%"class.std::vector"* %this, %"class.std::vector"* nonnull align 8 dereferenceable(24) %__x) unnamed_addr #0 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%this.addr = alloca %"class.std::vector"*, align 8
%__x.addr = alloca %"class.std::vector"*, align 8
%ref.tmp = alloca %"class.std::allocator", align 1
%exn.slot = alloca i8*, align 8
%ehselector.slot = alloca i32, align 4
%agg.tmp = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
%agg.tmp4 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
store %"class.std::vector"* %this, %"class.std::vector"** %this.addr, align 8
store %"class.std::vector"* %__x, %"class.std::vector"** %__x.addr, align 8
%this1 = load %"class.std::vector"*, %"class.std::vector"** %this.addr, align 8
%0 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%1 = load %"class.std::vector"*, %"class.std::vector"** %__x.addr, align 8
%call = call i64 @_ZNKSt6vectorIPiSaIS0_EE4sizeEv(%"class.std::vector"* %1) #8
%2 = load %"class.std::vector"*, %"class.std::vector"** %__x.addr, align 8
%3 = bitcast %"class.std::vector"* %2 to %"struct.std::_Vector_base"*
%call2 = call nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZNKSt12_Vector_baseIPiSaIS0_EE19_M_get_Tp_allocatorEv(%"struct.std::_Vector_base"* %3) #8
call void @_ZN9__gnu_cxx14__alloc_traitsISaIPiES1_E17_S_select_on_copyERKS2_(%"class.std::allocator"* sret align 1 %ref.tmp, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %call2)
invoke void @_ZNSt12_Vector_baseIPiSaIS0_EEC2EmRKS1_(%"struct.std::_Vector_base"* %0, i64 %call, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %ref.tmp)
to label %invoke.cont unwind label %lpad
invoke.cont: ; preds = %entry
call void @_ZNSaIPiED2Ev(%"class.std::allocator"* %ref.tmp) #8
%4 = load %"class.std::vector"*, %"class.std::vector"** %__x.addr, align 8
%call3 = call i32** @_ZNKSt6vectorIPiSaIS0_EE5beginEv(%"class.std::vector"* %4) #8
%coerce.dive = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", %"class.__gnu_cxx::__normal_iterator.0"* %agg.tmp, i32 0, i32 0
store i32** %call3, i32*** %coerce.dive, align 8
%5 = load %"class.std::vector"*, %"class.std::vector"** %__x.addr, align 8
%call5 = call i32** @_ZNKSt6vectorIPiSaIS0_EE3endEv(%"class.std::vector"* %5) #8
%coerce.dive6 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", %"class.__gnu_cxx::__normal_iterator.0"* %agg.tmp4, i32 0, i32 0
store i32** %call5, i32*** %coerce.dive6, align 8
%6 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%_M_impl = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %6, i32 0, i32 0
%7 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl to %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"*
%_M_start = getelementptr inbounds %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data", %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"* %7, i32 0, i32 0
%8 = load i32**, i32*** %_M_start, align 8
%9 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%call7 = call nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZNSt12_Vector_baseIPiSaIS0_EE19_M_get_Tp_allocatorEv(%"struct.std::_Vector_base"* %9) #8
%coerce.dive8 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", %"class.__gnu_cxx::__normal_iterator.0"* %agg.tmp, i32 0, i32 0
%10 = load i32**, i32*** %coerce.dive8, align 8
%coerce.dive9 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", %"class.__gnu_cxx::__normal_iterator.0"* %agg.tmp4, i32 0, i32 0
%11 = load i32**, i32*** %coerce.dive9, align 8
%call12 = invoke i32** @_ZSt22__uninitialized_copy_aIN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS2_SaIS2_EEEEPS2_S2_ET0_T_SB_SA_RSaIT1_E(i32** %10, i32** %11, i32** %8, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %call7)
to label %invoke.cont11 unwind label %lpad10
invoke.cont11: ; preds = %invoke.cont
%12 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%_M_impl13 = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %12, i32 0, i32 0
%13 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl13 to %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"*
%_M_finish = getelementptr inbounds %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data", %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"* %13, i32 0, i32 1
store i32** %call12, i32*** %_M_finish, align 8
ret void
lpad: ; preds = %entry
%14 = landingpad { i8*, i32 }
cleanup
%15 = extractvalue { i8*, i32 } %14, 0
store i8* %15, i8** %exn.slot, align 8
%16 = extractvalue { i8*, i32 } %14, 1
store i32 %16, i32* %ehselector.slot, align 4
call void @_ZNSaIPiED2Ev(%"class.std::allocator"* %ref.tmp) #8
br label %eh.resume
lpad10: ; preds = %invoke.cont
%17 = landingpad { i8*, i32 }
cleanup
%18 = extractvalue { i8*, i32 } %17, 0
store i8* %18, i8** %exn.slot, align 8
%19 = extractvalue { i8*, i32 } %17, 1
store i32 %19, i32* %ehselector.slot, align 4
%20 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
call void @_ZNSt12_Vector_baseIPiSaIS0_EED2Ev(%"struct.std::_Vector_base"* %20) #8
br label %eh.resume
eh.resume: ; preds = %lpad10, %lpad
%exn = load i8*, i8** %exn.slot, align 8
%sel = load i32, i32* %ehselector.slot, align 4
%lpad.val = insertvalue { i8*, i32 } undef, i8* %exn, 0
%lpad.val14 = insertvalue { i8*, i32 } %lpad.val, i32 %sel, 1
resume { i8*, i32 } %lpad.val14
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt6vectorIPiSaIS0_EED2Ev(%"class.std::vector"* %this) unnamed_addr #1 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%this.addr = alloca %"class.std::vector"*, align 8
%exn.slot = alloca i8*, align 8
%ehselector.slot = alloca i32, align 4
store %"class.std::vector"* %this, %"class.std::vector"** %this.addr, align 8
%this1 = load %"class.std::vector"*, %"class.std::vector"** %this.addr, align 8
%0 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%_M_impl = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %0, i32 0, i32 0
%1 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl to %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"*
%_M_start = getelementptr inbounds %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data", %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"* %1, i32 0, i32 0
%2 = load i32**, i32*** %_M_start, align 8
%3 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%_M_impl2 = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %3, i32 0, i32 0
%4 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl2 to %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"*
%_M_finish = getelementptr inbounds %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data", %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"* %4, i32 0, i32 1
%5 = load i32**, i32*** %_M_finish, align 8
%6 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%call = call nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZNSt12_Vector_baseIPiSaIS0_EE19_M_get_Tp_allocatorEv(%"struct.std::_Vector_base"* %6) #8
invoke void @_ZSt8_DestroyIPPiS0_EvT_S2_RSaIT0_E(i32** %2, i32** %5, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %call)
to label %invoke.cont unwind label %lpad
invoke.cont: ; preds = %entry
%7 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
call void @_ZNSt12_Vector_baseIPiSaIS0_EED2Ev(%"struct.std::_Vector_base"* %7) #8
ret void
lpad: ; preds = %entry
%8 = landingpad { i8*, i32 }
catch i8* null
%9 = extractvalue { i8*, i32 } %8, 0
store i8* %9, i8** %exn.slot, align 8
%10 = extractvalue { i8*, i32 } %8, 1
store i32 %10, i32* %ehselector.slot, align 4
%11 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
call void @_ZNSt12_Vector_baseIPiSaIS0_EED2Ev(%"struct.std::_Vector_base"* %11) #8
br label %terminate.handler
terminate.handler: ; preds = %lpad
%exn = load i8*, i8** %exn.slot, align 8
call void @__clang_call_terminate(i8* %exn) #9
unreachable
}
; Function Attrs: noinline optnone uwtable
define dso_local void @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove_724goodEv() #0 {
entry:
call void @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove_72L7goodG2BEv()
ret void
}
; Function Attrs: noinline optnone uwtable
define internal void @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove_72L7goodG2BEv() #0 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%data = alloca i32*, align 8
%dataVector = alloca %"class.std::vector", align 8
%dataBadBuffer = alloca [50 x i32], align 16
%dataGoodBuffer = alloca [100 x i32], align 16
%agg.tmp = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
%ref.tmp = alloca %"class.__gnu_cxx::__normal_iterator", align 8
%exn.slot = alloca i8*, align 8
%ehselector.slot = alloca i32, align 4
%coerce = alloca %"class.__gnu_cxx::__normal_iterator", align 8
%agg.tmp4 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
%ref.tmp5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
%coerce11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
%agg.tmp13 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
%ref.tmp14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
%coerce20 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
%agg.tmp22 = alloca %"class.std::vector", align 8
call void @_ZNSt6vectorIPiSaIS0_EEC2Ev(%"class.std::vector"* %dataVector) #8
%arraydecay = getelementptr inbounds [100 x i32], [100 x i32]* %dataGoodBuffer, i64 0, i64 0
store i32* %arraydecay, i32** %data, align 8
%call = call i32** @_ZNSt6vectorIPiSaIS0_EE3endEv(%"class.std::vector"* %dataVector) #8
%coerce.dive = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", %"class.__gnu_cxx::__normal_iterator"* %ref.tmp, i32 0, i32 0
store i32** %call, i32*** %coerce.dive, align 8
call void @_ZN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS1_SaIS1_EEEC2IPS1_EERKNS0_IT_NS_11__enable_ifIXsr3std10__are_sameISA_S9_EE7__valueES6_E6__typeEEE(%"class.__gnu_cxx::__normal_iterator.0"* %agg.tmp, %"class.__gnu_cxx::__normal_iterator"* nonnull align 8 dereferenceable(8) %ref.tmp) #8
%coerce.dive1 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", %"class.__gnu_cxx::__normal_iterator.0"* %agg.tmp, i32 0, i32 0
%0 = load i32**, i32*** %coerce.dive1, align 8
%call2 = invoke i32** @_ZNSt6vectorIPiSaIS0_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS0_S2_EEmRS5_(%"class.std::vector"* %dataVector, i32** %0, i64 1, i32** nonnull align 8 dereferenceable(8) %data)
to label %invoke.cont unwind label %lpad
invoke.cont: ; preds = %entry
%coerce.dive3 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", %"class.__gnu_cxx::__normal_iterator"* %coerce, i32 0, i32 0
store i32** %call2, i32*** %coerce.dive3, align 8
%call6 = call i32** @_ZNSt6vectorIPiSaIS0_EE3endEv(%"class.std::vector"* %dataVector) #8
%coerce.dive7 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", %"class.__gnu_cxx::__normal_iterator"* %ref.tmp5, i32 0, i32 0
store i32** %call6, i32*** %coerce.dive7, align 8
call void @_ZN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS1_SaIS1_EEEC2IPS1_EERKNS0_IT_NS_11__enable_ifIXsr3std10__are_sameISA_S9_EE7__valueES6_E6__typeEEE(%"class.__gnu_cxx::__normal_iterator.0"* %agg.tmp4, %"class.__gnu_cxx::__normal_iterator"* nonnull align 8 dereferenceable(8) %ref.tmp5) #8
%coerce.dive8 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", %"class.__gnu_cxx::__normal_iterator.0"* %agg.tmp4, i32 0, i32 0
%1 = load i32**, i32*** %coerce.dive8, align 8
%call10 = invoke i32** @_ZNSt6vectorIPiSaIS0_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS0_S2_EEmRS5_(%"class.std::vector"* %dataVector, i32** %1, i64 1, i32** nonnull align 8 dereferenceable(8) %data)
to label %invoke.cont9 unwind label %lpad
invoke.cont9: ; preds = %invoke.cont
%coerce.dive12 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", %"class.__gnu_cxx::__normal_iterator"* %coerce11, i32 0, i32 0
store i32** %call10, i32*** %coerce.dive12, align 8
%call15 = call i32** @_ZNSt6vectorIPiSaIS0_EE3endEv(%"class.std::vector"* %dataVector) #8
%coerce.dive16 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", %"class.__gnu_cxx::__normal_iterator"* %ref.tmp14, i32 0, i32 0
store i32** %call15, i32*** %coerce.dive16, align 8
call void @_ZN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS1_SaIS1_EEEC2IPS1_EERKNS0_IT_NS_11__enable_ifIXsr3std10__are_sameISA_S9_EE7__valueES6_E6__typeEEE(%"class.__gnu_cxx::__normal_iterator.0"* %agg.tmp13, %"class.__gnu_cxx::__normal_iterator"* nonnull align 8 dereferenceable(8) %ref.tmp14) #8
%coerce.dive17 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", %"class.__gnu_cxx::__normal_iterator.0"* %agg.tmp13, i32 0, i32 0
%2 = load i32**, i32*** %coerce.dive17, align 8
%call19 = invoke i32** @_ZNSt6vectorIPiSaIS0_EE6insertEN9__gnu_cxx17__normal_iteratorIPKS0_S2_EEmRS5_(%"class.std::vector"* %dataVector, i32** %2, i64 1, i32** nonnull align 8 dereferenceable(8) %data)
to label %invoke.cont18 unwind label %lpad
invoke.cont18: ; preds = %invoke.cont9
%coerce.dive21 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", %"class.__gnu_cxx::__normal_iterator"* %coerce20, i32 0, i32 0
store i32** %call19, i32*** %coerce.dive21, align 8
invoke void @_ZNSt6vectorIPiSaIS0_EEC2ERKS2_(%"class.std::vector"* %agg.tmp22, %"class.std::vector"* nonnull align 8 dereferenceable(24) %dataVector)
to label %invoke.cont23 unwind label %lpad
invoke.cont23: ; preds = %invoke.cont18
invoke void @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove_7211goodG2BSinkESt6vectorIPiSaIS1_EE(%"class.std::vector"* %agg.tmp22)
to label %invoke.cont25 unwind label %lpad24
invoke.cont25: ; preds = %invoke.cont23
call void @_ZNSt6vectorIPiSaIS0_EED2Ev(%"class.std::vector"* %agg.tmp22) #8
call void @_ZNSt6vectorIPiSaIS0_EED2Ev(%"class.std::vector"* %dataVector) #8
ret void
lpad: ; preds = %invoke.cont18, %invoke.cont9, %invoke.cont, %entry
%3 = landingpad { i8*, i32 }
cleanup
%4 = extractvalue { i8*, i32 } %3, 0
store i8* %4, i8** %exn.slot, align 8
%5 = extractvalue { i8*, i32 } %3, 1
store i32 %5, i32* %ehselector.slot, align 4
br label %ehcleanup
lpad24: ; preds = %invoke.cont23
%6 = landingpad { i8*, i32 }
cleanup
%7 = extractvalue { i8*, i32 } %6, 0
store i8* %7, i8** %exn.slot, align 8
%8 = extractvalue { i8*, i32 } %6, 1
store i32 %8, i32* %ehselector.slot, align 4
call void @_ZNSt6vectorIPiSaIS0_EED2Ev(%"class.std::vector"* %agg.tmp22) #8
br label %ehcleanup
ehcleanup: ; preds = %lpad24, %lpad
call void @_ZNSt6vectorIPiSaIS0_EED2Ev(%"class.std::vector"* %dataVector) #8
br label %eh.resume
eh.resume: ; preds = %ehcleanup
%exn = load i8*, i8** %exn.slot, align 8
%sel = load i32, i32* %ehselector.slot, align 4
%lpad.val = insertvalue { i8*, i32 } undef, i8* %exn, 0
%lpad.val26 = insertvalue { i8*, i32 } %lpad.val, i32 %sel, 1
resume { i8*, i32 } %lpad.val26
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt12_Vector_baseIPiSaIS0_EEC2Ev(%"struct.std::_Vector_base"* %this) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Vector_base"*, align 8
store %"struct.std::_Vector_base"* %this, %"struct.std::_Vector_base"** %this.addr, align 8
%this1 = load %"struct.std::_Vector_base"*, %"struct.std::_Vector_base"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %this1, i32 0, i32 0
call void @_ZNSt12_Vector_baseIPiSaIS0_EE12_Vector_implC2Ev(%"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl) #8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt12_Vector_baseIPiSaIS0_EE12_Vector_implC2Ev(%"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %this) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"*, align 8
store %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %this, %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"** %this.addr, align 8
%this1 = load %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"*, %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"** %this.addr, align 8
%0 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %this1 to %"class.std::allocator"*
call void @_ZNSaIPiEC2Ev(%"class.std::allocator"* %0) #8
%1 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %this1 to %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"*
call void @_ZNSt12_Vector_baseIPiSaIS0_EE17_Vector_impl_dataC2Ev(%"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"* %1) #8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSaIPiEC2Ev(%"class.std::allocator"* %this) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::allocator"*, align 8
store %"class.std::allocator"* %this, %"class.std::allocator"** %this.addr, align 8
%this1 = load %"class.std::allocator"*, %"class.std::allocator"** %this.addr, align 8
%0 = bitcast %"class.std::allocator"* %this1 to %"class.__gnu_cxx::new_allocator"*
call void @_ZN9__gnu_cxx13new_allocatorIPiEC2Ev(%"class.__gnu_cxx::new_allocator"* %0) #8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt12_Vector_baseIPiSaIS0_EE17_Vector_impl_dataC2Ev(%"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"* %this) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"*, align 8
store %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"* %this, %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"** %this.addr, align 8
%this1 = load %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"*, %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"** %this.addr, align 8
%_M_start = getelementptr inbounds %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data", %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"* %this1, i32 0, i32 0
store i32** null, i32*** %_M_start, align 8
%_M_finish = getelementptr inbounds %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data", %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"* %this1, i32 0, i32 1
store i32** null, i32*** %_M_finish, align 8
%_M_end_of_storage = getelementptr inbounds %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data", %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"* %this1, i32 0, i32 2
store i32** null, i32*** %_M_end_of_storage, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx13new_allocatorIPiEC2Ev(%"class.__gnu_cxx::new_allocator"* %this) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
%this1 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
ret void
}
declare dso_local void @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove_7211goodG2BSinkESt6vectorIPiSaIS1_EE(%"class.std::vector"*) #2
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZSt8_DestroyIPPiS0_EvT_S2_RSaIT0_E(i32** %__first, i32** %__last, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %0) #0 comdat {
entry:
%__first.addr = alloca i32**, align 8
%__last.addr = alloca i32**, align 8
%.addr = alloca %"class.std::allocator"*, align 8
store i32** %__first, i32*** %__first.addr, align 8
store i32** %__last, i32*** %__last.addr, align 8
store %"class.std::allocator"* %0, %"class.std::allocator"** %.addr, align 8
%1 = load i32**, i32*** %__first.addr, align 8
%2 = load i32**, i32*** %__last.addr, align 8
call void @_ZSt8_DestroyIPPiEvT_S2_(i32** %1, i32** %2)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZNSt12_Vector_baseIPiSaIS0_EE19_M_get_Tp_allocatorEv(%"struct.std::_Vector_base"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Vector_base"*, align 8
store %"struct.std::_Vector_base"* %this, %"struct.std::_Vector_base"** %this.addr, align 8
%this1 = load %"struct.std::_Vector_base"*, %"struct.std::_Vector_base"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %this1, i32 0, i32 0
%0 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl to %"class.std::allocator"*
ret %"class.std::allocator"* %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt12_Vector_baseIPiSaIS0_EED2Ev(%"struct.std::_Vector_base"* %this) unnamed_addr #1 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%this.addr = alloca %"struct.std::_Vector_base"*, align 8
%exn.slot = alloca i8*, align 8
%ehselector.slot = alloca i32, align 4
store %"struct.std::_Vector_base"* %this, %"struct.std::_Vector_base"** %this.addr, align 8
%this1 = load %"struct.std::_Vector_base"*, %"struct.std::_Vector_base"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %this1, i32 0, i32 0
%0 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl to %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"*
%_M_start = getelementptr inbounds %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data", %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"* %0, i32 0, i32 0
%1 = load i32**, i32*** %_M_start, align 8
%_M_impl2 = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %this1, i32 0, i32 0
%2 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl2 to %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"*
%_M_end_of_storage = getelementptr inbounds %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data", %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"* %2, i32 0, i32 2
%3 = load i32**, i32*** %_M_end_of_storage, align 8
%_M_impl3 = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %this1, i32 0, i32 0
%4 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl3 to %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"*
%_M_start4 = getelementptr inbounds %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data", %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"* %4, i32 0, i32 0
%5 = load i32**, i32*** %_M_start4, align 8
%sub.ptr.lhs.cast = ptrtoint i32** %3 to i64
%sub.ptr.rhs.cast = ptrtoint i32** %5 to i64
%sub.ptr.sub = sub i64 %sub.ptr.lhs.cast, %sub.ptr.rhs.cast
%sub.ptr.div = sdiv exact i64 %sub.ptr.sub, 8
invoke void @_ZNSt12_Vector_baseIPiSaIS0_EE13_M_deallocateEPS0_m(%"struct.std::_Vector_base"* %this1, i32** %1, i64 %sub.ptr.div)
to label %invoke.cont unwind label %lpad
invoke.cont: ; preds = %entry
%_M_impl5 = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %this1, i32 0, i32 0
call void @_ZNSt12_Vector_baseIPiSaIS0_EE12_Vector_implD2Ev(%"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl5) #8
ret void
lpad: ; preds = %entry
%6 = landingpad { i8*, i32 }
catch i8* null
%7 = extractvalue { i8*, i32 } %6, 0
store i8* %7, i8** %exn.slot, align 8
%8 = extractvalue { i8*, i32 } %6, 1
store i32 %8, i32* %ehselector.slot, align 4
%_M_impl6 = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %this1, i32 0, i32 0
call void @_ZNSt12_Vector_baseIPiSaIS0_EE12_Vector_implD2Ev(%"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl6) #8
br label %terminate.handler
terminate.handler: ; preds = %lpad
%exn = load i8*, i8** %exn.slot, align 8
call void @__clang_call_terminate(i8* %exn) #9
unreachable
}
; Function Attrs: noinline noreturn nounwind
define linkonce_odr hidden void @__clang_call_terminate(i8* %0) #3 comdat {
%2 = call i8* @__cxa_begin_catch(i8* %0) #8
call void @_ZSt9terminatev() #9
unreachable
}
declare dso_local i8* @__cxa_begin_catch(i8*)
declare dso_local void @_ZSt9terminatev()
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZSt8_DestroyIPPiEvT_S2_(i32** %__first, i32** %__last) #0 comdat {
entry:
%__first.addr = alloca i32**, align 8
%__last.addr = alloca i32**, align 8
store i32** %__first, i32*** %__first.addr, align 8
store i32** %__last, i32*** %__last.addr, align 8
%0 = load i32**, i32*** %__first.addr, align 8
%1 = load i32**, i32*** %__last.addr, align 8
call void @_ZNSt12_Destroy_auxILb1EE9__destroyIPPiEEvT_S4_(i32** %0, i32** %1)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt12_Destroy_auxILb1EE9__destroyIPPiEEvT_S4_(i32** %0, i32** %1) #1 comdat align 2 {
entry:
%.addr = alloca i32**, align 8
%.addr1 = alloca i32**, align 8
store i32** %0, i32*** %.addr, align 8
store i32** %1, i32*** %.addr1, align 8
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt12_Vector_baseIPiSaIS0_EE13_M_deallocateEPS0_m(%"struct.std::_Vector_base"* %this, i32** %__p, i64 %__n) #0 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Vector_base"*, align 8
%__p.addr = alloca i32**, align 8
%__n.addr = alloca i64, align 8
store %"struct.std::_Vector_base"* %this, %"struct.std::_Vector_base"** %this.addr, align 8
store i32** %__p, i32*** %__p.addr, align 8
store i64 %__n, i64* %__n.addr, align 8
%this1 = load %"struct.std::_Vector_base"*, %"struct.std::_Vector_base"** %this.addr, align 8
%0 = load i32**, i32*** %__p.addr, align 8
%tobool = icmp ne i32** %0, null
br i1 %tobool, label %if.then, label %if.end
if.then: ; preds = %entry
%_M_impl = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %this1, i32 0, i32 0
%1 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl to %"class.std::allocator"*
%2 = load i32**, i32*** %__p.addr, align 8
%3 = load i64, i64* %__n.addr, align 8
call void @_ZNSt16allocator_traitsISaIPiEE10deallocateERS1_PS0_m(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %1, i32** %2, i64 %3)
br label %if.end
if.end: ; preds = %if.then, %entry
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt12_Vector_baseIPiSaIS0_EE12_Vector_implD2Ev(%"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %this) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"*, align 8
store %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %this, %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"** %this.addr, align 8
%this1 = load %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"*, %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"** %this.addr, align 8
%0 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %this1 to %"class.std::allocator"*
call void @_ZNSaIPiED2Ev(%"class.std::allocator"* %0) #8
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt16allocator_traitsISaIPiEE10deallocateERS1_PS0_m(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a, i32** %__p, i64 %__n) #0 comdat align 2 {
entry:
%__a.addr = alloca %"class.std::allocator"*, align 8
%__p.addr = alloca i32**, align 8
%__n.addr = alloca i64, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
store i32** %__p, i32*** %__p.addr, align 8
store i64 %__n, i64* %__n.addr, align 8
%0 = load %"class.std::allocator"*, %"class.std::allocator"** %__a.addr, align 8
%1 = bitcast %"class.std::allocator"* %0 to %"class.__gnu_cxx::new_allocator"*
%2 = load i32**, i32*** %__p.addr, align 8
%3 = load i64, i64* %__n.addr, align 8
call void @_ZN9__gnu_cxx13new_allocatorIPiE10deallocateEPS1_m(%"class.__gnu_cxx::new_allocator"* %1, i32** %2, i64 %3)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx13new_allocatorIPiE10deallocateEPS1_m(%"class.__gnu_cxx::new_allocator"* %this, i32** %__p, i64 %__t) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
%__p.addr = alloca i32**, align 8
%__t.addr = alloca i64, align 8
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
store i32** %__p, i32*** %__p.addr, align 8
store i64 %__t, i64* %__t.addr, align 8
%this1 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
%0 = load i32**, i32*** %__p.addr, align 8
%1 = bitcast i32** %0 to i8*
call void @_ZdlPv(i8* %1) #8
ret void
}
; Function Attrs: nobuiltin nounwind
declare dso_local void @_ZdlPv(i8*) #4
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx13new_allocatorIPiED2Ev(%"class.__gnu_cxx::new_allocator"* %this) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
%this1 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx17__normal_iteratorIPPiSt6vectorIS1_SaIS1_EEEC2ERKS2_(%"class.__gnu_cxx::__normal_iterator"* %this, i32*** nonnull align 8 dereferenceable(8) %__i) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::__normal_iterator"*, align 8
%__i.addr = alloca i32***, align 8
store %"class.__gnu_cxx::__normal_iterator"* %this, %"class.__gnu_cxx::__normal_iterator"** %this.addr, align 8
store i32*** %__i, i32**** %__i.addr, align 8
%this1 = load %"class.__gnu_cxx::__normal_iterator"*, %"class.__gnu_cxx::__normal_iterator"** %this.addr, align 8
%_M_current = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", %"class.__gnu_cxx::__normal_iterator"* %this1, i32 0, i32 0
%0 = load i32***, i32**** %__i.addr, align 8
%1 = load i32**, i32*** %0, align 8
store i32** %1, i32*** %_M_current, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i64 @_ZN9__gnu_cxxmiIPKPiSt6vectorIS1_SaIS1_EEEENS_17__normal_iteratorIT_T0_E15difference_typeERKSA_SD_(%"class.__gnu_cxx::__normal_iterator.0"* nonnull align 8 dereferenceable(8) %__lhs, %"class.__gnu_cxx::__normal_iterator.0"* nonnull align 8 dereferenceable(8) %__rhs) #1 comdat {
entry:
%__lhs.addr = alloca %"class.__gnu_cxx::__normal_iterator.0"*, align 8
%__rhs.addr = alloca %"class.__gnu_cxx::__normal_iterator.0"*, align 8
store %"class.__gnu_cxx::__normal_iterator.0"* %__lhs, %"class.__gnu_cxx::__normal_iterator.0"** %__lhs.addr, align 8
store %"class.__gnu_cxx::__normal_iterator.0"* %__rhs, %"class.__gnu_cxx::__normal_iterator.0"** %__rhs.addr, align 8
%0 = load %"class.__gnu_cxx::__normal_iterator.0"*, %"class.__gnu_cxx::__normal_iterator.0"** %__lhs.addr, align 8
%call = call nonnull align 8 dereferenceable(8) i32*** @_ZNK9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS1_SaIS1_EEE4baseEv(%"class.__gnu_cxx::__normal_iterator.0"* %0) #8
%1 = load i32**, i32*** %call, align 8
%2 = load %"class.__gnu_cxx::__normal_iterator.0"*, %"class.__gnu_cxx::__normal_iterator.0"** %__rhs.addr, align 8
%call1 = call nonnull align 8 dereferenceable(8) i32*** @_ZNK9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS1_SaIS1_EEE4baseEv(%"class.__gnu_cxx::__normal_iterator.0"* %2) #8
%3 = load i32**, i32*** %call1, align 8
%sub.ptr.lhs.cast = ptrtoint i32** %1 to i64
%sub.ptr.rhs.cast = ptrtoint i32** %3 to i64
%sub.ptr.sub = sub i64 %sub.ptr.lhs.cast, %sub.ptr.rhs.cast
%sub.ptr.div = sdiv exact i64 %sub.ptr.sub, 8
ret i64 %sub.ptr.div
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i32** @_ZNKSt6vectorIPiSaIS0_EE6cbeginEv(%"class.std::vector"* %this) #1 comdat align 2 {
entry:
%retval = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
%this.addr = alloca %"class.std::vector"*, align 8
store %"class.std::vector"* %this, %"class.std::vector"** %this.addr, align 8
%this1 = load %"class.std::vector"*, %"class.std::vector"** %this.addr, align 8
%0 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%_M_impl = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %0, i32 0, i32 0
%1 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl to %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"*
%_M_start = getelementptr inbounds %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data", %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"* %1, i32 0, i32 0
call void @_ZN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS1_SaIS1_EEEC2ERKS3_(%"class.__gnu_cxx::__normal_iterator.0"* %retval, i32*** nonnull align 8 dereferenceable(8) %_M_start) #8
%coerce.dive = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", %"class.__gnu_cxx::__normal_iterator.0"* %retval, i32 0, i32 0
%2 = load i32**, i32*** %coerce.dive, align 8
ret i32** %2
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt6vectorIPiSaIS0_EE14_M_fill_insertEN9__gnu_cxx17__normal_iteratorIPS0_S2_EEmRKS0_(%"class.std::vector"* %this, i32** %__position.coerce, i64 %__n, i32** nonnull align 8 dereferenceable(8) %__x) #0 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%__position = alloca %"class.__gnu_cxx::__normal_iterator", align 8
%this.addr = alloca %"class.std::vector"*, align 8
%__n.addr = alloca i64, align 8
%__x.addr = alloca i32**, align 8
%__tmp = alloca %"struct.std::vector<int *, std::allocator<int *>>::_Temporary_value", align 8
%__x_copy = alloca i32**, align 8
%exn.slot = alloca i8*, align 8
%ehselector.slot = alloca i32, align 4
%__elems_after = alloca i64, align 8
%ref.tmp = alloca %"class.__gnu_cxx::__normal_iterator", align 8
%__old_finish = alloca i32**, align 8
%__len = alloca i64, align 8
%__elems_before = alloca i64, align 8
%ref.tmp53 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
%__new_start = alloca i32**, align 8
%__new_finish = alloca i32**, align 8
%coerce.dive = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", %"class.__gnu_cxx::__normal_iterator"* %__position, i32 0, i32 0
store i32** %__position.coerce, i32*** %coerce.dive, align 8
store %"class.std::vector"* %this, %"class.std::vector"** %this.addr, align 8
store i64 %__n, i64* %__n.addr, align 8
store i32** %__x, i32*** %__x.addr, align 8
%this1 = load %"class.std::vector"*, %"class.std::vector"** %this.addr, align 8
%0 = load i64, i64* %__n.addr, align 8
%cmp = icmp ne i64 %0, 0
br i1 %cmp, label %if.then, label %if.end111
if.then: ; preds = %entry
%1 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%_M_impl = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %1, i32 0, i32 0
%2 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl to %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"*
%_M_end_of_storage = getelementptr inbounds %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data", %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"* %2, i32 0, i32 2
%3 = load i32**, i32*** %_M_end_of_storage, align 8
%4 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%_M_impl2 = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %4, i32 0, i32 0
%5 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl2 to %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"*
%_M_finish = getelementptr inbounds %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data", %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"* %5, i32 0, i32 1
%6 = load i32**, i32*** %_M_finish, align 8
%sub.ptr.lhs.cast = ptrtoint i32** %3 to i64
%sub.ptr.rhs.cast = ptrtoint i32** %6 to i64
%sub.ptr.sub = sub i64 %sub.ptr.lhs.cast, %sub.ptr.rhs.cast
%sub.ptr.div = sdiv exact i64 %sub.ptr.sub, 8
%7 = load i64, i64* %__n.addr, align 8
%cmp3 = icmp uge i64 %sub.ptr.div, %7
br i1 %cmp3, label %if.then4, label %if.else51
if.then4: ; preds = %if.then
%8 = load i32**, i32*** %__x.addr, align 8
call void @_ZNSt6vectorIPiSaIS0_EE16_Temporary_valueC2IJRKS0_EEEPS2_DpOT_(%"struct.std::vector<int *, std::allocator<int *>>::_Temporary_value"* %__tmp, %"class.std::vector"* %this1, i32** nonnull align 8 dereferenceable(8) %8)
%call = invoke nonnull align 8 dereferenceable(8) i32** @_ZNSt6vectorIPiSaIS0_EE16_Temporary_value6_M_valEv(%"struct.std::vector<int *, std::allocator<int *>>::_Temporary_value"* %__tmp)
to label %invoke.cont unwind label %lpad
invoke.cont: ; preds = %if.then4
store i32** %call, i32*** %__x_copy, align 8
%call5 = call i32** @_ZNSt6vectorIPiSaIS0_EE3endEv(%"class.std::vector"* %this1) #8
%coerce.dive6 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", %"class.__gnu_cxx::__normal_iterator"* %ref.tmp, i32 0, i32 0
store i32** %call5, i32*** %coerce.dive6, align 8
%call7 = call i64 @_ZN9__gnu_cxxmiIPPiSt6vectorIS1_SaIS1_EEEENS_17__normal_iteratorIT_T0_E15difference_typeERKS9_SC_(%"class.__gnu_cxx::__normal_iterator"* nonnull align 8 dereferenceable(8) %ref.tmp, %"class.__gnu_cxx::__normal_iterator"* nonnull align 8 dereferenceable(8) %__position) #8
store i64 %call7, i64* %__elems_after, align 8
%9 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%_M_impl8 = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %9, i32 0, i32 0
%10 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl8 to %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"*
%_M_finish9 = getelementptr inbounds %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data", %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"* %10, i32 0, i32 1
%11 = load i32**, i32*** %_M_finish9, align 8
store i32** %11, i32*** %__old_finish, align 8
%12 = load i64, i64* %__elems_after, align 8
%13 = load i64, i64* %__n.addr, align 8
%cmp10 = icmp ugt i64 %12, %13
br i1 %cmp10, label %if.then11, label %if.else
if.then11: ; preds = %invoke.cont
%14 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%_M_impl12 = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %14, i32 0, i32 0
%15 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl12 to %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"*
%_M_finish13 = getelementptr inbounds %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data", %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"* %15, i32 0, i32 1
%16 = load i32**, i32*** %_M_finish13, align 8
%17 = load i64, i64* %__n.addr, align 8
%idx.neg = sub i64 0, %17
%add.ptr = getelementptr inbounds i32*, i32** %16, i64 %idx.neg
%18 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%_M_impl14 = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %18, i32 0, i32 0
%19 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl14 to %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"*
%_M_finish15 = getelementptr inbounds %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data", %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"* %19, i32 0, i32 1
%20 = load i32**, i32*** %_M_finish15, align 8
%21 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%_M_impl16 = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %21, i32 0, i32 0
%22 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl16 to %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"*
%_M_finish17 = getelementptr inbounds %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data", %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"* %22, i32 0, i32 1
%23 = load i32**, i32*** %_M_finish17, align 8
%24 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%call18 = call nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZNSt12_Vector_baseIPiSaIS0_EE19_M_get_Tp_allocatorEv(%"struct.std::_Vector_base"* %24) #8
%call20 = invoke i32** @_ZSt22__uninitialized_move_aIPPiS1_SaIS0_EET0_T_S4_S3_RT1_(i32** %add.ptr, i32** %20, i32** %23, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %call18)
to label %invoke.cont19 unwind label %lpad
invoke.cont19: ; preds = %if.then11
%25 = load i64, i64* %__n.addr, align 8
%26 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%_M_impl21 = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %26, i32 0, i32 0
%27 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl21 to %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"*
%_M_finish22 = getelementptr inbounds %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data", %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"* %27, i32 0, i32 1
%28 = load i32**, i32*** %_M_finish22, align 8
%add.ptr23 = getelementptr inbounds i32*, i32** %28, i64 %25
store i32** %add.ptr23, i32*** %_M_finish22, align 8
%call24 = call nonnull align 8 dereferenceable(8) i32*** @_ZNK9__gnu_cxx17__normal_iteratorIPPiSt6vectorIS1_SaIS1_EEE4baseEv(%"class.__gnu_cxx::__normal_iterator"* %__position) #8
%29 = load i32**, i32*** %call24, align 8
%30 = load i32**, i32*** %__old_finish, align 8
%31 = load i64, i64* %__n.addr, align 8
%idx.neg25 = sub i64 0, %31
%add.ptr26 = getelementptr inbounds i32*, i32** %30, i64 %idx.neg25
%32 = load i32**, i32*** %__old_finish, align 8
%call28 = invoke i32** @_ZSt13move_backwardIPPiS1_ET0_T_S3_S2_(i32** %29, i32** %add.ptr26, i32** %32)
to label %invoke.cont27 unwind label %lpad
invoke.cont27: ; preds = %invoke.cont19
%call29 = call nonnull align 8 dereferenceable(8) i32*** @_ZNK9__gnu_cxx17__normal_iteratorIPPiSt6vectorIS1_SaIS1_EEE4baseEv(%"class.__gnu_cxx::__normal_iterator"* %__position) #8
%33 = load i32**, i32*** %call29, align 8
%call30 = call nonnull align 8 dereferenceable(8) i32*** @_ZNK9__gnu_cxx17__normal_iteratorIPPiSt6vectorIS1_SaIS1_EEE4baseEv(%"class.__gnu_cxx::__normal_iterator"* %__position) #8
%34 = load i32**, i32*** %call30, align 8
%35 = load i64, i64* %__n.addr, align 8
%add.ptr31 = getelementptr inbounds i32*, i32** %34, i64 %35
%36 = load i32**, i32*** %__x_copy, align 8
invoke void @_ZSt4fillIPPiS0_EvT_S2_RKT0_(i32** %33, i32** %add.ptr31, i32** nonnull align 8 dereferenceable(8) %36)
to label %invoke.cont32 unwind label %lpad
invoke.cont32: ; preds = %invoke.cont27
br label %if.end
lpad: ; preds = %invoke.cont44, %invoke.cont36, %if.else, %invoke.cont27, %invoke.cont19, %if.then11, %if.then4
%37 = landingpad { i8*, i32 }
cleanup
%38 = extractvalue { i8*, i32 } %37, 0
store i8* %38, i8** %exn.slot, align 8
%39 = extractvalue { i8*, i32 } %37, 1
store i32 %39, i32* %ehselector.slot, align 4
call void @_ZNSt6vectorIPiSaIS0_EE16_Temporary_valueD2Ev(%"struct.std::vector<int *, std::allocator<int *>>::_Temporary_value"* %__tmp) #8
br label %eh.resume
if.else: ; preds = %invoke.cont
%40 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%_M_impl33 = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %40, i32 0, i32 0
%41 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl33 to %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"*
%_M_finish34 = getelementptr inbounds %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data", %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"* %41, i32 0, i32 1
%42 = load i32**, i32*** %_M_finish34, align 8
%43 = load i64, i64* %__n.addr, align 8
%44 = load i64, i64* %__elems_after, align 8
%sub = sub i64 %43, %44
%45 = load i32**, i32*** %__x_copy, align 8
%46 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%call35 = call nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZNSt12_Vector_baseIPiSaIS0_EE19_M_get_Tp_allocatorEv(%"struct.std::_Vector_base"* %46) #8
%call37 = invoke i32** @_ZSt24__uninitialized_fill_n_aIPPimS0_S0_ET_S2_T0_RKT1_RSaIT2_E(i32** %42, i64 %sub, i32** nonnull align 8 dereferenceable(8) %45, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %call35)
to label %invoke.cont36 unwind label %lpad
invoke.cont36: ; preds = %if.else
%47 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%_M_impl38 = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %47, i32 0, i32 0
%48 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl38 to %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"*
%_M_finish39 = getelementptr inbounds %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data", %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"* %48, i32 0, i32 1
store i32** %call37, i32*** %_M_finish39, align 8
%call40 = call nonnull align 8 dereferenceable(8) i32*** @_ZNK9__gnu_cxx17__normal_iteratorIPPiSt6vectorIS1_SaIS1_EEE4baseEv(%"class.__gnu_cxx::__normal_iterator"* %__position) #8
%49 = load i32**, i32*** %call40, align 8
%50 = load i32**, i32*** %__old_finish, align 8
%51 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%_M_impl41 = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %51, i32 0, i32 0
%52 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl41 to %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"*
%_M_finish42 = getelementptr inbounds %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data", %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"* %52, i32 0, i32 1
%53 = load i32**, i32*** %_M_finish42, align 8
%54 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%call43 = call nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZNSt12_Vector_baseIPiSaIS0_EE19_M_get_Tp_allocatorEv(%"struct.std::_Vector_base"* %54) #8
%call45 = invoke i32** @_ZSt22__uninitialized_move_aIPPiS1_SaIS0_EET0_T_S4_S3_RT1_(i32** %49, i32** %50, i32** %53, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %call43)
to label %invoke.cont44 unwind label %lpad
invoke.cont44: ; preds = %invoke.cont36
%55 = load i64, i64* %__elems_after, align 8
%56 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%_M_impl46 = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %56, i32 0, i32 0
%57 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl46 to %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"*
%_M_finish47 = getelementptr inbounds %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data", %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"* %57, i32 0, i32 1
%58 = load i32**, i32*** %_M_finish47, align 8
%add.ptr48 = getelementptr inbounds i32*, i32** %58, i64 %55
store i32** %add.ptr48, i32*** %_M_finish47, align 8
%call49 = call nonnull align 8 dereferenceable(8) i32*** @_ZNK9__gnu_cxx17__normal_iteratorIPPiSt6vectorIS1_SaIS1_EEE4baseEv(%"class.__gnu_cxx::__normal_iterator"* %__position) #8
%59 = load i32**, i32*** %call49, align 8
%60 = load i32**, i32*** %__old_finish, align 8
%61 = load i32**, i32*** %__x_copy, align 8
invoke void @_ZSt4fillIPPiS0_EvT_S2_RKT0_(i32** %59, i32** %60, i32** nonnull align 8 dereferenceable(8) %61)
to label %invoke.cont50 unwind label %lpad
invoke.cont50: ; preds = %invoke.cont44
br label %if.end
if.end: ; preds = %invoke.cont50, %invoke.cont32
call void @_ZNSt6vectorIPiSaIS0_EE16_Temporary_valueD2Ev(%"struct.std::vector<int *, std::allocator<int *>>::_Temporary_value"* %__tmp) #8
br label %if.end110
if.else51: ; preds = %if.then
%62 = load i64, i64* %__n.addr, align 8
%call52 = call i64 @_ZNKSt6vectorIPiSaIS0_EE12_M_check_lenEmPKc(%"class.std::vector"* %this1, i64 %62, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
store i64 %call52, i64* %__len, align 8
%call54 = call i32** @_ZNSt6vectorIPiSaIS0_EE5beginEv(%"class.std::vector"* %this1) #8
%coerce.dive55 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", %"class.__gnu_cxx::__normal_iterator"* %ref.tmp53, i32 0, i32 0
store i32** %call54, i32*** %coerce.dive55, align 8
%call56 = call i64 @_ZN9__gnu_cxxmiIPPiSt6vectorIS1_SaIS1_EEEENS_17__normal_iteratorIT_T0_E15difference_typeERKS9_SC_(%"class.__gnu_cxx::__normal_iterator"* nonnull align 8 dereferenceable(8) %__position, %"class.__gnu_cxx::__normal_iterator"* nonnull align 8 dereferenceable(8) %ref.tmp53) #8
store i64 %call56, i64* %__elems_before, align 8
%63 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%64 = load i64, i64* %__len, align 8
%call57 = call i32** @_ZNSt12_Vector_baseIPiSaIS0_EE11_M_allocateEm(%"struct.std::_Vector_base"* %63, i64 %64)
store i32** %call57, i32*** %__new_start, align 8
%65 = load i32**, i32*** %__new_start, align 8
store i32** %65, i32*** %__new_finish, align 8
%66 = load i32**, i32*** %__new_start, align 8
%67 = load i64, i64* %__elems_before, align 8
%add.ptr58 = getelementptr inbounds i32*, i32** %66, i64 %67
%68 = load i64, i64* %__n.addr, align 8
%69 = load i32**, i32*** %__x.addr, align 8
%70 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%call59 = call nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZNSt12_Vector_baseIPiSaIS0_EE19_M_get_Tp_allocatorEv(%"struct.std::_Vector_base"* %70) #8
%call62 = invoke i32** @_ZSt24__uninitialized_fill_n_aIPPimS0_S0_ET_S2_T0_RKT1_RSaIT2_E(i32** %add.ptr58, i64 %68, i32** nonnull align 8 dereferenceable(8) %69, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %call59)
to label %invoke.cont61 unwind label %lpad60
invoke.cont61: ; preds = %if.else51
store i32** null, i32*** %__new_finish, align 8
%71 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%_M_impl63 = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %71, i32 0, i32 0
%72 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl63 to %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"*
%_M_start = getelementptr inbounds %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data", %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"* %72, i32 0, i32 0
%73 = load i32**, i32*** %_M_start, align 8
%call64 = call nonnull align 8 dereferenceable(8) i32*** @_ZNK9__gnu_cxx17__normal_iteratorIPPiSt6vectorIS1_SaIS1_EEE4baseEv(%"class.__gnu_cxx::__normal_iterator"* %__position) #8
%74 = load i32**, i32*** %call64, align 8
%75 = load i32**, i32*** %__new_start, align 8
%76 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%call65 = call nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZNSt12_Vector_baseIPiSaIS0_EE19_M_get_Tp_allocatorEv(%"struct.std::_Vector_base"* %76) #8
%call67 = invoke i32** @_ZSt34__uninitialized_move_if_noexcept_aIPPiS1_SaIS0_EET0_T_S4_S3_RT1_(i32** %73, i32** %74, i32** %75, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %call65)
to label %invoke.cont66 unwind label %lpad60
invoke.cont66: ; preds = %invoke.cont61
store i32** %call67, i32*** %__new_finish, align 8
%77 = load i64, i64* %__n.addr, align 8
%78 = load i32**, i32*** %__new_finish, align 8
%add.ptr68 = getelementptr inbounds i32*, i32** %78, i64 %77
store i32** %add.ptr68, i32*** %__new_finish, align 8
%call69 = call nonnull align 8 dereferenceable(8) i32*** @_ZNK9__gnu_cxx17__normal_iteratorIPPiSt6vectorIS1_SaIS1_EEE4baseEv(%"class.__gnu_cxx::__normal_iterator"* %__position) #8
%79 = load i32**, i32*** %call69, align 8
%80 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%_M_impl70 = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %80, i32 0, i32 0
%81 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl70 to %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"*
%_M_finish71 = getelementptr inbounds %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data", %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"* %81, i32 0, i32 1
%82 = load i32**, i32*** %_M_finish71, align 8
%83 = load i32**, i32*** %__new_finish, align 8
%84 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%call72 = call nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZNSt12_Vector_baseIPiSaIS0_EE19_M_get_Tp_allocatorEv(%"struct.std::_Vector_base"* %84) #8
%call74 = invoke i32** @_ZSt34__uninitialized_move_if_noexcept_aIPPiS1_SaIS0_EET0_T_S4_S3_RT1_(i32** %79, i32** %82, i32** %83, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %call72)
to label %invoke.cont73 unwind label %lpad60
invoke.cont73: ; preds = %invoke.cont66
store i32** %call74, i32*** %__new_finish, align 8
br label %try.cont
lpad60: ; preds = %invoke.cont66, %invoke.cont61, %if.else51
%85 = landingpad { i8*, i32 }
catch i8* null
%86 = extractvalue { i8*, i32 } %85, 0
store i8* %86, i8** %exn.slot, align 8
%87 = extractvalue { i8*, i32 } %85, 1
store i32 %87, i32* %ehselector.slot, align 4
br label %catch
catch: ; preds = %lpad60
%exn = load i8*, i8** %exn.slot, align 8
%88 = call i8* @__cxa_begin_catch(i8* %exn) #8
%89 = load i32**, i32*** %__new_finish, align 8
%tobool = icmp ne i32** %89, null
br i1 %tobool, label %if.else82, label %if.then75
if.then75: ; preds = %catch
%90 = load i32**, i32*** %__new_start, align 8
%91 = load i64, i64* %__elems_before, align 8
%add.ptr76 = getelementptr inbounds i32*, i32** %90, i64 %91
%92 = load i32**, i32*** %__new_start, align 8
%93 = load i64, i64* %__elems_before, align 8
%add.ptr77 = getelementptr inbounds i32*, i32** %92, i64 %93
%94 = load i64, i64* %__n.addr, align 8
%add.ptr78 = getelementptr inbounds i32*, i32** %add.ptr77, i64 %94
%95 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%call79 = call nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZNSt12_Vector_baseIPiSaIS0_EE19_M_get_Tp_allocatorEv(%"struct.std::_Vector_base"* %95) #8
invoke void @_ZSt8_DestroyIPPiS0_EvT_S2_RSaIT0_E(i32** %add.ptr76, i32** %add.ptr78, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %call79)
to label %invoke.cont81 unwind label %lpad80
invoke.cont81: ; preds = %if.then75
br label %if.end85
lpad80: ; preds = %invoke.cont86, %if.end85, %if.else82, %if.then75
%96 = landingpad { i8*, i32 }
cleanup
%97 = extractvalue { i8*, i32 } %96, 0
store i8* %97, i8** %exn.slot, align 8
%98 = extractvalue { i8*, i32 } %96, 1
store i32 %98, i32* %ehselector.slot, align 4
invoke void @__cxa_end_catch()
to label %invoke.cont87 unwind label %terminate.lpad
if.else82: ; preds = %catch
%99 = load i32**, i32*** %__new_start, align 8
%100 = load i32**, i32*** %__new_finish, align 8
%101 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%call83 = call nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZNSt12_Vector_baseIPiSaIS0_EE19_M_get_Tp_allocatorEv(%"struct.std::_Vector_base"* %101) #8
invoke void @_ZSt8_DestroyIPPiS0_EvT_S2_RSaIT0_E(i32** %99, i32** %100, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %call83)
to label %invoke.cont84 unwind label %lpad80
invoke.cont84: ; preds = %if.else82
br label %if.end85
if.end85: ; preds = %invoke.cont84, %invoke.cont81
%102 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%103 = load i32**, i32*** %__new_start, align 8
%104 = load i64, i64* %__len, align 8
invoke void @_ZNSt12_Vector_baseIPiSaIS0_EE13_M_deallocateEPS0_m(%"struct.std::_Vector_base"* %102, i32** %103, i64 %104)
to label %invoke.cont86 unwind label %lpad80
invoke.cont86: ; preds = %if.end85
invoke void @__cxa_rethrow() #10
to label %unreachable unwind label %lpad80
invoke.cont87: ; preds = %lpad80
br label %eh.resume
try.cont: ; preds = %invoke.cont73
%105 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%_M_impl88 = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %105, i32 0, i32 0
%106 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl88 to %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"*
%_M_start89 = getelementptr inbounds %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data", %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"* %106, i32 0, i32 0
%107 = load i32**, i32*** %_M_start89, align 8
%108 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%_M_impl90 = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %108, i32 0, i32 0
%109 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl90 to %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"*
%_M_finish91 = getelementptr inbounds %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data", %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"* %109, i32 0, i32 1
%110 = load i32**, i32*** %_M_finish91, align 8
%111 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%call92 = call nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZNSt12_Vector_baseIPiSaIS0_EE19_M_get_Tp_allocatorEv(%"struct.std::_Vector_base"* %111) #8
call void @_ZSt8_DestroyIPPiS0_EvT_S2_RSaIT0_E(i32** %107, i32** %110, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %call92)
%112 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%113 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%_M_impl93 = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %113, i32 0, i32 0
%114 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl93 to %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"*
%_M_start94 = getelementptr inbounds %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data", %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"* %114, i32 0, i32 0
%115 = load i32**, i32*** %_M_start94, align 8
%116 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%_M_impl95 = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %116, i32 0, i32 0
%117 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl95 to %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"*
%_M_end_of_storage96 = getelementptr inbounds %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data", %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"* %117, i32 0, i32 2
%118 = load i32**, i32*** %_M_end_of_storage96, align 8
%119 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%_M_impl97 = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %119, i32 0, i32 0
%120 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl97 to %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"*
%_M_start98 = getelementptr inbounds %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data", %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"* %120, i32 0, i32 0
%121 = load i32**, i32*** %_M_start98, align 8
%sub.ptr.lhs.cast99 = ptrtoint i32** %118 to i64
%sub.ptr.rhs.cast100 = ptrtoint i32** %121 to i64
%sub.ptr.sub101 = sub i64 %sub.ptr.lhs.cast99, %sub.ptr.rhs.cast100
%sub.ptr.div102 = sdiv exact i64 %sub.ptr.sub101, 8
call void @_ZNSt12_Vector_baseIPiSaIS0_EE13_M_deallocateEPS0_m(%"struct.std::_Vector_base"* %112, i32** %115, i64 %sub.ptr.div102)
%122 = load i32**, i32*** %__new_start, align 8
%123 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%_M_impl103 = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %123, i32 0, i32 0
%124 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl103 to %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"*
%_M_start104 = getelementptr inbounds %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data", %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"* %124, i32 0, i32 0
store i32** %122, i32*** %_M_start104, align 8
%125 = load i32**, i32*** %__new_finish, align 8
%126 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%_M_impl105 = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %126, i32 0, i32 0
%127 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl105 to %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"*
%_M_finish106 = getelementptr inbounds %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data", %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"* %127, i32 0, i32 1
store i32** %125, i32*** %_M_finish106, align 8
%128 = load i32**, i32*** %__new_start, align 8
%129 = load i64, i64* %__len, align 8
%add.ptr107 = getelementptr inbounds i32*, i32** %128, i64 %129
%130 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%_M_impl108 = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %130, i32 0, i32 0
%131 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl108 to %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"*
%_M_end_of_storage109 = getelementptr inbounds %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data", %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"* %131, i32 0, i32 2
store i32** %add.ptr107, i32*** %_M_end_of_storage109, align 8
br label %if.end110
if.end110: ; preds = %try.cont, %if.end
br label %if.end111
if.end111: ; preds = %if.end110, %entry
ret void
eh.resume: ; preds = %invoke.cont87, %lpad
%exn112 = load i8*, i8** %exn.slot, align 8
%sel = load i32, i32* %ehselector.slot, align 4
%lpad.val = insertvalue { i8*, i32 } undef, i8* %exn112, 0
%lpad.val113 = insertvalue { i8*, i32 } %lpad.val, i32 %sel, 1
resume { i8*, i32 } %lpad.val113
terminate.lpad: ; preds = %lpad80
%132 = landingpad { i8*, i32 }
catch i8* null
%133 = extractvalue { i8*, i32 } %132, 0
call void @__clang_call_terminate(i8* %133) #9
unreachable
unreachable: ; preds = %invoke.cont86
unreachable
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i32** @_ZNSt6vectorIPiSaIS0_EE5beginEv(%"class.std::vector"* %this) #1 comdat align 2 {
entry:
%retval = alloca %"class.__gnu_cxx::__normal_iterator", align 8
%this.addr = alloca %"class.std::vector"*, align 8
store %"class.std::vector"* %this, %"class.std::vector"** %this.addr, align 8
%this1 = load %"class.std::vector"*, %"class.std::vector"** %this.addr, align 8
%0 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%_M_impl = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %0, i32 0, i32 0
%1 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl to %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"*
%_M_start = getelementptr inbounds %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data", %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"* %1, i32 0, i32 0
call void @_ZN9__gnu_cxx17__normal_iteratorIPPiSt6vectorIS1_SaIS1_EEEC2ERKS2_(%"class.__gnu_cxx::__normal_iterator"* %retval, i32*** nonnull align 8 dereferenceable(8) %_M_start) #8
%coerce.dive = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", %"class.__gnu_cxx::__normal_iterator"* %retval, i32 0, i32 0
%2 = load i32**, i32*** %coerce.dive, align 8
ret i32** %2
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i32** @_ZNK9__gnu_cxx17__normal_iteratorIPPiSt6vectorIS1_SaIS1_EEEplEl(%"class.__gnu_cxx::__normal_iterator"* %this, i64 %__n) #1 comdat align 2 {
entry:
%retval = alloca %"class.__gnu_cxx::__normal_iterator", align 8
%this.addr = alloca %"class.__gnu_cxx::__normal_iterator"*, align 8
%__n.addr = alloca i64, align 8
%ref.tmp = alloca i32**, align 8
store %"class.__gnu_cxx::__normal_iterator"* %this, %"class.__gnu_cxx::__normal_iterator"** %this.addr, align 8
store i64 %__n, i64* %__n.addr, align 8
%this1 = load %"class.__gnu_cxx::__normal_iterator"*, %"class.__gnu_cxx::__normal_iterator"** %this.addr, align 8
%_M_current = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", %"class.__gnu_cxx::__normal_iterator"* %this1, i32 0, i32 0
%0 = load i32**, i32*** %_M_current, align 8
%1 = load i64, i64* %__n.addr, align 8
%add.ptr = getelementptr inbounds i32*, i32** %0, i64 %1
store i32** %add.ptr, i32*** %ref.tmp, align 8
call void @_ZN9__gnu_cxx17__normal_iteratorIPPiSt6vectorIS1_SaIS1_EEEC2ERKS2_(%"class.__gnu_cxx::__normal_iterator"* %retval, i32*** nonnull align 8 dereferenceable(8) %ref.tmp) #8
%coerce.dive = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", %"class.__gnu_cxx::__normal_iterator"* %retval, i32 0, i32 0
%2 = load i32**, i32*** %coerce.dive, align 8
ret i32** %2
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) i32*** @_ZNK9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS1_SaIS1_EEE4baseEv(%"class.__gnu_cxx::__normal_iterator.0"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::__normal_iterator.0"*, align 8
store %"class.__gnu_cxx::__normal_iterator.0"* %this, %"class.__gnu_cxx::__normal_iterator.0"** %this.addr, align 8
%this1 = load %"class.__gnu_cxx::__normal_iterator.0"*, %"class.__gnu_cxx::__normal_iterator.0"** %this.addr, align 8
%_M_current = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", %"class.__gnu_cxx::__normal_iterator.0"* %this1, i32 0, i32 0
ret i32*** %_M_current
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS1_SaIS1_EEEC2ERKS3_(%"class.__gnu_cxx::__normal_iterator.0"* %this, i32*** nonnull align 8 dereferenceable(8) %__i) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::__normal_iterator.0"*, align 8
%__i.addr = alloca i32***, align 8
store %"class.__gnu_cxx::__normal_iterator.0"* %this, %"class.__gnu_cxx::__normal_iterator.0"** %this.addr, align 8
store i32*** %__i, i32**** %__i.addr, align 8
%this1 = load %"class.__gnu_cxx::__normal_iterator.0"*, %"class.__gnu_cxx::__normal_iterator.0"** %this.addr, align 8
%_M_current = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", %"class.__gnu_cxx::__normal_iterator.0"* %this1, i32 0, i32 0
%0 = load i32***, i32**** %__i.addr, align 8
%1 = load i32**, i32*** %0, align 8
store i32** %1, i32*** %_M_current, align 8
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt6vectorIPiSaIS0_EE16_Temporary_valueC2IJRKS0_EEEPS2_DpOT_(%"struct.std::vector<int *, std::allocator<int *>>::_Temporary_value"* %this, %"class.std::vector"* %__vec, i32** nonnull align 8 dereferenceable(8) %__args) unnamed_addr #0 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::vector<int *, std::allocator<int *>>::_Temporary_value"*, align 8
%__vec.addr = alloca %"class.std::vector"*, align 8
%__args.addr = alloca i32**, align 8
store %"struct.std::vector<int *, std::allocator<int *>>::_Temporary_value"* %this, %"struct.std::vector<int *, std::allocator<int *>>::_Temporary_value"** %this.addr, align 8
store %"class.std::vector"* %__vec, %"class.std::vector"** %__vec.addr, align 8
store i32** %__args, i32*** %__args.addr, align 8
%this1 = load %"struct.std::vector<int *, std::allocator<int *>>::_Temporary_value"*, %"struct.std::vector<int *, std::allocator<int *>>::_Temporary_value"** %this.addr, align 8
%_M_this = getelementptr inbounds %"struct.std::vector<int *, std::allocator<int *>>::_Temporary_value", %"struct.std::vector<int *, std::allocator<int *>>::_Temporary_value"* %this1, i32 0, i32 0
%0 = load %"class.std::vector"*, %"class.std::vector"** %__vec.addr, align 8
store %"class.std::vector"* %0, %"class.std::vector"** %_M_this, align 8
%__buf = getelementptr inbounds %"struct.std::vector<int *, std::allocator<int *>>::_Temporary_value", %"struct.std::vector<int *, std::allocator<int *>>::_Temporary_value"* %this1, i32 0, i32 1
%_M_this2 = getelementptr inbounds %"struct.std::vector<int *, std::allocator<int *>>::_Temporary_value", %"struct.std::vector<int *, std::allocator<int *>>::_Temporary_value"* %this1, i32 0, i32 0
%1 = load %"class.std::vector"*, %"class.std::vector"** %_M_this2, align 8
%2 = bitcast %"class.std::vector"* %1 to %"struct.std::_Vector_base"*
%_M_impl = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %2, i32 0, i32 0
%3 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl to %"class.std::allocator"*
%call = call i32** @_ZNSt6vectorIPiSaIS0_EE16_Temporary_value6_M_ptrEv(%"struct.std::vector<int *, std::allocator<int *>>::_Temporary_value"* %this1)
%4 = load i32**, i32*** %__args.addr, align 8
%call3 = call nonnull align 8 dereferenceable(8) i32** @_ZSt7forwardIRKPiEOT_RNSt16remove_referenceIS3_E4typeE(i32** nonnull align 8 dereferenceable(8) %4) #8
call void @_ZNSt16allocator_traitsISaIPiEE9constructIS0_JRKS0_EEEvRS1_PT_DpOT0_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %3, i32** %call, i32** nonnull align 8 dereferenceable(8) %call3) #8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) i32** @_ZNSt6vectorIPiSaIS0_EE16_Temporary_value6_M_valEv(%"struct.std::vector<int *, std::allocator<int *>>::_Temporary_value"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::vector<int *, std::allocator<int *>>::_Temporary_value"*, align 8
store %"struct.std::vector<int *, std::allocator<int *>>::_Temporary_value"* %this, %"struct.std::vector<int *, std::allocator<int *>>::_Temporary_value"** %this.addr, align 8
%this1 = load %"struct.std::vector<int *, std::allocator<int *>>::_Temporary_value"*, %"struct.std::vector<int *, std::allocator<int *>>::_Temporary_value"** %this.addr, align 8
%call = call i32** @_ZNSt6vectorIPiSaIS0_EE16_Temporary_value6_M_ptrEv(%"struct.std::vector<int *, std::allocator<int *>>::_Temporary_value"* %this1)
ret i32** %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i64 @_ZN9__gnu_cxxmiIPPiSt6vectorIS1_SaIS1_EEEENS_17__normal_iteratorIT_T0_E15difference_typeERKS9_SC_(%"class.__gnu_cxx::__normal_iterator"* nonnull align 8 dereferenceable(8) %__lhs, %"class.__gnu_cxx::__normal_iterator"* nonnull align 8 dereferenceable(8) %__rhs) #1 comdat {
entry:
%__lhs.addr = alloca %"class.__gnu_cxx::__normal_iterator"*, align 8
%__rhs.addr = alloca %"class.__gnu_cxx::__normal_iterator"*, align 8
store %"class.__gnu_cxx::__normal_iterator"* %__lhs, %"class.__gnu_cxx::__normal_iterator"** %__lhs.addr, align 8
store %"class.__gnu_cxx::__normal_iterator"* %__rhs, %"class.__gnu_cxx::__normal_iterator"** %__rhs.addr, align 8
%0 = load %"class.__gnu_cxx::__normal_iterator"*, %"class.__gnu_cxx::__normal_iterator"** %__lhs.addr, align 8
%call = call nonnull align 8 dereferenceable(8) i32*** @_ZNK9__gnu_cxx17__normal_iteratorIPPiSt6vectorIS1_SaIS1_EEE4baseEv(%"class.__gnu_cxx::__normal_iterator"* %0) #8
%1 = load i32**, i32*** %call, align 8
%2 = load %"class.__gnu_cxx::__normal_iterator"*, %"class.__gnu_cxx::__normal_iterator"** %__rhs.addr, align 8
%call1 = call nonnull align 8 dereferenceable(8) i32*** @_ZNK9__gnu_cxx17__normal_iteratorIPPiSt6vectorIS1_SaIS1_EEE4baseEv(%"class.__gnu_cxx::__normal_iterator"* %2) #8
%3 = load i32**, i32*** %call1, align 8
%sub.ptr.lhs.cast = ptrtoint i32** %1 to i64
%sub.ptr.rhs.cast = ptrtoint i32** %3 to i64
%sub.ptr.sub = sub i64 %sub.ptr.lhs.cast, %sub.ptr.rhs.cast
%sub.ptr.div = sdiv exact i64 %sub.ptr.sub, 8
ret i64 %sub.ptr.div
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i32** @_ZSt22__uninitialized_move_aIPPiS1_SaIS0_EET0_T_S4_S3_RT1_(i32** %__first, i32** %__last, i32** %__result, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %__alloc) #0 comdat {
entry:
%__first.addr = alloca i32**, align 8
%__last.addr = alloca i32**, align 8
%__result.addr = alloca i32**, align 8
%__alloc.addr = alloca %"class.std::allocator"*, align 8
%agg.tmp = alloca %"class.std::move_iterator", align 8
%agg.tmp1 = alloca %"class.std::move_iterator", align 8
store i32** %__first, i32*** %__first.addr, align 8
store i32** %__last, i32*** %__last.addr, align 8
store i32** %__result, i32*** %__result.addr, align 8
store %"class.std::allocator"* %__alloc, %"class.std::allocator"** %__alloc.addr, align 8
%0 = load i32**, i32*** %__first.addr, align 8
%call = call i32** @_ZSt18make_move_iteratorIPPiESt13move_iteratorIT_ES3_(i32** %0)
%coerce.dive = getelementptr inbounds %"class.std::move_iterator", %"class.std::move_iterator"* %agg.tmp, i32 0, i32 0
store i32** %call, i32*** %coerce.dive, align 8
%1 = load i32**, i32*** %__last.addr, align 8
%call2 = call i32** @_ZSt18make_move_iteratorIPPiESt13move_iteratorIT_ES3_(i32** %1)
%coerce.dive3 = getelementptr inbounds %"class.std::move_iterator", %"class.std::move_iterator"* %agg.tmp1, i32 0, i32 0
store i32** %call2, i32*** %coerce.dive3, align 8
%2 = load i32**, i32*** %__result.addr, align 8
%3 = load %"class.std::allocator"*, %"class.std::allocator"** %__alloc.addr, align 8
%coerce.dive4 = getelementptr inbounds %"class.std::move_iterator", %"class.std::move_iterator"* %agg.tmp, i32 0, i32 0
%4 = load i32**, i32*** %coerce.dive4, align 8
%coerce.dive5 = getelementptr inbounds %"class.std::move_iterator", %"class.std::move_iterator"* %agg.tmp1, i32 0, i32 0
%5 = load i32**, i32*** %coerce.dive5, align 8
%call6 = call i32** @_ZSt22__uninitialized_copy_aISt13move_iteratorIPPiES2_S1_ET0_T_S5_S4_RSaIT1_E(i32** %4, i32** %5, i32** %2, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %3)
ret i32** %call6
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i32** @_ZSt13move_backwardIPPiS1_ET0_T_S3_S2_(i32** %__first, i32** %__last, i32** %__result) #0 comdat {
entry:
%__first.addr = alloca i32**, align 8
%__last.addr = alloca i32**, align 8
%__result.addr = alloca i32**, align 8
store i32** %__first, i32*** %__first.addr, align 8
store i32** %__last, i32*** %__last.addr, align 8
store i32** %__result, i32*** %__result.addr, align 8
%0 = load i32**, i32*** %__first.addr, align 8
%call = call i32** @_ZSt12__miter_baseIPPiET_S2_(i32** %0)
%1 = load i32**, i32*** %__last.addr, align 8
%call1 = call i32** @_ZSt12__miter_baseIPPiET_S2_(i32** %1)
%2 = load i32**, i32*** %__result.addr, align 8
%call2 = call i32** @_ZSt22__copy_move_backward_aILb1EPPiS1_ET1_T0_S3_S2_(i32** %call, i32** %call1, i32** %2)
ret i32** %call2
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) i32*** @_ZNK9__gnu_cxx17__normal_iteratorIPPiSt6vectorIS1_SaIS1_EEE4baseEv(%"class.__gnu_cxx::__normal_iterator"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::__normal_iterator"*, align 8
store %"class.__gnu_cxx::__normal_iterator"* %this, %"class.__gnu_cxx::__normal_iterator"** %this.addr, align 8
%this1 = load %"class.__gnu_cxx::__normal_iterator"*, %"class.__gnu_cxx::__normal_iterator"** %this.addr, align 8
%_M_current = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", %"class.__gnu_cxx::__normal_iterator"* %this1, i32 0, i32 0
ret i32*** %_M_current
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZSt4fillIPPiS0_EvT_S2_RKT0_(i32** %__first, i32** %__last, i32** nonnull align 8 dereferenceable(8) %__value) #0 comdat {
entry:
%__first.addr = alloca i32**, align 8
%__last.addr = alloca i32**, align 8
%__value.addr = alloca i32**, align 8
store i32** %__first, i32*** %__first.addr, align 8
store i32** %__last, i32*** %__last.addr, align 8
store i32** %__value, i32*** %__value.addr, align 8
%0 = load i32**, i32*** %__first.addr, align 8
%1 = load i32**, i32*** %__last.addr, align 8
%2 = load i32**, i32*** %__value.addr, align 8
call void @_ZSt8__fill_aIPPiS0_EvT_S2_RKT0_(i32** %0, i32** %1, i32** nonnull align 8 dereferenceable(8) %2)
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i32** @_ZSt24__uninitialized_fill_n_aIPPimS0_S0_ET_S2_T0_RKT1_RSaIT2_E(i32** %__first, i64 %__n, i32** nonnull align 8 dereferenceable(8) %__x, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %0) #0 comdat {
entry:
%__first.addr = alloca i32**, align 8
%__n.addr = alloca i64, align 8
%__x.addr = alloca i32**, align 8
%.addr = alloca %"class.std::allocator"*, align 8
store i32** %__first, i32*** %__first.addr, align 8
store i64 %__n, i64* %__n.addr, align 8
store i32** %__x, i32*** %__x.addr, align 8
store %"class.std::allocator"* %0, %"class.std::allocator"** %.addr, align 8
%1 = load i32**, i32*** %__first.addr, align 8
%2 = load i64, i64* %__n.addr, align 8
%3 = load i32**, i32*** %__x.addr, align 8
%call = call i32** @_ZSt20uninitialized_fill_nIPPimS0_ET_S2_T0_RKT1_(i32** %1, i64 %2, i32** nonnull align 8 dereferenceable(8) %3)
ret i32** %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt6vectorIPiSaIS0_EE16_Temporary_valueD2Ev(%"struct.std::vector<int *, std::allocator<int *>>::_Temporary_value"* %this) unnamed_addr #1 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%this.addr = alloca %"struct.std::vector<int *, std::allocator<int *>>::_Temporary_value"*, align 8
store %"struct.std::vector<int *, std::allocator<int *>>::_Temporary_value"* %this, %"struct.std::vector<int *, std::allocator<int *>>::_Temporary_value"** %this.addr, align 8
%this1 = load %"struct.std::vector<int *, std::allocator<int *>>::_Temporary_value"*, %"struct.std::vector<int *, std::allocator<int *>>::_Temporary_value"** %this.addr, align 8
%_M_this = getelementptr inbounds %"struct.std::vector<int *, std::allocator<int *>>::_Temporary_value", %"struct.std::vector<int *, std::allocator<int *>>::_Temporary_value"* %this1, i32 0, i32 0
%0 = load %"class.std::vector"*, %"class.std::vector"** %_M_this, align 8
%1 = bitcast %"class.std::vector"* %0 to %"struct.std::_Vector_base"*
%_M_impl = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %1, i32 0, i32 0
%2 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl to %"class.std::allocator"*
%call = invoke i32** @_ZNSt6vectorIPiSaIS0_EE16_Temporary_value6_M_ptrEv(%"struct.std::vector<int *, std::allocator<int *>>::_Temporary_value"* %this1)
to label %invoke.cont unwind label %terminate.lpad
invoke.cont: ; preds = %entry
call void @_ZNSt16allocator_traitsISaIPiEE7destroyIS0_EEvRS1_PT_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %2, i32** %call) #8
ret void
terminate.lpad: ; preds = %entry
%3 = landingpad { i8*, i32 }
catch i8* null
%4 = extractvalue { i8*, i32 } %3, 0
call void @__clang_call_terminate(i8* %4) #9
unreachable
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i64 @_ZNKSt6vectorIPiSaIS0_EE12_M_check_lenEmPKc(%"class.std::vector"* %this, i64 %__n, i8* %__s) #0 comdat align 2 {
entry:
%this.addr = alloca %"class.std::vector"*, align 8
%__n.addr = alloca i64, align 8
%__s.addr = alloca i8*, align 8
%__len = alloca i64, align 8
%ref.tmp = alloca i64, align 8
store %"class.std::vector"* %this, %"class.std::vector"** %this.addr, align 8
store i64 %__n, i64* %__n.addr, align 8
store i8* %__s, i8** %__s.addr, align 8
%this1 = load %"class.std::vector"*, %"class.std::vector"** %this.addr, align 8
%call = call i64 @_ZNKSt6vectorIPiSaIS0_EE8max_sizeEv(%"class.std::vector"* %this1) #8
%call2 = call i64 @_ZNKSt6vectorIPiSaIS0_EE4sizeEv(%"class.std::vector"* %this1) #8
%sub = sub i64 %call, %call2
%0 = load i64, i64* %__n.addr, align 8
%cmp = icmp ult i64 %sub, %0
br i1 %cmp, label %if.then, label %if.end
if.then: ; preds = %entry
%1 = load i8*, i8** %__s.addr, align 8
call void @_ZSt20__throw_length_errorPKc(i8* %1) #10
unreachable
if.end: ; preds = %entry
%call3 = call i64 @_ZNKSt6vectorIPiSaIS0_EE4sizeEv(%"class.std::vector"* %this1) #8
%call4 = call i64 @_ZNKSt6vectorIPiSaIS0_EE4sizeEv(%"class.std::vector"* %this1) #8
store i64 %call4, i64* %ref.tmp, align 8
%call5 = call nonnull align 8 dereferenceable(8) i64* @_ZSt3maxImERKT_S2_S2_(i64* nonnull align 8 dereferenceable(8) %ref.tmp, i64* nonnull align 8 dereferenceable(8) %__n.addr)
%2 = load i64, i64* %call5, align 8
%add = add i64 %call3, %2
store i64 %add, i64* %__len, align 8
%3 = load i64, i64* %__len, align 8
%call6 = call i64 @_ZNKSt6vectorIPiSaIS0_EE4sizeEv(%"class.std::vector"* %this1) #8
%cmp7 = icmp ult i64 %3, %call6
br i1 %cmp7, label %cond.true, label %lor.lhs.false
lor.lhs.false: ; preds = %if.end
%4 = load i64, i64* %__len, align 8
%call8 = call i64 @_ZNKSt6vectorIPiSaIS0_EE8max_sizeEv(%"class.std::vector"* %this1) #8
%cmp9 = icmp ugt i64 %4, %call8
br i1 %cmp9, label %cond.true, label %cond.false
cond.true: ; preds = %lor.lhs.false, %if.end
%call10 = call i64 @_ZNKSt6vectorIPiSaIS0_EE8max_sizeEv(%"class.std::vector"* %this1) #8
br label %cond.end
cond.false: ; preds = %lor.lhs.false
%5 = load i64, i64* %__len, align 8
br label %cond.end
cond.end: ; preds = %cond.false, %cond.true
%cond = phi i64 [ %call10, %cond.true ], [ %5, %cond.false ]
ret i64 %cond
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i32** @_ZNSt12_Vector_baseIPiSaIS0_EE11_M_allocateEm(%"struct.std::_Vector_base"* %this, i64 %__n) #0 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Vector_base"*, align 8
%__n.addr = alloca i64, align 8
store %"struct.std::_Vector_base"* %this, %"struct.std::_Vector_base"** %this.addr, align 8
store i64 %__n, i64* %__n.addr, align 8
%this1 = load %"struct.std::_Vector_base"*, %"struct.std::_Vector_base"** %this.addr, align 8
%0 = load i64, i64* %__n.addr, align 8
%cmp = icmp ne i64 %0, 0
br i1 %cmp, label %cond.true, label %cond.false
cond.true: ; preds = %entry
%_M_impl = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %this1, i32 0, i32 0
%1 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl to %"class.std::allocator"*
%2 = load i64, i64* %__n.addr, align 8
%call = call i32** @_ZNSt16allocator_traitsISaIPiEE8allocateERS1_m(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %1, i64 %2)
br label %cond.end
cond.false: ; preds = %entry
br label %cond.end
cond.end: ; preds = %cond.false, %cond.true
%cond = phi i32** [ %call, %cond.true ], [ null, %cond.false ]
ret i32** %cond
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i32** @_ZSt34__uninitialized_move_if_noexcept_aIPPiS1_SaIS0_EET0_T_S4_S3_RT1_(i32** %__first, i32** %__last, i32** %__result, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %__alloc) #0 comdat {
entry:
%__first.addr = alloca i32**, align 8
%__last.addr = alloca i32**, align 8
%__result.addr = alloca i32**, align 8
%__alloc.addr = alloca %"class.std::allocator"*, align 8
%agg.tmp = alloca %"class.std::move_iterator", align 8
%agg.tmp1 = alloca %"class.std::move_iterator", align 8
store i32** %__first, i32*** %__first.addr, align 8
store i32** %__last, i32*** %__last.addr, align 8
store i32** %__result, i32*** %__result.addr, align 8
store %"class.std::allocator"* %__alloc, %"class.std::allocator"** %__alloc.addr, align 8
%0 = load i32**, i32*** %__first.addr, align 8
%call = call i32** @_ZSt32__make_move_if_noexcept_iteratorIPiSt13move_iteratorIPS0_EET0_PT_(i32** %0)
%coerce.dive = getelementptr inbounds %"class.std::move_iterator", %"class.std::move_iterator"* %agg.tmp, i32 0, i32 0
store i32** %call, i32*** %coerce.dive, align 8
%1 = load i32**, i32*** %__last.addr, align 8
%call2 = call i32** @_ZSt32__make_move_if_noexcept_iteratorIPiSt13move_iteratorIPS0_EET0_PT_(i32** %1)
%coerce.dive3 = getelementptr inbounds %"class.std::move_iterator", %"class.std::move_iterator"* %agg.tmp1, i32 0, i32 0
store i32** %call2, i32*** %coerce.dive3, align 8
%2 = load i32**, i32*** %__result.addr, align 8
%3 = load %"class.std::allocator"*, %"class.std::allocator"** %__alloc.addr, align 8
%coerce.dive4 = getelementptr inbounds %"class.std::move_iterator", %"class.std::move_iterator"* %agg.tmp, i32 0, i32 0
%4 = load i32**, i32*** %coerce.dive4, align 8
%coerce.dive5 = getelementptr inbounds %"class.std::move_iterator", %"class.std::move_iterator"* %agg.tmp1, i32 0, i32 0
%5 = load i32**, i32*** %coerce.dive5, align 8
%call6 = call i32** @_ZSt22__uninitialized_copy_aISt13move_iteratorIPPiES2_S1_ET0_T_S5_S4_RSaIT1_E(i32** %4, i32** %5, i32** %2, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %3)
ret i32** %call6
}
declare dso_local void @__cxa_rethrow()
declare dso_local void @__cxa_end_catch()
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt16allocator_traitsISaIPiEE9constructIS0_JRKS0_EEEvRS1_PT_DpOT0_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a, i32** %__p, i32** nonnull align 8 dereferenceable(8) %__args) #1 comdat align 2 {
entry:
%__a.addr = alloca %"class.std::allocator"*, align 8
%__p.addr = alloca i32**, align 8
%__args.addr = alloca i32**, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
store i32** %__p, i32*** %__p.addr, align 8
store i32** %__args, i32*** %__args.addr, align 8
%0 = load %"class.std::allocator"*, %"class.std::allocator"** %__a.addr, align 8
%1 = bitcast %"class.std::allocator"* %0 to %"class.__gnu_cxx::new_allocator"*
%2 = load i32**, i32*** %__p.addr, align 8
%3 = load i32**, i32*** %__args.addr, align 8
%call = call nonnull align 8 dereferenceable(8) i32** @_ZSt7forwardIRKPiEOT_RNSt16remove_referenceIS3_E4typeE(i32** nonnull align 8 dereferenceable(8) %3) #8
call void @_ZN9__gnu_cxx13new_allocatorIPiE9constructIS1_JRKS1_EEEvPT_DpOT0_(%"class.__gnu_cxx::new_allocator"* %1, i32** %2, i32** nonnull align 8 dereferenceable(8) %call) #8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i32** @_ZNSt6vectorIPiSaIS0_EE16_Temporary_value6_M_ptrEv(%"struct.std::vector<int *, std::allocator<int *>>::_Temporary_value"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::vector<int *, std::allocator<int *>>::_Temporary_value"*, align 8
store %"struct.std::vector<int *, std::allocator<int *>>::_Temporary_value"* %this, %"struct.std::vector<int *, std::allocator<int *>>::_Temporary_value"** %this.addr, align 8
%this1 = load %"struct.std::vector<int *, std::allocator<int *>>::_Temporary_value"*, %"struct.std::vector<int *, std::allocator<int *>>::_Temporary_value"** %this.addr, align 8
%__buf = getelementptr inbounds %"struct.std::vector<int *, std::allocator<int *>>::_Temporary_value", %"struct.std::vector<int *, std::allocator<int *>>::_Temporary_value"* %this1, i32 0, i32 1
%0 = bitcast %"union.std::aligned_storage<8, 8>::type"* %__buf to i32**
ret i32** %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) i32** @_ZSt7forwardIRKPiEOT_RNSt16remove_referenceIS3_E4typeE(i32** nonnull align 8 dereferenceable(8) %__t) #1 comdat {
entry:
%__t.addr = alloca i32**, align 8
store i32** %__t, i32*** %__t.addr, align 8
%0 = load i32**, i32*** %__t.addr, align 8
ret i32** %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx13new_allocatorIPiE9constructIS1_JRKS1_EEEvPT_DpOT0_(%"class.__gnu_cxx::new_allocator"* %this, i32** %__p, i32** nonnull align 8 dereferenceable(8) %__args) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
%__p.addr = alloca i32**, align 8
%__args.addr = alloca i32**, align 8
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
store i32** %__p, i32*** %__p.addr, align 8
store i32** %__args, i32*** %__args.addr, align 8
%this1 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
%0 = load i32**, i32*** %__p.addr, align 8
%1 = bitcast i32** %0 to i8*
%2 = bitcast i8* %1 to i32**
%3 = load i32**, i32*** %__args.addr, align 8
%call = call nonnull align 8 dereferenceable(8) i32** @_ZSt7forwardIRKPiEOT_RNSt16remove_referenceIS3_E4typeE(i32** nonnull align 8 dereferenceable(8) %3) #8
%4 = load i32*, i32** %call, align 8
store i32* %4, i32** %2, align 8
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i32** @_ZSt22__uninitialized_copy_aISt13move_iteratorIPPiES2_S1_ET0_T_S5_S4_RSaIT1_E(i32** %__first.coerce, i32** %__last.coerce, i32** %__result, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %0) #0 comdat {
entry:
%__first = alloca %"class.std::move_iterator", align 8
%__last = alloca %"class.std::move_iterator", align 8
%__result.addr = alloca i32**, align 8
%.addr = alloca %"class.std::allocator"*, align 8
%agg.tmp = alloca %"class.std::move_iterator", align 8
%agg.tmp2 = alloca %"class.std::move_iterator", align 8
%coerce.dive = getelementptr inbounds %"class.std::move_iterator", %"class.std::move_iterator"* %__first, i32 0, i32 0
store i32** %__first.coerce, i32*** %coerce.dive, align 8
%coerce.dive1 = getelementptr inbounds %"class.std::move_iterator", %"class.std::move_iterator"* %__last, i32 0, i32 0
store i32** %__last.coerce, i32*** %coerce.dive1, align 8
store i32** %__result, i32*** %__result.addr, align 8
store %"class.std::allocator"* %0, %"class.std::allocator"** %.addr, align 8
%1 = bitcast %"class.std::move_iterator"* %agg.tmp to i8*
%2 = bitcast %"class.std::move_iterator"* %__first to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %1, i8* align 8 %2, i64 8, i1 false)
%3 = bitcast %"class.std::move_iterator"* %agg.tmp2 to i8*
%4 = bitcast %"class.std::move_iterator"* %__last to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %3, i8* align 8 %4, i64 8, i1 false)
%5 = load i32**, i32*** %__result.addr, align 8
%coerce.dive3 = getelementptr inbounds %"class.std::move_iterator", %"class.std::move_iterator"* %agg.tmp, i32 0, i32 0
%6 = load i32**, i32*** %coerce.dive3, align 8
%coerce.dive4 = getelementptr inbounds %"class.std::move_iterator", %"class.std::move_iterator"* %agg.tmp2, i32 0, i32 0
%7 = load i32**, i32*** %coerce.dive4, align 8
%call = call i32** @_ZSt18uninitialized_copyISt13move_iteratorIPPiES2_ET0_T_S5_S4_(i32** %6, i32** %7, i32** %5)
ret i32** %call
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i32** @_ZSt18make_move_iteratorIPPiESt13move_iteratorIT_ES3_(i32** %__i) #0 comdat {
entry:
%retval = alloca %"class.std::move_iterator", align 8
%__i.addr = alloca i32**, align 8
store i32** %__i, i32*** %__i.addr, align 8
%call = call nonnull align 8 dereferenceable(8) i32*** @_ZSt4moveIRPPiEONSt16remove_referenceIT_E4typeEOS4_(i32*** nonnull align 8 dereferenceable(8) %__i.addr) #8
%0 = load i32**, i32*** %call, align 8
call void @_ZNSt13move_iteratorIPPiEC2ES1_(%"class.std::move_iterator"* %retval, i32** %0)
%coerce.dive = getelementptr inbounds %"class.std::move_iterator", %"class.std::move_iterator"* %retval, i32 0, i32 0
%1 = load i32**, i32*** %coerce.dive, align 8
ret i32** %1
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i32** @_ZSt18uninitialized_copyISt13move_iteratorIPPiES2_ET0_T_S5_S4_(i32** %__first.coerce, i32** %__last.coerce, i32** %__result) #0 comdat {
entry:
%__first = alloca %"class.std::move_iterator", align 8
%__last = alloca %"class.std::move_iterator", align 8
%__result.addr = alloca i32**, align 8
%__assignable = alloca i8, align 1
%agg.tmp = alloca %"class.std::move_iterator", align 8
%agg.tmp2 = alloca %"class.std::move_iterator", align 8
%coerce.dive = getelementptr inbounds %"class.std::move_iterator", %"class.std::move_iterator"* %__first, i32 0, i32 0
store i32** %__first.coerce, i32*** %coerce.dive, align 8
%coerce.dive1 = getelementptr inbounds %"class.std::move_iterator", %"class.std::move_iterator"* %__last, i32 0, i32 0
store i32** %__last.coerce, i32*** %coerce.dive1, align 8
store i32** %__result, i32*** %__result.addr, align 8
store i8 1, i8* %__assignable, align 1
%0 = bitcast %"class.std::move_iterator"* %agg.tmp to i8*
%1 = bitcast %"class.std::move_iterator"* %__first to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %0, i8* align 8 %1, i64 8, i1 false)
%2 = bitcast %"class.std::move_iterator"* %agg.tmp2 to i8*
%3 = bitcast %"class.std::move_iterator"* %__last to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %2, i8* align 8 %3, i64 8, i1 false)
%4 = load i32**, i32*** %__result.addr, align 8
%coerce.dive3 = getelementptr inbounds %"class.std::move_iterator", %"class.std::move_iterator"* %agg.tmp, i32 0, i32 0
%5 = load i32**, i32*** %coerce.dive3, align 8
%coerce.dive4 = getelementptr inbounds %"class.std::move_iterator", %"class.std::move_iterator"* %agg.tmp2, i32 0, i32 0
%6 = load i32**, i32*** %coerce.dive4, align 8
%call = call i32** @_ZNSt20__uninitialized_copyILb1EE13__uninit_copyISt13move_iteratorIPPiES4_EET0_T_S7_S6_(i32** %5, i32** %6, i32** %4)
ret i32** %call
}
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #5
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i32** @_ZNSt20__uninitialized_copyILb1EE13__uninit_copyISt13move_iteratorIPPiES4_EET0_T_S7_S6_(i32** %__first.coerce, i32** %__last.coerce, i32** %__result) #0 comdat align 2 {
entry:
%__first = alloca %"class.std::move_iterator", align 8
%__last = alloca %"class.std::move_iterator", align 8
%__result.addr = alloca i32**, align 8
%agg.tmp = alloca %"class.std::move_iterator", align 8
%agg.tmp2 = alloca %"class.std::move_iterator", align 8
%coerce.dive = getelementptr inbounds %"class.std::move_iterator", %"class.std::move_iterator"* %__first, i32 0, i32 0
store i32** %__first.coerce, i32*** %coerce.dive, align 8
%coerce.dive1 = getelementptr inbounds %"class.std::move_iterator", %"class.std::move_iterator"* %__last, i32 0, i32 0
store i32** %__last.coerce, i32*** %coerce.dive1, align 8
store i32** %__result, i32*** %__result.addr, align 8
%0 = bitcast %"class.std::move_iterator"* %agg.tmp to i8*
%1 = bitcast %"class.std::move_iterator"* %__first to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %0, i8* align 8 %1, i64 8, i1 false)
%2 = bitcast %"class.std::move_iterator"* %agg.tmp2 to i8*
%3 = bitcast %"class.std::move_iterator"* %__last to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %2, i8* align 8 %3, i64 8, i1 false)
%4 = load i32**, i32*** %__result.addr, align 8
%coerce.dive3 = getelementptr inbounds %"class.std::move_iterator", %"class.std::move_iterator"* %agg.tmp, i32 0, i32 0
%5 = load i32**, i32*** %coerce.dive3, align 8
%coerce.dive4 = getelementptr inbounds %"class.std::move_iterator", %"class.std::move_iterator"* %agg.tmp2, i32 0, i32 0
%6 = load i32**, i32*** %coerce.dive4, align 8
%call = call i32** @_ZSt4copyISt13move_iteratorIPPiES2_ET0_T_S5_S4_(i32** %5, i32** %6, i32** %4)
ret i32** %call
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i32** @_ZSt4copyISt13move_iteratorIPPiES2_ET0_T_S5_S4_(i32** %__first.coerce, i32** %__last.coerce, i32** %__result) #0 comdat {
entry:
%__first = alloca %"class.std::move_iterator", align 8
%__last = alloca %"class.std::move_iterator", align 8
%__result.addr = alloca i32**, align 8
%agg.tmp = alloca %"class.std::move_iterator", align 8
%agg.tmp3 = alloca %"class.std::move_iterator", align 8
%coerce.dive = getelementptr inbounds %"class.std::move_iterator", %"class.std::move_iterator"* %__first, i32 0, i32 0
store i32** %__first.coerce, i32*** %coerce.dive, align 8
%coerce.dive1 = getelementptr inbounds %"class.std::move_iterator", %"class.std::move_iterator"* %__last, i32 0, i32 0
store i32** %__last.coerce, i32*** %coerce.dive1, align 8
store i32** %__result, i32*** %__result.addr, align 8
%0 = bitcast %"class.std::move_iterator"* %agg.tmp to i8*
%1 = bitcast %"class.std::move_iterator"* %__first to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %0, i8* align 8 %1, i64 8, i1 false)
%coerce.dive2 = getelementptr inbounds %"class.std::move_iterator", %"class.std::move_iterator"* %agg.tmp, i32 0, i32 0
%2 = load i32**, i32*** %coerce.dive2, align 8
%call = call i32** @_ZSt12__miter_baseIPPiEDTcl12__miter_basecldtfp_4baseEEESt13move_iteratorIT_E(i32** %2)
%3 = bitcast %"class.std::move_iterator"* %agg.tmp3 to i8*
%4 = bitcast %"class.std::move_iterator"* %__last to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %3, i8* align 8 %4, i64 8, i1 false)
%coerce.dive4 = getelementptr inbounds %"class.std::move_iterator", %"class.std::move_iterator"* %agg.tmp3, i32 0, i32 0
%5 = load i32**, i32*** %coerce.dive4, align 8
%call5 = call i32** @_ZSt12__miter_baseIPPiEDTcl12__miter_basecldtfp_4baseEEESt13move_iteratorIT_E(i32** %5)
%6 = load i32**, i32*** %__result.addr, align 8
%call6 = call i32** @_ZSt13__copy_move_aILb1EPPiS1_ET1_T0_S3_S2_(i32** %call, i32** %call5, i32** %6)
ret i32** %call6
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i32** @_ZSt13__copy_move_aILb1EPPiS1_ET1_T0_S3_S2_(i32** %__first, i32** %__last, i32** %__result) #0 comdat {
entry:
%__first.addr = alloca i32**, align 8
%__last.addr = alloca i32**, align 8
%__result.addr = alloca i32**, align 8
store i32** %__first, i32*** %__first.addr, align 8
store i32** %__last, i32*** %__last.addr, align 8
store i32** %__result, i32*** %__result.addr, align 8
%0 = load i32**, i32*** %__first.addr, align 8
%call = call i32** @_ZSt12__niter_baseIPPiET_S2_(i32** %0) #8
%1 = load i32**, i32*** %__last.addr, align 8
%call1 = call i32** @_ZSt12__niter_baseIPPiET_S2_(i32** %1) #8
%2 = load i32**, i32*** %__result.addr, align 8
%call2 = call i32** @_ZSt12__niter_baseIPPiET_S2_(i32** %2) #8
%call3 = call i32** @_ZSt14__copy_move_a1ILb1EPPiS1_ET1_T0_S3_S2_(i32** %call, i32** %call1, i32** %call2)
%call4 = call i32** @_ZSt12__niter_wrapIPPiET_RKS2_S2_(i32*** nonnull align 8 dereferenceable(8) %__result.addr, i32** %call3)
ret i32** %call4
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i32** @_ZSt12__miter_baseIPPiEDTcl12__miter_basecldtfp_4baseEEESt13move_iteratorIT_E(i32** %__it.coerce) #0 comdat {
entry:
%__it = alloca %"class.std::move_iterator", align 8
%coerce.dive = getelementptr inbounds %"class.std::move_iterator", %"class.std::move_iterator"* %__it, i32 0, i32 0
store i32** %__it.coerce, i32*** %coerce.dive, align 8
%call = call i32** @_ZNKSt13move_iteratorIPPiE4baseEv(%"class.std::move_iterator"* %__it)
%call1 = call i32** @_ZSt12__miter_baseIPPiET_S2_(i32** %call)
ret i32** %call1
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i32** @_ZSt12__niter_wrapIPPiET_RKS2_S2_(i32*** nonnull align 8 dereferenceable(8) %0, i32** %__res) #1 comdat {
entry:
%.addr = alloca i32***, align 8
%__res.addr = alloca i32**, align 8
store i32*** %0, i32**** %.addr, align 8
store i32** %__res, i32*** %__res.addr, align 8
%1 = load i32**, i32*** %__res.addr, align 8
ret i32** %1
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i32** @_ZSt14__copy_move_a1ILb1EPPiS1_ET1_T0_S3_S2_(i32** %__first, i32** %__last, i32** %__result) #0 comdat {
entry:
%__first.addr = alloca i32**, align 8
%__last.addr = alloca i32**, align 8
%__result.addr = alloca i32**, align 8
store i32** %__first, i32*** %__first.addr, align 8
store i32** %__last, i32*** %__last.addr, align 8
store i32** %__result, i32*** %__result.addr, align 8
%0 = load i32**, i32*** %__first.addr, align 8
%1 = load i32**, i32*** %__last.addr, align 8
%2 = load i32**, i32*** %__result.addr, align 8
%call = call i32** @_ZSt14__copy_move_a2ILb1EPPiS1_ET1_T0_S3_S2_(i32** %0, i32** %1, i32** %2)
ret i32** %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i32** @_ZSt12__niter_baseIPPiET_S2_(i32** %__it) #1 comdat {
entry:
%__it.addr = alloca i32**, align 8
store i32** %__it, i32*** %__it.addr, align 8
%0 = load i32**, i32*** %__it.addr, align 8
ret i32** %0
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i32** @_ZSt14__copy_move_a2ILb1EPPiS1_ET1_T0_S3_S2_(i32** %__first, i32** %__last, i32** %__result) #0 comdat {
entry:
%__first.addr = alloca i32**, align 8
%__last.addr = alloca i32**, align 8
%__result.addr = alloca i32**, align 8
store i32** %__first, i32*** %__first.addr, align 8
store i32** %__last, i32*** %__last.addr, align 8
store i32** %__result, i32*** %__result.addr, align 8
%0 = load i32**, i32*** %__first.addr, align 8
%1 = load i32**, i32*** %__last.addr, align 8
%2 = load i32**, i32*** %__result.addr, align 8
%call = call i32** @_ZNSt11__copy_moveILb1ELb1ESt26random_access_iterator_tagE8__copy_mIPiEEPT_PKS4_S7_S5_(i32** %0, i32** %1, i32** %2)
ret i32** %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i32** @_ZNSt11__copy_moveILb1ELb1ESt26random_access_iterator_tagE8__copy_mIPiEEPT_PKS4_S7_S5_(i32** %__first, i32** %__last, i32** %__result) #1 comdat align 2 {
entry:
%__first.addr = alloca i32**, align 8
%__last.addr = alloca i32**, align 8
%__result.addr = alloca i32**, align 8
%_Num = alloca i64, align 8
store i32** %__first, i32*** %__first.addr, align 8
store i32** %__last, i32*** %__last.addr, align 8
store i32** %__result, i32*** %__result.addr, align 8
%0 = load i32**, i32*** %__last.addr, align 8
%1 = load i32**, i32*** %__first.addr, align 8
%sub.ptr.lhs.cast = ptrtoint i32** %0 to i64
%sub.ptr.rhs.cast = ptrtoint i32** %1 to i64
%sub.ptr.sub = sub i64 %sub.ptr.lhs.cast, %sub.ptr.rhs.cast
%sub.ptr.div = sdiv exact i64 %sub.ptr.sub, 8
store i64 %sub.ptr.div, i64* %_Num, align 8
%2 = load i64, i64* %_Num, align 8
%tobool = icmp ne i64 %2, 0
br i1 %tobool, label %if.then, label %if.end
if.then: ; preds = %entry
%3 = load i32**, i32*** %__result.addr, align 8
%4 = bitcast i32** %3 to i8*
%5 = load i32**, i32*** %__first.addr, align 8
%6 = bitcast i32** %5 to i8*
%7 = load i64, i64* %_Num, align 8
%mul = mul i64 8, %7
call void @llvm.memmove.p0i8.p0i8.i64(i8* align 8 %4, i8* align 8 %6, i64 %mul, i1 false)
br label %if.end
if.end: ; preds = %if.then, %entry
%8 = load i32**, i32*** %__result.addr, align 8
%9 = load i64, i64* %_Num, align 8
%add.ptr = getelementptr inbounds i32*, i32** %8, i64 %9
ret i32** %add.ptr
}
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memmove.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i1 immarg) #5
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i32** @_ZSt12__miter_baseIPPiET_S2_(i32** %__it) #1 comdat {
entry:
%__it.addr = alloca i32**, align 8
store i32** %__it, i32*** %__it.addr, align 8
%0 = load i32**, i32*** %__it.addr, align 8
ret i32** %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i32** @_ZNKSt13move_iteratorIPPiE4baseEv(%"class.std::move_iterator"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::move_iterator"*, align 8
store %"class.std::move_iterator"* %this, %"class.std::move_iterator"** %this.addr, align 8
%this1 = load %"class.std::move_iterator"*, %"class.std::move_iterator"** %this.addr, align 8
%_M_current = getelementptr inbounds %"class.std::move_iterator", %"class.std::move_iterator"* %this1, i32 0, i32 0
%0 = load i32**, i32*** %_M_current, align 8
ret i32** %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) i32*** @_ZSt4moveIRPPiEONSt16remove_referenceIT_E4typeEOS4_(i32*** nonnull align 8 dereferenceable(8) %__t) #1 comdat {
entry:
%__t.addr = alloca i32***, align 8
store i32*** %__t, i32**** %__t.addr, align 8
%0 = load i32***, i32**** %__t.addr, align 8
ret i32*** %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt13move_iteratorIPPiEC2ES1_(%"class.std::move_iterator"* %this, i32** %__i) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::move_iterator"*, align 8
%__i.addr = alloca i32**, align 8
store %"class.std::move_iterator"* %this, %"class.std::move_iterator"** %this.addr, align 8
store i32** %__i, i32*** %__i.addr, align 8
%this1 = load %"class.std::move_iterator"*, %"class.std::move_iterator"** %this.addr, align 8
%_M_current = getelementptr inbounds %"class.std::move_iterator", %"class.std::move_iterator"* %this1, i32 0, i32 0
%call = call nonnull align 8 dereferenceable(8) i32*** @_ZSt4moveIRPPiEONSt16remove_referenceIT_E4typeEOS4_(i32*** nonnull align 8 dereferenceable(8) %__i.addr) #8
%0 = load i32**, i32*** %call, align 8
store i32** %0, i32*** %_M_current, align 8
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i32** @_ZSt22__copy_move_backward_aILb1EPPiS1_ET1_T0_S3_S2_(i32** %__first, i32** %__last, i32** %__result) #0 comdat {
entry:
%__first.addr = alloca i32**, align 8
%__last.addr = alloca i32**, align 8
%__result.addr = alloca i32**, align 8
store i32** %__first, i32*** %__first.addr, align 8
store i32** %__last, i32*** %__last.addr, align 8
store i32** %__result, i32*** %__result.addr, align 8
%0 = load i32**, i32*** %__first.addr, align 8
%call = call i32** @_ZSt12__niter_baseIPPiET_S2_(i32** %0) #8
%1 = load i32**, i32*** %__last.addr, align 8
%call1 = call i32** @_ZSt12__niter_baseIPPiET_S2_(i32** %1) #8
%2 = load i32**, i32*** %__result.addr, align 8
%call2 = call i32** @_ZSt12__niter_baseIPPiET_S2_(i32** %2) #8
%call3 = call i32** @_ZSt23__copy_move_backward_a1ILb1EPPiS1_ET1_T0_S3_S2_(i32** %call, i32** %call1, i32** %call2)
%call4 = call i32** @_ZSt12__niter_wrapIPPiET_RKS2_S2_(i32*** nonnull align 8 dereferenceable(8) %__result.addr, i32** %call3)
ret i32** %call4
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i32** @_ZSt23__copy_move_backward_a1ILb1EPPiS1_ET1_T0_S3_S2_(i32** %__first, i32** %__last, i32** %__result) #0 comdat {
entry:
%__first.addr = alloca i32**, align 8
%__last.addr = alloca i32**, align 8
%__result.addr = alloca i32**, align 8
store i32** %__first, i32*** %__first.addr, align 8
store i32** %__last, i32*** %__last.addr, align 8
store i32** %__result, i32*** %__result.addr, align 8
%0 = load i32**, i32*** %__first.addr, align 8
%1 = load i32**, i32*** %__last.addr, align 8
%2 = load i32**, i32*** %__result.addr, align 8
%call = call i32** @_ZSt23__copy_move_backward_a2ILb1EPPiS1_ET1_T0_S3_S2_(i32** %0, i32** %1, i32** %2)
ret i32** %call
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i32** @_ZSt23__copy_move_backward_a2ILb1EPPiS1_ET1_T0_S3_S2_(i32** %__first, i32** %__last, i32** %__result) #0 comdat {
entry:
%__first.addr = alloca i32**, align 8
%__last.addr = alloca i32**, align 8
%__result.addr = alloca i32**, align 8
store i32** %__first, i32*** %__first.addr, align 8
store i32** %__last, i32*** %__last.addr, align 8
store i32** %__result, i32*** %__result.addr, align 8
%0 = load i32**, i32*** %__first.addr, align 8
%1 = load i32**, i32*** %__last.addr, align 8
%2 = load i32**, i32*** %__result.addr, align 8
%call = call i32** @_ZNSt20__copy_move_backwardILb1ELb1ESt26random_access_iterator_tagE13__copy_move_bIPiEEPT_PKS4_S7_S5_(i32** %0, i32** %1, i32** %2)
ret i32** %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i32** @_ZNSt20__copy_move_backwardILb1ELb1ESt26random_access_iterator_tagE13__copy_move_bIPiEEPT_PKS4_S7_S5_(i32** %__first, i32** %__last, i32** %__result) #1 comdat align 2 {
entry:
%__first.addr = alloca i32**, align 8
%__last.addr = alloca i32**, align 8
%__result.addr = alloca i32**, align 8
%_Num = alloca i64, align 8
store i32** %__first, i32*** %__first.addr, align 8
store i32** %__last, i32*** %__last.addr, align 8
store i32** %__result, i32*** %__result.addr, align 8
%0 = load i32**, i32*** %__last.addr, align 8
%1 = load i32**, i32*** %__first.addr, align 8
%sub.ptr.lhs.cast = ptrtoint i32** %0 to i64
%sub.ptr.rhs.cast = ptrtoint i32** %1 to i64
%sub.ptr.sub = sub i64 %sub.ptr.lhs.cast, %sub.ptr.rhs.cast
%sub.ptr.div = sdiv exact i64 %sub.ptr.sub, 8
store i64 %sub.ptr.div, i64* %_Num, align 8
%2 = load i64, i64* %_Num, align 8
%tobool = icmp ne i64 %2, 0
br i1 %tobool, label %if.then, label %if.end
if.then: ; preds = %entry
%3 = load i32**, i32*** %__result.addr, align 8
%4 = load i64, i64* %_Num, align 8
%idx.neg = sub i64 0, %4
%add.ptr = getelementptr inbounds i32*, i32** %3, i64 %idx.neg
%5 = bitcast i32** %add.ptr to i8*
%6 = load i32**, i32*** %__first.addr, align 8
%7 = bitcast i32** %6 to i8*
%8 = load i64, i64* %_Num, align 8
%mul = mul i64 8, %8
call void @llvm.memmove.p0i8.p0i8.i64(i8* align 8 %5, i8* align 8 %7, i64 %mul, i1 false)
br label %if.end
if.end: ; preds = %if.then, %entry
%9 = load i32**, i32*** %__result.addr, align 8
%10 = load i64, i64* %_Num, align 8
%idx.neg1 = sub i64 0, %10
%add.ptr2 = getelementptr inbounds i32*, i32** %9, i64 %idx.neg1
ret i32** %add.ptr2
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZSt8__fill_aIPPiS0_EvT_S2_RKT0_(i32** %__first, i32** %__last, i32** nonnull align 8 dereferenceable(8) %__value) #0 comdat {
entry:
%__first.addr = alloca i32**, align 8
%__last.addr = alloca i32**, align 8
%__value.addr = alloca i32**, align 8
store i32** %__first, i32*** %__first.addr, align 8
store i32** %__last, i32*** %__last.addr, align 8
store i32** %__value, i32*** %__value.addr, align 8
%0 = load i32**, i32*** %__first.addr, align 8
%1 = load i32**, i32*** %__last.addr, align 8
%2 = load i32**, i32*** %__value.addr, align 8
call void @_ZSt9__fill_a1IPPiS0_EN9__gnu_cxx11__enable_ifIXsr11__is_scalarIT0_EE7__valueEvE6__typeET_S7_RKS4_(i32** %0, i32** %1, i32** nonnull align 8 dereferenceable(8) %2)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZSt9__fill_a1IPPiS0_EN9__gnu_cxx11__enable_ifIXsr11__is_scalarIT0_EE7__valueEvE6__typeET_S7_RKS4_(i32** %__first, i32** %__last, i32** nonnull align 8 dereferenceable(8) %__value) #1 comdat {
entry:
%__first.addr = alloca i32**, align 8
%__last.addr = alloca i32**, align 8
%__value.addr = alloca i32**, align 8
%__tmp = alloca i32*, align 8
store i32** %__first, i32*** %__first.addr, align 8
store i32** %__last, i32*** %__last.addr, align 8
store i32** %__value, i32*** %__value.addr, align 8
%0 = load i32**, i32*** %__value.addr, align 8
%1 = load i32*, i32** %0, align 8
store i32* %1, i32** %__tmp, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %entry
%2 = load i32**, i32*** %__first.addr, align 8
%3 = load i32**, i32*** %__last.addr, align 8
%cmp = icmp ne i32** %2, %3
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%4 = load i32*, i32** %__tmp, align 8
%5 = load i32**, i32*** %__first.addr, align 8
store i32* %4, i32** %5, align 8
br label %for.inc
for.inc: ; preds = %for.body
%6 = load i32**, i32*** %__first.addr, align 8
%incdec.ptr = getelementptr inbounds i32*, i32** %6, i32 1
store i32** %incdec.ptr, i32*** %__first.addr, align 8
br label %for.cond
for.end: ; preds = %for.cond
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i32** @_ZSt20uninitialized_fill_nIPPimS0_ET_S2_T0_RKT1_(i32** %__first, i64 %__n, i32** nonnull align 8 dereferenceable(8) %__x) #0 comdat {
entry:
%__first.addr = alloca i32**, align 8
%__n.addr = alloca i64, align 8
%__x.addr = alloca i32**, align 8
%__can_fill = alloca i8, align 1
store i32** %__first, i32*** %__first.addr, align 8
store i64 %__n, i64* %__n.addr, align 8
store i32** %__x, i32*** %__x.addr, align 8
store i8 1, i8* %__can_fill, align 1
%0 = load i32**, i32*** %__first.addr, align 8
%1 = load i64, i64* %__n.addr, align 8
%2 = load i32**, i32*** %__x.addr, align 8
%call = call i32** @_ZNSt22__uninitialized_fill_nILb1EE15__uninit_fill_nIPPimS2_EET_S4_T0_RKT1_(i32** %0, i64 %1, i32** nonnull align 8 dereferenceable(8) %2)
ret i32** %call
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i32** @_ZNSt22__uninitialized_fill_nILb1EE15__uninit_fill_nIPPimS2_EET_S4_T0_RKT1_(i32** %__first, i64 %__n, i32** nonnull align 8 dereferenceable(8) %__x) #0 comdat align 2 {
entry:
%__first.addr = alloca i32**, align 8
%__n.addr = alloca i64, align 8
%__x.addr = alloca i32**, align 8
store i32** %__first, i32*** %__first.addr, align 8
store i64 %__n, i64* %__n.addr, align 8
store i32** %__x, i32*** %__x.addr, align 8
%0 = load i32**, i32*** %__first.addr, align 8
%1 = load i64, i64* %__n.addr, align 8
%2 = load i32**, i32*** %__x.addr, align 8
%call = call i32** @_ZSt6fill_nIPPimS0_ET_S2_T0_RKT1_(i32** %0, i64 %1, i32** nonnull align 8 dereferenceable(8) %2)
ret i32** %call
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i32** @_ZSt6fill_nIPPimS0_ET_S2_T0_RKT1_(i32** %__first, i64 %__n, i32** nonnull align 8 dereferenceable(8) %__value) #0 comdat {
entry:
%__first.addr = alloca i32**, align 8
%__n.addr = alloca i64, align 8
%__value.addr = alloca i32**, align 8
%agg.tmp = alloca %"struct.std::random_access_iterator_tag", align 1
%undef.agg.tmp = alloca %"struct.std::random_access_iterator_tag", align 1
store i32** %__first, i32*** %__first.addr, align 8
store i64 %__n, i64* %__n.addr, align 8
store i32** %__value, i32*** %__value.addr, align 8
%0 = load i32**, i32*** %__first.addr, align 8
%1 = load i64, i64* %__n.addr, align 8
%call = call i64 @_ZSt17__size_to_integerm(i64 %1)
%2 = load i32**, i32*** %__value.addr, align 8
call void @_ZSt19__iterator_categoryIPPiENSt15iterator_traitsIT_E17iterator_categoryERKS3_(i32*** nonnull align 8 dereferenceable(8) %__first.addr)
%call1 = call i32** @_ZSt10__fill_n_aIPPimS0_ET_S2_T0_RKT1_St26random_access_iterator_tag(i32** %0, i64 %call, i32** nonnull align 8 dereferenceable(8) %2)
ret i32** %call1
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i32** @_ZSt10__fill_n_aIPPimS0_ET_S2_T0_RKT1_St26random_access_iterator_tag(i32** %__first, i64 %__n, i32** nonnull align 8 dereferenceable(8) %__value) #0 comdat {
entry:
%retval = alloca i32**, align 8
%0 = alloca %"struct.std::random_access_iterator_tag", align 1
%__first.addr = alloca i32**, align 8
%__n.addr = alloca i64, align 8
%__value.addr = alloca i32**, align 8
store i32** %__first, i32*** %__first.addr, align 8
store i64 %__n, i64* %__n.addr, align 8
store i32** %__value, i32*** %__value.addr, align 8
%1 = load i64, i64* %__n.addr, align 8
%cmp = icmp ule i64 %1, 0
br i1 %cmp, label %if.then, label %if.end
if.then: ; preds = %entry
%2 = load i32**, i32*** %__first.addr, align 8
store i32** %2, i32*** %retval, align 8
br label %return
if.end: ; preds = %entry
%3 = load i32**, i32*** %__first.addr, align 8
%4 = load i32**, i32*** %__first.addr, align 8
%5 = load i64, i64* %__n.addr, align 8
%add.ptr = getelementptr inbounds i32*, i32** %4, i64 %5
%6 = load i32**, i32*** %__value.addr, align 8
call void @_ZSt8__fill_aIPPiS0_EvT_S2_RKT0_(i32** %3, i32** %add.ptr, i32** nonnull align 8 dereferenceable(8) %6)
%7 = load i32**, i32*** %__first.addr, align 8
%8 = load i64, i64* %__n.addr, align 8
%add.ptr1 = getelementptr inbounds i32*, i32** %7, i64 %8
store i32** %add.ptr1, i32*** %retval, align 8
br label %return
return: ; preds = %if.end, %if.then
%9 = load i32**, i32*** %retval, align 8
ret i32** %9
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i64 @_ZSt17__size_to_integerm(i64 %__n) #1 comdat {
entry:
%__n.addr = alloca i64, align 8
store i64 %__n, i64* %__n.addr, align 8
%0 = load i64, i64* %__n.addr, align 8
ret i64 %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZSt19__iterator_categoryIPPiENSt15iterator_traitsIT_E17iterator_categoryERKS3_(i32*** nonnull align 8 dereferenceable(8) %0) #1 comdat {
entry:
%.addr = alloca i32***, align 8
store i32*** %0, i32**** %.addr, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt16allocator_traitsISaIPiEE7destroyIS0_EEvRS1_PT_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a, i32** %__p) #1 comdat align 2 {
entry:
%__a.addr = alloca %"class.std::allocator"*, align 8
%__p.addr = alloca i32**, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
store i32** %__p, i32*** %__p.addr, align 8
%0 = load %"class.std::allocator"*, %"class.std::allocator"** %__a.addr, align 8
%1 = bitcast %"class.std::allocator"* %0 to %"class.__gnu_cxx::new_allocator"*
%2 = load i32**, i32*** %__p.addr, align 8
call void @_ZN9__gnu_cxx13new_allocatorIPiE7destroyIS1_EEvPT_(%"class.__gnu_cxx::new_allocator"* %1, i32** %2) #8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx13new_allocatorIPiE7destroyIS1_EEvPT_(%"class.__gnu_cxx::new_allocator"* %this, i32** %__p) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
%__p.addr = alloca i32**, align 8
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
store i32** %__p, i32*** %__p.addr, align 8
%this1 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i64 @_ZNKSt6vectorIPiSaIS0_EE8max_sizeEv(%"class.std::vector"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::vector"*, align 8
store %"class.std::vector"* %this, %"class.std::vector"** %this.addr, align 8
%this1 = load %"class.std::vector"*, %"class.std::vector"** %this.addr, align 8
%0 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%call = call nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZNKSt12_Vector_baseIPiSaIS0_EE19_M_get_Tp_allocatorEv(%"struct.std::_Vector_base"* %0) #8
%call2 = call i64 @_ZNSt6vectorIPiSaIS0_EE11_S_max_sizeERKS1_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %call) #8
ret i64 %call2
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i64 @_ZNKSt6vectorIPiSaIS0_EE4sizeEv(%"class.std::vector"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::vector"*, align 8
store %"class.std::vector"* %this, %"class.std::vector"** %this.addr, align 8
%this1 = load %"class.std::vector"*, %"class.std::vector"** %this.addr, align 8
%0 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%_M_impl = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %0, i32 0, i32 0
%1 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl to %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"*
%_M_finish = getelementptr inbounds %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data", %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"* %1, i32 0, i32 1
%2 = load i32**, i32*** %_M_finish, align 8
%3 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%_M_impl2 = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %3, i32 0, i32 0
%4 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl2 to %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"*
%_M_start = getelementptr inbounds %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data", %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"* %4, i32 0, i32 0
%5 = load i32**, i32*** %_M_start, align 8
%sub.ptr.lhs.cast = ptrtoint i32** %2 to i64
%sub.ptr.rhs.cast = ptrtoint i32** %5 to i64
%sub.ptr.sub = sub i64 %sub.ptr.lhs.cast, %sub.ptr.rhs.cast
%sub.ptr.div = sdiv exact i64 %sub.ptr.sub, 8
ret i64 %sub.ptr.div
}
; Function Attrs: noreturn
declare dso_local void @_ZSt20__throw_length_errorPKc(i8*) #6
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) i64* @_ZSt3maxImERKT_S2_S2_(i64* nonnull align 8 dereferenceable(8) %__a, i64* nonnull align 8 dereferenceable(8) %__b) #1 comdat {
entry:
%retval = alloca i64*, align 8
%__a.addr = alloca i64*, align 8
%__b.addr = alloca i64*, align 8
store i64* %__a, i64** %__a.addr, align 8
store i64* %__b, i64** %__b.addr, align 8
%0 = load i64*, i64** %__a.addr, align 8
%1 = load i64, i64* %0, align 8
%2 = load i64*, i64** %__b.addr, align 8
%3 = load i64, i64* %2, align 8
%cmp = icmp ult i64 %1, %3
br i1 %cmp, label %if.then, label %if.end
if.then: ; preds = %entry
%4 = load i64*, i64** %__b.addr, align 8
store i64* %4, i64** %retval, align 8
br label %return
if.end: ; preds = %entry
%5 = load i64*, i64** %__a.addr, align 8
store i64* %5, i64** %retval, align 8
br label %return
return: ; preds = %if.end, %if.then
%6 = load i64*, i64** %retval, align 8
ret i64* %6
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i64 @_ZNSt6vectorIPiSaIS0_EE11_S_max_sizeERKS1_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a) #1 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%__a.addr = alloca %"class.std::allocator"*, align 8
%__diffmax = alloca i64, align 8
%__allocmax = alloca i64, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
store i64 1152921504606846975, i64* %__diffmax, align 8
%0 = load %"class.std::allocator"*, %"class.std::allocator"** %__a.addr, align 8
%call = call i64 @_ZNSt16allocator_traitsISaIPiEE8max_sizeERKS1_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %0) #8
store i64 %call, i64* %__allocmax, align 8
%call1 = invoke nonnull align 8 dereferenceable(8) i64* @_ZSt3minImERKT_S2_S2_(i64* nonnull align 8 dereferenceable(8) %__diffmax, i64* nonnull align 8 dereferenceable(8) %__allocmax)
to label %invoke.cont unwind label %terminate.lpad
invoke.cont: ; preds = %entry
%1 = load i64, i64* %call1, align 8
ret i64 %1
terminate.lpad: ; preds = %entry
%2 = landingpad { i8*, i32 }
catch i8* null
%3 = extractvalue { i8*, i32 } %2, 0
call void @__clang_call_terminate(i8* %3) #9
unreachable
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZNKSt12_Vector_baseIPiSaIS0_EE19_M_get_Tp_allocatorEv(%"struct.std::_Vector_base"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Vector_base"*, align 8
store %"struct.std::_Vector_base"* %this, %"struct.std::_Vector_base"** %this.addr, align 8
%this1 = load %"struct.std::_Vector_base"*, %"struct.std::_Vector_base"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %this1, i32 0, i32 0
%0 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl to %"class.std::allocator"*
ret %"class.std::allocator"* %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i64 @_ZNSt16allocator_traitsISaIPiEE8max_sizeERKS1_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a) #1 comdat align 2 {
entry:
%__a.addr = alloca %"class.std::allocator"*, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
%0 = load %"class.std::allocator"*, %"class.std::allocator"** %__a.addr, align 8
%1 = bitcast %"class.std::allocator"* %0 to %"class.__gnu_cxx::new_allocator"*
%call = call i64 @_ZNK9__gnu_cxx13new_allocatorIPiE8max_sizeEv(%"class.__gnu_cxx::new_allocator"* %1) #8
ret i64 %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) i64* @_ZSt3minImERKT_S2_S2_(i64* nonnull align 8 dereferenceable(8) %__a, i64* nonnull align 8 dereferenceable(8) %__b) #1 comdat {
entry:
%retval = alloca i64*, align 8
%__a.addr = alloca i64*, align 8
%__b.addr = alloca i64*, align 8
store i64* %__a, i64** %__a.addr, align 8
store i64* %__b, i64** %__b.addr, align 8
%0 = load i64*, i64** %__b.addr, align 8
%1 = load i64, i64* %0, align 8
%2 = load i64*, i64** %__a.addr, align 8
%3 = load i64, i64* %2, align 8
%cmp = icmp ult i64 %1, %3
br i1 %cmp, label %if.then, label %if.end
if.then: ; preds = %entry
%4 = load i64*, i64** %__b.addr, align 8
store i64* %4, i64** %retval, align 8
br label %return
if.end: ; preds = %entry
%5 = load i64*, i64** %__a.addr, align 8
store i64* %5, i64** %retval, align 8
br label %return
return: ; preds = %if.end, %if.then
%6 = load i64*, i64** %retval, align 8
ret i64* %6
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i64 @_ZNK9__gnu_cxx13new_allocatorIPiE8max_sizeEv(%"class.__gnu_cxx::new_allocator"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
%this1 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
%call = call i64 @_ZNK9__gnu_cxx13new_allocatorIPiE11_M_max_sizeEv(%"class.__gnu_cxx::new_allocator"* %this1) #8
ret i64 %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i64 @_ZNK9__gnu_cxx13new_allocatorIPiE11_M_max_sizeEv(%"class.__gnu_cxx::new_allocator"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
%this1 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
ret i64 1152921504606846975
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i32** @_ZNSt16allocator_traitsISaIPiEE8allocateERS1_m(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a, i64 %__n) #0 comdat align 2 {
entry:
%__a.addr = alloca %"class.std::allocator"*, align 8
%__n.addr = alloca i64, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
store i64 %__n, i64* %__n.addr, align 8
%0 = load %"class.std::allocator"*, %"class.std::allocator"** %__a.addr, align 8
%1 = bitcast %"class.std::allocator"* %0 to %"class.__gnu_cxx::new_allocator"*
%2 = load i64, i64* %__n.addr, align 8
%call = call i32** @_ZN9__gnu_cxx13new_allocatorIPiE8allocateEmPKv(%"class.__gnu_cxx::new_allocator"* %1, i64 %2, i8* null)
ret i32** %call
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i32** @_ZN9__gnu_cxx13new_allocatorIPiE8allocateEmPKv(%"class.__gnu_cxx::new_allocator"* %this, i64 %__n, i8* %0) #0 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
%__n.addr = alloca i64, align 8
%.addr = alloca i8*, align 8
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
store i64 %__n, i64* %__n.addr, align 8
store i8* %0, i8** %.addr, align 8
%this1 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
%1 = load i64, i64* %__n.addr, align 8
%call = call i64 @_ZNK9__gnu_cxx13new_allocatorIPiE11_M_max_sizeEv(%"class.__gnu_cxx::new_allocator"* %this1) #8
%cmp = icmp ugt i64 %1, %call
br i1 %cmp, label %if.then, label %if.end4
if.then: ; preds = %entry
%2 = load i64, i64* %__n.addr, align 8
%cmp2 = icmp ugt i64 %2, 2305843009213693951
br i1 %cmp2, label %if.then3, label %if.end
if.then3: ; preds = %if.then
call void @_ZSt28__throw_bad_array_new_lengthv() #10
unreachable
if.end: ; preds = %if.then
call void @_ZSt17__throw_bad_allocv() #10
unreachable
if.end4: ; preds = %entry
%3 = load i64, i64* %__n.addr, align 8
%mul = mul i64 %3, 8
%call5 = call noalias nonnull i8* @_Znwm(i64 %mul) #11
%4 = bitcast i8* %call5 to i32**
ret i32** %4
}
; Function Attrs: noreturn
declare dso_local void @_ZSt28__throw_bad_array_new_lengthv() #6
; Function Attrs: noreturn
declare dso_local void @_ZSt17__throw_bad_allocv() #6
; Function Attrs: nobuiltin allocsize(0)
declare dso_local nonnull i8* @_Znwm(i64) #7
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i32** @_ZSt32__make_move_if_noexcept_iteratorIPiSt13move_iteratorIPS0_EET0_PT_(i32** %__i) #0 comdat {
entry:
%retval = alloca %"class.std::move_iterator", align 8
%__i.addr = alloca i32**, align 8
store i32** %__i, i32*** %__i.addr, align 8
%0 = load i32**, i32*** %__i.addr, align 8
call void @_ZNSt13move_iteratorIPPiEC2ES1_(%"class.std::move_iterator"* %retval, i32** %0)
%coerce.dive = getelementptr inbounds %"class.std::move_iterator", %"class.std::move_iterator"* %retval, i32 0, i32 0
%1 = load i32**, i32*** %coerce.dive, align 8
ret i32** %1
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx14__alloc_traitsISaIPiES1_E17_S_select_on_copyERKS2_(%"class.std::allocator"* noalias sret align 1 %agg.result, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a) #0 comdat align 2 {
entry:
%result.ptr = alloca i8*, align 8
%__a.addr = alloca %"class.std::allocator"*, align 8
%0 = bitcast %"class.std::allocator"* %agg.result to i8*
store i8* %0, i8** %result.ptr, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
%1 = load %"class.std::allocator"*, %"class.std::allocator"** %__a.addr, align 8
call void @_ZNSt16allocator_traitsISaIPiEE37select_on_container_copy_constructionERKS1_(%"class.std::allocator"* sret align 1 %agg.result, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %1)
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt12_Vector_baseIPiSaIS0_EEC2EmRKS1_(%"struct.std::_Vector_base"* %this, i64 %__n, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a) unnamed_addr #0 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%this.addr = alloca %"struct.std::_Vector_base"*, align 8
%__n.addr = alloca i64, align 8
%__a.addr = alloca %"class.std::allocator"*, align 8
%exn.slot = alloca i8*, align 8
%ehselector.slot = alloca i32, align 4
store %"struct.std::_Vector_base"* %this, %"struct.std::_Vector_base"** %this.addr, align 8
store i64 %__n, i64* %__n.addr, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
%this1 = load %"struct.std::_Vector_base"*, %"struct.std::_Vector_base"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %this1, i32 0, i32 0
%0 = load %"class.std::allocator"*, %"class.std::allocator"** %__a.addr, align 8
call void @_ZNSt12_Vector_baseIPiSaIS0_EE12_Vector_implC2ERKS1_(%"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %0) #8
%1 = load i64, i64* %__n.addr, align 8
invoke void @_ZNSt12_Vector_baseIPiSaIS0_EE17_M_create_storageEm(%"struct.std::_Vector_base"* %this1, i64 %1)
to label %invoke.cont unwind label %lpad
invoke.cont: ; preds = %entry
ret void
lpad: ; preds = %entry
%2 = landingpad { i8*, i32 }
cleanup
%3 = extractvalue { i8*, i32 } %2, 0
store i8* %3, i8** %exn.slot, align 8
%4 = extractvalue { i8*, i32 } %2, 1
store i32 %4, i32* %ehselector.slot, align 4
call void @_ZNSt12_Vector_baseIPiSaIS0_EE12_Vector_implD2Ev(%"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl) #8
br label %eh.resume
eh.resume: ; preds = %lpad
%exn = load i8*, i8** %exn.slot, align 8
%sel = load i32, i32* %ehselector.slot, align 4
%lpad.val = insertvalue { i8*, i32 } undef, i8* %exn, 0
%lpad.val2 = insertvalue { i8*, i32 } %lpad.val, i32 %sel, 1
resume { i8*, i32 } %lpad.val2
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSaIPiED2Ev(%"class.std::allocator"* %this) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::allocator"*, align 8
store %"class.std::allocator"* %this, %"class.std::allocator"** %this.addr, align 8
%this1 = load %"class.std::allocator"*, %"class.std::allocator"** %this.addr, align 8
%0 = bitcast %"class.std::allocator"* %this1 to %"class.__gnu_cxx::new_allocator"*
call void @_ZN9__gnu_cxx13new_allocatorIPiED2Ev(%"class.__gnu_cxx::new_allocator"* %0) #8
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i32** @_ZSt22__uninitialized_copy_aIN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS2_SaIS2_EEEEPS2_S2_ET0_T_SB_SA_RSaIT1_E(i32** %__first.coerce, i32** %__last.coerce, i32** %__result, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %0) #0 comdat {
entry:
%__first = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
%__last = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
%__result.addr = alloca i32**, align 8
%.addr = alloca %"class.std::allocator"*, align 8
%agg.tmp = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
%agg.tmp2 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
%coerce.dive = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", %"class.__gnu_cxx::__normal_iterator.0"* %__first, i32 0, i32 0
store i32** %__first.coerce, i32*** %coerce.dive, align 8
%coerce.dive1 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", %"class.__gnu_cxx::__normal_iterator.0"* %__last, i32 0, i32 0
store i32** %__last.coerce, i32*** %coerce.dive1, align 8
store i32** %__result, i32*** %__result.addr, align 8
store %"class.std::allocator"* %0, %"class.std::allocator"** %.addr, align 8
%1 = bitcast %"class.__gnu_cxx::__normal_iterator.0"* %agg.tmp to i8*
%2 = bitcast %"class.__gnu_cxx::__normal_iterator.0"* %__first to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %1, i8* align 8 %2, i64 8, i1 false)
%3 = bitcast %"class.__gnu_cxx::__normal_iterator.0"* %agg.tmp2 to i8*
%4 = bitcast %"class.__gnu_cxx::__normal_iterator.0"* %__last to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %3, i8* align 8 %4, i64 8, i1 false)
%5 = load i32**, i32*** %__result.addr, align 8
%coerce.dive3 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", %"class.__gnu_cxx::__normal_iterator.0"* %agg.tmp, i32 0, i32 0
%6 = load i32**, i32*** %coerce.dive3, align 8
%coerce.dive4 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", %"class.__gnu_cxx::__normal_iterator.0"* %agg.tmp2, i32 0, i32 0
%7 = load i32**, i32*** %coerce.dive4, align 8
%call = call i32** @_ZSt18uninitialized_copyIN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS2_SaIS2_EEEEPS2_ET0_T_SB_SA_(i32** %6, i32** %7, i32** %5)
ret i32** %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i32** @_ZNKSt6vectorIPiSaIS0_EE5beginEv(%"class.std::vector"* %this) #1 comdat align 2 {
entry:
%retval = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
%this.addr = alloca %"class.std::vector"*, align 8
store %"class.std::vector"* %this, %"class.std::vector"** %this.addr, align 8
%this1 = load %"class.std::vector"*, %"class.std::vector"** %this.addr, align 8
%0 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%_M_impl = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %0, i32 0, i32 0
%1 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl to %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"*
%_M_start = getelementptr inbounds %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data", %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"* %1, i32 0, i32 0
call void @_ZN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS1_SaIS1_EEEC2ERKS3_(%"class.__gnu_cxx::__normal_iterator.0"* %retval, i32*** nonnull align 8 dereferenceable(8) %_M_start) #8
%coerce.dive = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", %"class.__gnu_cxx::__normal_iterator.0"* %retval, i32 0, i32 0
%2 = load i32**, i32*** %coerce.dive, align 8
ret i32** %2
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i32** @_ZNKSt6vectorIPiSaIS0_EE3endEv(%"class.std::vector"* %this) #1 comdat align 2 {
entry:
%retval = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
%this.addr = alloca %"class.std::vector"*, align 8
store %"class.std::vector"* %this, %"class.std::vector"** %this.addr, align 8
%this1 = load %"class.std::vector"*, %"class.std::vector"** %this.addr, align 8
%0 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%_M_impl = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %0, i32 0, i32 0
%1 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl to %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"*
%_M_finish = getelementptr inbounds %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data", %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"* %1, i32 0, i32 1
call void @_ZN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS1_SaIS1_EEEC2ERKS3_(%"class.__gnu_cxx::__normal_iterator.0"* %retval, i32*** nonnull align 8 dereferenceable(8) %_M_finish) #8
%coerce.dive = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", %"class.__gnu_cxx::__normal_iterator.0"* %retval, i32 0, i32 0
%2 = load i32**, i32*** %coerce.dive, align 8
ret i32** %2
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt16allocator_traitsISaIPiEE37select_on_container_copy_constructionERKS1_(%"class.std::allocator"* noalias sret align 1 %agg.result, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %__rhs) #1 comdat align 2 {
entry:
%result.ptr = alloca i8*, align 8
%__rhs.addr = alloca %"class.std::allocator"*, align 8
%0 = bitcast %"class.std::allocator"* %agg.result to i8*
store i8* %0, i8** %result.ptr, align 8
store %"class.std::allocator"* %__rhs, %"class.std::allocator"** %__rhs.addr, align 8
%1 = load %"class.std::allocator"*, %"class.std::allocator"** %__rhs.addr, align 8
call void @_ZNSaIPiEC2ERKS0_(%"class.std::allocator"* %agg.result, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %1) #8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSaIPiEC2ERKS0_(%"class.std::allocator"* %this, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::allocator"*, align 8
%__a.addr = alloca %"class.std::allocator"*, align 8
store %"class.std::allocator"* %this, %"class.std::allocator"** %this.addr, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
%this1 = load %"class.std::allocator"*, %"class.std::allocator"** %this.addr, align 8
%0 = bitcast %"class.std::allocator"* %this1 to %"class.__gnu_cxx::new_allocator"*
%1 = load %"class.std::allocator"*, %"class.std::allocator"** %__a.addr, align 8
%2 = bitcast %"class.std::allocator"* %1 to %"class.__gnu_cxx::new_allocator"*
call void @_ZN9__gnu_cxx13new_allocatorIPiEC2ERKS2_(%"class.__gnu_cxx::new_allocator"* %0, %"class.__gnu_cxx::new_allocator"* nonnull align 1 dereferenceable(1) %2) #8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx13new_allocatorIPiEC2ERKS2_(%"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"* nonnull align 1 dereferenceable(1) %0) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
%.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
store %"class.__gnu_cxx::new_allocator"* %0, %"class.__gnu_cxx::new_allocator"** %.addr, align 8
%this1 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt12_Vector_baseIPiSaIS0_EE12_Vector_implC2ERKS1_(%"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %this, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"*, align 8
%__a.addr = alloca %"class.std::allocator"*, align 8
store %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %this, %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"** %this.addr, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
%this1 = load %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"*, %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"** %this.addr, align 8
%0 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %this1 to %"class.std::allocator"*
%1 = load %"class.std::allocator"*, %"class.std::allocator"** %__a.addr, align 8
call void @_ZNSaIPiEC2ERKS0_(%"class.std::allocator"* %0, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %1) #8
%2 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %this1 to %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"*
call void @_ZNSt12_Vector_baseIPiSaIS0_EE17_Vector_impl_dataC2Ev(%"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"* %2) #8
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt12_Vector_baseIPiSaIS0_EE17_M_create_storageEm(%"struct.std::_Vector_base"* %this, i64 %__n) #0 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Vector_base"*, align 8
%__n.addr = alloca i64, align 8
store %"struct.std::_Vector_base"* %this, %"struct.std::_Vector_base"** %this.addr, align 8
store i64 %__n, i64* %__n.addr, align 8
%this1 = load %"struct.std::_Vector_base"*, %"struct.std::_Vector_base"** %this.addr, align 8
%0 = load i64, i64* %__n.addr, align 8
%call = call i32** @_ZNSt12_Vector_baseIPiSaIS0_EE11_M_allocateEm(%"struct.std::_Vector_base"* %this1, i64 %0)
%_M_impl = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %this1, i32 0, i32 0
%1 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl to %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"*
%_M_start = getelementptr inbounds %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data", %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"* %1, i32 0, i32 0
store i32** %call, i32*** %_M_start, align 8
%_M_impl2 = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %this1, i32 0, i32 0
%2 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl2 to %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"*
%_M_start3 = getelementptr inbounds %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data", %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"* %2, i32 0, i32 0
%3 = load i32**, i32*** %_M_start3, align 8
%_M_impl4 = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %this1, i32 0, i32 0
%4 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl4 to %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"*
%_M_finish = getelementptr inbounds %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data", %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"* %4, i32 0, i32 1
store i32** %3, i32*** %_M_finish, align 8
%_M_impl5 = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %this1, i32 0, i32 0
%5 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl5 to %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"*
%_M_start6 = getelementptr inbounds %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data", %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"* %5, i32 0, i32 0
%6 = load i32**, i32*** %_M_start6, align 8
%7 = load i64, i64* %__n.addr, align 8
%add.ptr = getelementptr inbounds i32*, i32** %6, i64 %7
%_M_impl7 = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %this1, i32 0, i32 0
%8 = bitcast %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl"* %_M_impl7 to %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"*
%_M_end_of_storage = getelementptr inbounds %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data", %"struct.std::_Vector_base<int *, std::allocator<int *>>::_Vector_impl_data"* %8, i32 0, i32 2
store i32** %add.ptr, i32*** %_M_end_of_storage, align 8
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i32** @_ZSt18uninitialized_copyIN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS2_SaIS2_EEEEPS2_ET0_T_SB_SA_(i32** %__first.coerce, i32** %__last.coerce, i32** %__result) #0 comdat {
entry:
%__first = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
%__last = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
%__result.addr = alloca i32**, align 8
%__assignable = alloca i8, align 1
%agg.tmp = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
%agg.tmp2 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
%coerce.dive = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", %"class.__gnu_cxx::__normal_iterator.0"* %__first, i32 0, i32 0
store i32** %__first.coerce, i32*** %coerce.dive, align 8
%coerce.dive1 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", %"class.__gnu_cxx::__normal_iterator.0"* %__last, i32 0, i32 0
store i32** %__last.coerce, i32*** %coerce.dive1, align 8
store i32** %__result, i32*** %__result.addr, align 8
store i8 1, i8* %__assignable, align 1
%0 = bitcast %"class.__gnu_cxx::__normal_iterator.0"* %agg.tmp to i8*
%1 = bitcast %"class.__gnu_cxx::__normal_iterator.0"* %__first to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %0, i8* align 8 %1, i64 8, i1 false)
%2 = bitcast %"class.__gnu_cxx::__normal_iterator.0"* %agg.tmp2 to i8*
%3 = bitcast %"class.__gnu_cxx::__normal_iterator.0"* %__last to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %2, i8* align 8 %3, i64 8, i1 false)
%4 = load i32**, i32*** %__result.addr, align 8
%coerce.dive3 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", %"class.__gnu_cxx::__normal_iterator.0"* %agg.tmp, i32 0, i32 0
%5 = load i32**, i32*** %coerce.dive3, align 8
%coerce.dive4 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", %"class.__gnu_cxx::__normal_iterator.0"* %agg.tmp2, i32 0, i32 0
%6 = load i32**, i32*** %coerce.dive4, align 8
%call = call i32** @_ZNSt20__uninitialized_copyILb1EE13__uninit_copyIN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS4_SaIS4_EEEEPS4_EET0_T_SD_SC_(i32** %5, i32** %6, i32** %4)
ret i32** %call
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i32** @_ZNSt20__uninitialized_copyILb1EE13__uninit_copyIN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS4_SaIS4_EEEEPS4_EET0_T_SD_SC_(i32** %__first.coerce, i32** %__last.coerce, i32** %__result) #0 comdat align 2 {
entry:
%__first = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
%__last = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
%__result.addr = alloca i32**, align 8
%agg.tmp = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
%agg.tmp2 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
%coerce.dive = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", %"class.__gnu_cxx::__normal_iterator.0"* %__first, i32 0, i32 0
store i32** %__first.coerce, i32*** %coerce.dive, align 8
%coerce.dive1 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", %"class.__gnu_cxx::__normal_iterator.0"* %__last, i32 0, i32 0
store i32** %__last.coerce, i32*** %coerce.dive1, align 8
store i32** %__result, i32*** %__result.addr, align 8
%0 = bitcast %"class.__gnu_cxx::__normal_iterator.0"* %agg.tmp to i8*
%1 = bitcast %"class.__gnu_cxx::__normal_iterator.0"* %__first to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %0, i8* align 8 %1, i64 8, i1 false)
%2 = bitcast %"class.__gnu_cxx::__normal_iterator.0"* %agg.tmp2 to i8*
%3 = bitcast %"class.__gnu_cxx::__normal_iterator.0"* %__last to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %2, i8* align 8 %3, i64 8, i1 false)
%4 = load i32**, i32*** %__result.addr, align 8
%coerce.dive3 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", %"class.__gnu_cxx::__normal_iterator.0"* %agg.tmp, i32 0, i32 0
%5 = load i32**, i32*** %coerce.dive3, align 8
%coerce.dive4 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", %"class.__gnu_cxx::__normal_iterator.0"* %agg.tmp2, i32 0, i32 0
%6 = load i32**, i32*** %coerce.dive4, align 8
%call = call i32** @_ZSt4copyIN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS2_SaIS2_EEEEPS2_ET0_T_SB_SA_(i32** %5, i32** %6, i32** %4)
ret i32** %call
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i32** @_ZSt4copyIN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS2_SaIS2_EEEEPS2_ET0_T_SB_SA_(i32** %__first.coerce, i32** %__last.coerce, i32** %__result) #0 comdat {
entry:
%__first = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
%__last = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
%__result.addr = alloca i32**, align 8
%agg.tmp = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
%agg.tmp2 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
%agg.tmp5 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
%agg.tmp6 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
%coerce.dive = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", %"class.__gnu_cxx::__normal_iterator.0"* %__first, i32 0, i32 0
store i32** %__first.coerce, i32*** %coerce.dive, align 8
%coerce.dive1 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", %"class.__gnu_cxx::__normal_iterator.0"* %__last, i32 0, i32 0
store i32** %__last.coerce, i32*** %coerce.dive1, align 8
store i32** %__result, i32*** %__result.addr, align 8
%0 = bitcast %"class.__gnu_cxx::__normal_iterator.0"* %agg.tmp2 to i8*
%1 = bitcast %"class.__gnu_cxx::__normal_iterator.0"* %__first to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %0, i8* align 8 %1, i64 8, i1 false)
%coerce.dive3 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", %"class.__gnu_cxx::__normal_iterator.0"* %agg.tmp2, i32 0, i32 0
%2 = load i32**, i32*** %coerce.dive3, align 8
%call = call i32** @_ZSt12__miter_baseIN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS2_SaIS2_EEEEET_S9_(i32** %2)
%coerce.dive4 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", %"class.__gnu_cxx::__normal_iterator.0"* %agg.tmp, i32 0, i32 0
store i32** %call, i32*** %coerce.dive4, align 8
%3 = bitcast %"class.__gnu_cxx::__normal_iterator.0"* %agg.tmp6 to i8*
%4 = bitcast %"class.__gnu_cxx::__normal_iterator.0"* %__last to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %3, i8* align 8 %4, i64 8, i1 false)
%coerce.dive7 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", %"class.__gnu_cxx::__normal_iterator.0"* %agg.tmp6, i32 0, i32 0
%5 = load i32**, i32*** %coerce.dive7, align 8
%call8 = call i32** @_ZSt12__miter_baseIN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS2_SaIS2_EEEEET_S9_(i32** %5)
%coerce.dive9 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", %"class.__gnu_cxx::__normal_iterator.0"* %agg.tmp5, i32 0, i32 0
store i32** %call8, i32*** %coerce.dive9, align 8
%6 = load i32**, i32*** %__result.addr, align 8
%coerce.dive10 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", %"class.__gnu_cxx::__normal_iterator.0"* %agg.tmp, i32 0, i32 0
%7 = load i32**, i32*** %coerce.dive10, align 8
%coerce.dive11 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", %"class.__gnu_cxx::__normal_iterator.0"* %agg.tmp5, i32 0, i32 0
%8 = load i32**, i32*** %coerce.dive11, align 8
%call12 = call i32** @_ZSt13__copy_move_aILb0EN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS2_SaIS2_EEEEPS2_ET1_T0_SB_SA_(i32** %7, i32** %8, i32** %6)
ret i32** %call12
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i32** @_ZSt13__copy_move_aILb0EN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS2_SaIS2_EEEEPS2_ET1_T0_SB_SA_(i32** %__first.coerce, i32** %__last.coerce, i32** %__result) #0 comdat {
entry:
%__first = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
%__last = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
%__result.addr = alloca i32**, align 8
%agg.tmp = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
%agg.tmp3 = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
%coerce.dive = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", %"class.__gnu_cxx::__normal_iterator.0"* %__first, i32 0, i32 0
store i32** %__first.coerce, i32*** %coerce.dive, align 8
%coerce.dive1 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", %"class.__gnu_cxx::__normal_iterator.0"* %__last, i32 0, i32 0
store i32** %__last.coerce, i32*** %coerce.dive1, align 8
store i32** %__result, i32*** %__result.addr, align 8
%0 = bitcast %"class.__gnu_cxx::__normal_iterator.0"* %agg.tmp to i8*
%1 = bitcast %"class.__gnu_cxx::__normal_iterator.0"* %__first to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %0, i8* align 8 %1, i64 8, i1 false)
%coerce.dive2 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", %"class.__gnu_cxx::__normal_iterator.0"* %agg.tmp, i32 0, i32 0
%2 = load i32**, i32*** %coerce.dive2, align 8
%call = call i32** @_ZSt12__niter_baseIPKPiSt6vectorIS0_SaIS0_EEET_N9__gnu_cxx17__normal_iteratorIS6_T0_EE(i32** %2) #8
%3 = bitcast %"class.__gnu_cxx::__normal_iterator.0"* %agg.tmp3 to i8*
%4 = bitcast %"class.__gnu_cxx::__normal_iterator.0"* %__last to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %3, i8* align 8 %4, i64 8, i1 false)
%coerce.dive4 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", %"class.__gnu_cxx::__normal_iterator.0"* %agg.tmp3, i32 0, i32 0
%5 = load i32**, i32*** %coerce.dive4, align 8
%call5 = call i32** @_ZSt12__niter_baseIPKPiSt6vectorIS0_SaIS0_EEET_N9__gnu_cxx17__normal_iteratorIS6_T0_EE(i32** %5) #8
%6 = load i32**, i32*** %__result.addr, align 8
%call6 = call i32** @_ZSt12__niter_baseIPPiET_S2_(i32** %6) #8
%call7 = call i32** @_ZSt14__copy_move_a1ILb0EPKPiPS0_ET1_T0_S5_S4_(i32** %call, i32** %call5, i32** %call6)
%call8 = call i32** @_ZSt12__niter_wrapIPPiET_RKS2_S2_(i32*** nonnull align 8 dereferenceable(8) %__result.addr, i32** %call7)
ret i32** %call8
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i32** @_ZSt12__miter_baseIN9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS2_SaIS2_EEEEET_S9_(i32** %__it.coerce) #1 comdat {
entry:
%retval = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
%__it = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
%coerce.dive = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", %"class.__gnu_cxx::__normal_iterator.0"* %__it, i32 0, i32 0
store i32** %__it.coerce, i32*** %coerce.dive, align 8
%0 = bitcast %"class.__gnu_cxx::__normal_iterator.0"* %retval to i8*
%1 = bitcast %"class.__gnu_cxx::__normal_iterator.0"* %__it to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %0, i8* align 8 %1, i64 8, i1 false)
%coerce.dive1 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", %"class.__gnu_cxx::__normal_iterator.0"* %retval, i32 0, i32 0
%2 = load i32**, i32*** %coerce.dive1, align 8
ret i32** %2
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i32** @_ZSt14__copy_move_a1ILb0EPKPiPS0_ET1_T0_S5_S4_(i32** %__first, i32** %__last, i32** %__result) #0 comdat {
entry:
%__first.addr = alloca i32**, align 8
%__last.addr = alloca i32**, align 8
%__result.addr = alloca i32**, align 8
store i32** %__first, i32*** %__first.addr, align 8
store i32** %__last, i32*** %__last.addr, align 8
store i32** %__result, i32*** %__result.addr, align 8
%0 = load i32**, i32*** %__first.addr, align 8
%1 = load i32**, i32*** %__last.addr, align 8
%2 = load i32**, i32*** %__result.addr, align 8
%call = call i32** @_ZSt14__copy_move_a2ILb0EPKPiPS0_ET1_T0_S5_S4_(i32** %0, i32** %1, i32** %2)
ret i32** %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i32** @_ZSt12__niter_baseIPKPiSt6vectorIS0_SaIS0_EEET_N9__gnu_cxx17__normal_iteratorIS6_T0_EE(i32** %__it.coerce) #1 comdat {
entry:
%__it = alloca %"class.__gnu_cxx::__normal_iterator.0", align 8
%coerce.dive = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.0", %"class.__gnu_cxx::__normal_iterator.0"* %__it, i32 0, i32 0
store i32** %__it.coerce, i32*** %coerce.dive, align 8
%call = call nonnull align 8 dereferenceable(8) i32*** @_ZNK9__gnu_cxx17__normal_iteratorIPKPiSt6vectorIS1_SaIS1_EEE4baseEv(%"class.__gnu_cxx::__normal_iterator.0"* %__it) #8
%0 = load i32**, i32*** %call, align 8
ret i32** %0
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local i32** @_ZSt14__copy_move_a2ILb0EPKPiPS0_ET1_T0_S5_S4_(i32** %__first, i32** %__last, i32** %__result) #0 comdat {
entry:
%__first.addr = alloca i32**, align 8
%__last.addr = alloca i32**, align 8
%__result.addr = alloca i32**, align 8
store i32** %__first, i32*** %__first.addr, align 8
store i32** %__last, i32*** %__last.addr, align 8
store i32** %__result, i32*** %__result.addr, align 8
%0 = load i32**, i32*** %__first.addr, align 8
%1 = load i32**, i32*** %__last.addr, align 8
%2 = load i32**, i32*** %__result.addr, align 8
%call = call i32** @_ZNSt11__copy_moveILb0ELb1ESt26random_access_iterator_tagE8__copy_mIPiEEPT_PKS4_S7_S5_(i32** %0, i32** %1, i32** %2)
ret i32** %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i32** @_ZNSt11__copy_moveILb0ELb1ESt26random_access_iterator_tagE8__copy_mIPiEEPT_PKS4_S7_S5_(i32** %__first, i32** %__last, i32** %__result) #1 comdat align 2 {
entry:
%__first.addr = alloca i32**, align 8
%__last.addr = alloca i32**, align 8
%__result.addr = alloca i32**, align 8
%_Num = alloca i64, align 8
store i32** %__first, i32*** %__first.addr, align 8
store i32** %__last, i32*** %__last.addr, align 8
store i32** %__result, i32*** %__result.addr, align 8
%0 = load i32**, i32*** %__last.addr, align 8
%1 = load i32**, i32*** %__first.addr, align 8
%sub.ptr.lhs.cast = ptrtoint i32** %0 to i64
%sub.ptr.rhs.cast = ptrtoint i32** %1 to i64
%sub.ptr.sub = sub i64 %sub.ptr.lhs.cast, %sub.ptr.rhs.cast
%sub.ptr.div = sdiv exact i64 %sub.ptr.sub, 8
store i64 %sub.ptr.div, i64* %_Num, align 8
%2 = load i64, i64* %_Num, align 8
%tobool = icmp ne i64 %2, 0
br i1 %tobool, label %if.then, label %if.end
if.then: ; preds = %entry
%3 = load i32**, i32*** %__result.addr, align 8
%4 = bitcast i32** %3 to i8*
%5 = load i32**, i32*** %__first.addr, align 8
%6 = bitcast i32** %5 to i8*
%7 = load i64, i64* %_Num, align 8
%mul = mul i64 8, %7
call void @llvm.memmove.p0i8.p0i8.i64(i8* align 8 %4, i8* align 8 %6, i64 %mul, i1 false)
br label %if.end
if.end: ; preds = %if.then, %entry
%8 = load i32**, i32*** %__result.addr, align 8
%9 = load i64, i64* %_Num, align 8
%add.ptr = getelementptr inbounds i32*, i32** %8, i64 %9
ret i32** %add.ptr
}
attributes #0 = { noinline 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" }
attributes #1 = { 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" }
attributes #2 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #3 = { noinline noreturn nounwind }
attributes #4 = { nobuiltin nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #5 = { argmemonly nounwind willreturn }
attributes #6 = { noreturn "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #7 = { nobuiltin allocsize(0) "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #8 = { nounwind }
attributes #9 = { noreturn nounwind }
attributes #10 = { noreturn }
attributes #11 = { allocsize(0) }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_200 = constant [32 x i8] c"ERROR: Array index is negative.\00"
@global_var_220 = constant [36 x i8] c"ERROR: Array index is out-of-bounds\00"
define i64 @_GLOBAL_OFFSET_TABLE_.1(i64 %arg1) local_unnamed_addr {
dec_label_pc_0:
%0 = alloca i64
%1 = load i64, i64* %0
%2 = call i64 @__readfsqword(i64 40), !insn.addr !0
%3 = and i64 %1, 4294967295, !insn.addr !1
ret i64 %3, !insn.addr !2
}
define i64 @function_30() local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%.reg2mem = alloca i64, !insn.addr !3
%storemerge1.reg2mem = alloca i32, !insn.addr !3
%1 = load i64, i64* %0
%rax = alloca i64, align 8
%2 = load i64, i64* %0
%3 = bitcast i64* %rax to i8*
%4 = trunc i64 %2 to i8
%5 = mul i8 %4, 2, !insn.addr !3
%6 = inttoptr i64 %2 to i8*, !insn.addr !3
store i8 %5, i8* %6, align 1, !insn.addr !3
%7 = load i8, i8* %3, align 8, !insn.addr !4
%8 = load i64, i64* %rax, align 8
%9 = trunc i64 %8 to i8, !insn.addr !4
%10 = add i8 %7, %9, !insn.addr !4
%11 = inttoptr i64 %8 to i8*, !insn.addr !4
store i8 %10, i8* %11, align 1, !insn.addr !4
%12 = add i64 %1, -32, !insn.addr !5
%13 = inttoptr i64 %12 to i64*, !insn.addr !5
store i64 0, i64* %13, align 8, !insn.addr !5
%14 = add i64 %1, -24, !insn.addr !6
%15 = inttoptr i64 %14 to i64*, !insn.addr !6
store i64 0, i64* %15, align 8, !insn.addr !6
%16 = add i64 %1, -16, !insn.addr !7
%17 = inttoptr i64 %16 to i64*, !insn.addr !7
store i64 0, i64* %17, align 8, !insn.addr !7
%18 = add i64 %1, -52, !insn.addr !8
%19 = inttoptr i64 %18 to i32*, !insn.addr !8
%20 = load i32, i32* %19, align 4, !insn.addr !8
%21 = icmp slt i32 %20, 0, !insn.addr !8
br i1 %21, label %dec_label_pc_84, label %dec_label_pc_52, !insn.addr !9
dec_label_pc_52: ; preds = %dec_label_pc_30
%22 = sext i32 %20 to i64, !insn.addr !10
%23 = mul i64 %22, 4, !insn.addr !11
%24 = add i64 %1, -48, !insn.addr !11
%25 = add i64 %23, %24, !insn.addr !11
%26 = inttoptr i64 %25 to i32*, !insn.addr !11
store i32 1, i32* %26, align 4, !insn.addr !11
%27 = add i64 %1, -56, !insn.addr !12
%28 = inttoptr i64 %27 to i32*, !insn.addr !12
store i32 0, i32* %28, align 4
store i32 0, i32* %storemerge1.reg2mem
br label %dec_label_pc_68
dec_label_pc_68: ; preds = %dec_label_pc_52, %dec_label_pc_68
%storemerge1.reload = load i32, i32* %storemerge1.reg2mem
%29 = sext i32 %storemerge1.reload to i64, !insn.addr !13
%30 = mul i64 %29, 4, !insn.addr !14
%31 = add i64 %30, %24, !insn.addr !14
%32 = inttoptr i64 %31 to i32*, !insn.addr !14
%33 = load i32, i32* %32, align 4, !insn.addr !14
%34 = zext i32 %33 to i64, !insn.addr !15
%35 = call i64 @printIntLine(i64 %34), !insn.addr !16
%36 = load i32, i32* %28, align 4, !insn.addr !17
%37 = add i32 %36, 1, !insn.addr !17
store i32 %37, i32* %28, align 4
%38 = icmp slt i32 %37, 10, !insn.addr !18
store i32 %37, i32* %storemerge1.reg2mem, !insn.addr !18
br i1 %38, label %dec_label_pc_68, label %dec_label_pc_90, !insn.addr !18
dec_label_pc_84: ; preds = %dec_label_pc_30
%39 = call i64 @printLine(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @global_var_200, i64 0, i64 0)), !insn.addr !19
br label %dec_label_pc_90, !insn.addr !19
dec_label_pc_90: ; preds = %dec_label_pc_68, %dec_label_pc_84
%40 = add i64 %1, -8, !insn.addr !20
%41 = inttoptr i64 %40 to i64*, !insn.addr !20
%42 = load i64, i64* %41, align 8, !insn.addr !20
%43 = call i64 @__readfsqword(i64 40), !insn.addr !21
%44 = xor i64 %43, %42, !insn.addr !21
%45 = icmp eq i64 %44, 0, !insn.addr !21
store i64 %44, i64* %rax, align 8, !insn.addr !21
store i64 0, i64* %.reg2mem, !insn.addr !22
br i1 %45, label %dec_label_pc_a5, label %dec_label_pc_a0, !insn.addr !22
dec_label_pc_a0: ; preds = %dec_label_pc_90
%46 = call i64 @__stack_chk_fail(), !insn.addr !23
store i64 %46, i64* %rax, align 8, !insn.addr !23
store i64 %46, i64* %.reg2mem, !insn.addr !23
br label %dec_label_pc_a5, !insn.addr !23
dec_label_pc_a5: ; preds = %dec_label_pc_a0, %dec_label_pc_90
%.reload = load i64, i64* %.reg2mem, !insn.addr !24
ret i64 %.reload, !insn.addr !24
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_fscanf_63b_goodG2BSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_a7:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !25
%indvars.iv.reg2mem = alloca i64, !insn.addr !25
%1 = load i64, i64* %0
%stack_var_-8 = alloca i64, align 8
%2 = call i64 @__readfsqword(i64 40), !insn.addr !26
%3 = trunc i64 %1 to i32
%4 = icmp slt i32 %3, 0, !insn.addr !27
br i1 %4, label %dec_label_pc_12b, label %dec_label_pc_f9, !insn.addr !28
dec_label_pc_f9: ; preds = %dec_label_pc_a7
%5 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !29
%sext = mul i64 %1, 4294967296
%6 = ashr exact i64 %sext, 30, !insn.addr !30
%7 = add i64 %5, -48, !insn.addr !30
%8 = add i64 %7, %6, !insn.addr !30
%9 = inttoptr i64 %8 to i32*, !insn.addr !30
store i32 1, i32* %9, align 4, !insn.addr !30
store i64 0, i64* %indvars.iv.reg2mem
br label %dec_label_pc_10f
dec_label_pc_10f: ; preds = %dec_label_pc_10f, %dec_label_pc_f9
%indvars.iv.reload = load i64, i64* %indvars.iv.reg2mem
%10 = mul i64 %indvars.iv.reload, 4, !insn.addr !31
%11 = add i64 %10, %7, !insn.addr !31
%12 = inttoptr i64 %11 to i32*, !insn.addr !31
%13 = load i32, i32* %12, align 4, !insn.addr !31
%14 = zext i32 %13 to i64, !insn.addr !32
%15 = call i64 @printIntLine(i64 %14), !insn.addr !33
%indvars.iv.next = add nuw nsw i64 %indvars.iv.reload, 1
%exitcond = icmp eq i64 %indvars.iv.next, 10
store i64 %indvars.iv.next, i64* %indvars.iv.reg2mem, !insn.addr !34
br i1 %exitcond, label %dec_label_pc_137, label %dec_label_pc_10f, !insn.addr !34
dec_label_pc_12b: ; preds = %dec_label_pc_a7
%16 = call i64 @printLine(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @global_var_200, i64 0, i64 0)), !insn.addr !35
br label %dec_label_pc_137, !insn.addr !35
dec_label_pc_137: ; preds = %dec_label_pc_10f, %dec_label_pc_12b
%17 = call i64 @__readfsqword(i64 40), !insn.addr !36
%18 = icmp eq i64 %2, %17, !insn.addr !36
store i64 0, i64* %rax.0.reg2mem, !insn.addr !37
br i1 %18, label %dec_label_pc_14c, label %dec_label_pc_147, !insn.addr !37
dec_label_pc_147: ; preds = %dec_label_pc_137
%19 = call i64 @__stack_chk_fail(), !insn.addr !38
store i64 %19, i64* %rax.0.reg2mem, !insn.addr !38
br label %dec_label_pc_14c, !insn.addr !38
dec_label_pc_14c: ; preds = %dec_label_pc_147, %dec_label_pc_137
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !39
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_fscanf_63b_goodB2GSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_14e:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !40
%indvars.iv.reg2mem = alloca i64, !insn.addr !40
%1 = load i64, i64* %0
%stack_var_-8 = alloca i64, align 8
%2 = call i64 @__readfsqword(i64 40), !insn.addr !41
%3 = trunc i64 %1 to i32
%4 = icmp ugt i32 %3, 9
br i1 %4, label %dec_label_pc_1d8, label %dec_label_pc_1a6, !insn.addr !42
dec_label_pc_1a6: ; preds = %dec_label_pc_14e
%5 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !43
%sext = mul i64 %1, 4294967296
%6 = ashr exact i64 %sext, 30, !insn.addr !44
%7 = add i64 %5, -48, !insn.addr !44
%8 = add i64 %7, %6, !insn.addr !44
%9 = inttoptr i64 %8 to i32*, !insn.addr !44
store i32 1, i32* %9, align 4, !insn.addr !44
store i64 0, i64* %indvars.iv.reg2mem
br label %dec_label_pc_1bc
dec_label_pc_1bc: ; preds = %dec_label_pc_1bc, %dec_label_pc_1a6
%indvars.iv.reload = load i64, i64* %indvars.iv.reg2mem
%10 = mul i64 %indvars.iv.reload, 4, !insn.addr !45
%11 = add i64 %10, %7, !insn.addr !45
%12 = inttoptr i64 %11 to i32*, !insn.addr !45
%13 = load i32, i32* %12, align 4, !insn.addr !45
%14 = zext i32 %13 to i64, !insn.addr !46
%15 = call i64 @printIntLine(i64 %14), !insn.addr !47
%indvars.iv.next = add nuw nsw i64 %indvars.iv.reload, 1
%exitcond = icmp eq i64 %indvars.iv.next, 10
store i64 %indvars.iv.next, i64* %indvars.iv.reg2mem, !insn.addr !48
br i1 %exitcond, label %dec_label_pc_1e4, label %dec_label_pc_1bc, !insn.addr !48
dec_label_pc_1d8: ; preds = %dec_label_pc_14e
%16 = call i64 @printLine(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @global_var_220, i64 0, i64 0)), !insn.addr !49
br label %dec_label_pc_1e4, !insn.addr !49
dec_label_pc_1e4: ; preds = %dec_label_pc_1bc, %dec_label_pc_1d8
%17 = call i64 @__readfsqword(i64 40), !insn.addr !50
%18 = icmp eq i64 %2, %17, !insn.addr !50
store i64 0, i64* %rax.0.reg2mem, !insn.addr !51
br i1 %18, label %dec_label_pc_1f9, label %dec_label_pc_1f4, !insn.addr !51
dec_label_pc_1f4: ; preds = %dec_label_pc_1e4
%19 = call i64 @__stack_chk_fail(), !insn.addr !52
store i64 %19, i64* %rax.0.reg2mem, !insn.addr !52
br label %dec_label_pc_1f9, !insn.addr !52
dec_label_pc_1f9: ; preds = %dec_label_pc_1f4, %dec_label_pc_1e4
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !53
}
declare i64 @printIntLine(i64) local_unnamed_addr
declare i64 @printLine(i8*) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 12}
!1 = !{i64 31}
!2 = !{i64 33}
!3 = !{i64 48}
!4 = !{i64 50}
!5 = !{i64 52}
!6 = !{i64 60}
!7 = !{i64 68}
!8 = !{i64 76}
!9 = !{i64 80}
!10 = !{i64 85}
!11 = !{i64 87}
!12 = !{i64 95}
!13 = !{i64 107}
!14 = !{i64 109}
!15 = !{i64 113}
!16 = !{i64 115}
!17 = !{i64 120}
!18 = !{i64 128}
!19 = !{i64 139}
!20 = !{i64 145}
!21 = !{i64 149}
!22 = !{i64 158}
!23 = !{i64 160}
!24 = !{i64 166}
!25 = !{i64 167}
!26 = !{i64 179}
!27 = !{i64 243}
!28 = !{i64 247}
!29 = !{i64 168}
!30 = !{i64 254}
!31 = !{i64 276}
!32 = !{i64 280}
!33 = !{i64 282}
!34 = !{i64 295}
!35 = !{i64 306}
!36 = !{i64 316}
!37 = !{i64 325}
!38 = !{i64 327}
!39 = !{i64 333}
!40 = !{i64 334}
!41 = !{i64 346}
!42 = !{i64 414}
!43 = !{i64 335}
!44 = !{i64 427}
!45 = !{i64 449}
!46 = !{i64 453}
!47 = !{i64 455}
!48 = !{i64 468}
!49 = !{i64 479}
!50 = !{i64 489}
!51 = !{i64 498}
!52 = !{i64 500}
!53 = !{i64 506}
### Assistant: @.str = private unnamed_addr constant [32 x i8] c"ERROR: Array index is negative.\00", align 1
@.str.1 = private unnamed_addr constant [36 x i8] c"ERROR: Array index is out-of-bounds\00", align 1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE129_fscanf_63b_badSink(i32* %dataPtr) #0 {
entry:
%dataPtr.addr = alloca i32*, align 8
%data = alloca i32, align 4
%i = alloca i32, align 4
%buffer = alloca [10 x i32], align 16
store i32* %dataPtr, i32** %dataPtr.addr, align 8
%0 = load i32*, i32** %dataPtr.addr, align 8
%1 = load i32, i32* %0, align 4
store i32 %1, i32* %data, align 4
%2 = bitcast [10 x i32]* %buffer to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %2, i8 0, i64 40, i1 false)
%3 = load i32, i32* %data, align 4
%cmp = icmp sge i32 %3, 0
br i1 %cmp, label %if.then, label %if.else
if.then: ; preds = %entry
%4 = load i32, i32* %data, align 4
%idxprom = sext i32 %4 to i64
%arrayidx = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom
store i32 1, i32* %arrayidx, align 4
store i32 0, i32* %i, align 4
br label %for.cond
for.cond: ; preds = %for.inc, %if.then
%5 = load i32, i32* %i, align 4
%cmp1 = icmp slt i32 %5, 10
br i1 %cmp1, label %for.body, label %for.end
for.body: ; preds = %for.cond
%6 = load i32, i32* %i, align 4
%idxprom2 = sext i32 %6 to i64
%arrayidx3 = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom2
%7 = load i32, i32* %arrayidx3, align 4
call void @printIntLine(i32 %7)
br label %for.inc
for.inc: ; preds = %for.body
%8 = load i32, i32* %i, align 4
%inc = add nsw i32 %8, 1
store i32 %inc, i32* %i, align 4
br label %for.cond
for.end: ; preds = %for.cond
br label %if.end
if.else: ; preds = %entry
call void @printLine(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %if.end
if.end: ; preds = %if.else, %for.end
ret void
}
; Function Attrs: argmemonly nounwind willreturn writeonly
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #1
declare dso_local void @printIntLine(i32) #2
declare dso_local void @printLine(i8*) #2
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE129_fscanf_63b_goodG2BSink(i32* %dataPtr) #0 {
entry:
%dataPtr.addr = alloca i32*, align 8
%data = alloca i32, align 4
%i = alloca i32, align 4
%buffer = alloca [10 x i32], align 16
store i32* %dataPtr, i32** %dataPtr.addr, align 8
%0 = load i32*, i32** %dataPtr.addr, align 8
%1 = load i32, i32* %0, align 4
store i32 %1, i32* %data, align 4
%2 = bitcast [10 x i32]* %buffer to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %2, i8 0, i64 40, i1 false)
%3 = load i32, i32* %data, align 4
%cmp = icmp sge i32 %3, 0
br i1 %cmp, label %if.then, label %if.else
if.then: ; preds = %entry
%4 = load i32, i32* %data, align 4
%idxprom = sext i32 %4 to i64
%arrayidx = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom
store i32 1, i32* %arrayidx, align 4
store i32 0, i32* %i, align 4
br label %for.cond
for.cond: ; preds = %for.inc, %if.then
%5 = load i32, i32* %i, align 4
%cmp1 = icmp slt i32 %5, 10
br i1 %cmp1, label %for.body, label %for.end
for.body: ; preds = %for.cond
%6 = load i32, i32* %i, align 4
%idxprom2 = sext i32 %6 to i64
%arrayidx3 = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom2
%7 = load i32, i32* %arrayidx3, align 4
call void @printIntLine(i32 %7)
br label %for.inc
for.inc: ; preds = %for.body
%8 = load i32, i32* %i, align 4
%inc = add nsw i32 %8, 1
store i32 %inc, i32* %i, align 4
br label %for.cond
for.end: ; preds = %for.cond
br label %if.end
if.else: ; preds = %entry
call void @printLine(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %if.end
if.end: ; preds = %if.else, %for.end
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE129_fscanf_63b_goodB2GSink(i32* %dataPtr) #0 {
entry:
%dataPtr.addr = alloca i32*, align 8
%data = alloca i32, align 4
%i = alloca i32, align 4
%buffer = alloca [10 x i32], align 16
store i32* %dataPtr, i32** %dataPtr.addr, align 8
%0 = load i32*, i32** %dataPtr.addr, align 8
%1 = load i32, i32* %0, align 4
store i32 %1, i32* %data, align 4
%2 = bitcast [10 x i32]* %buffer to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %2, i8 0, i64 40, i1 false)
%3 = load i32, i32* %data, align 4
%cmp = icmp sge i32 %3, 0
br i1 %cmp, label %land.lhs.true, label %if.else
land.lhs.true: ; preds = %entry
%4 = load i32, i32* %data, align 4
%cmp1 = icmp slt i32 %4, 10
br i1 %cmp1, label %if.then, label %if.else
if.then: ; preds = %land.lhs.true
%5 = load i32, i32* %data, align 4
%idxprom = sext i32 %5 to i64
%arrayidx = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom
store i32 1, i32* %arrayidx, align 4
store i32 0, i32* %i, align 4
br label %for.cond
for.cond: ; preds = %for.inc, %if.then
%6 = load i32, i32* %i, align 4
%cmp2 = icmp slt i32 %6, 10
br i1 %cmp2, label %for.body, label %for.end
for.body: ; preds = %for.cond
%7 = load i32, i32* %i, align 4
%idxprom3 = sext i32 %7 to i64
%arrayidx4 = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom3
%8 = load i32, i32* %arrayidx4, align 4
call void @printIntLine(i32 %8)
br label %for.inc
for.inc: ; preds = %for.body
%9 = load i32, i32* %i, align 4
%inc = add nsw i32 %9, 1
store i32 %inc, i32* %i, align 4
br label %for.cond
for.end: ; preds = %for.cond
br label %if.end
if.else: ; preds = %land.lhs.true, %entry
call void @printLine(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
br label %if.end
if.end: ; preds = %if.else, %for.end
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" }
attributes #1 = { argmemonly nounwind willreturn writeonly }
attributes #2 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_340 = local_unnamed_addr constant i64 670014898204
@global_var_320 = constant i64 532575944732
@global_var_33e = local_unnamed_addr constant i64 43910096368697344
define i64 @_GLOBAL_OFFSET_TABLE_.1(i64 %arg1) local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
ret i64 0, !insn.addr !1
}
define i64 @function_30(i64 %arg1, i64 %arg2, i64 %arg3, i64 %arg4) local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%.reg2mem = alloca i64, !insn.addr !2
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = trunc i64 %2 to i8
%4 = mul i8 %3, 2, !insn.addr !2
%5 = inttoptr i64 %2 to i8*, !insn.addr !2
store i8 %4, i8* %5, align 1, !insn.addr !2
%6 = inttoptr i64 %arg3 to i8*, !insn.addr !3
call void @__asm_rep_stosq_memset(i8* %6, i64 %2, i64 %arg4), !insn.addr !3
%7 = add i64 %1, -816, !insn.addr !4
%8 = add i64 %1, -824, !insn.addr !5
%9 = inttoptr i64 %8 to i64*, !insn.addr !5
%10 = load i64, i64* %9, align 8, !insn.addr !5
%11 = call i64 @memcpy(i64 %10, i64 %7, i64* nonnull @global_var_320, i64 %7), !insn.addr !6
%12 = load i64, i64* %9, align 8, !insn.addr !7
%13 = inttoptr i64 %12 to i64*, !insn.addr !8
%14 = load i64, i64* %13, align 8, !insn.addr !8
%15 = call i64 @printLongLongLine(i64 %14), !insn.addr !9
%16 = add i64 %1, -8, !insn.addr !10
%17 = inttoptr i64 %16 to i64*, !insn.addr !10
%18 = load i64, i64* %17, align 8, !insn.addr !10
%19 = call i64 @__readfsqword(i64 40), !insn.addr !11
%20 = icmp eq i64 %19, %18, !insn.addr !11
store i64 0, i64* %.reg2mem, !insn.addr !12
br i1 %20, label %dec_label_pc_7d, label %dec_label_pc_78, !insn.addr !12
dec_label_pc_78: ; preds = %dec_label_pc_30
%21 = call i64 @__stack_chk_fail(), !insn.addr !13
store i64 %21, i64* %.reg2mem, !insn.addr !13
br label %dec_label_pc_7d, !insn.addr !13
dec_label_pc_7d: ; preds = %dec_label_pc_78, %dec_label_pc_30
%.reload = load i64, i64* %.reg2mem, !insn.addr !14
ret i64 %.reload, !insn.addr !14
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_memcpy_44_bad() local_unnamed_addr {
dec_label_pc_7f:
%rax.0.reg2mem = alloca i64, !insn.addr !15
%0 = call i64 @__readfsqword(i64 40), !insn.addr !16
%1 = call i64 @__readfsqword(i64 40), !insn.addr !17
%2 = icmp eq i64 %0, %1, !insn.addr !17
store i64 0, i64* %rax.0.reg2mem, !insn.addr !18
br i1 %2, label %dec_label_pc_137, label %dec_label_pc_132, !insn.addr !18
dec_label_pc_132: ; preds = %dec_label_pc_7f
%3 = call i64 @__stack_chk_fail(), !insn.addr !19
store i64 %3, i64* %rax.0.reg2mem, !insn.addr !19
br label %dec_label_pc_137, !insn.addr !19
dec_label_pc_137: ; preds = %dec_label_pc_132, %dec_label_pc_7f
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !20
}
define i64 @goodG2BSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_139:
%rax.0.reg2mem = alloca i64, !insn.addr !21
%stack_var_-824 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !22
%1 = bitcast i64* %stack_var_-824 to i8*, !insn.addr !23
call void @__asm_rep_stosq_memset(i8* nonnull %1, i64 0, i64 100), !insn.addr !23
%2 = ptrtoint i64* %stack_var_-824 to i64, !insn.addr !24
%3 = call i64 @memcpy(i64 %arg1, i64 %2, i64* nonnull @global_var_320, i64 %2), !insn.addr !25
%4 = call i64 @printLongLongLine(i64 %arg1), !insn.addr !26
%5 = call i64 @__readfsqword(i64 40), !insn.addr !27
%6 = icmp eq i64 %0, %5, !insn.addr !27
store i64 0, i64* %rax.0.reg2mem, !insn.addr !28
br i1 %6, label %dec_label_pc_1b6, label %dec_label_pc_1b1, !insn.addr !28
dec_label_pc_1b1: ; preds = %dec_label_pc_139
%7 = call i64 @__stack_chk_fail(), !insn.addr !29
store i64 %7, i64* %rax.0.reg2mem, !insn.addr !29
br label %dec_label_pc_1b6, !insn.addr !29
dec_label_pc_1b6: ; preds = %dec_label_pc_1b1, %dec_label_pc_139
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !30
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_1b8:
%rax.0.reg2mem = alloca i64, !insn.addr !31
%0 = call i64 @__readfsqword(i64 40), !insn.addr !32
%1 = call i64 @__readfsqword(i64 40), !insn.addr !33
%2 = icmp eq i64 %0, %1, !insn.addr !33
store i64 0, i64* %rax.0.reg2mem, !insn.addr !34
br i1 %2, label %dec_label_pc_270, label %dec_label_pc_26b, !insn.addr !34
dec_label_pc_26b: ; preds = %dec_label_pc_1b8
%3 = call i64 @__stack_chk_fail(), !insn.addr !35
store i64 %3, i64* %rax.0.reg2mem, !insn.addr !35
br label %dec_label_pc_270, !insn.addr !35
dec_label_pc_270: ; preds = %dec_label_pc_26b, %dec_label_pc_1b8
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !36
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_memcpy_44_good() local_unnamed_addr {
dec_label_pc_272:
%0 = call i64 @goodG2B(), !insn.addr !37
ret i64 %0, !insn.addr !38
}
declare i64 @memcpy(i64, i64, i64*, i64) local_unnamed_addr
declare i64 @printLongLongLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare void @__asm_rep_stosq_memset(i8*, i64, i64) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 18}
!1 = !{i64 33}
!2 = !{i64 48}
!3 = !{i64 53}
!4 = !{i64 56}
!5 = !{i64 63}
!6 = !{i64 81}
!7 = !{i64 86}
!8 = !{i64 93}
!9 = !{i64 99}
!10 = !{i64 105}
!11 = !{i64 109}
!12 = !{i64 118}
!13 = !{i64 120}
!14 = !{i64 126}
!15 = !{i64 127}
!16 = !{i64 135}
!17 = !{i64 295}
!18 = !{i64 304}
!19 = !{i64 306}
!20 = !{i64 312}
!21 = !{i64 313}
!22 = !{i64 331}
!23 = !{i64 366}
!24 = !{i64 369}
!25 = !{i64 394}
!26 = !{i64 412}
!27 = !{i64 422}
!28 = !{i64 431}
!29 = !{i64 433}
!30 = !{i64 439}
!31 = !{i64 440}
!32 = !{i64 448}
!33 = !{i64 608}
!34 = !{i64 617}
!35 = !{i64 619}
!36 = !{i64 625}
!37 = !{i64 635}
!38 = !{i64 642}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_memcpy_44_bad() #0 {
entry:
%data = alloca i64*, align 8
%funcPtr = alloca void (i64*)*, align 8
%dataBadBuffer = alloca i64*, align 8
%dataGoodBuffer = alloca i64*, align 8
store void (i64*)* @badSink, void (i64*)** %funcPtr, align 8
%0 = alloca i8, i64 400, align 16
%1 = bitcast i8* %0 to i64*
store i64* %1, i64** %dataBadBuffer, align 8
%2 = alloca i8, i64 800, align 16
%3 = bitcast i8* %2 to i64*
store i64* %3, i64** %dataGoodBuffer, align 8
%4 = load i64*, i64** %dataBadBuffer, align 8
store i64* %4, i64** %data, align 8
%5 = load void (i64*)*, void (i64*)** %funcPtr, align 8
%6 = load i64*, i64** %data, align 8
call void %5(i64* %6)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @badSink(i64* %data) #0 {
entry:
%data.addr = alloca i64*, align 8
%source = alloca [100 x i64], align 16
store i64* %data, i64** %data.addr, align 8
%0 = bitcast [100 x i64]* %source to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %0, i8 0, i64 800, i1 false)
%1 = load i64*, i64** %data.addr, align 8
%2 = bitcast i64* %1 to i8*
%arraydecay = getelementptr inbounds [100 x i64], [100 x i64]* %source, i64 0, i64 0
%3 = bitcast i64* %arraydecay to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %2, i8* align 16 %3, i64 800, i1 false)
%4 = load i64*, i64** %data.addr, align 8
%arrayidx = getelementptr inbounds i64, i64* %4, i64 0
%5 = load i64, i64* %arrayidx, align 8
call void @printLongLongLine(i64 %5)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_memcpy_44_good() #0 {
entry:
call void @goodG2B()
ret void
}
; Function Attrs: argmemonly nounwind willreturn writeonly
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #1
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #2
declare dso_local void @printLongLongLine(i64) #3
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B() #0 {
entry:
%data = alloca i64*, align 8
%funcPtr = alloca void (i64*)*, align 8
%dataBadBuffer = alloca i64*, align 8
%dataGoodBuffer = alloca i64*, align 8
store void (i64*)* @goodG2BSink, void (i64*)** %funcPtr, align 8
%0 = alloca i8, i64 400, align 16
%1 = bitcast i8* %0 to i64*
store i64* %1, i64** %dataBadBuffer, align 8
%2 = alloca i8, i64 800, align 16
%3 = bitcast i8* %2 to i64*
store i64* %3, i64** %dataGoodBuffer, align 8
%4 = load i64*, i64** %dataGoodBuffer, align 8
store i64* %4, i64** %data, align 8
%5 = load void (i64*)*, void (i64*)** %funcPtr, align 8
%6 = load i64*, i64** %data, align 8
call void %5(i64* %6)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2BSink(i64* %data) #0 {
entry:
%data.addr = alloca i64*, align 8
%source = alloca [100 x i64], align 16
store i64* %data, i64** %data.addr, align 8
%0 = bitcast [100 x i64]* %source to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %0, i8 0, i64 800, i1 false)
%1 = load i64*, i64** %data.addr, align 8
%2 = bitcast i64* %1 to i8*
%arraydecay = getelementptr inbounds [100 x i64], [100 x i64]* %source, i64 0, i64 0
%3 = bitcast i64* %arraydecay to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %2, i8* align 16 %3, i64 800, i1 false)
%4 = load i64*, i64** %data.addr, align 8
%arrayidx = getelementptr inbounds i64, i64* %4, i64 0
%5 = load i64, i64* %arrayidx, align 8
call void @printLongLongLine(i64 %5)
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" }
attributes #1 = { argmemonly nounwind willreturn writeonly }
attributes #2 = { argmemonly nounwind willreturn }
attributes #3 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_188 = local_unnamed_addr global i64 0
@global_var_1b0 = local_unnamed_addr global i32* null
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
%1 = load i64, i64* @global_var_188, align 8, !insn.addr !1
ret i64 %1, !insn.addr !2
}
define i64 @function_30() local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%.reg2mem = alloca i64, !insn.addr !3
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = trunc i64 %2 to i8
%4 = mul i8 %3, 2, !insn.addr !3
%5 = inttoptr i64 %2 to i8*, !insn.addr !3
store i8 %4, i8* %5, align 1, !insn.addr !3
%6 = add i64 %1, -32, !insn.addr !4
%7 = inttoptr i64 %6 to i64*, !insn.addr !4
store i64 0, i64* %7, align 8, !insn.addr !4
%8 = add i64 %1, -24, !insn.addr !5
%9 = inttoptr i64 %8 to i64*, !insn.addr !5
store i64 0, i64* %9, align 8, !insn.addr !5
%10 = add i64 %1, -16, !insn.addr !6
%11 = inttoptr i64 %10 to i64*, !insn.addr !6
store i64 0, i64* %11, align 8, !insn.addr !6
%12 = add i64 %1, -48, !insn.addr !7
%13 = add i64 %1, -56, !insn.addr !8
%14 = inttoptr i64 %13 to i64*, !insn.addr !8
%15 = load i64, i64* %14, align 8, !insn.addr !8
%16 = call i64 @memmove(i64 %15, i64 %12, i64 40, i64 %12), !insn.addr !9
%17 = load i64, i64* %14, align 8, !insn.addr !10
%18 = inttoptr i64 %17 to i32*, !insn.addr !11
%19 = load i32, i32* %18, align 4, !insn.addr !11
%20 = zext i32 %19 to i64, !insn.addr !12
%21 = call i64 @printIntLine(i64 %20), !insn.addr !13
%22 = add i64 %1, -8, !insn.addr !14
%23 = inttoptr i64 %22 to i64*, !insn.addr !14
%24 = load i64, i64* %23, align 8, !insn.addr !14
%25 = call i64 @__readfsqword(i64 40), !insn.addr !15
%26 = icmp eq i64 %25, %24, !insn.addr !15
store i64 0, i64* %.reg2mem, !insn.addr !16
br i1 %26, label %dec_label_pc_84, label %dec_label_pc_7f, !insn.addr !16
dec_label_pc_7f: ; preds = %dec_label_pc_30
%27 = call i64 @__stack_chk_fail(), !insn.addr !17
store i64 %27, i64* %.reg2mem, !insn.addr !17
br label %dec_label_pc_84, !insn.addr !17
dec_label_pc_84: ; preds = %dec_label_pc_7f, %dec_label_pc_30
%.reload = load i64, i64* %.reg2mem, !insn.addr !18
ret i64 %.reload, !insn.addr !18
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE131_memmove_68b_goodG2BSink() local_unnamed_addr {
dec_label_pc_86:
%rax.0.reg2mem = alloca i64, !insn.addr !19
%stack_var_-56 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !20
%1 = load i32*, i32** @global_var_1b0, align 8, !insn.addr !21
%2 = ptrtoint i32* %1 to i64, !insn.addr !21
store i64 0, i64* %stack_var_-56, align 8, !insn.addr !22
%3 = ptrtoint i64* %stack_var_-56 to i64, !insn.addr !23
%4 = call i64 @memmove(i64 %2, i64 %3, i64 40, i64 %3), !insn.addr !24
%5 = load i32, i32* %1, align 4, !insn.addr !25
%6 = zext i32 %5 to i64, !insn.addr !26
%7 = call i64 @printIntLine(i64 %6), !insn.addr !27
%8 = call i64 @__readfsqword(i64 40), !insn.addr !28
%9 = icmp eq i64 %0, %8, !insn.addr !28
store i64 0, i64* %rax.0.reg2mem, !insn.addr !29
br i1 %9, label %dec_label_pc_10a, label %dec_label_pc_105, !insn.addr !29
dec_label_pc_105: ; preds = %dec_label_pc_86
%10 = call i64 @__stack_chk_fail(), !insn.addr !30
store i64 %10, i64* %rax.0.reg2mem, !insn.addr !30
br label %dec_label_pc_10a, !insn.addr !30
dec_label_pc_10a: ; preds = %dec_label_pc_105, %dec_label_pc_86
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !31
}
declare i64 @memmove(i64, i64, i64, i64) local_unnamed_addr
declare i64 @printIntLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 8}
!1 = !{i64 23}
!2 = !{i64 30}
!3 = !{i64 48}
!4 = !{i64 50}
!5 = !{i64 58}
!6 = !{i64 66}
!7 = !{i64 74}
!8 = !{i64 78}
!9 = !{i64 93}
!10 = !{i64 98}
!11 = !{i64 102}
!12 = !{i64 104}
!13 = !{i64 106}
!14 = !{i64 112}
!15 = !{i64 116}
!16 = !{i64 125}
!17 = !{i64 127}
!18 = !{i64 133}
!19 = !{i64 134}
!20 = !{i64 142}
!21 = !{i64 157}
!22 = !{i64 168}
!23 = !{i64 208}
!24 = !{i64 227}
!25 = !{i64 236}
!26 = !{i64 238}
!27 = !{i64 240}
!28 = !{i64 250}
!29 = !{i64 259}
!30 = !{i64 261}
!31 = !{i64 267}
### Assistant: @CWE121_Stack_Based_Buffer_Overflow__CWE131_memmove_68_badData = external dso_local global i32*, align 8
@CWE121_Stack_Based_Buffer_Overflow__CWE131_memmove_68_goodG2BData = external dso_local global i32*, align 8
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE131_memmove_68b_badSink() #0 {
entry:
%data = alloca i32*, align 8
%source = alloca [10 x i32], align 16
%0 = load i32*, i32** @CWE121_Stack_Based_Buffer_Overflow__CWE131_memmove_68_badData, align 8
store i32* %0, i32** %data, align 8
%1 = bitcast [10 x i32]* %source to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %1, i8 0, i64 40, i1 false)
%2 = load i32*, i32** %data, align 8
%3 = bitcast i32* %2 to i8*
%arraydecay = getelementptr inbounds [10 x i32], [10 x i32]* %source, i64 0, i64 0
%4 = bitcast i32* %arraydecay to i8*
call void @llvm.memmove.p0i8.p0i8.i64(i8* align 4 %3, i8* align 16 %4, i64 40, i1 false)
%5 = load i32*, i32** %data, align 8
%arrayidx = getelementptr inbounds i32, i32* %5, i64 0
%6 = load i32, i32* %arrayidx, align 4
call void @printIntLine(i32 %6)
ret void
}
; Function Attrs: argmemonly nounwind willreturn writeonly
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #1
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memmove.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i1 immarg) #2
declare dso_local void @printIntLine(i32) #3
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE131_memmove_68b_goodG2BSink() #0 {
entry:
%data = alloca i32*, align 8
%source = alloca [10 x i32], align 16
%0 = load i32*, i32** @CWE121_Stack_Based_Buffer_Overflow__CWE131_memmove_68_goodG2BData, align 8
store i32* %0, i32** %data, align 8
%1 = bitcast [10 x i32]* %source to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %1, i8 0, i64 40, i1 false)
%2 = load i32*, i32** %data, align 8
%3 = bitcast i32* %2 to i8*
%arraydecay = getelementptr inbounds [10 x i32], [10 x i32]* %source, i64 0, i64 0
%4 = bitcast i32* %arraydecay to i8*
call void @llvm.memmove.p0i8.p0i8.i64(i8* align 4 %3, i8* align 16 %4, i64 40, i1 false)
%5 = load i32*, i32** %data, align 8
%arrayidx = getelementptr inbounds i32, i32* %5, i64 0
%6 = load i32, i32* %arrayidx, align 4
call void @printIntLine(i32 %6)
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" }
attributes #1 = { argmemonly nounwind willreturn writeonly }
attributes #2 = { argmemonly nounwind willreturn }
attributes #3 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_f = local_unnamed_addr constant [3 x i8] c"%(\00"
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%stack_var_-824 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
%1 = ptrtoint i64* %stack_var_-824 to i64, !insn.addr !1
ret i64 %1, !insn.addr !2
}
define i64 @function_30() local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !3
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = and i64 %2, 4294967295, !insn.addr !3
%4 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_loop_53b_badSink(i64 %3), !insn.addr !4
%5 = add i64 %1, -8, !insn.addr !5
%6 = inttoptr i64 %5 to i64*, !insn.addr !5
%7 = load i64, i64* %6, align 8, !insn.addr !5
%8 = call i64 @__readfsqword(i64 40), !insn.addr !6
%9 = icmp eq i64 %7, %8, !insn.addr !6
store i64 0, i64* %rax.0.reg2mem, !insn.addr !7
br i1 %9, label %dec_label_pc_4c, label %dec_label_pc_47, !insn.addr !7
dec_label_pc_47: ; preds = %dec_label_pc_30
%10 = call i64 @__stack_chk_fail(), !insn.addr !8
store i64 %10, i64* %rax.0.reg2mem, !insn.addr !8
br label %dec_label_pc_4c, !insn.addr !8
dec_label_pc_4c: ; preds = %dec_label_pc_47, %dec_label_pc_30
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !9
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_4e:
%rax.0.reg2mem = alloca i64, !insn.addr !10
%stack_var_-824 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !11
%1 = ptrtoint i64* %stack_var_-824 to i64, !insn.addr !12
%2 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_loop_53b_goodG2BSink(i64 %1), !insn.addr !13
%3 = call i64 @__readfsqword(i64 40), !insn.addr !14
%4 = icmp eq i64 %0, %3, !insn.addr !14
store i64 0, i64* %rax.0.reg2mem, !insn.addr !15
br i1 %4, label %dec_label_pc_9a, label %dec_label_pc_95, !insn.addr !15
dec_label_pc_95: ; preds = %dec_label_pc_4e
%5 = call i64 @__stack_chk_fail(), !insn.addr !16
store i64 %5, i64* %rax.0.reg2mem, !insn.addr !16
br label %dec_label_pc_9a, !insn.addr !16
dec_label_pc_9a: ; preds = %dec_label_pc_95, %dec_label_pc_4e
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !17
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_loop_53_good() local_unnamed_addr {
dec_label_pc_9c:
%0 = call i64 @goodG2B(), !insn.addr !18
ret i64 %0, !insn.addr !19
}
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_loop_53b_badSink(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_loop_53b_goodG2BSink(i64) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 11}
!1 = !{i64 26}
!2 = !{i64 33}
!3 = !{i64 48}
!4 = !{i64 50}
!5 = !{i64 56}
!6 = !{i64 60}
!7 = !{i64 69}
!8 = !{i64 71}
!9 = !{i64 77}
!10 = !{i64 78}
!11 = !{i64 89}
!12 = !{i64 111}
!13 = !{i64 128}
!14 = !{i64 138}
!15 = !{i64 147}
!16 = !{i64 149}
!17 = !{i64 155}
!18 = !{i64 165}
!19 = !{i64 172}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_loop_53_bad() #0 {
entry:
%data = alloca i64*, align 8
%dataBadBuffer = alloca [50 x i64], align 16
%dataGoodBuffer = alloca [100 x i64], align 16
%arraydecay = getelementptr inbounds [50 x i64], [50 x i64]* %dataBadBuffer, i64 0, i64 0
store i64* %arraydecay, i64** %data, align 8
%0 = load i64*, i64** %data, align 8
call void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_loop_53b_badSink(i64* %0)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_loop_53b_badSink(i64*) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_loop_53_good() #0 {
entry:
call void @goodG2B()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B() #0 {
entry:
%data = alloca i64*, align 8
%dataBadBuffer = alloca [50 x i64], align 16
%dataGoodBuffer = alloca [100 x i64], align 16
%arraydecay = getelementptr inbounds [100 x i64], [100 x i64]* %dataGoodBuffer, i64 0, i64 0
store i64* %arraydecay, i64** %data, align 8
%0 = load i64*, i64** %data, align 8
call void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_loop_53b_goodG2BSink(i64* %0)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_loop_53b_goodG2BSink(i64*) #1
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" }
attributes #1 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_1d8 = constant [21 x i8] c"Benign, fixed string\00"
@global_var_1d4 = local_unnamed_addr global i32 1
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !0
%1 = load i64, i64* %0
%stack_var_-27 = alloca i64, align 8
%stack_var_-37 = alloca i64, align 8
%2 = call i64 @__readfsqword(i64 40), !insn.addr !1
%3 = load i32, i32* inttoptr (i64 468 to i32*), align 4, !insn.addr !2
%4 = icmp eq i32 %3, 0, !insn.addr !3
br i1 %4, label %dec_label_pc_30, label %dec_label_pc_21, !insn.addr !4
dec_label_pc_21: ; preds = %dec_label_pc_0
%5 = ptrtoint i64* %stack_var_-37 to i64, !insn.addr !5
ret i64 %5, !insn.addr !5
dec_label_pc_30: ; preds = %dec_label_pc_0
store i64 4702111234474983745, i64* %stack_var_-27, align 8, !insn.addr !6
%6 = call i64 @strlen(i64* nonnull %stack_var_-27), !insn.addr !7
%7 = add i64 %6, 1, !insn.addr !8
%8 = call i64 @memmove(i64 %1, i64* nonnull %stack_var_-27, i64 %7, i64* nonnull %stack_var_-27), !insn.addr !9
%9 = call i64 @printLine(i64 %1), !insn.addr !10
%10 = call i64 @__readfsqword(i64 40), !insn.addr !11
%11 = icmp eq i64 %2, %10, !insn.addr !11
store i64 0, i64* %rax.0.reg2mem, !insn.addr !12
br i1 %11, label %dec_label_pc_8c, label %dec_label_pc_87, !insn.addr !12
dec_label_pc_87: ; preds = %dec_label_pc_30
%12 = call i64 @__stack_chk_fail(), !insn.addr !13
store i64 %12, i64* %rax.0.reg2mem, !insn.addr !13
br label %dec_label_pc_8c, !insn.addr !13
dec_label_pc_8c: ; preds = %dec_label_pc_87, %dec_label_pc_30
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !14
}
define i64 @goodG2B1() local_unnamed_addr {
dec_label_pc_8e:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !15
%stack_var_-27 = alloca i64, align 8
%1 = load i64, i64* %0
%2 = call i64 @__readfsqword(i64 40), !insn.addr !16
%3 = call i64 @printLine(i64 ptrtoint ([21 x i8]* @global_var_1d8 to i64)), !insn.addr !17
store i64 4702111234474983745, i64* %stack_var_-27, align 8, !insn.addr !18
%4 = call i64 @strlen(i64* nonnull %stack_var_-27), !insn.addr !19
%5 = add i64 %4, 1, !insn.addr !20
%6 = call i64 @memmove(i64 %1, i64* nonnull %stack_var_-27, i64 %5, i64* nonnull %stack_var_-27), !insn.addr !21
%7 = call i64 @printLine(i64 %1), !insn.addr !22
%8 = call i64 @__readfsqword(i64 40), !insn.addr !23
%9 = icmp eq i64 %2, %8, !insn.addr !23
store i64 0, i64* %rax.0.reg2mem, !insn.addr !24
br i1 %9, label %dec_label_pc_128, label %dec_label_pc_123, !insn.addr !24
dec_label_pc_123: ; preds = %dec_label_pc_8e
%10 = call i64 @__stack_chk_fail(), !insn.addr !25
store i64 %10, i64* %rax.0.reg2mem, !insn.addr !25
br label %dec_label_pc_128, !insn.addr !25
dec_label_pc_128: ; preds = %dec_label_pc_123, %dec_label_pc_8e
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !26
}
define i64 @goodG2B2() local_unnamed_addr {
dec_label_pc_12a:
%rax.0.reg2mem = alloca i64, !insn.addr !27
%stack_var_-48.0.reg2mem = alloca i64, !insn.addr !27
%stack_var_-27 = alloca i64, align 8
%stack_var_-38 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !28
%1 = load i32, i32* @global_var_1d4, align 4, !insn.addr !29
%2 = icmp eq i32 %1, 0, !insn.addr !30
br i1 %2, label %dec_label_pc_15a, label %dec_label_pc_14b, !insn.addr !31
dec_label_pc_14b: ; preds = %dec_label_pc_12a
%3 = ptrtoint i64* %stack_var_-38 to i64, !insn.addr !32
%4 = bitcast i64* %stack_var_-38 to i8*, !insn.addr !33
store i8 0, i8* %4, align 8, !insn.addr !33
store i64 %3, i64* %stack_var_-48.0.reg2mem, !insn.addr !33
br label %dec_label_pc_15a, !insn.addr !33
dec_label_pc_15a: ; preds = %dec_label_pc_14b, %dec_label_pc_12a
%stack_var_-48.0.reload = load i64, i64* %stack_var_-48.0.reg2mem
store i64 4702111234474983745, i64* %stack_var_-27, align 8, !insn.addr !34
%5 = call i64 @strlen(i64* nonnull %stack_var_-27), !insn.addr !35
%6 = add i64 %5, 1, !insn.addr !36
%7 = call i64 @memmove(i64 %stack_var_-48.0.reload, i64* nonnull %stack_var_-27, i64 %6, i64* nonnull %stack_var_-27), !insn.addr !37
%8 = call i64 @printLine(i64 %stack_var_-48.0.reload), !insn.addr !38
%9 = call i64 @__readfsqword(i64 40), !insn.addr !39
%10 = icmp eq i64 %0, %9, !insn.addr !39
store i64 0, i64* %rax.0.reg2mem, !insn.addr !40
br i1 %10, label %dec_label_pc_1b6, label %dec_label_pc_1b1, !insn.addr !40
dec_label_pc_1b1: ; preds = %dec_label_pc_15a
%11 = call i64 @__stack_chk_fail(), !insn.addr !41
store i64 %11, i64* %rax.0.reg2mem, !insn.addr !41
br label %dec_label_pc_1b6, !insn.addr !41
dec_label_pc_1b6: ; preds = %dec_label_pc_1b1, %dec_label_pc_15a
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !42
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memmove_05_good() local_unnamed_addr {
dec_label_pc_1b8:
%0 = call i64 @goodG2B1(), !insn.addr !43
%1 = call i64 @goodG2B2(), !insn.addr !44
ret i64 %1, !insn.addr !45
}
declare i64 @strlen(i64*) local_unnamed_addr
declare i64 @memmove(i64, i64*, i64, i64*) local_unnamed_addr
declare i64 @printLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 0}
!1 = !{i64 8}
!2 = !{i64 23}
!3 = !{i64 29}
!4 = !{i64 31}
!5 = !{i64 33}
!6 = !{i64 58}
!7 = !{i64 79}
!8 = !{i64 84}
!9 = !{i64 102}
!10 = !{i64 114}
!11 = !{i64 124}
!12 = !{i64 133}
!13 = !{i64 135}
!14 = !{i64 141}
!15 = !{i64 142}
!16 = !{i64 150}
!17 = !{i64 182}
!18 = !{i64 214}
!19 = !{i64 235}
!20 = !{i64 240}
!21 = !{i64 258}
!22 = !{i64 270}
!23 = !{i64 280}
!24 = !{i64 289}
!25 = !{i64 291}
!26 = !{i64 297}
!27 = !{i64 298}
!28 = !{i64 306}
!29 = !{i64 321}
!30 = !{i64 327}
!31 = !{i64 329}
!32 = !{i64 335}
!33 = !{i64 343}
!34 = !{i64 356}
!35 = !{i64 377}
!36 = !{i64 382}
!37 = !{i64 400}
!38 = !{i64 412}
!39 = !{i64 422}
!40 = !{i64 431}
!41 = !{i64 433}
!42 = !{i64 439}
!43 = !{i64 449}
!44 = !{i64 459}
!45 = !{i64 466}
### Assistant: @staticTrue = internal global i32 1, align 4
@__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memmove_05_bad.source = private unnamed_addr constant [11 x i8] c"AAAAAAAAAA\00", align 1
@staticFalse = internal global i32 0, align 4
@.str = private unnamed_addr constant [21 x i8] c"Benign, fixed string\00", align 1
@__const.goodG2B1.source = private unnamed_addr constant [11 x i8] c"AAAAAAAAAA\00", align 1
@__const.goodG2B2.source = private unnamed_addr constant [11 x i8] c"AAAAAAAAAA\00", align 1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memmove_05_bad() #0 {
entry:
%data = alloca i8*, align 8
%dataBadBuffer = alloca [10 x i8], align 1
%dataGoodBuffer = alloca [11 x i8], align 1
%source = alloca [11 x i8], align 1
%0 = load i32, i32* @staticTrue, align 4
%tobool = icmp ne i32 %0, 0
br i1 %tobool, label %if.then, label %if.end
if.then: ; preds = %entry
%arraydecay = getelementptr inbounds [10 x i8], [10 x i8]* %dataBadBuffer, i64 0, i64 0
store i8* %arraydecay, i8** %data, align 8
%1 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %1, i64 0
store i8 0, i8* %arrayidx, align 1
br label %if.end
if.end: ; preds = %if.then, %entry
%2 = bitcast [11 x i8]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %2, i8* align 1 getelementptr inbounds ([11 x i8], [11 x i8]* @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memmove_05_bad.source, i32 0, i32 0), i64 11, i1 false)
%3 = load i8*, i8** %data, align 8
%arraydecay1 = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%arraydecay2 = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%call = call i64 @strlen(i8* %arraydecay2) #4
%add = add i64 %call, 1
%mul = mul i64 %add, 1
call void @llvm.memmove.p0i8.p0i8.i64(i8* align 1 %3, i8* align 1 %arraydecay1, i64 %mul, i1 false)
%4 = load i8*, i8** %data, align 8
call void @printLine(i8* %4)
ret void
}
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #1
; Function Attrs: nounwind readonly
declare dso_local i64 @strlen(i8*) #2
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memmove.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i1 immarg) #1
declare dso_local void @printLine(i8*) #3
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_memmove_05_good() #0 {
entry:
call void @goodG2B1()
call void @goodG2B2()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B1() #0 {
entry:
%data = alloca i8*, align 8
%dataBadBuffer = alloca [10 x i8], align 1
%dataGoodBuffer = alloca [11 x i8], align 1
%source = alloca [11 x i8], align 1
%0 = load i32, i32* @staticFalse, align 4
%tobool = icmp ne i32 %0, 0
br i1 %tobool, label %if.then, label %if.else
if.then: ; preds = %entry
call void @printLine(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
br label %if.end
if.else: ; preds = %entry
%arraydecay = getelementptr inbounds [11 x i8], [11 x i8]* %dataGoodBuffer, i64 0, i64 0
store i8* %arraydecay, i8** %data, align 8
%1 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %1, i64 0
store i8 0, i8* %arrayidx, align 1
br label %if.end
if.end: ; preds = %if.else, %if.then
%2 = bitcast [11 x i8]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %2, i8* align 1 getelementptr inbounds ([11 x i8], [11 x i8]* @__const.goodG2B1.source, i32 0, i32 0), i64 11, i1 false)
%3 = load i8*, i8** %data, align 8
%arraydecay1 = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%arraydecay2 = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%call = call i64 @strlen(i8* %arraydecay2) #4
%add = add i64 %call, 1
%mul = mul i64 %add, 1
call void @llvm.memmove.p0i8.p0i8.i64(i8* align 1 %3, i8* align 1 %arraydecay1, i64 %mul, i1 false)
%4 = load i8*, i8** %data, align 8
call void @printLine(i8* %4)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B2() #0 {
entry:
%data = alloca i8*, align 8
%dataBadBuffer = alloca [10 x i8], align 1
%dataGoodBuffer = alloca [11 x i8], align 1
%source = alloca [11 x i8], align 1
%0 = load i32, i32* @staticTrue, align 4
%tobool = icmp ne i32 %0, 0
br i1 %tobool, label %if.then, label %if.end
if.then: ; preds = %entry
%arraydecay = getelementptr inbounds [11 x i8], [11 x i8]* %dataGoodBuffer, i64 0, i64 0
store i8* %arraydecay, i8** %data, align 8
%1 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %1, i64 0
store i8 0, i8* %arrayidx, align 1
br label %if.end
if.end: ; preds = %if.then, %entry
%2 = bitcast [11 x i8]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %2, i8* align 1 getelementptr inbounds ([11 x i8], [11 x i8]* @__const.goodG2B2.source, i32 0, i32 0), i64 11, i1 false)
%3 = load i8*, i8** %data, align 8
%arraydecay1 = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%arraydecay2 = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%call = call i64 @strlen(i8* %arraydecay2) #4
%add = add i64 %call, 1
%mul = mul i64 %add, 1
call void @llvm.memmove.p0i8.p0i8.i64(i8* align 1 %3, i8* align 1 %arraydecay1, i64 %mul, i1 false)
%4 = load i8*, i8** %data, align 8
call void @printLine(i8* %4)
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" }
attributes #1 = { argmemonly nounwind willreturn }
attributes #2 = { nounwind readonly "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #3 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #4 = { nounwind readonly }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_3d5 = constant [21 x i8] c"Benign, fixed string\00"
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
ret i64 1, !insn.addr !0
}
define i64 @staticReturnsFalse() local_unnamed_addr {
dec_label_pc_b:
ret i64 0, !insn.addr !1
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_08_bad() local_unnamed_addr {
dec_label_pc_16:
%rax.0.reg2mem = alloca i64, !insn.addr !2
%storemerge1.reg2mem = alloca i64, !insn.addr !2
%stack_var_-824 = alloca i64, align 8
%stack_var_-856 = alloca i64, align 8
%stack_var_-8 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !3
%1 = call i64 @_GLOBAL_OFFSET_TABLE_.1(), !insn.addr !4
%2 = trunc i64 %1 to i32, !insn.addr !5
%3 = icmp eq i32 %2, 0, !insn.addr !5
br i1 %3, label %dec_label_pc_be, label %dec_label_pc_b0, !insn.addr !6
dec_label_pc_b0: ; preds = %dec_label_pc_16
%4 = ptrtoint i64* %stack_var_-856 to i64, !insn.addr !7
%5 = add i64 %4, -401, !insn.addr !8
%6 = and i64 %5, -16, !insn.addr !9
store i64 %6, i64* %stack_var_-856, align 8, !insn.addr !10
br label %dec_label_pc_be, !insn.addr !10
dec_label_pc_be: ; preds = %dec_label_pc_b0, %dec_label_pc_16
%7 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !11
%8 = bitcast i64* %stack_var_-824 to i8*, !insn.addr !12
call void @__asm_rep_stosq_memset(i8* nonnull %8, i64 0, i64 100), !insn.addr !12
%9 = add i64 %7, -816, !insn.addr !13
store i64 0, i64* %storemerge1.reg2mem
br label %dec_label_pc_e2
dec_label_pc_e2: ; preds = %dec_label_pc_e2, %dec_label_pc_be
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%10 = mul i64 %storemerge1.reload, 8, !insn.addr !14
%11 = load i64, i64* %stack_var_-856, align 8, !insn.addr !15
%12 = add i64 %11, %10, !insn.addr !16
%13 = add i64 %9, %10, !insn.addr !13
%14 = inttoptr i64 %13 to i64*, !insn.addr !13
%15 = load i64, i64* %14, align 8, !insn.addr !13
%16 = inttoptr i64 %12 to i64*, !insn.addr !17
store i64 %15, i64* %16, align 8, !insn.addr !17
%17 = add nuw nsw i64 %storemerge1.reload, 1, !insn.addr !18
%exitcond = icmp eq i64 %17, 100
store i64 %17, i64* %storemerge1.reg2mem, !insn.addr !19
br i1 %exitcond, label %dec_label_pc_11f, label %dec_label_pc_e2, !insn.addr !19
dec_label_pc_11f: ; preds = %dec_label_pc_e2
%18 = load i64, i64* %stack_var_-856, align 8, !insn.addr !20
%19 = inttoptr i64 %18 to i64*, !insn.addr !21
%20 = load i64, i64* %19, align 8, !insn.addr !21
%21 = call i64 @printLongLongLine(i64 %20), !insn.addr !22
%22 = call i64 @__readfsqword(i64 40), !insn.addr !23
%23 = icmp eq i64 %0, %22, !insn.addr !23
store i64 0, i64* %rax.0.reg2mem, !insn.addr !24
br i1 %23, label %dec_label_pc_146, label %dec_label_pc_141, !insn.addr !24
dec_label_pc_141: ; preds = %dec_label_pc_11f
%24 = call i64 @__stack_chk_fail(), !insn.addr !25
store i64 %24, i64* %rax.0.reg2mem, !insn.addr !25
br label %dec_label_pc_146, !insn.addr !25
dec_label_pc_146: ; preds = %dec_label_pc_141, %dec_label_pc_11f
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !26
}
define i64 @goodG2B1() local_unnamed_addr {
dec_label_pc_148:
%rax.0.reg2mem = alloca i64, !insn.addr !27
%storemerge1.reg2mem = alloca i64, !insn.addr !27
%stack_var_-824 = alloca i64, align 8
%stack_var_-856 = alloca i64, align 8
%stack_var_-8 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !28
%1 = call i64 @staticReturnsFalse(), !insn.addr !29
%2 = trunc i64 %1 to i32, !insn.addr !30
%3 = icmp eq i32 %2, 0, !insn.addr !30
br i1 %3, label %dec_label_pc_1f0, label %dec_label_pc_1e2, !insn.addr !31
dec_label_pc_1e2: ; preds = %dec_label_pc_148
%4 = call i64 @printLine(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @global_var_3d5, i64 0, i64 0)), !insn.addr !32
br label %dec_label_pc_1fe, !insn.addr !33
dec_label_pc_1f0: ; preds = %dec_label_pc_148
%5 = ptrtoint i64* %stack_var_-856 to i64, !insn.addr !34
%6 = add i64 %5, -1217, !insn.addr !35
%7 = and i64 %6, -16, !insn.addr !36
store i64 %7, i64* %stack_var_-856, align 8, !insn.addr !37
br label %dec_label_pc_1fe, !insn.addr !37
dec_label_pc_1fe: ; preds = %dec_label_pc_1f0, %dec_label_pc_1e2
%8 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !38
%9 = bitcast i64* %stack_var_-824 to i8*, !insn.addr !39
call void @__asm_rep_stosq_memset(i8* nonnull %9, i64 0, i64 100), !insn.addr !39
%10 = add i64 %8, -816, !insn.addr !40
store i64 0, i64* %storemerge1.reg2mem
br label %dec_label_pc_222
dec_label_pc_222: ; preds = %dec_label_pc_222, %dec_label_pc_1fe
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%11 = mul i64 %storemerge1.reload, 8, !insn.addr !41
%12 = load i64, i64* %stack_var_-856, align 8, !insn.addr !42
%13 = add i64 %12, %11, !insn.addr !43
%14 = add i64 %10, %11, !insn.addr !40
%15 = inttoptr i64 %14 to i64*, !insn.addr !40
%16 = load i64, i64* %15, align 8, !insn.addr !40
%17 = inttoptr i64 %13 to i64*, !insn.addr !44
store i64 %16, i64* %17, align 8, !insn.addr !44
%18 = add nuw nsw i64 %storemerge1.reload, 1, !insn.addr !45
%exitcond = icmp eq i64 %18, 100
store i64 %18, i64* %storemerge1.reg2mem, !insn.addr !46
br i1 %exitcond, label %dec_label_pc_25f, label %dec_label_pc_222, !insn.addr !46
dec_label_pc_25f: ; preds = %dec_label_pc_222
%19 = load i64, i64* %stack_var_-856, align 8, !insn.addr !47
%20 = inttoptr i64 %19 to i64*, !insn.addr !48
%21 = load i64, i64* %20, align 8, !insn.addr !48
%22 = call i64 @printLongLongLine(i64 %21), !insn.addr !49
%23 = call i64 @__readfsqword(i64 40), !insn.addr !50
%24 = icmp eq i64 %0, %23, !insn.addr !50
store i64 0, i64* %rax.0.reg2mem, !insn.addr !51
br i1 %24, label %dec_label_pc_286, label %dec_label_pc_281, !insn.addr !51
dec_label_pc_281: ; preds = %dec_label_pc_25f
%25 = call i64 @__stack_chk_fail(), !insn.addr !52
store i64 %25, i64* %rax.0.reg2mem, !insn.addr !52
br label %dec_label_pc_286, !insn.addr !52
dec_label_pc_286: ; preds = %dec_label_pc_281, %dec_label_pc_25f
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !53
}
define i64 @goodG2B2() local_unnamed_addr {
dec_label_pc_288:
%rax.0.reg2mem = alloca i64, !insn.addr !54
%storemerge1.reg2mem = alloca i64, !insn.addr !54
%stack_var_-824 = alloca i64, align 8
%stack_var_-856 = alloca i64, align 8
%stack_var_-8 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !55
%1 = call i64 @_GLOBAL_OFFSET_TABLE_.1(), !insn.addr !56
%2 = trunc i64 %1 to i32, !insn.addr !57
%3 = icmp eq i32 %2, 0, !insn.addr !57
br i1 %3, label %dec_label_pc_330, label %dec_label_pc_322, !insn.addr !58
dec_label_pc_322: ; preds = %dec_label_pc_288
%4 = ptrtoint i64* %stack_var_-856 to i64, !insn.addr !59
%5 = add i64 %4, -1217, !insn.addr !60
%6 = and i64 %5, -16, !insn.addr !61
store i64 %6, i64* %stack_var_-856, align 8, !insn.addr !62
br label %dec_label_pc_330, !insn.addr !62
dec_label_pc_330: ; preds = %dec_label_pc_322, %dec_label_pc_288
%7 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !63
%8 = bitcast i64* %stack_var_-824 to i8*, !insn.addr !64
call void @__asm_rep_stosq_memset(i8* nonnull %8, i64 0, i64 100), !insn.addr !64
%9 = add i64 %7, -816, !insn.addr !65
store i64 0, i64* %storemerge1.reg2mem
br label %dec_label_pc_354
dec_label_pc_354: ; preds = %dec_label_pc_354, %dec_label_pc_330
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%10 = mul i64 %storemerge1.reload, 8, !insn.addr !66
%11 = load i64, i64* %stack_var_-856, align 8, !insn.addr !67
%12 = add i64 %11, %10, !insn.addr !68
%13 = add i64 %9, %10, !insn.addr !65
%14 = inttoptr i64 %13 to i64*, !insn.addr !65
%15 = load i64, i64* %14, align 8, !insn.addr !65
%16 = inttoptr i64 %12 to i64*, !insn.addr !69
store i64 %15, i64* %16, align 8, !insn.addr !69
%17 = add nuw nsw i64 %storemerge1.reload, 1, !insn.addr !70
%exitcond = icmp eq i64 %17, 100
store i64 %17, i64* %storemerge1.reg2mem, !insn.addr !71
br i1 %exitcond, label %dec_label_pc_391, label %dec_label_pc_354, !insn.addr !71
dec_label_pc_391: ; preds = %dec_label_pc_354
%18 = load i64, i64* %stack_var_-856, align 8, !insn.addr !72
%19 = inttoptr i64 %18 to i64*, !insn.addr !73
%20 = load i64, i64* %19, align 8, !insn.addr !73
%21 = call i64 @printLongLongLine(i64 %20), !insn.addr !74
%22 = call i64 @__readfsqword(i64 40), !insn.addr !75
%23 = icmp eq i64 %0, %22, !insn.addr !75
store i64 0, i64* %rax.0.reg2mem, !insn.addr !76
br i1 %23, label %dec_label_pc_3b8, label %dec_label_pc_3b3, !insn.addr !76
dec_label_pc_3b3: ; preds = %dec_label_pc_391
%24 = call i64 @__stack_chk_fail(), !insn.addr !77
store i64 %24, i64* %rax.0.reg2mem, !insn.addr !77
br label %dec_label_pc_3b8, !insn.addr !77
dec_label_pc_3b8: ; preds = %dec_label_pc_3b3, %dec_label_pc_391
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !78
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_08_good() local_unnamed_addr {
dec_label_pc_3ba:
%0 = call i64 @goodG2B1(), !insn.addr !79
%1 = call i64 @goodG2B2(), !insn.addr !80
ret i64 %1, !insn.addr !81
}
declare i64 @printLongLongLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @printLine(i8*) local_unnamed_addr
declare void @__asm_rep_stosq_memset(i8*, i64, i64) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 10}
!1 = !{i64 21}
!2 = !{i64 22}
!3 = !{i64 33}
!4 = !{i64 167}
!5 = !{i64 172}
!6 = !{i64 174}
!7 = !{i64 26}
!8 = !{i64 86}
!9 = !{i64 90}
!10 = !{i64 183}
!11 = !{i64 23}
!12 = !{i64 210}
!13 = !{i64 258}
!14 = !{i64 233}
!15 = !{i64 241}
!16 = !{i64 248}
!17 = !{i64 266}
!18 = !{i64 269}
!19 = !{i64 285}
!20 = !{i64 287}
!21 = !{i64 294}
!22 = !{i64 300}
!23 = !{i64 310}
!24 = !{i64 319}
!25 = !{i64 321}
!26 = !{i64 327}
!27 = !{i64 328}
!28 = !{i64 339}
!29 = !{i64 473}
!30 = !{i64 478}
!31 = !{i64 480}
!32 = !{i64 489}
!33 = !{i64 494}
!34 = !{i64 332}
!35 = !{i64 449}
!36 = !{i64 453}
!37 = !{i64 503}
!38 = !{i64 329}
!39 = !{i64 530}
!40 = !{i64 578}
!41 = !{i64 553}
!42 = !{i64 561}
!43 = !{i64 568}
!44 = !{i64 586}
!45 = !{i64 589}
!46 = !{i64 605}
!47 = !{i64 607}
!48 = !{i64 614}
!49 = !{i64 620}
!50 = !{i64 630}
!51 = !{i64 639}
!52 = !{i64 641}
!53 = !{i64 647}
!54 = !{i64 648}
!55 = !{i64 659}
!56 = !{i64 793}
!57 = !{i64 798}
!58 = !{i64 800}
!59 = !{i64 652}
!60 = !{i64 769}
!61 = !{i64 773}
!62 = !{i64 809}
!63 = !{i64 649}
!64 = !{i64 836}
!65 = !{i64 884}
!66 = !{i64 859}
!67 = !{i64 867}
!68 = !{i64 874}
!69 = !{i64 892}
!70 = !{i64 895}
!71 = !{i64 911}
!72 = !{i64 913}
!73 = !{i64 920}
!74 = !{i64 926}
!75 = !{i64 936}
!76 = !{i64 945}
!77 = !{i64 947}
!78 = !{i64 953}
!79 = !{i64 963}
!80 = !{i64 973}
!81 = !{i64 980}
### Assistant: @.str = private unnamed_addr constant [21 x i8] c"Benign, fixed string\00", align 1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_08_bad() #0 {
entry:
%data = alloca i64*, align 8
%dataBadBuffer = alloca i64*, align 8
%dataGoodBuffer = alloca i64*, align 8
%source = alloca [100 x i64], align 16
%i = alloca i64, align 8
%0 = alloca i8, i64 400, align 16
%1 = bitcast i8* %0 to i64*
store i64* %1, i64** %dataBadBuffer, align 8
%2 = alloca i8, i64 800, align 16
%3 = bitcast i8* %2 to i64*
store i64* %3, i64** %dataGoodBuffer, align 8
%call = call i32 @staticReturnsTrue()
%tobool = icmp ne i32 %call, 0
br i1 %tobool, label %if.then, label %if.end
if.then: ; preds = %entry
%4 = load i64*, i64** %dataBadBuffer, align 8
store i64* %4, i64** %data, align 8
br label %if.end
if.end: ; preds = %if.then, %entry
%5 = bitcast [100 x i64]* %source to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %5, i8 0, i64 800, i1 false)
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %if.end
%6 = load i64, i64* %i, align 8
%cmp = icmp ult i64 %6, 100
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%7 = load i64, i64* %i, align 8
%arrayidx = getelementptr inbounds [100 x i64], [100 x i64]* %source, i64 0, i64 %7
%8 = load i64, i64* %arrayidx, align 8
%9 = load i64*, i64** %data, align 8
%10 = load i64, i64* %i, align 8
%arrayidx1 = getelementptr inbounds i64, i64* %9, i64 %10
store i64 %8, i64* %arrayidx1, align 8
br label %for.inc
for.inc: ; preds = %for.body
%11 = load i64, i64* %i, align 8
%inc = add i64 %11, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%12 = load i64*, i64** %data, align 8
%arrayidx2 = getelementptr inbounds i64, i64* %12, i64 0
%13 = load i64, i64* %arrayidx2, align 8
call void @printLongLongLine(i64 %13)
ret void
}
; Function Attrs: argmemonly nounwind willreturn writeonly
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #1
declare dso_local void @printLongLongLine(i64) #2
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_08_good() #0 {
entry:
call void @goodG2B1()
call void @goodG2B2()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal i32 @staticReturnsTrue() #0 {
entry:
ret i32 1
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B1() #0 {
entry:
%data = alloca i64*, align 8
%dataBadBuffer = alloca i64*, align 8
%dataGoodBuffer = alloca i64*, align 8
%source = alloca [100 x i64], align 16
%i = alloca i64, align 8
%0 = alloca i8, i64 400, align 16
%1 = bitcast i8* %0 to i64*
store i64* %1, i64** %dataBadBuffer, align 8
%2 = alloca i8, i64 800, align 16
%3 = bitcast i8* %2 to i64*
store i64* %3, i64** %dataGoodBuffer, align 8
%call = call i32 @staticReturnsFalse()
%tobool = icmp ne i32 %call, 0
br i1 %tobool, label %if.then, label %if.else
if.then: ; preds = %entry
call void @printLine(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
br label %if.end
if.else: ; preds = %entry
%4 = load i64*, i64** %dataGoodBuffer, align 8
store i64* %4, i64** %data, align 8
br label %if.end
if.end: ; preds = %if.else, %if.then
%5 = bitcast [100 x i64]* %source to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %5, i8 0, i64 800, i1 false)
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %if.end
%6 = load i64, i64* %i, align 8
%cmp = icmp ult i64 %6, 100
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%7 = load i64, i64* %i, align 8
%arrayidx = getelementptr inbounds [100 x i64], [100 x i64]* %source, i64 0, i64 %7
%8 = load i64, i64* %arrayidx, align 8
%9 = load i64*, i64** %data, align 8
%10 = load i64, i64* %i, align 8
%arrayidx1 = getelementptr inbounds i64, i64* %9, i64 %10
store i64 %8, i64* %arrayidx1, align 8
br label %for.inc
for.inc: ; preds = %for.body
%11 = load i64, i64* %i, align 8
%inc = add i64 %11, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%12 = load i64*, i64** %data, align 8
%arrayidx2 = getelementptr inbounds i64, i64* %12, i64 0
%13 = load i64, i64* %arrayidx2, align 8
call void @printLongLongLine(i64 %13)
ret void
}
declare dso_local void @printLine(i8*) #2
; Function Attrs: noinline nounwind optnone uwtable
define internal i32 @staticReturnsFalse() #0 {
entry:
ret i32 0
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B2() #0 {
entry:
%data = alloca i64*, align 8
%dataBadBuffer = alloca i64*, align 8
%dataGoodBuffer = alloca i64*, align 8
%source = alloca [100 x i64], align 16
%i = alloca i64, align 8
%0 = alloca i8, i64 400, align 16
%1 = bitcast i8* %0 to i64*
store i64* %1, i64** %dataBadBuffer, align 8
%2 = alloca i8, i64 800, align 16
%3 = bitcast i8* %2 to i64*
store i64* %3, i64** %dataGoodBuffer, align 8
%call = call i32 @staticReturnsTrue()
%tobool = icmp ne i32 %call, 0
br i1 %tobool, label %if.then, label %if.end
if.then: ; preds = %entry
%4 = load i64*, i64** %dataGoodBuffer, align 8
store i64* %4, i64** %data, align 8
br label %if.end
if.end: ; preds = %if.then, %entry
%5 = bitcast [100 x i64]* %source to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %5, i8 0, i64 800, i1 false)
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %if.end
%6 = load i64, i64* %i, align 8
%cmp = icmp ult i64 %6, 100
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%7 = load i64, i64* %i, align 8
%arrayidx = getelementptr inbounds [100 x i64], [100 x i64]* %source, i64 0, i64 %7
%8 = load i64, i64* %arrayidx, align 8
%9 = load i64*, i64** %data, align 8
%10 = load i64, i64* %i, align 8
%arrayidx1 = getelementptr inbounds i64, i64* %9, i64 %10
store i64 %8, i64* %arrayidx1, align 8
br label %for.inc
for.inc: ; preds = %for.body
%11 = load i64, i64* %i, align 8
%inc = add i64 %11, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%12 = load i64*, i64** %data, align 8
%arrayidx2 = getelementptr inbounds i64, i64* %12, i64 0
%13 = load i64, i64* %arrayidx2, align 8
call void @printLongLongLine(i64 %13)
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" }
attributes #1 = { argmemonly nounwind willreturn writeonly }
attributes #2 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_f = constant [3 x i8] c"%(\00"
@global_var_10 = constant i64 -556888036579737560
@global_var_3aa = constant [21 x i8] c"Benign, fixed string\00"
@global_var_480 = local_unnamed_addr global i32 0
@global_var_4a8 = local_unnamed_addr global i32 0
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
ret i64 sub (i64 ptrtoint (i64* @global_var_10 to i64), i64 1), !insn.addr !1
}
define i64 @function_31(i64 %arg1, i64 %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_31:
%0 = alloca i64
%.reg2mem = alloca i64, !insn.addr !2
%storemerge1.reg2mem = alloca i64, !insn.addr !2
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = load i64, i64* %0
%4 = trunc i64 %3 to i8
%5 = mul i8 %4, 2, !insn.addr !2
%6 = inttoptr i64 %3 to i8*, !insn.addr !2
store i8 %5, i8* %6, align 1, !insn.addr !2
%7 = udiv i64 %3, %arg2
%8 = mul i64 %7, ptrtoint (i64* @global_var_10 to i64), !insn.addr !3
%9 = sub i64 %2, %8, !insn.addr !4
%10 = add i64 %9, ptrtoint ([3 x i8]* @global_var_f to i64), !insn.addr !5
%11 = and i64 %10, -16, !insn.addr !6
%12 = add i64 %1, -832, !insn.addr !7
%13 = inttoptr i64 %12 to i64*, !insn.addr !7
store i64 %11, i64* %13, align 8, !insn.addr !7
%14 = add i64 %9, add (i64 ptrtoint ([3 x i8]* @global_var_f to i64), i64 sub (i64 0, i64 trunc (i128 mul (i128 sext (i64 trunc (i128 udiv (i128 zext (i64 add (i64 sub (i64 ptrtoint (i64* @global_var_10 to i64), i64 1), i64 815) to i128), i128 zext (i64 ptrtoint (i64* @global_var_10 to i64) to i128)) to i64) to i128), i128 ptrtoint (i64* @global_var_10 to i128)) to i64))), !insn.addr !8
%15 = and i64 %14, -16, !insn.addr !9
%16 = add i64 %1, -824, !insn.addr !10
%17 = inttoptr i64 %16 to i64*, !insn.addr !10
store i64 %15, i64* %17, align 8, !insn.addr !10
%18 = load i32, i32* @global_var_480, align 4, !insn.addr !11
%19 = icmp eq i32 %18, 0, !insn.addr !12
br i1 %19, label %dec_label_pc_a4, label %dec_label_pc_96, !insn.addr !13
dec_label_pc_96: ; preds = %dec_label_pc_31
%20 = load i64, i64* %13, align 8, !insn.addr !14
%21 = add i64 %1, -848, !insn.addr !15
%22 = inttoptr i64 %21 to i64*, !insn.addr !15
store i64 %20, i64* %22, align 8, !insn.addr !15
br label %dec_label_pc_a4, !insn.addr !15
dec_label_pc_a4: ; preds = %dec_label_pc_96, %dec_label_pc_31
%23 = add i64 %1, -840, !insn.addr !16
%24 = inttoptr i64 %23 to i64*, !insn.addr !16
store i64 0, i64* %24, align 8
%25 = add i64 %1, -816
%26 = add i64 %1, -812, !insn.addr !17
store i64 0, i64* %storemerge1.reg2mem
br label %dec_label_pc_b1
dec_label_pc_b1: ; preds = %dec_label_pc_a4, %dec_label_pc_b1
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%27 = mul i64 %storemerge1.reload, 8, !insn.addr !18
%28 = add i64 %27, %25, !insn.addr !18
%29 = inttoptr i64 %28 to i32*, !insn.addr !18
store i32 0, i32* %29, align 4, !insn.addr !18
%30 = load i64, i64* %24, align 8, !insn.addr !19
%31 = mul i64 %30, 8, !insn.addr !17
%32 = add i64 %26, %31, !insn.addr !17
%33 = inttoptr i64 %32 to i32*, !insn.addr !17
store i32 0, i32* %33, align 4, !insn.addr !17
%34 = load i64, i64* %24, align 8, !insn.addr !20
%35 = add i64 %34, 1, !insn.addr !20
store i64 %35, i64* %24, align 8
%36 = icmp ult i64 %35, 100
store i64 %35, i64* %storemerge1.reg2mem, !insn.addr !21
br i1 %36, label %dec_label_pc_b1, label %dec_label_pc_e7, !insn.addr !21
dec_label_pc_e7: ; preds = %dec_label_pc_b1
%37 = add i64 %1, -848, !insn.addr !22
%38 = inttoptr i64 %37 to i64*, !insn.addr !22
%39 = load i64, i64* %38, align 8, !insn.addr !22
%40 = call i64 @memcpy(i64 %39, i64 %25, i64 800, i64 %25), !insn.addr !23
%41 = load i64, i64* %38, align 8, !insn.addr !24
%42 = call i64 @printStructLine(i64 %41), !insn.addr !25
%43 = add i64 %1, -8, !insn.addr !26
%44 = inttoptr i64 %43 to i64*, !insn.addr !26
%45 = load i64, i64* %44, align 8, !insn.addr !26
%46 = call i64 @__readfsqword(i64 40), !insn.addr !27
%47 = icmp eq i64 %46, %45, !insn.addr !27
store i64 0, i64* %.reg2mem, !insn.addr !28
br i1 %47, label %dec_label_pc_129, label %dec_label_pc_124, !insn.addr !28
dec_label_pc_124: ; preds = %dec_label_pc_e7
%48 = call i64 @__stack_chk_fail(), !insn.addr !29
store i64 %48, i64* %.reg2mem, !insn.addr !29
br label %dec_label_pc_129, !insn.addr !29
dec_label_pc_129: ; preds = %dec_label_pc_124, %dec_label_pc_e7
%.reload = load i64, i64* %.reg2mem, !insn.addr !30
ret i64 %.reload, !insn.addr !30
}
define i64 @goodG2B1() local_unnamed_addr {
dec_label_pc_12b:
%rax.0.reg2mem = alloca i64, !insn.addr !31
%storemerge1.reg2mem = alloca i64, !insn.addr !31
%stack_var_-824 = alloca i64, align 8
%stack_var_-856 = alloca i64, align 8
%stack_var_-8 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !32
%1 = load i32, i32* @global_var_4a8, align 4, !insn.addr !33
%2 = icmp eq i32 %1, 0, !insn.addr !34
br i1 %2, label %dec_label_pc_1cf, label %dec_label_pc_1c1, !insn.addr !35
dec_label_pc_1c1: ; preds = %dec_label_pc_12b
%3 = call i64 @printLine(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @global_var_3aa, i64 0, i64 0), i64* nonnull @global_var_10, i128 sext (i64 trunc (i128 urem (i128 zext (i64 add (i64 sub (i64 ptrtoint (i64* @global_var_10 to i64), i64 1), i64 815) to i128), i128 zext (i64 ptrtoint (i64* @global_var_10 to i64) to i128)) to i64) to i128), i64* nonnull @global_var_10), !insn.addr !36
br label %dec_label_pc_1dd, !insn.addr !37
dec_label_pc_1cf: ; preds = %dec_label_pc_12b
%4 = ptrtoint i64* %stack_var_-856 to i64, !insn.addr !38
%5 = add i64 %4, add (i64 ptrtoint ([3 x i8]* @global_var_f to i64), i64 add (i64 sub (i64 0, i64 trunc (i128 mul (i128 sext (i64 trunc (i128 udiv (i128 zext (i64 add (i64 sub (i64 ptrtoint (i64* @global_var_10 to i64), i64 1), i64 815) to i128), i128 zext (i64 ptrtoint (i64* @global_var_10 to i64) to i128)) to i64) to i128), i128 ptrtoint (i64* @global_var_10 to i128)) to i64)), i64 sub (i64 0, i64 trunc (i128 mul (i128 sext (i64 trunc (i128 udiv (i128 zext (i64 add (i64 sub (i64 ptrtoint (i64* @global_var_10 to i64), i64 1), i64 415) to i128), i128 zext (i64 ptrtoint (i64* @global_var_10 to i64) to i128)) to i64) to i128), i128 ptrtoint (i64* @global_var_10 to i128)) to i64)))), !insn.addr !39
%6 = and i64 %5, -16, !insn.addr !40
store i64 %6, i64* %stack_var_-856, align 8, !insn.addr !41
br label %dec_label_pc_1dd, !insn.addr !41
dec_label_pc_1dd: ; preds = %dec_label_pc_1cf, %dec_label_pc_1c1
%7 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !42
store i64 0, i64* %storemerge1.reg2mem
br label %dec_label_pc_1ea
dec_label_pc_1ea: ; preds = %dec_label_pc_1ea, %dec_label_pc_1dd
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%8 = mul i64 %storemerge1.reload, 8, !insn.addr !43
%9 = add i64 %8, %7
%10 = add i64 %9, -816, !insn.addr !43
%11 = inttoptr i64 %10 to i32*, !insn.addr !43
store i32 0, i32* %11, align 8, !insn.addr !43
%12 = add i64 %9, -812, !insn.addr !44
%13 = inttoptr i64 %12 to i32*, !insn.addr !44
store i32 0, i32* %13, align 4, !insn.addr !44
%14 = add nuw nsw i64 %storemerge1.reload, 1, !insn.addr !45
%exitcond = icmp eq i64 %14, 100
store i64 %14, i64* %storemerge1.reg2mem, !insn.addr !46
br i1 %exitcond, label %dec_label_pc_220, label %dec_label_pc_1ea, !insn.addr !46
dec_label_pc_220: ; preds = %dec_label_pc_1ea
%15 = ptrtoint i64* %stack_var_-824 to i64, !insn.addr !47
%16 = load i64, i64* %stack_var_-856, align 8, !insn.addr !48
%17 = call i64 @memcpy(i64 %16, i64 %15, i64 800, i64 %15), !insn.addr !49
%18 = load i64, i64* %stack_var_-856, align 8, !insn.addr !50
%19 = call i64 @printStructLine(i64 %18), !insn.addr !51
%20 = call i64 @__readfsqword(i64 40), !insn.addr !52
%21 = icmp eq i64 %0, %20, !insn.addr !52
store i64 0, i64* %rax.0.reg2mem, !insn.addr !53
br i1 %21, label %dec_label_pc_262, label %dec_label_pc_25d, !insn.addr !53
dec_label_pc_25d: ; preds = %dec_label_pc_220
%22 = call i64 @__stack_chk_fail(), !insn.addr !54
store i64 %22, i64* %rax.0.reg2mem, !insn.addr !54
br label %dec_label_pc_262, !insn.addr !54
dec_label_pc_262: ; preds = %dec_label_pc_25d, %dec_label_pc_220
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !55
}
define i64 @goodG2B2() local_unnamed_addr {
dec_label_pc_264:
%rax.0.reg2mem = alloca i64, !insn.addr !56
%storemerge1.reg2mem = alloca i64, !insn.addr !56
%stack_var_-824 = alloca i64, align 8
%stack_var_-856 = alloca i64, align 8
%stack_var_-8 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !57
%1 = load i32, i32* @global_var_480, align 4, !insn.addr !58
%2 = icmp eq i32 %1, 0, !insn.addr !59
br i1 %2, label %dec_label_pc_308, label %dec_label_pc_2fa, !insn.addr !60
dec_label_pc_2fa: ; preds = %dec_label_pc_264
%3 = ptrtoint i64* %stack_var_-856 to i64, !insn.addr !61
%4 = add i64 %3, add (i64 ptrtoint ([3 x i8]* @global_var_f to i64), i64 add (i64 sub (i64 0, i64 trunc (i128 mul (i128 sext (i64 trunc (i128 udiv (i128 zext (i64 add (i64 sub (i64 ptrtoint (i64* @global_var_10 to i64), i64 1), i64 815) to i128), i128 zext (i64 ptrtoint (i64* @global_var_10 to i64) to i128)) to i64) to i128), i128 ptrtoint (i64* @global_var_10 to i128)) to i64)), i64 sub (i64 0, i64 trunc (i128 mul (i128 sext (i64 trunc (i128 udiv (i128 zext (i64 add (i64 sub (i64 ptrtoint (i64* @global_var_10 to i64), i64 1), i64 415) to i128), i128 zext (i64 ptrtoint (i64* @global_var_10 to i64) to i128)) to i64) to i128), i128 ptrtoint (i64* @global_var_10 to i128)) to i64)))), !insn.addr !62
%5 = and i64 %4, -16, !insn.addr !63
store i64 %5, i64* %stack_var_-856, align 8, !insn.addr !64
br label %dec_label_pc_308, !insn.addr !64
dec_label_pc_308: ; preds = %dec_label_pc_2fa, %dec_label_pc_264
%6 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !65
store i64 0, i64* %storemerge1.reg2mem
br label %dec_label_pc_315
dec_label_pc_315: ; preds = %dec_label_pc_315, %dec_label_pc_308
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%7 = mul i64 %storemerge1.reload, 8, !insn.addr !66
%8 = add i64 %7, %6
%9 = add i64 %8, -816, !insn.addr !66
%10 = inttoptr i64 %9 to i32*, !insn.addr !66
store i32 0, i32* %10, align 8, !insn.addr !66
%11 = add i64 %8, -812, !insn.addr !67
%12 = inttoptr i64 %11 to i32*, !insn.addr !67
store i32 0, i32* %12, align 4, !insn.addr !67
%13 = add nuw nsw i64 %storemerge1.reload, 1, !insn.addr !68
%exitcond = icmp eq i64 %13, 100
store i64 %13, i64* %storemerge1.reg2mem, !insn.addr !69
br i1 %exitcond, label %dec_label_pc_34b, label %dec_label_pc_315, !insn.addr !69
dec_label_pc_34b: ; preds = %dec_label_pc_315
%14 = ptrtoint i64* %stack_var_-824 to i64, !insn.addr !70
%15 = load i64, i64* %stack_var_-856, align 8, !insn.addr !71
%16 = call i64 @memcpy(i64 %15, i64 %14, i64 800, i64 %14), !insn.addr !72
%17 = load i64, i64* %stack_var_-856, align 8, !insn.addr !73
%18 = call i64 @printStructLine(i64 %17), !insn.addr !74
%19 = call i64 @__readfsqword(i64 40), !insn.addr !75
%20 = icmp eq i64 %0, %19, !insn.addr !75
store i64 0, i64* %rax.0.reg2mem, !insn.addr !76
br i1 %20, label %dec_label_pc_38d, label %dec_label_pc_388, !insn.addr !76
dec_label_pc_388: ; preds = %dec_label_pc_34b
%21 = call i64 @__stack_chk_fail(), !insn.addr !77
store i64 %21, i64* %rax.0.reg2mem, !insn.addr !77
br label %dec_label_pc_38d, !insn.addr !77
dec_label_pc_38d: ; preds = %dec_label_pc_388, %dec_label_pc_34b
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !78
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_alloca_memcpy_09_good() local_unnamed_addr {
dec_label_pc_38f:
%0 = call i64 @goodG2B1(), !insn.addr !79
%1 = call i64 @goodG2B2(), !insn.addr !80
ret i64 %1, !insn.addr !81
}
declare i64 @memcpy(i64, i64, i64, i64) local_unnamed_addr
declare i64 @printStructLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @printLine(i8*, i64*, i128, i64*) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 11}
!1 = !{i64 31}
!2 = !{i64 49}
!3 = !{i64 54}
!4 = !{i64 58}
!5 = !{i64 64}
!6 = !{i64 68}
!7 = !{i64 76}
!8 = !{i64 121}
!9 = !{i64 125}
!10 = !{i64 133}
!11 = !{i64 140}
!12 = !{i64 146}
!13 = !{i64 148}
!14 = !{i64 150}
!15 = !{i64 157}
!16 = !{i64 164}
!17 = !{i64 202}
!18 = !{i64 184}
!19 = !{i64 195}
!20 = !{i64 213}
!21 = !{i64 229}
!22 = !{i64 238}
!23 = !{i64 256}
!24 = !{i64 261}
!25 = !{i64 271}
!26 = !{i64 277}
!27 = !{i64 281}
!28 = !{i64 290}
!29 = !{i64 292}
!30 = !{i64 298}
!31 = !{i64 299}
!32 = !{i64 310}
!33 = !{i64 439}
!34 = !{i64 445}
!35 = !{i64 447}
!36 = !{i64 456}
!37 = !{i64 461}
!38 = !{i64 303}
!39 = !{i64 420}
!40 = !{i64 424}
!41 = !{i64 470}
!42 = !{i64 300}
!43 = !{i64 497}
!44 = !{i64 515}
!45 = !{i64 526}
!46 = !{i64 542}
!47 = !{i64 544}
!48 = !{i64 551}
!49 = !{i64 569}
!50 = !{i64 574}
!51 = !{i64 584}
!52 = !{i64 594}
!53 = !{i64 603}
!54 = !{i64 605}
!55 = !{i64 611}
!56 = !{i64 612}
!57 = !{i64 623}
!58 = !{i64 752}
!59 = !{i64 758}
!60 = !{i64 760}
!61 = !{i64 616}
!62 = !{i64 733}
!63 = !{i64 737}
!64 = !{i64 769}
!65 = !{i64 613}
!66 = !{i64 796}
!67 = !{i64 814}
!68 = !{i64 825}
!69 = !{i64 841}
!70 = !{i64 843}
!71 = !{i64 850}
!72 = !{i64 868}
!73 = !{i64 873}
!74 = !{i64 883}
!75 = !{i64 893}
!76 = !{i64 902}
!77 = !{i64 904}
!78 = !{i64 910}
!79 = !{i64 920}
!80 = !{i64 930}
!81 = !{i64 937}
### Assistant: %struct._twoIntsStruct = type { i32, i32 }
@GLOBAL_CONST_TRUE = external dso_local constant i32, align 4
@GLOBAL_CONST_FALSE = external dso_local constant i32, align 4
@.str = private unnamed_addr constant [21 x i8] c"Benign, fixed string\00", align 1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_alloca_memcpy_09_bad() #0 {
entry:
%data = alloca %struct._twoIntsStruct*, align 8
%dataBadBuffer = alloca %struct._twoIntsStruct*, align 8
%dataGoodBuffer = alloca %struct._twoIntsStruct*, align 8
%source = alloca [100 x %struct._twoIntsStruct], align 16
%i = alloca i64, align 8
%0 = alloca i8, i64 400, align 16
%1 = bitcast i8* %0 to %struct._twoIntsStruct*
store %struct._twoIntsStruct* %1, %struct._twoIntsStruct** %dataBadBuffer, align 8
%2 = alloca i8, i64 800, align 16
%3 = bitcast i8* %2 to %struct._twoIntsStruct*
store %struct._twoIntsStruct* %3, %struct._twoIntsStruct** %dataGoodBuffer, align 8
%4 = load i32, i32* @GLOBAL_CONST_TRUE, align 4
%tobool = icmp ne i32 %4, 0
br i1 %tobool, label %if.then, label %if.end
if.then: ; preds = %entry
%5 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %dataBadBuffer, align 8
store %struct._twoIntsStruct* %5, %struct._twoIntsStruct** %data, align 8
br label %if.end
if.end: ; preds = %if.then, %entry
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %if.end
%6 = load i64, i64* %i, align 8
%cmp = icmp ult i64 %6, 100
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%7 = load i64, i64* %i, align 8
%arrayidx = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %7
%intOne = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %arrayidx, i32 0, i32 0
store i32 0, i32* %intOne, align 8
%8 = load i64, i64* %i, align 8
%arrayidx1 = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %8
%intTwo = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %arrayidx1, i32 0, i32 1
store i32 0, i32* %intTwo, align 4
br label %for.inc
for.inc: ; preds = %for.body
%9 = load i64, i64* %i, align 8
%inc = add i64 %9, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%10 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data, align 8
%11 = bitcast %struct._twoIntsStruct* %10 to i8*
%arraydecay = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 0
%12 = bitcast %struct._twoIntsStruct* %arraydecay to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 %11, i8* align 16 %12, i64 800, i1 false)
%13 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data, align 8
%arrayidx2 = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %13, i64 0
call void @printStructLine(%struct._twoIntsStruct* %arrayidx2)
ret void
}
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #1
declare dso_local void @printStructLine(%struct._twoIntsStruct*) #2
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_alloca_memcpy_09_good() #0 {
entry:
call void @goodG2B1()
call void @goodG2B2()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B1() #0 {
entry:
%data = alloca %struct._twoIntsStruct*, align 8
%dataBadBuffer = alloca %struct._twoIntsStruct*, align 8
%dataGoodBuffer = alloca %struct._twoIntsStruct*, align 8
%source = alloca [100 x %struct._twoIntsStruct], align 16
%i = alloca i64, align 8
%0 = alloca i8, i64 400, align 16
%1 = bitcast i8* %0 to %struct._twoIntsStruct*
store %struct._twoIntsStruct* %1, %struct._twoIntsStruct** %dataBadBuffer, align 8
%2 = alloca i8, i64 800, align 16
%3 = bitcast i8* %2 to %struct._twoIntsStruct*
store %struct._twoIntsStruct* %3, %struct._twoIntsStruct** %dataGoodBuffer, align 8
%4 = load i32, i32* @GLOBAL_CONST_FALSE, align 4
%tobool = icmp ne i32 %4, 0
br i1 %tobool, label %if.then, label %if.else
if.then: ; preds = %entry
call void @printLine(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
br label %if.end
if.else: ; preds = %entry
%5 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %dataGoodBuffer, align 8
store %struct._twoIntsStruct* %5, %struct._twoIntsStruct** %data, align 8
br label %if.end
if.end: ; preds = %if.else, %if.then
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %if.end
%6 = load i64, i64* %i, align 8
%cmp = icmp ult i64 %6, 100
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%7 = load i64, i64* %i, align 8
%arrayidx = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %7
%intOne = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %arrayidx, i32 0, i32 0
store i32 0, i32* %intOne, align 8
%8 = load i64, i64* %i, align 8
%arrayidx1 = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %8
%intTwo = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %arrayidx1, i32 0, i32 1
store i32 0, i32* %intTwo, align 4
br label %for.inc
for.inc: ; preds = %for.body
%9 = load i64, i64* %i, align 8
%inc = add i64 %9, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%10 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data, align 8
%11 = bitcast %struct._twoIntsStruct* %10 to i8*
%arraydecay = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 0
%12 = bitcast %struct._twoIntsStruct* %arraydecay to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 %11, i8* align 16 %12, i64 800, i1 false)
%13 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data, align 8
%arrayidx2 = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %13, i64 0
call void @printStructLine(%struct._twoIntsStruct* %arrayidx2)
ret void
}
declare dso_local void @printLine(i8*) #2
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B2() #0 {
entry:
%data = alloca %struct._twoIntsStruct*, align 8
%dataBadBuffer = alloca %struct._twoIntsStruct*, align 8
%dataGoodBuffer = alloca %struct._twoIntsStruct*, align 8
%source = alloca [100 x %struct._twoIntsStruct], align 16
%i = alloca i64, align 8
%0 = alloca i8, i64 400, align 16
%1 = bitcast i8* %0 to %struct._twoIntsStruct*
store %struct._twoIntsStruct* %1, %struct._twoIntsStruct** %dataBadBuffer, align 8
%2 = alloca i8, i64 800, align 16
%3 = bitcast i8* %2 to %struct._twoIntsStruct*
store %struct._twoIntsStruct* %3, %struct._twoIntsStruct** %dataGoodBuffer, align 8
%4 = load i32, i32* @GLOBAL_CONST_TRUE, align 4
%tobool = icmp ne i32 %4, 0
br i1 %tobool, label %if.then, label %if.end
if.then: ; preds = %entry
%5 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %dataGoodBuffer, align 8
store %struct._twoIntsStruct* %5, %struct._twoIntsStruct** %data, align 8
br label %if.end
if.end: ; preds = %if.then, %entry
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %if.end
%6 = load i64, i64* %i, align 8
%cmp = icmp ult i64 %6, 100
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%7 = load i64, i64* %i, align 8
%arrayidx = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %7
%intOne = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %arrayidx, i32 0, i32 0
store i32 0, i32* %intOne, align 8
%8 = load i64, i64* %i, align 8
%arrayidx1 = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %8
%intTwo = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %arrayidx1, i32 0, i32 1
store i32 0, i32* %intTwo, align 4
br label %for.inc
for.inc: ; preds = %for.body
%9 = load i64, i64* %i, align 8
%inc = add i64 %9, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%10 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data, align 8
%11 = bitcast %struct._twoIntsStruct* %10 to i8*
%arraydecay = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 0
%12 = bitcast %struct._twoIntsStruct* %arraydecay to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 %11, i8* align 16 %12, i64 800, i1 false)
%13 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data, align 8
%arrayidx2 = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %13, i64 0
call void @printStructLine(%struct._twoIntsStruct* %arrayidx2)
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" }
attributes #1 = { argmemonly nounwind willreturn }
attributes #2 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
define i64 @_GLOBAL_OFFSET_TABLE_.1(i64 %arg1) local_unnamed_addr {
dec_label_pc_0:
%stack_var_-120 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
%1 = ptrtoint i64* %stack_var_-120 to i64, !insn.addr !1
ret i64 %1, !insn.addr !2
}
define i64 @function_30(i64 %arg1, i64 %arg2, i64 %arg3, i64 %arg4, i64 %arg5) local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !3
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = add i64 %2, -115, !insn.addr !4
%4 = inttoptr i64 %3 to i8*, !insn.addr !4
%5 = load i8, i8* %4, align 1, !insn.addr !4
%6 = trunc i64 %arg4 to i8, !insn.addr !4
%7 = add i8 %5, %6, !insn.addr !4
store i8 %7, i8* %4, align 1, !insn.addr !4
%8 = add i64 %1, -120, !insn.addr !5
%9 = inttoptr i64 %8 to i64*, !insn.addr !5
%10 = load i64, i64* %9, align 8, !insn.addr !5
%11 = call i64 @strncpy(i64 %10, i64 %arg4, i64 99, i64 %arg4), !insn.addr !6
%12 = load i64, i64* %9, align 8, !insn.addr !7
%13 = add i64 %12, 99, !insn.addr !8
%14 = inttoptr i64 %13 to i8*, !insn.addr !9
store i8 0, i8* %14, align 1, !insn.addr !9
%15 = load i64, i64* %9, align 8, !insn.addr !10
%16 = call i64 @printLine(i64 %15), !insn.addr !11
%17 = add i64 %1, -8, !insn.addr !12
%18 = inttoptr i64 %17 to i64*, !insn.addr !12
%19 = load i64, i64* %18, align 8, !insn.addr !12
%20 = call i64 @__readfsqword(i64 40), !insn.addr !13
%21 = icmp eq i64 %19, %20, !insn.addr !13
store i64 0, i64* %rax.0.reg2mem, !insn.addr !14
br i1 %21, label %dec_label_pc_79, label %dec_label_pc_74, !insn.addr !14
dec_label_pc_74: ; preds = %dec_label_pc_30
%22 = call i64 @__stack_chk_fail(), !insn.addr !15
store i64 %22, i64* %rax.0.reg2mem, !insn.addr !15
br label %dec_label_pc_79, !insn.addr !15
dec_label_pc_79: ; preds = %dec_label_pc_74, %dec_label_pc_30
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !16
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_ncpy_52c_goodG2BSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_7b:
%rax.0.reg2mem = alloca i64, !insn.addr !17
%stack_var_-120 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !18
%1 = call i64 @memset(i64* nonnull %stack_var_-120, i64 67, i64 99), !insn.addr !19
%2 = ptrtoint i64* %stack_var_-120 to i64, !insn.addr !20
%3 = call i64 @strncpy(i64 %arg1, i64 %2, i64 99, i64 %2), !insn.addr !21
%4 = add i64 %arg1, 99, !insn.addr !22
%5 = inttoptr i64 %4 to i8*, !insn.addr !23
store i8 0, i8* %5, align 1, !insn.addr !23
%6 = call i64 @printLine(i64 %arg1), !insn.addr !24
%7 = call i64 @__readfsqword(i64 40), !insn.addr !25
%8 = icmp eq i64 %0, %7, !insn.addr !25
store i64 0, i64* %rax.0.reg2mem, !insn.addr !26
br i1 %8, label %dec_label_pc_f4, label %dec_label_pc_ef, !insn.addr !26
dec_label_pc_ef: ; preds = %dec_label_pc_7b
%9 = call i64 @__stack_chk_fail(), !insn.addr !27
store i64 %9, i64* %rax.0.reg2mem, !insn.addr !27
br label %dec_label_pc_f4, !insn.addr !27
dec_label_pc_f4: ; preds = %dec_label_pc_ef, %dec_label_pc_7b
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !28
}
declare i64 @memset(i64*, i64, i64) local_unnamed_addr
declare i64 @strncpy(i64, i64, i64, i64) local_unnamed_addr
declare i64 @printLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 12}
!1 = !{i64 27}
!2 = !{i64 31}
!3 = !{i64 48}
!4 = !{i64 50}
!5 = !{i64 57}
!6 = !{i64 72}
!7 = !{i64 77}
!8 = !{i64 81}
!9 = !{i64 85}
!10 = !{i64 88}
!11 = !{i64 95}
!12 = !{i64 101}
!13 = !{i64 105}
!14 = !{i64 114}
!15 = !{i64 116}
!16 = !{i64 122}
!17 = !{i64 123}
!18 = !{i64 135}
!19 = !{i64 167}
!20 = !{i64 176}
!21 = !{i64 195}
!22 = !{i64 204}
!23 = !{i64 208}
!24 = !{i64 218}
!25 = !{i64 228}
!26 = !{i64 237}
!27 = !{i64 239}
!28 = !{i64 245}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_ncpy_52c_badSink(i8* %data) #0 {
entry:
%data.addr = alloca i8*, align 8
%source = alloca [100 x i8], align 16
store i8* %data, i8** %data.addr, align 8
%arraydecay = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
call void @llvm.memset.p0i8.i64(i8* align 16 %arraydecay, i8 67, i64 99, i1 false)
%arrayidx = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 99
store i8 0, i8* %arrayidx, align 1
%0 = load i8*, i8** %data.addr, align 8
%arraydecay1 = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
%call = call i8* @strncpy(i8* %0, i8* %arraydecay1, i64 99) #4
%1 = load i8*, i8** %data.addr, align 8
%arrayidx2 = getelementptr inbounds i8, i8* %1, i64 99
store i8 0, i8* %arrayidx2, align 1
%2 = load i8*, i8** %data.addr, align 8
call void @printLine(i8* %2)
ret void
}
; Function Attrs: argmemonly nounwind willreturn writeonly
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #1
; Function Attrs: nounwind
declare dso_local i8* @strncpy(i8*, i8*, i64) #2
declare dso_local void @printLine(i8*) #3
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_ncpy_52c_goodG2BSink(i8* %data) #0 {
entry:
%data.addr = alloca i8*, align 8
%source = alloca [100 x i8], align 16
store i8* %data, i8** %data.addr, align 8
%arraydecay = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
call void @llvm.memset.p0i8.i64(i8* align 16 %arraydecay, i8 67, i64 99, i1 false)
%arrayidx = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 99
store i8 0, i8* %arrayidx, align 1
%0 = load i8*, i8** %data.addr, align 8
%arraydecay1 = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
%call = call i8* @strncpy(i8* %0, i8* %arraydecay1, i64 99) #4
%1 = load i8*, i8** %data.addr, align 8
%arrayidx2 = getelementptr inbounds i8, i8* %1, i64 99
store i8 0, i8* %arrayidx2, align 1
%2 = load i8*, i8** %data.addr, align 8
call void @printLine(i8* %2)
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" }
attributes #1 = { argmemonly nounwind willreturn writeonly }
attributes #2 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #3 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_f = local_unnamed_addr constant [3 x i8] c"%(\00"
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%stack_var_-1224 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
%1 = ptrtoint i64* %stack_var_-1224 to i64, !insn.addr !1
ret i64 %1, !insn.addr !2
}
define i64 @function_30() local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !3
%storemerge12.reg2mem = alloca i64, !insn.addr !3
%storemerge3.reg2mem = alloca i64, !insn.addr !3
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = trunc i64 %2 to i32, !insn.addr !3
%4 = add i64 %1, -1232, !insn.addr !3
%5 = inttoptr i64 %4 to i32*, !insn.addr !3
store i32 %3, i32* %5, align 4, !insn.addr !3
%6 = inttoptr i64 %4 to i64*, !insn.addr !4
%7 = load i64, i64* %6, align 8, !insn.addr !4
%8 = add i64 %1, -1224, !insn.addr !5
%9 = inttoptr i64 %8 to i64*, !insn.addr !5
store i64 %7, i64* %9, align 8, !insn.addr !5
%10 = add i64 %1, -1256, !insn.addr !6
%11 = inttoptr i64 %10 to i64*, !insn.addr !6
store i64 0, i64* %11, align 8
%12 = add i64 %1, -816
%13 = add i64 %1, -812, !insn.addr !7
store i64 0, i64* %storemerge3.reg2mem
br label %dec_label_pc_51
dec_label_pc_51: ; preds = %dec_label_pc_30, %dec_label_pc_51
%storemerge3.reload = load i64, i64* %storemerge3.reg2mem
%14 = mul i64 %storemerge3.reload, 8, !insn.addr !8
%15 = add i64 %14, %12, !insn.addr !8
%16 = inttoptr i64 %15 to i32*, !insn.addr !8
store i32 0, i32* %16, align 4, !insn.addr !8
%17 = load i64, i64* %11, align 8, !insn.addr !9
%18 = mul i64 %17, 8, !insn.addr !7
%19 = add i64 %13, %18, !insn.addr !7
%20 = inttoptr i64 %19 to i32*, !insn.addr !7
store i32 0, i32* %20, align 4, !insn.addr !7
%21 = load i64, i64* %11, align 8, !insn.addr !10
%22 = add i64 %21, 1, !insn.addr !10
store i64 %22, i64* %11, align 8
%23 = icmp ult i64 %22, 100
store i64 %22, i64* %storemerge3.reg2mem, !insn.addr !11
br i1 %23, label %dec_label_pc_51, label %dec_label_pc_87, !insn.addr !11
dec_label_pc_87: ; preds = %dec_label_pc_51
%24 = add i64 %1, -1248, !insn.addr !12
%25 = inttoptr i64 %24 to i64*, !insn.addr !12
store i64 0, i64* %25, align 8
store i64 0, i64* %storemerge12.reg2mem
br label %dec_label_pc_94
dec_label_pc_94: ; preds = %dec_label_pc_87, %dec_label_pc_94
%storemerge12.reload = load i64, i64* %storemerge12.reg2mem
%26 = mul i64 %storemerge12.reload, 8, !insn.addr !13
%27 = load i64, i64* %9, align 8, !insn.addr !14
%28 = add i64 %27, %26, !insn.addr !15
%29 = add i64 %26, %12, !insn.addr !16
%30 = inttoptr i64 %29 to i64*, !insn.addr !16
%31 = load i64, i64* %30, align 8, !insn.addr !16
%32 = inttoptr i64 %28 to i64*, !insn.addr !17
store i64 %31, i64* %32, align 8, !insn.addr !17
%33 = load i64, i64* %25, align 8, !insn.addr !18
%34 = add i64 %33, 1, !insn.addr !18
store i64 %34, i64* %25, align 8
%35 = icmp ult i64 %34, 100
store i64 %34, i64* %storemerge12.reg2mem, !insn.addr !19
br i1 %35, label %dec_label_pc_94, label %dec_label_pc_d1, !insn.addr !19
dec_label_pc_d1: ; preds = %dec_label_pc_94
%36 = load i64, i64* %9, align 8, !insn.addr !20
%37 = call i64 @printStructLine(i64 %36), !insn.addr !21
%38 = add i64 %1, -8, !insn.addr !22
%39 = inttoptr i64 %38 to i64*, !insn.addr !22
%40 = load i64, i64* %39, align 8, !insn.addr !22
%41 = call i64 @__readfsqword(i64 40), !insn.addr !23
%42 = icmp eq i64 %40, %41, !insn.addr !23
store i64 0, i64* %rax.0.reg2mem, !insn.addr !24
br i1 %42, label %dec_label_pc_f5, label %dec_label_pc_f0, !insn.addr !24
dec_label_pc_f0: ; preds = %dec_label_pc_d1
%43 = call i64 @__stack_chk_fail(), !insn.addr !25
store i64 %43, i64* %rax.0.reg2mem, !insn.addr !25
br label %dec_label_pc_f5, !insn.addr !25
dec_label_pc_f5: ; preds = %dec_label_pc_f0, %dec_label_pc_d1
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !26
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_f7:
%rax.0.reg2mem = alloca i64, !insn.addr !27
%storemerge2.reg2mem = alloca i64, !insn.addr !27
%storemerge13.reg2mem = alloca i64, !insn.addr !27
%stack_var_-1624 = alloca i64, align 8
%stack_var_-8 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !28
%1 = call i64 @__readfsqword(i64 40), !insn.addr !29
%2 = add i64 %0, -816
%3 = add i64 %0, -812, !insn.addr !30
store i64 0, i64* %storemerge13.reg2mem
br label %dec_label_pc_148
dec_label_pc_148: ; preds = %dec_label_pc_148, %dec_label_pc_f7
%storemerge13.reload = load i64, i64* %storemerge13.reg2mem
%4 = mul i64 %storemerge13.reload, 8, !insn.addr !31
%5 = add i64 %4, %2, !insn.addr !31
%6 = inttoptr i64 %5 to i32*, !insn.addr !31
store i32 0, i32* %6, align 8, !insn.addr !31
%7 = add i64 %3, %4, !insn.addr !30
%8 = inttoptr i64 %7 to i32*, !insn.addr !30
store i32 0, i32* %8, align 4, !insn.addr !30
%9 = add nuw nsw i64 %storemerge13.reload, 1, !insn.addr !32
%exitcond4 = icmp eq i64 %9, 100
store i64 %9, i64* %storemerge13.reg2mem, !insn.addr !33
br i1 %exitcond4, label %dec_label_pc_1be.preheader, label %dec_label_pc_148, !insn.addr !33
dec_label_pc_1be.preheader: ; preds = %dec_label_pc_148
%10 = ptrtoint i64* %stack_var_-1624 to i64, !insn.addr !34
store i64 0, i64* %storemerge2.reg2mem
br label %dec_label_pc_18b
dec_label_pc_18b: ; preds = %dec_label_pc_18b, %dec_label_pc_1be.preheader
%storemerge2.reload = load i64, i64* %storemerge2.reg2mem
%11 = mul i64 %storemerge2.reload, 8, !insn.addr !35
%12 = add i64 %11, %10, !insn.addr !36
%13 = add i64 %11, %2, !insn.addr !37
%14 = inttoptr i64 %13 to i64*, !insn.addr !37
%15 = load i64, i64* %14, align 8, !insn.addr !37
%16 = inttoptr i64 %12 to i64*, !insn.addr !38
store i64 %15, i64* %16, align 8, !insn.addr !38
%17 = add nuw nsw i64 %storemerge2.reload, 1, !insn.addr !39
%exitcond = icmp eq i64 %17, 100
store i64 %17, i64* %storemerge2.reg2mem, !insn.addr !40
br i1 %exitcond, label %dec_label_pc_1c8, label %dec_label_pc_18b, !insn.addr !40
dec_label_pc_1c8: ; preds = %dec_label_pc_18b
%18 = call i64 @printStructLine(i64 %10), !insn.addr !41
%19 = call i64 @__readfsqword(i64 40), !insn.addr !42
%20 = icmp eq i64 %1, %19, !insn.addr !42
store i64 0, i64* %rax.0.reg2mem, !insn.addr !43
br i1 %20, label %dec_label_pc_1ec, label %dec_label_pc_1e7, !insn.addr !43
dec_label_pc_1e7: ; preds = %dec_label_pc_1c8
%21 = call i64 @__stack_chk_fail(), !insn.addr !44
store i64 %21, i64* %rax.0.reg2mem, !insn.addr !44
br label %dec_label_pc_1ec, !insn.addr !44
dec_label_pc_1ec: ; preds = %dec_label_pc_1e7, %dec_label_pc_1c8
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !45
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_loop_31_good() local_unnamed_addr {
dec_label_pc_1ee:
%0 = call i64 @goodG2B(), !insn.addr !46
ret i64 %0, !insn.addr !47
}
declare i64 @printStructLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 11}
!1 = !{i64 26}
!2 = !{i64 33}
!3 = !{i64 48}
!4 = !{i64 54}
!5 = !{i64 61}
!6 = !{i64 68}
!7 = !{i64 106}
!8 = !{i64 88}
!9 = !{i64 99}
!10 = !{i64 117}
!11 = !{i64 133}
!12 = !{i64 135}
!13 = !{i64 155}
!14 = !{i64 163}
!15 = !{i64 170}
!16 = !{i64 180}
!17 = !{i64 188}
!18 = !{i64 191}
!19 = !{i64 207}
!20 = !{i64 209}
!21 = !{i64 219}
!22 = !{i64 225}
!23 = !{i64 229}
!24 = !{i64 238}
!25 = !{i64 240}
!26 = !{i64 246}
!27 = !{i64 247}
!28 = !{i64 248}
!29 = !{i64 258}
!30 = !{i64 353}
!31 = !{i64 335}
!32 = !{i64 364}
!33 = !{i64 380}
!34 = !{i64 280}
!35 = !{i64 402}
!36 = !{i64 417}
!37 = !{i64 427}
!38 = !{i64 435}
!39 = !{i64 438}
!40 = !{i64 454}
!41 = !{i64 466}
!42 = !{i64 476}
!43 = !{i64 485}
!44 = !{i64 487}
!45 = !{i64 493}
!46 = !{i64 503}
!47 = !{i64 510}
### Assistant: %struct._twoIntsStruct = type { i32, i32 }
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_loop_31_bad() #0 {
entry:
%data = alloca %struct._twoIntsStruct*, align 8
%dataBadBuffer = alloca [50 x %struct._twoIntsStruct], align 16
%dataGoodBuffer = alloca [100 x %struct._twoIntsStruct], align 16
%dataCopy = alloca %struct._twoIntsStruct*, align 8
%data1 = alloca %struct._twoIntsStruct*, align 8
%source = alloca [100 x %struct._twoIntsStruct], align 16
%i = alloca i64, align 8
%i3 = alloca i64, align 8
%arraydecay = getelementptr inbounds [50 x %struct._twoIntsStruct], [50 x %struct._twoIntsStruct]* %dataBadBuffer, i64 0, i64 0
store %struct._twoIntsStruct* %arraydecay, %struct._twoIntsStruct** %data, align 8
%0 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data, align 8
store %struct._twoIntsStruct* %0, %struct._twoIntsStruct** %dataCopy, align 8
%1 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %dataCopy, align 8
store %struct._twoIntsStruct* %1, %struct._twoIntsStruct** %data1, align 8
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %entry
%2 = load i64, i64* %i, align 8
%cmp = icmp ult i64 %2, 100
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%3 = load i64, i64* %i, align 8
%arrayidx = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %3
%intOne = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %arrayidx, i32 0, i32 0
store i32 0, i32* %intOne, align 8
%4 = load i64, i64* %i, align 8
%arrayidx2 = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %4
%intTwo = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %arrayidx2, i32 0, i32 1
store i32 0, i32* %intTwo, align 4
br label %for.inc
for.inc: ; preds = %for.body
%5 = load i64, i64* %i, align 8
%inc = add i64 %5, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
store i64 0, i64* %i3, align 8
br label %for.cond4
for.cond4: ; preds = %for.inc9, %for.end
%6 = load i64, i64* %i3, align 8
%cmp5 = icmp ult i64 %6, 100
br i1 %cmp5, label %for.body6, label %for.end11
for.body6: ; preds = %for.cond4
%7 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data1, align 8
%8 = load i64, i64* %i3, align 8
%arrayidx7 = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %7, i64 %8
%9 = load i64, i64* %i3, align 8
%arrayidx8 = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %9
%10 = bitcast %struct._twoIntsStruct* %arrayidx7 to i8*
%11 = bitcast %struct._twoIntsStruct* %arrayidx8 to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 %10, i8* align 8 %11, i64 8, i1 false)
br label %for.inc9
for.inc9: ; preds = %for.body6
%12 = load i64, i64* %i3, align 8
%inc10 = add i64 %12, 1
store i64 %inc10, i64* %i3, align 8
br label %for.cond4
for.end11: ; preds = %for.cond4
%13 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data1, align 8
%arrayidx12 = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %13, i64 0
call void @printStructLine(%struct._twoIntsStruct* %arrayidx12)
ret void
}
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #1
declare dso_local void @printStructLine(%struct._twoIntsStruct*) #2
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_loop_31_good() #0 {
entry:
call void @goodG2B()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B() #0 {
entry:
%data = alloca %struct._twoIntsStruct*, align 8
%dataBadBuffer = alloca [50 x %struct._twoIntsStruct], align 16
%dataGoodBuffer = alloca [100 x %struct._twoIntsStruct], align 16
%dataCopy = alloca %struct._twoIntsStruct*, align 8
%data1 = alloca %struct._twoIntsStruct*, align 8
%source = alloca [100 x %struct._twoIntsStruct], align 16
%i = alloca i64, align 8
%i3 = alloca i64, align 8
%arraydecay = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %dataGoodBuffer, i64 0, i64 0
store %struct._twoIntsStruct* %arraydecay, %struct._twoIntsStruct** %data, align 8
%0 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data, align 8
store %struct._twoIntsStruct* %0, %struct._twoIntsStruct** %dataCopy, align 8
%1 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %dataCopy, align 8
store %struct._twoIntsStruct* %1, %struct._twoIntsStruct** %data1, align 8
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %entry
%2 = load i64, i64* %i, align 8
%cmp = icmp ult i64 %2, 100
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%3 = load i64, i64* %i, align 8
%arrayidx = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %3
%intOne = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %arrayidx, i32 0, i32 0
store i32 0, i32* %intOne, align 8
%4 = load i64, i64* %i, align 8
%arrayidx2 = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %4
%intTwo = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %arrayidx2, i32 0, i32 1
store i32 0, i32* %intTwo, align 4
br label %for.inc
for.inc: ; preds = %for.body
%5 = load i64, i64* %i, align 8
%inc = add i64 %5, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
store i64 0, i64* %i3, align 8
br label %for.cond4
for.cond4: ; preds = %for.inc9, %for.end
%6 = load i64, i64* %i3, align 8
%cmp5 = icmp ult i64 %6, 100
br i1 %cmp5, label %for.body6, label %for.end11
for.body6: ; preds = %for.cond4
%7 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data1, align 8
%8 = load i64, i64* %i3, align 8
%arrayidx7 = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %7, i64 %8
%9 = load i64, i64* %i3, align 8
%arrayidx8 = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %9
%10 = bitcast %struct._twoIntsStruct* %arrayidx7 to i8*
%11 = bitcast %struct._twoIntsStruct* %arrayidx8 to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 %10, i8* align 8 %11, i64 8, i1 false)
br label %for.inc9
for.inc9: ; preds = %for.body6
%12 = load i64, i64* %i3, align 8
%inc10 = add i64 %12, 1
store i64 %inc10, i64* %i3, align 8
br label %for.cond4
for.end11: ; preds = %for.cond4
%13 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data1, align 8
%arrayidx12 = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %13, i64 0
call void @printStructLine(%struct._twoIntsStruct* %arrayidx12)
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" }
attributes #1 = { argmemonly nounwind willreturn }
attributes #2 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
define i64 @_GLOBAL_OFFSET_TABLE_.1(i64 %arg1) local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
ret i64 %arg1, !insn.addr !1
}
define i64 @function_30() local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !2
%1 = load i64, i64* %0
%2 = add i64 %1, -112, !insn.addr !2
%3 = call i64 @memset(i64 %2, i64 67, i64 99), !insn.addr !3
%4 = add i64 %1, -13, !insn.addr !4
%5 = inttoptr i64 %4 to i8*, !insn.addr !4
store i8 0, i8* %5, align 1, !insn.addr !4
%6 = add i64 %1, -120, !insn.addr !5
%7 = inttoptr i64 %6 to i64*, !insn.addr !5
%8 = load i64, i64* %7, align 8, !insn.addr !5
%9 = call i64 @strncat(i64 %8, i64 %2, i64 100, i64 %2), !insn.addr !6
%10 = load i64, i64* %7, align 8, !insn.addr !7
%11 = call i64 @printLine(i64 %10), !insn.addr !8
%12 = add i64 %1, -8, !insn.addr !9
%13 = inttoptr i64 %12 to i64*, !insn.addr !9
%14 = load i64, i64* %13, align 8, !insn.addr !9
%15 = call i64 @__readfsqword(i64 40), !insn.addr !10
%16 = icmp eq i64 %14, %15, !insn.addr !10
store i64 0, i64* %rax.0.reg2mem, !insn.addr !11
br i1 %16, label %dec_label_pc_83, label %dec_label_pc_7e, !insn.addr !11
dec_label_pc_7e: ; preds = %dec_label_pc_30
%17 = call i64 @__stack_chk_fail(), !insn.addr !12
store i64 %17, i64* %rax.0.reg2mem, !insn.addr !12
br label %dec_label_pc_83, !insn.addr !12
dec_label_pc_83: ; preds = %dec_label_pc_7e, %dec_label_pc_30
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !13
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_ncat_66b_goodG2BSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_85:
%rax.0.reg2mem = alloca i64, !insn.addr !14
%stack_var_-120 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !15
%1 = add i64 %arg1, 16, !insn.addr !16
%2 = inttoptr i64 %1 to i64*, !insn.addr !16
%3 = load i64, i64* %2, align 8, !insn.addr !16
%4 = ptrtoint i64* %stack_var_-120 to i64, !insn.addr !17
%5 = call i64 @memset(i64 %4, i64 67, i64 99), !insn.addr !18
%6 = call i64 @strncat(i64 %3, i64 %4, i64 100, i64 %4), !insn.addr !19
%7 = call i64 @printLine(i64 %3), !insn.addr !20
%8 = call i64 @__readfsqword(i64 40), !insn.addr !21
%9 = icmp eq i64 %0, %8, !insn.addr !21
store i64 0, i64* %rax.0.reg2mem, !insn.addr !22
br i1 %9, label %dec_label_pc_108, label %dec_label_pc_103, !insn.addr !22
dec_label_pc_103: ; preds = %dec_label_pc_85
%10 = call i64 @__stack_chk_fail(), !insn.addr !23
store i64 %10, i64* %rax.0.reg2mem, !insn.addr !23
br label %dec_label_pc_108, !insn.addr !23
dec_label_pc_108: ; preds = %dec_label_pc_103, %dec_label_pc_85
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !24
}
declare i64 @memset(i64, i64, i64) local_unnamed_addr
declare i64 @strncat(i64, i64, i64, i64) local_unnamed_addr
declare i64 @printLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 18}
!1 = !{i64 33}
!2 = !{i64 48}
!3 = !{i64 65}
!4 = !{i64 70}
!5 = !{i64 78}
!6 = !{i64 93}
!7 = !{i64 98}
!8 = !{i64 105}
!9 = !{i64 111}
!10 = !{i64 115}
!11 = !{i64 124}
!12 = !{i64 126}
!13 = !{i64 132}
!14 = !{i64 133}
!15 = !{i64 151}
!16 = !{i64 173}
!17 = !{i64 195}
!18 = !{i64 198}
!19 = !{i64 226}
!20 = !{i64 238}
!21 = !{i64 248}
!22 = !{i64 257}
!23 = !{i64 259}
!24 = !{i64 265}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_ncat_66b_badSink(i8** %dataArray) #0 {
entry:
%dataArray.addr = alloca i8**, align 8
%data = alloca i8*, align 8
%source = alloca [100 x i8], align 16
store i8** %dataArray, i8*** %dataArray.addr, align 8
%0 = load i8**, i8*** %dataArray.addr, align 8
%arrayidx = getelementptr inbounds i8*, i8** %0, i64 2
%1 = load i8*, i8** %arrayidx, align 8
store i8* %1, i8** %data, align 8
%arraydecay = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
call void @llvm.memset.p0i8.i64(i8* align 16 %arraydecay, i8 67, i64 99, i1 false)
%arrayidx1 = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 99
store i8 0, i8* %arrayidx1, align 1
%2 = load i8*, i8** %data, align 8
%arraydecay2 = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
%call = call i8* @strncat(i8* %2, i8* %arraydecay2, i64 100) #4
%3 = load i8*, i8** %data, align 8
call void @printLine(i8* %3)
ret void
}
; Function Attrs: argmemonly nounwind willreturn writeonly
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #1
; Function Attrs: nounwind
declare dso_local i8* @strncat(i8*, i8*, i64) #2
declare dso_local void @printLine(i8*) #3
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_ncat_66b_goodG2BSink(i8** %dataArray) #0 {
entry:
%dataArray.addr = alloca i8**, align 8
%data = alloca i8*, align 8
%source = alloca [100 x i8], align 16
store i8** %dataArray, i8*** %dataArray.addr, align 8
%0 = load i8**, i8*** %dataArray.addr, align 8
%arrayidx = getelementptr inbounds i8*, i8** %0, i64 2
%1 = load i8*, i8** %arrayidx, align 8
store i8* %1, i8** %data, align 8
%arraydecay = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
call void @llvm.memset.p0i8.i64(i8* align 16 %arraydecay, i8 67, i64 99, i1 false)
%arrayidx1 = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 99
store i8 0, i8* %arrayidx1, align 1
%2 = load i8*, i8** %data, align 8
%arraydecay2 = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
%call = call i8* @strncat(i8* %2, i8* %arraydecay2, i64 100) #4
%3 = load i8*, i8** %data, align 8
call void @printLine(i8* %3)
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" }
attributes #1 = { argmemonly nounwind willreturn writeonly }
attributes #2 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #3 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_15c = local_unnamed_addr constant [9 x i32] %wide-string
@global_var_164 = local_unnamed_addr constant [7 x i32] %wide-string
@global_var_16c = local_unnamed_addr constant [5 x i32] %wide-string
@global_var_174 = local_unnamed_addr constant [3 x i32] %wide-string
@global_var_154 = local_unnamed_addr constant [11 x i32] %wide-string
@global_var_10 = constant [3 x i8] c"%(\00"
define i64 @_GLOBAL_OFFSET_TABLE_.1(i64 %arg1) local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
%1 = inttoptr i64 %arg1 to i64*, !insn.addr !1
%2 = call i64 @_ZNSt7__cxx114listIPwSaIS1_EE4backEv(i64* %1), !insn.addr !1
ret i64 %2, !insn.addr !1
}
define i64 @function_30() local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !2
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = add i64 %2, 287, !insn.addr !2
%4 = and i64 %3, 4294967295, !insn.addr !2
%5 = add i64 %1, -64, !insn.addr !3
%6 = inttoptr i64 %5 to i64*, !insn.addr !3
store i64 %4, i64* %6, align 8, !insn.addr !3
%7 = add i64 %1, -56, !insn.addr !4
%8 = inttoptr i64 %7 to i64*, !insn.addr !4
store i64 279172874305, i64* %8, align 8, !insn.addr !4
%9 = add i64 %1, -48, !insn.addr !5
%10 = inttoptr i64 %9 to i64*, !insn.addr !5
store i64 279172874305, i64* %10, align 8, !insn.addr !5
%11 = add i64 %1, -40, !insn.addr !6
%12 = inttoptr i64 %11 to i64*, !insn.addr !6
store i64 279172874305, i64* %12, align 8, !insn.addr !6
%13 = add i64 %1, -32, !insn.addr !7
%14 = inttoptr i64 %13 to i64*, !insn.addr !7
store i64 279172874305, i64* %14, align 8, !insn.addr !7
%15 = load i32, i32* inttoptr (i64 380 to i32*), align 4, !insn.addr !8
%16 = add i64 %1, -24, !insn.addr !9
%17 = inttoptr i64 %16 to i32*, !insn.addr !9
store i32 %15, i32* %17, align 4, !insn.addr !9
%18 = add i64 %1, -72, !insn.addr !10
%19 = inttoptr i64 %18 to i64*, !insn.addr !10
%20 = load i64, i64* %19, align 8, !insn.addr !10
%21 = call i64 @wcscpy(i64 %20, i64 %5, i64 %5), !insn.addr !11
%22 = load i64, i64* %19, align 8, !insn.addr !12
%23 = call i64 @printWLine(i64 %22), !insn.addr !13
%24 = add i64 %1, -8, !insn.addr !14
%25 = inttoptr i64 %24 to i64*, !insn.addr !14
%26 = load i64, i64* %25, align 8, !insn.addr !14
%27 = call i64 @__readfsqword(i64 40), !insn.addr !15
%28 = icmp eq i64 %26, %27, !insn.addr !15
store i64 0, i64* %rax.0.reg2mem, !insn.addr !16
br i1 %28, label %dec_label_pc_a2, label %dec_label_pc_9d, !insn.addr !16
dec_label_pc_9d: ; preds = %dec_label_pc_30
%29 = call i64 @__stack_chk_fail(), !insn.addr !17
store i64 %29, i64* %rax.0.reg2mem, !insn.addr !17
br label %dec_label_pc_a2, !insn.addr !17
dec_label_pc_a2: ; preds = %dec_label_pc_9d, %dec_label_pc_30
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !18
}
define i64 @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_cpy_7311goodG2BSinkENSt7__cxx114listIPwSaIS2_EEE(i64 %arg1) local_unnamed_addr {
dec_label_pc_a4:
%rax.0.reg2mem = alloca i64, !insn.addr !19
%stack_var_-72 = alloca i32*, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !20
%1 = inttoptr i64 %arg1 to i64*, !insn.addr !21
%2 = call i64 @_ZNSt7__cxx114listIPwSaIS1_EE4backEv(i64* %1), !insn.addr !21
%3 = inttoptr i64 %2 to i64*, !insn.addr !22
%4 = load i64, i64* %3, align 8, !insn.addr !22
store i32* inttoptr (i64 279172874305 to i32*), i32** %stack_var_-72, align 8, !insn.addr !23
%5 = ptrtoint i32** %stack_var_-72 to i64, !insn.addr !24
%6 = call i64 @wcscpy(i64 %4, i64 %5, i64 %5), !insn.addr !25
%7 = call i64 @printWLine(i64 %4), !insn.addr !26
%8 = call i64 @__readfsqword(i64 40), !insn.addr !27
%9 = icmp eq i64 %0, %8, !insn.addr !27
store i64 0, i64* %rax.0.reg2mem, !insn.addr !28
br i1 %9, label %dec_label_pc_146, label %dec_label_pc_141, !insn.addr !28
dec_label_pc_141: ; preds = %dec_label_pc_a4
%10 = call i64 @__stack_chk_fail(), !insn.addr !29
store i64 %10, i64* %rax.0.reg2mem, !insn.addr !29
br label %dec_label_pc_146, !insn.addr !29
dec_label_pc_146: ; preds = %dec_label_pc_141, %dec_label_pc_a4
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !30
}
define i64 @_ZNSt7__cxx114listIPwSaIS1_EE4backEv(i64* %result) local_unnamed_addr {
dec_label_pc_180:
%rax.0.reg2mem = alloca i64, !insn.addr !31
%stack_var_-24 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !32
%1 = call i64 @_ZNSt7__cxx114listIPwSaIS1_EE3endEv(i64* %result), !insn.addr !33
store i64 %1, i64* %stack_var_-24, align 8, !insn.addr !34
%2 = call i64 @_ZNSt14_List_iteratorIPwEmmEv(i64* nonnull %stack_var_-24), !insn.addr !35
%3 = call i64 @_ZNKSt14_List_iteratorIPwEdeEv(i64* nonnull %stack_var_-24), !insn.addr !36
%4 = call i64 @__readfsqword(i64 40), !insn.addr !37
%5 = icmp eq i64 %0, %4, !insn.addr !37
store i64 %3, i64* %rax.0.reg2mem, !insn.addr !38
br i1 %5, label %dec_label_pc_1d7, label %dec_label_pc_1d2, !insn.addr !38
dec_label_pc_1d2: ; preds = %dec_label_pc_180
%6 = call i64 @__stack_chk_fail(), !insn.addr !39
store i64 %6, i64* %rax.0.reg2mem, !insn.addr !39
br label %dec_label_pc_1d7, !insn.addr !39
dec_label_pc_1d7: ; preds = %dec_label_pc_1d2, %dec_label_pc_180
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !40
}
define i64 @_ZNSt7__cxx114listIPwSaIS1_EE3endEv(i64* %result) local_unnamed_addr {
dec_label_pc_1da:
%rax.0.reg2mem = alloca i64, !insn.addr !41
%stack_var_-24 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !42
%1 = call i64 @_ZNSt14_List_iteratorIPwEC1EPNSt8__detail15_List_node_baseE(i64* nonnull %stack_var_-24, i64* %result), !insn.addr !43
%2 = load i64, i64* %stack_var_-24, align 8, !insn.addr !44
%3 = call i64 @__readfsqword(i64 40), !insn.addr !45
%4 = icmp eq i64 %0, %3, !insn.addr !45
store i64 %2, i64* %rax.0.reg2mem, !insn.addr !46
br i1 %4, label %dec_label_pc_220, label %dec_label_pc_21b, !insn.addr !46
dec_label_pc_21b: ; preds = %dec_label_pc_1da
%5 = call i64 @__stack_chk_fail(), !insn.addr !47
store i64 %5, i64* %rax.0.reg2mem, !insn.addr !47
br label %dec_label_pc_220, !insn.addr !47
dec_label_pc_220: ; preds = %dec_label_pc_21b, %dec_label_pc_1da
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !48
}
define i64 @_ZNSt14_List_iteratorIPwEmmEv(i64* %result) local_unnamed_addr {
dec_label_pc_222:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 8, !insn.addr !49
%2 = inttoptr i64 %1 to i64*, !insn.addr !49
%3 = load i64, i64* %2, align 8, !insn.addr !49
store i64 %3, i64* %result, align 8, !insn.addr !50
ret i64 %0, !insn.addr !51
}
define i64 @_ZNKSt14_List_iteratorIPwEdeEv(i64* %result) local_unnamed_addr {
dec_label_pc_242:
%0 = call i64 @_ZNSt10_List_nodeIPwE9_M_valptrEv(i64* %result), !insn.addr !52
ret i64 %0, !insn.addr !53
}
define i64 @_ZNSt14_List_iteratorIPwEC1EPNSt8__detail15_List_node_baseE(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_260:
%0 = ptrtoint i64* %arg2 to i64
%1 = ptrtoint i64* %result to i64
store i64 %0, i64* %result, align 8, !insn.addr !54
ret i64 %1, !insn.addr !55
}
define i64 @_ZNSt10_List_nodeIPwE9_M_valptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_27a:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, ptrtoint ([3 x i8]* @global_var_10 to i64), !insn.addr !56
%2 = inttoptr i64 %1 to i64*, !insn.addr !57
%3 = call i64 @_ZN9__gnu_cxx16__aligned_membufIPwE6_M_ptrEv(i64* %2), !insn.addr !57
ret i64 %3, !insn.addr !58
}
define i64 @_ZN9__gnu_cxx16__aligned_membufIPwE6_M_ptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_298:
%0 = call i64 @_ZN9__gnu_cxx16__aligned_membufIPwE7_M_addrEv(i64* %result), !insn.addr !59
ret i64 %0, !insn.addr !60
}
define i64 @_ZN9__gnu_cxx16__aligned_membufIPwE7_M_addrEv(i64* %result) local_unnamed_addr {
dec_label_pc_2b2:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !61
}
declare i64 @wcscpy(i64, i64, i64) local_unnamed_addr
declare i64 @printWLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 12}
!1 = !{i64 34}
!2 = !{i64 48}
!3 = !{i64 60}
!4 = !{i64 64}
!5 = !{i64 82}
!6 = !{i64 86}
!7 = !{i64 97}
!8 = !{i64 101}
!9 = !{i64 107}
!10 = !{i64 114}
!11 = !{i64 124}
!12 = !{i64 129}
!13 = !{i64 136}
!14 = !{i64 142}
!15 = !{i64 146}
!16 = !{i64 155}
!17 = !{i64 157}
!18 = !{i64 163}
!19 = !{i64 164}
!20 = !{i64 176}
!21 = !{i64 198}
!22 = !{i64 203}
!23 = !{i64 224}
!24 = !{i64 274}
!25 = !{i64 288}
!26 = !{i64 300}
!27 = !{i64 310}
!28 = !{i64 319}
!29 = !{i64 321}
!30 = !{i64 327}
!31 = !{i64 384}
!32 = !{i64 396}
!33 = !{i64 418}
!34 = !{i64 423}
!35 = !{i64 434}
!36 = !{i64 446}
!37 = !{i64 455}
!38 = !{i64 464}
!39 = !{i64 466}
!40 = !{i64 472}
!41 = !{i64 474}
!42 = !{i64 486}
!43 = !{i64 515}
!44 = !{i64 520}
!45 = !{i64 528}
!46 = !{i64 537}
!47 = !{i64 539}
!48 = !{i64 545}
!49 = !{i64 561}
!50 = !{i64 569}
!51 = !{i64 577}
!52 = !{i64 600}
!53 = !{i64 606}
!54 = !{i64 628}
!55 = !{i64 633}
!56 = !{i64 650}
!57 = !{i64 657}
!58 = !{i64 663}
!59 = !{i64 683}
!60 = !{i64 689}
!61 = !{i64 703}
### Assistant: %"class.std::__cxx11::list" = type { %"class.std::__cxx11::_List_base" }
%"class.std::__cxx11::_List_base" = type { %"struct.std::__cxx11::_List_base<wchar_t *, std::allocator<wchar_t *>>::_List_impl" }
%"struct.std::__cxx11::_List_base<wchar_t *, std::allocator<wchar_t *>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"* }
%"struct.std::_List_iterator" = type { %"struct.std::__detail::_List_node_base"* }
%"struct.std::_List_node" = type { %"struct.std::__detail::_List_node_base", %"struct.__gnu_cxx::__aligned_membuf" }
%"struct.__gnu_cxx::__aligned_membuf" = type { [8 x i8] }
$_ZNSt7__cxx114listIPwSaIS1_EE4backEv = comdat any
$_ZNSt7__cxx114listIPwSaIS1_EE3endEv = comdat any
$_ZNSt14_List_iteratorIPwEmmEv = comdat any
$_ZNKSt14_List_iteratorIPwEdeEv = comdat any
$_ZNSt14_List_iteratorIPwEC2EPNSt8__detail15_List_node_baseE = comdat any
$_ZNSt10_List_nodeIPwE9_M_valptrEv = comdat any
$__clang_call_terminate = comdat any
$_ZN9__gnu_cxx16__aligned_membufIPwE6_M_ptrEv = comdat any
$_ZN9__gnu_cxx16__aligned_membufIPwE7_M_addrEv = comdat any
@__const._ZN65CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_cpy_737badSinkENSt7__cxx114listIPwSaIS2_EEE.source = private unnamed_addr constant [11 x i32] [i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 0], align 16
@__const._ZN65CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_cpy_7311goodG2BSinkENSt7__cxx114listIPwSaIS2_EEE.source = private unnamed_addr constant [11 x i32] [i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 0], align 16
; Function Attrs: noinline optnone uwtable
define dso_local void @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_cpy_737badSinkENSt7__cxx114listIPwSaIS2_EEE(%"class.std::__cxx11::list"* %dataList) #0 {
entry:
%data = alloca i32*, align 8
%source = alloca [11 x i32], align 16
%call = call nonnull align 8 dereferenceable(8) i32** @_ZNSt7__cxx114listIPwSaIS1_EE4backEv(%"class.std::__cxx11::list"* %dataList) #6
%0 = load i32*, i32** %call, align 8
store i32* %0, i32** %data, align 8
%1 = bitcast [11 x i32]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 %1, i8* align 16 bitcast ([11 x i32]* @__const._ZN65CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_cpy_737badSinkENSt7__cxx114listIPwSaIS2_EEE.source to i8*), i64 44, i1 false)
%2 = load i32*, i32** %data, align 8
%arraydecay = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%call1 = call i32* @wcscpy(i32* %2, i32* %arraydecay) #6
%3 = load i32*, i32** %data, align 8
call void @printWLine(i32* %3)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) i32** @_ZNSt7__cxx114listIPwSaIS1_EE4backEv(%"class.std::__cxx11::list"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::__cxx11::list"*, align 8
%__tmp = alloca %"struct.std::_List_iterator", align 8
store %"class.std::__cxx11::list"* %this, %"class.std::__cxx11::list"** %this.addr, align 8
%this1 = load %"class.std::__cxx11::list"*, %"class.std::__cxx11::list"** %this.addr, align 8
%call = call %"struct.std::__detail::_List_node_base"* @_ZNSt7__cxx114listIPwSaIS1_EE3endEv(%"class.std::__cxx11::list"* %this1) #6
%coerce.dive = getelementptr inbounds %"struct.std::_List_iterator", %"struct.std::_List_iterator"* %__tmp, i32 0, i32 0
store %"struct.std::__detail::_List_node_base"* %call, %"struct.std::__detail::_List_node_base"** %coerce.dive, align 8
%call2 = call nonnull align 8 dereferenceable(8) %"struct.std::_List_iterator"* @_ZNSt14_List_iteratorIPwEmmEv(%"struct.std::_List_iterator"* %__tmp) #6
%call3 = call nonnull align 8 dereferenceable(8) i32** @_ZNKSt14_List_iteratorIPwEdeEv(%"struct.std::_List_iterator"* %__tmp) #6
ret i32** %call3
}
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #2
; Function Attrs: nounwind
declare dso_local i32* @wcscpy(i32*, i32*) #3
declare dso_local void @printWLine(i32*) #4
; Function Attrs: noinline optnone uwtable
define dso_local void @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_cpy_7311goodG2BSinkENSt7__cxx114listIPwSaIS2_EEE(%"class.std::__cxx11::list"* %dataList) #0 {
entry:
%data = alloca i32*, align 8
%source = alloca [11 x i32], align 16
%call = call nonnull align 8 dereferenceable(8) i32** @_ZNSt7__cxx114listIPwSaIS1_EE4backEv(%"class.std::__cxx11::list"* %dataList) #6
%0 = load i32*, i32** %call, align 8
store i32* %0, i32** %data, align 8
%1 = bitcast [11 x i32]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 %1, i8* align 16 bitcast ([11 x i32]* @__const._ZN65CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_cpy_7311goodG2BSinkENSt7__cxx114listIPwSaIS2_EEE.source to i8*), i64 44, i1 false)
%2 = load i32*, i32** %data, align 8
%arraydecay = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%call1 = call i32* @wcscpy(i32* %2, i32* %arraydecay) #6
%3 = load i32*, i32** %data, align 8
call void @printWLine(i32* %3)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::__detail::_List_node_base"* @_ZNSt7__cxx114listIPwSaIS1_EE3endEv(%"class.std::__cxx11::list"* %this) #1 comdat align 2 {
entry:
%retval = alloca %"struct.std::_List_iterator", align 8
%this.addr = alloca %"class.std::__cxx11::list"*, align 8
store %"class.std::__cxx11::list"* %this, %"class.std::__cxx11::list"** %this.addr, align 8
%this1 = load %"class.std::__cxx11::list"*, %"class.std::__cxx11::list"** %this.addr, align 8
%0 = bitcast %"class.std::__cxx11::list"* %this1 to %"class.std::__cxx11::_List_base"*
%_M_impl = getelementptr inbounds %"class.std::__cxx11::_List_base", %"class.std::__cxx11::_List_base"* %0, i32 0, i32 0
%_M_node = getelementptr inbounds %"struct.std::__cxx11::_List_base<wchar_t *, std::allocator<wchar_t *>>::_List_impl", %"struct.std::__cxx11::_List_base<wchar_t *, std::allocator<wchar_t *>>::_List_impl"* %_M_impl, i32 0, i32 0
%1 = bitcast %"struct.std::__detail::_List_node_header"* %_M_node to %"struct.std::__detail::_List_node_base"*
call void @_ZNSt14_List_iteratorIPwEC2EPNSt8__detail15_List_node_baseE(%"struct.std::_List_iterator"* %retval, %"struct.std::__detail::_List_node_base"* %1) #6
%coerce.dive = getelementptr inbounds %"struct.std::_List_iterator", %"struct.std::_List_iterator"* %retval, i32 0, i32 0
%2 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %coerce.dive, align 8
ret %"struct.std::__detail::_List_node_base"* %2
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) %"struct.std::_List_iterator"* @_ZNSt14_List_iteratorIPwEmmEv(%"struct.std::_List_iterator"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_List_iterator"*, align 8
store %"struct.std::_List_iterator"* %this, %"struct.std::_List_iterator"** %this.addr, align 8
%this1 = load %"struct.std::_List_iterator"*, %"struct.std::_List_iterator"** %this.addr, align 8
%_M_node = getelementptr inbounds %"struct.std::_List_iterator", %"struct.std::_List_iterator"* %this1, i32 0, i32 0
%0 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %_M_node, align 8
%_M_prev = getelementptr inbounds %"struct.std::__detail::_List_node_base", %"struct.std::__detail::_List_node_base"* %0, i32 0, i32 1
%1 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %_M_prev, align 8
%_M_node2 = getelementptr inbounds %"struct.std::_List_iterator", %"struct.std::_List_iterator"* %this1, i32 0, i32 0
store %"struct.std::__detail::_List_node_base"* %1, %"struct.std::__detail::_List_node_base"** %_M_node2, align 8
ret %"struct.std::_List_iterator"* %this1
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) i32** @_ZNKSt14_List_iteratorIPwEdeEv(%"struct.std::_List_iterator"* %this) #1 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%this.addr = alloca %"struct.std::_List_iterator"*, align 8
store %"struct.std::_List_iterator"* %this, %"struct.std::_List_iterator"** %this.addr, align 8
%this1 = load %"struct.std::_List_iterator"*, %"struct.std::_List_iterator"** %this.addr, align 8
%_M_node = getelementptr inbounds %"struct.std::_List_iterator", %"struct.std::_List_iterator"* %this1, i32 0, i32 0
%0 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %_M_node, align 8
%1 = bitcast %"struct.std::__detail::_List_node_base"* %0 to %"struct.std::_List_node"*
%call = invoke i32** @_ZNSt10_List_nodeIPwE9_M_valptrEv(%"struct.std::_List_node"* %1)
to label %invoke.cont unwind label %terminate.lpad
invoke.cont: ; preds = %entry
ret i32** %call
terminate.lpad: ; preds = %entry
%2 = landingpad { i8*, i32 }
catch i8* null
%3 = extractvalue { i8*, i32 } %2, 0
call void @__clang_call_terminate(i8* %3) #7
unreachable
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt14_List_iteratorIPwEC2EPNSt8__detail15_List_node_baseE(%"struct.std::_List_iterator"* %this, %"struct.std::__detail::_List_node_base"* %__x) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_List_iterator"*, align 8
%__x.addr = alloca %"struct.std::__detail::_List_node_base"*, align 8
store %"struct.std::_List_iterator"* %this, %"struct.std::_List_iterator"** %this.addr, align 8
store %"struct.std::__detail::_List_node_base"* %__x, %"struct.std::__detail::_List_node_base"** %__x.addr, align 8
%this1 = load %"struct.std::_List_iterator"*, %"struct.std::_List_iterator"** %this.addr, align 8
%_M_node = getelementptr inbounds %"struct.std::_List_iterator", %"struct.std::_List_iterator"* %this1, i32 0, i32 0
%0 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %__x.addr, align 8
store %"struct.std::__detail::_List_node_base"* %0, %"struct.std::__detail::_List_node_base"** %_M_node, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i32** @_ZNSt10_List_nodeIPwE9_M_valptrEv(%"struct.std::_List_node"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_List_node"*, align 8
store %"struct.std::_List_node"* %this, %"struct.std::_List_node"** %this.addr, align 8
%this1 = load %"struct.std::_List_node"*, %"struct.std::_List_node"** %this.addr, align 8
%_M_storage = getelementptr inbounds %"struct.std::_List_node", %"struct.std::_List_node"* %this1, i32 0, i32 1
%call = call i32** @_ZN9__gnu_cxx16__aligned_membufIPwE6_M_ptrEv(%"struct.__gnu_cxx::__aligned_membuf"* %_M_storage) #6
ret i32** %call
}
declare dso_local i32 @__gxx_personality_v0(...)
; Function Attrs: noinline noreturn nounwind
define linkonce_odr hidden void @__clang_call_terminate(i8* %0) #5 comdat {
%2 = call i8* @__cxa_begin_catch(i8* %0) #6
call void @_ZSt9terminatev() #7
unreachable
}
declare dso_local i8* @__cxa_begin_catch(i8*)
declare dso_local void @_ZSt9terminatev()
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i32** @_ZN9__gnu_cxx16__aligned_membufIPwE6_M_ptrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.__gnu_cxx::__aligned_membuf"*, align 8
store %"struct.__gnu_cxx::__aligned_membuf"* %this, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%this1 = load %"struct.__gnu_cxx::__aligned_membuf"*, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%call = call i8* @_ZN9__gnu_cxx16__aligned_membufIPwE7_M_addrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this1) #6
%0 = bitcast i8* %call to i32**
ret i32** %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i8* @_ZN9__gnu_cxx16__aligned_membufIPwE7_M_addrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.__gnu_cxx::__aligned_membuf"*, align 8
store %"struct.__gnu_cxx::__aligned_membuf"* %this, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%this1 = load %"struct.__gnu_cxx::__aligned_membuf"*, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%_M_storage = getelementptr inbounds %"struct.__gnu_cxx::__aligned_membuf", %"struct.__gnu_cxx::__aligned_membuf"* %this1, i32 0, i32 0
%0 = bitcast [8 x i8]* %_M_storage to i8*
ret i8* %0
}
attributes #0 = { noinline 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" }
attributes #1 = { 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" }
attributes #2 = { argmemonly nounwind willreturn }
attributes #3 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #4 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #5 = { noinline noreturn nounwind }
attributes #6 = { nounwind }
attributes #7 = { noreturn nounwind }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_360 = local_unnamed_addr constant i64 -3728031612900
define i64 @_GLOBAL_OFFSET_TABLE_.1(i64 %arg1) local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
ret i64 %arg1, !insn.addr !1
}
define i64 @function_30() local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !2
%storemerge12.reg2mem = alloca i64, !insn.addr !2
%storemerge3.reg2mem = alloca i64, !insn.addr !2
%1 = load i64, i64* %0
%2 = add i64 %1, -824, !insn.addr !3
%3 = inttoptr i64 %2 to i64*, !insn.addr !3
%4 = add i64 %1, -840, !insn.addr !4
%5 = inttoptr i64 %4 to i64*, !insn.addr !4
store i64 0, i64* %5, align 8
%6 = add i64 %1, -816
%7 = add i64 %1, -812, !insn.addr !5
store i64 0, i64* %storemerge3.reg2mem
br label %dec_label_pc_4f
dec_label_pc_4f: ; preds = %dec_label_pc_30, %dec_label_pc_4f
%storemerge3.reload = load i64, i64* %storemerge3.reg2mem
%8 = mul i64 %storemerge3.reload, 8, !insn.addr !6
%9 = add i64 %8, %6, !insn.addr !6
%10 = inttoptr i64 %9 to i32*, !insn.addr !6
store i32 0, i32* %10, align 4, !insn.addr !6
%11 = load i64, i64* %5, align 8, !insn.addr !7
%12 = mul i64 %11, 8, !insn.addr !5
%13 = add i64 %7, %12, !insn.addr !5
%14 = inttoptr i64 %13 to i32*, !insn.addr !5
store i32 0, i32* %14, align 4, !insn.addr !5
%15 = load i64, i64* %5, align 8, !insn.addr !8
%16 = add i64 %15, 1, !insn.addr !8
store i64 %16, i64* %5, align 8
%17 = icmp ult i64 %16, 100
store i64 %16, i64* %storemerge3.reg2mem, !insn.addr !9
br i1 %17, label %dec_label_pc_4f, label %dec_label_pc_7d, !insn.addr !9
dec_label_pc_7d: ; preds = %dec_label_pc_4f
%18 = add i64 %1, -832, !insn.addr !10
%19 = inttoptr i64 %18 to i64*, !insn.addr !10
store i64 0, i64* %19, align 8
store i64 0, i64* %storemerge12.reg2mem
br label %dec_label_pc_92
dec_label_pc_92: ; preds = %dec_label_pc_7d, %dec_label_pc_92
%storemerge12.reload = load i64, i64* %storemerge12.reg2mem
%20 = mul i64 %storemerge12.reload, 8, !insn.addr !11
%21 = load i64, i64* %3, align 8, !insn.addr !12
%22 = add i64 %21, %20, !insn.addr !13
%23 = add i64 %20, %6, !insn.addr !14
%24 = inttoptr i64 %23 to i64*, !insn.addr !14
%25 = load i64, i64* %24, align 8, !insn.addr !14
%26 = inttoptr i64 %22 to i64*, !insn.addr !15
store i64 %25, i64* %26, align 8, !insn.addr !15
%27 = load i64, i64* %19, align 8, !insn.addr !16
%28 = add i64 %27, 1, !insn.addr !16
store i64 %28, i64* %19, align 8
%29 = icmp ult i64 %28, 100
store i64 %28, i64* %storemerge12.reg2mem, !insn.addr !17
br i1 %29, label %dec_label_pc_92, label %dec_label_pc_c7, !insn.addr !17
dec_label_pc_c7: ; preds = %dec_label_pc_92
%30 = load i64, i64* %3, align 8, !insn.addr !18
%31 = call i64 @printStructLine(i64 %30), !insn.addr !19
%32 = add i64 %1, -8, !insn.addr !20
%33 = inttoptr i64 %32 to i64*, !insn.addr !20
%34 = load i64, i64* %33, align 8, !insn.addr !20
%35 = call i64 @__readfsqword(i64 40), !insn.addr !21
%36 = icmp eq i64 %34, %35, !insn.addr !21
store i64 0, i64* %rax.0.reg2mem, !insn.addr !22
br i1 %36, label %dec_label_pc_eb, label %dec_label_pc_e6, !insn.addr !22
dec_label_pc_e6: ; preds = %dec_label_pc_c7
%37 = call i64 @__stack_chk_fail(), !insn.addr !23
store i64 %37, i64* %rax.0.reg2mem, !insn.addr !23
br label %dec_label_pc_eb, !insn.addr !23
dec_label_pc_eb: ; preds = %dec_label_pc_e6, %dec_label_pc_c7
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !24
}
define i64 @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_loop_7311goodG2BSinkENSt7__cxx114listIP14_twoIntsStructSaIS3_EEE(i64 %arg1) local_unnamed_addr {
dec_label_pc_ed:
%rax.0.reg2mem = alloca i64, !insn.addr !25
%storemerge12.reg2mem = alloca i64, !insn.addr !25
%storemerge3.reg2mem = alloca i64, !insn.addr !25
%stack_var_-8 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !26
%1 = call i64 @__readfsqword(i64 40), !insn.addr !27
%2 = inttoptr i64 %arg1 to i64*, !insn.addr !28
%3 = call i64 @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE4backEv(i64* %2), !insn.addr !28
%4 = inttoptr i64 %3 to i64*, !insn.addr !29
%5 = load i64, i64* %4, align 8, !insn.addr !29
%6 = add i64 %0, -816
%7 = add i64 %0, -812, !insn.addr !30
store i64 0, i64* %storemerge3.reg2mem
br label %dec_label_pc_13c
dec_label_pc_13c: ; preds = %dec_label_pc_13c, %dec_label_pc_ed
%storemerge3.reload = load i64, i64* %storemerge3.reg2mem
%8 = mul i64 %storemerge3.reload, 8, !insn.addr !31
%9 = add i64 %8, %6, !insn.addr !31
%10 = inttoptr i64 %9 to i32*, !insn.addr !31
store i32 0, i32* %10, align 8, !insn.addr !31
%11 = add i64 %7, %8, !insn.addr !30
%12 = inttoptr i64 %11 to i32*, !insn.addr !30
store i32 0, i32* %12, align 4, !insn.addr !30
%13 = add nuw nsw i64 %storemerge3.reload, 1, !insn.addr !32
%exitcond4 = icmp eq i64 %13, 100
store i64 %13, i64* %storemerge3.reg2mem, !insn.addr !33
store i64 0, i64* %storemerge12.reg2mem, !insn.addr !33
br i1 %exitcond4, label %dec_label_pc_17f, label %dec_label_pc_13c, !insn.addr !33
dec_label_pc_17f: ; preds = %dec_label_pc_13c, %dec_label_pc_17f
%storemerge12.reload = load i64, i64* %storemerge12.reg2mem
%14 = mul i64 %storemerge12.reload, 8, !insn.addr !34
%15 = add i64 %14, %5, !insn.addr !35
%16 = add i64 %14, %6, !insn.addr !36
%17 = inttoptr i64 %16 to i64*, !insn.addr !36
%18 = load i64, i64* %17, align 8, !insn.addr !36
%19 = inttoptr i64 %15 to i64*, !insn.addr !37
store i64 %18, i64* %19, align 8, !insn.addr !37
%20 = add nuw nsw i64 %storemerge12.reload, 1, !insn.addr !38
%exitcond = icmp eq i64 %20, 100
store i64 %20, i64* %storemerge12.reg2mem, !insn.addr !39
br i1 %exitcond, label %dec_label_pc_1b4, label %dec_label_pc_17f, !insn.addr !39
dec_label_pc_1b4: ; preds = %dec_label_pc_17f
%21 = call i64 @printStructLine(i64 %5), !insn.addr !40
%22 = call i64 @__readfsqword(i64 40), !insn.addr !41
%23 = icmp eq i64 %1, %22, !insn.addr !41
store i64 0, i64* %rax.0.reg2mem, !insn.addr !42
br i1 %23, label %dec_label_pc_1d8, label %dec_label_pc_1d3, !insn.addr !42
dec_label_pc_1d3: ; preds = %dec_label_pc_1b4
%24 = call i64 @__stack_chk_fail(), !insn.addr !43
store i64 %24, i64* %rax.0.reg2mem, !insn.addr !43
br label %dec_label_pc_1d8, !insn.addr !43
dec_label_pc_1d8: ; preds = %dec_label_pc_1d3, %dec_label_pc_1b4
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !44
}
define i64 @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE4backEv(i64* %result) local_unnamed_addr {
dec_label_pc_1dc:
%rax.0.reg2mem = alloca i64, !insn.addr !45
%stack_var_-24 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !46
%1 = call i64 @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE3endEv(i64* %result), !insn.addr !47
store i64 %1, i64* %stack_var_-24, align 8, !insn.addr !48
%2 = call i64 @_ZNSt14_List_iteratorIP14_twoIntsStructEmmEv(i64* nonnull %stack_var_-24), !insn.addr !49
%3 = call i64 @_ZNKSt14_List_iteratorIP14_twoIntsStructEdeEv(i64* nonnull %stack_var_-24), !insn.addr !50
%4 = call i64 @__readfsqword(i64 40), !insn.addr !51
%5 = icmp eq i64 %0, %4, !insn.addr !51
store i64 %3, i64* %rax.0.reg2mem, !insn.addr !52
br i1 %5, label %dec_label_pc_233, label %dec_label_pc_22e, !insn.addr !52
dec_label_pc_22e: ; preds = %dec_label_pc_1dc
%6 = call i64 @__stack_chk_fail(), !insn.addr !53
store i64 %6, i64* %rax.0.reg2mem, !insn.addr !53
br label %dec_label_pc_233, !insn.addr !53
dec_label_pc_233: ; preds = %dec_label_pc_22e, %dec_label_pc_1dc
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !54
}
define i64 @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE3endEv(i64* %result) local_unnamed_addr {
dec_label_pc_236:
%rax.0.reg2mem = alloca i64, !insn.addr !55
%stack_var_-24 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !56
%1 = call i64 @_ZNSt14_List_iteratorIP14_twoIntsStructEC1EPNSt8__detail15_List_node_baseE(i64* nonnull %stack_var_-24, i64* %result), !insn.addr !57
%2 = load i64, i64* %stack_var_-24, align 8, !insn.addr !58
%3 = call i64 @__readfsqword(i64 40), !insn.addr !59
%4 = icmp eq i64 %0, %3, !insn.addr !59
store i64 %2, i64* %rax.0.reg2mem, !insn.addr !60
br i1 %4, label %dec_label_pc_27c, label %dec_label_pc_277, !insn.addr !60
dec_label_pc_277: ; preds = %dec_label_pc_236
%5 = call i64 @__stack_chk_fail(), !insn.addr !61
store i64 %5, i64* %rax.0.reg2mem, !insn.addr !61
br label %dec_label_pc_27c, !insn.addr !61
dec_label_pc_27c: ; preds = %dec_label_pc_277, %dec_label_pc_236
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !62
}
define i64 @_ZNSt14_List_iteratorIP14_twoIntsStructEmmEv(i64* %result) local_unnamed_addr {
dec_label_pc_27e:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 8, !insn.addr !63
%2 = inttoptr i64 %1 to i64*, !insn.addr !63
%3 = load i64, i64* %2, align 8, !insn.addr !63
store i64 %3, i64* %result, align 8, !insn.addr !64
ret i64 %0, !insn.addr !65
}
define i64 @_ZNKSt14_List_iteratorIP14_twoIntsStructEdeEv(i64* %result) local_unnamed_addr {
dec_label_pc_29e:
%0 = call i64 @_ZNSt10_List_nodeIP14_twoIntsStructE9_M_valptrEv(i64* %result), !insn.addr !66
ret i64 %0, !insn.addr !67
}
define i64 @_ZNSt14_List_iteratorIP14_twoIntsStructEC1EPNSt8__detail15_List_node_baseE(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_2bc:
%0 = ptrtoint i64* %arg2 to i64
%1 = ptrtoint i64* %result to i64
store i64 %0, i64* %result, align 8, !insn.addr !68
ret i64 %1, !insn.addr !69
}
define i64 @_ZNSt10_List_nodeIP14_twoIntsStructE9_M_valptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_2d6:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 16, !insn.addr !70
%2 = inttoptr i64 %1 to i64*, !insn.addr !71
%3 = call i64 @_ZN9__gnu_cxx16__aligned_membufIP14_twoIntsStructE6_M_ptrEv(i64* %2), !insn.addr !71
ret i64 %3, !insn.addr !72
}
define i64 @_ZN9__gnu_cxx16__aligned_membufIP14_twoIntsStructE6_M_ptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_2f4:
%0 = call i64 @_ZN9__gnu_cxx16__aligned_membufIP14_twoIntsStructE7_M_addrEv(i64* %result), !insn.addr !73
ret i64 %0, !insn.addr !74
}
define i64 @_ZN9__gnu_cxx16__aligned_membufIP14_twoIntsStructE7_M_addrEv(i64* %result) local_unnamed_addr {
dec_label_pc_30e:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !75
}
declare i64 @printStructLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 18}
!1 = !{i64 33}
!2 = !{i64 48}
!3 = !{i64 51}
!4 = !{i64 58}
!5 = !{i64 104}
!6 = !{i64 86}
!7 = !{i64 97}
!8 = !{i64 115}
!9 = !{i64 77}
!10 = !{i64 125}
!11 = !{i64 153}
!12 = !{i64 161}
!13 = !{i64 168}
!14 = !{i64 178}
!15 = !{i64 186}
!16 = !{i64 189}
!17 = !{i64 144}
!18 = !{i64 199}
!19 = !{i64 209}
!20 = !{i64 215}
!21 = !{i64 219}
!22 = !{i64 228}
!23 = !{i64 230}
!24 = !{i64 236}
!25 = !{i64 237}
!26 = !{i64 238}
!27 = !{i64 255}
!28 = !{i64 280}
!29 = !{i64 285}
!30 = !{i64 341}
!31 = !{i64 323}
!32 = !{i64 352}
!33 = !{i64 314}
!34 = !{i64 390}
!35 = !{i64 405}
!36 = !{i64 415}
!37 = !{i64 423}
!38 = !{i64 426}
!39 = !{i64 381}
!40 = !{i64 446}
!41 = !{i64 456}
!42 = !{i64 465}
!43 = !{i64 467}
!44 = !{i64 473}
!45 = !{i64 476}
!46 = !{i64 488}
!47 = !{i64 510}
!48 = !{i64 515}
!49 = !{i64 526}
!50 = !{i64 538}
!51 = !{i64 547}
!52 = !{i64 556}
!53 = !{i64 558}
!54 = !{i64 564}
!55 = !{i64 566}
!56 = !{i64 578}
!57 = !{i64 607}
!58 = !{i64 612}
!59 = !{i64 620}
!60 = !{i64 629}
!61 = !{i64 631}
!62 = !{i64 637}
!63 = !{i64 653}
!64 = !{i64 661}
!65 = !{i64 669}
!66 = !{i64 692}
!67 = !{i64 698}
!68 = !{i64 720}
!69 = !{i64 725}
!70 = !{i64 742}
!71 = !{i64 749}
!72 = !{i64 755}
!73 = !{i64 775}
!74 = !{i64 781}
!75 = !{i64 795}
### Assistant: %"class.std::__cxx11::list" = type { %"class.std::__cxx11::_List_base" }
%"class.std::__cxx11::_List_base" = type { %"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl" }
%"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"* }
%struct._twoIntsStruct = type { i32, i32 }
%"struct.std::_List_iterator" = type { %"struct.std::__detail::_List_node_base"* }
%"struct.std::_List_node" = type { %"struct.std::__detail::_List_node_base", %"struct.__gnu_cxx::__aligned_membuf" }
%"struct.__gnu_cxx::__aligned_membuf" = type { [8 x i8] }
$_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE4backEv = comdat any
$_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE3endEv = comdat any
$_ZNSt14_List_iteratorIP14_twoIntsStructEmmEv = comdat any
$_ZNKSt14_List_iteratorIP14_twoIntsStructEdeEv = comdat any
$_ZNSt14_List_iteratorIP14_twoIntsStructEC2EPNSt8__detail15_List_node_baseE = comdat any
$_ZNSt10_List_nodeIP14_twoIntsStructE9_M_valptrEv = comdat any
$__clang_call_terminate = comdat any
$_ZN9__gnu_cxx16__aligned_membufIP14_twoIntsStructE6_M_ptrEv = comdat any
$_ZN9__gnu_cxx16__aligned_membufIP14_twoIntsStructE7_M_addrEv = comdat any
; Function Attrs: noinline optnone uwtable
define dso_local void @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_loop_737badSinkENSt7__cxx114listIP14_twoIntsStructSaIS3_EEE(%"class.std::__cxx11::list"* %dataList) #0 {
entry:
%data = alloca %struct._twoIntsStruct*, align 8
%source = alloca [100 x %struct._twoIntsStruct], align 16
%i = alloca i64, align 8
%i2 = alloca i64, align 8
%call = call nonnull align 8 dereferenceable(8) %struct._twoIntsStruct** @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE4backEv(%"class.std::__cxx11::list"* %dataList) #5
%0 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %call, align 8
store %struct._twoIntsStruct* %0, %struct._twoIntsStruct** %data, align 8
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %entry
%1 = load i64, i64* %i, align 8
%cmp = icmp ult i64 %1, 100
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%2 = load i64, i64* %i, align 8
%arrayidx = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %2
%intOne = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %arrayidx, i32 0, i32 0
store i32 0, i32* %intOne, align 8
%3 = load i64, i64* %i, align 8
%arrayidx1 = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %3
%intTwo = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %arrayidx1, i32 0, i32 1
store i32 0, i32* %intTwo, align 4
br label %for.inc
for.inc: ; preds = %for.body
%4 = load i64, i64* %i, align 8
%inc = add i64 %4, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
store i64 0, i64* %i2, align 8
br label %for.cond3
for.cond3: ; preds = %for.inc8, %for.end
%5 = load i64, i64* %i2, align 8
%cmp4 = icmp ult i64 %5, 100
br i1 %cmp4, label %for.body5, label %for.end10
for.body5: ; preds = %for.cond3
%6 = load i64, i64* %i2, align 8
%arrayidx6 = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %6
%7 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data, align 8
%8 = load i64, i64* %i2, align 8
%arrayidx7 = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %7, i64 %8
%9 = bitcast %struct._twoIntsStruct* %arrayidx7 to i8*
%10 = bitcast %struct._twoIntsStruct* %arrayidx6 to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 %9, i8* align 8 %10, i64 8, i1 false)
br label %for.inc8
for.inc8: ; preds = %for.body5
%11 = load i64, i64* %i2, align 8
%inc9 = add i64 %11, 1
store i64 %inc9, i64* %i2, align 8
br label %for.cond3
for.end10: ; preds = %for.cond3
%12 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data, align 8
%arrayidx11 = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %12, i64 0
call void @printStructLine(%struct._twoIntsStruct* %arrayidx11)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) %struct._twoIntsStruct** @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE4backEv(%"class.std::__cxx11::list"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::__cxx11::list"*, align 8
%__tmp = alloca %"struct.std::_List_iterator", align 8
store %"class.std::__cxx11::list"* %this, %"class.std::__cxx11::list"** %this.addr, align 8
%this1 = load %"class.std::__cxx11::list"*, %"class.std::__cxx11::list"** %this.addr, align 8
%call = call %"struct.std::__detail::_List_node_base"* @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE3endEv(%"class.std::__cxx11::list"* %this1) #5
%coerce.dive = getelementptr inbounds %"struct.std::_List_iterator", %"struct.std::_List_iterator"* %__tmp, i32 0, i32 0
store %"struct.std::__detail::_List_node_base"* %call, %"struct.std::__detail::_List_node_base"** %coerce.dive, align 8
%call2 = call nonnull align 8 dereferenceable(8) %"struct.std::_List_iterator"* @_ZNSt14_List_iteratorIP14_twoIntsStructEmmEv(%"struct.std::_List_iterator"* %__tmp) #5
%call3 = call nonnull align 8 dereferenceable(8) %struct._twoIntsStruct** @_ZNKSt14_List_iteratorIP14_twoIntsStructEdeEv(%"struct.std::_List_iterator"* %__tmp) #5
ret %struct._twoIntsStruct** %call3
}
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #2
declare dso_local void @printStructLine(%struct._twoIntsStruct*) #3
; Function Attrs: noinline optnone uwtable
define dso_local void @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_loop_7311goodG2BSinkENSt7__cxx114listIP14_twoIntsStructSaIS3_EEE(%"class.std::__cxx11::list"* %dataList) #0 {
entry:
%data = alloca %struct._twoIntsStruct*, align 8
%source = alloca [100 x %struct._twoIntsStruct], align 16
%i = alloca i64, align 8
%i2 = alloca i64, align 8
%call = call nonnull align 8 dereferenceable(8) %struct._twoIntsStruct** @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE4backEv(%"class.std::__cxx11::list"* %dataList) #5
%0 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %call, align 8
store %struct._twoIntsStruct* %0, %struct._twoIntsStruct** %data, align 8
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %entry
%1 = load i64, i64* %i, align 8
%cmp = icmp ult i64 %1, 100
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%2 = load i64, i64* %i, align 8
%arrayidx = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %2
%intOne = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %arrayidx, i32 0, i32 0
store i32 0, i32* %intOne, align 8
%3 = load i64, i64* %i, align 8
%arrayidx1 = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %3
%intTwo = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %arrayidx1, i32 0, i32 1
store i32 0, i32* %intTwo, align 4
br label %for.inc
for.inc: ; preds = %for.body
%4 = load i64, i64* %i, align 8
%inc = add i64 %4, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
store i64 0, i64* %i2, align 8
br label %for.cond3
for.cond3: ; preds = %for.inc8, %for.end
%5 = load i64, i64* %i2, align 8
%cmp4 = icmp ult i64 %5, 100
br i1 %cmp4, label %for.body5, label %for.end10
for.body5: ; preds = %for.cond3
%6 = load i64, i64* %i2, align 8
%arrayidx6 = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %6
%7 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data, align 8
%8 = load i64, i64* %i2, align 8
%arrayidx7 = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %7, i64 %8
%9 = bitcast %struct._twoIntsStruct* %arrayidx7 to i8*
%10 = bitcast %struct._twoIntsStruct* %arrayidx6 to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 %9, i8* align 8 %10, i64 8, i1 false)
br label %for.inc8
for.inc8: ; preds = %for.body5
%11 = load i64, i64* %i2, align 8
%inc9 = add i64 %11, 1
store i64 %inc9, i64* %i2, align 8
br label %for.cond3
for.end10: ; preds = %for.cond3
%12 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data, align 8
%arrayidx11 = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %12, i64 0
call void @printStructLine(%struct._twoIntsStruct* %arrayidx11)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::__detail::_List_node_base"* @_ZNSt7__cxx114listIP14_twoIntsStructSaIS2_EE3endEv(%"class.std::__cxx11::list"* %this) #1 comdat align 2 {
entry:
%retval = alloca %"struct.std::_List_iterator", align 8
%this.addr = alloca %"class.std::__cxx11::list"*, align 8
store %"class.std::__cxx11::list"* %this, %"class.std::__cxx11::list"** %this.addr, align 8
%this1 = load %"class.std::__cxx11::list"*, %"class.std::__cxx11::list"** %this.addr, align 8
%0 = bitcast %"class.std::__cxx11::list"* %this1 to %"class.std::__cxx11::_List_base"*
%_M_impl = getelementptr inbounds %"class.std::__cxx11::_List_base", %"class.std::__cxx11::_List_base"* %0, i32 0, i32 0
%_M_node = getelementptr inbounds %"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl", %"struct.std::__cxx11::_List_base<_twoIntsStruct *, std::allocator<_twoIntsStruct *>>::_List_impl"* %_M_impl, i32 0, i32 0
%1 = bitcast %"struct.std::__detail::_List_node_header"* %_M_node to %"struct.std::__detail::_List_node_base"*
call void @_ZNSt14_List_iteratorIP14_twoIntsStructEC2EPNSt8__detail15_List_node_baseE(%"struct.std::_List_iterator"* %retval, %"struct.std::__detail::_List_node_base"* %1) #5
%coerce.dive = getelementptr inbounds %"struct.std::_List_iterator", %"struct.std::_List_iterator"* %retval, i32 0, i32 0
%2 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %coerce.dive, align 8
ret %"struct.std::__detail::_List_node_base"* %2
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) %"struct.std::_List_iterator"* @_ZNSt14_List_iteratorIP14_twoIntsStructEmmEv(%"struct.std::_List_iterator"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_List_iterator"*, align 8
store %"struct.std::_List_iterator"* %this, %"struct.std::_List_iterator"** %this.addr, align 8
%this1 = load %"struct.std::_List_iterator"*, %"struct.std::_List_iterator"** %this.addr, align 8
%_M_node = getelementptr inbounds %"struct.std::_List_iterator", %"struct.std::_List_iterator"* %this1, i32 0, i32 0
%0 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %_M_node, align 8
%_M_prev = getelementptr inbounds %"struct.std::__detail::_List_node_base", %"struct.std::__detail::_List_node_base"* %0, i32 0, i32 1
%1 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %_M_prev, align 8
%_M_node2 = getelementptr inbounds %"struct.std::_List_iterator", %"struct.std::_List_iterator"* %this1, i32 0, i32 0
store %"struct.std::__detail::_List_node_base"* %1, %"struct.std::__detail::_List_node_base"** %_M_node2, align 8
ret %"struct.std::_List_iterator"* %this1
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) %struct._twoIntsStruct** @_ZNKSt14_List_iteratorIP14_twoIntsStructEdeEv(%"struct.std::_List_iterator"* %this) #1 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%this.addr = alloca %"struct.std::_List_iterator"*, align 8
store %"struct.std::_List_iterator"* %this, %"struct.std::_List_iterator"** %this.addr, align 8
%this1 = load %"struct.std::_List_iterator"*, %"struct.std::_List_iterator"** %this.addr, align 8
%_M_node = getelementptr inbounds %"struct.std::_List_iterator", %"struct.std::_List_iterator"* %this1, i32 0, i32 0
%0 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %_M_node, align 8
%1 = bitcast %"struct.std::__detail::_List_node_base"* %0 to %"struct.std::_List_node"*
%call = invoke %struct._twoIntsStruct** @_ZNSt10_List_nodeIP14_twoIntsStructE9_M_valptrEv(%"struct.std::_List_node"* %1)
to label %invoke.cont unwind label %terminate.lpad
invoke.cont: ; preds = %entry
ret %struct._twoIntsStruct** %call
terminate.lpad: ; preds = %entry
%2 = landingpad { i8*, i32 }
catch i8* null
%3 = extractvalue { i8*, i32 } %2, 0
call void @__clang_call_terminate(i8* %3) #6
unreachable
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt14_List_iteratorIP14_twoIntsStructEC2EPNSt8__detail15_List_node_baseE(%"struct.std::_List_iterator"* %this, %"struct.std::__detail::_List_node_base"* %__x) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_List_iterator"*, align 8
%__x.addr = alloca %"struct.std::__detail::_List_node_base"*, align 8
store %"struct.std::_List_iterator"* %this, %"struct.std::_List_iterator"** %this.addr, align 8
store %"struct.std::__detail::_List_node_base"* %__x, %"struct.std::__detail::_List_node_base"** %__x.addr, align 8
%this1 = load %"struct.std::_List_iterator"*, %"struct.std::_List_iterator"** %this.addr, align 8
%_M_node = getelementptr inbounds %"struct.std::_List_iterator", %"struct.std::_List_iterator"* %this1, i32 0, i32 0
%0 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %__x.addr, align 8
store %"struct.std::__detail::_List_node_base"* %0, %"struct.std::__detail::_List_node_base"** %_M_node, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %struct._twoIntsStruct** @_ZNSt10_List_nodeIP14_twoIntsStructE9_M_valptrEv(%"struct.std::_List_node"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_List_node"*, align 8
store %"struct.std::_List_node"* %this, %"struct.std::_List_node"** %this.addr, align 8
%this1 = load %"struct.std::_List_node"*, %"struct.std::_List_node"** %this.addr, align 8
%_M_storage = getelementptr inbounds %"struct.std::_List_node", %"struct.std::_List_node"* %this1, i32 0, i32 1
%call = call %struct._twoIntsStruct** @_ZN9__gnu_cxx16__aligned_membufIP14_twoIntsStructE6_M_ptrEv(%"struct.__gnu_cxx::__aligned_membuf"* %_M_storage) #5
ret %struct._twoIntsStruct** %call
}
declare dso_local i32 @__gxx_personality_v0(...)
; Function Attrs: noinline noreturn nounwind
define linkonce_odr hidden void @__clang_call_terminate(i8* %0) #4 comdat {
%2 = call i8* @__cxa_begin_catch(i8* %0) #5
call void @_ZSt9terminatev() #6
unreachable
}
declare dso_local i8* @__cxa_begin_catch(i8*)
declare dso_local void @_ZSt9terminatev()
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %struct._twoIntsStruct** @_ZN9__gnu_cxx16__aligned_membufIP14_twoIntsStructE6_M_ptrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.__gnu_cxx::__aligned_membuf"*, align 8
store %"struct.__gnu_cxx::__aligned_membuf"* %this, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%this1 = load %"struct.__gnu_cxx::__aligned_membuf"*, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%call = call i8* @_ZN9__gnu_cxx16__aligned_membufIP14_twoIntsStructE7_M_addrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this1) #5
%0 = bitcast i8* %call to %struct._twoIntsStruct**
ret %struct._twoIntsStruct** %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i8* @_ZN9__gnu_cxx16__aligned_membufIP14_twoIntsStructE7_M_addrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.__gnu_cxx::__aligned_membuf"*, align 8
store %"struct.__gnu_cxx::__aligned_membuf"* %this, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%this1 = load %"struct.__gnu_cxx::__aligned_membuf"*, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%_M_storage = getelementptr inbounds %"struct.__gnu_cxx::__aligned_membuf", %"struct.__gnu_cxx::__aligned_membuf"* %this1, i32 0, i32 0
%0 = bitcast [8 x i8]* %_M_storage to i8*
ret i8* %0
}
attributes #0 = { noinline 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" }
attributes #1 = { 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" }
attributes #2 = { argmemonly nounwind willreturn }
attributes #3 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #4 = { noinline noreturn nounwind }
attributes #5 = { nounwind }
attributes #6 = { noreturn nounwind }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_f = local_unnamed_addr constant [3 x i8] c"%(\00"
@global_var_280 = local_unnamed_addr constant i64 955610320750919936
@global_var_1d8 = constant [21 x i8] c"Benign, fixed string\00"
@global_var_1d4 = local_unnamed_addr global i32 1
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%0 = alloca i32*
%rax.0.reg2mem = alloca i64, !insn.addr !0
%1 = load i32*, i32** %0
%stack_var_-424 = alloca i64, align 8
%2 = call i64 @__readfsqword(i64 40), !insn.addr !1
%3 = load i32, i32* inttoptr (i64 468 to i32*), align 4, !insn.addr !2
%4 = icmp eq i32 %3, 0, !insn.addr !3
br i1 %4, label %dec_label_pc_32, label %dec_label_pc_24, !insn.addr !4
dec_label_pc_24: ; preds = %dec_label_pc_0
%5 = zext i32 %3 to i64, !insn.addr !2
ret i64 %5, !insn.addr !4
dec_label_pc_32: ; preds = %dec_label_pc_0
%6 = bitcast i64* %stack_var_-424 to i8*, !insn.addr !5
call void @__asm_rep_stosq_memset(i8* nonnull %6, i64 0, i64 50), !insn.addr !5
%7 = ptrtoint i32* %1 to i64, !insn.addr !6
%8 = call i64 @memmove(i64 %7, i64* nonnull %stack_var_-424, i64 400, i64* nonnull %stack_var_-424), !insn.addr !7
%9 = load i32, i32* %1, align 4, !insn.addr !8
%10 = zext i32 %9 to i64, !insn.addr !9
%11 = call i64 @printIntLine(i64 %10), !insn.addr !10
%12 = call i64 @__readfsqword(i64 40), !insn.addr !11
%13 = icmp eq i64 %2, %12, !insn.addr !11
store i64 0, i64* %rax.0.reg2mem, !insn.addr !12
br i1 %13, label %dec_label_pc_8c, label %dec_label_pc_87, !insn.addr !12
dec_label_pc_87: ; preds = %dec_label_pc_32
%14 = call i64 @__stack_chk_fail(), !insn.addr !13
store i64 %14, i64* %rax.0.reg2mem, !insn.addr !13
br label %dec_label_pc_8c, !insn.addr !13
dec_label_pc_8c: ; preds = %dec_label_pc_87, %dec_label_pc_32
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !14
}
define i64 @goodG2B1() local_unnamed_addr {
dec_label_pc_8e:
%0 = alloca i32*
%rax.0.reg2mem = alloca i64, !insn.addr !15
%stack_var_-424 = alloca i64, align 8
%1 = load i32*, i32** %0
%2 = call i64 @__readfsqword(i64 40), !insn.addr !16
%3 = call i64 @printLine(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @global_var_1d8, i64 0, i64 0)), !insn.addr !17
%4 = bitcast i64* %stack_var_-424 to i8*, !insn.addr !18
call void @__asm_rep_stosq_memset(i8* nonnull %4, i64 0, i64 50), !insn.addr !18
%5 = ptrtoint i32* %1 to i64, !insn.addr !19
%6 = call i64 @memmove(i64 %5, i64* nonnull %stack_var_-424, i64 400, i64* nonnull %stack_var_-424), !insn.addr !20
%7 = load i32, i32* %1, align 4, !insn.addr !21
%8 = zext i32 %7 to i64, !insn.addr !22
%9 = call i64 @printIntLine(i64 %8), !insn.addr !23
%10 = call i64 @__readfsqword(i64 40), !insn.addr !24
%11 = icmp eq i64 %2, %10, !insn.addr !24
store i64 0, i64* %rax.0.reg2mem, !insn.addr !25
br i1 %11, label %dec_label_pc_128, label %dec_label_pc_123, !insn.addr !25
dec_label_pc_123: ; preds = %dec_label_pc_8e
%12 = call i64 @__stack_chk_fail(), !insn.addr !26
store i64 %12, i64* %rax.0.reg2mem, !insn.addr !26
br label %dec_label_pc_128, !insn.addr !26
dec_label_pc_128: ; preds = %dec_label_pc_123, %dec_label_pc_8e
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !27
}
define i64 @goodG2B2() local_unnamed_addr {
dec_label_pc_12a:
%0 = alloca i32*
%rax.0.reg2mem = alloca i64, !insn.addr !28
%stack_var_-424 = alloca i64, align 8
%1 = load i32*, i32** %0
%stack_var_-824 = alloca i64, align 8
%2 = call i64 @__readfsqword(i64 40), !insn.addr !29
%3 = load i32, i32* @global_var_1d4, align 4, !insn.addr !30
%4 = icmp eq i32 %3, 0, !insn.addr !31
%5 = bitcast i64* %stack_var_-824 to i32*
%spec.select = select i1 %4, i32* %1, i32* %5
%6 = bitcast i64* %stack_var_-424 to i8*, !insn.addr !32
call void @__asm_rep_stosq_memset(i8* nonnull %6, i64 0, i64 50), !insn.addr !32
%7 = ptrtoint i32* %spec.select to i64, !insn.addr !33
%8 = call i64 @memmove(i64 %7, i64* nonnull %stack_var_-424, i64 400, i64* nonnull %stack_var_-424), !insn.addr !34
%9 = load i32, i32* %spec.select, align 4, !insn.addr !35
%10 = zext i32 %9 to i64, !insn.addr !36
%11 = call i64 @printIntLine(i64 %10), !insn.addr !37
%12 = call i64 @__readfsqword(i64 40), !insn.addr !38
%13 = icmp eq i64 %2, %12, !insn.addr !38
store i64 0, i64* %rax.0.reg2mem, !insn.addr !39
br i1 %13, label %dec_label_pc_1b6, label %dec_label_pc_1b1, !insn.addr !39
dec_label_pc_1b1: ; preds = %dec_label_pc_12a
%14 = call i64 @__stack_chk_fail(), !insn.addr !40
store i64 %14, i64* %rax.0.reg2mem, !insn.addr !40
br label %dec_label_pc_1b6, !insn.addr !40
dec_label_pc_1b6: ; preds = %dec_label_pc_1b1, %dec_label_pc_12a
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !41
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove_05_good() local_unnamed_addr {
dec_label_pc_1b8:
%0 = call i64 @goodG2B1(), !insn.addr !42
%1 = call i64 @goodG2B2(), !insn.addr !43
ret i64 %1, !insn.addr !44
}
declare i64 @memmove(i64, i64*, i64, i64*) local_unnamed_addr
declare i64 @printIntLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @printLine(i8*) local_unnamed_addr
declare void @__asm_rep_stosq_memset(i8*, i64, i64) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 0}
!1 = !{i64 11}
!2 = !{i64 26}
!3 = !{i64 32}
!4 = !{i64 34}
!5 = !{i64 70}
!6 = !{i64 80}
!7 = !{i64 98}
!8 = !{i64 110}
!9 = !{i64 112}
!10 = !{i64 114}
!11 = !{i64 124}
!12 = !{i64 133}
!13 = !{i64 135}
!14 = !{i64 141}
!15 = !{i64 142}
!16 = !{i64 153}
!17 = !{i64 185}
!18 = !{i64 226}
!19 = !{i64 236}
!20 = !{i64 254}
!21 = !{i64 266}
!22 = !{i64 268}
!23 = !{i64 270}
!24 = !{i64 280}
!25 = !{i64 289}
!26 = !{i64 291}
!27 = !{i64 297}
!28 = !{i64 298}
!29 = !{i64 309}
!30 = !{i64 324}
!31 = !{i64 330}
!32 = !{i64 368}
!33 = !{i64 378}
!34 = !{i64 396}
!35 = !{i64 408}
!36 = !{i64 410}
!37 = !{i64 412}
!38 = !{i64 422}
!39 = !{i64 431}
!40 = !{i64 433}
!41 = !{i64 439}
!42 = !{i64 449}
!43 = !{i64 459}
!44 = !{i64 466}
### Assistant: @staticTrue = internal global i32 1, align 4
@staticFalse = internal global i32 0, align 4
@.str = private unnamed_addr constant [21 x i8] c"Benign, fixed string\00", align 1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove_05_bad() #0 {
entry:
%data = alloca i32*, align 8
%dataBadBuffer = alloca [50 x i32], align 16
%dataGoodBuffer = alloca [100 x i32], align 16
%source = alloca [100 x i32], align 16
%0 = load i32, i32* @staticTrue, align 4
%tobool = icmp ne i32 %0, 0
br i1 %tobool, label %if.then, label %if.end
if.then: ; preds = %entry
%arraydecay = getelementptr inbounds [50 x i32], [50 x i32]* %dataBadBuffer, i64 0, i64 0
store i32* %arraydecay, i32** %data, align 8
br label %if.end
if.end: ; preds = %if.then, %entry
%1 = bitcast [100 x i32]* %source to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %1, i8 0, i64 400, i1 false)
%2 = load i32*, i32** %data, align 8
%3 = bitcast i32* %2 to i8*
%arraydecay1 = getelementptr inbounds [100 x i32], [100 x i32]* %source, i64 0, i64 0
%4 = bitcast i32* %arraydecay1 to i8*
call void @llvm.memmove.p0i8.p0i8.i64(i8* align 4 %3, i8* align 16 %4, i64 400, i1 false)
%5 = load i32*, i32** %data, align 8
%arrayidx = getelementptr inbounds i32, i32* %5, i64 0
%6 = load i32, i32* %arrayidx, align 4
call void @printIntLine(i32 %6)
ret void
}
; Function Attrs: argmemonly nounwind willreturn writeonly
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #1
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memmove.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i1 immarg) #2
declare dso_local void @printIntLine(i32) #3
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove_05_good() #0 {
entry:
call void @goodG2B1()
call void @goodG2B2()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B1() #0 {
entry:
%data = alloca i32*, align 8
%dataBadBuffer = alloca [50 x i32], align 16
%dataGoodBuffer = alloca [100 x i32], align 16
%source = alloca [100 x i32], align 16
%0 = load i32, i32* @staticFalse, align 4
%tobool = icmp ne i32 %0, 0
br i1 %tobool, label %if.then, label %if.else
if.then: ; preds = %entry
call void @printLine(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
br label %if.end
if.else: ; preds = %entry
%arraydecay = getelementptr inbounds [100 x i32], [100 x i32]* %dataGoodBuffer, i64 0, i64 0
store i32* %arraydecay, i32** %data, align 8
br label %if.end
if.end: ; preds = %if.else, %if.then
%1 = bitcast [100 x i32]* %source to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %1, i8 0, i64 400, i1 false)
%2 = load i32*, i32** %data, align 8
%3 = bitcast i32* %2 to i8*
%arraydecay1 = getelementptr inbounds [100 x i32], [100 x i32]* %source, i64 0, i64 0
%4 = bitcast i32* %arraydecay1 to i8*
call void @llvm.memmove.p0i8.p0i8.i64(i8* align 4 %3, i8* align 16 %4, i64 400, i1 false)
%5 = load i32*, i32** %data, align 8
%arrayidx = getelementptr inbounds i32, i32* %5, i64 0
%6 = load i32, i32* %arrayidx, align 4
call void @printIntLine(i32 %6)
ret void
}
declare dso_local void @printLine(i8*) #3
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B2() #0 {
entry:
%data = alloca i32*, align 8
%dataBadBuffer = alloca [50 x i32], align 16
%dataGoodBuffer = alloca [100 x i32], align 16
%source = alloca [100 x i32], align 16
%0 = load i32, i32* @staticTrue, align 4
%tobool = icmp ne i32 %0, 0
br i1 %tobool, label %if.then, label %if.end
if.then: ; preds = %entry
%arraydecay = getelementptr inbounds [100 x i32], [100 x i32]* %dataGoodBuffer, i64 0, i64 0
store i32* %arraydecay, i32** %data, align 8
br label %if.end
if.end: ; preds = %if.then, %entry
%1 = bitcast [100 x i32]* %source to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %1, i8 0, i64 400, i1 false)
%2 = load i32*, i32** %data, align 8
%3 = bitcast i32* %2 to i8*
%arraydecay1 = getelementptr inbounds [100 x i32], [100 x i32]* %source, i64 0, i64 0
%4 = bitcast i32* %arraydecay1 to i8*
call void @llvm.memmove.p0i8.p0i8.i64(i8* align 4 %3, i8* align 16 %4, i64 400, i1 false)
%5 = load i32*, i32** %data, align 8
%arrayidx = getelementptr inbounds i32, i32* %5, i64 0
%6 = load i32, i32* %arrayidx, align 4
call void @printIntLine(i32 %6)
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" }
attributes #1 = { argmemonly nounwind willreturn writeonly }
attributes #2 = { argmemonly nounwind willreturn }
attributes #3 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
define i64 @_GLOBAL_OFFSET_TABLE_.1(i64 %arg1) local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
ret i64 4702111234474983745, !insn.addr !1
}
define i64 @function_30() local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !2
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = call i64 @strlen(i64 %2), !insn.addr !3
%4 = add i64 %3, 1, !insn.addr !4
%5 = add i64 %1, -19, !insn.addr !5
%6 = add i64 %1, -40, !insn.addr !6
%7 = inttoptr i64 %6 to i64*, !insn.addr !6
%8 = load i64, i64* %7, align 8, !insn.addr !6
%9 = call i64 @strncpy(i64 %8, i64 %5, i64 %4, i64 %5), !insn.addr !7
%10 = load i64, i64* %7, align 8, !insn.addr !8
%11 = call i64 @printLine(i64 %10), !insn.addr !9
%12 = add i64 %1, -8, !insn.addr !10
%13 = inttoptr i64 %12 to i64*, !insn.addr !10
%14 = load i64, i64* %13, align 8, !insn.addr !10
%15 = call i64 @__readfsqword(i64 40), !insn.addr !11
%16 = icmp eq i64 %14, %15, !insn.addr !11
store i64 0, i64* %rax.0.reg2mem, !insn.addr !12
br i1 %16, label %dec_label_pc_77, label %dec_label_pc_72, !insn.addr !12
dec_label_pc_72: ; preds = %dec_label_pc_30
%17 = call i64 @__stack_chk_fail(), !insn.addr !13
store i64 %17, i64* %rax.0.reg2mem, !insn.addr !13
br label %dec_label_pc_77, !insn.addr !13
dec_label_pc_77: ; preds = %dec_label_pc_72, %dec_label_pc_30
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !14
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_ncpy_65b_goodG2BSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_79:
%rax.0.reg2mem = alloca i64, !insn.addr !15
%stack_var_-27 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !16
store i64 4702111234474983745, i64* %stack_var_-27, align 8, !insn.addr !17
%1 = ptrtoint i64* %stack_var_-27 to i64, !insn.addr !18
%2 = call i64 @strlen(i64 %1), !insn.addr !19
%3 = add i64 %2, 1, !insn.addr !20
%4 = call i64 @strncpy(i64 %arg1, i64 %1, i64 %3, i64 %1), !insn.addr !21
%5 = call i64 @printLine(i64 %arg1), !insn.addr !22
%6 = call i64 @__readfsqword(i64 40), !insn.addr !23
%7 = icmp eq i64 %0, %6, !insn.addr !23
store i64 0, i64* %rax.0.reg2mem, !insn.addr !24
br i1 %7, label %dec_label_pc_f0, label %dec_label_pc_eb, !insn.addr !24
dec_label_pc_eb: ; preds = %dec_label_pc_79
%8 = call i64 @__stack_chk_fail(), !insn.addr !25
store i64 %8, i64* %rax.0.reg2mem, !insn.addr !25
br label %dec_label_pc_f0, !insn.addr !25
dec_label_pc_f0: ; preds = %dec_label_pc_eb, %dec_label_pc_79
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !26
}
declare i64 @strlen(i64) local_unnamed_addr
declare i64 @strncpy(i64, i64, i64, i64) local_unnamed_addr
declare i64 @printLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 12}
!1 = !{i64 27}
!2 = !{i64 48}
!3 = !{i64 58}
!4 = !{i64 63}
!5 = !{i64 67}
!6 = !{i64 71}
!7 = !{i64 81}
!8 = !{i64 86}
!9 = !{i64 93}
!10 = !{i64 99}
!11 = !{i64 103}
!12 = !{i64 112}
!13 = !{i64 114}
!14 = !{i64 120}
!15 = !{i64 121}
!16 = !{i64 133}
!17 = !{i64 158}
!18 = !{i64 176}
!19 = !{i64 179}
!20 = !{i64 184}
!21 = !{i64 202}
!22 = !{i64 214}
!23 = !{i64 224}
!24 = !{i64 233}
!25 = !{i64 235}
!26 = !{i64 241}
### Assistant: @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_ncpy_65b_badSink.source = private unnamed_addr constant [11 x i8] c"AAAAAAAAAA\00", align 1
@__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_ncpy_65b_goodG2BSink.source = private unnamed_addr constant [11 x i8] c"AAAAAAAAAA\00", align 1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_ncpy_65b_badSink(i8* %data) #0 {
entry:
%data.addr = alloca i8*, align 8
%source = alloca [11 x i8], align 1
store i8* %data, i8** %data.addr, align 8
%0 = bitcast [11 x i8]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %0, i8* align 1 getelementptr inbounds ([11 x i8], [11 x i8]* @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_ncpy_65b_badSink.source, i32 0, i32 0), i64 11, i1 false)
%1 = load i8*, i8** %data.addr, align 8
%arraydecay = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%arraydecay1 = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%call = call i64 @strlen(i8* %arraydecay1) #5
%add = add i64 %call, 1
%call2 = call i8* @strncpy(i8* %1, i8* %arraydecay, i64 %add) #6
%2 = load i8*, i8** %data.addr, align 8
call void @printLine(i8* %2)
ret void
}
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #1
; Function Attrs: nounwind
declare dso_local i8* @strncpy(i8*, i8*, i64) #2
; Function Attrs: nounwind readonly
declare dso_local i64 @strlen(i8*) #3
declare dso_local void @printLine(i8*) #4
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_ncpy_65b_goodG2BSink(i8* %data) #0 {
entry:
%data.addr = alloca i8*, align 8
%source = alloca [11 x i8], align 1
store i8* %data, i8** %data.addr, align 8
%0 = bitcast [11 x i8]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %0, i8* align 1 getelementptr inbounds ([11 x i8], [11 x i8]* @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_ncpy_65b_goodG2BSink.source, i32 0, i32 0), i64 11, i1 false)
%1 = load i8*, i8** %data.addr, align 8
%arraydecay = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%arraydecay1 = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%call = call i64 @strlen(i8* %arraydecay1) #5
%add = add i64 %call, 1
%call2 = call i8* @strncpy(i8* %1, i8* %arraydecay, i64 %add) #6
%2 = load i8*, i8** %data.addr, align 8
call void @printLine(i8* %2)
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" }
attributes #1 = { argmemonly nounwind willreturn }
attributes #2 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #3 = { nounwind readonly "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #4 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #5 = { nounwind readonly }
attributes #6 = { nounwind }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_f = local_unnamed_addr constant [3 x i8] c"%(\00"
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%stack_var_-184 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
%1 = ptrtoint i64* %stack_var_-184 to i64, !insn.addr !1
ret i64 %1, !insn.addr !2
}
define i64 @function_30() local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%.reg2mem = alloca i64, !insn.addr !3
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = trunc i64 %2 to i8
%4 = mul i8 %3, 2, !insn.addr !3
%5 = inttoptr i64 %2 to i8*, !insn.addr !3
store i8 %4, i8* %5, align 1, !insn.addr !3
%6 = add i64 %1, -112, !insn.addr !4
%7 = call i64 @memset(i64 %6, i64 67, i64 99), !insn.addr !5
%8 = add i64 %1, -13, !insn.addr !6
%9 = inttoptr i64 %8 to i8*, !insn.addr !6
store i8 0, i8* %9, align 1, !insn.addr !6
%10 = add i64 %1, -184, !insn.addr !7
%11 = inttoptr i64 %10 to i64*, !insn.addr !7
%12 = load i64, i64* %11, align 8, !insn.addr !7
%13 = call i64 @memmove(i64 %12, i64 %6, i64 100, i64 %6), !insn.addr !8
%14 = load i64, i64* %11, align 8, !insn.addr !9
%15 = add i64 %14, 99, !insn.addr !10
%16 = inttoptr i64 %15 to i8*, !insn.addr !11
store i8 0, i8* %16, align 1, !insn.addr !11
%17 = load i64, i64* %11, align 8, !insn.addr !12
%18 = call i64 @printLine(i64 %17), !insn.addr !13
%19 = add i64 %1, -8, !insn.addr !14
%20 = inttoptr i64 %19 to i64*, !insn.addr !14
%21 = load i64, i64* %20, align 8, !insn.addr !14
%22 = call i64 @__readfsqword(i64 40), !insn.addr !15
%23 = icmp eq i64 %22, %21, !insn.addr !15
store i64 0, i64* %.reg2mem, !insn.addr !16
br i1 %23, label %dec_label_pc_99, label %dec_label_pc_94, !insn.addr !16
dec_label_pc_94: ; preds = %dec_label_pc_30
%24 = call i64 @__stack_chk_fail(), !insn.addr !17
store i64 %24, i64* %.reg2mem, !insn.addr !17
br label %dec_label_pc_99, !insn.addr !17
dec_label_pc_99: ; preds = %dec_label_pc_94, %dec_label_pc_30
%.reload = load i64, i64* %.reg2mem, !insn.addr !18
ret i64 %.reload, !insn.addr !18
}
define i64 @goodG2B1() local_unnamed_addr {
dec_label_pc_9b:
%rax.0.reg2mem = alloca i64, !insn.addr !19
%stack_var_-120 = alloca i64, align 8
%stack_var_-232 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !20
%1 = ptrtoint i64* %stack_var_-232 to i64, !insn.addr !21
%2 = bitcast i64* %stack_var_-232 to i8*, !insn.addr !22
store i8 0, i8* %2, align 8, !insn.addr !22
%3 = ptrtoint i64* %stack_var_-120 to i64, !insn.addr !23
%4 = call i64 @memset(i64 %3, i64 67, i64 99), !insn.addr !24
%5 = call i64 @memmove(i64 %1, i64 %3, i64 100, i64 %3), !insn.addr !25
%6 = add i64 %1, 99, !insn.addr !26
%7 = inttoptr i64 %6 to i8*, !insn.addr !27
store i8 0, i8* %7, align 1, !insn.addr !27
%8 = call i64 @printLine(i64 %1), !insn.addr !28
%9 = call i64 @__readfsqword(i64 40), !insn.addr !29
%10 = icmp eq i64 %0, %9, !insn.addr !29
store i64 0, i64* %rax.0.reg2mem, !insn.addr !30
br i1 %10, label %dec_label_pc_134, label %dec_label_pc_12f, !insn.addr !30
dec_label_pc_12f: ; preds = %dec_label_pc_9b
%11 = call i64 @__stack_chk_fail(), !insn.addr !31
store i64 %11, i64* %rax.0.reg2mem, !insn.addr !31
br label %dec_label_pc_134, !insn.addr !31
dec_label_pc_134: ; preds = %dec_label_pc_12f, %dec_label_pc_9b
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !32
}
define i64 @goodG2B2() local_unnamed_addr {
dec_label_pc_136:
%rax.0.reg2mem = alloca i64, !insn.addr !33
%stack_var_-120 = alloca i64, align 8
%stack_var_-232 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !34
%1 = ptrtoint i64* %stack_var_-232 to i64, !insn.addr !35
%2 = bitcast i64* %stack_var_-232 to i8*, !insn.addr !36
store i8 0, i8* %2, align 8, !insn.addr !36
%3 = ptrtoint i64* %stack_var_-120 to i64, !insn.addr !37
%4 = call i64 @memset(i64 %3, i64 67, i64 99), !insn.addr !38
%5 = call i64 @memmove(i64 %1, i64 %3, i64 100, i64 %3), !insn.addr !39
%6 = add i64 %1, 99, !insn.addr !40
%7 = inttoptr i64 %6 to i8*, !insn.addr !41
store i8 0, i8* %7, align 1, !insn.addr !41
%8 = call i64 @printLine(i64 %1), !insn.addr !42
%9 = call i64 @__readfsqword(i64 40), !insn.addr !43
%10 = icmp eq i64 %0, %9, !insn.addr !43
store i64 0, i64* %rax.0.reg2mem, !insn.addr !44
br i1 %10, label %dec_label_pc_1cf, label %dec_label_pc_1ca, !insn.addr !44
dec_label_pc_1ca: ; preds = %dec_label_pc_136
%11 = call i64 @__stack_chk_fail(), !insn.addr !45
store i64 %11, i64* %rax.0.reg2mem, !insn.addr !45
br label %dec_label_pc_1cf, !insn.addr !45
dec_label_pc_1cf: ; preds = %dec_label_pc_1ca, %dec_label_pc_136
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !46
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memmove_03_good() local_unnamed_addr {
dec_label_pc_1d1:
%0 = call i64 @goodG2B1(), !insn.addr !47
%1 = call i64 @goodG2B2(), !insn.addr !48
ret i64 %1, !insn.addr !49
}
declare i64 @memset(i64, i64, i64) local_unnamed_addr
declare i64 @memmove(i64, i64, i64, i64) local_unnamed_addr
declare i64 @printLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 11}
!1 = !{i64 26}
!2 = !{i64 33}
!3 = !{i64 48}
!4 = !{i64 50}
!5 = !{i64 67}
!6 = !{i64 72}
!7 = !{i64 80}
!8 = !{i64 98}
!9 = !{i64 103}
!10 = !{i64 110}
!11 = !{i64 114}
!12 = !{i64 117}
!13 = !{i64 127}
!14 = !{i64 133}
!15 = !{i64 137}
!16 = !{i64 146}
!17 = !{i64 148}
!18 = !{i64 154}
!19 = !{i64 155}
!20 = !{i64 166}
!21 = !{i64 188}
!22 = !{i64 202}
!23 = !{i64 219}
!24 = !{i64 222}
!25 = !{i64 253}
!26 = !{i64 265}
!27 = !{i64 269}
!28 = !{i64 282}
!29 = !{i64 292}
!30 = !{i64 301}
!31 = !{i64 303}
!32 = !{i64 309}
!33 = !{i64 310}
!34 = !{i64 321}
!35 = !{i64 343}
!36 = !{i64 357}
!37 = !{i64 374}
!38 = !{i64 377}
!39 = !{i64 408}
!40 = !{i64 420}
!41 = !{i64 424}
!42 = !{i64 437}
!43 = !{i64 447}
!44 = !{i64 456}
!45 = !{i64 458}
!46 = !{i64 464}
!47 = !{i64 474}
!48 = !{i64 484}
!49 = !{i64 491}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memmove_03_bad() #0 {
entry:
%data = alloca i8*, align 8
%dataBadBuffer = alloca [50 x i8], align 16
%dataGoodBuffer = alloca [100 x i8], align 16
%source = alloca [100 x i8], align 16
%arraydecay = getelementptr inbounds [50 x i8], [50 x i8]* %dataBadBuffer, i64 0, i64 0
store i8* %arraydecay, i8** %data, align 8
%0 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %0, i64 0
store i8 0, i8* %arrayidx, align 1
%arraydecay1 = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
call void @llvm.memset.p0i8.i64(i8* align 16 %arraydecay1, i8 67, i64 99, i1 false)
%arrayidx2 = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 99
store i8 0, i8* %arrayidx2, align 1
%1 = load i8*, i8** %data, align 8
%arraydecay3 = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
call void @llvm.memmove.p0i8.p0i8.i64(i8* align 1 %1, i8* align 16 %arraydecay3, i64 100, i1 false)
%2 = load i8*, i8** %data, align 8
%arrayidx4 = getelementptr inbounds i8, i8* %2, i64 99
store i8 0, i8* %arrayidx4, align 1
%3 = load i8*, i8** %data, align 8
call void @printLine(i8* %3)
ret void
}
; Function Attrs: argmemonly nounwind willreturn writeonly
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #1
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memmove.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i1 immarg) #2
declare dso_local void @printLine(i8*) #3
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memmove_03_good() #0 {
entry:
call void @goodG2B1()
call void @goodG2B2()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B1() #0 {
entry:
%data = alloca i8*, align 8
%dataBadBuffer = alloca [50 x i8], align 16
%dataGoodBuffer = alloca [100 x i8], align 16
%source = alloca [100 x i8], align 16
%arraydecay = getelementptr inbounds [100 x i8], [100 x i8]* %dataGoodBuffer, i64 0, i64 0
store i8* %arraydecay, i8** %data, align 8
%0 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %0, i64 0
store i8 0, i8* %arrayidx, align 1
%arraydecay1 = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
call void @llvm.memset.p0i8.i64(i8* align 16 %arraydecay1, i8 67, i64 99, i1 false)
%arrayidx2 = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 99
store i8 0, i8* %arrayidx2, align 1
%1 = load i8*, i8** %data, align 8
%arraydecay3 = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
call void @llvm.memmove.p0i8.p0i8.i64(i8* align 1 %1, i8* align 16 %arraydecay3, i64 100, i1 false)
%2 = load i8*, i8** %data, align 8
%arrayidx4 = getelementptr inbounds i8, i8* %2, i64 99
store i8 0, i8* %arrayidx4, align 1
%3 = load i8*, i8** %data, align 8
call void @printLine(i8* %3)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B2() #0 {
entry:
%data = alloca i8*, align 8
%dataBadBuffer = alloca [50 x i8], align 16
%dataGoodBuffer = alloca [100 x i8], align 16
%source = alloca [100 x i8], align 16
%arraydecay = getelementptr inbounds [100 x i8], [100 x i8]* %dataGoodBuffer, i64 0, i64 0
store i8* %arraydecay, i8** %data, align 8
%0 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %0, i64 0
store i8 0, i8* %arrayidx, align 1
%arraydecay1 = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
call void @llvm.memset.p0i8.i64(i8* align 16 %arraydecay1, i8 67, i64 99, i1 false)
%arrayidx2 = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 99
store i8 0, i8* %arrayidx2, align 1
%1 = load i8*, i8** %data, align 8
%arraydecay3 = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
call void @llvm.memmove.p0i8.p0i8.i64(i8* align 1 %1, i8* align 16 %arraydecay3, i64 100, i1 false)
%2 = load i8*, i8** %data, align 8
%arrayidx4 = getelementptr inbounds i8, i8* %2, i64 99
store i8 0, i8* %arrayidx4, align 1
%3 = load i8*, i8** %data, align 8
call void @printLine(i8* %3)
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" }
attributes #1 = { argmemonly nounwind willreturn writeonly }
attributes #2 = { argmemonly nounwind willreturn }
attributes #3 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_f = local_unnamed_addr constant [3 x i8] c"%(\00"
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
%1 = load i64, i64* inttoptr (i64 33 to i64*), align 8, !insn.addr !1
ret i64 %1, !insn.addr !2
}
define i64 @function_30() local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !3
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = trunc i64 %2 to i32, !insn.addr !3
%4 = add i64 %1, -824, !insn.addr !3
%5 = inttoptr i64 %4 to i32*, !insn.addr !3
store i32 %3, i32* %5, align 4, !insn.addr !3
%6 = add i64 %1, -8, !insn.addr !4
%7 = inttoptr i64 %6 to i64*, !insn.addr !4
%8 = load i64, i64* %7, align 8, !insn.addr !4
%9 = call i64 @__readfsqword(i64 40), !insn.addr !5
%10 = icmp eq i64 %8, %9, !insn.addr !5
store i64 0, i64* %rax.0.reg2mem, !insn.addr !6
br i1 %10, label %dec_label_pc_5e, label %dec_label_pc_59, !insn.addr !6
dec_label_pc_59: ; preds = %dec_label_pc_30
%11 = call i64 @__stack_chk_fail(), !insn.addr !7
store i64 %11, i64* %rax.0.reg2mem, !insn.addr !7
br label %dec_label_pc_5e, !insn.addr !7
dec_label_pc_5e: ; preds = %dec_label_pc_59, %dec_label_pc_30
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !8
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_60:
%rax.0.reg2mem = alloca i64, !insn.addr !9
%0 = call i64 @__readfsqword(i64 40), !insn.addr !10
%1 = call i64 @__readfsqword(i64 40), !insn.addr !11
%2 = icmp eq i64 %0, %1, !insn.addr !11
store i64 0, i64* %rax.0.reg2mem, !insn.addr !12
br i1 %2, label %dec_label_pc_be, label %dec_label_pc_b9, !insn.addr !12
dec_label_pc_b9: ; preds = %dec_label_pc_60
%3 = call i64 @__stack_chk_fail(), !insn.addr !13
store i64 %3, i64* %rax.0.reg2mem, !insn.addr !13
br label %dec_label_pc_be, !insn.addr !13
dec_label_pc_be: ; preds = %dec_label_pc_b9, %dec_label_pc_60
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !14
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_loop_65_good() local_unnamed_addr {
dec_label_pc_c0:
%0 = call i64 @goodG2B(), !insn.addr !15
ret i64 %0, !insn.addr !16
}
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 11}
!1 = !{i64 26}
!2 = !{i64 33}
!3 = !{i64 48}
!4 = !{i64 74}
!5 = !{i64 78}
!6 = !{i64 87}
!7 = !{i64 89}
!8 = !{i64 95}
!9 = !{i64 96}
!10 = !{i64 107}
!11 = !{i64 174}
!12 = !{i64 183}
!13 = !{i64 185}
!14 = !{i64 191}
!15 = !{i64 201}
!16 = !{i64 208}
### Assistant: %struct._twoIntsStruct = type { i32, i32 }
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_loop_65_bad() #0 {
entry:
%data = alloca %struct._twoIntsStruct*, align 8
%funcPtr = alloca void (%struct._twoIntsStruct*)*, align 8
%dataBadBuffer = alloca [50 x %struct._twoIntsStruct], align 16
%dataGoodBuffer = alloca [100 x %struct._twoIntsStruct], align 16
store void (%struct._twoIntsStruct*)* @CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_loop_65b_badSink, void (%struct._twoIntsStruct*)** %funcPtr, align 8
%arraydecay = getelementptr inbounds [50 x %struct._twoIntsStruct], [50 x %struct._twoIntsStruct]* %dataBadBuffer, i64 0, i64 0
store %struct._twoIntsStruct* %arraydecay, %struct._twoIntsStruct** %data, align 8
%0 = load void (%struct._twoIntsStruct*)*, void (%struct._twoIntsStruct*)** %funcPtr, align 8
%1 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data, align 8
call void %0(%struct._twoIntsStruct* %1)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_loop_65b_badSink(%struct._twoIntsStruct*) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_loop_65_good() #0 {
entry:
call void @goodG2B()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B() #0 {
entry:
%data = alloca %struct._twoIntsStruct*, align 8
%funcPtr = alloca void (%struct._twoIntsStruct*)*, align 8
%dataBadBuffer = alloca [50 x %struct._twoIntsStruct], align 16
%dataGoodBuffer = alloca [100 x %struct._twoIntsStruct], align 16
store void (%struct._twoIntsStruct*)* @CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_loop_65b_goodG2BSink, void (%struct._twoIntsStruct*)** %funcPtr, align 8
%arraydecay = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %dataGoodBuffer, i64 0, i64 0
store %struct._twoIntsStruct* %arraydecay, %struct._twoIntsStruct** %data, align 8
%0 = load void (%struct._twoIntsStruct*)*, void (%struct._twoIntsStruct*)** %funcPtr, align 8
%1 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data, align 8
call void %0(%struct._twoIntsStruct* %1)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_loop_65b_goodG2BSink(%struct._twoIntsStruct*) #1
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" }
attributes #1 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%stack_var_-37 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
%1 = ptrtoint i64* %stack_var_-37 to i64, !insn.addr !1
ret i64 %1, !insn.addr !2
}
define i64 @function_30() local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !3
%1 = load i64, i64* %0
%2 = add i64 %1, -19, !insn.addr !3
%3 = inttoptr i64 %2 to i64*, !insn.addr !3
%4 = add i64 %1, -11, !insn.addr !4
%5 = inttoptr i64 %4 to i16*, !insn.addr !4
store i16 16705, i16* %5, align 2, !insn.addr !4
%6 = add i64 %1, -9, !insn.addr !5
%7 = inttoptr i64 %6 to i8*, !insn.addr !5
store i8 0, i8* %7, align 1, !insn.addr !5
%8 = add i64 %1, -40, !insn.addr !6
%9 = inttoptr i64 %8 to i64*, !insn.addr !6
%10 = load i64, i64* %9, align 8, !insn.addr !6
%11 = call i64 @strcpy(i64 %10, i64 %2, i64 %2), !insn.addr !7
%12 = load i64, i64* %9, align 8, !insn.addr !8
%13 = call i64 @printLine(i64 %12), !insn.addr !9
%14 = add i64 %1, -8, !insn.addr !10
%15 = inttoptr i64 %14 to i64*, !insn.addr !10
%16 = load i64, i64* %15, align 8, !insn.addr !10
%17 = call i64 @__readfsqword(i64 40), !insn.addr !11
%18 = icmp eq i64 %16, %17, !insn.addr !11
store i64 0, i64* %rax.0.reg2mem, !insn.addr !12
br i1 %18, label %dec_label_pc_72, label %dec_label_pc_6d, !insn.addr !12
dec_label_pc_6d: ; preds = %dec_label_pc_30
%19 = call i64 @__stack_chk_fail(), !insn.addr !13
store i64 %19, i64* %rax.0.reg2mem, !insn.addr !13
br label %dec_label_pc_72, !insn.addr !13
dec_label_pc_72: ; preds = %dec_label_pc_6d, %dec_label_pc_30
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !14
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_74:
%rax.0.reg2mem = alloca i64, !insn.addr !15
%stack_var_-27 = alloca i64, align 8
%stack_var_-38 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !16
%1 = ptrtoint i64* %stack_var_-38 to i64, !insn.addr !17
%2 = bitcast i64* %stack_var_-38 to i8*, !insn.addr !18
store i8 0, i8* %2, align 8, !insn.addr !18
store i64 4702111234474983745, i64* %stack_var_-27, align 8, !insn.addr !19
%3 = ptrtoint i64* %stack_var_-27 to i64, !insn.addr !20
%4 = call i64 @strcpy(i64 %1, i64 %3, i64 %3), !insn.addr !21
%5 = call i64 @printLine(i64 %1), !insn.addr !22
%6 = call i64 @__readfsqword(i64 40), !insn.addr !23
%7 = icmp eq i64 %0, %6, !insn.addr !23
store i64 0, i64* %rax.0.reg2mem, !insn.addr !24
br i1 %7, label %dec_label_pc_e6, label %dec_label_pc_e1, !insn.addr !24
dec_label_pc_e1: ; preds = %dec_label_pc_74
%8 = call i64 @__stack_chk_fail(), !insn.addr !25
store i64 %8, i64* %rax.0.reg2mem, !insn.addr !25
br label %dec_label_pc_e6, !insn.addr !25
dec_label_pc_e6: ; preds = %dec_label_pc_e1, %dec_label_pc_74
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !26
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_cpy_01_good() local_unnamed_addr {
dec_label_pc_e8:
%0 = call i64 @goodG2B(), !insn.addr !27
ret i64 %0, !insn.addr !28
}
declare i64 @strcpy(i64, i64, i64) local_unnamed_addr
declare i64 @printLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 8}
!1 = !{i64 27}
!2 = !{i64 35}
!3 = !{i64 48}
!4 = !{i64 52}
!5 = !{i64 58}
!6 = !{i64 66}
!7 = !{i64 76}
!8 = !{i64 81}
!9 = !{i64 88}
!10 = !{i64 94}
!11 = !{i64 98}
!12 = !{i64 107}
!13 = !{i64 109}
!14 = !{i64 115}
!15 = !{i64 116}
!16 = !{i64 124}
!17 = !{i64 143}
!18 = !{i64 151}
!19 = !{i64 164}
!20 = !{i64 178}
!21 = !{i64 192}
!22 = !{i64 204}
!23 = !{i64 214}
!24 = !{i64 223}
!25 = !{i64 225}
!26 = !{i64 231}
!27 = !{i64 241}
!28 = !{i64 248}
### Assistant: @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_cpy_01_bad.source = private unnamed_addr constant [11 x i8] c"AAAAAAAAAA\00", align 1
@__const.goodG2B.source = private unnamed_addr constant [11 x i8] c"AAAAAAAAAA\00", align 1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_cpy_01_bad() #0 {
entry:
%data = alloca i8*, align 8
%dataBadBuffer = alloca [10 x i8], align 1
%dataGoodBuffer = alloca [11 x i8], align 1
%source = alloca [11 x i8], align 1
%arraydecay = getelementptr inbounds [10 x i8], [10 x i8]* %dataBadBuffer, i64 0, i64 0
store i8* %arraydecay, i8** %data, align 8
%0 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %0, i64 0
store i8 0, i8* %arrayidx, align 1
%1 = bitcast [11 x i8]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %1, i8* align 1 getelementptr inbounds ([11 x i8], [11 x i8]* @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_cpy_01_bad.source, i32 0, i32 0), i64 11, i1 false)
%2 = load i8*, i8** %data, align 8
%arraydecay1 = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%call = call i8* @strcpy(i8* %2, i8* %arraydecay1) #4
%3 = load i8*, i8** %data, align 8
call void @printLine(i8* %3)
ret void
}
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #1
; Function Attrs: nounwind
declare dso_local i8* @strcpy(i8*, i8*) #2
declare dso_local void @printLine(i8*) #3
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_cpy_01_good() #0 {
entry:
call void @goodG2B()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B() #0 {
entry:
%data = alloca i8*, align 8
%dataBadBuffer = alloca [10 x i8], align 1
%dataGoodBuffer = alloca [11 x i8], align 1
%source = alloca [11 x i8], align 1
%arraydecay = getelementptr inbounds [11 x i8], [11 x i8]* %dataGoodBuffer, i64 0, i64 0
store i8* %arraydecay, i8** %data, align 8
%0 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %0, i64 0
store i8 0, i8* %arrayidx, align 1
%1 = bitcast [11 x i8]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %1, i8* align 1 getelementptr inbounds ([11 x i8], [11 x i8]* @__const.goodG2B.source, i32 0, i32 0), i64 11, i1 false)
%2 = load i8*, i8** %data, align 8
%arraydecay1 = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%call = call i8* @strcpy(i8* %2, i8* %arraydecay1) #4
%3 = load i8*, i8** %data, align 8
call void @printLine(i8* %3)
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" }
attributes #1 = { argmemonly nounwind willreturn }
attributes #2 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #3 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_f = local_unnamed_addr constant [3 x i8] c"%(\00"
@global_var_10 = constant i64 -556888036579737560
@global_var_38 = constant i64 74483322847331
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%stack_var_-184 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
%1 = ptrtoint i64* %stack_var_-184 to i64, !insn.addr !1
ret i64 %1, !insn.addr !1
}
define i64 @function_30() local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !2
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = inttoptr i64 %2 to i8*, !insn.addr !2
store i8 0, i8* %3, align 1, !insn.addr !2
%4 = add i64 %1, -112, !insn.addr !3
%5 = call i64 @memset(i64 %4, i64 67, i64 99), !insn.addr !4
%6 = add i64 %1, -13, !insn.addr !5
%7 = inttoptr i64 %6 to i8*, !insn.addr !5
store i8 0, i8* %7, align 1, !insn.addr !5
%8 = add i64 %1, -184, !insn.addr !6
%9 = inttoptr i64 %8 to i64*, !insn.addr !6
%10 = load i64, i64* %9, align 8, !insn.addr !6
%11 = inttoptr i64 %4 to i64*, !insn.addr !7
%12 = load i64, i64* %11, align 8, !insn.addr !7
%13 = add i64 %1, -104, !insn.addr !8
%14 = inttoptr i64 %13 to i64*, !insn.addr !8
%15 = load i64, i64* %14, align 8, !insn.addr !8
%16 = inttoptr i64 %10 to i64*, !insn.addr !9
store i64 %12, i64* %16, align 8, !insn.addr !9
%17 = add i64 %10, 8, !insn.addr !10
%18 = inttoptr i64 %17 to i64*, !insn.addr !10
store i64 %15, i64* %18, align 8, !insn.addr !10
%19 = add i64 %1, -96, !insn.addr !11
%20 = inttoptr i64 %19 to i64*, !insn.addr !11
%21 = load i64, i64* %20, align 8, !insn.addr !11
%22 = add i64 %1, -88, !insn.addr !12
%23 = inttoptr i64 %22 to i64*, !insn.addr !12
%24 = load i64, i64* %23, align 8, !insn.addr !12
%25 = add i64 %10, ptrtoint (i64* @global_var_10 to i64), !insn.addr !13
%26 = inttoptr i64 %25 to i64*, !insn.addr !13
store i64 %21, i64* %26, align 8, !insn.addr !13
%27 = add i64 %10, 24, !insn.addr !14
%28 = inttoptr i64 %27 to i64*, !insn.addr !14
store i64 %24, i64* %28, align 8, !insn.addr !14
%29 = add i64 %1, -80, !insn.addr !15
%30 = inttoptr i64 %29 to i64*, !insn.addr !15
%31 = load i64, i64* %30, align 8, !insn.addr !15
%32 = add i64 %1, -72, !insn.addr !16
%33 = inttoptr i64 %32 to i64*, !insn.addr !16
%34 = load i64, i64* %33, align 8, !insn.addr !16
%35 = add i64 %10, 32, !insn.addr !17
%36 = inttoptr i64 %35 to i64*, !insn.addr !17
store i64 %31, i64* %36, align 8, !insn.addr !17
%37 = add i64 %10, 40, !insn.addr !18
%38 = inttoptr i64 %37 to i64*, !insn.addr !18
store i64 %34, i64* %38, align 8, !insn.addr !18
%39 = add i64 %1, -64, !insn.addr !19
%40 = inttoptr i64 %39 to i64*, !insn.addr !19
%41 = load i64, i64* %40, align 8, !insn.addr !19
%42 = add i64 %1, -56, !insn.addr !20
%43 = inttoptr i64 %42 to i64*, !insn.addr !20
%44 = load i64, i64* %43, align 8, !insn.addr !20
%45 = add i64 %10, 48, !insn.addr !21
%46 = inttoptr i64 %45 to i64*, !insn.addr !21
store i64 %41, i64* %46, align 8, !insn.addr !21
%47 = add i64 %10, ptrtoint (i64* @global_var_38 to i64), !insn.addr !22
%48 = inttoptr i64 %47 to i64*, !insn.addr !22
store i64 %44, i64* %48, align 8, !insn.addr !22
%49 = add i64 %1, -48, !insn.addr !23
%50 = inttoptr i64 %49 to i64*, !insn.addr !23
%51 = load i64, i64* %50, align 8, !insn.addr !23
%52 = add i64 %1, -40, !insn.addr !24
%53 = inttoptr i64 %52 to i64*, !insn.addr !24
%54 = load i64, i64* %53, align 8, !insn.addr !24
%55 = add i64 %10, 64, !insn.addr !25
%56 = inttoptr i64 %55 to i64*, !insn.addr !25
store i64 %51, i64* %56, align 8, !insn.addr !25
%57 = add i64 %10, 72, !insn.addr !26
%58 = inttoptr i64 %57 to i64*, !insn.addr !26
store i64 %54, i64* %58, align 8, !insn.addr !26
%59 = add i64 %1, -32, !insn.addr !27
%60 = inttoptr i64 %59 to i64*, !insn.addr !27
%61 = load i64, i64* %60, align 8, !insn.addr !27
%62 = add i64 %1, -24, !insn.addr !28
%63 = inttoptr i64 %62 to i64*, !insn.addr !28
%64 = load i64, i64* %63, align 8, !insn.addr !28
%65 = add i64 %10, 80, !insn.addr !29
%66 = inttoptr i64 %65 to i64*, !insn.addr !29
store i64 %61, i64* %66, align 8, !insn.addr !29
%67 = add i64 %10, 88, !insn.addr !30
%68 = inttoptr i64 %67 to i64*, !insn.addr !30
store i64 %64, i64* %68, align 8, !insn.addr !30
%69 = add i64 %1, -16, !insn.addr !31
%70 = inttoptr i64 %69 to i32*, !insn.addr !31
%71 = load i32, i32* %70, align 4, !insn.addr !31
%72 = add i64 %10, 96, !insn.addr !32
%73 = inttoptr i64 %72 to i32*, !insn.addr !32
store i32 %71, i32* %73, align 4, !insn.addr !32
%74 = load i64, i64* %9, align 8, !insn.addr !33
%75 = add i64 %74, 99, !insn.addr !34
%76 = inttoptr i64 %75 to i8*, !insn.addr !35
store i8 0, i8* %76, align 1, !insn.addr !35
%77 = load i64, i64* %9, align 8, !insn.addr !36
%78 = call i64 @printLine(i64 %77), !insn.addr !37
%79 = add i64 %1, -8, !insn.addr !38
%80 = inttoptr i64 %79 to i64*, !insn.addr !38
%81 = load i64, i64* %80, align 8, !insn.addr !38
%82 = call i64 @__readfsqword(i64 40), !insn.addr !39
%83 = icmp eq i64 %81, %82, !insn.addr !39
store i64 0, i64* %rax.0.reg2mem, !insn.addr !40
br i1 %83, label %dec_label_pc_eb, label %dec_label_pc_e6, !insn.addr !40
dec_label_pc_e6: ; preds = %dec_label_pc_30
%84 = call i64 @__stack_chk_fail(), !insn.addr !41
store i64 %84, i64* %rax.0.reg2mem, !insn.addr !41
br label %dec_label_pc_eb, !insn.addr !41
dec_label_pc_eb: ; preds = %dec_label_pc_e6, %dec_label_pc_30
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !42
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_ed:
%rax.0.reg2mem = alloca i64, !insn.addr !43
%stack_var_-120 = alloca i64, align 8
%stack_var_-232 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !44
%1 = ptrtoint i64* %stack_var_-232 to i64, !insn.addr !45
%2 = bitcast i64* %stack_var_-232 to i8*, !insn.addr !46
store i8 0, i8* %2, align 8, !insn.addr !46
%3 = ptrtoint i64* %stack_var_-120 to i64, !insn.addr !47
%4 = call i64 @memset(i64 %3, i64 67, i64 99), !insn.addr !48
%5 = load i64, i64* %stack_var_-120, align 8, !insn.addr !49
store i64 %5, i64* %stack_var_-232, align 8, !insn.addr !50
%6 = add i64 %1, 8, !insn.addr !51
%7 = inttoptr i64 %6 to i64*, !insn.addr !51
%8 = add i64 %1, ptrtoint (i64* @global_var_10 to i64), !insn.addr !52
%9 = inttoptr i64 %8 to i64*, !insn.addr !52
%10 = add i64 %1, 24, !insn.addr !53
%11 = inttoptr i64 %10 to i64*, !insn.addr !53
%12 = add i64 %1, 32, !insn.addr !54
%13 = inttoptr i64 %12 to i64*, !insn.addr !54
%14 = add i64 %1, 40, !insn.addr !55
%15 = inttoptr i64 %14 to i64*, !insn.addr !55
%16 = add i64 %1, 48, !insn.addr !56
%17 = inttoptr i64 %16 to i64*, !insn.addr !56
%18 = add i64 %1, ptrtoint (i64* @global_var_38 to i64), !insn.addr !57
%19 = inttoptr i64 %18 to i64*, !insn.addr !57
%20 = add i64 %1, 64, !insn.addr !58
%21 = inttoptr i64 %20 to i64*, !insn.addr !58
%22 = add i64 %1, 72, !insn.addr !59
%23 = inttoptr i64 %22 to i64*, !insn.addr !59
%24 = add i64 %1, 80, !insn.addr !60
%25 = inttoptr i64 %24 to i64*, !insn.addr !60
%26 = add i64 %1, 88, !insn.addr !61
%27 = inttoptr i64 %26 to i64*, !insn.addr !61
%28 = add i64 %1, 96, !insn.addr !62
%29 = inttoptr i64 %28 to i32*, !insn.addr !62
%30 = add i64 %1, 99, !insn.addr !63
%31 = inttoptr i64 %30 to i8*, !insn.addr !64
store i8 0, i8* %31, align 1, !insn.addr !64
%32 = call i64 @printLine(i64 %1), !insn.addr !65
%33 = call i64 @__readfsqword(i64 40), !insn.addr !66
%34 = icmp eq i64 %0, %33, !insn.addr !66
store i64 0, i64* %rax.0.reg2mem, !insn.addr !67
br i1 %34, label %dec_label_pc_1d8, label %dec_label_pc_1d3, !insn.addr !67
dec_label_pc_1d3: ; preds = %dec_label_pc_ed
%35 = call i64 @__stack_chk_fail(), !insn.addr !68
store i64 %35, i64* %rax.0.reg2mem, !insn.addr !68
br label %dec_label_pc_1d8, !insn.addr !68
dec_label_pc_1d8: ; preds = %dec_label_pc_1d3, %dec_label_pc_ed
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !69
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memcpy_18_good() local_unnamed_addr {
dec_label_pc_1da:
%0 = call i64 @goodG2B(), !insn.addr !70
ret i64 %0, !insn.addr !71
}
declare i64 @memset(i64, i64, i64) local_unnamed_addr
declare i64 @printLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 11}
!1 = !{i64 27}
!2 = !{i64 48}
!3 = !{i64 51}
!4 = !{i64 68}
!5 = !{i64 73}
!6 = !{i64 77}
!7 = !{i64 84}
!8 = !{i64 88}
!9 = !{i64 92}
!10 = !{i64 95}
!11 = !{i64 99}
!12 = !{i64 103}
!13 = !{i64 107}
!14 = !{i64 111}
!15 = !{i64 115}
!16 = !{i64 119}
!17 = !{i64 123}
!18 = !{i64 127}
!19 = !{i64 131}
!20 = !{i64 135}
!21 = !{i64 139}
!22 = !{i64 143}
!23 = !{i64 147}
!24 = !{i64 151}
!25 = !{i64 155}
!26 = !{i64 159}
!27 = !{i64 163}
!28 = !{i64 167}
!29 = !{i64 171}
!30 = !{i64 175}
!31 = !{i64 179}
!32 = !{i64 182}
!33 = !{i64 185}
!34 = !{i64 192}
!35 = !{i64 196}
!36 = !{i64 199}
!37 = !{i64 209}
!38 = !{i64 215}
!39 = !{i64 219}
!40 = !{i64 228}
!41 = !{i64 230}
!42 = !{i64 236}
!43 = !{i64 237}
!44 = !{i64 248}
!45 = !{i64 271}
!46 = !{i64 285}
!47 = !{i64 302}
!48 = !{i64 305}
!49 = !{i64 321}
!50 = !{i64 329}
!51 = !{i64 332}
!52 = !{i64 344}
!53 = !{i64 348}
!54 = !{i64 360}
!55 = !{i64 364}
!56 = !{i64 376}
!57 = !{i64 380}
!58 = !{i64 392}
!59 = !{i64 396}
!60 = !{i64 408}
!61 = !{i64 412}
!62 = !{i64 419}
!63 = !{i64 429}
!64 = !{i64 433}
!65 = !{i64 446}
!66 = !{i64 456}
!67 = !{i64 465}
!68 = !{i64 467}
!69 = !{i64 473}
!70 = !{i64 483}
!71 = !{i64 490}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memcpy_18_bad() #0 {
entry:
%data = alloca i8*, align 8
%dataBadBuffer = alloca [50 x i8], align 16
%dataGoodBuffer = alloca [100 x i8], align 16
%source1 = alloca [100 x i8], align 16
br label %source
source: ; preds = %entry
%arraydecay = getelementptr inbounds [50 x i8], [50 x i8]* %dataBadBuffer, i64 0, i64 0
store i8* %arraydecay, i8** %data, align 8
%0 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %0, i64 0
store i8 0, i8* %arrayidx, align 1
%arraydecay2 = getelementptr inbounds [100 x i8], [100 x i8]* %source1, i64 0, i64 0
call void @llvm.memset.p0i8.i64(i8* align 16 %arraydecay2, i8 67, i64 99, i1 false)
%arrayidx3 = getelementptr inbounds [100 x i8], [100 x i8]* %source1, i64 0, i64 99
store i8 0, i8* %arrayidx3, align 1
%1 = load i8*, i8** %data, align 8
%arraydecay4 = getelementptr inbounds [100 x i8], [100 x i8]* %source1, i64 0, i64 0
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %1, i8* align 16 %arraydecay4, i64 100, i1 false)
%2 = load i8*, i8** %data, align 8
%arrayidx5 = getelementptr inbounds i8, i8* %2, i64 99
store i8 0, i8* %arrayidx5, align 1
%3 = load i8*, i8** %data, align 8
call void @printLine(i8* %3)
ret void
}
; Function Attrs: argmemonly nounwind willreturn writeonly
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #1
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #2
declare dso_local void @printLine(i8*) #3
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memcpy_18_good() #0 {
entry:
call void @goodG2B()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B() #0 {
entry:
%data = alloca i8*, align 8
%dataBadBuffer = alloca [50 x i8], align 16
%dataGoodBuffer = alloca [100 x i8], align 16
%source1 = alloca [100 x i8], align 16
br label %source
source: ; preds = %entry
%arraydecay = getelementptr inbounds [100 x i8], [100 x i8]* %dataGoodBuffer, i64 0, i64 0
store i8* %arraydecay, i8** %data, align 8
%0 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %0, i64 0
store i8 0, i8* %arrayidx, align 1
%arraydecay2 = getelementptr inbounds [100 x i8], [100 x i8]* %source1, i64 0, i64 0
call void @llvm.memset.p0i8.i64(i8* align 16 %arraydecay2, i8 67, i64 99, i1 false)
%arrayidx3 = getelementptr inbounds [100 x i8], [100 x i8]* %source1, i64 0, i64 99
store i8 0, i8* %arrayidx3, align 1
%1 = load i8*, i8** %data, align 8
%arraydecay4 = getelementptr inbounds [100 x i8], [100 x i8]* %source1, i64 0, i64 0
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %1, i8* align 16 %arraydecay4, i64 100, i1 false)
%2 = load i8*, i8** %data, align 8
%arrayidx5 = getelementptr inbounds i8, i8* %2, i64 99
store i8 0, i8* %arrayidx5, align 1
%3 = load i8*, i8** %data, align 8
call void @printLine(i8* %3)
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" }
attributes #1 = { argmemonly nounwind willreturn writeonly }
attributes #2 = { argmemonly nounwind willreturn }
attributes #3 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
define i64 @_GLOBAL_OFFSET_TABLE_.1(i64 %arg1) local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
ret i64 0, !insn.addr !1
}
define i64 @function_31() local_unnamed_addr {
dec_label_pc_31:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !2
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = load i64, i64* %0
%stack_var_-824 = alloca i64, align 8
%4 = load i64, i64* %0
%stack_var_-8 = alloca i64, align 8
%5 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !2
%6 = mul i64 %1, 8, !insn.addr !3
%7 = add i64 %6, -816, !insn.addr !3
%8 = add i64 %7, %5, !insn.addr !3
%9 = inttoptr i64 %8 to i32*, !insn.addr !3
store i32 0, i32* %9, align 8, !insn.addr !3
%10 = mul i64 %4, 8, !insn.addr !4
%11 = add i64 %10, -812, !insn.addr !4
%12 = add i64 %11, %5, !insn.addr !4
%13 = inttoptr i64 %12 to i32*, !insn.addr !4
store i32 0, i32* %13, align 4, !insn.addr !4
%14 = call i64 @memcpy(i64 %3, i64* nonnull %stack_var_-824, i64 800, i64* nonnull %stack_var_-824), !insn.addr !5
%15 = call i64 @printStructLine(i64 %3), !insn.addr !6
%16 = call i64 @__readfsqword(i64 40), !insn.addr !7
%17 = icmp eq i64 %2, %16, !insn.addr !7
store i64 0, i64* %rax.0.reg2mem, !insn.addr !8
br i1 %17, label %dec_label_pc_a6, label %dec_label_pc_a1, !insn.addr !8
dec_label_pc_a1: ; preds = %dec_label_pc_31
%18 = call i64 @__stack_chk_fail(), !insn.addr !9
store i64 %18, i64* %rax.0.reg2mem, !insn.addr !9
br label %dec_label_pc_a6, !insn.addr !9
dec_label_pc_a6: ; preds = %dec_label_pc_a1, %dec_label_pc_31
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !10
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_memcpy_44_bad() local_unnamed_addr {
dec_label_pc_a8:
%rax.0.reg2mem = alloca i64, !insn.addr !11
%0 = call i64 @__readfsqword(i64 40), !insn.addr !12
%1 = call i64 @__readfsqword(i64 40), !insn.addr !13
%2 = icmp eq i64 %0, %1, !insn.addr !13
store i64 0, i64* %rax.0.reg2mem, !insn.addr !14
br i1 %2, label %dec_label_pc_106, label %dec_label_pc_101, !insn.addr !14
dec_label_pc_101: ; preds = %dec_label_pc_a8
%3 = call i64 @__stack_chk_fail(), !insn.addr !15
store i64 %3, i64* %rax.0.reg2mem, !insn.addr !15
br label %dec_label_pc_106, !insn.addr !15
dec_label_pc_106: ; preds = %dec_label_pc_101, %dec_label_pc_a8
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !16
}
define i64 @goodG2BSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_108:
%rax.0.reg2mem = alloca i64, !insn.addr !17
%storemerge1.reg2mem = alloca i64, !insn.addr !17
%stack_var_-824 = alloca i64, align 8
%stack_var_-8 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !18
%1 = call i64 @__readfsqword(i64 40), !insn.addr !19
store i64 0, i64* %storemerge1.reg2mem
br label %dec_label_pc_136
dec_label_pc_136: ; preds = %dec_label_pc_136, %dec_label_pc_108
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%2 = mul i64 %storemerge1.reload, 8, !insn.addr !20
%3 = add i64 %2, %0
%4 = add i64 %3, -816, !insn.addr !20
%5 = inttoptr i64 %4 to i32*, !insn.addr !20
store i32 0, i32* %5, align 8, !insn.addr !20
%6 = add i64 %3, -812, !insn.addr !21
%7 = inttoptr i64 %6 to i32*, !insn.addr !21
store i32 0, i32* %7, align 4, !insn.addr !21
%8 = add nuw nsw i64 %storemerge1.reload, 1, !insn.addr !22
%exitcond = icmp eq i64 %8, 100
store i64 %8, i64* %storemerge1.reg2mem, !insn.addr !23
br i1 %exitcond, label %dec_label_pc_16c, label %dec_label_pc_136, !insn.addr !23
dec_label_pc_16c: ; preds = %dec_label_pc_136
%9 = call i64 @memcpy(i64 %arg1, i64* nonnull %stack_var_-824, i64 800, i64* nonnull %stack_var_-824), !insn.addr !24
%10 = call i64 @printStructLine(i64 %arg1), !insn.addr !25
%11 = call i64 @__readfsqword(i64 40), !insn.addr !26
%12 = icmp eq i64 %1, %11, !insn.addr !26
store i64 0, i64* %rax.0.reg2mem, !insn.addr !27
br i1 %12, label %dec_label_pc_1ae, label %dec_label_pc_1a9, !insn.addr !27
dec_label_pc_1a9: ; preds = %dec_label_pc_16c
%13 = call i64 @__stack_chk_fail(), !insn.addr !28
store i64 %13, i64* %rax.0.reg2mem, !insn.addr !28
br label %dec_label_pc_1ae, !insn.addr !28
dec_label_pc_1ae: ; preds = %dec_label_pc_1a9, %dec_label_pc_16c
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !29
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_1b0:
%rax.0.reg2mem = alloca i64, !insn.addr !30
%0 = call i64 @__readfsqword(i64 40), !insn.addr !31
%1 = call i64 @__readfsqword(i64 40), !insn.addr !32
%2 = icmp eq i64 %0, %1, !insn.addr !32
store i64 0, i64* %rax.0.reg2mem, !insn.addr !33
br i1 %2, label %dec_label_pc_20e, label %dec_label_pc_209, !insn.addr !33
dec_label_pc_209: ; preds = %dec_label_pc_1b0
%3 = call i64 @__stack_chk_fail(), !insn.addr !34
store i64 %3, i64* %rax.0.reg2mem, !insn.addr !34
br label %dec_label_pc_20e, !insn.addr !34
dec_label_pc_20e: ; preds = %dec_label_pc_209, %dec_label_pc_1b0
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !35
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_memcpy_44_good() local_unnamed_addr {
dec_label_pc_210:
%0 = call i64 @goodG2B(), !insn.addr !36
ret i64 %0, !insn.addr !37
}
declare i64 @memcpy(i64, i64*, i64, i64*) local_unnamed_addr
declare i64 @printStructLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 18}
!1 = !{i64 31}
!2 = !{i64 49}
!3 = !{i64 53}
!4 = !{i64 71}
!5 = !{i64 125}
!6 = !{i64 140}
!7 = !{i64 150}
!8 = !{i64 159}
!9 = !{i64 161}
!10 = !{i64 167}
!11 = !{i64 168}
!12 = !{i64 179}
!13 = !{i64 246}
!14 = !{i64 255}
!15 = !{i64 257}
!16 = !{i64 263}
!17 = !{i64 264}
!18 = !{i64 265}
!19 = !{i64 282}
!20 = !{i64 317}
!21 = !{i64 335}
!22 = !{i64 346}
!23 = !{i64 362}
!24 = !{i64 389}
!25 = !{i64 404}
!26 = !{i64 414}
!27 = !{i64 423}
!28 = !{i64 425}
!29 = !{i64 431}
!30 = !{i64 432}
!31 = !{i64 443}
!32 = !{i64 510}
!33 = !{i64 519}
!34 = !{i64 521}
!35 = !{i64 527}
!36 = !{i64 537}
!37 = !{i64 544}
### Assistant: %struct._twoIntsStruct = type { i32, i32 }
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_memcpy_44_bad() #0 {
entry:
%data = alloca %struct._twoIntsStruct*, align 8
%funcPtr = alloca void (%struct._twoIntsStruct*)*, align 8
%dataBadBuffer = alloca [50 x %struct._twoIntsStruct], align 16
%dataGoodBuffer = alloca [100 x %struct._twoIntsStruct], align 16
store void (%struct._twoIntsStruct*)* @badSink, void (%struct._twoIntsStruct*)** %funcPtr, align 8
%arraydecay = getelementptr inbounds [50 x %struct._twoIntsStruct], [50 x %struct._twoIntsStruct]* %dataBadBuffer, i64 0, i64 0
store %struct._twoIntsStruct* %arraydecay, %struct._twoIntsStruct** %data, align 8
%0 = load void (%struct._twoIntsStruct*)*, void (%struct._twoIntsStruct*)** %funcPtr, align 8
%1 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data, align 8
call void %0(%struct._twoIntsStruct* %1)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @badSink(%struct._twoIntsStruct* %data) #0 {
entry:
%data.addr = alloca %struct._twoIntsStruct*, align 8
%source = alloca [100 x %struct._twoIntsStruct], align 16
%i = alloca i64, align 8
store %struct._twoIntsStruct* %data, %struct._twoIntsStruct** %data.addr, align 8
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %entry
%0 = load i64, i64* %i, align 8
%cmp = icmp ult i64 %0, 100
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%1 = load i64, i64* %i, align 8
%arrayidx = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %1
%intOne = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %arrayidx, i32 0, i32 0
store i32 0, i32* %intOne, align 8
%2 = load i64, i64* %i, align 8
%arrayidx1 = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %2
%intTwo = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %arrayidx1, i32 0, i32 1
store i32 0, i32* %intTwo, align 4
br label %for.inc
for.inc: ; preds = %for.body
%3 = load i64, i64* %i, align 8
%inc = add i64 %3, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%4 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data.addr, align 8
%5 = bitcast %struct._twoIntsStruct* %4 to i8*
%arraydecay = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 0
%6 = bitcast %struct._twoIntsStruct* %arraydecay to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 %5, i8* align 16 %6, i64 800, i1 false)
%7 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data.addr, align 8
%arrayidx2 = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %7, i64 0
call void @printStructLine(%struct._twoIntsStruct* %arrayidx2)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_memcpy_44_good() #0 {
entry:
call void @goodG2B()
ret void
}
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #1
declare dso_local void @printStructLine(%struct._twoIntsStruct*) #2
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B() #0 {
entry:
%data = alloca %struct._twoIntsStruct*, align 8
%funcPtr = alloca void (%struct._twoIntsStruct*)*, align 8
%dataBadBuffer = alloca [50 x %struct._twoIntsStruct], align 16
%dataGoodBuffer = alloca [100 x %struct._twoIntsStruct], align 16
store void (%struct._twoIntsStruct*)* @goodG2BSink, void (%struct._twoIntsStruct*)** %funcPtr, align 8
%arraydecay = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %dataGoodBuffer, i64 0, i64 0
store %struct._twoIntsStruct* %arraydecay, %struct._twoIntsStruct** %data, align 8
%0 = load void (%struct._twoIntsStruct*)*, void (%struct._twoIntsStruct*)** %funcPtr, align 8
%1 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data, align 8
call void %0(%struct._twoIntsStruct* %1)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2BSink(%struct._twoIntsStruct* %data) #0 {
entry:
%data.addr = alloca %struct._twoIntsStruct*, align 8
%source = alloca [100 x %struct._twoIntsStruct], align 16
%i = alloca i64, align 8
store %struct._twoIntsStruct* %data, %struct._twoIntsStruct** %data.addr, align 8
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %entry
%0 = load i64, i64* %i, align 8
%cmp = icmp ult i64 %0, 100
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%1 = load i64, i64* %i, align 8
%arrayidx = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %1
%intOne = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %arrayidx, i32 0, i32 0
store i32 0, i32* %intOne, align 8
%2 = load i64, i64* %i, align 8
%arrayidx1 = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %2
%intTwo = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %arrayidx1, i32 0, i32 1
store i32 0, i32* %intTwo, align 4
br label %for.inc
for.inc: ; preds = %for.body
%3 = load i64, i64* %i, align 8
%inc = add i64 %3, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%4 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data.addr, align 8
%5 = bitcast %struct._twoIntsStruct* %4 to i8*
%arraydecay = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 0
%6 = bitcast %struct._twoIntsStruct* %arraydecay to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 %5, i8* align 16 %6, i64 800, i1 false)
%7 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data.addr, align 8
%arrayidx2 = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %7, i64 0
call void @printStructLine(%struct._twoIntsStruct* %arrayidx2)
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" }
attributes #1 = { argmemonly nounwind willreturn }
attributes #2 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_1ae = external constant i128
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
ret i64 230, !insn.addr !1
}
define i64 @function_30(i64 %arg1, i64 %arg2, i64 %arg3, i64 %arg4) local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !2
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = load i64, i64* %0
%4 = udiv i64 %3, %arg4
%5 = mul i64 %4, 16, !insn.addr !3
%6 = sub i64 %2, %5, !insn.addr !4
%7 = add i64 %6, 15, !insn.addr !5
%8 = and i64 %7, -16, !insn.addr !6
%9 = add i64 %1, -72, !insn.addr !7
%10 = inttoptr i64 %9 to i64*, !insn.addr !7
store i64 %8, i64* %10, align 8, !insn.addr !7
%11 = add i64 %6, add (i64 sub (i64 0, i64 trunc (i128 mul (i128 sext (i64 trunc (i128 udiv (i128 zext (i64 ptrtoint (i128* @global_var_1ae to i64) to i128), i128 16) to i64) to i128), i128 16) to i64)), i64 15), !insn.addr !8
%12 = and i64 %11, -16, !insn.addr !9
%13 = add i64 %1, -64, !insn.addr !10
%14 = inttoptr i64 %13 to i64*, !insn.addr !10
store i64 %12, i64* %14, align 8, !insn.addr !10
%15 = load i64, i64* %10, align 8, !insn.addr !11
%16 = add i64 %1, -56, !insn.addr !12
%17 = inttoptr i64 %16 to i64*, !insn.addr !12
store i64 %15, i64* %17, align 8, !insn.addr !12
%18 = add i64 %1, -32, !insn.addr !13
%19 = inttoptr i64 %18 to i64*, !insn.addr !13
store i64 %15, i64* %19, align 8, !insn.addr !13
%20 = add i64 %1, -48, !insn.addr !14
%21 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_loop_66b_badSink(i64 %20, i64 16, i128 sext (i64 trunc (i128 urem (i128 zext (i64 ptrtoint (i128* @global_var_1ae to i64) to i128), i128 16) to i64) to i128)), !insn.addr !15
%22 = add i64 %1, -8, !insn.addr !16
%23 = inttoptr i64 %22 to i64*, !insn.addr !16
%24 = load i64, i64* %23, align 8, !insn.addr !16
%25 = call i64 @__readfsqword(i64 40), !insn.addr !17
%26 = icmp eq i64 %24, %25, !insn.addr !17
store i64 0, i64* %rax.0.reg2mem, !insn.addr !18
br i1 %26, label %dec_label_pc_b4, label %dec_label_pc_af, !insn.addr !18
dec_label_pc_af: ; preds = %dec_label_pc_30
%27 = call i64 @__stack_chk_fail(), !insn.addr !19
store i64 %27, i64* %rax.0.reg2mem, !insn.addr !19
br label %dec_label_pc_b4, !insn.addr !19
dec_label_pc_b4: ; preds = %dec_label_pc_af, %dec_label_pc_30
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !20
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_b6:
%rax.0.reg2mem = alloca i64, !insn.addr !21
%stack_var_-56 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !22
%1 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_loop_66b_goodG2BSink(i64* nonnull %stack_var_-56, i64 16, i128 sext (i64 trunc (i128 urem (i128 zext (i64 ptrtoint (i128* @global_var_1ae to i64) to i128), i128 16) to i64) to i128), i64 16), !insn.addr !23
%2 = call i64 @__readfsqword(i64 40), !insn.addr !24
%3 = icmp eq i64 %0, %2, !insn.addr !24
store i64 0, i64* %rax.0.reg2mem, !insn.addr !25
br i1 %3, label %dec_label_pc_16a, label %dec_label_pc_165, !insn.addr !25
dec_label_pc_165: ; preds = %dec_label_pc_b6
%4 = call i64 @__stack_chk_fail(), !insn.addr !26
store i64 %4, i64* %rax.0.reg2mem, !insn.addr !26
br label %dec_label_pc_16a, !insn.addr !26
dec_label_pc_16a: ; preds = %dec_label_pc_165, %dec_label_pc_b6
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !27
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_loop_66_good() local_unnamed_addr {
dec_label_pc_16c:
%0 = call i64 @goodG2B(), !insn.addr !28
ret i64 %0, !insn.addr !29
}
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_loop_66b_badSink(i64, i64, i128) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_loop_66b_goodG2BSink(i64*, i64, i128, i64) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 8}
!1 = !{i64 32}
!2 = !{i64 48}
!3 = !{i64 51}
!4 = !{i64 55}
!5 = !{i64 61}
!6 = !{i64 65}
!7 = !{i64 73}
!8 = !{i64 115}
!9 = !{i64 119}
!10 = !{i64 127}
!11 = !{i64 131}
!12 = !{i64 135}
!13 = !{i64 143}
!14 = !{i64 147}
!15 = !{i64 154}
!16 = !{i64 160}
!17 = !{i64 164}
!18 = !{i64 173}
!19 = !{i64 175}
!20 = !{i64 181}
!21 = !{i64 182}
!22 = !{i64 190}
!23 = !{i64 336}
!24 = !{i64 346}
!25 = !{i64 355}
!26 = !{i64 357}
!27 = !{i64 363}
!28 = !{i64 373}
!29 = !{i64 380}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_loop_66_bad() #0 {
entry:
%data = alloca i32*, align 8
%dataArray = alloca [5 x i32*], align 16
%dataBadBuffer = alloca i32*, align 8
%dataGoodBuffer = alloca i32*, align 8
%0 = alloca i8, i64 200, align 16
%1 = bitcast i8* %0 to i32*
store i32* %1, i32** %dataBadBuffer, align 8
%2 = alloca i8, i64 400, align 16
%3 = bitcast i8* %2 to i32*
store i32* %3, i32** %dataGoodBuffer, align 8
%4 = load i32*, i32** %dataBadBuffer, align 8
store i32* %4, i32** %data, align 8
%5 = load i32*, i32** %data, align 8
%arrayidx = getelementptr inbounds [5 x i32*], [5 x i32*]* %dataArray, i64 0, i64 2
store i32* %5, i32** %arrayidx, align 16
%arraydecay = getelementptr inbounds [5 x i32*], [5 x i32*]* %dataArray, i64 0, i64 0
call void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_loop_66b_badSink(i32** %arraydecay)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_loop_66b_badSink(i32**) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_loop_66_good() #0 {
entry:
call void @goodG2B()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B() #0 {
entry:
%data = alloca i32*, align 8
%dataArray = alloca [5 x i32*], align 16
%dataBadBuffer = alloca i32*, align 8
%dataGoodBuffer = alloca i32*, align 8
%0 = alloca i8, i64 200, align 16
%1 = bitcast i8* %0 to i32*
store i32* %1, i32** %dataBadBuffer, align 8
%2 = alloca i8, i64 400, align 16
%3 = bitcast i8* %2 to i32*
store i32* %3, i32** %dataGoodBuffer, align 8
%4 = load i32*, i32** %dataGoodBuffer, align 8
store i32* %4, i32** %data, align 8
%5 = load i32*, i32** %data, align 8
%arrayidx = getelementptr inbounds [5 x i32*], [5 x i32*]* %dataArray, i64 0, i64 2
store i32* %5, i32** %arrayidx, align 16
%arraydecay = getelementptr inbounds [5 x i32*], [5 x i32*]* %dataArray, i64 0, i64 0
call void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_loop_66b_goodG2BSink(i32** %arraydecay)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_loop_66b_goodG2BSink(i32**) #1
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" }
attributes #1 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_f = local_unnamed_addr constant [3 x i8] c"%(\00"
@global_var_2f8 = local_unnamed_addr constant [11 x i32] %wide-string
@global_var_300 = local_unnamed_addr constant [9 x i32] %wide-string
@global_var_308 = local_unnamed_addr constant [7 x i32] %wide-string
@global_var_310 = local_unnamed_addr constant [5 x i32] %wide-string
@global_var_318 = local_unnamed_addr constant [3 x i32] %wide-string
@global_var_320 = local_unnamed_addr constant i64 7597120955562852352
@global_var_324 = constant [21 x i8] c"Benign, fixed string\00"
@global_var_3f8 = local_unnamed_addr global i32 0
@global_var_420 = local_unnamed_addr global i32 0
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !0
%storemerge2.reg2mem = alloca i64, !insn.addr !0
%1 = load i64, i64* %0
%stack_var_-72 = alloca i32*, align 8
%stack_var_-120 = alloca i64, align 8
%stack_var_-8 = alloca i64, align 8
%2 = call i64 @__readfsqword(i64 40), !insn.addr !1
%3 = load i32, i32* @global_var_3f8, align 4, !insn.addr !2
%4 = icmp eq i32 %3, 0, !insn.addr !3
br i1 %4, label %dec_label_pc_3c, label %dec_label_pc_24, !insn.addr !4
dec_label_pc_24: ; preds = %dec_label_pc_0
%5 = ptrtoint i64* %stack_var_-120 to i64, !insn.addr !5
ret i64 %5, !insn.addr !5
dec_label_pc_3c: ; preds = %dec_label_pc_0
store i32* inttoptr (i64 279172874305 to i32*), i32** %stack_var_-72, align 8, !insn.addr !6
%6 = bitcast i32** %stack_var_-72 to i64*, !insn.addr !7
%7 = call i64 @wcslen(i64* nonnull %6), !insn.addr !7
%8 = add i64 %7, 1, !insn.addr !8
%9 = icmp eq i64 %8, 0, !insn.addr !9
br i1 %9, label %dec_label_pc_c9, label %dec_label_pc_96.lr.ph, !insn.addr !10
dec_label_pc_96.lr.ph: ; preds = %dec_label_pc_3c
%10 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !11
%11 = add i64 %10, -64, !insn.addr !12
store i64 0, i64* %storemerge2.reg2mem
br label %dec_label_pc_96
dec_label_pc_96: ; preds = %dec_label_pc_96, %dec_label_pc_96.lr.ph
%storemerge2.reload = load i64, i64* %storemerge2.reg2mem
%12 = mul i64 %storemerge2.reload, 4, !insn.addr !13
%13 = add i64 %12, %1, !insn.addr !14
%14 = add i64 %11, %12, !insn.addr !12
%15 = inttoptr i64 %14 to i32*, !insn.addr !12
%16 = load i32, i32* %15, align 4, !insn.addr !12
%17 = inttoptr i64 %13 to i32*, !insn.addr !15
store i32 %16, i32* %17, align 4, !insn.addr !15
%18 = add nuw i64 %storemerge2.reload, 1, !insn.addr !16
%exitcond = icmp eq i64 %18, %8
store i64 %18, i64* %storemerge2.reg2mem, !insn.addr !10
br i1 %exitcond, label %dec_label_pc_c9, label %dec_label_pc_96, !insn.addr !10
dec_label_pc_c9: ; preds = %dec_label_pc_96, %dec_label_pc_3c
%19 = call i64 @printWLine(i64 %1), !insn.addr !17
%20 = call i64 @__readfsqword(i64 40), !insn.addr !18
%21 = icmp eq i64 %2, %20, !insn.addr !18
store i64 0, i64* %rax.0.reg2mem, !insn.addr !19
br i1 %21, label %dec_label_pc_ed, label %dec_label_pc_e8, !insn.addr !19
dec_label_pc_e8: ; preds = %dec_label_pc_c9
%22 = call i64 @__stack_chk_fail(), !insn.addr !20
store i64 %22, i64* %rax.0.reg2mem, !insn.addr !20
br label %dec_label_pc_ed, !insn.addr !20
dec_label_pc_ed: ; preds = %dec_label_pc_e8, %dec_label_pc_c9
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !21
}
define i64 @goodG2B1() local_unnamed_addr {
dec_label_pc_ef:
%rax.0.reg2mem = alloca i64, !insn.addr !22
%storemerge2.reg2mem = alloca i64, !insn.addr !22
%stack_var_-144.0.reg2mem = alloca i64, !insn.addr !22
%stack_var_-72 = alloca i32*, align 8
%stack_var_-120 = alloca i64, align 8
%stack_var_-8 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !23
%1 = load i32, i32* @global_var_420, align 4, !insn.addr !24
%2 = icmp eq i32 %1, 0, !insn.addr !25
br i1 %2, label %dec_label_pc_121, label %dec_label_pc_113, !insn.addr !26
dec_label_pc_113: ; preds = %dec_label_pc_ef
%3 = call i64 @printLine(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @global_var_324, i64 0, i64 0)), !insn.addr !27
br label %dec_label_pc_139, !insn.addr !28
dec_label_pc_121: ; preds = %dec_label_pc_ef
%4 = ptrtoint i64* %stack_var_-120 to i64, !insn.addr !29
%5 = bitcast i64* %stack_var_-120 to i32*, !insn.addr !30
store i32 0, i32* %5, align 8, !insn.addr !30
store i64 %4, i64* %stack_var_-144.0.reg2mem, !insn.addr !30
br label %dec_label_pc_139, !insn.addr !30
dec_label_pc_139: ; preds = %dec_label_pc_121, %dec_label_pc_113
%stack_var_-144.0.reload = load i64, i64* %stack_var_-144.0.reg2mem
store i32* inttoptr (i64 279172874305 to i32*), i32** %stack_var_-72, align 8, !insn.addr !31
%6 = bitcast i32** %stack_var_-72 to i64*, !insn.addr !32
%7 = call i64 @wcslen(i64* nonnull %6), !insn.addr !32
%8 = add i64 %7, 1, !insn.addr !33
%9 = icmp eq i64 %8, 0, !insn.addr !34
br i1 %9, label %dec_label_pc_1c6, label %dec_label_pc_193.lr.ph, !insn.addr !35
dec_label_pc_193.lr.ph: ; preds = %dec_label_pc_139
%10 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !36
%11 = add i64 %10, -64, !insn.addr !37
store i64 0, i64* %storemerge2.reg2mem
br label %dec_label_pc_193
dec_label_pc_193: ; preds = %dec_label_pc_193, %dec_label_pc_193.lr.ph
%storemerge2.reload = load i64, i64* %storemerge2.reg2mem
%12 = mul i64 %storemerge2.reload, 4, !insn.addr !38
%13 = add i64 %12, %stack_var_-144.0.reload, !insn.addr !39
%14 = add i64 %11, %12, !insn.addr !37
%15 = inttoptr i64 %14 to i32*, !insn.addr !37
%16 = load i32, i32* %15, align 4, !insn.addr !37
%17 = inttoptr i64 %13 to i32*, !insn.addr !40
store i32 %16, i32* %17, align 4, !insn.addr !40
%18 = add nuw i64 %storemerge2.reload, 1, !insn.addr !41
%exitcond = icmp eq i64 %18, %8
store i64 %18, i64* %storemerge2.reg2mem, !insn.addr !35
br i1 %exitcond, label %dec_label_pc_1c6, label %dec_label_pc_193, !insn.addr !35
dec_label_pc_1c6: ; preds = %dec_label_pc_193, %dec_label_pc_139
%19 = call i64 @printWLine(i64 %stack_var_-144.0.reload), !insn.addr !42
%20 = call i64 @__readfsqword(i64 40), !insn.addr !43
%21 = icmp eq i64 %0, %20, !insn.addr !43
store i64 0, i64* %rax.0.reg2mem, !insn.addr !44
br i1 %21, label %dec_label_pc_1ea, label %dec_label_pc_1e5, !insn.addr !44
dec_label_pc_1e5: ; preds = %dec_label_pc_1c6
%22 = call i64 @__stack_chk_fail(), !insn.addr !45
store i64 %22, i64* %rax.0.reg2mem, !insn.addr !45
br label %dec_label_pc_1ea, !insn.addr !45
dec_label_pc_1ea: ; preds = %dec_label_pc_1e5, %dec_label_pc_1c6
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !46
}
define i64 @goodG2B2() local_unnamed_addr {
dec_label_pc_1ec:
%rax.0.reg2mem = alloca i64, !insn.addr !47
%storemerge2.reg2mem = alloca i64, !insn.addr !47
%stack_var_-144.0.reg2mem = alloca i64, !insn.addr !47
%stack_var_-72 = alloca i32*, align 8
%stack_var_-120 = alloca i64, align 8
%stack_var_-8 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !48
%1 = load i32, i32* @global_var_3f8, align 4, !insn.addr !49
%2 = icmp eq i32 %1, 0, !insn.addr !50
br i1 %2, label %dec_label_pc_228, label %dec_label_pc_210, !insn.addr !51
dec_label_pc_210: ; preds = %dec_label_pc_1ec
%3 = ptrtoint i64* %stack_var_-120 to i64, !insn.addr !52
%4 = bitcast i64* %stack_var_-120 to i32*, !insn.addr !53
store i32 0, i32* %4, align 8, !insn.addr !53
store i64 %3, i64* %stack_var_-144.0.reg2mem, !insn.addr !53
br label %dec_label_pc_228, !insn.addr !53
dec_label_pc_228: ; preds = %dec_label_pc_210, %dec_label_pc_1ec
%stack_var_-144.0.reload = load i64, i64* %stack_var_-144.0.reg2mem
store i32* inttoptr (i64 279172874305 to i32*), i32** %stack_var_-72, align 8, !insn.addr !54
%5 = bitcast i32** %stack_var_-72 to i64*, !insn.addr !55
%6 = call i64 @wcslen(i64* nonnull %5), !insn.addr !55
%7 = add i64 %6, 1, !insn.addr !56
%8 = icmp eq i64 %7, 0, !insn.addr !57
br i1 %8, label %dec_label_pc_2b5, label %dec_label_pc_282.lr.ph, !insn.addr !58
dec_label_pc_282.lr.ph: ; preds = %dec_label_pc_228
%9 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !59
%10 = add i64 %9, -64, !insn.addr !60
store i64 0, i64* %storemerge2.reg2mem
br label %dec_label_pc_282
dec_label_pc_282: ; preds = %dec_label_pc_282, %dec_label_pc_282.lr.ph
%storemerge2.reload = load i64, i64* %storemerge2.reg2mem
%11 = mul i64 %storemerge2.reload, 4, !insn.addr !61
%12 = add i64 %11, %stack_var_-144.0.reload, !insn.addr !62
%13 = add i64 %10, %11, !insn.addr !60
%14 = inttoptr i64 %13 to i32*, !insn.addr !60
%15 = load i32, i32* %14, align 4, !insn.addr !60
%16 = inttoptr i64 %12 to i32*, !insn.addr !63
store i32 %15, i32* %16, align 4, !insn.addr !63
%17 = add nuw i64 %storemerge2.reload, 1, !insn.addr !64
%exitcond = icmp eq i64 %17, %7
store i64 %17, i64* %storemerge2.reg2mem, !insn.addr !58
br i1 %exitcond, label %dec_label_pc_2b5, label %dec_label_pc_282, !insn.addr !58
dec_label_pc_2b5: ; preds = %dec_label_pc_282, %dec_label_pc_228
%18 = call i64 @printWLine(i64 %stack_var_-144.0.reload), !insn.addr !65
%19 = call i64 @__readfsqword(i64 40), !insn.addr !66
%20 = icmp eq i64 %0, %19, !insn.addr !66
store i64 0, i64* %rax.0.reg2mem, !insn.addr !67
br i1 %20, label %dec_label_pc_2d9, label %dec_label_pc_2d4, !insn.addr !67
dec_label_pc_2d4: ; preds = %dec_label_pc_2b5
%21 = call i64 @__stack_chk_fail(), !insn.addr !68
store i64 %21, i64* %rax.0.reg2mem, !insn.addr !68
br label %dec_label_pc_2d9, !insn.addr !68
dec_label_pc_2d9: ; preds = %dec_label_pc_2d4, %dec_label_pc_2b5
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !69
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_loop_10_good() local_unnamed_addr {
dec_label_pc_2db:
%0 = call i64 @goodG2B1(), !insn.addr !70
%1 = call i64 @goodG2B2(), !insn.addr !71
ret i64 %1, !insn.addr !72
}
declare i64 @wcslen(i64*) local_unnamed_addr
declare i64 @printWLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @printLine(i8*) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 0}
!1 = !{i64 11}
!2 = !{i64 26}
!3 = !{i64 32}
!4 = !{i64 34}
!5 = !{i64 36}
!6 = !{i64 74}
!7 = !{i64 131}
!8 = !{i64 191}
!9 = !{i64 195}
!10 = !{i64 199}
!11 = !{i64 1}
!12 = !{i64 176}
!13 = !{i64 154}
!14 = !{i64 169}
!15 = !{i64 180}
!16 = !{i64 182}
!17 = !{i64 211}
!18 = !{i64 221}
!19 = !{i64 230}
!20 = !{i64 232}
!21 = !{i64 238}
!22 = !{i64 239}
!23 = !{i64 250}
!24 = !{i64 265}
!25 = !{i64 271}
!26 = !{i64 273}
!27 = !{i64 282}
!28 = !{i64 287}
!29 = !{i64 293}
!30 = !{i64 307}
!31 = !{i64 327}
!32 = !{i64 384}
!33 = !{i64 444}
!34 = !{i64 448}
!35 = !{i64 452}
!36 = !{i64 240}
!37 = !{i64 429}
!38 = !{i64 407}
!39 = !{i64 422}
!40 = !{i64 433}
!41 = !{i64 435}
!42 = !{i64 464}
!43 = !{i64 474}
!44 = !{i64 483}
!45 = !{i64 485}
!46 = !{i64 491}
!47 = !{i64 492}
!48 = !{i64 503}
!49 = !{i64 518}
!50 = !{i64 524}
!51 = !{i64 526}
!52 = !{i64 532}
!53 = !{i64 546}
!54 = !{i64 566}
!55 = !{i64 623}
!56 = !{i64 683}
!57 = !{i64 687}
!58 = !{i64 691}
!59 = !{i64 493}
!60 = !{i64 668}
!61 = !{i64 646}
!62 = !{i64 661}
!63 = !{i64 672}
!64 = !{i64 674}
!65 = !{i64 703}
!66 = !{i64 713}
!67 = !{i64 722}
!68 = !{i64 724}
!69 = !{i64 730}
!70 = !{i64 740}
!71 = !{i64 750}
!72 = !{i64 757}
### Assistant: @globalTrue = external dso_local global i32, align 4
@__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_loop_10_bad.source = private unnamed_addr constant [11 x i32] [i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 0], align 16
@globalFalse = external dso_local global i32, align 4
@.str = private unnamed_addr constant [21 x i8] c"Benign, fixed string\00", align 1
@__const.goodG2B1.source = private unnamed_addr constant [11 x i32] [i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 0], align 16
@__const.goodG2B2.source = private unnamed_addr constant [11 x i32] [i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 0], align 16
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_loop_10_bad() #0 {
entry:
%data = alloca i32*, align 8
%dataBadBuffer = alloca [10 x i32], align 16
%dataGoodBuffer = alloca [11 x i32], align 16
%source = alloca [11 x i32], align 16
%i = alloca i64, align 8
%sourceLen = alloca i64, align 8
%0 = load i32, i32* @globalTrue, align 4
%tobool = icmp ne i32 %0, 0
br i1 %tobool, label %if.then, label %if.end
if.then: ; preds = %entry
%arraydecay = getelementptr inbounds [10 x i32], [10 x i32]* %dataBadBuffer, i64 0, i64 0
store i32* %arraydecay, i32** %data, align 8
%1 = load i32*, i32** %data, align 8
%arrayidx = getelementptr inbounds i32, i32* %1, i64 0
store i32 0, i32* %arrayidx, align 4
br label %if.end
if.end: ; preds = %if.then, %entry
%2 = bitcast [11 x i32]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 %2, i8* align 16 bitcast ([11 x i32]* @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_loop_10_bad.source to i8*), i64 44, i1 false)
%arraydecay1 = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%call = call i64 @wcslen(i32* %arraydecay1) #4
store i64 %call, i64* %sourceLen, align 8
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %if.end
%3 = load i64, i64* %i, align 8
%4 = load i64, i64* %sourceLen, align 8
%add = add i64 %4, 1
%cmp = icmp ult i64 %3, %add
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%5 = load i64, i64* %i, align 8
%arrayidx2 = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 %5
%6 = load i32, i32* %arrayidx2, align 4
%7 = load i32*, i32** %data, align 8
%8 = load i64, i64* %i, align 8
%arrayidx3 = getelementptr inbounds i32, i32* %7, i64 %8
store i32 %6, i32* %arrayidx3, align 4
br label %for.inc
for.inc: ; preds = %for.body
%9 = load i64, i64* %i, align 8
%inc = add i64 %9, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%10 = load i32*, i32** %data, align 8
call void @printWLine(i32* %10)
ret void
}
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #1
; Function Attrs: nounwind readonly
declare dso_local i64 @wcslen(i32*) #2
declare dso_local void @printWLine(i32*) #3
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_loop_10_good() #0 {
entry:
call void @goodG2B1()
call void @goodG2B2()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B1() #0 {
entry:
%data = alloca i32*, align 8
%dataBadBuffer = alloca [10 x i32], align 16
%dataGoodBuffer = alloca [11 x i32], align 16
%source = alloca [11 x i32], align 16
%i = alloca i64, align 8
%sourceLen = alloca i64, align 8
%0 = load i32, i32* @globalFalse, align 4
%tobool = icmp ne i32 %0, 0
br i1 %tobool, label %if.then, label %if.else
if.then: ; preds = %entry
call void @printLine(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
br label %if.end
if.else: ; preds = %entry
%arraydecay = getelementptr inbounds [11 x i32], [11 x i32]* %dataGoodBuffer, i64 0, i64 0
store i32* %arraydecay, i32** %data, align 8
%1 = load i32*, i32** %data, align 8
%arrayidx = getelementptr inbounds i32, i32* %1, i64 0
store i32 0, i32* %arrayidx, align 4
br label %if.end
if.end: ; preds = %if.else, %if.then
%2 = bitcast [11 x i32]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 %2, i8* align 16 bitcast ([11 x i32]* @__const.goodG2B1.source to i8*), i64 44, i1 false)
%arraydecay1 = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%call = call i64 @wcslen(i32* %arraydecay1) #4
store i64 %call, i64* %sourceLen, align 8
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %if.end
%3 = load i64, i64* %i, align 8
%4 = load i64, i64* %sourceLen, align 8
%add = add i64 %4, 1
%cmp = icmp ult i64 %3, %add
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%5 = load i64, i64* %i, align 8
%arrayidx2 = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 %5
%6 = load i32, i32* %arrayidx2, align 4
%7 = load i32*, i32** %data, align 8
%8 = load i64, i64* %i, align 8
%arrayidx3 = getelementptr inbounds i32, i32* %7, i64 %8
store i32 %6, i32* %arrayidx3, align 4
br label %for.inc
for.inc: ; preds = %for.body
%9 = load i64, i64* %i, align 8
%inc = add i64 %9, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%10 = load i32*, i32** %data, align 8
call void @printWLine(i32* %10)
ret void
}
declare dso_local void @printLine(i8*) #3
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B2() #0 {
entry:
%data = alloca i32*, align 8
%dataBadBuffer = alloca [10 x i32], align 16
%dataGoodBuffer = alloca [11 x i32], align 16
%source = alloca [11 x i32], align 16
%i = alloca i64, align 8
%sourceLen = alloca i64, align 8
%0 = load i32, i32* @globalTrue, align 4
%tobool = icmp ne i32 %0, 0
br i1 %tobool, label %if.then, label %if.end
if.then: ; preds = %entry
%arraydecay = getelementptr inbounds [11 x i32], [11 x i32]* %dataGoodBuffer, i64 0, i64 0
store i32* %arraydecay, i32** %data, align 8
%1 = load i32*, i32** %data, align 8
%arrayidx = getelementptr inbounds i32, i32* %1, i64 0
store i32 0, i32* %arrayidx, align 4
br label %if.end
if.end: ; preds = %if.then, %entry
%2 = bitcast [11 x i32]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 %2, i8* align 16 bitcast ([11 x i32]* @__const.goodG2B2.source to i8*), i64 44, i1 false)
%arraydecay1 = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%call = call i64 @wcslen(i32* %arraydecay1) #4
store i64 %call, i64* %sourceLen, align 8
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %if.end
%3 = load i64, i64* %i, align 8
%4 = load i64, i64* %sourceLen, align 8
%add = add i64 %4, 1
%cmp = icmp ult i64 %3, %add
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%5 = load i64, i64* %i, align 8
%arrayidx2 = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 %5
%6 = load i32, i32* %arrayidx2, align 4
%7 = load i32*, i32** %data, align 8
%8 = load i64, i64* %i, align 8
%arrayidx3 = getelementptr inbounds i32, i32* %7, i64 %8
store i32 %6, i32* %arrayidx3, align 4
br label %for.inc
for.inc: ; preds = %for.body
%9 = load i64, i64* %i, align 8
%inc = add i64 %9, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%10 = load i32*, i32** %data, align 8
call void @printWLine(i32* %10)
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" }
attributes #1 = { argmemonly nounwind willreturn }
attributes #2 = { nounwind readonly "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #3 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #4 = { nounwind readonly }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@0 = external global i32
define i64 @_GLOBAL_OFFSET_TABLE_.1(i64 %arg1) local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
ret i64 0, !insn.addr !1
}
define i64 @function_32(i64 %arg1, i64 %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_32:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !2
%storemerge1.reg2mem = alloca i64, !insn.addr !2
%.reg2mem = alloca i64, !insn.addr !2
%1 = load i64, i64* %0
%2 = add i64 %1, -152, !insn.addr !2
%3 = inttoptr i64 %2 to i64*, !insn.addr !2
%4 = load i64, i64* %3, align 8, !insn.addr !2
%5 = inttoptr i64 %4 to i64*, !insn.addr !3
%6 = inttoptr i64 %arg3 to i32*, !insn.addr !3
%7 = call i64 @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEEixEOi(i64* %5, i32* %6), !insn.addr !3
%8 = inttoptr i64 %7 to i64*, !insn.addr !4
%9 = load i64, i64* %8, align 8, !insn.addr !4
%10 = add i64 %1, -120, !insn.addr !5
%11 = inttoptr i64 %10 to i64*, !insn.addr !5
store i64 %9, i64* %11, align 8, !insn.addr !5
%12 = add i64 %1, -112, !insn.addr !6
%13 = call i64 @memset(i64 %12, i64 67, i64 99), !insn.addr !7
%14 = add i64 %1, -13, !insn.addr !8
%15 = inttoptr i64 %14 to i8*, !insn.addr !8
store i8 0, i8* %15, align 1, !insn.addr !8
%16 = add i64 %1, -128, !insn.addr !9
%17 = inttoptr i64 %16 to i64*, !insn.addr !9
store i64 0, i64* %17, align 8
%18 = load i64, i64* %11, align 8
store i64 %18, i64* %.reg2mem
store i64 0, i64* %storemerge1.reg2mem
br label %dec_label_pc_74
dec_label_pc_74: ; preds = %dec_label_pc_32, %dec_label_pc_74
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%.reload = load i64, i64* %.reg2mem
%19 = add i64 %storemerge1.reload, %.reload, !insn.addr !10
%20 = add i64 %storemerge1.reload, %12, !insn.addr !11
%21 = inttoptr i64 %20 to i8*, !insn.addr !12
%22 = load i8, i8* %21, align 1, !insn.addr !12
%23 = inttoptr i64 %19 to i8*, !insn.addr !13
store i8 %22, i8* %23, align 1, !insn.addr !13
%24 = load i64, i64* %17, align 8, !insn.addr !14
%25 = add i64 %24, 1, !insn.addr !14
store i64 %25, i64* %17, align 8
%26 = icmp ult i64 %25, 100
%27 = load i64, i64* %11, align 8
store i64 %27, i64* %.reg2mem, !insn.addr !15
store i64 %25, i64* %storemerge1.reg2mem, !insn.addr !15
br i1 %26, label %dec_label_pc_74, label %dec_label_pc_96, !insn.addr !15
dec_label_pc_96: ; preds = %dec_label_pc_74
%28 = add i64 %27, 99, !insn.addr !16
%29 = inttoptr i64 %28 to i8*, !insn.addr !17
store i8 0, i8* %29, align 1, !insn.addr !17
%30 = load i64, i64* %11, align 8, !insn.addr !18
%31 = call i64 @printLine(i64 %30), !insn.addr !19
%32 = add i64 %1, -8, !insn.addr !20
%33 = inttoptr i64 %32 to i64*, !insn.addr !20
%34 = load i64, i64* %33, align 8, !insn.addr !20
%35 = call i64 @__readfsqword(i64 40), !insn.addr !21
%36 = icmp eq i64 %34, %35, !insn.addr !21
store i64 0, i64* %rax.0.reg2mem, !insn.addr !22
br i1 %36, label %dec_label_pc_c2, label %dec_label_pc_bd, !insn.addr !22
dec_label_pc_bd: ; preds = %dec_label_pc_96
%37 = call i64 @__stack_chk_fail(), !insn.addr !23
store i64 %37, i64* %rax.0.reg2mem, !insn.addr !23
br label %dec_label_pc_c2, !insn.addr !23
dec_label_pc_c2: ; preds = %dec_label_pc_bd, %dec_label_pc_96
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !24
}
define i64 @_ZN63CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_loop_7411goodG2BSinkESt3mapIiPcSt4lessIiESaISt4pairIKiS1_EEE(i64 %arg1) local_unnamed_addr {
dec_label_pc_c4:
%rax.0.reg2mem = alloca i64, !insn.addr !25
%storemerge1.reg2mem = alloca i64, !insn.addr !25
%stack_var_-120 = alloca i64, align 8
%stack_var_-140 = alloca i32, align 4
%0 = call i64 @__readfsqword(i64 40), !insn.addr !26
store i32 2, i32* %stack_var_-140, align 4, !insn.addr !27
%1 = inttoptr i64 %arg1 to i64*, !insn.addr !28
%2 = call i64 @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEEixEOi(i64* %1, i32* nonnull %stack_var_-140), !insn.addr !28
%3 = inttoptr i64 %2 to i64*, !insn.addr !29
%4 = load i64, i64* %3, align 8, !insn.addr !29
%5 = ptrtoint i64* %stack_var_-120 to i64, !insn.addr !30
%6 = call i64 @memset(i64 %5, i64 67, i64 99), !insn.addr !31
store i64 0, i64* %storemerge1.reg2mem
br label %dec_label_pc_138
dec_label_pc_138: ; preds = %dec_label_pc_138, %dec_label_pc_c4
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%7 = add i64 %storemerge1.reload, %4, !insn.addr !32
%8 = add i64 %storemerge1.reload, %5, !insn.addr !33
%9 = inttoptr i64 %8 to i8*, !insn.addr !34
%10 = load i8, i8* %9, align 1, !insn.addr !34
%11 = inttoptr i64 %7 to i8*, !insn.addr !35
store i8 %10, i8* %11, align 1, !insn.addr !35
%12 = add nuw nsw i64 %storemerge1.reload, 1, !insn.addr !36
%exitcond = icmp eq i64 %12, 100
store i64 %12, i64* %storemerge1.reg2mem, !insn.addr !37
br i1 %exitcond, label %dec_label_pc_15a, label %dec_label_pc_138, !insn.addr !37
dec_label_pc_15a: ; preds = %dec_label_pc_138
%13 = add i64 %4, 99, !insn.addr !38
%14 = inttoptr i64 %13 to i8*, !insn.addr !39
store i8 0, i8* %14, align 1, !insn.addr !39
%15 = call i64 @printLine(i64 %4), !insn.addr !40
%16 = call i64 @__readfsqword(i64 40), !insn.addr !41
%17 = icmp eq i64 %0, %16, !insn.addr !41
store i64 0, i64* %rax.0.reg2mem, !insn.addr !42
br i1 %17, label %dec_label_pc_186, label %dec_label_pc_181, !insn.addr !42
dec_label_pc_181: ; preds = %dec_label_pc_15a
%18 = call i64 @__stack_chk_fail(), !insn.addr !43
store i64 %18, i64* %rax.0.reg2mem, !insn.addr !43
br label %dec_label_pc_186, !insn.addr !43
dec_label_pc_186: ; preds = %dec_label_pc_181, %dec_label_pc_15a
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !44
}
define i64 @_ZnwmPv(i64 %arg1, i64* %arg2) local_unnamed_addr {
dec_label_pc_188:
%0 = ptrtoint i64* %arg2 to i64
ret i64 %0, !insn.addr !45
}
define i64 @_ZdlPvS_(i64* %arg1, i64* %arg2) local_unnamed_addr {
dec_label_pc_19a:
%0 = alloca i64
%1 = load i64, i64* %0
ret i64 %1, !insn.addr !46
}
define i64* @_ZSt4moveIRiEONSt16remove_referenceIT_E4typeEOS2_(i32** %arg1) local_unnamed_addr {
dec_label_pc_1ac:
%0 = bitcast i32** %arg1 to i64*, !insn.addr !47
ret i64* %0, !insn.addr !47
}
define i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_1ba:
%0 = bitcast i64* %arg1 to i32*, !insn.addr !48
ret i32* %0, !insn.addr !48
}
define i64 @_ZNSt5tupleIJOiEEC1IJiELb1EEEDpOT_(i64* %result, i64 %arg2) local_unnamed_addr {
dec_label_pc_1c8:
%0 = inttoptr i64 %arg2 to i64*, !insn.addr !49
%1 = call i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i64* %0), !insn.addr !49
%2 = call i64 @_ZNSt11_Tuple_implILm0EJOiEEC1IiEEOT_(i64* %result, i32* %1), !insn.addr !50
ret i64 %2, !insn.addr !51
}
define i64 @_ZNSt11_Tuple_implILm0EJOiEEC1IiEEOT_(i64* %result, i32* %arg2) local_unnamed_addr {
dec_label_pc_1fc:
%0 = bitcast i32* %arg2 to i64*
%1 = call i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i64* %0), !insn.addr !52
%2 = call i64 @_ZNSt10_Head_baseILm0EOiLb0EEC1IiEEOT_(i64* %result, i32* %1), !insn.addr !53
ret i64 %2, !insn.addr !54
}
define i64 @_ZNSt10_Head_baseILm0EOiLb0EEC1IiEEOT_(i64* %result, i32* %arg2) local_unnamed_addr {
dec_label_pc_230:
%0 = ptrtoint i64* %result to i64
%1 = bitcast i32* %arg2 to i64*
%2 = call i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i64* %1), !insn.addr !55
%3 = ptrtoint i32* %2 to i64, !insn.addr !55
store i64 %3, i64* %result, align 8, !insn.addr !56
ret i64 %0, !insn.addr !57
}
define i64 @_ZNSt5tupleIJOiEEC1EOS1_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_25a:
%0 = call i64 @_ZNSt11_Tuple_implILm0EJOiEEC1EOS1_(i64* %result, i64* %arg2), !insn.addr !58
ret i64 %0, !insn.addr !59
}
define i64 @_ZSt16forward_as_tupleIJiEESt5tupleIJDpOT_EES3_(i64* %result, i64 %arg2) local_unnamed_addr {
dec_label_pc_280:
%0 = ptrtoint i64* %result to i64
%1 = inttoptr i64 %arg2 to i64*, !insn.addr !60
%2 = call i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i64* %1), !insn.addr !60
%3 = ptrtoint i32* %2 to i64, !insn.addr !60
%4 = call i64 @_ZNSt5tupleIJOiEEC1IJiELb1EEEDpOT_(i64* %result, i64 %3), !insn.addr !61
ret i64 %0, !insn.addr !62
}
define i64 @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEEixEOi(i64* %result, i32* %arg2) local_unnamed_addr {
dec_label_pc_2b8:
%rax.0.reg2mem = alloca i64, !insn.addr !63
%stack_var_-57 = alloca i64, align 8
%stack_var_-48 = alloca i64, align 8
%stack_var_-40 = alloca i64, align 8
%stack_var_-56 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !64
%1 = call i64 @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE11lower_boundERS4_(i64* %result, i32* %arg2), !insn.addr !65
store i64 %1, i64* %stack_var_-56, align 8, !insn.addr !66
%2 = call i64 @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE3endEv(i64* %result), !insn.addr !67
store i64 %2, i64* %stack_var_-40, align 8, !insn.addr !68
%3 = call i64 @_ZNKSt17_Rb_tree_iteratorISt4pairIKiPcEEeqERKS4_(i64* nonnull %stack_var_-56, i64* nonnull %stack_var_-40), !insn.addr !69
%4 = trunc i64 %3 to i8, !insn.addr !70
%5 = icmp eq i8 %4, 0, !insn.addr !70
%6 = icmp eq i1 %5, false, !insn.addr !71
br i1 %6, label %dec_label_pc_358, label %dec_label_pc_316, !insn.addr !71
dec_label_pc_316: ; preds = %dec_label_pc_2b8
%7 = call i64 @_ZNKSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE8key_compEv(i64* %result), !insn.addr !72
%8 = call i64 @_ZNKSt17_Rb_tree_iteratorISt4pairIKiPcEEdeEv(i64* nonnull %stack_var_-56), !insn.addr !73
%9 = inttoptr i64 %8 to i32*, !insn.addr !74
%10 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* nonnull %stack_var_-48, i32* %arg2, i32* %9), !insn.addr !74
%11 = trunc i64 %10 to i8, !insn.addr !75
%12 = icmp ne i8 %11, 0, !insn.addr !75
%phitmp = icmp eq i1 %12, false
br i1 %phitmp, label %dec_label_pc_3b5, label %dec_label_pc_358, !insn.addr !76
dec_label_pc_358: ; preds = %dec_label_pc_2b8, %dec_label_pc_316
%13 = ptrtoint i64* %result to i64
%14 = bitcast i32* %arg2 to i32**
%15 = call i64* @_ZSt4moveIRiEONSt16remove_referenceIT_E4typeEOS2_(i32** %14), !insn.addr !77
%16 = ptrtoint i64* %15 to i64, !insn.addr !77
%17 = call i64 @_ZSt16forward_as_tupleIJiEESt5tupleIJDpOT_EES3_(i64* nonnull %stack_var_-48, i64 %16), !insn.addr !78
%18 = call i64 @_ZNSt23_Rb_tree_const_iteratorISt4pairIKiPcEEC1ERKSt17_Rb_tree_iteratorIS3_E(i64* nonnull %stack_var_-40, i64* nonnull %stack_var_-56), !insn.addr !79
%19 = load i64, i64* %stack_var_-40, align 8, !insn.addr !80
%20 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJOiEESE_IJEEEEESt17_Rb_tree_iteratorIS3_ESt23_Rb_tree_const_iteratorIS3_EDpOT_(i64 %13, i64 %19, i64 425, i64* nonnull %stack_var_-48, i64* nonnull %stack_var_-57), !insn.addr !81
store i64 %20, i64* %stack_var_-56, align 8, !insn.addr !82
br label %dec_label_pc_3b5, !insn.addr !82
dec_label_pc_3b5: ; preds = %dec_label_pc_358, %dec_label_pc_316
%21 = call i64 @_ZNKSt17_Rb_tree_iteratorISt4pairIKiPcEEdeEv(i64* nonnull %stack_var_-56), !insn.addr !83
%22 = add i64 %21, 8, !insn.addr !84
%23 = call i64 @__readfsqword(i64 40), !insn.addr !85
%24 = icmp eq i64 %0, %23, !insn.addr !85
store i64 %22, i64* %rax.0.reg2mem, !insn.addr !86
br i1 %24, label %dec_label_pc_3d9, label %dec_label_pc_3d4, !insn.addr !86
dec_label_pc_3d4: ; preds = %dec_label_pc_3b5
%25 = call i64 @__stack_chk_fail(), !insn.addr !87
store i64 %25, i64* %rax.0.reg2mem, !insn.addr !87
br label %dec_label_pc_3d9, !insn.addr !87
dec_label_pc_3d9: ; preds = %dec_label_pc_3d4, %dec_label_pc_3b5
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !88
}
define i64 @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE11lower_boundERS4_(i64* %result, i32* %arg2) local_unnamed_addr {
dec_label_pc_3e0:
%0 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11lower_boundERS1_(i64* %result, i32* %arg2), !insn.addr !89
ret i64 %0, !insn.addr !90
}
define i64 @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE3endEv(i64* %result) local_unnamed_addr {
dec_label_pc_406:
%0 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE3endEv(i64* %result), !insn.addr !91
ret i64 %0, !insn.addr !92
}
define i64 @_ZNKSt17_Rb_tree_iteratorISt4pairIKiPcEEeqERKS4_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_420:
%0 = ptrtoint i64* %arg2 to i64
%1 = icmp eq i64* %result, %arg2, !insn.addr !93
%2 = zext i1 %1 to i64, !insn.addr !94
%3 = and i64 %0, -256, !insn.addr !94
%4 = or i64 %3, %2, !insn.addr !94
ret i64 %4, !insn.addr !95
}
define i64 @_ZNKSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE8key_compEv(i64* %result) local_unnamed_addr {
dec_label_pc_442:
%0 = alloca i64
%1 = load i64, i64* %0
%2 = call i64 @_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8key_compEv(i64* %result), !insn.addr !96
%3 = and i64 %1, 4294967295, !insn.addr !97
ret i64 %3, !insn.addr !98
}
define i64 @_ZNKSt17_Rb_tree_iteratorISt4pairIKiPcEEdeEv(i64* %result) local_unnamed_addr {
dec_label_pc_464:
%0 = call i64 @_ZNSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(i64* %result), !insn.addr !99
ret i64 %0, !insn.addr !100
}
define i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %arg2, i32* %arg3) local_unnamed_addr {
dec_label_pc_482:
%0 = alloca i64
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = trunc i64 %1 to i32
%4 = trunc i64 %2 to i32
%5 = sub i32 %3, %4, !insn.addr !101
%6 = xor i64 %2, %1
%7 = trunc i64 %6 to i32, !insn.addr !101
%8 = xor i32 %5, %3, !insn.addr !101
%9 = and i32 %8, %7, !insn.addr !101
%10 = icmp slt i32 %9, 0, !insn.addr !101
%11 = icmp slt i32 %5, 0, !insn.addr !101
%12 = icmp ne i1 %11, %10, !insn.addr !102
%13 = zext i1 %12 to i64, !insn.addr !102
%14 = and i64 %2, 4294967040
%15 = or i64 %14, %13, !insn.addr !102
ret i64 %15, !insn.addr !103
}
define i64 @_ZNSt23_Rb_tree_const_iteratorISt4pairIKiPcEEC1ERKSt17_Rb_tree_iteratorIS3_E(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_4a6:
%0 = ptrtoint i64* %arg2 to i64
%1 = ptrtoint i64* %result to i64
store i64 %0, i64* %result, align 8, !insn.addr !104
ret i64 %1, !insn.addr !105
}
define i64 @_ZNSt11_Tuple_implILm0EJOiEE7_M_headERS1_(i64* %arg1) local_unnamed_addr {
dec_label_pc_4c3:
%0 = call i64 @_ZNSt10_Head_baseILm0EOiLb0EE7_M_headERS1_(i64* %arg1), !insn.addr !106
ret i64 %0, !insn.addr !107
}
define i64 @_ZNSt10_Head_baseILm0EOiLb0EE7_M_headERS1_(i64* %arg1) local_unnamed_addr {
dec_label_pc_4dd:
%0 = ptrtoint i64* %arg1 to i64
ret i64 %0, !insn.addr !108
}
define i32** @_ZSt7forwardIOiEOT_RNSt16remove_referenceIS1_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_4ee:
%0 = bitcast i64* %arg1 to i32**, !insn.addr !109
ret i32** %0, !insn.addr !109
}
define i64 @_ZNSt11_Tuple_implILm0EJOiEEC1EOS1_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_4fc:
%0 = call i64 @_ZNSt11_Tuple_implILm0EJOiEE7_M_headERS1_(i64* %arg2), !insn.addr !110
%1 = inttoptr i64 %0 to i64*, !insn.addr !111
%2 = call i32** @_ZSt7forwardIOiEOT_RNSt16remove_referenceIS1_E4typeE(i64* %1), !insn.addr !111
%3 = bitcast i32** %2 to i32*, !insn.addr !112
%4 = call i64 @_ZNSt10_Head_baseILm0EOiLb0EEC1IiEEOT_(i64* %result, i32* %3), !insn.addr !112
ret i64 %4, !insn.addr !113
}
define i64** @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_538:
%0 = bitcast i64* %arg1 to i64**, !insn.addr !114
ret i64** %0, !insn.addr !114
}
define i64* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_546:
ret i64* %arg1, !insn.addr !115
}
define i64* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_554:
ret i64* %arg1, !insn.addr !116
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJOiEESE_IJEEEEESt17_Rb_tree_iteratorIS3_ESt23_Rb_tree_const_iteratorIS3_EDpOT_(i64 %arg1, i64 %arg2, i64 %arg3, i64* %arg4, i64* %arg5) local_unnamed_addr {
dec_label_pc_562:
%rax.0.reg2mem = alloca i64, !insn.addr !117
%storemerge.reg2mem = alloca i64, !insn.addr !117
%stack_var_-72 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !118
%1 = call i64* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(i64* %arg5), !insn.addr !119
%2 = ptrtoint i64* %1 to i64, !insn.addr !119
%3 = call i64* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(i64* %arg4), !insn.addr !120
%4 = ptrtoint i64* %3 to i64, !insn.addr !120
%5 = inttoptr i64 %arg3 to i64*, !insn.addr !121
%6 = call i64** @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(i64* %5), !insn.addr !121
%7 = ptrtoint i64** %6 to i64, !insn.addr !121
%8 = call i64* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_create_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESE_IJEEEEEPSt13_Rb_tree_nodeIS3_EDpOT_(i64 %arg1, i64 %7, i64 %4, i64 %2), !insn.addr !122
%9 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt13_Rb_tree_nodeIS3_E(i64* %8), !insn.addr !123
%10 = inttoptr i64 %arg1 to i64*, !insn.addr !124
%11 = inttoptr i64 %9 to i32*, !insn.addr !124
%12 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS3_ERS1_(i64* %10, i64 %arg2, i32* %11), !insn.addr !124
%13 = icmp eq i64 %9, 0, !insn.addr !125
br i1 %13, label %dec_label_pc_620, label %dec_label_pc_606, !insn.addr !126
dec_label_pc_606: ; preds = %dec_label_pc_562
%14 = inttoptr i64 %12 to i64*, !insn.addr !127
%15 = inttoptr i64 %9 to i64*, !insn.addr !127
%16 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_insert_nodeEPSt18_Rb_tree_node_baseSB_PSt13_Rb_tree_nodeIS3_E(i64* %10, i64* %14, i64* %15, i64* %8), !insn.addr !127
store i64 %16, i64* %storemerge.reg2mem, !insn.addr !128
br label %dec_label_pc_64a, !insn.addr !128
dec_label_pc_620: ; preds = %dec_label_pc_562
%17 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_drop_nodeEPSt13_Rb_tree_nodeIS3_E(i64* %10, i64* %8), !insn.addr !129
%18 = inttoptr i64 %12 to i64*, !insn.addr !130
%19 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-72, i64* %18), !insn.addr !130
%20 = load i64, i64* %stack_var_-72, align 8, !insn.addr !131
store i64 %20, i64* %storemerge.reg2mem, !insn.addr !131
br label %dec_label_pc_64a, !insn.addr !131
dec_label_pc_64a: ; preds = %dec_label_pc_620, %dec_label_pc_606
%storemerge.reload = load i64, i64* %storemerge.reg2mem
%21 = call i64 @__readfsqword(i64 40), !insn.addr !132
%22 = icmp eq i64 %0, %21, !insn.addr !132
store i64 %storemerge.reload, i64* %rax.0.reg2mem, !insn.addr !133
br i1 %22, label %dec_label_pc_693, label %dec_label_pc_68e, !insn.addr !133
dec_label_pc_68e: ; preds = %dec_label_pc_64a
%23 = call i64 @__stack_chk_fail(), !insn.addr !134
store i64 %23, i64* %rax.0.reg2mem, !insn.addr !134
br label %dec_label_pc_693, !insn.addr !134
dec_label_pc_693: ; preds = %dec_label_pc_68e, %dec_label_pc_64a
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !135
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11lower_boundERS1_(i64* %result, i32* %arg2) local_unnamed_addr {
dec_label_pc_6bc:
%0 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_M_endEv(i64* %result), !insn.addr !136
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_M_beginEv(i64* %result), !insn.addr !137
%2 = inttoptr i64 %1 to i64*, !insn.addr !138
%3 = inttoptr i64 %0 to i64*, !insn.addr !138
%4 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_lower_boundEPSt13_Rb_tree_nodeIS3_EPSt18_Rb_tree_node_baseRS1_(i64* %result, i64* %2, i64* %3, i32* %arg2), !insn.addr !138
ret i64 %4, !insn.addr !139
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE3endEv(i64* %result) local_unnamed_addr {
dec_label_pc_708:
%rax.0.reg2mem = alloca i64, !insn.addr !140
%0 = ptrtoint i64* %result to i64
%stack_var_-24 = alloca i64, align 8
%1 = call i64 @__readfsqword(i64 40), !insn.addr !141
%2 = add i64 %0, 8, !insn.addr !142
%3 = inttoptr i64 %2 to i64*, !insn.addr !143
%4 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-24, i64* %3), !insn.addr !143
%5 = load i64, i64* %stack_var_-24, align 8, !insn.addr !144
%6 = call i64 @__readfsqword(i64 40), !insn.addr !145
%7 = icmp eq i64 %1, %6, !insn.addr !145
store i64 %5, i64* %rax.0.reg2mem, !insn.addr !146
br i1 %7, label %dec_label_pc_752, label %dec_label_pc_74d, !insn.addr !146
dec_label_pc_74d: ; preds = %dec_label_pc_708
%8 = call i64 @__stack_chk_fail(), !insn.addr !147
store i64 %8, i64* %rax.0.reg2mem, !insn.addr !147
br label %dec_label_pc_752, !insn.addr !147
dec_label_pc_752: ; preds = %dec_label_pc_74d, %dec_label_pc_708
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !148
}
define i64 @_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8key_compEv(i64* %result) local_unnamed_addr {
dec_label_pc_754:
%0 = alloca i64
%1 = load i64, i64* %0
ret i64 %1, !insn.addr !149
}
define i64 @_ZNSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_75e:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 32, !insn.addr !150
%2 = inttoptr i64 %1 to i64*, !insn.addr !151
%3 = call i64 @_ZN9__gnu_cxx16__aligned_membufISt4pairIKiPcEE6_M_ptrEv(i64* %2), !insn.addr !151
ret i64 %3, !insn.addr !152
}
define i64* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_create_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESE_IJEEEEEPSt13_Rb_tree_nodeIS3_EDpOT_(i64 %arg1, i64 %arg2, i64 %arg3, i64 %arg4) local_unnamed_addr {
dec_label_pc_77c:
%0 = inttoptr i64 %arg1 to i64*, !insn.addr !153
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_get_nodeEv(i64* %0), !insn.addr !153
%2 = inttoptr i64 %arg4 to i64*, !insn.addr !154
%3 = call i64* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(i64* %2), !insn.addr !154
%4 = ptrtoint i64* %3 to i64, !insn.addr !154
%5 = inttoptr i64 %arg3 to i64*, !insn.addr !155
%6 = call i64* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(i64* %5), !insn.addr !155
%7 = ptrtoint i64* %6 to i64, !insn.addr !155
%8 = inttoptr i64 %arg2 to i64*, !insn.addr !156
%9 = call i64** @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(i64* %8), !insn.addr !156
%10 = ptrtoint i64** %9 to i64, !insn.addr !156
call void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE17_M_construct_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESE_IJEEEEEvPSt13_Rb_tree_nodeIS3_EDpOT_(i64 %arg1, i64 %1, i64 %10, i64 %7, i64 %4), !insn.addr !157
%11 = inttoptr i64 %1 to i64*, !insn.addr !158
ret i64* %11, !insn.addr !158
}
define i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEERKS1_OT_(i64* %result, i64** %arg2, i64*** %arg3) local_unnamed_addr {
dec_label_pc_7f8:
%0 = ptrtoint i64** %arg2 to i64
%1 = ptrtoint i64* %result to i64
store i64 %0, i64* %result, align 8, !insn.addr !159
%2 = bitcast i64*** %arg3 to i64*, !insn.addr !160
%3 = call i64*** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(i64* %2), !insn.addr !160
%4 = load i64**, i64*** %3, align 8, !insn.addr !161
%5 = ptrtoint i64** %4 to i64, !insn.addr !161
%6 = add i64 %1, 8, !insn.addr !162
%7 = inttoptr i64 %6 to i64*, !insn.addr !162
store i64 %5, i64* %7, align 8, !insn.addr !162
ret i64 %1, !insn.addr !163
}
define i64*** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_834:
%0 = bitcast i64* %arg1 to i64***, !insn.addr !164
ret i64*** %0, !insn.addr !164
}
define i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_S4_Lb1EEEOT_OT0_(i64* %result, i64*** %arg2, i64*** %arg3) local_unnamed_addr {
dec_label_pc_842:
%0 = ptrtoint i64* %result to i64
%1 = bitcast i64*** %arg2 to i64*, !insn.addr !165
%2 = call i64*** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(i64* %1), !insn.addr !165
%3 = load i64**, i64*** %2, align 8, !insn.addr !166
%4 = ptrtoint i64** %3 to i64, !insn.addr !166
store i64 %4, i64* %result, align 8, !insn.addr !167
%5 = bitcast i64*** %arg3 to i64*, !insn.addr !168
%6 = call i64*** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(i64* %5), !insn.addr !168
%7 = load i64**, i64*** %6, align 8, !insn.addr !169
%8 = ptrtoint i64** %7 to i64, !insn.addr !169
%9 = add i64 %0, 8, !insn.addr !170
%10 = inttoptr i64 %9 to i64*, !insn.addr !170
store i64 %8, i64* %10, align 8, !insn.addr !170
ret i64 %0, !insn.addr !171
}
define i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEEOT_RKS1_(i64* %result, i64*** %arg2, i64** %arg3) local_unnamed_addr {
dec_label_pc_886:
%0 = ptrtoint i64* %result to i64
%1 = bitcast i64*** %arg2 to i64*, !insn.addr !172
%2 = call i64*** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(i64* %1), !insn.addr !172
%3 = load i64**, i64*** %2, align 8, !insn.addr !173
%4 = ptrtoint i64** %3 to i64, !insn.addr !173
store i64 %4, i64* %result, align 8, !insn.addr !174
%5 = add i64 %0, 8, !insn.addr !175
%6 = inttoptr i64 %5 to i64*, !insn.addr !175
store i64 %4, i64* %6, align 8, !insn.addr !175
ret i64 %0, !insn.addr !176
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS3_ERS1_(i64* %result, i64 %arg2, i32* %arg3) local_unnamed_addr {
dec_label_pc_8c2:
%rax.1.reg2mem = alloca i64, !insn.addr !177
%rax.0.reg2mem = alloca i64, !insn.addr !177
%stack_var_-72 = alloca i64, align 8
%stack_var_-56 = alloca i64, align 8
%stack_var_-64 = alloca i64, align 8
%stack_var_-80 = alloca i64, align 8
%stack_var_-104 = alloca i64, align 8
store i64 %arg2, i64* %stack_var_-104, align 8, !insn.addr !178
%0 = call i64 @__readfsqword(i64 40), !insn.addr !179
%1 = call i64 @_ZNKSt23_Rb_tree_const_iteratorISt4pairIKiPcEE13_M_const_castEv(i64* nonnull %stack_var_-104), !insn.addr !180
store i64 %1, i64* %stack_var_-80, align 8, !insn.addr !181
%2 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_M_endEv(i64* %result), !insn.addr !182
%3 = icmp eq i64 %1, %2, !insn.addr !183
%4 = icmp eq i1 %3, false, !insn.addr !184
br i1 %4, label %dec_label_pc_9b8, label %dec_label_pc_914, !insn.addr !185
dec_label_pc_914: ; preds = %dec_label_pc_8c2
%5 = call i64 @_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE4sizeEv(i64* %result), !insn.addr !186
%6 = icmp eq i64 %5, 0, !insn.addr !187
br i1 %6, label %dec_label_pc_960, label %dec_label_pc_925, !insn.addr !188
dec_label_pc_925: ; preds = %dec_label_pc_914
%7 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_rightmostEv(i64* %result), !insn.addr !189
%8 = inttoptr i64 %7 to i64*, !insn.addr !190
%9 = load i64, i64* %8, align 8, !insn.addr !190
%10 = inttoptr i64 %9 to i64*, !insn.addr !191
%11 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %10), !insn.addr !191
%12 = inttoptr i64 %11 to i32*, !insn.addr !192
%13 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %12, i32* %arg3), !insn.addr !192
%14 = trunc i64 %13 to i8, !insn.addr !193
%15 = icmp eq i8 %14, 0, !insn.addr !193
br i1 %15, label %dec_label_pc_960, label %dec_label_pc_969, !insn.addr !194
dec_label_pc_960: ; preds = %dec_label_pc_925, %dec_label_pc_914
%16 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE24_M_get_insert_unique_posERS1_(i64* %result, i32* %arg3), !insn.addr !195
store i64 %16, i64* %rax.0.reg2mem, !insn.addr !196
br label %dec_label_pc_c4c, !insn.addr !196
dec_label_pc_969: ; preds = %dec_label_pc_925
%17 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_rightmostEv(i64* %result), !insn.addr !197
store i64 0, i64* %stack_var_-64, align 8, !insn.addr !198
%18 = bitcast i64* %stack_var_-64 to i64**, !insn.addr !199
%19 = inttoptr i64 %17 to i64***, !insn.addr !199
%20 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEERKS1_OT_(i64* nonnull %stack_var_-56, i64** nonnull %18, i64*** %19), !insn.addr !199
%21 = load i64, i64* %stack_var_-56, align 8, !insn.addr !200
store i64 %21, i64* %rax.0.reg2mem, !insn.addr !201
br label %dec_label_pc_c4c, !insn.addr !201
dec_label_pc_9b8: ; preds = %dec_label_pc_8c2
%22 = inttoptr i64 %1 to i64*
%23 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %22), !insn.addr !202
%24 = inttoptr i64 %23 to i32*, !insn.addr !203
%25 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %arg3, i32* %24), !insn.addr !203
%26 = trunc i64 %25 to i8, !insn.addr !204
%27 = icmp eq i8 %26, 0, !insn.addr !204
br i1 %27, label %dec_label_pc_af6, label %dec_label_pc_9e2, !insn.addr !205
dec_label_pc_9e2: ; preds = %dec_label_pc_9b8
store i64 %1, i64* %stack_var_-72, align 8, !insn.addr !206
%28 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_leftmostEv(i64* %result), !insn.addr !207
%29 = inttoptr i64 %28 to i64*, !insn.addr !208
%30 = load i64, i64* %29, align 8, !insn.addr !208
%31 = icmp eq i64 %1, %30, !insn.addr !209
%32 = icmp eq i1 %31, false, !insn.addr !210
br i1 %32, label %dec_label_pc_a44, label %dec_label_pc_a07, !insn.addr !211
dec_label_pc_a07: ; preds = %dec_label_pc_9e2
%33 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_leftmostEv(i64* %result), !insn.addr !212
%34 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_leftmostEv(i64* %result), !insn.addr !213
%35 = inttoptr i64 %34 to i64***, !insn.addr !214
%36 = inttoptr i64 %33 to i64***, !insn.addr !214
%37 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_S4_Lb1EEEOT_OT0_(i64* nonnull %stack_var_-56, i64*** %35, i64*** %36), !insn.addr !214
%38 = load i64, i64* %stack_var_-56, align 8, !insn.addr !215
store i64 %38, i64* %rax.0.reg2mem, !insn.addr !216
br label %dec_label_pc_c4c, !insn.addr !216
dec_label_pc_a44: ; preds = %dec_label_pc_9e2
%39 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEmmEv(i64* nonnull %stack_var_-72), !insn.addr !217
%40 = inttoptr i64 %39 to i64*, !insn.addr !218
%41 = load i64, i64* %40, align 8, !insn.addr !218
%42 = inttoptr i64 %41 to i64*, !insn.addr !219
%43 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %42), !insn.addr !219
%44 = inttoptr i64 %43 to i32*, !insn.addr !220
%45 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %44, i32* %arg3), !insn.addr !220
%46 = trunc i64 %45 to i8, !insn.addr !221
%47 = icmp eq i8 %46, 0, !insn.addr !221
br i1 %47, label %dec_label_pc_ade, label %dec_label_pc_a78, !insn.addr !222
dec_label_pc_a78: ; preds = %dec_label_pc_a44
%48 = load i64, i64* %stack_var_-72, align 8, !insn.addr !223
%49 = inttoptr i64 %48 to i64*, !insn.addr !224
%50 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPSt18_Rb_tree_node_base(i64* %49), !insn.addr !224
%51 = icmp eq i64 %50, 0, !insn.addr !225
%52 = icmp eq i1 %51, false, !insn.addr !226
br i1 %52, label %dec_label_pc_aba, label %dec_label_pc_a8e, !insn.addr !227
dec_label_pc_a8e: ; preds = %dec_label_pc_a78
store i64 0, i64* %stack_var_-64, align 8, !insn.addr !228
%53 = bitcast i64* %stack_var_-64 to i64**, !insn.addr !229
%54 = bitcast i64* %stack_var_-72 to i64***, !insn.addr !229
%55 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEERKS1_OT_(i64* nonnull %stack_var_-56, i64** nonnull %53, i64*** nonnull %54), !insn.addr !229
%56 = load i64, i64* %stack_var_-56, align 8, !insn.addr !230
store i64 %56, i64* %rax.0.reg2mem, !insn.addr !231
br label %dec_label_pc_c4c, !insn.addr !231
dec_label_pc_aba: ; preds = %dec_label_pc_a78
%57 = bitcast i64* %stack_var_-80 to i64***, !insn.addr !232
%58 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_S4_Lb1EEEOT_OT0_(i64* nonnull %stack_var_-56, i64*** nonnull %57, i64*** nonnull %57), !insn.addr !232
%59 = load i64, i64* %stack_var_-56, align 8, !insn.addr !233
store i64 %59, i64* %rax.0.reg2mem, !insn.addr !234
br label %dec_label_pc_c4c, !insn.addr !234
dec_label_pc_ade: ; preds = %dec_label_pc_a44
%60 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE24_M_get_insert_unique_posERS1_(i64* %result, i32* %arg3), !insn.addr !235
store i64 %60, i64* %rax.0.reg2mem, !insn.addr !236
br label %dec_label_pc_c4c, !insn.addr !236
dec_label_pc_af6: ; preds = %dec_label_pc_9b8
%61 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %22), !insn.addr !237
%62 = inttoptr i64 %61 to i32*, !insn.addr !238
%63 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %62, i32* %arg3), !insn.addr !238
%64 = trunc i64 %63 to i8, !insn.addr !239
%65 = icmp eq i8 %64, 0, !insn.addr !239
br i1 %65, label %dec_label_pc_c25, label %dec_label_pc_b23, !insn.addr !240
dec_label_pc_b23: ; preds = %dec_label_pc_af6
%66 = load i64, i64* %stack_var_-80, align 8
store i64 %66, i64* %stack_var_-72, align 8, !insn.addr !241
%67 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_rightmostEv(i64* %result), !insn.addr !242
%68 = inttoptr i64 %67 to i64*, !insn.addr !243
%69 = load i64, i64* %68, align 8, !insn.addr !243
%70 = icmp eq i64 %66, %69, !insn.addr !244
%71 = icmp eq i1 %70, false, !insn.addr !245
br i1 %71, label %dec_label_pc_b7f, label %dec_label_pc_b48, !insn.addr !246
dec_label_pc_b48: ; preds = %dec_label_pc_b23
%72 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_rightmostEv(i64* %result), !insn.addr !247
store i64 0, i64* %stack_var_-64, align 8, !insn.addr !248
%73 = bitcast i64* %stack_var_-64 to i64**, !insn.addr !249
%74 = inttoptr i64 %72 to i64***, !insn.addr !249
%75 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEERKS1_OT_(i64* nonnull %stack_var_-56, i64** nonnull %73, i64*** %74), !insn.addr !249
%76 = load i64, i64* %stack_var_-56, align 8, !insn.addr !250
store i64 %76, i64* %rax.0.reg2mem, !insn.addr !251
br label %dec_label_pc_c4c, !insn.addr !251
dec_label_pc_b7f: ; preds = %dec_label_pc_b23
%77 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEppEv(i64* nonnull %stack_var_-72), !insn.addr !252
%78 = inttoptr i64 %77 to i64*, !insn.addr !253
%79 = load i64, i64* %78, align 8, !insn.addr !253
%80 = inttoptr i64 %79 to i64*, !insn.addr !254
%81 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %80), !insn.addr !254
%82 = inttoptr i64 %81 to i32*, !insn.addr !255
%83 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %arg3, i32* %82), !insn.addr !255
%84 = trunc i64 %83 to i8, !insn.addr !256
%85 = icmp eq i8 %84, 0, !insn.addr !256
br i1 %85, label %dec_label_pc_c10, label %dec_label_pc_bb0, !insn.addr !257
dec_label_pc_bb0: ; preds = %dec_label_pc_b7f
%86 = load i64, i64* %stack_var_-80, align 8, !insn.addr !258
%87 = inttoptr i64 %86 to i64*, !insn.addr !259
%88 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPSt18_Rb_tree_node_base(i64* %87), !insn.addr !259
%89 = icmp eq i64 %88, 0, !insn.addr !260
%90 = icmp eq i1 %89, false, !insn.addr !261
br i1 %90, label %dec_label_pc_bef, label %dec_label_pc_bc6, !insn.addr !262
dec_label_pc_bc6: ; preds = %dec_label_pc_bb0
store i64 0, i64* %stack_var_-64, align 8, !insn.addr !263
%91 = bitcast i64* %stack_var_-64 to i64**, !insn.addr !264
%92 = bitcast i64* %stack_var_-80 to i64***, !insn.addr !264
%93 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEERKS1_OT_(i64* nonnull %stack_var_-56, i64** nonnull %91, i64*** nonnull %92), !insn.addr !264
%94 = load i64, i64* %stack_var_-56, align 8, !insn.addr !265
store i64 %94, i64* %rax.0.reg2mem, !insn.addr !266
br label %dec_label_pc_c4c, !insn.addr !266
dec_label_pc_bef: ; preds = %dec_label_pc_bb0
%95 = bitcast i64* %stack_var_-72 to i64***, !insn.addr !267
%96 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_S4_Lb1EEEOT_OT0_(i64* nonnull %stack_var_-56, i64*** nonnull %95, i64*** nonnull %95), !insn.addr !267
%97 = load i64, i64* %stack_var_-56, align 8, !insn.addr !268
store i64 %97, i64* %rax.0.reg2mem, !insn.addr !269
br label %dec_label_pc_c4c, !insn.addr !269
dec_label_pc_c10: ; preds = %dec_label_pc_b7f
%98 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE24_M_get_insert_unique_posERS1_(i64* %result, i32* %arg3), !insn.addr !270
store i64 %98, i64* %rax.0.reg2mem, !insn.addr !271
br label %dec_label_pc_c4c, !insn.addr !271
dec_label_pc_c25: ; preds = %dec_label_pc_af6
store i64 0, i64* %stack_var_-64, align 8, !insn.addr !272
%99 = bitcast i64* %stack_var_-80 to i64***, !insn.addr !273
%100 = bitcast i64* %stack_var_-64 to i64**, !insn.addr !273
%101 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEEOT_RKS1_(i64* nonnull %stack_var_-56, i64*** nonnull %99, i64** nonnull %100), !insn.addr !273
%102 = load i64, i64* %stack_var_-56, align 8, !insn.addr !274
store i64 %102, i64* %rax.0.reg2mem, !insn.addr !275
br label %dec_label_pc_c4c, !insn.addr !275
dec_label_pc_c4c: ; preds = %dec_label_pc_c25, %dec_label_pc_c10, %dec_label_pc_bef, %dec_label_pc_bc6, %dec_label_pc_b48, %dec_label_pc_ade, %dec_label_pc_aba, %dec_label_pc_a8e, %dec_label_pc_a07, %dec_label_pc_960, %dec_label_pc_969
%rax.0.reload = load i64, i64* %rax.0.reg2mem
%103 = call i64 @__readfsqword(i64 40), !insn.addr !276
%104 = icmp eq i64 %0, %103, !insn.addr !276
store i64 %rax.0.reload, i64* %rax.1.reg2mem, !insn.addr !277
br i1 %104, label %dec_label_pc_c60, label %dec_label_pc_c5b, !insn.addr !277
dec_label_pc_c5b: ; preds = %dec_label_pc_c4c
%105 = call i64 @__stack_chk_fail(), !insn.addr !278
store i64 %105, i64* %rax.1.reg2mem, !insn.addr !278
br label %dec_label_pc_c60, !insn.addr !278
dec_label_pc_c60: ; preds = %dec_label_pc_c5b, %dec_label_pc_c4c
%rax.1.reload = load i64, i64* %rax.1.reg2mem
ret i64 %rax.1.reload, !insn.addr !279
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt13_Rb_tree_nodeIS3_E(i64* %arg1) local_unnamed_addr {
dec_label_pc_c67:
%rax.0.reg2mem = alloca i64, !insn.addr !280
%stack_var_-17 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !281
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_valueEPKSt13_Rb_tree_nodeIS3_E(i64* %arg1), !insn.addr !282
%2 = inttoptr i64 %1 to i64*, !insn.addr !283
%3 = call i64 @_ZNKSt10_Select1stISt4pairIKiPcEEclERKS3_(i64* nonnull %stack_var_-17, i64* %2), !insn.addr !283
%4 = call i64 @__readfsqword(i64 40), !insn.addr !284
%5 = icmp eq i64 %0, %4, !insn.addr !284
store i64 %3, i64* %rax.0.reg2mem, !insn.addr !285
br i1 %5, label %dec_label_pc_cb4, label %dec_label_pc_caf, !insn.addr !285
dec_label_pc_caf: ; preds = %dec_label_pc_c67
%6 = call i64 @__stack_chk_fail(), !insn.addr !286
store i64 %6, i64* %rax.0.reg2mem, !insn.addr !286
br label %dec_label_pc_cb4, !insn.addr !286
dec_label_pc_cb4: ; preds = %dec_label_pc_caf, %dec_label_pc_c67
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !287
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_insert_nodeEPSt18_Rb_tree_node_baseSB_PSt13_Rb_tree_nodeIS3_E(i64* %result, i64* %arg2, i64* %arg3, i64* %arg4) local_unnamed_addr {
dec_label_pc_cb6:
%rax.0.reg2mem = alloca i64, !insn.addr !288
%storemerge.reg2mem = alloca i1, !insn.addr !288
%stack_var_-40 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !289
%1 = icmp eq i64* %arg2, null, !insn.addr !290
%2 = icmp eq i1 %1, false, !insn.addr !291
store i1 true, i1* %storemerge.reg2mem, !insn.addr !291
br i1 %2, label %dec_label_pc_d36, label %dec_label_pc_ce7, !insn.addr !291
dec_label_pc_ce7: ; preds = %dec_label_pc_cb6
%3 = ptrtoint i64* %arg3 to i64
%4 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_M_endEv(i64* %result), !insn.addr !292
%5 = icmp eq i64 %4, %3, !insn.addr !293
store i1 true, i1* %storemerge.reg2mem, !insn.addr !294
br i1 %5, label %dec_label_pc_d36, label %dec_label_pc_cf9, !insn.addr !294
dec_label_pc_cf9: ; preds = %dec_label_pc_ce7
%6 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %arg3), !insn.addr !295
%7 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt13_Rb_tree_nodeIS3_E(i64* %arg4), !insn.addr !296
%8 = inttoptr i64 %7 to i32*, !insn.addr !297
%9 = inttoptr i64 %6 to i32*, !insn.addr !297
%10 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %8, i32* %9), !insn.addr !297
%11 = trunc i64 %10 to i8, !insn.addr !298
%12 = icmp ne i8 %11, 0, !insn.addr !298
store i1 %12, i1* %storemerge.reg2mem
br label %dec_label_pc_d36
dec_label_pc_d36: ; preds = %dec_label_pc_cf9, %dec_label_pc_cb6, %dec_label_pc_ce7
%13 = ptrtoint i64* %result to i64
%storemerge.reload = load i1, i1* %storemerge.reg2mem
%14 = add i64 %13, 8, !insn.addr !299
%15 = inttoptr i64 %14 to i64*, !insn.addr !300
%16 = call i64 @_ZSt29_Rb_tree_insert_and_rebalancebPSt18_Rb_tree_node_baseS0_RS_(i1 %storemerge.reload, i64* %arg4, i64* %arg3, i64* %15), !insn.addr !300
%17 = add i64 %13, 40, !insn.addr !301
%18 = inttoptr i64 %17 to i64*, !insn.addr !301
%19 = load i64, i64* %18, align 8, !insn.addr !301
%20 = add i64 %19, 1, !insn.addr !302
store i64 %20, i64* %18, align 8, !insn.addr !303
%21 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-40, i64* %arg4), !insn.addr !304
%22 = load i64, i64* %stack_var_-40, align 8, !insn.addr !305
%23 = call i64 @__readfsqword(i64 40), !insn.addr !306
%24 = icmp eq i64 %0, %23, !insn.addr !306
store i64 %22, i64* %rax.0.reg2mem, !insn.addr !307
br i1 %24, label %dec_label_pc_d93, label %dec_label_pc_d8e, !insn.addr !307
dec_label_pc_d8e: ; preds = %dec_label_pc_d36
%25 = call i64 @__stack_chk_fail(), !insn.addr !308
store i64 %25, i64* %rax.0.reg2mem, !insn.addr !308
br label %dec_label_pc_d93, !insn.addr !308
dec_label_pc_d93: ; preds = %dec_label_pc_d8e, %dec_label_pc_d36
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !309
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_drop_nodeEPSt13_Rb_tree_nodeIS3_E(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_d9c:
%0 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE15_M_destroy_nodeEPSt13_Rb_tree_nodeIS3_E(i64* %result, i64* %arg2), !insn.addr !310
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_put_nodeEPSt13_Rb_tree_nodeIS3_E(i64* %result, i64* %arg2), !insn.addr !311
ret i64 %1, !insn.addr !312
}
define i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC1EPSt18_Rb_tree_node_base(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_dd6:
%0 = ptrtoint i64* %arg2 to i64
%1 = ptrtoint i64* %result to i64
store i64 %0, i64* %result, align 8, !insn.addr !313
ret i64 %1, !insn.addr !314
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_M_beginEv(i64* %result) local_unnamed_addr {
dec_label_pc_df0:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 16, !insn.addr !315
%2 = inttoptr i64 %1 to i64*, !insn.addr !315
%3 = load i64, i64* %2, align 8, !insn.addr !315
ret i64 %3, !insn.addr !316
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_M_endEv(i64* %result) local_unnamed_addr {
dec_label_pc_e02:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 8, !insn.addr !317
ret i64 %1, !insn.addr !318
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_lower_boundEPSt13_Rb_tree_nodeIS3_EPSt18_Rb_tree_node_baseRS1_(i64* %result, i64* %arg2, i64* %arg3, i32* %arg4) local_unnamed_addr {
dec_label_pc_e14:
%rax.0.reg2mem = alloca i64, !insn.addr !319
%stack_var_-64.0.ph.lcssa.reg2mem = alloca i64, !insn.addr !319
%stack_var_-56.03.reg2mem = alloca i64, !insn.addr !319
%stack_var_-56.0.ph5.reg2mem = alloca i64, !insn.addr !319
%stack_var_-64.0.ph6.reg2mem = alloca i64, !insn.addr !319
%0 = ptrtoint i64* %arg3 to i64
%stack_var_-40 = alloca i64, align 8
%1 = call i64 @__readfsqword(i64 40), !insn.addr !320
%2 = icmp eq i64* %arg2, null, !insn.addr !321
store i64 %0, i64* %stack_var_-64.0.ph.lcssa.reg2mem, !insn.addr !322
br i1 %2, label %dec_label_pc_e9b, label %dec_label_pc_e43.lr.ph.lr.ph, !insn.addr !322
dec_label_pc_e43.lr.ph.lr.ph: ; preds = %dec_label_pc_e14
%3 = ptrtoint i64* %arg2 to i64
store i64 %0, i64* %stack_var_-64.0.ph6.reg2mem
store i64 %3, i64* %stack_var_-56.0.ph5.reg2mem
br label %dec_label_pc_e43.lr.ph
dec_label_pc_e43.lr.ph: ; preds = %dec_label_pc_e43.lr.ph.lr.ph, %dec_label_pc_e6f
%stack_var_-56.0.ph5.reload = load i64, i64* %stack_var_-56.0.ph5.reg2mem
%stack_var_-64.0.ph6.reload = load i64, i64* %stack_var_-64.0.ph6.reg2mem
store i64 %stack_var_-56.0.ph5.reload, i64* %stack_var_-56.03.reg2mem
br label %dec_label_pc_e43
dec_label_pc_e43: ; preds = %dec_label_pc_e43.lr.ph, %dec_label_pc_e89
%stack_var_-56.03.reload = load i64, i64* %stack_var_-56.03.reg2mem
%4 = inttoptr i64 %stack_var_-56.03.reload to i64*
%5 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt13_Rb_tree_nodeIS3_E(i64* %4), !insn.addr !323
%6 = inttoptr i64 %5 to i32*, !insn.addr !324
%7 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %6, i32* %arg4), !insn.addr !324
%8 = trunc i64 %7 to i8
%9 = icmp eq i8 %8, 1, !insn.addr !325
br i1 %9, label %dec_label_pc_e89, label %dec_label_pc_e6f, !insn.addr !326
dec_label_pc_e6f: ; preds = %dec_label_pc_e43
%10 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_S_leftEPSt18_Rb_tree_node_base(i64* %4), !insn.addr !327
%11 = icmp eq i64 %10, 0, !insn.addr !321
store i64 %stack_var_-56.03.reload, i64* %stack_var_-64.0.ph6.reg2mem, !insn.addr !322
store i64 %10, i64* %stack_var_-56.0.ph5.reg2mem, !insn.addr !322
store i64 %stack_var_-56.03.reload, i64* %stack_var_-64.0.ph.lcssa.reg2mem, !insn.addr !322
br i1 %11, label %dec_label_pc_e9b, label %dec_label_pc_e43.lr.ph, !insn.addr !322
dec_label_pc_e89: ; preds = %dec_label_pc_e43
%12 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPSt18_Rb_tree_node_base(i64* %4), !insn.addr !328
%13 = icmp eq i64 %12, 0, !insn.addr !321
store i64 %12, i64* %stack_var_-56.03.reg2mem, !insn.addr !322
store i64 %stack_var_-64.0.ph6.reload, i64* %stack_var_-64.0.ph.lcssa.reg2mem, !insn.addr !322
br i1 %13, label %dec_label_pc_e9b, label %dec_label_pc_e43, !insn.addr !322
dec_label_pc_e9b: ; preds = %dec_label_pc_e6f, %dec_label_pc_e89, %dec_label_pc_e14
%stack_var_-64.0.ph.lcssa.reload = load i64, i64* %stack_var_-64.0.ph.lcssa.reg2mem
%14 = inttoptr i64 %stack_var_-64.0.ph.lcssa.reload to i64*, !insn.addr !329
%15 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-40, i64* %14), !insn.addr !329
%16 = load i64, i64* %stack_var_-40, align 8, !insn.addr !330
%17 = call i64 @__readfsqword(i64 40), !insn.addr !331
%18 = icmp eq i64 %1, %17, !insn.addr !331
store i64 %16, i64* %rax.0.reg2mem, !insn.addr !332
br i1 %18, label %dec_label_pc_ec6, label %dec_label_pc_ec1, !insn.addr !332
dec_label_pc_ec1: ; preds = %dec_label_pc_e9b
%19 = call i64 @__stack_chk_fail(), !insn.addr !333
store i64 %19, i64* %rax.0.reg2mem, !insn.addr !333
br label %dec_label_pc_ec6, !insn.addr !333
dec_label_pc_ec6: ; preds = %dec_label_pc_ec1, %dec_label_pc_e9b
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !334
}
define i64 @_ZN9__gnu_cxx16__aligned_membufISt4pairIKiPcEE6_M_ptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_ece:
%0 = call i64 @_ZN9__gnu_cxx16__aligned_membufISt4pairIKiPcEE7_M_addrEv(i64* %result), !insn.addr !335
ret i64 %0, !insn.addr !336
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_get_nodeEv(i64* %result) local_unnamed_addr {
dec_label_pc_ee8:
%0 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE21_M_get_Node_allocatorEv(i64* %result), !insn.addr !337
%1 = inttoptr i64 %0 to i64*, !insn.addr !338
%2 = call i64 @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE8allocateERS6_m(i64* %1, i64 1), !insn.addr !338
ret i64 %2, !insn.addr !339
}
define void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE17_M_construct_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESE_IJEEEEEvPSt13_Rb_tree_nodeIS3_EDpOT_(i64 %arg1, i64 %arg2, i64 %arg3, i64 %arg4, i64 %arg5) local_unnamed_addr {
dec_label_pc_f10:
%0 = inttoptr i64 %arg2 to i64*, !insn.addr !340
%1 = call i64 @_ZnwmPv(i64 48, i64* %0), !insn.addr !340
%2 = inttoptr i64 %arg5 to i64*, !insn.addr !341
%3 = call i64* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(i64* %2), !insn.addr !341
%4 = ptrtoint i64* %3 to i64, !insn.addr !341
%5 = inttoptr i64 %arg4 to i64*, !insn.addr !342
%6 = call i64* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(i64* %5), !insn.addr !342
%7 = inttoptr i64 %arg3 to i64*, !insn.addr !343
%8 = call i64** @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(i64* %7), !insn.addr !343
%9 = call i64 @_ZNSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(i64* %0), !insn.addr !344
%10 = inttoptr i64 %arg1 to i64*, !insn.addr !345
%11 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE21_M_get_Node_allocatorEv(i64* %10), !insn.addr !345
%12 = inttoptr i64 %11 to i64*, !insn.addr !346
%13 = inttoptr i64 %9 to i64*, !insn.addr !346
%14 = bitcast i64** %8 to i64*, !insn.addr !346
call void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE9constructIS4_JRKSt21piecewise_construct_tSt5tupleIJOiEESC_IJEEEEEvRS6_PT_DpOT0_(i64* %12, i64* %13, i64* %14, i64* %6, i64 %4), !insn.addr !346
ret void, !insn.addr !347
}
define i64 @_ZNKSt23_Rb_tree_const_iteratorISt4pairIKiPcEE13_M_const_castEv(i64* %result) local_unnamed_addr {
dec_label_pc_1004:
%rax.0.reg2mem = alloca i64, !insn.addr !348
%stack_var_-24 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !349
%1 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-24, i64* %result), !insn.addr !350
%2 = load i64, i64* %stack_var_-24, align 8, !insn.addr !351
%3 = call i64 @__readfsqword(i64 40), !insn.addr !352
%4 = icmp eq i64 %0, %3, !insn.addr !352
store i64 %2, i64* %rax.0.reg2mem, !insn.addr !353
br i1 %4, label %dec_label_pc_104d, label %dec_label_pc_1048, !insn.addr !353
dec_label_pc_1048: ; preds = %dec_label_pc_1004
%5 = call i64 @__stack_chk_fail(), !insn.addr !354
store i64 %5, i64* %rax.0.reg2mem, !insn.addr !354
br label %dec_label_pc_104d, !insn.addr !354
dec_label_pc_104d: ; preds = %dec_label_pc_1048, %dec_label_pc_1004
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !355
}
define i64 @_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE4sizeEv(i64* %result) local_unnamed_addr {
dec_label_pc_1050:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 40, !insn.addr !356
%2 = inttoptr i64 %1 to i64*, !insn.addr !356
%3 = load i64, i64* %2, align 8, !insn.addr !356
ret i64 %3, !insn.addr !357
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_rightmostEv(i64* %result) local_unnamed_addr {
dec_label_pc_1062:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 32, !insn.addr !358
ret i64 %1, !insn.addr !359
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %arg1) local_unnamed_addr {
dec_label_pc_1074:
%rax.0.reg2mem = alloca i64, !insn.addr !360
%stack_var_-17 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !361
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_valueEPKSt18_Rb_tree_node_base(i64* %arg1), !insn.addr !362
%2 = inttoptr i64 %1 to i64*, !insn.addr !363
%3 = call i64 @_ZNKSt10_Select1stISt4pairIKiPcEEclERKS3_(i64* nonnull %stack_var_-17, i64* %2), !insn.addr !363
%4 = call i64 @__readfsqword(i64 40), !insn.addr !364
%5 = icmp eq i64 %0, %4, !insn.addr !364
store i64 %3, i64* %rax.0.reg2mem, !insn.addr !365
br i1 %5, label %dec_label_pc_10c1, label %dec_label_pc_10bc, !insn.addr !365
dec_label_pc_10bc: ; preds = %dec_label_pc_1074
%6 = call i64 @__stack_chk_fail(), !insn.addr !366
store i64 %6, i64* %rax.0.reg2mem, !insn.addr !366
br label %dec_label_pc_10c1, !insn.addr !366
dec_label_pc_10c1: ; preds = %dec_label_pc_10bc, %dec_label_pc_1074
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !367
}
define i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRPSt13_Rb_tree_nodeIS_IKiPcEERS1_Lb1EEEOT_OT0_(i64* %result, i64*** %arg2, i64*** %arg3) local_unnamed_addr {
dec_label_pc_10c4:
%0 = ptrtoint i64* %result to i64
%1 = bitcast i64*** %arg2 to i64*, !insn.addr !368
%2 = call i64*** @_ZSt7forwardIRPSt13_Rb_tree_nodeISt4pairIKiPcEEEOT_RNSt16remove_referenceIS8_E4typeE(i64* %1), !insn.addr !368
%3 = load i64**, i64*** %2, align 8, !insn.addr !369
%4 = ptrtoint i64** %3 to i64, !insn.addr !369
store i64 %4, i64* %result, align 8, !insn.addr !370
%5 = bitcast i64*** %arg3 to i64*, !insn.addr !371
%6 = call i64*** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(i64* %5), !insn.addr !371
%7 = load i64**, i64*** %6, align 8, !insn.addr !372
%8 = ptrtoint i64** %7 to i64, !insn.addr !372
%9 = add i64 %0, 8, !insn.addr !373
%10 = inttoptr i64 %9 to i64*, !insn.addr !373
store i64 %8, i64* %10, align 8, !insn.addr !373
ret i64 %0, !insn.addr !374
}
define i64*** @_ZSt7forwardIRPSt13_Rb_tree_nodeISt4pairIKiPcEEEOT_RNSt16remove_referenceIS8_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_1108:
%0 = bitcast i64* %arg1 to i64***, !insn.addr !375
ret i64*** %0, !insn.addr !375
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE24_M_get_insert_unique_posERS1_(i64* %result, i32* %arg2) local_unnamed_addr {
dec_label_pc_1116:
%rax.1.reg2mem = alloca i64, !insn.addr !376
%storemerge.reg2mem = alloca i64, !insn.addr !376
%.reg2mem = alloca i64, !insn.addr !376
%stack_var_-64 = alloca i64, align 8
%stack_var_-56 = alloca i64, align 8
%stack_var_-72 = alloca i64, align 8
%stack_var_-80 = alloca i64, align 8
%stack_var_-88 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !377
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_M_beginEv(i64* %result)
store i64 %1, i64* %stack_var_-88, align 8, !insn.addr !378
%2 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_M_endEv(i64* %result), !insn.addr !379
store i64 %2, i64* %stack_var_-80, align 8, !insn.addr !380
%3 = icmp eq i64 %1, 0, !insn.addr !381
store i64 %1, i64* %.reg2mem, !insn.addr !382
br i1 %3, label %dec_label_pc_11b6.thread, label %dec_label_pc_1163, !insn.addr !382
dec_label_pc_11b6.thread: ; preds = %dec_label_pc_1116
%4 = inttoptr i64 %2 to i64*, !insn.addr !383
%5 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-72, i64* %4), !insn.addr !383
br label %dec_label_pc_11cf
dec_label_pc_1163: ; preds = %dec_label_pc_1116, %dec_label_pc_11b0
%.reload = load i64, i64* %.reg2mem
store i64 %.reload, i64* %stack_var_-80, align 8, !insn.addr !384
%6 = inttoptr i64 %.reload to i64*, !insn.addr !385
%7 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt13_Rb_tree_nodeIS3_E(i64* %6), !insn.addr !385
%8 = inttoptr i64 %7 to i32*, !insn.addr !386
%9 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %arg2, i32* %8), !insn.addr !386
%10 = trunc i64 %9 to i8
%11 = icmp eq i8 %10, 0
%12 = load i64, i64* %stack_var_-88, align 8
%13 = inttoptr i64 %12 to i64*
br i1 %11, label %dec_label_pc_11a4, label %dec_label_pc_1196, !insn.addr !387
dec_label_pc_1196: ; preds = %dec_label_pc_1163
%14 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_S_leftEPSt18_Rb_tree_node_base(i64* %13), !insn.addr !388
store i64 %14, i64* %storemerge.reg2mem, !insn.addr !389
br label %dec_label_pc_11b0, !insn.addr !389
dec_label_pc_11a4: ; preds = %dec_label_pc_1163
%15 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPSt18_Rb_tree_node_base(i64* %13), !insn.addr !390
store i64 %15, i64* %storemerge.reg2mem, !insn.addr !390
br label %dec_label_pc_11b0, !insn.addr !390
dec_label_pc_11b0: ; preds = %dec_label_pc_11a4, %dec_label_pc_1196
%storemerge.reload = load i64, i64* %storemerge.reg2mem
store i64 %storemerge.reload, i64* %stack_var_-88, align 8, !insn.addr !391
%16 = icmp eq i64 %storemerge.reload, 0, !insn.addr !381
store i64 %storemerge.reload, i64* %.reg2mem, !insn.addr !382
br i1 %16, label %dec_label_pc_11b6, label %dec_label_pc_1163, !insn.addr !382
dec_label_pc_11b6: ; preds = %dec_label_pc_11b0
%.pre = load i64, i64* %stack_var_-80, align 8
%17 = inttoptr i64 %.pre to i64*, !insn.addr !383
%18 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-72, i64* %17), !insn.addr !383
br i1 %11, label %dec_label_pc_1223, label %dec_label_pc_11cf, !insn.addr !392
dec_label_pc_11cf: ; preds = %dec_label_pc_11b6.thread, %dec_label_pc_11b6
%19 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE5beginEv(i64* %result), !insn.addr !393
store i64 %19, i64* %stack_var_-56, align 8, !insn.addr !394
%20 = call i64 @_ZNKSt17_Rb_tree_iteratorISt4pairIKiPcEEeqERKS4_(i64* nonnull %stack_var_-72, i64* nonnull %stack_var_-56), !insn.addr !395
%21 = trunc i64 %20 to i8, !insn.addr !396
%22 = icmp eq i8 %21, 0, !insn.addr !396
br i1 %22, label %dec_label_pc_1217, label %dec_label_pc_11f6, !insn.addr !397
dec_label_pc_11f6: ; preds = %dec_label_pc_11cf
%23 = bitcast i64* %stack_var_-88 to i64***, !insn.addr !398
%24 = bitcast i64* %stack_var_-80 to i64***, !insn.addr !398
%25 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRPSt13_Rb_tree_nodeIS_IKiPcEERS1_Lb1EEEOT_OT0_(i64* nonnull %stack_var_-56, i64*** nonnull %23, i64*** nonnull %24), !insn.addr !398
br label %dec_label_pc_1294, !insn.addr !399
dec_label_pc_1217: ; preds = %dec_label_pc_11cf
%26 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEmmEv(i64* nonnull %stack_var_-72), !insn.addr !400
br label %dec_label_pc_1223, !insn.addr !400
dec_label_pc_1223: ; preds = %dec_label_pc_1217, %dec_label_pc_11b6
%27 = load i64, i64* %stack_var_-72, align 8, !insn.addr !401
%28 = inttoptr i64 %27 to i64*, !insn.addr !402
%29 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %28), !insn.addr !402
%30 = inttoptr i64 %29 to i32*, !insn.addr !403
%31 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %30, i32* %arg2), !insn.addr !403
%32 = trunc i64 %31 to i8, !insn.addr !404
%33 = icmp eq i8 %32, 0, !insn.addr !404
br i1 %33, label %dec_label_pc_126d, label %dec_label_pc_124c, !insn.addr !405
dec_label_pc_124c: ; preds = %dec_label_pc_1223
%34 = bitcast i64* %stack_var_-88 to i64***, !insn.addr !406
%35 = bitcast i64* %stack_var_-80 to i64***, !insn.addr !406
%36 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRPSt13_Rb_tree_nodeIS_IKiPcEERS1_Lb1EEEOT_OT0_(i64* nonnull %stack_var_-56, i64*** nonnull %34, i64*** nonnull %35), !insn.addr !406
br label %dec_label_pc_1294, !insn.addr !407
dec_label_pc_126d: ; preds = %dec_label_pc_1223
store i64 0, i64* %stack_var_-64, align 8, !insn.addr !408
%37 = bitcast i64* %stack_var_-72 to i64***, !insn.addr !409
%38 = bitcast i64* %stack_var_-64 to i64**, !insn.addr !409
%39 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEEOT_RKS1_(i64* nonnull %stack_var_-56, i64*** nonnull %37, i64** nonnull %38), !insn.addr !409
br label %dec_label_pc_1294, !insn.addr !410
dec_label_pc_1294: ; preds = %dec_label_pc_126d, %dec_label_pc_124c, %dec_label_pc_11f6
%rax.0 = load i64, i64* %stack_var_-56, align 8
%40 = call i64 @__readfsqword(i64 40), !insn.addr !411
%41 = icmp eq i64 %0, %40, !insn.addr !411
store i64 %rax.0, i64* %rax.1.reg2mem, !insn.addr !412
br i1 %41, label %dec_label_pc_12a8, label %dec_label_pc_12a3, !insn.addr !412
dec_label_pc_12a3: ; preds = %dec_label_pc_1294
%42 = call i64 @__stack_chk_fail(), !insn.addr !413
store i64 %42, i64* %rax.1.reg2mem, !insn.addr !413
br label %dec_label_pc_12a8, !insn.addr !413
dec_label_pc_12a8: ; preds = %dec_label_pc_12a3, %dec_label_pc_1294
%rax.1.reload = load i64, i64* %rax.1.reg2mem
ret i64 %rax.1.reload, !insn.addr !414
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_leftmostEv(i64* %result) local_unnamed_addr {
dec_label_pc_12b0:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 24, !insn.addr !415
ret i64 %1, !insn.addr !416
}
define i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEmmEv(i64* %result) local_unnamed_addr {
dec_label_pc_12c2:
%0 = ptrtoint i64* %result to i64
%1 = call i64 @_ZSt18_Rb_tree_decrementPSt18_Rb_tree_node_base(i64* %result), !insn.addr !417
store i64 %1, i64* %result, align 8, !insn.addr !418
ret i64 %0, !insn.addr !419
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPSt18_Rb_tree_node_base(i64* %arg1) local_unnamed_addr {
dec_label_pc_12ed:
%0 = ptrtoint i64* %arg1 to i64
%1 = add i64 %0, 24, !insn.addr !420
%2 = inttoptr i64 %1 to i64*, !insn.addr !420
%3 = load i64, i64* %2, align 8, !insn.addr !420
ret i64 %3, !insn.addr !421
}
define i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEppEv(i64* %result) local_unnamed_addr {
dec_label_pc_1300:
%0 = ptrtoint i64* %result to i64
%1 = call i64 @_ZSt18_Rb_tree_incrementPSt18_Rb_tree_node_base(i64* %result), !insn.addr !422
store i64 %1, i64* %result, align 8, !insn.addr !423
ret i64 %0, !insn.addr !424
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_valueEPKSt13_Rb_tree_nodeIS3_E(i64* %arg1) local_unnamed_addr {
dec_label_pc_132b:
%0 = call i64 @_ZNKSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(i64* %arg1), !insn.addr !425
ret i64 %0, !insn.addr !426
}
define i64 @_ZNKSt10_Select1stISt4pairIKiPcEEclERKS3_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_1346:
%0 = ptrtoint i64* %arg2 to i64
ret i64 %0, !insn.addr !427
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE15_M_destroy_nodeEPSt13_Rb_tree_nodeIS3_E(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_1358:
%0 = call i64 @_ZNSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(i64* %arg2), !insn.addr !428
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE21_M_get_Node_allocatorEv(i64* %result), !insn.addr !429
%2 = inttoptr i64 %1 to i64*, !insn.addr !430
%3 = inttoptr i64 %0 to i64*, !insn.addr !430
call void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE7destroyIS4_EEvRS6_PT_(i64* %2, i64* %3), !insn.addr !430
ret i64 ptrtoint (i32* @0 to i64), !insn.addr !431
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_put_nodeEPSt13_Rb_tree_nodeIS3_E(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_139c:
%0 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE21_M_get_Node_allocatorEv(i64* %result), !insn.addr !432
%1 = inttoptr i64 %0 to i64*, !insn.addr !433
%2 = call i64 @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE10deallocateERS6_PS5_m(i64* %1, i64* %arg2, i64 1), !insn.addr !433
ret i64 %2, !insn.addr !434
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_S_leftEPSt18_Rb_tree_node_base(i64* %arg1) local_unnamed_addr {
dec_label_pc_13d6:
%0 = ptrtoint i64* %arg1 to i64
%1 = add i64 %0, 16, !insn.addr !435
%2 = inttoptr i64 %1 to i64*, !insn.addr !435
%3 = load i64, i64* %2, align 8, !insn.addr !435
ret i64 %3, !insn.addr !436
}
define i64 @_ZN9__gnu_cxx16__aligned_membufISt4pairIKiPcEE7_M_addrEv(i64* %result) local_unnamed_addr {
dec_label_pc_13e8:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !437
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE21_M_get_Node_allocatorEv(i64* %result) local_unnamed_addr {
dec_label_pc_13f6:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !438
}
define i64 @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE8allocateERS6_m(i64* %arg1, i64 %arg2) local_unnamed_addr {
dec_label_pc_1404:
%0 = call i64 @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE8allocateEmPKv(i64* %arg1, i64 %arg2, i64* null), !insn.addr !439
ret i64 %0, !insn.addr !440
}
define void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE9constructIS4_JRKSt21piecewise_construct_tSt5tupleIJOiEESC_IJEEEEEvRS6_PT_DpOT0_(i64* %this, i64* %result, i64* %arg3, i64* %arg4, i64 %arg5) local_unnamed_addr {
dec_label_pc_142e:
%0 = ptrtoint i64* %result to i64
%1 = ptrtoint i64* %this to i64
%2 = inttoptr i64 %arg5 to i64*, !insn.addr !441
%3 = call i64* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(i64* %2), !insn.addr !441
%4 = ptrtoint i64* %3 to i64, !insn.addr !441
%5 = call i64* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(i64* %arg4), !insn.addr !442
%6 = ptrtoint i64* %5 to i64, !insn.addr !442
%7 = call i64** @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(i64* %arg3), !insn.addr !443
%8 = ptrtoint i64** %7 to i64, !insn.addr !443
call void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE9constructIS5_JRKSt21piecewise_construct_tSt5tupleIJOiEESC_IJEEEEEvPT_DpOT0_(i64 %1, i64 %0, i64 %8, i64 %6, i64 %4), !insn.addr !444
ret void, !insn.addr !445
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_valueEPKSt18_Rb_tree_node_base(i64* %arg1) local_unnamed_addr {
dec_label_pc_149a:
%0 = call i64 @_ZNKSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(i64* %arg1), !insn.addr !446
ret i64 %0, !insn.addr !447
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE5beginEv(i64* %result) local_unnamed_addr {
dec_label_pc_14b4:
%rax.0.reg2mem = alloca i64, !insn.addr !448
%0 = ptrtoint i64* %result to i64
%stack_var_-24 = alloca i64, align 8
%1 = call i64 @__readfsqword(i64 40), !insn.addr !449
%2 = add i64 %0, 24, !insn.addr !450
%3 = inttoptr i64 %2 to i64*, !insn.addr !450
%4 = load i64, i64* %3, align 8, !insn.addr !450
%5 = inttoptr i64 %4 to i64*, !insn.addr !451
%6 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-24, i64* %5), !insn.addr !451
%7 = load i64, i64* %stack_var_-24, align 8, !insn.addr !452
%8 = call i64 @__readfsqword(i64 40), !insn.addr !453
%9 = icmp eq i64 %1, %8, !insn.addr !453
store i64 %7, i64* %rax.0.reg2mem, !insn.addr !454
br i1 %9, label %dec_label_pc_14fe, label %dec_label_pc_14f9, !insn.addr !454
dec_label_pc_14f9: ; preds = %dec_label_pc_14b4
%10 = call i64 @__stack_chk_fail(), !insn.addr !455
store i64 %10, i64* %rax.0.reg2mem, !insn.addr !455
br label %dec_label_pc_14fe, !insn.addr !455
dec_label_pc_14fe: ; preds = %dec_label_pc_14f9, %dec_label_pc_14b4
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !456
}
define i64 @_ZNKSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_1500:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 32, !insn.addr !457
%2 = inttoptr i64 %1 to i64*, !insn.addr !458
%3 = call i64 @_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiPcEE6_M_ptrEv(i64* %2), !insn.addr !458
ret i64 %3, !insn.addr !459
}
define void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE7destroyIS4_EEvRS6_PT_(i64* %arg1, i64* %arg2) local_unnamed_addr {
dec_label_pc_151e:
call void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE7destroyIS5_EEvPT_(i64* %arg1, i64* %arg2), !insn.addr !460
ret void, !insn.addr !461
}
define i64 @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE10deallocateERS6_PS5_m(i64* %arg1, i64* %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_1544:
%0 = call i64 @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE10deallocateEPS6_m(i64* %arg1, i64* %arg2, i64 %arg3), !insn.addr !462
ret i64 %0, !insn.addr !463
}
define i64 @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE8allocateEmPKv(i64* %result, i64 %arg2, i64* %arg3) local_unnamed_addr {
dec_label_pc_1572:
%0 = call i64 @_ZNK9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE8max_sizeEv(i64* %result), !insn.addr !464
%1 = icmp uge i64 %0, %arg2
%2 = icmp ne i1 %1, true, !insn.addr !465
%3 = icmp eq i1 %2, false, !insn.addr !466
br i1 %3, label %dec_label_pc_15a2, label %dec_label_pc_159d, !insn.addr !467
dec_label_pc_159d: ; preds = %dec_label_pc_1572
%4 = call i64 @_ZSt17__throw_bad_allocv(), !insn.addr !468
br label %dec_label_pc_15a2, !insn.addr !468
dec_label_pc_15a2: ; preds = %dec_label_pc_159d, %dec_label_pc_1572
%5 = mul i64 %arg2, 48, !insn.addr !469
%6 = call i64 @_Znwm(i64 %5), !insn.addr !470
ret i64 %6, !insn.addr !471
}
define void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE9constructIS5_JRKSt21piecewise_construct_tSt5tupleIJOiEESC_IJEEEEEvPT_DpOT0_(i64 %arg1, i64 %arg2, i64 %arg3, i64 %arg4, i64 %arg5) local_unnamed_addr {
dec_label_pc_15be:
%0 = alloca i64
%1 = load i64, i64* %0
%stack_var_-56 = alloca i64, align 8
%2 = call i64 @__readfsqword(i64 40), !insn.addr !472
%3 = inttoptr i64 %arg3 to i64*, !insn.addr !473
%4 = call i64** @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(i64* %3), !insn.addr !473
%5 = inttoptr i64 %arg4 to i64*, !insn.addr !474
%6 = call i64* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(i64* %5), !insn.addr !474
%7 = call i64 @_ZNSt5tupleIJOiEEC1EOS1_(i64* nonnull %stack_var_-56, i64* %6), !insn.addr !475
%8 = inttoptr i64 %arg5 to i64*, !insn.addr !476
%9 = call i64* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(i64* %8), !insn.addr !476
%10 = inttoptr i64 %arg2 to i64*, !insn.addr !477
%11 = call i64 @_ZnwmPv(i64 16, i64* %10), !insn.addr !477
%12 = icmp eq i64 %11, 0, !insn.addr !478
br i1 %12, label %dec_label_pc_1675, label %dec_label_pc_1641, !insn.addr !479
dec_label_pc_1641: ; preds = %dec_label_pc_15be
%13 = ptrtoint i64* %6 to i64, !insn.addr !474
%14 = call i64 @_ZNSt4pairIKiPcEC1IJOiEJEEESt21piecewise_construct_tSt5tupleIJDpT_EES6_IJDpT0_EE(i64 %11, i64* nonnull %stack_var_-56, i64 %13, i64 %arg4, i64 %arg5, i64 %1), !insn.addr !480
br label %dec_label_pc_1675, !insn.addr !481
dec_label_pc_1675: ; preds = %dec_label_pc_1641, %dec_label_pc_15be
%15 = call i64 @__readfsqword(i64 40), !insn.addr !482
%16 = icmp eq i64 %2, %15, !insn.addr !482
br i1 %16, label %dec_label_pc_168a, label %dec_label_pc_1685, !insn.addr !483
dec_label_pc_1685: ; preds = %dec_label_pc_1675
%17 = call i64 @__stack_chk_fail(), !insn.addr !484
br label %dec_label_pc_168a, !insn.addr !484
dec_label_pc_168a: ; preds = %dec_label_pc_1685, %dec_label_pc_1675
ret void, !insn.addr !485
}
define i64 @_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiPcEE6_M_ptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_16a4:
%0 = call i64 @_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiPcEE7_M_addrEv(i64* %result), !insn.addr !486
ret i64 %0, !insn.addr !487
}
define void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE7destroyIS5_EEvPT_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_16be:
ret void, !insn.addr !488
}
define i64 @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE10deallocateEPS6_m(i64* %result, i64* %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_16ce:
%0 = call i64 @_ZdlPv(i64* %arg2), !insn.addr !489
ret i64 %0, !insn.addr !490
}
define i64 @_ZNK9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE8max_sizeEv(i64* %result) local_unnamed_addr {
dec_label_pc_16f2:
ret i64 384307168202282325, !insn.addr !491
}
define i64 @_ZNSt4pairIKiPcEC1IJOiEJEEESt21piecewise_construct_tSt5tupleIJDpT_EES6_IJDpT0_EE(i64 %arg1, i64* %arg2, i64 %arg3, i64 %arg4, i64 %arg5, i64 %arg6) local_unnamed_addr {
dec_label_pc_1706:
%rax.0.reg2mem = alloca i64, !insn.addr !492
%stack_var_16 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !493
%1 = ptrtoint i64* %stack_var_16 to i64, !insn.addr !494
%2 = inttoptr i64 %arg1 to i64*, !insn.addr !495
%3 = call i64 @_ZNSt4pairIKiPcEC1IJOiEJLm0EEJEJEEERSt5tupleIJDpT_EERS5_IJDpT1_EESt12_Index_tupleIJXspT0_EEESE_IJXspT2_EEE(i64* %2, i64* %arg2, i64 %1, i64 ptrtoint (i32* @0 to i64)), !insn.addr !495
%4 = call i64 @__readfsqword(i64 40), !insn.addr !496
%5 = icmp eq i64 %0, %4, !insn.addr !496
store i64 0, i64* %rax.0.reg2mem, !insn.addr !497
br i1 %5, label %dec_label_pc_1759, label %dec_label_pc_1754, !insn.addr !497
dec_label_pc_1754: ; preds = %dec_label_pc_1706
%6 = call i64 @__stack_chk_fail(), !insn.addr !498
store i64 %6, i64* %rax.0.reg2mem, !insn.addr !498
br label %dec_label_pc_1759, !insn.addr !498
dec_label_pc_1759: ; preds = %dec_label_pc_1754, %dec_label_pc_1706
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !499
}
define i64 @_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiPcEE7_M_addrEv(i64* %result) local_unnamed_addr {
dec_label_pc_175c:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !500
}
define i64* @_ZSt3getILm0EJOiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS5_(i64* %arg1) local_unnamed_addr {
dec_label_pc_176a:
%0 = call i32** @_ZSt12__get_helperILm0EOiJEERT0_RSt11_Tuple_implIXT_EJS1_DpT1_EE(i64* %arg1), !insn.addr !501
%1 = bitcast i32** %0 to i64*, !insn.addr !502
ret i64* %1, !insn.addr !502
}
define i32** @_ZSt12__get_helperILm0EOiJEERT0_RSt11_Tuple_implIXT_EJS1_DpT1_EE(i64* %arg1) local_unnamed_addr {
dec_label_pc_1784:
%0 = call i64 @_ZNSt11_Tuple_implILm0EJOiEE7_M_headERS1_(i64* %arg1), !insn.addr !503
%1 = inttoptr i64 %0 to i32**, !insn.addr !504
ret i32** %1, !insn.addr !504
}
define i64 @_ZNSt4pairIKiPcEC1IJOiEJLm0EEJEJEEERSt5tupleIJDpT_EERS5_IJDpT1_EESt12_Index_tupleIJXspT0_EEESE_IJXspT2_EEE(i64* %arg1, i64* %arg2, i64 %arg3, i64 %arg4) local_unnamed_addr {
dec_label_pc_179e:
%0 = ptrtoint i64* %arg1 to i64
%1 = call i64* @_ZSt3getILm0EJOiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS5_(i64* %arg2), !insn.addr !505
%2 = call i32** @_ZSt7forwardIOiEOT_RNSt16remove_referenceIS1_E4typeE(i64* %1), !insn.addr !506
%3 = bitcast i32** %2 to i32*, !insn.addr !507
%4 = load i32, i32* %3, align 4, !insn.addr !507
%5 = bitcast i64* %arg1 to i32*, !insn.addr !508
store i32 %4, i32* %5, align 4, !insn.addr !508
%6 = add i64 %0, 8, !insn.addr !509
%7 = inttoptr i64 %6 to i64*, !insn.addr !509
store i64 0, i64* %7, align 8, !insn.addr !509
ret i64 %0, !insn.addr !510
}
declare i64 @memset(i64, i64, i64) local_unnamed_addr
declare i64 @printLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @_ZSt29_Rb_tree_insert_and_rebalancebPSt18_Rb_tree_node_baseS0_RS_(i1, i64*, i64*, i64*) local_unnamed_addr
declare i64 @_ZSt18_Rb_tree_decrementPSt18_Rb_tree_node_base(i64*) local_unnamed_addr
declare i64 @_ZSt18_Rb_tree_incrementPSt18_Rb_tree_node_base(i64*) local_unnamed_addr
declare i64 @_ZSt17__throw_bad_allocv() local_unnamed_addr
declare i64 @_Znwm(i64) local_unnamed_addr
declare i64 @_ZdlPv(i64*) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 18}
!1 = !{i64 31}
!2 = !{i64 50}
!3 = !{i64 63}
!4 = !{i64 68}
!5 = !{i64 71}
!6 = !{i64 75}
!7 = !{i64 92}
!8 = !{i64 97}
!9 = !{i64 101}
!10 = !{i64 124}
!11 = !{i64 135}
!12 = !{i64 138}
!13 = !{i64 141}
!14 = !{i64 143}
!15 = !{i64 114}
!16 = !{i64 154}
!17 = !{i64 158}
!18 = !{i64 161}
!19 = !{i64 168}
!20 = !{i64 174}
!21 = !{i64 178}
!22 = !{i64 187}
!23 = !{i64 189}
!24 = !{i64 195}
!25 = !{i64 196}
!26 = !{i64 214}
!27 = !{i64 229}
!28 = !{i64 259}
!29 = !{i64 264}
!30 = !{i64 285}
!31 = !{i64 288}
!32 = !{i64 320}
!33 = !{i64 331}
!34 = !{i64 334}
!35 = !{i64 337}
!36 = !{i64 339}
!37 = !{i64 310}
!38 = !{i64 350}
!39 = !{i64 354}
!40 = !{i64 364}
!41 = !{i64 374}
!42 = !{i64 383}
!43 = !{i64 385}
!44 = !{i64 391}
!45 = !{i64 409}
!46 = !{i64 424}
!47 = !{i64 441}
!48 = !{i64 455}
!49 = !{i64 484}
!50 = !{i64 495}
!51 = !{i64 507}
!52 = !{i64 536}
!53 = !{i64 547}
!54 = !{i64 559}
!55 = !{i64 583}
!56 = !{i64 595}
!57 = !{i64 600}
!58 = !{i64 632}
!59 = !{i64 639}
!60 = !{i64 663}
!61 = !{i64 681}
!62 = !{i64 691}
!63 = !{i64 696}
!64 = !{i64 713}
!65 = !{i64 742}
!66 = !{i64 747}
!67 = !{i64 758}
!68 = !{i64 763}
!69 = !{i64 781}
!70 = !{i64 786}
!71 = !{i64 788}
!72 = !{i64 797}
!73 = !{i64 809}
!74 = !{i64 831}
!75 = !{i64 836}
!76 = !{i64 854}
!77 = !{i64 867}
!78 = !{i64 885}
!79 = !{i64 904}
!80 = !{i64 917}
!81 = !{i64 940}
!82 = !{i64 945}
!83 = !{i64 956}
!84 = !{i64 961}
!85 = !{i64 969}
!86 = !{i64 978}
!87 = !{i64 980}
!88 = !{i64 991}
!89 = !{i64 1022}
!90 = !{i64 1028}
!91 = !{i64 1049}
!92 = !{i64 1055}
!93 = !{i64 1082}
!94 = !{i64 1085}
!95 = !{i64 1089}
!96 = !{i64 1110}
!97 = !{i64 1115}
!98 = !{i64 1123}
!99 = !{i64 1146}
!100 = !{i64 1152}
!101 = !{i64 1182}
!102 = !{i64 1184}
!103 = !{i64 1188}
!104 = !{i64 1213}
!105 = !{i64 1218}
!106 = !{i64 1238}
!107 = !{i64 1244}
!108 = !{i64 1261}
!109 = !{i64 1275}
!110 = !{i64 1304}
!111 = !{i64 1312}
!112 = !{i64 1323}
!113 = !{i64 1335}
!114 = !{i64 1349}
!115 = !{i64 1363}
!116 = !{i64 1377}
!117 = !{i64 1378}
!118 = !{i64 1409}
!119 = !{i64 1431}
!120 = !{i64 1446}
!121 = !{i64 1461}
!122 = !{i64 1482}
!123 = !{i64 1498}
!124 = !{i64 1520}
!125 = !{i64 1537}
!126 = !{i64 1540}
!127 = !{i64 1561}
!128 = !{i64 1566}
!129 = !{i64 1582}
!130 = !{i64 1601}
!131 = !{i64 1606}
!132 = !{i64 1614}
!133 = !{i64 1623}
!134 = !{i64 1678}
!135 = !{i64 1691}
!136 = !{i64 1748}
!137 = !{i64 1763}
!138 = !{i64 1788}
!139 = !{i64 1799}
!140 = !{i64 1800}
!141 = !{i64 1812}
!142 = !{i64 1831}
!143 = !{i64 1845}
!144 = !{i64 1850}
!145 = !{i64 1858}
!146 = !{i64 1867}
!147 = !{i64 1869}
!148 = !{i64 1875}
!149 = !{i64 1885}
!150 = !{i64 1902}
!151 = !{i64 1909}
!152 = !{i64 1915}
!153 = !{i64 1950}
!154 = !{i64 1966}
!155 = !{i64 1981}
!156 = !{i64 1996}
!157 = !{i64 2021}
!158 = !{i64 2038}
!159 = !{i64 2071}
!160 = !{i64 2081}
!161 = !{i64 2086}
!162 = !{i64 2093}
!163 = !{i64 2099}
!164 = !{i64 2113}
!165 = !{i64 2141}
!166 = !{i64 2146}
!167 = !{i64 2153}
!168 = !{i64 2163}
!169 = !{i64 2168}
!170 = !{i64 2175}
!171 = !{i64 2181}
!172 = !{i64 2209}
!173 = !{i64 2214}
!174 = !{i64 2221}
!175 = !{i64 2235}
!176 = !{i64 2241}
!177 = !{i64 2242}
!178 = !{i64 2255}
!179 = !{i64 2263}
!180 = !{i64 2285}
!181 = !{i64 2290}
!182 = !{i64 2305}
!183 = !{i64 2310}
!184 = !{i64 2316}
!185 = !{i64 2318}
!186 = !{i64 2331}
!187 = !{i64 2336}
!188 = !{i64 2339}
!189 = !{i64 2352}
!190 = !{i64 2357}
!191 = !{i64 2363}
!192 = !{i64 2384}
!193 = !{i64 2389}
!194 = !{i64 2391}
!195 = !{i64 2478}
!196 = !{i64 2483}
!197 = !{i64 2416}
!198 = !{i64 2424}
!199 = !{i64 2446}
!200 = !{i64 2451}
!201 = !{i64 2459}
!202 = !{i64 2499}
!203 = !{i64 2517}
!204 = !{i64 2522}
!205 = !{i64 2524}
!206 = !{i64 2534}
!207 = !{i64 2549}
!208 = !{i64 2554}
!209 = !{i64 2557}
!210 = !{i64 2563}
!211 = !{i64 2565}
!212 = !{i64 2574}
!213 = !{i64 2589}
!214 = !{i64 2610}
!215 = !{i64 2615}
!216 = !{i64 2623}
!217 = !{i64 2639}
!218 = !{i64 2644}
!219 = !{i64 2650}
!220 = !{i64 2671}
!221 = !{i64 2676}
!222 = !{i64 2678}
!223 = !{i64 2680}
!224 = !{i64 2687}
!225 = !{i64 2692}
!226 = !{i64 2698}
!227 = !{i64 2700}
!228 = !{i64 2702}
!229 = !{i64 2728}
!230 = !{i64 2733}
!231 = !{i64 2741}
!232 = !{i64 2764}
!233 = !{i64 2769}
!234 = !{i64 2777}
!235 = !{i64 2796}
!236 = !{i64 2801}
!237 = !{i64 2817}
!238 = !{i64 2838}
!239 = !{i64 2843}
!240 = !{i64 2845}
!241 = !{i64 2855}
!242 = !{i64 2870}
!243 = !{i64 2875}
!244 = !{i64 2878}
!245 = !{i64 2884}
!246 = !{i64 2886}
!247 = !{i64 2895}
!248 = !{i64 2903}
!249 = !{i64 2925}
!250 = !{i64 2930}
!251 = !{i64 2938}
!252 = !{i64 2954}
!253 = !{i64 2959}
!254 = !{i64 2965}
!255 = !{i64 2983}
!256 = !{i64 2988}
!257 = !{i64 2990}
!258 = !{i64 2992}
!259 = !{i64 2999}
!260 = !{i64 3004}
!261 = !{i64 3010}
!262 = !{i64 3012}
!263 = !{i64 3014}
!264 = !{i64 3040}
!265 = !{i64 3045}
!266 = !{i64 3053}
!267 = !{i64 3073}
!268 = !{i64 3078}
!269 = !{i64 3086}
!270 = !{i64 3102}
!271 = !{i64 3107}
!272 = !{i64 3109}
!273 = !{i64 3135}
!274 = !{i64 3140}
!275 = !{i64 3144}
!276 = !{i64 3152}
!277 = !{i64 3161}
!278 = !{i64 3163}
!279 = !{i64 3174}
!280 = !{i64 3175}
!281 = !{i64 3187}
!282 = !{i64 3209}
!283 = !{i64 3227}
!284 = !{i64 3236}
!285 = !{i64 3245}
!286 = !{i64 3247}
!287 = !{i64 3253}
!288 = !{i64 3254}
!289 = !{i64 3281}
!290 = !{i64 3296}
!291 = !{i64 3301}
!292 = !{i64 3310}
!293 = !{i64 3315}
!294 = !{i64 3319}
!295 = !{i64 3332}
!296 = !{i64 3347}
!297 = !{i64 3361}
!298 = !{i64 3366}
!299 = !{i64 3389}
!300 = !{i64 3407}
!301 = !{i64 3416}
!302 = !{i64 3420}
!303 = !{i64 3428}
!304 = !{i64 3446}
!305 = !{i64 3451}
!306 = !{i64 3459}
!307 = !{i64 3468}
!308 = !{i64 3470}
!309 = !{i64 3483}
!310 = !{i64 3514}
!311 = !{i64 3533}
!312 = !{i64 3540}
!313 = !{i64 3562}
!314 = !{i64 3567}
!315 = !{i64 3580}
!316 = !{i64 3585}
!317 = !{i64 3598}
!318 = !{i64 3603}
!319 = !{i64 3604}
!320 = !{i64 3629}
!321 = !{i64 3644}
!322 = !{i64 3649}
!323 = !{i64 3662}
!324 = !{i64 3683}
!325 = !{i64 3691}
!326 = !{i64 3693}
!327 = !{i64 3710}
!328 = !{i64 3728}
!329 = !{i64 3753}
!330 = !{i64 3758}
!331 = !{i64 3766}
!332 = !{i64 3775}
!333 = !{i64 3777}
!334 = !{i64 3788}
!335 = !{i64 3809}
!336 = !{i64 3815}
!337 = !{i64 3835}
!338 = !{i64 3848}
!339 = !{i64 3854}
!340 = !{i64 3903}
!341 = !{i64 3918}
!342 = !{i64 3933}
!343 = !{i64 3948}
!344 = !{i64 3963}
!345 = !{i64 3978}
!346 = !{i64 3998}
!347 = !{i64 4068}
!348 = !{i64 4100}
!349 = !{i64 4112}
!350 = !{i64 4144}
!351 = !{i64 4149}
!352 = !{i64 4157}
!353 = !{i64 4166}
!354 = !{i64 4168}
!355 = !{i64 4174}
!356 = !{i64 4188}
!357 = !{i64 4193}
!358 = !{i64 4206}
!359 = !{i64 4211}
!360 = !{i64 4212}
!361 = !{i64 4224}
!362 = !{i64 4246}
!363 = !{i64 4264}
!364 = !{i64 4273}
!365 = !{i64 4282}
!366 = !{i64 4284}
!367 = !{i64 4290}
!368 = !{i64 4319}
!369 = !{i64 4324}
!370 = !{i64 4331}
!371 = !{i64 4341}
!372 = !{i64 4346}
!373 = !{i64 4353}
!374 = !{i64 4359}
!375 = !{i64 4373}
!376 = !{i64 4374}
!377 = !{i64 4391}
!378 = !{i64 4418}
!379 = !{i64 4429}
!380 = !{i64 4434}
!381 = !{i64 4446}
!382 = !{i64 4449}
!383 = !{i64 4548}
!384 = !{i64 4455}
!385 = !{i64 4470}
!386 = !{i64 4488}
!387 = !{i64 4500}
!388 = !{i64 4509}
!389 = !{i64 4514}
!390 = !{i64 4523}
!391 = !{i64 4528}
!392 = !{i64 4557}
!393 = !{i64 4566}
!394 = !{i64 4571}
!395 = !{i64 4589}
!396 = !{i64 4594}
!397 = !{i64 4596}
!398 = !{i64 4616}
!399 = !{i64 4629}
!400 = !{i64 4638}
!401 = !{i64 4647}
!402 = !{i64 4654}
!403 = !{i64 4675}
!404 = !{i64 4680}
!405 = !{i64 4682}
!406 = !{i64 4702}
!407 = !{i64 4715}
!408 = !{i64 4717}
!409 = !{i64 4743}
!410 = !{i64 4752}
!411 = !{i64 4760}
!412 = !{i64 4769}
!413 = !{i64 4771}
!414 = !{i64 4782}
!415 = !{i64 4796}
!416 = !{i64 4801}
!417 = !{i64 4824}
!418 = !{i64 4836}
!419 = !{i64 4844}
!420 = !{i64 4857}
!421 = !{i64 4862}
!422 = !{i64 4886}
!423 = !{i64 4898}
!424 = !{i64 4906}
!425 = !{i64 4926}
!426 = !{i64 4932}
!427 = !{i64 4951}
!428 = !{i64 4976}
!429 = !{i64 4991}
!430 = !{i64 5002}
!431 = !{i64 5014}
!432 = !{i64 5043}
!433 = !{i64 5066}
!434 = !{i64 5073}
!435 = !{i64 5090}
!436 = !{i64 5095}
!437 = !{i64 5109}
!438 = !{i64 5123}
!439 = !{i64 5159}
!440 = !{i64 5165}
!441 = !{i64 5204}
!442 = !{i64 5219}
!443 = !{i64 5234}
!444 = !{i64 5259}
!445 = !{i64 5273}
!446 = !{i64 5293}
!447 = !{i64 5299}
!448 = !{i64 5300}
!449 = !{i64 5312}
!450 = !{i64 5331}
!451 = !{i64 5345}
!452 = !{i64 5350}
!453 = !{i64 5358}
!454 = !{i64 5367}
!455 = !{i64 5369}
!456 = !{i64 5375}
!457 = !{i64 5392}
!458 = !{i64 5399}
!459 = !{i64 5405}
!460 = !{i64 5436}
!461 = !{i64 5443}
!462 = !{i64 5482}
!463 = !{i64 5489}
!464 = !{i64 5517}
!465 = !{i64 5526}
!466 = !{i64 5529}
!467 = !{i64 5531}
!468 = !{i64 5533}
!469 = !{i64 5551}
!470 = !{i64 5558}
!471 = !{i64 5564}
!472 = !{i64 5599}
!473 = !{i64 5621}
!474 = !{i64 5633}
!475 = !{i64 5651}
!476 = !{i64 5667}
!477 = !{i64 5684}
!478 = !{i64 5692}
!479 = !{i64 5695}
!480 = !{i64 5713}
!481 = !{i64 5722}
!482 = !{i64 5754}
!483 = !{i64 5763}
!484 = !{i64 5765}
!485 = !{i64 5780}
!486 = !{i64 5815}
!487 = !{i64 5821}
!488 = !{i64 5836}
!489 = !{i64 5865}
!490 = !{i64 5872}
!491 = !{i64 5893}
!492 = !{i64 5894}
!493 = !{i64 5910}
!494 = !{i64 5925}
!495 = !{i64 5947}
!496 = !{i64 5961}
!497 = !{i64 5970}
!498 = !{i64 5972}
!499 = !{i64 5978}
!500 = !{i64 5993}
!501 = !{i64 6013}
!502 = !{i64 6019}
!503 = !{i64 6039}
!504 = !{i64 6045}
!505 = !{i64 6073}
!506 = !{i64 6081}
!507 = !{i64 6086}
!508 = !{i64 6092}
!509 = !{i64 6098}
!510 = !{i64 6108}
### Assistant: %"struct.std::piecewise_construct_t" = type { i8 }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl" = type { %"struct.std::_Rb_tree_key_compare", %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_key_compare" = type { %"struct.std::less" }
%"struct.std::less" = type { i8 }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }
%"struct.std::_Rb_tree_iterator" = type { %"struct.std::_Rb_tree_node_base"* }
%"struct.std::_Rb_tree_const_iterator" = type { %"struct.std::_Rb_tree_node_base"* }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { i32* }
%"class.std::tuple.0" = type { i8 }
%"struct.std::pair" = type { i32, i8* }
%"struct.std::_Rb_tree_node" = type { %"struct.std::_Rb_tree_node_base", %"struct.__gnu_cxx::__aligned_membuf" }
%"struct.__gnu_cxx::__aligned_membuf" = type { [16 x i8] }
%"struct.std::pair.1" = type { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }
%"struct.std::_Select1st" = type { i8 }
%"class.std::allocator" = type { i8 }
%"class.__gnu_cxx::new_allocator" = type { i8 }
%"struct.std::_Index_tuple" = type { i8 }
%"struct.std::_Index_tuple.4" = type { i8 }
%"class.std::__pair_base" = type { i8 }
%"class.std::__pair_base.2" = type { i8 }
$_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEEixEOi = comdat any
$_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE11lower_boundERS4_ = comdat any
$_ZSteqRKSt17_Rb_tree_iteratorISt4pairIKiPcEES6_ = comdat any
$_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE3endEv = comdat any
$_ZNKSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE8key_compEv = comdat any
$_ZNKSt4lessIiEclERKiS2_ = comdat any
$_ZNKSt17_Rb_tree_iteratorISt4pairIKiPcEEdeEv = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJOiEESE_IJEEEEESt17_Rb_tree_iteratorIS3_ESt23_Rb_tree_const_iteratorIS3_EDpOT_ = comdat any
$_ZNSt23_Rb_tree_const_iteratorISt4pairIKiPcEEC2ERKSt17_Rb_tree_iteratorIS3_E = comdat any
$_ZSt16forward_as_tupleIJiEESt5tupleIJDpOT_EES3_ = comdat any
$_ZSt4moveIRiEONSt16remove_referenceIT_E4typeEOS2_ = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11lower_boundERS1_ = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_lower_boundEPSt13_Rb_tree_nodeIS3_EPSt18_Rb_tree_node_baseRS1_ = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_M_beginEv = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_M_endEv = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt13_Rb_tree_nodeIS3_E = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_S_leftEPSt18_Rb_tree_node_base = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPSt18_Rb_tree_node_base = comdat any
$_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC2EPSt18_Rb_tree_node_base = comdat any
$_ZNKSt10_Select1stISt4pairIKiPcEEclERKS3_ = comdat any
$_ZNKSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv = comdat any
$_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiPcEE6_M_ptrEv = comdat any
$_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiPcEE7_M_addrEv = comdat any
$_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE9_M_mbeginEv = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE3endEv = comdat any
$_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8key_compEv = comdat any
$_ZNSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv = comdat any
$__clang_call_terminate = comdat any
$_ZN9__gnu_cxx16__aligned_membufISt4pairIKiPcEE6_M_ptrEv = comdat any
$_ZN9__gnu_cxx16__aligned_membufISt4pairIKiPcEE7_M_addrEv = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_create_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESE_IJEEEEEPSt13_Rb_tree_nodeIS3_EDpOT_ = comdat any
$_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE = comdat any
$_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE = comdat any
$_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS3_ERS1_ = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_insert_nodeEPSt18_Rb_tree_node_baseSB_PSt13_Rb_tree_nodeIS3_E = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_drop_nodeEPSt13_Rb_tree_nodeIS3_E = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_get_nodeEv = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE17_M_construct_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESE_IJEEEEEvPSt13_Rb_tree_nodeIS3_EDpOT_ = comdat any
$_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE8allocateERS6_m = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE21_M_get_Node_allocatorEv = comdat any
$_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE8allocateEmPKv = comdat any
$_ZNK9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE11_M_max_sizeEv = comdat any
$_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE9constructIS4_JRKSt21piecewise_construct_tSt5tupleIJOiEESC_IJEEEEEvRS6_PT_DpOT0_ = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_put_nodeEPSt13_Rb_tree_nodeIS3_E = comdat any
$_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE9constructIS5_JRKSt21piecewise_construct_tSt5tupleIJOiEESC_IJEEEEEvPT_DpOT0_ = comdat any
$_ZNSt5tupleIJOiEEC2EOS1_ = comdat any
$_ZNSt4pairIKiPcEC2IJOiEJEEESt21piecewise_construct_tSt5tupleIJDpT_EES6_IJDpT0_EE = comdat any
$_ZNSt11_Tuple_implILm0EJOiEEC2EOS1_ = comdat any
$_ZNSt4pairIKiPcEC2IJOiEJLm0EEJEJEEERSt5tupleIJDpT_EERS5_IJDpT1_EESt12_Index_tupleIJXspT0_EEESE_IJXspT2_EEE = comdat any
$_ZSt7forwardIOiEOT_RNSt16remove_referenceIS1_E4typeE = comdat any
$_ZSt3getILm0EJOiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS5_ = comdat any
$_ZSt12__get_helperILm0EOiJEERT0_RSt11_Tuple_implIXT_EJS1_DpT1_EE = comdat any
$_ZNSt11_Tuple_implILm0EJOiEE7_M_headERS1_ = comdat any
$_ZNSt10_Head_baseILm0EOiLb0EE7_M_headERS1_ = comdat any
$_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE10deallocateERS6_PS5_m = comdat any
$_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE10deallocateEPS6_m = comdat any
$_ZNKSt23_Rb_tree_const_iteratorISt4pairIKiPcEE13_M_const_castEv = comdat any
$_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE4sizeEv = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_rightmostEv = comdat any
$_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_Lb1EEERKS1_OT_ = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE24_M_get_insert_unique_posERS1_ = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_leftmostEv = comdat any
$_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_S4_Lb1EEEOT_OT0_ = comdat any
$_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEmmEv = comdat any
$_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEppEv = comdat any
$_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_Lb1EEEOT_RKS1_ = comdat any
$_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE5beginEv = comdat any
$_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRPSt13_Rb_tree_nodeIS_IKiPcEERS1_Lb1EEEOT_OT0_ = comdat any
$_ZSt7forwardIRPSt13_Rb_tree_nodeISt4pairIKiPcEEEOT_RNSt16remove_referenceIS8_E4typeE = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE15_M_destroy_nodeEPSt13_Rb_tree_nodeIS3_E = comdat any
$_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE7destroyIS4_EEvRS6_PT_ = comdat any
$_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE7destroyIS5_EEvPT_ = comdat any
$_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE = comdat any
$_ZNSt5tupleIJOiEEC2IJiELb1ELb1EEEDpOT_ = comdat any
$_ZNSt11_Tuple_implILm0EJOiEEC2IiEEOT_ = comdat any
$_ZNSt10_Head_baseILm0EOiLb0EEC2IiEEOT_ = comdat any
@_ZStL19piecewise_construct = internal constant %"struct.std::piecewise_construct_t" undef, align 1
; Function Attrs: noinline optnone uwtable
define dso_local void @_ZN63CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_loop_747badSinkESt3mapIiPcSt4lessIiESaISt4pairIKiS1_EEE(%"class.std::map"* %dataMap) #0 {
entry:
%data = alloca i8*, align 8
%ref.tmp = alloca i32, align 4
%i = alloca i64, align 8
%source = alloca [100 x i8], align 16
store i32 2, i32* %ref.tmp, align 4
%call = call nonnull align 8 dereferenceable(8) i8** @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEEixEOi(%"class.std::map"* %dataMap, i32* nonnull align 4 dereferenceable(4) %ref.tmp)
%0 = load i8*, i8** %call, align 8
store i8* %0, i8** %data, align 8
%arraydecay = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
call void @llvm.memset.p0i8.i64(i8* align 16 %arraydecay, i8 67, i64 99, i1 false)
%arrayidx = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 99
store i8 0, i8* %arrayidx, align 1
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %entry
%1 = load i64, i64* %i, align 8
%cmp = icmp ult i64 %1, 100
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%2 = load i64, i64* %i, align 8
%arrayidx1 = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 %2
%3 = load i8, i8* %arrayidx1, align 1
%4 = load i8*, i8** %data, align 8
%5 = load i64, i64* %i, align 8
%arrayidx2 = getelementptr inbounds i8, i8* %4, i64 %5
store i8 %3, i8* %arrayidx2, align 1
br label %for.inc
for.inc: ; preds = %for.body
%6 = load i64, i64* %i, align 8
%inc = add i64 %6, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%7 = load i8*, i8** %data, align 8
%arrayidx3 = getelementptr inbounds i8, i8* %7, i64 99
store i8 0, i8* %arrayidx3, align 1
%8 = load i8*, i8** %data, align 8
call void @printLine(i8* %8)
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) i8** @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEEixEOi(%"class.std::map"* %this, i32* nonnull align 4 dereferenceable(4) %__k) #0 comdat align 2 {
entry:
%this.addr = alloca %"class.std::map"*, align 8
%__k.addr = alloca i32*, align 8
%__i = alloca %"struct.std::_Rb_tree_iterator", align 8
%ref.tmp = alloca %"struct.std::_Rb_tree_iterator", align 8
%ref.tmp5 = alloca %"struct.std::less", align 1
%undef.agg.tmp = alloca %"struct.std::less", align 1
%ref.tmp8 = alloca %"struct.std::_Rb_tree_iterator", align 8
%agg.tmp = alloca %"struct.std::_Rb_tree_const_iterator", align 8
%ref.tmp9 = alloca %"class.std::tuple", align 8
%ref.tmp11 = alloca %"class.std::tuple.0", align 1
store %"class.std::map"* %this, %"class.std::map"** %this.addr, align 8
store i32* %__k, i32** %__k.addr, align 8
%this1 = load %"class.std::map"*, %"class.std::map"** %this.addr, align 8
%0 = load i32*, i32** %__k.addr, align 8
%call = call %"struct.std::_Rb_tree_node_base"* @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE11lower_boundERS4_(%"class.std::map"* %this1, i32* nonnull align 4 dereferenceable(4) %0)
%coerce.dive = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__i, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %call, %"struct.std::_Rb_tree_node_base"** %coerce.dive, align 8
%call2 = call %"struct.std::_Rb_tree_node_base"* @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE3endEv(%"class.std::map"* %this1) #12
%coerce.dive3 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %ref.tmp, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %call2, %"struct.std::_Rb_tree_node_base"** %coerce.dive3, align 8
%call4 = call zeroext i1 @_ZSteqRKSt17_Rb_tree_iteratorISt4pairIKiPcEES6_(%"struct.std::_Rb_tree_iterator"* nonnull align 8 dereferenceable(8) %__i, %"struct.std::_Rb_tree_iterator"* nonnull align 8 dereferenceable(8) %ref.tmp) #12
br i1 %call4, label %lor.end, label %lor.rhs
lor.rhs: ; preds = %entry
call void @_ZNKSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE8key_compEv(%"class.std::map"* %this1)
%1 = load i32*, i32** %__k.addr, align 8
%call6 = call nonnull align 8 dereferenceable(16) %"struct.std::pair"* @_ZNKSt17_Rb_tree_iteratorISt4pairIKiPcEEdeEv(%"struct.std::_Rb_tree_iterator"* %__i) #12
%first = getelementptr inbounds %"struct.std::pair", %"struct.std::pair"* %call6, i32 0, i32 0
%call7 = call zeroext i1 @_ZNKSt4lessIiEclERKiS2_(%"struct.std::less"* %ref.tmp5, i32* nonnull align 4 dereferenceable(4) %1, i32* nonnull align 4 dereferenceable(4) %first)
br label %lor.end
lor.end: ; preds = %lor.rhs, %entry
%2 = phi i1 [ true, %entry ], [ %call7, %lor.rhs ]
br i1 %2, label %if.then, label %if.end
if.then: ; preds = %lor.end
%_M_t = getelementptr inbounds %"class.std::map", %"class.std::map"* %this1, i32 0, i32 0
call void @_ZNSt23_Rb_tree_const_iteratorISt4pairIKiPcEEC2ERKSt17_Rb_tree_iteratorIS3_E(%"struct.std::_Rb_tree_const_iterator"* %agg.tmp, %"struct.std::_Rb_tree_iterator"* nonnull align 8 dereferenceable(8) %__i) #12
%3 = load i32*, i32** %__k.addr, align 8
%call10 = call nonnull align 4 dereferenceable(4) i32* @_ZSt4moveIRiEONSt16remove_referenceIT_E4typeEOS2_(i32* nonnull align 4 dereferenceable(4) %3) #12
call void @_ZSt16forward_as_tupleIJiEESt5tupleIJDpOT_EES3_(%"class.std::tuple"* sret align 8 %ref.tmp9, i32* nonnull align 4 dereferenceable(4) %call10) #12
%coerce.dive12 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", %"struct.std::_Rb_tree_const_iterator"* %agg.tmp, i32 0, i32 0
%4 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %coerce.dive12, align 8
%call13 = call %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJOiEESE_IJEEEEESt17_Rb_tree_iteratorIS3_ESt23_Rb_tree_const_iteratorIS3_EDpOT_(%"class.std::_Rb_tree"* %_M_t, %"struct.std::_Rb_tree_node_base"* %4, %"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) @_ZStL19piecewise_construct, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %ref.tmp9, %"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %ref.tmp11)
%coerce.dive14 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %ref.tmp8, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %call13, %"struct.std::_Rb_tree_node_base"** %coerce.dive14, align 8
%5 = bitcast %"struct.std::_Rb_tree_iterator"* %__i to i8*
%6 = bitcast %"struct.std::_Rb_tree_iterator"* %ref.tmp8 to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %5, i8* align 8 %6, i64 8, i1 false)
br label %if.end
if.end: ; preds = %if.then, %lor.end
%call15 = call nonnull align 8 dereferenceable(16) %"struct.std::pair"* @_ZNKSt17_Rb_tree_iteratorISt4pairIKiPcEEdeEv(%"struct.std::_Rb_tree_iterator"* %__i) #12
%second = getelementptr inbounds %"struct.std::pair", %"struct.std::pair"* %call15, i32 0, i32 1
ret i8** %second
}
; Function Attrs: argmemonly nounwind willreturn writeonly
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #1
declare dso_local void @printLine(i8*) #2
; Function Attrs: noinline optnone uwtable
define dso_local void @_ZN63CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_loop_7411goodG2BSinkESt3mapIiPcSt4lessIiESaISt4pairIKiS1_EEE(%"class.std::map"* %dataMap) #0 {
entry:
%data = alloca i8*, align 8
%ref.tmp = alloca i32, align 4
%i = alloca i64, align 8
%source = alloca [100 x i8], align 16
store i32 2, i32* %ref.tmp, align 4
%call = call nonnull align 8 dereferenceable(8) i8** @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEEixEOi(%"class.std::map"* %dataMap, i32* nonnull align 4 dereferenceable(4) %ref.tmp)
%0 = load i8*, i8** %call, align 8
store i8* %0, i8** %data, align 8
%arraydecay = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
call void @llvm.memset.p0i8.i64(i8* align 16 %arraydecay, i8 67, i64 99, i1 false)
%arrayidx = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 99
store i8 0, i8* %arrayidx, align 1
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %entry
%1 = load i64, i64* %i, align 8
%cmp = icmp ult i64 %1, 100
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%2 = load i64, i64* %i, align 8
%arrayidx1 = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 %2
%3 = load i8, i8* %arrayidx1, align 1
%4 = load i8*, i8** %data, align 8
%5 = load i64, i64* %i, align 8
%arrayidx2 = getelementptr inbounds i8, i8* %4, i64 %5
store i8 %3, i8* %arrayidx2, align 1
br label %for.inc
for.inc: ; preds = %for.body
%6 = load i64, i64* %i, align 8
%inc = add i64 %6, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%7 = load i8*, i8** %data, align 8
%arrayidx3 = getelementptr inbounds i8, i8* %7, i64 99
store i8 0, i8* %arrayidx3, align 1
%8 = load i8*, i8** %data, align 8
call void @printLine(i8* %8)
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node_base"* @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE11lower_boundERS4_(%"class.std::map"* %this, i32* nonnull align 4 dereferenceable(4) %__x) #0 comdat align 2 {
entry:
%retval = alloca %"struct.std::_Rb_tree_iterator", align 8
%this.addr = alloca %"class.std::map"*, align 8
%__x.addr = alloca i32*, align 8
store %"class.std::map"* %this, %"class.std::map"** %this.addr, align 8
store i32* %__x, i32** %__x.addr, align 8
%this1 = load %"class.std::map"*, %"class.std::map"** %this.addr, align 8
%_M_t = getelementptr inbounds %"class.std::map", %"class.std::map"* %this1, i32 0, i32 0
%0 = load i32*, i32** %__x.addr, align 8
%call = call %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11lower_boundERS1_(%"class.std::_Rb_tree"* %_M_t, i32* nonnull align 4 dereferenceable(4) %0)
%coerce.dive = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %call, %"struct.std::_Rb_tree_node_base"** %coerce.dive, align 8
%coerce.dive2 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
%1 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %coerce.dive2, align 8
ret %"struct.std::_Rb_tree_node_base"* %1
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local zeroext i1 @_ZSteqRKSt17_Rb_tree_iteratorISt4pairIKiPcEES6_(%"struct.std::_Rb_tree_iterator"* nonnull align 8 dereferenceable(8) %__x, %"struct.std::_Rb_tree_iterator"* nonnull align 8 dereferenceable(8) %__y) #3 comdat {
entry:
%__x.addr = alloca %"struct.std::_Rb_tree_iterator"*, align 8
%__y.addr = alloca %"struct.std::_Rb_tree_iterator"*, align 8
store %"struct.std::_Rb_tree_iterator"* %__x, %"struct.std::_Rb_tree_iterator"** %__x.addr, align 8
store %"struct.std::_Rb_tree_iterator"* %__y, %"struct.std::_Rb_tree_iterator"** %__y.addr, align 8
%0 = load %"struct.std::_Rb_tree_iterator"*, %"struct.std::_Rb_tree_iterator"** %__x.addr, align 8
%_M_node = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %0, i32 0, i32 0
%1 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node, align 8
%2 = load %"struct.std::_Rb_tree_iterator"*, %"struct.std::_Rb_tree_iterator"** %__y.addr, align 8
%_M_node1 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %2, i32 0, i32 0
%3 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node1, align 8
%cmp = icmp eq %"struct.std::_Rb_tree_node_base"* %1, %3
ret i1 %cmp
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node_base"* @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE3endEv(%"class.std::map"* %this) #3 comdat align 2 {
entry:
%retval = alloca %"struct.std::_Rb_tree_iterator", align 8
%this.addr = alloca %"class.std::map"*, align 8
store %"class.std::map"* %this, %"class.std::map"** %this.addr, align 8
%this1 = load %"class.std::map"*, %"class.std::map"** %this.addr, align 8
%_M_t = getelementptr inbounds %"class.std::map", %"class.std::map"* %this1, i32 0, i32 0
%call = call %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE3endEv(%"class.std::_Rb_tree"* %_M_t) #12
%coerce.dive = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %call, %"struct.std::_Rb_tree_node_base"** %coerce.dive, align 8
%coerce.dive2 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
%0 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %coerce.dive2, align 8
ret %"struct.std::_Rb_tree_node_base"* %0
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNKSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE8key_compEv(%"class.std::map"* %this) #0 comdat align 2 {
entry:
%this.addr = alloca %"class.std::map"*, align 8
%undef.agg.tmp = alloca %"struct.std::less", align 1
store %"class.std::map"* %this, %"class.std::map"** %this.addr, align 8
%this1 = load %"class.std::map"*, %"class.std::map"** %this.addr, align 8
%_M_t = getelementptr inbounds %"class.std::map", %"class.std::map"* %this1, i32 0, i32 0
call void @_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8key_compEv(%"class.std::_Rb_tree"* %_M_t)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local zeroext i1 @_ZNKSt4lessIiEclERKiS2_(%"struct.std::less"* %this, i32* nonnull align 4 dereferenceable(4) %__x, i32* nonnull align 4 dereferenceable(4) %__y) #3 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::less"*, align 8
%__x.addr = alloca i32*, align 8
%__y.addr = alloca i32*, align 8
store %"struct.std::less"* %this, %"struct.std::less"** %this.addr, align 8
store i32* %__x, i32** %__x.addr, align 8
store i32* %__y, i32** %__y.addr, align 8
%this1 = load %"struct.std::less"*, %"struct.std::less"** %this.addr, align 8
%0 = load i32*, i32** %__x.addr, align 8
%1 = load i32, i32* %0, align 4
%2 = load i32*, i32** %__y.addr, align 8
%3 = load i32, i32* %2, align 4
%cmp = icmp slt i32 %1, %3
ret i1 %cmp
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(16) %"struct.std::pair"* @_ZNKSt17_Rb_tree_iteratorISt4pairIKiPcEEdeEv(%"struct.std::_Rb_tree_iterator"* %this) #3 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%this.addr = alloca %"struct.std::_Rb_tree_iterator"*, align 8
store %"struct.std::_Rb_tree_iterator"* %this, %"struct.std::_Rb_tree_iterator"** %this.addr, align 8
%this1 = load %"struct.std::_Rb_tree_iterator"*, %"struct.std::_Rb_tree_iterator"** %this.addr, align 8
%_M_node = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %this1, i32 0, i32 0
%0 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node, align 8
%1 = bitcast %"struct.std::_Rb_tree_node_base"* %0 to %"struct.std::_Rb_tree_node"*
%call = invoke %"struct.std::pair"* @_ZNSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(%"struct.std::_Rb_tree_node"* %1)
to label %invoke.cont unwind label %terminate.lpad
invoke.cont: ; preds = %entry
ret %"struct.std::pair"* %call
terminate.lpad: ; preds = %entry
%2 = landingpad { i8*, i32 }
catch i8* null
%3 = extractvalue { i8*, i32 } %2, 0
call void @__clang_call_terminate(i8* %3) #13
unreachable
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJOiEESE_IJEEEEESt17_Rb_tree_iteratorIS3_ESt23_Rb_tree_const_iteratorIS3_EDpOT_(%"class.std::_Rb_tree"* %this, %"struct.std::_Rb_tree_node_base"* %__pos.coerce, %"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %__args, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %__args1, %"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %__args3) #0 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%retval = alloca %"struct.std::_Rb_tree_iterator", align 8
%__pos = alloca %"struct.std::_Rb_tree_const_iterator", align 8
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__args.addr = alloca %"struct.std::piecewise_construct_t"*, align 8
%__args.addr2 = alloca %"class.std::tuple"*, align 8
%__args.addr4 = alloca %"class.std::tuple.0"*, align 8
%__z = alloca %"struct.std::_Rb_tree_node"*, align 8
%__res = alloca %"struct.std::pair.1", align 8
%agg.tmp = alloca %"struct.std::_Rb_tree_const_iterator", align 8
%exn.slot = alloca i8*, align 8
%ehselector.slot = alloca i32, align 4
%coerce.dive = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", %"struct.std::_Rb_tree_const_iterator"* %__pos, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %__pos.coerce, %"struct.std::_Rb_tree_node_base"** %coerce.dive, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store %"struct.std::piecewise_construct_t"* %__args, %"struct.std::piecewise_construct_t"** %__args.addr, align 8
store %"class.std::tuple"* %__args1, %"class.std::tuple"** %__args.addr2, align 8
store %"class.std::tuple.0"* %__args3, %"class.std::tuple.0"** %__args.addr4, align 8
%this5 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%0 = load %"struct.std::piecewise_construct_t"*, %"struct.std::piecewise_construct_t"** %__args.addr, align 8
%call = call nonnull align 1 dereferenceable(1) %"struct.std::piecewise_construct_t"* @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(%"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %0) #12
%1 = load %"class.std::tuple"*, %"class.std::tuple"** %__args.addr2, align 8
%call6 = call nonnull align 8 dereferenceable(8) %"class.std::tuple"* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(%"class.std::tuple"* nonnull align 8 dereferenceable(8) %1) #12
%2 = load %"class.std::tuple.0"*, %"class.std::tuple.0"** %__args.addr4, align 8
%call7 = call nonnull align 1 dereferenceable(1) %"class.std::tuple.0"* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(%"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %2) #12
%call8 = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_create_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESE_IJEEEEEPSt13_Rb_tree_nodeIS3_EDpOT_(%"class.std::_Rb_tree"* %this5, %"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %call, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %call6, %"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %call7)
store %"struct.std::_Rb_tree_node"* %call8, %"struct.std::_Rb_tree_node"** %__z, align 8
%3 = bitcast %"struct.std::_Rb_tree_const_iterator"* %agg.tmp to i8*
%4 = bitcast %"struct.std::_Rb_tree_const_iterator"* %__pos to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %3, i8* align 8 %4, i64 8, i1 false)
%5 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__z, align 8
%call9 = invoke nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt13_Rb_tree_nodeIS3_E(%"struct.std::_Rb_tree_node"* %5)
to label %invoke.cont unwind label %lpad
invoke.cont: ; preds = %entry
%coerce.dive10 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", %"struct.std::_Rb_tree_const_iterator"* %agg.tmp, i32 0, i32 0
%6 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %coerce.dive10, align 8
%call12 = invoke { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS3_ERS1_(%"class.std::_Rb_tree"* %this5, %"struct.std::_Rb_tree_node_base"* %6, i32* nonnull align 4 dereferenceable(4) %call9)
to label %invoke.cont11 unwind label %lpad
invoke.cont11: ; preds = %invoke.cont
%7 = bitcast %"struct.std::pair.1"* %__res to { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }*
%8 = getelementptr inbounds { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }, { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }* %7, i32 0, i32 0
%9 = extractvalue { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } %call12, 0
store %"struct.std::_Rb_tree_node_base"* %9, %"struct.std::_Rb_tree_node_base"** %8, align 8
%10 = getelementptr inbounds { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }, { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }* %7, i32 0, i32 1
%11 = extractvalue { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } %call12, 1
store %"struct.std::_Rb_tree_node_base"* %11, %"struct.std::_Rb_tree_node_base"** %10, align 8
%second = getelementptr inbounds %"struct.std::pair.1", %"struct.std::pair.1"* %__res, i32 0, i32 1
%12 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %second, align 8
%tobool = icmp ne %"struct.std::_Rb_tree_node_base"* %12, null
br i1 %tobool, label %if.then, label %if.end
if.then: ; preds = %invoke.cont11
%first = getelementptr inbounds %"struct.std::pair.1", %"struct.std::pair.1"* %__res, i32 0, i32 0
%13 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %first, align 8
%second13 = getelementptr inbounds %"struct.std::pair.1", %"struct.std::pair.1"* %__res, i32 0, i32 1
%14 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %second13, align 8
%15 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__z, align 8
%call15 = invoke %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_insert_nodeEPSt18_Rb_tree_node_baseSB_PSt13_Rb_tree_nodeIS3_E(%"class.std::_Rb_tree"* %this5, %"struct.std::_Rb_tree_node_base"* %13, %"struct.std::_Rb_tree_node_base"* %14, %"struct.std::_Rb_tree_node"* %15)
to label %invoke.cont14 unwind label %lpad
invoke.cont14: ; preds = %if.then
%coerce.dive16 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %call15, %"struct.std::_Rb_tree_node_base"** %coerce.dive16, align 8
br label %return
lpad: ; preds = %if.then, %invoke.cont, %entry
%16 = landingpad { i8*, i32 }
catch i8* null
%17 = extractvalue { i8*, i32 } %16, 0
store i8* %17, i8** %exn.slot, align 8
%18 = extractvalue { i8*, i32 } %16, 1
store i32 %18, i32* %ehselector.slot, align 4
br label %catch
catch: ; preds = %lpad
%exn = load i8*, i8** %exn.slot, align 8
%19 = call i8* @__cxa_begin_catch(i8* %exn) #12
%20 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__z, align 8
call void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_drop_nodeEPSt13_Rb_tree_nodeIS3_E(%"class.std::_Rb_tree"* %this5, %"struct.std::_Rb_tree_node"* %20) #12
invoke void @__cxa_rethrow() #14
to label %unreachable unwind label %lpad18
if.end: ; preds = %invoke.cont11
%21 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__z, align 8
call void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_drop_nodeEPSt13_Rb_tree_nodeIS3_E(%"class.std::_Rb_tree"* %this5, %"struct.std::_Rb_tree_node"* %21) #12
%first17 = getelementptr inbounds %"struct.std::pair.1", %"struct.std::pair.1"* %__res, i32 0, i32 0
%22 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %first17, align 8
call void @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC2EPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_iterator"* %retval, %"struct.std::_Rb_tree_node_base"* %22) #12
br label %return
lpad18: ; preds = %catch
%23 = landingpad { i8*, i32 }
cleanup
%24 = extractvalue { i8*, i32 } %23, 0
store i8* %24, i8** %exn.slot, align 8
%25 = extractvalue { i8*, i32 } %23, 1
store i32 %25, i32* %ehselector.slot, align 4
invoke void @__cxa_end_catch()
to label %invoke.cont19 unwind label %terminate.lpad
invoke.cont19: ; preds = %lpad18
br label %eh.resume
try.cont: ; No predecessors!
call void @llvm.trap()
unreachable
return: ; preds = %if.end, %invoke.cont14
%coerce.dive20 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
%26 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %coerce.dive20, align 8
ret %"struct.std::_Rb_tree_node_base"* %26
eh.resume: ; preds = %invoke.cont19
%exn21 = load i8*, i8** %exn.slot, align 8
%sel = load i32, i32* %ehselector.slot, align 4
%lpad.val = insertvalue { i8*, i32 } undef, i8* %exn21, 0
%lpad.val22 = insertvalue { i8*, i32 } %lpad.val, i32 %sel, 1
resume { i8*, i32 } %lpad.val22
terminate.lpad: ; preds = %lpad18
%27 = landingpad { i8*, i32 }
catch i8* null
%28 = extractvalue { i8*, i32 } %27, 0
call void @__clang_call_terminate(i8* %28) #13
unreachable
unreachable: ; preds = %catch
unreachable
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt23_Rb_tree_const_iteratorISt4pairIKiPcEEC2ERKSt17_Rb_tree_iteratorIS3_E(%"struct.std::_Rb_tree_const_iterator"* %this, %"struct.std::_Rb_tree_iterator"* nonnull align 8 dereferenceable(8) %__it) unnamed_addr #3 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Rb_tree_const_iterator"*, align 8
%__it.addr = alloca %"struct.std::_Rb_tree_iterator"*, align 8
store %"struct.std::_Rb_tree_const_iterator"* %this, %"struct.std::_Rb_tree_const_iterator"** %this.addr, align 8
store %"struct.std::_Rb_tree_iterator"* %__it, %"struct.std::_Rb_tree_iterator"** %__it.addr, align 8
%this1 = load %"struct.std::_Rb_tree_const_iterator"*, %"struct.std::_Rb_tree_const_iterator"** %this.addr, align 8
%_M_node = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", %"struct.std::_Rb_tree_const_iterator"* %this1, i32 0, i32 0
%0 = load %"struct.std::_Rb_tree_iterator"*, %"struct.std::_Rb_tree_iterator"** %__it.addr, align 8
%_M_node2 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %0, i32 0, i32 0
%1 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node2, align 8
store %"struct.std::_Rb_tree_node_base"* %1, %"struct.std::_Rb_tree_node_base"** %_M_node, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZSt16forward_as_tupleIJiEESt5tupleIJDpOT_EES3_(%"class.std::tuple"* noalias sret align 8 %agg.result, i32* nonnull align 4 dereferenceable(4) %__args) #3 comdat {
entry:
%result.ptr = alloca i8*, align 8
%__args.addr = alloca i32*, align 8
%0 = bitcast %"class.std::tuple"* %agg.result to i8*
store i8* %0, i8** %result.ptr, align 8
store i32* %__args, i32** %__args.addr, align 8
%1 = load i32*, i32** %__args.addr, align 8
%call = call nonnull align 4 dereferenceable(4) i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i32* nonnull align 4 dereferenceable(4) %1) #12
call void @_ZNSt5tupleIJOiEEC2IJiELb1ELb1EEEDpOT_(%"class.std::tuple"* %agg.result, i32* nonnull align 4 dereferenceable(4) %call) #12
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 4 dereferenceable(4) i32* @_ZSt4moveIRiEONSt16remove_referenceIT_E4typeEOS2_(i32* nonnull align 4 dereferenceable(4) %__t) #3 comdat {
entry:
%__t.addr = alloca i32*, align 8
store i32* %__t, i32** %__t.addr, align 8
%0 = load i32*, i32** %__t.addr, align 8
ret i32* %0
}
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #4
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11lower_boundERS1_(%"class.std::_Rb_tree"* %this, i32* nonnull align 4 dereferenceable(4) %__k) #0 comdat align 2 {
entry:
%retval = alloca %"struct.std::_Rb_tree_iterator", align 8
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__k.addr = alloca i32*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store i32* %__k, i32** %__k.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%call = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_M_beginEv(%"class.std::_Rb_tree"* %this1) #12
%call2 = call %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_M_endEv(%"class.std::_Rb_tree"* %this1) #12
%0 = load i32*, i32** %__k.addr, align 8
%call3 = call %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_lower_boundEPSt13_Rb_tree_nodeIS3_EPSt18_Rb_tree_node_baseRS1_(%"class.std::_Rb_tree"* %this1, %"struct.std::_Rb_tree_node"* %call, %"struct.std::_Rb_tree_node_base"* %call2, i32* nonnull align 4 dereferenceable(4) %0)
%coerce.dive = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %call3, %"struct.std::_Rb_tree_node_base"** %coerce.dive, align 8
%coerce.dive4 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
%1 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %coerce.dive4, align 8
ret %"struct.std::_Rb_tree_node_base"* %1
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_lower_boundEPSt13_Rb_tree_nodeIS3_EPSt18_Rb_tree_node_baseRS1_(%"class.std::_Rb_tree"* %this, %"struct.std::_Rb_tree_node"* %__x, %"struct.std::_Rb_tree_node_base"* %__y, i32* nonnull align 4 dereferenceable(4) %__k) #0 comdat align 2 {
entry:
%retval = alloca %"struct.std::_Rb_tree_iterator", align 8
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__x.addr = alloca %"struct.std::_Rb_tree_node"*, align 8
%__y.addr = alloca %"struct.std::_Rb_tree_node_base"*, align 8
%__k.addr = alloca i32*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store %"struct.std::_Rb_tree_node"* %__x, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
store %"struct.std::_Rb_tree_node_base"* %__y, %"struct.std::_Rb_tree_node_base"** %__y.addr, align 8
store i32* %__k, i32** %__k.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
br label %while.cond
while.cond: ; preds = %if.end, %entry
%0 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
%cmp = icmp ne %"struct.std::_Rb_tree_node"* %0, null
br i1 %cmp, label %while.body, label %while.end
while.body: ; preds = %while.cond
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%1 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl to %"struct.std::_Rb_tree_key_compare"*
%_M_key_compare = getelementptr inbounds %"struct.std::_Rb_tree_key_compare", %"struct.std::_Rb_tree_key_compare"* %1, i32 0, i32 0
%2 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
%call = call nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt13_Rb_tree_nodeIS3_E(%"struct.std::_Rb_tree_node"* %2)
%3 = load i32*, i32** %__k.addr, align 8
%call2 = call zeroext i1 @_ZNKSt4lessIiEclERKiS2_(%"struct.std::less"* %_M_key_compare, i32* nonnull align 4 dereferenceable(4) %call, i32* nonnull align 4 dereferenceable(4) %3)
br i1 %call2, label %if.else, label %if.then
if.then: ; preds = %while.body
%4 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
%5 = bitcast %"struct.std::_Rb_tree_node"* %4 to %"struct.std::_Rb_tree_node_base"*
store %"struct.std::_Rb_tree_node_base"* %5, %"struct.std::_Rb_tree_node_base"** %__y.addr, align 8
%6 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
%7 = bitcast %"struct.std::_Rb_tree_node"* %6 to %"struct.std::_Rb_tree_node_base"*
%call3 = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_S_leftEPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %7) #12
store %"struct.std::_Rb_tree_node"* %call3, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
br label %if.end
if.else: ; preds = %while.body
%8 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
%9 = bitcast %"struct.std::_Rb_tree_node"* %8 to %"struct.std::_Rb_tree_node_base"*
%call4 = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %9) #12
store %"struct.std::_Rb_tree_node"* %call4, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
br label %if.end
if.end: ; preds = %if.else, %if.then
br label %while.cond
while.end: ; preds = %while.cond
%10 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__y.addr, align 8
call void @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC2EPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_iterator"* %retval, %"struct.std::_Rb_tree_node_base"* %10) #12
%coerce.dive = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
%11 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %coerce.dive, align 8
ret %"struct.std::_Rb_tree_node_base"* %11
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_M_beginEv(%"class.std::_Rb_tree"* %this) #3 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%call = call %"struct.std::_Rb_tree_node"* @_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE9_M_mbeginEv(%"class.std::_Rb_tree"* %this1) #12
ret %"struct.std::_Rb_tree_node"* %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_M_endEv(%"class.std::_Rb_tree"* %this) #3 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%0 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl to i8*
%add.ptr = getelementptr inbounds i8, i8* %0, i64 8
%1 = bitcast i8* %add.ptr to %"struct.std::_Rb_tree_header"*
%_M_header = getelementptr inbounds %"struct.std::_Rb_tree_header", %"struct.std::_Rb_tree_header"* %1, i32 0, i32 0
ret %"struct.std::_Rb_tree_node_base"* %_M_header
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt13_Rb_tree_nodeIS3_E(%"struct.std::_Rb_tree_node"* %__x) #0 comdat align 2 {
entry:
%__x.addr = alloca %"struct.std::_Rb_tree_node"*, align 8
%ref.tmp = alloca %"struct.std::_Select1st", align 1
store %"struct.std::_Rb_tree_node"* %__x, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
%0 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
%call = call %"struct.std::pair"* @_ZNKSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(%"struct.std::_Rb_tree_node"* %0)
%call1 = call nonnull align 4 dereferenceable(4) i32* @_ZNKSt10_Select1stISt4pairIKiPcEEclERKS3_(%"struct.std::_Select1st"* %ref.tmp, %"struct.std::pair"* nonnull align 8 dereferenceable(16) %call)
ret i32* %call1
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_S_leftEPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %__x) #3 comdat align 2 {
entry:
%__x.addr = alloca %"struct.std::_Rb_tree_node_base"*, align 8
store %"struct.std::_Rb_tree_node_base"* %__x, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
%0 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
%_M_left = getelementptr inbounds %"struct.std::_Rb_tree_node_base", %"struct.std::_Rb_tree_node_base"* %0, i32 0, i32 2
%1 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_left, align 8
%2 = bitcast %"struct.std::_Rb_tree_node_base"* %1 to %"struct.std::_Rb_tree_node"*
ret %"struct.std::_Rb_tree_node"* %2
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %__x) #3 comdat align 2 {
entry:
%__x.addr = alloca %"struct.std::_Rb_tree_node_base"*, align 8
store %"struct.std::_Rb_tree_node_base"* %__x, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
%0 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
%_M_right = getelementptr inbounds %"struct.std::_Rb_tree_node_base", %"struct.std::_Rb_tree_node_base"* %0, i32 0, i32 3
%1 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_right, align 8
%2 = bitcast %"struct.std::_Rb_tree_node_base"* %1 to %"struct.std::_Rb_tree_node"*
ret %"struct.std::_Rb_tree_node"* %2
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC2EPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_iterator"* %this, %"struct.std::_Rb_tree_node_base"* %__x) unnamed_addr #3 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Rb_tree_iterator"*, align 8
%__x.addr = alloca %"struct.std::_Rb_tree_node_base"*, align 8
store %"struct.std::_Rb_tree_iterator"* %this, %"struct.std::_Rb_tree_iterator"** %this.addr, align 8
store %"struct.std::_Rb_tree_node_base"* %__x, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
%this1 = load %"struct.std::_Rb_tree_iterator"*, %"struct.std::_Rb_tree_iterator"** %this.addr, align 8
%_M_node = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %this1, i32 0, i32 0
%0 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
store %"struct.std::_Rb_tree_node_base"* %0, %"struct.std::_Rb_tree_node_base"** %_M_node, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 4 dereferenceable(4) i32* @_ZNKSt10_Select1stISt4pairIKiPcEEclERKS3_(%"struct.std::_Select1st"* %this, %"struct.std::pair"* nonnull align 8 dereferenceable(16) %__x) #3 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Select1st"*, align 8
%__x.addr = alloca %"struct.std::pair"*, align 8
store %"struct.std::_Select1st"* %this, %"struct.std::_Select1st"** %this.addr, align 8
store %"struct.std::pair"* %__x, %"struct.std::pair"** %__x.addr, align 8
%this1 = load %"struct.std::_Select1st"*, %"struct.std::_Select1st"** %this.addr, align 8
%0 = load %"struct.std::pair"*, %"struct.std::pair"** %__x.addr, align 8
%first = getelementptr inbounds %"struct.std::pair", %"struct.std::pair"* %0, i32 0, i32 0
ret i32* %first
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::pair"* @_ZNKSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(%"struct.std::_Rb_tree_node"* %this) #3 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Rb_tree_node"*, align 8
store %"struct.std::_Rb_tree_node"* %this, %"struct.std::_Rb_tree_node"** %this.addr, align 8
%this1 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %this.addr, align 8
%_M_storage = getelementptr inbounds %"struct.std::_Rb_tree_node", %"struct.std::_Rb_tree_node"* %this1, i32 0, i32 1
%call = call %"struct.std::pair"* @_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiPcEE6_M_ptrEv(%"struct.__gnu_cxx::__aligned_membuf"* %_M_storage) #12
ret %"struct.std::pair"* %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::pair"* @_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiPcEE6_M_ptrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this) #3 comdat align 2 {
entry:
%this.addr = alloca %"struct.__gnu_cxx::__aligned_membuf"*, align 8
store %"struct.__gnu_cxx::__aligned_membuf"* %this, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%this1 = load %"struct.__gnu_cxx::__aligned_membuf"*, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%call = call i8* @_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiPcEE7_M_addrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this1) #12
%0 = bitcast i8* %call to %"struct.std::pair"*
ret %"struct.std::pair"* %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i8* @_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiPcEE7_M_addrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this) #3 comdat align 2 {
entry:
%this.addr = alloca %"struct.__gnu_cxx::__aligned_membuf"*, align 8
store %"struct.__gnu_cxx::__aligned_membuf"* %this, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%this1 = load %"struct.__gnu_cxx::__aligned_membuf"*, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%_M_storage = getelementptr inbounds %"struct.__gnu_cxx::__aligned_membuf", %"struct.__gnu_cxx::__aligned_membuf"* %this1, i32 0, i32 0
%0 = bitcast [16 x i8]* %_M_storage to i8*
ret i8* %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node"* @_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE9_M_mbeginEv(%"class.std::_Rb_tree"* %this) #3 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%0 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl to i8*
%add.ptr = getelementptr inbounds i8, i8* %0, i64 8
%1 = bitcast i8* %add.ptr to %"struct.std::_Rb_tree_header"*
%_M_header = getelementptr inbounds %"struct.std::_Rb_tree_header", %"struct.std::_Rb_tree_header"* %1, i32 0, i32 0
%_M_parent = getelementptr inbounds %"struct.std::_Rb_tree_node_base", %"struct.std::_Rb_tree_node_base"* %_M_header, i32 0, i32 1
%2 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_parent, align 8
%3 = bitcast %"struct.std::_Rb_tree_node_base"* %2 to %"struct.std::_Rb_tree_node"*
ret %"struct.std::_Rb_tree_node"* %3
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE3endEv(%"class.std::_Rb_tree"* %this) #3 comdat align 2 {
entry:
%retval = alloca %"struct.std::_Rb_tree_iterator", align 8
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%0 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl to i8*
%add.ptr = getelementptr inbounds i8, i8* %0, i64 8
%1 = bitcast i8* %add.ptr to %"struct.std::_Rb_tree_header"*
%_M_header = getelementptr inbounds %"struct.std::_Rb_tree_header", %"struct.std::_Rb_tree_header"* %1, i32 0, i32 0
call void @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC2EPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_iterator"* %retval, %"struct.std::_Rb_tree_node_base"* %_M_header) #12
%coerce.dive = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
%2 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %coerce.dive, align 8
ret %"struct.std::_Rb_tree_node_base"* %2
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8key_compEv(%"class.std::_Rb_tree"* %this) #3 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%0 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl to %"struct.std::_Rb_tree_key_compare"*
%_M_key_compare = getelementptr inbounds %"struct.std::_Rb_tree_key_compare", %"struct.std::_Rb_tree_key_compare"* %0, i32 0, i32 0
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::pair"* @_ZNSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(%"struct.std::_Rb_tree_node"* %this) #3 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Rb_tree_node"*, align 8
store %"struct.std::_Rb_tree_node"* %this, %"struct.std::_Rb_tree_node"** %this.addr, align 8
%this1 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %this.addr, align 8
%_M_storage = getelementptr inbounds %"struct.std::_Rb_tree_node", %"struct.std::_Rb_tree_node"* %this1, i32 0, i32 1
%call = call %"struct.std::pair"* @_ZN9__gnu_cxx16__aligned_membufISt4pairIKiPcEE6_M_ptrEv(%"struct.__gnu_cxx::__aligned_membuf"* %_M_storage) #12
ret %"struct.std::pair"* %call
}
declare dso_local i32 @__gxx_personality_v0(...)
; Function Attrs: noinline noreturn nounwind
define linkonce_odr hidden void @__clang_call_terminate(i8* %0) #5 comdat {
%2 = call i8* @__cxa_begin_catch(i8* %0) #12
call void @_ZSt9terminatev() #13
unreachable
}
declare dso_local i8* @__cxa_begin_catch(i8*)
declare dso_local void @_ZSt9terminatev()
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::pair"* @_ZN9__gnu_cxx16__aligned_membufISt4pairIKiPcEE6_M_ptrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this) #3 comdat align 2 {
entry:
%this.addr = alloca %"struct.__gnu_cxx::__aligned_membuf"*, align 8
store %"struct.__gnu_cxx::__aligned_membuf"* %this, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%this1 = load %"struct.__gnu_cxx::__aligned_membuf"*, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%call = call i8* @_ZN9__gnu_cxx16__aligned_membufISt4pairIKiPcEE7_M_addrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this1) #12
%0 = bitcast i8* %call to %"struct.std::pair"*
ret %"struct.std::pair"* %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i8* @_ZN9__gnu_cxx16__aligned_membufISt4pairIKiPcEE7_M_addrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this) #3 comdat align 2 {
entry:
%this.addr = alloca %"struct.__gnu_cxx::__aligned_membuf"*, align 8
store %"struct.__gnu_cxx::__aligned_membuf"* %this, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%this1 = load %"struct.__gnu_cxx::__aligned_membuf"*, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%_M_storage = getelementptr inbounds %"struct.__gnu_cxx::__aligned_membuf", %"struct.__gnu_cxx::__aligned_membuf"* %this1, i32 0, i32 0
%0 = bitcast [16 x i8]* %_M_storage to i8*
ret i8* %0
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_create_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESE_IJEEEEEPSt13_Rb_tree_nodeIS3_EDpOT_(%"class.std::_Rb_tree"* %this, %"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %__args, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %__args1, %"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %__args3) #0 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__args.addr = alloca %"struct.std::piecewise_construct_t"*, align 8
%__args.addr2 = alloca %"class.std::tuple"*, align 8
%__args.addr4 = alloca %"class.std::tuple.0"*, align 8
%__tmp = alloca %"struct.std::_Rb_tree_node"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store %"struct.std::piecewise_construct_t"* %__args, %"struct.std::piecewise_construct_t"** %__args.addr, align 8
store %"class.std::tuple"* %__args1, %"class.std::tuple"** %__args.addr2, align 8
store %"class.std::tuple.0"* %__args3, %"class.std::tuple.0"** %__args.addr4, align 8
%this5 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%call = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_get_nodeEv(%"class.std::_Rb_tree"* %this5)
store %"struct.std::_Rb_tree_node"* %call, %"struct.std::_Rb_tree_node"** %__tmp, align 8
%0 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__tmp, align 8
%1 = load %"struct.std::piecewise_construct_t"*, %"struct.std::piecewise_construct_t"** %__args.addr, align 8
%call6 = call nonnull align 1 dereferenceable(1) %"struct.std::piecewise_construct_t"* @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(%"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %1) #12
%2 = load %"class.std::tuple"*, %"class.std::tuple"** %__args.addr2, align 8
%call7 = call nonnull align 8 dereferenceable(8) %"class.std::tuple"* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(%"class.std::tuple"* nonnull align 8 dereferenceable(8) %2) #12
%3 = load %"class.std::tuple.0"*, %"class.std::tuple.0"** %__args.addr4, align 8
%call8 = call nonnull align 1 dereferenceable(1) %"class.std::tuple.0"* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(%"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %3) #12
call void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE17_M_construct_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESE_IJEEEEEvPSt13_Rb_tree_nodeIS3_EDpOT_(%"class.std::_Rb_tree"* %this5, %"struct.std::_Rb_tree_node"* %0, %"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %call6, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %call7, %"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %call8)
%4 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__tmp, align 8
ret %"struct.std::_Rb_tree_node"* %4
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 1 dereferenceable(1) %"struct.std::piecewise_construct_t"* @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(%"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %__t) #3 comdat {
entry:
%__t.addr = alloca %"struct.std::piecewise_construct_t"*, align 8
store %"struct.std::piecewise_construct_t"* %__t, %"struct.std::piecewise_construct_t"** %__t.addr, align 8
%0 = load %"struct.std::piecewise_construct_t"*, %"struct.std::piecewise_construct_t"** %__t.addr, align 8
ret %"struct.std::piecewise_construct_t"* %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) %"class.std::tuple"* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(%"class.std::tuple"* nonnull align 8 dereferenceable(8) %__t) #3 comdat {
entry:
%__t.addr = alloca %"class.std::tuple"*, align 8
store %"class.std::tuple"* %__t, %"class.std::tuple"** %__t.addr, align 8
%0 = load %"class.std::tuple"*, %"class.std::tuple"** %__t.addr, align 8
ret %"class.std::tuple"* %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 1 dereferenceable(1) %"class.std::tuple.0"* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(%"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %__t) #3 comdat {
entry:
%__t.addr = alloca %"class.std::tuple.0"*, align 8
store %"class.std::tuple.0"* %__t, %"class.std::tuple.0"** %__t.addr, align 8
%0 = load %"class.std::tuple.0"*, %"class.std::tuple.0"** %__t.addr, align 8
ret %"class.std::tuple.0"* %0
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS3_ERS1_(%"class.std::_Rb_tree"* %this, %"struct.std::_Rb_tree_node_base"* %__position.coerce, i32* nonnull align 4 dereferenceable(4) %__k) #0 comdat align 2 {
entry:
%retval = alloca %"struct.std::pair.1", align 8
%__position = alloca %"struct.std::_Rb_tree_const_iterator", align 8
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__k.addr = alloca i32*, align 8
%__pos = alloca %"struct.std::_Rb_tree_iterator", align 8
%ref.tmp = alloca %"struct.std::_Rb_tree_node_base"*, align 8
%__before = alloca %"struct.std::_Rb_tree_iterator", align 8
%ref.tmp37 = alloca %"struct.std::_Rb_tree_node_base"*, align 8
%__after = alloca %"struct.std::_Rb_tree_iterator", align 8
%ref.tmp55 = alloca %"struct.std::_Rb_tree_node_base"*, align 8
%ref.tmp69 = alloca %"struct.std::_Rb_tree_node_base"*, align 8
%ref.tmp78 = alloca %"struct.std::_Rb_tree_node_base"*, align 8
%coerce.dive = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", %"struct.std::_Rb_tree_const_iterator"* %__position, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %__position.coerce, %"struct.std::_Rb_tree_node_base"** %coerce.dive, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store i32* %__k, i32** %__k.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%call = call %"struct.std::_Rb_tree_node_base"* @_ZNKSt23_Rb_tree_const_iteratorISt4pairIKiPcEE13_M_const_castEv(%"struct.std::_Rb_tree_const_iterator"* %__position) #12
%coerce.dive2 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__pos, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %call, %"struct.std::_Rb_tree_node_base"** %coerce.dive2, align 8
%_M_node = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__pos, i32 0, i32 0
%0 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node, align 8
%call3 = call %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_M_endEv(%"class.std::_Rb_tree"* %this1) #12
%cmp = icmp eq %"struct.std::_Rb_tree_node_base"* %0, %call3
br i1 %cmp, label %if.then, label %if.else12
if.then: ; preds = %entry
%call4 = call i64 @_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE4sizeEv(%"class.std::_Rb_tree"* %this1) #12
%cmp5 = icmp ugt i64 %call4, 0
br i1 %cmp5, label %land.lhs.true, label %if.else
land.lhs.true: ; preds = %if.then
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%1 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl to %"struct.std::_Rb_tree_key_compare"*
%_M_key_compare = getelementptr inbounds %"struct.std::_Rb_tree_key_compare", %"struct.std::_Rb_tree_key_compare"* %1, i32 0, i32 0
%call6 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_rightmostEv(%"class.std::_Rb_tree"* %this1) #12
%2 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %call6, align 8
%call7 = call nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %2)
%3 = load i32*, i32** %__k.addr, align 8
%call8 = call zeroext i1 @_ZNKSt4lessIiEclERKiS2_(%"struct.std::less"* %_M_key_compare, i32* nonnull align 4 dereferenceable(4) %call7, i32* nonnull align 4 dereferenceable(4) %3)
br i1 %call8, label %if.then9, label %if.else
if.then9: ; preds = %land.lhs.true
store %"struct.std::_Rb_tree_node_base"* null, %"struct.std::_Rb_tree_node_base"** %ref.tmp, align 8
%call10 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_rightmostEv(%"class.std::_Rb_tree"* %this1) #12
call void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_Lb1EEERKS1_OT_(%"struct.std::pair.1"* %retval, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %ref.tmp, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %call10)
br label %return
if.else: ; preds = %land.lhs.true, %if.then
%4 = load i32*, i32** %__k.addr, align 8
%call11 = call { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE24_M_get_insert_unique_posERS1_(%"class.std::_Rb_tree"* %this1, i32* nonnull align 4 dereferenceable(4) %4)
%5 = bitcast %"struct.std::pair.1"* %retval to { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }*
%6 = getelementptr inbounds { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }, { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }* %5, i32 0, i32 0
%7 = extractvalue { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } %call11, 0
store %"struct.std::_Rb_tree_node_base"* %7, %"struct.std::_Rb_tree_node_base"** %6, align 8
%8 = getelementptr inbounds { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }, { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }* %5, i32 0, i32 1
%9 = extractvalue { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } %call11, 1
store %"struct.std::_Rb_tree_node_base"* %9, %"struct.std::_Rb_tree_node_base"** %8, align 8
br label %return
if.else12: ; preds = %entry
%_M_impl13 = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%10 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl13 to %"struct.std::_Rb_tree_key_compare"*
%_M_key_compare14 = getelementptr inbounds %"struct.std::_Rb_tree_key_compare", %"struct.std::_Rb_tree_key_compare"* %10, i32 0, i32 0
%11 = load i32*, i32** %__k.addr, align 8
%_M_node15 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__pos, i32 0, i32 0
%12 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node15, align 8
%call16 = call nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %12)
%call17 = call zeroext i1 @_ZNKSt4lessIiEclERKiS2_(%"struct.std::less"* %_M_key_compare14, i32* nonnull align 4 dereferenceable(4) %11, i32* nonnull align 4 dereferenceable(4) %call16)
br i1 %call17, label %if.then18, label %if.else44
if.then18: ; preds = %if.else12
%13 = bitcast %"struct.std::_Rb_tree_iterator"* %__before to i8*
%14 = bitcast %"struct.std::_Rb_tree_iterator"* %__pos to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %13, i8* align 8 %14, i64 8, i1 false)
%_M_node19 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__pos, i32 0, i32 0
%15 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node19, align 8
%call20 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_leftmostEv(%"class.std::_Rb_tree"* %this1) #12
%16 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %call20, align 8
%cmp21 = icmp eq %"struct.std::_Rb_tree_node_base"* %15, %16
br i1 %cmp21, label %if.then22, label %if.else25
if.then22: ; preds = %if.then18
%call23 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_leftmostEv(%"class.std::_Rb_tree"* %this1) #12
%call24 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_leftmostEv(%"class.std::_Rb_tree"* %this1) #12
call void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_S4_Lb1EEEOT_OT0_(%"struct.std::pair.1"* %retval, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %call23, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %call24)
br label %return
if.else25: ; preds = %if.then18
%_M_impl26 = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%17 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl26 to %"struct.std::_Rb_tree_key_compare"*
%_M_key_compare27 = getelementptr inbounds %"struct.std::_Rb_tree_key_compare", %"struct.std::_Rb_tree_key_compare"* %17, i32 0, i32 0
%call28 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_iterator"* @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEmmEv(%"struct.std::_Rb_tree_iterator"* %__before) #12
%_M_node29 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %call28, i32 0, i32 0
%18 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node29, align 8
%call30 = call nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %18)
%19 = load i32*, i32** %__k.addr, align 8
%call31 = call zeroext i1 @_ZNKSt4lessIiEclERKiS2_(%"struct.std::less"* %_M_key_compare27, i32* nonnull align 4 dereferenceable(4) %call30, i32* nonnull align 4 dereferenceable(4) %19)
br i1 %call31, label %if.then32, label %if.else42
if.then32: ; preds = %if.else25
%_M_node33 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__before, i32 0, i32 0
%20 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node33, align 8
%call34 = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %20) #12
%cmp35 = icmp eq %"struct.std::_Rb_tree_node"* %call34, null
br i1 %cmp35, label %if.then36, label %if.else39
if.then36: ; preds = %if.then32
store %"struct.std::_Rb_tree_node_base"* null, %"struct.std::_Rb_tree_node_base"** %ref.tmp37, align 8
%_M_node38 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__before, i32 0, i32 0
call void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_Lb1EEERKS1_OT_(%"struct.std::pair.1"* %retval, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %ref.tmp37, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %_M_node38)
br label %return
if.else39: ; preds = %if.then32
%_M_node40 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__pos, i32 0, i32 0
%_M_node41 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__pos, i32 0, i32 0
call void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_S4_Lb1EEEOT_OT0_(%"struct.std::pair.1"* %retval, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %_M_node40, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %_M_node41)
br label %return
if.else42: ; preds = %if.else25
%21 = load i32*, i32** %__k.addr, align 8
%call43 = call { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE24_M_get_insert_unique_posERS1_(%"class.std::_Rb_tree"* %this1, i32* nonnull align 4 dereferenceable(4) %21)
%22 = bitcast %"struct.std::pair.1"* %retval to { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }*
%23 = getelementptr inbounds { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }, { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }* %22, i32 0, i32 0
%24 = extractvalue { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } %call43, 0
store %"struct.std::_Rb_tree_node_base"* %24, %"struct.std::_Rb_tree_node_base"** %23, align 8
%25 = getelementptr inbounds { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }, { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }* %22, i32 0, i32 1
%26 = extractvalue { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } %call43, 1
store %"struct.std::_Rb_tree_node_base"* %26, %"struct.std::_Rb_tree_node_base"** %25, align 8
br label %return
if.else44: ; preds = %if.else12
%_M_impl45 = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%27 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl45 to %"struct.std::_Rb_tree_key_compare"*
%_M_key_compare46 = getelementptr inbounds %"struct.std::_Rb_tree_key_compare", %"struct.std::_Rb_tree_key_compare"* %27, i32 0, i32 0
%_M_node47 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__pos, i32 0, i32 0
%28 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node47, align 8
%call48 = call nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %28)
%29 = load i32*, i32** %__k.addr, align 8
%call49 = call zeroext i1 @_ZNKSt4lessIiEclERKiS2_(%"struct.std::less"* %_M_key_compare46, i32* nonnull align 4 dereferenceable(4) %call48, i32* nonnull align 4 dereferenceable(4) %29)
br i1 %call49, label %if.then50, label %if.else76
if.then50: ; preds = %if.else44
%30 = bitcast %"struct.std::_Rb_tree_iterator"* %__after to i8*
%31 = bitcast %"struct.std::_Rb_tree_iterator"* %__pos to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %30, i8* align 8 %31, i64 8, i1 false)
%_M_node51 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__pos, i32 0, i32 0
%32 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node51, align 8
%call52 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_rightmostEv(%"class.std::_Rb_tree"* %this1) #12
%33 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %call52, align 8
%cmp53 = icmp eq %"struct.std::_Rb_tree_node_base"* %32, %33
br i1 %cmp53, label %if.then54, label %if.else57
if.then54: ; preds = %if.then50
store %"struct.std::_Rb_tree_node_base"* null, %"struct.std::_Rb_tree_node_base"** %ref.tmp55, align 8
%call56 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_rightmostEv(%"class.std::_Rb_tree"* %this1) #12
call void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_Lb1EEERKS1_OT_(%"struct.std::pair.1"* %retval, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %ref.tmp55, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %call56)
br label %return
if.else57: ; preds = %if.then50
%_M_impl58 = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%34 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl58 to %"struct.std::_Rb_tree_key_compare"*
%_M_key_compare59 = getelementptr inbounds %"struct.std::_Rb_tree_key_compare", %"struct.std::_Rb_tree_key_compare"* %34, i32 0, i32 0
%35 = load i32*, i32** %__k.addr, align 8
%call60 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_iterator"* @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEppEv(%"struct.std::_Rb_tree_iterator"* %__after) #12
%_M_node61 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %call60, i32 0, i32 0
%36 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node61, align 8
%call62 = call nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %36)
%call63 = call zeroext i1 @_ZNKSt4lessIiEclERKiS2_(%"struct.std::less"* %_M_key_compare59, i32* nonnull align 4 dereferenceable(4) %35, i32* nonnull align 4 dereferenceable(4) %call62)
br i1 %call63, label %if.then64, label %if.else74
if.then64: ; preds = %if.else57
%_M_node65 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__pos, i32 0, i32 0
%37 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node65, align 8
%call66 = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %37) #12
%cmp67 = icmp eq %"struct.std::_Rb_tree_node"* %call66, null
br i1 %cmp67, label %if.then68, label %if.else71
if.then68: ; preds = %if.then64
store %"struct.std::_Rb_tree_node_base"* null, %"struct.std::_Rb_tree_node_base"** %ref.tmp69, align 8
%_M_node70 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__pos, i32 0, i32 0
call void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_Lb1EEERKS1_OT_(%"struct.std::pair.1"* %retval, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %ref.tmp69, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %_M_node70)
br label %return
if.else71: ; preds = %if.then64
%_M_node72 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__after, i32 0, i32 0
%_M_node73 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__after, i32 0, i32 0
call void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_S4_Lb1EEEOT_OT0_(%"struct.std::pair.1"* %retval, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %_M_node72, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %_M_node73)
br label %return
if.else74: ; preds = %if.else57
%38 = load i32*, i32** %__k.addr, align 8
%call75 = call { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE24_M_get_insert_unique_posERS1_(%"class.std::_Rb_tree"* %this1, i32* nonnull align 4 dereferenceable(4) %38)
%39 = bitcast %"struct.std::pair.1"* %retval to { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }*
%40 = getelementptr inbounds { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }, { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }* %39, i32 0, i32 0
%41 = extractvalue { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } %call75, 0
store %"struct.std::_Rb_tree_node_base"* %41, %"struct.std::_Rb_tree_node_base"** %40, align 8
%42 = getelementptr inbounds { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }, { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }* %39, i32 0, i32 1
%43 = extractvalue { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } %call75, 1
store %"struct.std::_Rb_tree_node_base"* %43, %"struct.std::_Rb_tree_node_base"** %42, align 8
br label %return
if.else76: ; preds = %if.else44
%_M_node77 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__pos, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* null, %"struct.std::_Rb_tree_node_base"** %ref.tmp78, align 8
call void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_Lb1EEEOT_RKS1_(%"struct.std::pair.1"* %retval, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %_M_node77, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %ref.tmp78)
br label %return
return: ; preds = %if.else76, %if.else74, %if.else71, %if.then68, %if.then54, %if.else42, %if.else39, %if.then36, %if.then22, %if.else, %if.then9
%44 = bitcast %"struct.std::pair.1"* %retval to { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }*
%45 = load { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }, { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }* %44, align 8
ret { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } %45
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_insert_nodeEPSt18_Rb_tree_node_baseSB_PSt13_Rb_tree_nodeIS3_E(%"class.std::_Rb_tree"* %this, %"struct.std::_Rb_tree_node_base"* %__x, %"struct.std::_Rb_tree_node_base"* %__p, %"struct.std::_Rb_tree_node"* %__z) #0 comdat align 2 {
entry:
%retval = alloca %"struct.std::_Rb_tree_iterator", align 8
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__x.addr = alloca %"struct.std::_Rb_tree_node_base"*, align 8
%__p.addr = alloca %"struct.std::_Rb_tree_node_base"*, align 8
%__z.addr = alloca %"struct.std::_Rb_tree_node"*, align 8
%__insert_left = alloca i8, align 1
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store %"struct.std::_Rb_tree_node_base"* %__x, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
store %"struct.std::_Rb_tree_node_base"* %__p, %"struct.std::_Rb_tree_node_base"** %__p.addr, align 8
store %"struct.std::_Rb_tree_node"* %__z, %"struct.std::_Rb_tree_node"** %__z.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%0 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
%cmp = icmp ne %"struct.std::_Rb_tree_node_base"* %0, null
br i1 %cmp, label %lor.end, label %lor.lhs.false
lor.lhs.false: ; preds = %entry
%1 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__p.addr, align 8
%call = call %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_M_endEv(%"class.std::_Rb_tree"* %this1) #12
%cmp2 = icmp eq %"struct.std::_Rb_tree_node_base"* %1, %call
br i1 %cmp2, label %lor.end, label %lor.rhs
lor.rhs: ; preds = %lor.lhs.false
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%2 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl to %"struct.std::_Rb_tree_key_compare"*
%_M_key_compare = getelementptr inbounds %"struct.std::_Rb_tree_key_compare", %"struct.std::_Rb_tree_key_compare"* %2, i32 0, i32 0
%3 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__z.addr, align 8
%call3 = call nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt13_Rb_tree_nodeIS3_E(%"struct.std::_Rb_tree_node"* %3)
%4 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__p.addr, align 8
%call4 = call nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %4)
%call5 = call zeroext i1 @_ZNKSt4lessIiEclERKiS2_(%"struct.std::less"* %_M_key_compare, i32* nonnull align 4 dereferenceable(4) %call3, i32* nonnull align 4 dereferenceable(4) %call4)
br label %lor.end
lor.end: ; preds = %lor.rhs, %lor.lhs.false, %entry
%5 = phi i1 [ true, %lor.lhs.false ], [ true, %entry ], [ %call5, %lor.rhs ]
%frombool = zext i1 %5 to i8
store i8 %frombool, i8* %__insert_left, align 1
%6 = load i8, i8* %__insert_left, align 1
%tobool = trunc i8 %6 to i1
%7 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__z.addr, align 8
%8 = bitcast %"struct.std::_Rb_tree_node"* %7 to %"struct.std::_Rb_tree_node_base"*
%9 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__p.addr, align 8
%_M_impl6 = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%10 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl6 to i8*
%add.ptr = getelementptr inbounds i8, i8* %10, i64 8
%11 = bitcast i8* %add.ptr to %"struct.std::_Rb_tree_header"*
%_M_header = getelementptr inbounds %"struct.std::_Rb_tree_header", %"struct.std::_Rb_tree_header"* %11, i32 0, i32 0
call void @_ZSt29_Rb_tree_insert_and_rebalancebPSt18_Rb_tree_node_baseS0_RS_(i1 zeroext %tobool, %"struct.std::_Rb_tree_node_base"* %8, %"struct.std::_Rb_tree_node_base"* %9, %"struct.std::_Rb_tree_node_base"* nonnull align 8 dereferenceable(32) %_M_header) #12
%_M_impl7 = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%12 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl7 to i8*
%add.ptr8 = getelementptr inbounds i8, i8* %12, i64 8
%13 = bitcast i8* %add.ptr8 to %"struct.std::_Rb_tree_header"*
%_M_node_count = getelementptr inbounds %"struct.std::_Rb_tree_header", %"struct.std::_Rb_tree_header"* %13, i32 0, i32 1
%14 = load i64, i64* %_M_node_count, align 8
%inc = add i64 %14, 1
store i64 %inc, i64* %_M_node_count, align 8
%15 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__z.addr, align 8
%16 = bitcast %"struct.std::_Rb_tree_node"* %15 to %"struct.std::_Rb_tree_node_base"*
call void @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC2EPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_iterator"* %retval, %"struct.std::_Rb_tree_node_base"* %16) #12
%coerce.dive = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
%17 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %coerce.dive, align 8
ret %"struct.std::_Rb_tree_node_base"* %17
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_drop_nodeEPSt13_Rb_tree_nodeIS3_E(%"class.std::_Rb_tree"* %this, %"struct.std::_Rb_tree_node"* %__p) #3 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__p.addr = alloca %"struct.std::_Rb_tree_node"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store %"struct.std::_Rb_tree_node"* %__p, %"struct.std::_Rb_tree_node"** %__p.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%0 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__p.addr, align 8
call void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE15_M_destroy_nodeEPSt13_Rb_tree_nodeIS3_E(%"class.std::_Rb_tree"* %this1, %"struct.std::_Rb_tree_node"* %0) #12
%1 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__p.addr, align 8
call void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_put_nodeEPSt13_Rb_tree_nodeIS3_E(%"class.std::_Rb_tree"* %this1, %"struct.std::_Rb_tree_node"* %1) #12
ret void
}
declare dso_local void @__cxa_rethrow()
declare dso_local void @__cxa_end_catch()
; Function Attrs: cold noreturn nounwind
declare void @llvm.trap() #6
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_get_nodeEv(%"class.std::_Rb_tree"* %this) #0 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%call = call nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE21_M_get_Node_allocatorEv(%"class.std::_Rb_tree"* %this1) #12
%call2 = call %"struct.std::_Rb_tree_node"* @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE8allocateERS6_m(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %call, i64 1)
ret %"struct.std::_Rb_tree_node"* %call2
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE17_M_construct_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESE_IJEEEEEvPSt13_Rb_tree_nodeIS3_EDpOT_(%"class.std::_Rb_tree"* %this, %"struct.std::_Rb_tree_node"* %__node, %"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %__args, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %__args1, %"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %__args3) #0 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__node.addr = alloca %"struct.std::_Rb_tree_node"*, align 8
%__args.addr = alloca %"struct.std::piecewise_construct_t"*, align 8
%__args.addr2 = alloca %"class.std::tuple"*, align 8
%__args.addr4 = alloca %"class.std::tuple.0"*, align 8
%exn.slot = alloca i8*, align 8
%ehselector.slot = alloca i32, align 4
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store %"struct.std::_Rb_tree_node"* %__node, %"struct.std::_Rb_tree_node"** %__node.addr, align 8
store %"struct.std::piecewise_construct_t"* %__args, %"struct.std::piecewise_construct_t"** %__args.addr, align 8
store %"class.std::tuple"* %__args1, %"class.std::tuple"** %__args.addr2, align 8
store %"class.std::tuple.0"* %__args3, %"class.std::tuple.0"** %__args.addr4, align 8
%this5 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%0 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__node.addr, align 8
%1 = bitcast %"struct.std::_Rb_tree_node"* %0 to i8*
%2 = bitcast i8* %1 to %"struct.std::_Rb_tree_node"*
%call = call nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE21_M_get_Node_allocatorEv(%"class.std::_Rb_tree"* %this5) #12
%3 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__node.addr, align 8
%call6 = invoke %"struct.std::pair"* @_ZNSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(%"struct.std::_Rb_tree_node"* %3)
to label %invoke.cont unwind label %lpad
invoke.cont: ; preds = %entry
%4 = load %"struct.std::piecewise_construct_t"*, %"struct.std::piecewise_construct_t"** %__args.addr, align 8
%call7 = call nonnull align 1 dereferenceable(1) %"struct.std::piecewise_construct_t"* @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(%"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %4) #12
%5 = load %"class.std::tuple"*, %"class.std::tuple"** %__args.addr2, align 8
%call8 = call nonnull align 8 dereferenceable(8) %"class.std::tuple"* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(%"class.std::tuple"* nonnull align 8 dereferenceable(8) %5) #12
%6 = load %"class.std::tuple.0"*, %"class.std::tuple.0"** %__args.addr4, align 8
%call9 = call nonnull align 1 dereferenceable(1) %"class.std::tuple.0"* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(%"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %6) #12
invoke void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE9constructIS4_JRKSt21piecewise_construct_tSt5tupleIJOiEESC_IJEEEEEvRS6_PT_DpOT0_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %call, %"struct.std::pair"* %call6, %"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %call7, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %call8, %"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %call9)
to label %invoke.cont10 unwind label %lpad
invoke.cont10: ; preds = %invoke.cont
br label %try.cont
lpad: ; preds = %invoke.cont, %entry
%7 = landingpad { i8*, i32 }
catch i8* null
%8 = extractvalue { i8*, i32 } %7, 0
store i8* %8, i8** %exn.slot, align 8
%9 = extractvalue { i8*, i32 } %7, 1
store i32 %9, i32* %ehselector.slot, align 4
br label %catch
catch: ; preds = %lpad
%exn = load i8*, i8** %exn.slot, align 8
%10 = call i8* @__cxa_begin_catch(i8* %exn) #12
%11 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__node.addr, align 8
%12 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__node.addr, align 8
call void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_put_nodeEPSt13_Rb_tree_nodeIS3_E(%"class.std::_Rb_tree"* %this5, %"struct.std::_Rb_tree_node"* %12) #12
invoke void @__cxa_rethrow() #14
to label %unreachable unwind label %lpad11
lpad11: ; preds = %catch
%13 = landingpad { i8*, i32 }
cleanup
%14 = extractvalue { i8*, i32 } %13, 0
store i8* %14, i8** %exn.slot, align 8
%15 = extractvalue { i8*, i32 } %13, 1
store i32 %15, i32* %ehselector.slot, align 4
invoke void @__cxa_end_catch()
to label %invoke.cont12 unwind label %terminate.lpad
invoke.cont12: ; preds = %lpad11
br label %eh.resume
try.cont: ; preds = %invoke.cont10
ret void
eh.resume: ; preds = %invoke.cont12
%exn13 = load i8*, i8** %exn.slot, align 8
%sel = load i32, i32* %ehselector.slot, align 4
%lpad.val = insertvalue { i8*, i32 } undef, i8* %exn13, 0
%lpad.val14 = insertvalue { i8*, i32 } %lpad.val, i32 %sel, 1
resume { i8*, i32 } %lpad.val14
terminate.lpad: ; preds = %lpad11
%16 = landingpad { i8*, i32 }
catch i8* null
%17 = extractvalue { i8*, i32 } %16, 0
call void @__clang_call_terminate(i8* %17) #13
unreachable
unreachable: ; preds = %catch
unreachable
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node"* @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE8allocateERS6_m(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a, i64 %__n) #0 comdat align 2 {
entry:
%__a.addr = alloca %"class.std::allocator"*, align 8
%__n.addr = alloca i64, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
store i64 %__n, i64* %__n.addr, align 8
%0 = load %"class.std::allocator"*, %"class.std::allocator"** %__a.addr, align 8
%1 = bitcast %"class.std::allocator"* %0 to %"class.__gnu_cxx::new_allocator"*
%2 = load i64, i64* %__n.addr, align 8
%call = call %"struct.std::_Rb_tree_node"* @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE8allocateEmPKv(%"class.__gnu_cxx::new_allocator"* %1, i64 %2, i8* null)
ret %"struct.std::_Rb_tree_node"* %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE21_M_get_Node_allocatorEv(%"class.std::_Rb_tree"* %this) #3 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%0 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl to %"class.std::allocator"*
ret %"class.std::allocator"* %0
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node"* @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE8allocateEmPKv(%"class.__gnu_cxx::new_allocator"* %this, i64 %__n, i8* %0) #0 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
%__n.addr = alloca i64, align 8
%.addr = alloca i8*, align 8
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
store i64 %__n, i64* %__n.addr, align 8
store i8* %0, i8** %.addr, align 8
%this1 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
%1 = load i64, i64* %__n.addr, align 8
%call = call i64 @_ZNK9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE11_M_max_sizeEv(%"class.__gnu_cxx::new_allocator"* %this1) #12
%cmp = icmp ugt i64 %1, %call
br i1 %cmp, label %if.then, label %if.end4
if.then: ; preds = %entry
%2 = load i64, i64* %__n.addr, align 8
%cmp2 = icmp ugt i64 %2, 384307168202282325
br i1 %cmp2, label %if.then3, label %if.end
if.then3: ; preds = %if.then
call void @_ZSt28__throw_bad_array_new_lengthv() #14
unreachable
if.end: ; preds = %if.then
call void @_ZSt17__throw_bad_allocv() #14
unreachable
if.end4: ; preds = %entry
%3 = load i64, i64* %__n.addr, align 8
%mul = mul i64 %3, 48
%call5 = call noalias nonnull i8* @_Znwm(i64 %mul) #15
%4 = bitcast i8* %call5 to %"struct.std::_Rb_tree_node"*
ret %"struct.std::_Rb_tree_node"* %4
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i64 @_ZNK9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE11_M_max_sizeEv(%"class.__gnu_cxx::new_allocator"* %this) #3 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
%this1 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
ret i64 192153584101141162
}
; Function Attrs: noreturn
declare dso_local void @_ZSt28__throw_bad_array_new_lengthv() #7
; Function Attrs: noreturn
declare dso_local void @_ZSt17__throw_bad_allocv() #7
; Function Attrs: nobuiltin allocsize(0)
declare dso_local nonnull i8* @_Znwm(i64) #8
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE9constructIS4_JRKSt21piecewise_construct_tSt5tupleIJOiEESC_IJEEEEEvRS6_PT_DpOT0_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a, %"struct.std::pair"* %__p, %"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %__args, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %__args1, %"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %__args3) #0 comdat align 2 {
entry:
%__a.addr = alloca %"class.std::allocator"*, align 8
%__p.addr = alloca %"struct.std::pair"*, align 8
%__args.addr = alloca %"struct.std::piecewise_construct_t"*, align 8
%__args.addr2 = alloca %"class.std::tuple"*, align 8
%__args.addr4 = alloca %"class.std::tuple.0"*, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
store %"struct.std::pair"* %__p, %"struct.std::pair"** %__p.addr, align 8
store %"struct.std::piecewise_construct_t"* %__args, %"struct.std::piecewise_construct_t"** %__args.addr, align 8
store %"class.std::tuple"* %__args1, %"class.std::tuple"** %__args.addr2, align 8
store %"class.std::tuple.0"* %__args3, %"class.std::tuple.0"** %__args.addr4, align 8
%0 = load %"class.std::allocator"*, %"class.std::allocator"** %__a.addr, align 8
%1 = bitcast %"class.std::allocator"* %0 to %"class.__gnu_cxx::new_allocator"*
%2 = load %"struct.std::pair"*, %"struct.std::pair"** %__p.addr, align 8
%3 = load %"struct.std::piecewise_construct_t"*, %"struct.std::piecewise_construct_t"** %__args.addr, align 8
%call = call nonnull align 1 dereferenceable(1) %"struct.std::piecewise_construct_t"* @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(%"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %3) #12
%4 = load %"class.std::tuple"*, %"class.std::tuple"** %__args.addr2, align 8
%call5 = call nonnull align 8 dereferenceable(8) %"class.std::tuple"* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(%"class.std::tuple"* nonnull align 8 dereferenceable(8) %4) #12
%5 = load %"class.std::tuple.0"*, %"class.std::tuple.0"** %__args.addr4, align 8
%call6 = call nonnull align 1 dereferenceable(1) %"class.std::tuple.0"* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(%"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %5) #12
call void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE9constructIS5_JRKSt21piecewise_construct_tSt5tupleIJOiEESC_IJEEEEEvPT_DpOT0_(%"class.__gnu_cxx::new_allocator"* %1, %"struct.std::pair"* %2, %"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %call, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %call5, %"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %call6)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_put_nodeEPSt13_Rb_tree_nodeIS3_E(%"class.std::_Rb_tree"* %this, %"struct.std::_Rb_tree_node"* %__p) #3 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__p.addr = alloca %"struct.std::_Rb_tree_node"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store %"struct.std::_Rb_tree_node"* %__p, %"struct.std::_Rb_tree_node"** %__p.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%call = call nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE21_M_get_Node_allocatorEv(%"class.std::_Rb_tree"* %this1) #12
%0 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__p.addr, align 8
invoke void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE10deallocateERS6_PS5_m(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %call, %"struct.std::_Rb_tree_node"* %0, i64 1)
to label %invoke.cont unwind label %terminate.lpad
invoke.cont: ; preds = %entry
ret void
terminate.lpad: ; preds = %entry
%1 = landingpad { i8*, i32 }
catch i8* null
%2 = extractvalue { i8*, i32 } %1, 0
call void @__clang_call_terminate(i8* %2) #13
unreachable
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE9constructIS5_JRKSt21piecewise_construct_tSt5tupleIJOiEESC_IJEEEEEvPT_DpOT0_(%"class.__gnu_cxx::new_allocator"* %this, %"struct.std::pair"* %__p, %"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %__args, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %__args1, %"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %__args3) #0 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
%__p.addr = alloca %"struct.std::pair"*, align 8
%__args.addr = alloca %"struct.std::piecewise_construct_t"*, align 8
%__args.addr2 = alloca %"class.std::tuple"*, align 8
%__args.addr4 = alloca %"class.std::tuple.0"*, align 8
%agg.tmp = alloca %"struct.std::piecewise_construct_t", align 1
%agg.tmp6 = alloca %"class.std::tuple", align 8
%agg.tmp8 = alloca %"class.std::tuple.0", align 1
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
store %"struct.std::pair"* %__p, %"struct.std::pair"** %__p.addr, align 8
store %"struct.std::piecewise_construct_t"* %__args, %"struct.std::piecewise_construct_t"** %__args.addr, align 8
store %"class.std::tuple"* %__args1, %"class.std::tuple"** %__args.addr2, align 8
store %"class.std::tuple.0"* %__args3, %"class.std::tuple.0"** %__args.addr4, align 8
%this5 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
%0 = load %"struct.std::pair"*, %"struct.std::pair"** %__p.addr, align 8
%1 = bitcast %"struct.std::pair"* %0 to i8*
%2 = bitcast i8* %1 to %"struct.std::pair"*
%3 = load %"struct.std::piecewise_construct_t"*, %"struct.std::piecewise_construct_t"** %__args.addr, align 8
%call = call nonnull align 1 dereferenceable(1) %"struct.std::piecewise_construct_t"* @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(%"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %3) #12
%4 = load %"class.std::tuple"*, %"class.std::tuple"** %__args.addr2, align 8
%call7 = call nonnull align 8 dereferenceable(8) %"class.std::tuple"* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(%"class.std::tuple"* nonnull align 8 dereferenceable(8) %4) #12
call void @_ZNSt5tupleIJOiEEC2EOS1_(%"class.std::tuple"* %agg.tmp6, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %call7) #12
%5 = load %"class.std::tuple.0"*, %"class.std::tuple.0"** %__args.addr4, align 8
%call9 = call nonnull align 1 dereferenceable(1) %"class.std::tuple.0"* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(%"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %5) #12
call void @_ZNSt4pairIKiPcEC2IJOiEJEEESt21piecewise_construct_tSt5tupleIJDpT_EES6_IJDpT0_EE(%"struct.std::pair"* %2, %"class.std::tuple"* %agg.tmp6)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt5tupleIJOiEEC2EOS1_(%"class.std::tuple"* %this, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %0) unnamed_addr #3 comdat align 2 {
entry:
%this.addr = alloca %"class.std::tuple"*, align 8
%.addr = alloca %"class.std::tuple"*, align 8
store %"class.std::tuple"* %this, %"class.std::tuple"** %this.addr, align 8
store %"class.std::tuple"* %0, %"class.std::tuple"** %.addr, align 8
%this1 = load %"class.std::tuple"*, %"class.std::tuple"** %this.addr, align 8
%1 = bitcast %"class.std::tuple"* %this1 to %"struct.std::_Tuple_impl"*
%2 = load %"class.std::tuple"*, %"class.std::tuple"** %.addr, align 8
%3 = bitcast %"class.std::tuple"* %2 to %"struct.std::_Tuple_impl"*
call void @_ZNSt11_Tuple_implILm0EJOiEEC2EOS1_(%"struct.std::_Tuple_impl"* %1, %"struct.std::_Tuple_impl"* nonnull align 8 dereferenceable(8) %3) #12
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt4pairIKiPcEC2IJOiEJEEESt21piecewise_construct_tSt5tupleIJDpT_EES6_IJDpT0_EE(%"struct.std::pair"* %this, %"class.std::tuple"* %__first) unnamed_addr #0 comdat align 2 {
entry:
%0 = alloca %"struct.std::piecewise_construct_t", align 1
%__second = alloca %"class.std::tuple.0", align 1
%this.addr = alloca %"struct.std::pair"*, align 8
%agg.tmp = alloca %"struct.std::_Index_tuple", align 1
%agg.tmp3 = alloca %"struct.std::_Index_tuple.4", align 1
store %"struct.std::pair"* %this, %"struct.std::pair"** %this.addr, align 8
%this2 = load %"struct.std::pair"*, %"struct.std::pair"** %this.addr, align 8
call void @_ZNSt4pairIKiPcEC2IJOiEJLm0EEJEJEEERSt5tupleIJDpT_EERS5_IJDpT1_EESt12_Index_tupleIJXspT0_EEESE_IJXspT2_EEE(%"struct.std::pair"* %this2, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %__first, %"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %__second)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt11_Tuple_implILm0EJOiEEC2EOS1_(%"struct.std::_Tuple_impl"* %this, %"struct.std::_Tuple_impl"* nonnull align 8 dereferenceable(8) %__in) unnamed_addr #3 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Tuple_impl"*, align 8
%__in.addr = alloca %"struct.std::_Tuple_impl"*, align 8
store %"struct.std::_Tuple_impl"* %this, %"struct.std::_Tuple_impl"** %this.addr, align 8
store %"struct.std::_Tuple_impl"* %__in, %"struct.std::_Tuple_impl"** %__in.addr, align 8
%this1 = load %"struct.std::_Tuple_impl"*, %"struct.std::_Tuple_impl"** %this.addr, align 8
%0 = bitcast %"struct.std::_Tuple_impl"* %this1 to %"struct.std::_Head_base"*
%1 = load %"struct.std::_Tuple_impl"*, %"struct.std::_Tuple_impl"** %__in.addr, align 8
%2 = bitcast %"struct.std::_Tuple_impl"* %1 to %"struct.std::_Head_base"*
%3 = bitcast %"struct.std::_Head_base"* %0 to i8*
%4 = bitcast %"struct.std::_Head_base"* %2 to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %3, i8* align 8 %4, i64 8, i1 false)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt4pairIKiPcEC2IJOiEJLm0EEJEJEEERSt5tupleIJDpT_EERS5_IJDpT1_EESt12_Index_tupleIJXspT0_EEESE_IJXspT2_EEE(%"struct.std::pair"* %this, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %__tuple1, %"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %__tuple2) unnamed_addr #3 comdat align 2 {
entry:
%0 = alloca %"struct.std::_Index_tuple", align 1
%1 = alloca %"struct.std::_Index_tuple.4", align 1
%this.addr = alloca %"struct.std::pair"*, align 8
%__tuple1.addr = alloca %"class.std::tuple"*, align 8
%__tuple2.addr = alloca %"class.std::tuple.0"*, align 8
store %"struct.std::pair"* %this, %"struct.std::pair"** %this.addr, align 8
store %"class.std::tuple"* %__tuple1, %"class.std::tuple"** %__tuple1.addr, align 8
store %"class.std::tuple.0"* %__tuple2, %"class.std::tuple.0"** %__tuple2.addr, align 8
%this2 = load %"struct.std::pair"*, %"struct.std::pair"** %this.addr, align 8
%2 = bitcast %"struct.std::pair"* %this2 to %"class.std::__pair_base"*
%first = getelementptr inbounds %"struct.std::pair", %"struct.std::pair"* %this2, i32 0, i32 0
%3 = load %"class.std::tuple"*, %"class.std::tuple"** %__tuple1.addr, align 8
%call = call nonnull align 4 dereferenceable(4) i32* @_ZSt3getILm0EJOiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS5_(%"class.std::tuple"* nonnull align 8 dereferenceable(8) %3) #12
%call3 = call nonnull align 4 dereferenceable(4) i32* @_ZSt7forwardIOiEOT_RNSt16remove_referenceIS1_E4typeE(i32* nonnull align 4 dereferenceable(4) %call) #12
%4 = load i32, i32* %call3, align 4
store i32 %4, i32* %first, align 8
%second = getelementptr inbounds %"struct.std::pair", %"struct.std::pair"* %this2, i32 0, i32 1
store i8* null, i8** %second, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 4 dereferenceable(4) i32* @_ZSt7forwardIOiEOT_RNSt16remove_referenceIS1_E4typeE(i32* nonnull align 4 dereferenceable(4) %__t) #3 comdat {
entry:
%__t.addr = alloca i32*, align 8
store i32* %__t, i32** %__t.addr, align 8
%0 = load i32*, i32** %__t.addr, align 8
ret i32* %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 4 dereferenceable(4) i32* @_ZSt3getILm0EJOiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS5_(%"class.std::tuple"* nonnull align 8 dereferenceable(8) %__t) #3 comdat {
entry:
%__t.addr = alloca %"class.std::tuple"*, align 8
store %"class.std::tuple"* %__t, %"class.std::tuple"** %__t.addr, align 8
%0 = load %"class.std::tuple"*, %"class.std::tuple"** %__t.addr, align 8
%1 = bitcast %"class.std::tuple"* %0 to %"struct.std::_Tuple_impl"*
%call = call nonnull align 4 dereferenceable(4) i32* @_ZSt12__get_helperILm0EOiJEERT0_RSt11_Tuple_implIXT_EJS1_DpT1_EE(%"struct.std::_Tuple_impl"* nonnull align 8 dereferenceable(8) %1) #12
ret i32* %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 4 dereferenceable(4) i32* @_ZSt12__get_helperILm0EOiJEERT0_RSt11_Tuple_implIXT_EJS1_DpT1_EE(%"struct.std::_Tuple_impl"* nonnull align 8 dereferenceable(8) %__t) #3 comdat {
entry:
%__t.addr = alloca %"struct.std::_Tuple_impl"*, align 8
store %"struct.std::_Tuple_impl"* %__t, %"struct.std::_Tuple_impl"** %__t.addr, align 8
%0 = load %"struct.std::_Tuple_impl"*, %"struct.std::_Tuple_impl"** %__t.addr, align 8
%call = call nonnull align 4 dereferenceable(4) i32* @_ZNSt11_Tuple_implILm0EJOiEE7_M_headERS1_(%"struct.std::_Tuple_impl"* nonnull align 8 dereferenceable(8) %0) #12
ret i32* %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 4 dereferenceable(4) i32* @_ZNSt11_Tuple_implILm0EJOiEE7_M_headERS1_(%"struct.std::_Tuple_impl"* nonnull align 8 dereferenceable(8) %__t) #3 comdat align 2 {
entry:
%__t.addr = alloca %"struct.std::_Tuple_impl"*, align 8
store %"struct.std::_Tuple_impl"* %__t, %"struct.std::_Tuple_impl"** %__t.addr, align 8
%0 = load %"struct.std::_Tuple_impl"*, %"struct.std::_Tuple_impl"** %__t.addr, align 8
%1 = bitcast %"struct.std::_Tuple_impl"* %0 to %"struct.std::_Head_base"*
%call = call nonnull align 4 dereferenceable(4) i32* @_ZNSt10_Head_baseILm0EOiLb0EE7_M_headERS1_(%"struct.std::_Head_base"* nonnull align 8 dereferenceable(8) %1) #12
ret i32* %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 4 dereferenceable(4) i32* @_ZNSt10_Head_baseILm0EOiLb0EE7_M_headERS1_(%"struct.std::_Head_base"* nonnull align 8 dereferenceable(8) %__b) #3 comdat align 2 {
entry:
%__b.addr = alloca %"struct.std::_Head_base"*, align 8
store %"struct.std::_Head_base"* %__b, %"struct.std::_Head_base"** %__b.addr, align 8
%0 = load %"struct.std::_Head_base"*, %"struct.std::_Head_base"** %__b.addr, align 8
%_M_head_impl = getelementptr inbounds %"struct.std::_Head_base", %"struct.std::_Head_base"* %0, i32 0, i32 0
%1 = load i32*, i32** %_M_head_impl, align 8
ret i32* %1
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE10deallocateERS6_PS5_m(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a, %"struct.std::_Rb_tree_node"* %__p, i64 %__n) #0 comdat align 2 {
entry:
%__a.addr = alloca %"class.std::allocator"*, align 8
%__p.addr = alloca %"struct.std::_Rb_tree_node"*, align 8
%__n.addr = alloca i64, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
store %"struct.std::_Rb_tree_node"* %__p, %"struct.std::_Rb_tree_node"** %__p.addr, align 8
store i64 %__n, i64* %__n.addr, align 8
%0 = load %"class.std::allocator"*, %"class.std::allocator"** %__a.addr, align 8
%1 = bitcast %"class.std::allocator"* %0 to %"class.__gnu_cxx::new_allocator"*
%2 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__p.addr, align 8
%3 = load i64, i64* %__n.addr, align 8
call void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE10deallocateEPS6_m(%"class.__gnu_cxx::new_allocator"* %1, %"struct.std::_Rb_tree_node"* %2, i64 %3)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE10deallocateEPS6_m(%"class.__gnu_cxx::new_allocator"* %this, %"struct.std::_Rb_tree_node"* %__p, i64 %__t) #3 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
%__p.addr = alloca %"struct.std::_Rb_tree_node"*, align 8
%__t.addr = alloca i64, align 8
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
store %"struct.std::_Rb_tree_node"* %__p, %"struct.std::_Rb_tree_node"** %__p.addr, align 8
store i64 %__t, i64* %__t.addr, align 8
%this1 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
%0 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__p.addr, align 8
%1 = bitcast %"struct.std::_Rb_tree_node"* %0 to i8*
call void @_ZdlPv(i8* %1) #12
ret void
}
; Function Attrs: nobuiltin nounwind
declare dso_local void @_ZdlPv(i8*) #9
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node_base"* @_ZNKSt23_Rb_tree_const_iteratorISt4pairIKiPcEE13_M_const_castEv(%"struct.std::_Rb_tree_const_iterator"* %this) #3 comdat align 2 {
entry:
%retval = alloca %"struct.std::_Rb_tree_iterator", align 8
%this.addr = alloca %"struct.std::_Rb_tree_const_iterator"*, align 8
store %"struct.std::_Rb_tree_const_iterator"* %this, %"struct.std::_Rb_tree_const_iterator"** %this.addr, align 8
%this1 = load %"struct.std::_Rb_tree_const_iterator"*, %"struct.std::_Rb_tree_const_iterator"** %this.addr, align 8
%_M_node = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", %"struct.std::_Rb_tree_const_iterator"* %this1, i32 0, i32 0
%0 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node, align 8
call void @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC2EPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_iterator"* %retval, %"struct.std::_Rb_tree_node_base"* %0) #12
%coerce.dive = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
%1 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %coerce.dive, align 8
ret %"struct.std::_Rb_tree_node_base"* %1
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i64 @_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE4sizeEv(%"class.std::_Rb_tree"* %this) #3 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%0 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl to i8*
%add.ptr = getelementptr inbounds i8, i8* %0, i64 8
%1 = bitcast i8* %add.ptr to %"struct.std::_Rb_tree_header"*
%_M_node_count = getelementptr inbounds %"struct.std::_Rb_tree_header", %"struct.std::_Rb_tree_header"* %1, i32 0, i32 1
%2 = load i64, i64* %_M_node_count, align 8
ret i64 %2
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %__x) #0 comdat align 2 {
entry:
%__x.addr = alloca %"struct.std::_Rb_tree_node_base"*, align 8
store %"struct.std::_Rb_tree_node_base"* %__x, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
%0 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
%1 = bitcast %"struct.std::_Rb_tree_node_base"* %0 to %"struct.std::_Rb_tree_node"*
%call = call nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt13_Rb_tree_nodeIS3_E(%"struct.std::_Rb_tree_node"* %1)
ret i32* %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_rightmostEv(%"class.std::_Rb_tree"* %this) #3 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%0 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl to i8*
%add.ptr = getelementptr inbounds i8, i8* %0, i64 8
%1 = bitcast i8* %add.ptr to %"struct.std::_Rb_tree_header"*
%_M_header = getelementptr inbounds %"struct.std::_Rb_tree_header", %"struct.std::_Rb_tree_header"* %1, i32 0, i32 0
%_M_right = getelementptr inbounds %"struct.std::_Rb_tree_node_base", %"struct.std::_Rb_tree_node_base"* %_M_header, i32 0, i32 3
ret %"struct.std::_Rb_tree_node_base"** %_M_right
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_Lb1EEERKS1_OT_(%"struct.std::pair.1"* %this, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %__x, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %__y) unnamed_addr #3 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::pair.1"*, align 8
%__x.addr = alloca %"struct.std::_Rb_tree_node_base"**, align 8
%__y.addr = alloca %"struct.std::_Rb_tree_node_base"**, align 8
store %"struct.std::pair.1"* %this, %"struct.std::pair.1"** %this.addr, align 8
store %"struct.std::_Rb_tree_node_base"** %__x, %"struct.std::_Rb_tree_node_base"*** %__x.addr, align 8
store %"struct.std::_Rb_tree_node_base"** %__y, %"struct.std::_Rb_tree_node_base"*** %__y.addr, align 8
%this1 = load %"struct.std::pair.1"*, %"struct.std::pair.1"** %this.addr, align 8
%0 = bitcast %"struct.std::pair.1"* %this1 to %"class.std::__pair_base.2"*
%first = getelementptr inbounds %"struct.std::pair.1", %"struct.std::pair.1"* %this1, i32 0, i32 0
%1 = load %"struct.std::_Rb_tree_node_base"**, %"struct.std::_Rb_tree_node_base"*** %__x.addr, align 8
%2 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %1, align 8
store %"struct.std::_Rb_tree_node_base"* %2, %"struct.std::_Rb_tree_node_base"** %first, align 8
%second = getelementptr inbounds %"struct.std::pair.1", %"struct.std::pair.1"* %this1, i32 0, i32 1
%3 = load %"struct.std::_Rb_tree_node_base"**, %"struct.std::_Rb_tree_node_base"*** %__y.addr, align 8
%call = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(%"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %3) #12
%4 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %call, align 8
store %"struct.std::_Rb_tree_node_base"* %4, %"struct.std::_Rb_tree_node_base"** %second, align 8
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE24_M_get_insert_unique_posERS1_(%"class.std::_Rb_tree"* %this, i32* nonnull align 4 dereferenceable(4) %__k) #0 comdat align 2 {
entry:
%retval = alloca %"struct.std::pair.1", align 8
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__k.addr = alloca i32*, align 8
%__x = alloca %"struct.std::_Rb_tree_node"*, align 8
%__y = alloca %"struct.std::_Rb_tree_node_base"*, align 8
%__comp = alloca i8, align 1
%__j = alloca %"struct.std::_Rb_tree_iterator", align 8
%ref.tmp = alloca %"struct.std::_Rb_tree_iterator", align 8
%ref.tmp20 = alloca %"struct.std::_Rb_tree_node_base"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store i32* %__k, i32** %__k.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%call = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_M_beginEv(%"class.std::_Rb_tree"* %this1) #12
store %"struct.std::_Rb_tree_node"* %call, %"struct.std::_Rb_tree_node"** %__x, align 8
%call2 = call %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_M_endEv(%"class.std::_Rb_tree"* %this1) #12
store %"struct.std::_Rb_tree_node_base"* %call2, %"struct.std::_Rb_tree_node_base"** %__y, align 8
store i8 1, i8* %__comp, align 1
br label %while.cond
while.cond: ; preds = %cond.end, %entry
%0 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x, align 8
%cmp = icmp ne %"struct.std::_Rb_tree_node"* %0, null
br i1 %cmp, label %while.body, label %while.end
while.body: ; preds = %while.cond
%1 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x, align 8
%2 = bitcast %"struct.std::_Rb_tree_node"* %1 to %"struct.std::_Rb_tree_node_base"*
store %"struct.std::_Rb_tree_node_base"* %2, %"struct.std::_Rb_tree_node_base"** %__y, align 8
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%3 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl to %"struct.std::_Rb_tree_key_compare"*
%_M_key_compare = getelementptr inbounds %"struct.std::_Rb_tree_key_compare", %"struct.std::_Rb_tree_key_compare"* %3, i32 0, i32 0
%4 = load i32*, i32** %__k.addr, align 8
%5 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x, align 8
%call3 = call nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt13_Rb_tree_nodeIS3_E(%"struct.std::_Rb_tree_node"* %5)
%call4 = call zeroext i1 @_ZNKSt4lessIiEclERKiS2_(%"struct.std::less"* %_M_key_compare, i32* nonnull align 4 dereferenceable(4) %4, i32* nonnull align 4 dereferenceable(4) %call3)
%frombool = zext i1 %call4 to i8
store i8 %frombool, i8* %__comp, align 1
%6 = load i8, i8* %__comp, align 1
%tobool = trunc i8 %6 to i1
br i1 %tobool, label %cond.true, label %cond.false
cond.true: ; preds = %while.body
%7 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x, align 8
%8 = bitcast %"struct.std::_Rb_tree_node"* %7 to %"struct.std::_Rb_tree_node_base"*
%call5 = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_S_leftEPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %8) #12
br label %cond.end
cond.false: ; preds = %while.body
%9 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x, align 8
%10 = bitcast %"struct.std::_Rb_tree_node"* %9 to %"struct.std::_Rb_tree_node_base"*
%call6 = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %10) #12
br label %cond.end
cond.end: ; preds = %cond.false, %cond.true
%cond = phi %"struct.std::_Rb_tree_node"* [ %call5, %cond.true ], [ %call6, %cond.false ]
store %"struct.std::_Rb_tree_node"* %cond, %"struct.std::_Rb_tree_node"** %__x, align 8
br label %while.cond
while.end: ; preds = %while.cond
%11 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__y, align 8
call void @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC2EPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_iterator"* %__j, %"struct.std::_Rb_tree_node_base"* %11) #12
%12 = load i8, i8* %__comp, align 1
%tobool7 = trunc i8 %12 to i1
br i1 %tobool7, label %if.then, label %if.end12
if.then: ; preds = %while.end
%call8 = call %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE5beginEv(%"class.std::_Rb_tree"* %this1) #12
%coerce.dive = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %ref.tmp, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %call8, %"struct.std::_Rb_tree_node_base"** %coerce.dive, align 8
%call9 = call zeroext i1 @_ZSteqRKSt17_Rb_tree_iteratorISt4pairIKiPcEES6_(%"struct.std::_Rb_tree_iterator"* nonnull align 8 dereferenceable(8) %__j, %"struct.std::_Rb_tree_iterator"* nonnull align 8 dereferenceable(8) %ref.tmp) #12
br i1 %call9, label %if.then10, label %if.else
if.then10: ; preds = %if.then
call void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRPSt13_Rb_tree_nodeIS_IKiPcEERS1_Lb1EEEOT_OT0_(%"struct.std::pair.1"* %retval, %"struct.std::_Rb_tree_node"** nonnull align 8 dereferenceable(8) %__x, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %__y)
br label %return
if.else: ; preds = %if.then
%call11 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_iterator"* @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEmmEv(%"struct.std::_Rb_tree_iterator"* %__j) #12
br label %if.end
if.end: ; preds = %if.else
br label %if.end12
if.end12: ; preds = %if.end, %while.end
%_M_impl13 = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%13 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl13 to %"struct.std::_Rb_tree_key_compare"*
%_M_key_compare14 = getelementptr inbounds %"struct.std::_Rb_tree_key_compare", %"struct.std::_Rb_tree_key_compare"* %13, i32 0, i32 0
%_M_node = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__j, i32 0, i32 0
%14 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node, align 8
%call15 = call nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %14)
%15 = load i32*, i32** %__k.addr, align 8
%call16 = call zeroext i1 @_ZNKSt4lessIiEclERKiS2_(%"struct.std::less"* %_M_key_compare14, i32* nonnull align 4 dereferenceable(4) %call15, i32* nonnull align 4 dereferenceable(4) %15)
br i1 %call16, label %if.then17, label %if.end18
if.then17: ; preds = %if.end12
call void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRPSt13_Rb_tree_nodeIS_IKiPcEERS1_Lb1EEEOT_OT0_(%"struct.std::pair.1"* %retval, %"struct.std::_Rb_tree_node"** nonnull align 8 dereferenceable(8) %__x, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %__y)
br label %return
if.end18: ; preds = %if.end12
%_M_node19 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__j, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* null, %"struct.std::_Rb_tree_node_base"** %ref.tmp20, align 8
call void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_Lb1EEEOT_RKS1_(%"struct.std::pair.1"* %retval, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %_M_node19, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %ref.tmp20)
br label %return
return: ; preds = %if.end18, %if.then17, %if.then10
%16 = bitcast %"struct.std::pair.1"* %retval to { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }*
%17 = load { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }, { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }* %16, align 8
ret { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } %17
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_leftmostEv(%"class.std::_Rb_tree"* %this) #3 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%0 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl to i8*
%add.ptr = getelementptr inbounds i8, i8* %0, i64 8
%1 = bitcast i8* %add.ptr to %"struct.std::_Rb_tree_header"*
%_M_header = getelementptr inbounds %"struct.std::_Rb_tree_header", %"struct.std::_Rb_tree_header"* %1, i32 0, i32 0
%_M_left = getelementptr inbounds %"struct.std::_Rb_tree_node_base", %"struct.std::_Rb_tree_node_base"* %_M_header, i32 0, i32 2
ret %"struct.std::_Rb_tree_node_base"** %_M_left
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_S4_Lb1EEEOT_OT0_(%"struct.std::pair.1"* %this, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %__x, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %__y) unnamed_addr #3 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::pair.1"*, align 8
%__x.addr = alloca %"struct.std::_Rb_tree_node_base"**, align 8
%__y.addr = alloca %"struct.std::_Rb_tree_node_base"**, align 8
store %"struct.std::pair.1"* %this, %"struct.std::pair.1"** %this.addr, align 8
store %"struct.std::_Rb_tree_node_base"** %__x, %"struct.std::_Rb_tree_node_base"*** %__x.addr, align 8
store %"struct.std::_Rb_tree_node_base"** %__y, %"struct.std::_Rb_tree_node_base"*** %__y.addr, align 8
%this1 = load %"struct.std::pair.1"*, %"struct.std::pair.1"** %this.addr, align 8
%0 = bitcast %"struct.std::pair.1"* %this1 to %"class.std::__pair_base.2"*
%first = getelementptr inbounds %"struct.std::pair.1", %"struct.std::pair.1"* %this1, i32 0, i32 0
%1 = load %"struct.std::_Rb_tree_node_base"**, %"struct.std::_Rb_tree_node_base"*** %__x.addr, align 8
%call = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(%"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %1) #12
%2 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %call, align 8
store %"struct.std::_Rb_tree_node_base"* %2, %"struct.std::_Rb_tree_node_base"** %first, align 8
%second = getelementptr inbounds %"struct.std::pair.1", %"struct.std::pair.1"* %this1, i32 0, i32 1
%3 = load %"struct.std::_Rb_tree_node_base"**, %"struct.std::_Rb_tree_node_base"*** %__y.addr, align 8
%call2 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(%"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %3) #12
%4 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %call2, align 8
store %"struct.std::_Rb_tree_node_base"* %4, %"struct.std::_Rb_tree_node_base"** %second, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_iterator"* @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEmmEv(%"struct.std::_Rb_tree_iterator"* %this) #3 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Rb_tree_iterator"*, align 8
store %"struct.std::_Rb_tree_iterator"* %this, %"struct.std::_Rb_tree_iterator"** %this.addr, align 8
%this1 = load %"struct.std::_Rb_tree_iterator"*, %"struct.std::_Rb_tree_iterator"** %this.addr, align 8
%_M_node = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %this1, i32 0, i32 0
%0 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node, align 8
%call = call %"struct.std::_Rb_tree_node_base"* @_ZSt18_Rb_tree_decrementPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %0) #16
%_M_node2 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %this1, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %call, %"struct.std::_Rb_tree_node_base"** %_M_node2, align 8
ret %"struct.std::_Rb_tree_iterator"* %this1
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_iterator"* @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEppEv(%"struct.std::_Rb_tree_iterator"* %this) #3 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Rb_tree_iterator"*, align 8
store %"struct.std::_Rb_tree_iterator"* %this, %"struct.std::_Rb_tree_iterator"** %this.addr, align 8
%this1 = load %"struct.std::_Rb_tree_iterator"*, %"struct.std::_Rb_tree_iterator"** %this.addr, align 8
%_M_node = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %this1, i32 0, i32 0
%0 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node, align 8
%call = call %"struct.std::_Rb_tree_node_base"* @_ZSt18_Rb_tree_incrementPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %0) #16
%_M_node2 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %this1, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %call, %"struct.std::_Rb_tree_node_base"** %_M_node2, align 8
ret %"struct.std::_Rb_tree_iterator"* %this1
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_Lb1EEEOT_RKS1_(%"struct.std::pair.1"* %this, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %__x, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %__y) unnamed_addr #3 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::pair.1"*, align 8
%__x.addr = alloca %"struct.std::_Rb_tree_node_base"**, align 8
%__y.addr = alloca %"struct.std::_Rb_tree_node_base"**, align 8
store %"struct.std::pair.1"* %this, %"struct.std::pair.1"** %this.addr, align 8
store %"struct.std::_Rb_tree_node_base"** %__x, %"struct.std::_Rb_tree_node_base"*** %__x.addr, align 8
store %"struct.std::_Rb_tree_node_base"** %__y, %"struct.std::_Rb_tree_node_base"*** %__y.addr, align 8
%this1 = load %"struct.std::pair.1"*, %"struct.std::pair.1"** %this.addr, align 8
%0 = bitcast %"struct.std::pair.1"* %this1 to %"class.std::__pair_base.2"*
%first = getelementptr inbounds %"struct.std::pair.1", %"struct.std::pair.1"* %this1, i32 0, i32 0
%1 = load %"struct.std::_Rb_tree_node_base"**, %"struct.std::_Rb_tree_node_base"*** %__x.addr, align 8
%call = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(%"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %1) #12
%2 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %call, align 8
store %"struct.std::_Rb_tree_node_base"* %2, %"struct.std::_Rb_tree_node_base"** %first, align 8
%second = getelementptr inbounds %"struct.std::pair.1", %"struct.std::pair.1"* %this1, i32 0, i32 1
%3 = load %"struct.std::_Rb_tree_node_base"**, %"struct.std::_Rb_tree_node_base"*** %__y.addr, align 8
%4 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %3, align 8
store %"struct.std::_Rb_tree_node_base"* %4, %"struct.std::_Rb_tree_node_base"** %second, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(%"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %__t) #3 comdat {
entry:
%__t.addr = alloca %"struct.std::_Rb_tree_node_base"**, align 8
store %"struct.std::_Rb_tree_node_base"** %__t, %"struct.std::_Rb_tree_node_base"*** %__t.addr, align 8
%0 = load %"struct.std::_Rb_tree_node_base"**, %"struct.std::_Rb_tree_node_base"*** %__t.addr, align 8
ret %"struct.std::_Rb_tree_node_base"** %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE5beginEv(%"class.std::_Rb_tree"* %this) #3 comdat align 2 {
entry:
%retval = alloca %"struct.std::_Rb_tree_iterator", align 8
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%0 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl to i8*
%add.ptr = getelementptr inbounds i8, i8* %0, i64 8
%1 = bitcast i8* %add.ptr to %"struct.std::_Rb_tree_header"*
%_M_header = getelementptr inbounds %"struct.std::_Rb_tree_header", %"struct.std::_Rb_tree_header"* %1, i32 0, i32 0
%_M_left = getelementptr inbounds %"struct.std::_Rb_tree_node_base", %"struct.std::_Rb_tree_node_base"* %_M_header, i32 0, i32 2
%2 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_left, align 8
call void @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC2EPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_iterator"* %retval, %"struct.std::_Rb_tree_node_base"* %2) #12
%coerce.dive = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
%3 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %coerce.dive, align 8
ret %"struct.std::_Rb_tree_node_base"* %3
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRPSt13_Rb_tree_nodeIS_IKiPcEERS1_Lb1EEEOT_OT0_(%"struct.std::pair.1"* %this, %"struct.std::_Rb_tree_node"** nonnull align 8 dereferenceable(8) %__x, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %__y) unnamed_addr #3 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::pair.1"*, align 8
%__x.addr = alloca %"struct.std::_Rb_tree_node"**, align 8
%__y.addr = alloca %"struct.std::_Rb_tree_node_base"**, align 8
store %"struct.std::pair.1"* %this, %"struct.std::pair.1"** %this.addr, align 8
store %"struct.std::_Rb_tree_node"** %__x, %"struct.std::_Rb_tree_node"*** %__x.addr, align 8
store %"struct.std::_Rb_tree_node_base"** %__y, %"struct.std::_Rb_tree_node_base"*** %__y.addr, align 8
%this1 = load %"struct.std::pair.1"*, %"struct.std::pair.1"** %this.addr, align 8
%0 = bitcast %"struct.std::pair.1"* %this1 to %"class.std::__pair_base.2"*
%first = getelementptr inbounds %"struct.std::pair.1", %"struct.std::pair.1"* %this1, i32 0, i32 0
%1 = load %"struct.std::_Rb_tree_node"**, %"struct.std::_Rb_tree_node"*** %__x.addr, align 8
%call = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node"** @_ZSt7forwardIRPSt13_Rb_tree_nodeISt4pairIKiPcEEEOT_RNSt16remove_referenceIS8_E4typeE(%"struct.std::_Rb_tree_node"** nonnull align 8 dereferenceable(8) %1) #12
%2 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %call, align 8
%3 = bitcast %"struct.std::_Rb_tree_node"* %2 to %"struct.std::_Rb_tree_node_base"*
store %"struct.std::_Rb_tree_node_base"* %3, %"struct.std::_Rb_tree_node_base"** %first, align 8
%second = getelementptr inbounds %"struct.std::pair.1", %"struct.std::pair.1"* %this1, i32 0, i32 1
%4 = load %"struct.std::_Rb_tree_node_base"**, %"struct.std::_Rb_tree_node_base"*** %__y.addr, align 8
%call2 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(%"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %4) #12
%5 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %call2, align 8
store %"struct.std::_Rb_tree_node_base"* %5, %"struct.std::_Rb_tree_node_base"** %second, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node"** @_ZSt7forwardIRPSt13_Rb_tree_nodeISt4pairIKiPcEEEOT_RNSt16remove_referenceIS8_E4typeE(%"struct.std::_Rb_tree_node"** nonnull align 8 dereferenceable(8) %__t) #3 comdat {
entry:
%__t.addr = alloca %"struct.std::_Rb_tree_node"**, align 8
store %"struct.std::_Rb_tree_node"** %__t, %"struct.std::_Rb_tree_node"*** %__t.addr, align 8
%0 = load %"struct.std::_Rb_tree_node"**, %"struct.std::_Rb_tree_node"*** %__t.addr, align 8
ret %"struct.std::_Rb_tree_node"** %0
}
; Function Attrs: nounwind readonly
declare dso_local %"struct.std::_Rb_tree_node_base"* @_ZSt18_Rb_tree_decrementPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"*) #10
; Function Attrs: nounwind readonly
declare dso_local %"struct.std::_Rb_tree_node_base"* @_ZSt18_Rb_tree_incrementPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"*) #10
; Function Attrs: nounwind
declare dso_local void @_ZSt29_Rb_tree_insert_and_rebalancebPSt18_Rb_tree_node_baseS0_RS_(i1 zeroext, %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* nonnull align 8 dereferenceable(32)) #11
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE15_M_destroy_nodeEPSt13_Rb_tree_nodeIS3_E(%"class.std::_Rb_tree"* %this, %"struct.std::_Rb_tree_node"* %__p) #3 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__p.addr = alloca %"struct.std::_Rb_tree_node"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store %"struct.std::_Rb_tree_node"* %__p, %"struct.std::_Rb_tree_node"** %__p.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%call = call nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE21_M_get_Node_allocatorEv(%"class.std::_Rb_tree"* %this1) #12
%0 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__p.addr, align 8
%call2 = invoke %"struct.std::pair"* @_ZNSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(%"struct.std::_Rb_tree_node"* %0)
to label %invoke.cont unwind label %terminate.lpad
invoke.cont: ; preds = %entry
call void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE7destroyIS4_EEvRS6_PT_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %call, %"struct.std::pair"* %call2) #12
%1 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__p.addr, align 8
ret void
terminate.lpad: ; preds = %entry
%2 = landingpad { i8*, i32 }
catch i8* null
%3 = extractvalue { i8*, i32 } %2, 0
call void @__clang_call_terminate(i8* %3) #13
unreachable
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE7destroyIS4_EEvRS6_PT_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a, %"struct.std::pair"* %__p) #3 comdat align 2 {
entry:
%__a.addr = alloca %"class.std::allocator"*, align 8
%__p.addr = alloca %"struct.std::pair"*, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
store %"struct.std::pair"* %__p, %"struct.std::pair"** %__p.addr, align 8
%0 = load %"class.std::allocator"*, %"class.std::allocator"** %__a.addr, align 8
%1 = bitcast %"class.std::allocator"* %0 to %"class.__gnu_cxx::new_allocator"*
%2 = load %"struct.std::pair"*, %"struct.std::pair"** %__p.addr, align 8
call void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE7destroyIS5_EEvPT_(%"class.__gnu_cxx::new_allocator"* %1, %"struct.std::pair"* %2) #12
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE7destroyIS5_EEvPT_(%"class.__gnu_cxx::new_allocator"* %this, %"struct.std::pair"* %__p) #3 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
%__p.addr = alloca %"struct.std::pair"*, align 8
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
store %"struct.std::pair"* %__p, %"struct.std::pair"** %__p.addr, align 8
%this1 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
%0 = load %"struct.std::pair"*, %"struct.std::pair"** %__p.addr, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 4 dereferenceable(4) i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i32* nonnull align 4 dereferenceable(4) %__t) #3 comdat {
entry:
%__t.addr = alloca i32*, align 8
store i32* %__t, i32** %__t.addr, align 8
%0 = load i32*, i32** %__t.addr, align 8
ret i32* %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt5tupleIJOiEEC2IJiELb1ELb1EEEDpOT_(%"class.std::tuple"* %this, i32* nonnull align 4 dereferenceable(4) %__elements) unnamed_addr #3 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%this.addr = alloca %"class.std::tuple"*, align 8
%__elements.addr = alloca i32*, align 8
store %"class.std::tuple"* %this, %"class.std::tuple"** %this.addr, align 8
store i32* %__elements, i32** %__elements.addr, align 8
%this1 = load %"class.std::tuple"*, %"class.std::tuple"** %this.addr, align 8
%0 = bitcast %"class.std::tuple"* %this1 to %"struct.std::_Tuple_impl"*
%1 = load i32*, i32** %__elements.addr, align 8
%call = call nonnull align 4 dereferenceable(4) i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i32* nonnull align 4 dereferenceable(4) %1) #12
invoke void @_ZNSt11_Tuple_implILm0EJOiEEC2IiEEOT_(%"struct.std::_Tuple_impl"* %0, i32* nonnull align 4 dereferenceable(4) %call)
to label %invoke.cont unwind label %terminate.lpad
invoke.cont: ; preds = %entry
ret void
terminate.lpad: ; preds = %entry
%2 = landingpad { i8*, i32 }
catch i8* null
%3 = extractvalue { i8*, i32 } %2, 0
call void @__clang_call_terminate(i8* %3) #13
unreachable
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt11_Tuple_implILm0EJOiEEC2IiEEOT_(%"struct.std::_Tuple_impl"* %this, i32* nonnull align 4 dereferenceable(4) %__head) unnamed_addr #0 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Tuple_impl"*, align 8
%__head.addr = alloca i32*, align 8
store %"struct.std::_Tuple_impl"* %this, %"struct.std::_Tuple_impl"** %this.addr, align 8
store i32* %__head, i32** %__head.addr, align 8
%this1 = load %"struct.std::_Tuple_impl"*, %"struct.std::_Tuple_impl"** %this.addr, align 8
%0 = bitcast %"struct.std::_Tuple_impl"* %this1 to %"struct.std::_Head_base"*
%1 = load i32*, i32** %__head.addr, align 8
%call = call nonnull align 4 dereferenceable(4) i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i32* nonnull align 4 dereferenceable(4) %1) #12
call void @_ZNSt10_Head_baseILm0EOiLb0EEC2IiEEOT_(%"struct.std::_Head_base"* %0, i32* nonnull align 4 dereferenceable(4) %call)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt10_Head_baseILm0EOiLb0EEC2IiEEOT_(%"struct.std::_Head_base"* %this, i32* nonnull align 4 dereferenceable(4) %__h) unnamed_addr #3 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Head_base"*, align 8
%__h.addr = alloca i32*, align 8
store %"struct.std::_Head_base"* %this, %"struct.std::_Head_base"** %this.addr, align 8
store i32* %__h, i32** %__h.addr, align 8
%this1 = load %"struct.std::_Head_base"*, %"struct.std::_Head_base"** %this.addr, align 8
%_M_head_impl = getelementptr inbounds %"struct.std::_Head_base", %"struct.std::_Head_base"* %this1, i32 0, i32 0
%0 = load i32*, i32** %__h.addr, align 8
%call = call nonnull align 4 dereferenceable(4) i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i32* nonnull align 4 dereferenceable(4) %0) #12
store i32* %call, i32** %_M_head_impl, align 8
ret void
}
attributes #0 = { noinline 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" }
attributes #1 = { argmemonly nounwind willreturn writeonly }
attributes #2 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #3 = { 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" }
attributes #4 = { argmemonly nounwind willreturn }
attributes #5 = { noinline noreturn nounwind }
attributes #6 = { cold noreturn nounwind }
attributes #7 = { noreturn "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #8 = { nobuiltin allocsize(0) "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #9 = { nobuiltin nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #10 = { nounwind readonly "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #11 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #12 = { nounwind }
attributes #13 = { noreturn nounwind }
attributes #14 = { noreturn }
attributes #15 = { allocsize(0) }
attributes #16 = { nounwind readonly }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_f = local_unnamed_addr constant [3 x i8] c"%(\00"
@global_var_208 = local_unnamed_addr constant [11 x i32] %wide-string
@global_var_210 = local_unnamed_addr constant [9 x i32] %wide-string
@global_var_218 = local_unnamed_addr constant [7 x i32] %wide-string
@global_var_220 = local_unnamed_addr constant [5 x i32] %wide-string
@global_var_228 = local_unnamed_addr constant [3 x i32] %wide-string
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%stack_var_-160 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
%1 = ptrtoint i64* %stack_var_-160 to i64, !insn.addr !1
ret i64 %1, !insn.addr !2
}
define i64 @function_30() local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !3
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = trunc i64 %2 to i32, !insn.addr !3
%4 = add i64 %1, -136, !insn.addr !3
%5 = inttoptr i64 %4 to i32*, !insn.addr !3
store i32 %3, i32* %5, align 4, !insn.addr !3
%6 = add i64 %1, -144, !insn.addr !4
%7 = inttoptr i64 %6 to i64*, !insn.addr !4
%8 = add i64 %1, -128, !insn.addr !5
%9 = inttoptr i64 %8 to i64*, !insn.addr !5
%10 = add i64 %1, -112, !insn.addr !6
store i64 %10, i64* %9, align 8, !insn.addr !7
%11 = inttoptr i64 %10 to i32*, !insn.addr !8
store i32 0, i32* %11, align 4, !insn.addr !8
%12 = load i64, i64* %7, align 8, !insn.addr !9
%13 = load i64, i64* %9, align 8, !insn.addr !10
%14 = inttoptr i64 %12 to i64*, !insn.addr !11
store i64 %13, i64* %14, align 8, !insn.addr !11
%15 = inttoptr i64 %4 to i64*, !insn.addr !12
%16 = load i64, i64* %15, align 8, !insn.addr !12
%17 = inttoptr i64 %16 to i64*, !insn.addr !13
%18 = load i64, i64* %17, align 8, !insn.addr !13
%19 = add i64 %1, -120, !insn.addr !14
%20 = inttoptr i64 %19 to i64*, !insn.addr !14
store i64 %18, i64* %20, align 8, !insn.addr !14
%21 = add i64 %1, -64, !insn.addr !15
%22 = inttoptr i64 %21 to i64*, !insn.addr !15
store i64 279172874305, i64* %22, align 8, !insn.addr !15
%23 = add i64 %1, -56, !insn.addr !16
%24 = inttoptr i64 %23 to i64*, !insn.addr !16
store i64 279172874305, i64* %24, align 8, !insn.addr !16
%25 = add i64 %1, -48, !insn.addr !17
%26 = inttoptr i64 %25 to i64*, !insn.addr !17
store i64 279172874305, i64* %26, align 8, !insn.addr !17
%27 = add i64 %1, -40, !insn.addr !18
%28 = inttoptr i64 %27 to i64*, !insn.addr !18
store i64 279172874305, i64* %28, align 8, !insn.addr !18
%29 = add i64 %1, -32, !insn.addr !19
%30 = inttoptr i64 %29 to i64*, !insn.addr !19
store i64 279172874305, i64* %30, align 8, !insn.addr !19
%31 = load i32, i32* inttoptr (i64 560 to i32*), align 16, !insn.addr !20
%32 = add i64 %1, -24, !insn.addr !21
%33 = inttoptr i64 %32 to i32*, !insn.addr !21
store i32 %31, i32* %33, align 4, !insn.addr !21
%34 = call i64 @wcslen(i64 %21), !insn.addr !22
%35 = add i64 %34, 1, !insn.addr !23
%36 = load i64, i64* %20, align 8, !insn.addr !24
%37 = call i64 @wcsncpy(i64 %36, i64 %21, i64 %35, i64 %21), !insn.addr !25
%38 = load i64, i64* %20, align 8, !insn.addr !26
%39 = call i64 @printWLine(i64 %38), !insn.addr !27
%40 = add i64 %1, -8, !insn.addr !28
%41 = inttoptr i64 %40 to i64*, !insn.addr !28
%42 = load i64, i64* %41, align 8, !insn.addr !28
%43 = call i64 @__readfsqword(i64 40), !insn.addr !29
%44 = icmp eq i64 %42, %43, !insn.addr !29
store i64 0, i64* %rax.0.reg2mem, !insn.addr !30
br i1 %44, label %dec_label_pc_f6, label %dec_label_pc_f1, !insn.addr !30
dec_label_pc_f1: ; preds = %dec_label_pc_30
%45 = call i64 @__stack_chk_fail(), !insn.addr !31
store i64 %45, i64* %rax.0.reg2mem, !insn.addr !31
br label %dec_label_pc_f6, !insn.addr !31
dec_label_pc_f6: ; preds = %dec_label_pc_f1, %dec_label_pc_30
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !32
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_f8:
%rax.0.reg2mem = alloca i64, !insn.addr !33
%stack_var_-72 = alloca i32*, align 8
%stack_var_-120 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !34
%1 = ptrtoint i64* %stack_var_-120 to i64, !insn.addr !35
%2 = bitcast i64* %stack_var_-120 to i32*, !insn.addr !36
store i32 0, i32* %2, align 8, !insn.addr !36
store i32* inttoptr (i64 279172874305 to i32*), i32** %stack_var_-72, align 8, !insn.addr !37
%3 = ptrtoint i32** %stack_var_-72 to i64, !insn.addr !38
%4 = call i64 @wcslen(i64 %3), !insn.addr !39
%5 = add i64 %4, 1, !insn.addr !40
%6 = call i64 @wcsncpy(i64 %1, i64 %3, i64 %5, i64 %3), !insn.addr !41
%7 = call i64 @printWLine(i64 %1), !insn.addr !42
%8 = call i64 @__readfsqword(i64 40), !insn.addr !43
%9 = icmp eq i64 %0, %8, !insn.addr !43
store i64 0, i64* %rax.0.reg2mem, !insn.addr !44
br i1 %9, label %dec_label_pc_1ee, label %dec_label_pc_1e9, !insn.addr !44
dec_label_pc_1e9: ; preds = %dec_label_pc_f8
%10 = call i64 @__stack_chk_fail(), !insn.addr !45
store i64 %10, i64* %rax.0.reg2mem, !insn.addr !45
br label %dec_label_pc_1ee, !insn.addr !45
dec_label_pc_1ee: ; preds = %dec_label_pc_1e9, %dec_label_pc_f8
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !46
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_ncpy_32_good() local_unnamed_addr {
dec_label_pc_1f0:
%0 = call i64 @goodG2B(), !insn.addr !47
ret i64 %0, !insn.addr !48
}
declare i64 @wcslen(i64) local_unnamed_addr
declare i64 @wcsncpy(i64, i64, i64, i64) local_unnamed_addr
declare i64 @printWLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 11}
!1 = !{i64 26}
!2 = !{i64 33}
!3 = !{i64 48}
!4 = !{i64 54}
!5 = !{i64 64}
!6 = !{i64 68}
!7 = !{i64 72}
!8 = !{i64 80}
!9 = !{i64 86}
!10 = !{i64 93}
!11 = !{i64 97}
!12 = !{i64 100}
!13 = !{i64 107}
!14 = !{i64 110}
!15 = !{i64 128}
!16 = !{i64 132}
!17 = !{i64 150}
!18 = !{i64 154}
!19 = !{i64 165}
!20 = !{i64 169}
!21 = !{i64 175}
!22 = !{i64 185}
!23 = !{i64 190}
!24 = !{i64 198}
!25 = !{i64 208}
!26 = !{i64 213}
!27 = !{i64 220}
!28 = !{i64 226}
!29 = !{i64 230}
!30 = !{i64 239}
!31 = !{i64 241}
!32 = !{i64 247}
!33 = !{i64 248}
!34 = !{i64 259}
!35 = !{i64 320}
!36 = !{i64 328}
!37 = !{i64 376}
!38 = !{i64 430}
!39 = !{i64 433}
!40 = !{i64 438}
!41 = !{i64 456}
!42 = !{i64 468}
!43 = !{i64 478}
!44 = !{i64 487}
!45 = !{i64 489}
!46 = !{i64 495}
!47 = !{i64 505}
!48 = !{i64 512}
### Assistant: @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_ncpy_32_bad.source = private unnamed_addr constant [11 x i32] [i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 0], align 16
@__const.goodG2B.source = private unnamed_addr constant [11 x i32] [i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 0], align 16
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_ncpy_32_bad() #0 {
entry:
%data = alloca i32*, align 8
%dataPtr1 = alloca i32**, align 8
%dataPtr2 = alloca i32**, align 8
%dataBadBuffer = alloca [10 x i32], align 16
%dataGoodBuffer = alloca [11 x i32], align 16
%data1 = alloca i32*, align 8
%data2 = alloca i32*, align 8
%source = alloca [11 x i32], align 16
store i32** %data, i32*** %dataPtr1, align 8
store i32** %data, i32*** %dataPtr2, align 8
%0 = load i32**, i32*** %dataPtr1, align 8
%1 = load i32*, i32** %0, align 8
store i32* %1, i32** %data1, align 8
%arraydecay = getelementptr inbounds [10 x i32], [10 x i32]* %dataBadBuffer, i64 0, i64 0
store i32* %arraydecay, i32** %data1, align 8
%2 = load i32*, i32** %data1, align 8
%arrayidx = getelementptr inbounds i32, i32* %2, i64 0
store i32 0, i32* %arrayidx, align 4
%3 = load i32*, i32** %data1, align 8
%4 = load i32**, i32*** %dataPtr1, align 8
store i32* %3, i32** %4, align 8
%5 = load i32**, i32*** %dataPtr2, align 8
%6 = load i32*, i32** %5, align 8
store i32* %6, i32** %data2, align 8
%7 = bitcast [11 x i32]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 %7, i8* align 16 bitcast ([11 x i32]* @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_ncpy_32_bad.source to i8*), i64 44, i1 false)
%8 = load i32*, i32** %data2, align 8
%arraydecay3 = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%arraydecay4 = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%call = call i64 @wcslen(i32* %arraydecay4) #5
%add = add i64 %call, 1
%call5 = call i32* @wcsncpy(i32* %8, i32* %arraydecay3, i64 %add) #6
%9 = load i32*, i32** %data2, align 8
call void @printWLine(i32* %9)
ret void
}
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #1
; Function Attrs: nounwind
declare dso_local i32* @wcsncpy(i32*, i32*, i64) #2
; Function Attrs: nounwind readonly
declare dso_local i64 @wcslen(i32*) #3
declare dso_local void @printWLine(i32*) #4
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_ncpy_32_good() #0 {
entry:
call void @goodG2B()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B() #0 {
entry:
%data = alloca i32*, align 8
%dataPtr1 = alloca i32**, align 8
%dataPtr2 = alloca i32**, align 8
%dataBadBuffer = alloca [10 x i32], align 16
%dataGoodBuffer = alloca [11 x i32], align 16
%data1 = alloca i32*, align 8
%data2 = alloca i32*, align 8
%source = alloca [11 x i32], align 16
store i32** %data, i32*** %dataPtr1, align 8
store i32** %data, i32*** %dataPtr2, align 8
%0 = load i32**, i32*** %dataPtr1, align 8
%1 = load i32*, i32** %0, align 8
store i32* %1, i32** %data1, align 8
%arraydecay = getelementptr inbounds [11 x i32], [11 x i32]* %dataGoodBuffer, i64 0, i64 0
store i32* %arraydecay, i32** %data1, align 8
%2 = load i32*, i32** %data1, align 8
%arrayidx = getelementptr inbounds i32, i32* %2, i64 0
store i32 0, i32* %arrayidx, align 4
%3 = load i32*, i32** %data1, align 8
%4 = load i32**, i32*** %dataPtr1, align 8
store i32* %3, i32** %4, align 8
%5 = load i32**, i32*** %dataPtr2, align 8
%6 = load i32*, i32** %5, align 8
store i32* %6, i32** %data2, align 8
%7 = bitcast [11 x i32]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 %7, i8* align 16 bitcast ([11 x i32]* @__const.goodG2B.source to i8*), i64 44, i1 false)
%8 = load i32*, i32** %data2, align 8
%arraydecay3 = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%arraydecay4 = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%call = call i64 @wcslen(i32* %arraydecay4) #5
%add = add i64 %call, 1
%call5 = call i32* @wcsncpy(i32* %8, i32* %arraydecay3, i64 %add) #6
%9 = load i32*, i32** %data2, align 8
call void @printWLine(i32* %9)
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" }
attributes #1 = { argmemonly nounwind willreturn }
attributes #2 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #3 = { nounwind readonly "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #4 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #5 = { nounwind readonly }
attributes #6 = { nounwind }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_398 = local_unnamed_addr constant [11 x i32] %wide-string
@global_var_3a0 = local_unnamed_addr constant [9 x i32] %wide-string
@global_var_3a8 = local_unnamed_addr constant [7 x i32] %wide-string
@global_var_3b0 = local_unnamed_addr constant [5 x i32] %wide-string
@global_var_3b8 = local_unnamed_addr constant [3 x i32] %wide-string
@global_var_3c4 = constant [21 x i8] c"Benign, fixed string\00"
@global_var_3c0 = local_unnamed_addr constant i32 0
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
ret i64 70, !insn.addr !1
}
define i64 @function_31() local_unnamed_addr {
dec_label_pc_31:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !2
%.pre-phi2.reg2mem = alloca i64*, !insn.addr !2
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = load i64, i64* %0
%4 = mul i64 %3, 16, !insn.addr !2
%5 = sub i64 %2, %4, !insn.addr !3
%6 = add i64 %5, 15, !insn.addr !4
%7 = and i64 %6, -16, !insn.addr !5
%8 = add i64 %1, -80, !insn.addr !6
%9 = inttoptr i64 %8 to i64*, !insn.addr !6
store i64 %7, i64* %9, align 8, !insn.addr !6
%10 = add i64 %5, -49, !insn.addr !7
%11 = and i64 %10, -16, !insn.addr !8
%12 = add i64 %1, -72, !insn.addr !9
%13 = inttoptr i64 %12 to i64*, !insn.addr !9
store i64 %11, i64* %13, align 8, !insn.addr !9
%14 = call i64 @globalReturnsTrue(), !insn.addr !10
%15 = trunc i64 %14 to i32, !insn.addr !11
%16 = icmp eq i32 %15, 0, !insn.addr !11
br i1 %16, label %dec_label_pc_31.dec_label_pc_9f_crit_edge, label %dec_label_pc_8d, !insn.addr !12
dec_label_pc_31.dec_label_pc_9f_crit_edge: ; preds = %dec_label_pc_31
%.pre = add i64 %1, -88, !insn.addr !13
%.pre1 = inttoptr i64 %.pre to i64*, !insn.addr !13
store i64* %.pre1, i64** %.pre-phi2.reg2mem
br label %dec_label_pc_9f
dec_label_pc_8d: ; preds = %dec_label_pc_31
%17 = load i64, i64* %9, align 8, !insn.addr !14
%18 = add i64 %1, -88
%19 = inttoptr i64 %18 to i64*
store i64 %17, i64* %19, align 8, !insn.addr !15
%20 = inttoptr i64 %17 to i32*, !insn.addr !16
store i32 0, i32* %20, align 4, !insn.addr !16
store i64* %19, i64** %.pre-phi2.reg2mem, !insn.addr !16
br label %dec_label_pc_9f, !insn.addr !16
dec_label_pc_9f: ; preds = %dec_label_pc_31.dec_label_pc_9f_crit_edge, %dec_label_pc_8d
%.pre-phi2.reload = load i64*, i64** %.pre-phi2.reg2mem
%21 = add i64 %1, -64, !insn.addr !17
%22 = inttoptr i64 %21 to i64*, !insn.addr !17
store i64 279172874305, i64* %22, align 8, !insn.addr !17
%23 = add i64 %1, -56, !insn.addr !18
%24 = inttoptr i64 %23 to i64*, !insn.addr !18
store i64 279172874305, i64* %24, align 8, !insn.addr !18
%25 = add i64 %1, -48, !insn.addr !19
%26 = inttoptr i64 %25 to i64*, !insn.addr !19
store i64 279172874305, i64* %26, align 8, !insn.addr !19
%27 = add i64 %1, -40, !insn.addr !20
%28 = inttoptr i64 %27 to i64*, !insn.addr !20
store i64 279172874305, i64* %28, align 8, !insn.addr !20
%29 = add i64 %1, -32, !insn.addr !21
%30 = inttoptr i64 %29 to i64*, !insn.addr !21
store i64 279172874305, i64* %30, align 8, !insn.addr !21
%31 = add i64 %1, -24, !insn.addr !22
%32 = inttoptr i64 %31 to i32*, !insn.addr !22
store i32 0, i32* %32, align 4, !insn.addr !22
%33 = call i64 @wcslen(i64 %21), !insn.addr !23
%34 = add i64 %33, 1, !insn.addr !24
%35 = load i64, i64* %.pre-phi2.reload, align 8, !insn.addr !13
%36 = call i64 @wcsncpy(i64 %35, i64 %21, i64 %34, i64 %21), !insn.addr !25
%37 = load i64, i64* %.pre-phi2.reload, align 8, !insn.addr !26
%38 = call i64 @printWLine(i64 %37), !insn.addr !27
%39 = add i64 %1, -8, !insn.addr !28
%40 = inttoptr i64 %39 to i64*, !insn.addr !28
%41 = load i64, i64* %40, align 8, !insn.addr !28
%42 = call i64 @__readfsqword(i64 40), !insn.addr !29
%43 = icmp eq i64 %41, %42, !insn.addr !29
store i64 0, i64* %rax.0.reg2mem, !insn.addr !30
br i1 %43, label %dec_label_pc_123, label %dec_label_pc_11e, !insn.addr !30
dec_label_pc_11e: ; preds = %dec_label_pc_9f
%44 = call i64 @__stack_chk_fail(), !insn.addr !31
store i64 %44, i64* %rax.0.reg2mem, !insn.addr !31
br label %dec_label_pc_123, !insn.addr !31
dec_label_pc_123: ; preds = %dec_label_pc_11e, %dec_label_pc_9f
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !32
}
define i64 @goodG2B1() local_unnamed_addr {
dec_label_pc_125:
%rax.0.reg2mem = alloca i64, !insn.addr !33
%stack_var_-96.0.reg2mem = alloca i64, !insn.addr !33
%stack_var_-72 = alloca i32*, align 8
%stack_var_-104 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !34
%1 = call i64 @globalReturnsFalse(), !insn.addr !35
%2 = trunc i64 %1 to i32, !insn.addr !36
%3 = icmp eq i32 %2, 0, !insn.addr !36
br i1 %3, label %dec_label_pc_1c0, label %dec_label_pc_1b2, !insn.addr !37
dec_label_pc_1b2: ; preds = %dec_label_pc_125
%4 = call i64 @printLine(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @global_var_3c4, i64 0, i64 0)), !insn.addr !38
br label %dec_label_pc_1d2, !insn.addr !39
dec_label_pc_1c0: ; preds = %dec_label_pc_125
%5 = ptrtoint i64* %stack_var_-104 to i64, !insn.addr !40
%6 = add i64 %5, -113, !insn.addr !41
%7 = and i64 %6, -16, !insn.addr !42
%8 = inttoptr i64 %7 to i32*, !insn.addr !43
store i32 0, i32* %8, align 16, !insn.addr !44
store i64 %7, i64* %stack_var_-96.0.reg2mem, !insn.addr !44
br label %dec_label_pc_1d2, !insn.addr !44
dec_label_pc_1d2: ; preds = %dec_label_pc_1c0, %dec_label_pc_1b2
%stack_var_-96.0.reload = load i64, i64* %stack_var_-96.0.reg2mem
store i32* inttoptr (i64 279172874305 to i32*), i32** %stack_var_-72, align 8, !insn.addr !45
%9 = ptrtoint i32** %stack_var_-72 to i64, !insn.addr !46
%10 = call i64 @wcslen(i64 %9), !insn.addr !47
%11 = add i64 %10, 1, !insn.addr !48
%12 = call i64 @wcsncpy(i64 %stack_var_-96.0.reload, i64 %9, i64 %11, i64 %9), !insn.addr !49
%13 = call i64 @printWLine(i64 %stack_var_-96.0.reload), !insn.addr !50
%14 = call i64 @__readfsqword(i64 40), !insn.addr !51
%15 = icmp eq i64 %0, %14, !insn.addr !51
store i64 0, i64* %rax.0.reg2mem, !insn.addr !52
br i1 %15, label %dec_label_pc_256, label %dec_label_pc_251, !insn.addr !52
dec_label_pc_251: ; preds = %dec_label_pc_1d2
%16 = call i64 @__stack_chk_fail(), !insn.addr !53
store i64 %16, i64* %rax.0.reg2mem, !insn.addr !53
br label %dec_label_pc_256, !insn.addr !53
dec_label_pc_256: ; preds = %dec_label_pc_251, %dec_label_pc_1d2
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !54
}
define i64 @goodG2B2() local_unnamed_addr {
dec_label_pc_258:
%rax.0.reg2mem = alloca i64, !insn.addr !55
%stack_var_-96.0.reg2mem = alloca i64, !insn.addr !55
%stack_var_-72 = alloca i32*, align 8
%stack_var_-104 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !56
%1 = call i64 @globalReturnsTrue(), !insn.addr !57
%2 = trunc i64 %1 to i32, !insn.addr !58
%3 = icmp eq i32 %2, 0, !insn.addr !58
br i1 %3, label %dec_label_pc_2f7, label %dec_label_pc_2e5, !insn.addr !59
dec_label_pc_2e5: ; preds = %dec_label_pc_258
%4 = ptrtoint i64* %stack_var_-104 to i64, !insn.addr !60
%5 = add i64 %4, -113, !insn.addr !61
%6 = and i64 %5, -16, !insn.addr !62
%7 = inttoptr i64 %6 to i32*, !insn.addr !63
store i32 0, i32* %7, align 16, !insn.addr !64
store i64 %6, i64* %stack_var_-96.0.reg2mem, !insn.addr !64
br label %dec_label_pc_2f7, !insn.addr !64
dec_label_pc_2f7: ; preds = %dec_label_pc_2e5, %dec_label_pc_258
%stack_var_-96.0.reload = load i64, i64* %stack_var_-96.0.reg2mem
store i32* inttoptr (i64 279172874305 to i32*), i32** %stack_var_-72, align 8, !insn.addr !65
%8 = ptrtoint i32** %stack_var_-72 to i64, !insn.addr !66
%9 = call i64 @wcslen(i64 %8), !insn.addr !67
%10 = add i64 %9, 1, !insn.addr !68
%11 = call i64 @wcsncpy(i64 %stack_var_-96.0.reload, i64 %8, i64 %10, i64 %8), !insn.addr !69
%12 = call i64 @printWLine(i64 %stack_var_-96.0.reload), !insn.addr !70
%13 = call i64 @__readfsqword(i64 40), !insn.addr !71
%14 = icmp eq i64 %0, %13, !insn.addr !71
store i64 0, i64* %rax.0.reg2mem, !insn.addr !72
br i1 %14, label %dec_label_pc_37b, label %dec_label_pc_376, !insn.addr !72
dec_label_pc_376: ; preds = %dec_label_pc_2f7
%15 = call i64 @__stack_chk_fail(), !insn.addr !73
store i64 %15, i64* %rax.0.reg2mem, !insn.addr !73
br label %dec_label_pc_37b, !insn.addr !73
dec_label_pc_37b: ; preds = %dec_label_pc_376, %dec_label_pc_2f7
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !74
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_ncpy_11_good() local_unnamed_addr {
dec_label_pc_37d:
%0 = call i64 @goodG2B1(), !insn.addr !75
%1 = call i64 @goodG2B2(), !insn.addr !76
ret i64 %1, !insn.addr !77
}
declare i64 @globalReturnsTrue() local_unnamed_addr
declare i64 @wcslen(i64) local_unnamed_addr
declare i64 @wcsncpy(i64, i64, i64, i64) local_unnamed_addr
declare i64 @printWLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @globalReturnsFalse() local_unnamed_addr
declare i64 @printLine(i8*) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 8}
!1 = !{i64 32}
!2 = !{i64 49}
!3 = !{i64 53}
!4 = !{i64 59}
!5 = !{i64 63}
!6 = !{i64 71}
!7 = !{i64 111}
!8 = !{i64 115}
!9 = !{i64 123}
!10 = !{i64 132}
!11 = !{i64 137}
!12 = !{i64 139}
!13 = !{i64 243}
!14 = !{i64 141}
!15 = !{i64 145}
!16 = !{i64 153}
!17 = !{i64 173}
!18 = !{i64 177}
!19 = !{i64 195}
!20 = !{i64 199}
!21 = !{i64 210}
!22 = !{i64 220}
!23 = !{i64 230}
!24 = !{i64 235}
!25 = !{i64 253}
!26 = !{i64 258}
!27 = !{i64 265}
!28 = !{i64 271}
!29 = !{i64 275}
!30 = !{i64 284}
!31 = !{i64 286}
!32 = !{i64 292}
!33 = !{i64 293}
!34 = !{i64 301}
!35 = !{i64 425}
!36 = !{i64 430}
!37 = !{i64 432}
!38 = !{i64 441}
!39 = !{i64 446}
!40 = !{i64 297}
!41 = !{i64 404}
!42 = !{i64 408}
!43 = !{i64 416}
!44 = !{i64 460}
!45 = !{i64 480}
!46 = !{i64 534}
!47 = !{i64 537}
!48 = !{i64 542}
!49 = !{i64 560}
!50 = !{i64 572}
!51 = !{i64 582}
!52 = !{i64 591}
!53 = !{i64 593}
!54 = !{i64 599}
!55 = !{i64 600}
!56 = !{i64 608}
!57 = !{i64 732}
!58 = !{i64 737}
!59 = !{i64 739}
!60 = !{i64 604}
!61 = !{i64 711}
!62 = !{i64 715}
!63 = !{i64 723}
!64 = !{i64 753}
!65 = !{i64 773}
!66 = !{i64 827}
!67 = !{i64 830}
!68 = !{i64 835}
!69 = !{i64 853}
!70 = !{i64 865}
!71 = !{i64 875}
!72 = !{i64 884}
!73 = !{i64 886}
!74 = !{i64 892}
!75 = !{i64 902}
!76 = !{i64 912}
!77 = !{i64 919}
### Assistant: @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_ncpy_11_bad.source = private unnamed_addr constant [11 x i32] [i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 0], align 16
@.str = private unnamed_addr constant [21 x i8] c"Benign, fixed string\00", align 1
@__const.goodG2B1.source = private unnamed_addr constant [11 x i32] [i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 0], align 16
@__const.goodG2B2.source = private unnamed_addr constant [11 x i32] [i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 0], align 16
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_ncpy_11_bad() #0 {
entry:
%data = alloca i32*, align 8
%dataBadBuffer = alloca i32*, align 8
%dataGoodBuffer = alloca i32*, align 8
%source = alloca [11 x i32], align 16
%0 = alloca i8, i64 40, align 16
%1 = bitcast i8* %0 to i32*
store i32* %1, i32** %dataBadBuffer, align 8
%2 = alloca i8, i64 44, align 16
%3 = bitcast i8* %2 to i32*
store i32* %3, i32** %dataGoodBuffer, align 8
%call = call i32 (...) @globalReturnsTrue()
%tobool = icmp ne i32 %call, 0
br i1 %tobool, label %if.then, label %if.end
if.then: ; preds = %entry
%4 = load i32*, i32** %dataBadBuffer, align 8
store i32* %4, i32** %data, align 8
%5 = load i32*, i32** %data, align 8
%arrayidx = getelementptr inbounds i32, i32* %5, i64 0
store i32 0, i32* %arrayidx, align 4
br label %if.end
if.end: ; preds = %if.then, %entry
%6 = bitcast [11 x i32]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 %6, i8* align 16 bitcast ([11 x i32]* @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_ncpy_11_bad.source to i8*), i64 44, i1 false)
%7 = load i32*, i32** %data, align 8
%arraydecay = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%arraydecay1 = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%call2 = call i64 @wcslen(i32* %arraydecay1) #5
%add = add i64 %call2, 1
%call3 = call i32* @wcsncpy(i32* %7, i32* %arraydecay, i64 %add) #6
%8 = load i32*, i32** %data, align 8
call void @printWLine(i32* %8)
ret void
}
declare dso_local i32 @globalReturnsTrue(...) #1
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #2
; Function Attrs: nounwind
declare dso_local i32* @wcsncpy(i32*, i32*, i64) #3
; Function Attrs: nounwind readonly
declare dso_local i64 @wcslen(i32*) #4
declare dso_local void @printWLine(i32*) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_ncpy_11_good() #0 {
entry:
call void @goodG2B1()
call void @goodG2B2()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B1() #0 {
entry:
%data = alloca i32*, align 8
%dataBadBuffer = alloca i32*, align 8
%dataGoodBuffer = alloca i32*, align 8
%source = alloca [11 x i32], align 16
%0 = alloca i8, i64 40, align 16
%1 = bitcast i8* %0 to i32*
store i32* %1, i32** %dataBadBuffer, align 8
%2 = alloca i8, i64 44, align 16
%3 = bitcast i8* %2 to i32*
store i32* %3, i32** %dataGoodBuffer, align 8
%call = call i32 (...) @globalReturnsFalse()
%tobool = icmp ne i32 %call, 0
br i1 %tobool, label %if.then, label %if.else
if.then: ; preds = %entry
call void @printLine(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
br label %if.end
if.else: ; preds = %entry
%4 = load i32*, i32** %dataGoodBuffer, align 8
store i32* %4, i32** %data, align 8
%5 = load i32*, i32** %data, align 8
%arrayidx = getelementptr inbounds i32, i32* %5, i64 0
store i32 0, i32* %arrayidx, align 4
br label %if.end
if.end: ; preds = %if.else, %if.then
%6 = bitcast [11 x i32]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 %6, i8* align 16 bitcast ([11 x i32]* @__const.goodG2B1.source to i8*), i64 44, i1 false)
%7 = load i32*, i32** %data, align 8
%arraydecay = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%arraydecay1 = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%call2 = call i64 @wcslen(i32* %arraydecay1) #5
%add = add i64 %call2, 1
%call3 = call i32* @wcsncpy(i32* %7, i32* %arraydecay, i64 %add) #6
%8 = load i32*, i32** %data, align 8
call void @printWLine(i32* %8)
ret void
}
declare dso_local i32 @globalReturnsFalse(...) #1
declare dso_local void @printLine(i8*) #1
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B2() #0 {
entry:
%data = alloca i32*, align 8
%dataBadBuffer = alloca i32*, align 8
%dataGoodBuffer = alloca i32*, align 8
%source = alloca [11 x i32], align 16
%0 = alloca i8, i64 40, align 16
%1 = bitcast i8* %0 to i32*
store i32* %1, i32** %dataBadBuffer, align 8
%2 = alloca i8, i64 44, align 16
%3 = bitcast i8* %2 to i32*
store i32* %3, i32** %dataGoodBuffer, align 8
%call = call i32 (...) @globalReturnsTrue()
%tobool = icmp ne i32 %call, 0
br i1 %tobool, label %if.then, label %if.end
if.then: ; preds = %entry
%4 = load i32*, i32** %dataGoodBuffer, align 8
store i32* %4, i32** %data, align 8
%5 = load i32*, i32** %data, align 8
%arrayidx = getelementptr inbounds i32, i32* %5, i64 0
store i32 0, i32* %arrayidx, align 4
br label %if.end
if.end: ; preds = %if.then, %entry
%6 = bitcast [11 x i32]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 %6, i8* align 16 bitcast ([11 x i32]* @__const.goodG2B2.source to i8*), i64 44, i1 false)
%7 = load i32*, i32** %data, align 8
%arraydecay = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%arraydecay1 = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%call2 = call i64 @wcslen(i32* %arraydecay1) #5
%add = add i64 %call2, 1
%call3 = call i32* @wcsncpy(i32* %7, i32* %arraydecay, i64 %add) #6
%8 = load i32*, i32** %data, align 8
call void @printWLine(i32* %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" }
attributes #1 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #2 = { argmemonly nounwind willreturn }
attributes #3 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #4 = { nounwind readonly "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #5 = { nounwind readonly }
attributes #6 = { nounwind }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_f = constant [3 x i8] c"%(\00"
@global_var_34c = local_unnamed_addr constant [21 x i8] c"Benign, fixed string\00"
@global_var_10 = external constant i128
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
ret i64 add (i64 sub (i64 ptrtoint (i128* @global_var_10 to i64), i64 1), i64 65), !insn.addr !1
}
define i64 @function_30(i64 %arg1, i64 %arg2, i64 %arg3, i64 %arg4) local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !2
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = load i64, i64* %0
%4 = add i64 %3, -9, !insn.addr !2
%5 = inttoptr i64 %4 to i8*, !insn.addr !2
%6 = load i8, i8* %5, align 1, !insn.addr !2
%7 = trunc i64 %arg4 to i8, !insn.addr !2
%8 = add i8 %6, %7, !insn.addr !2
store i8 %8, i8* %5, align 1, !insn.addr !2
%9 = call i64 @__asm_int1(), !insn.addr !3
%10 = mul i64 %9, ptrtoint (i128* @global_var_10 to i64), !insn.addr !4
%11 = sub i64 %2, %10, !insn.addr !5
%12 = add i64 %11, ptrtoint ([3 x i8]* @global_var_f to i64), !insn.addr !6
%13 = and i64 %12, -16, !insn.addr !7
%14 = add i64 %1, -128, !insn.addr !8
%15 = inttoptr i64 %14 to i64*, !insn.addr !8
store i64 %13, i64* %15, align 8, !insn.addr !8
%16 = add i64 %11, add (i64 ptrtoint ([3 x i8]* @global_var_f to i64), i64 sub (i64 0, i64 trunc (i128 mul (i128 sext (i64 trunc (i128 udiv (i128 zext (i64 add (i64 sub (i64 ptrtoint (i128* @global_var_10 to i64), i64 1), i64 115) to i128), i128 zext (i64 ptrtoint (i128* @global_var_10 to i64) to i128)) to i64) to i128), i128 ptrtoint (i128* @global_var_10 to i128)) to i64))), !insn.addr !9
%17 = and i64 %16, -16, !insn.addr !10
%18 = add i64 %1, -120, !insn.addr !11
%19 = inttoptr i64 %18 to i64*, !insn.addr !11
store i64 %17, i64* %19, align 8, !insn.addr !11
%20 = load i64, i64* %15, align 8, !insn.addr !12
%21 = add i64 %1, -136, !insn.addr !13
%22 = inttoptr i64 %21 to i64*, !insn.addr !13
store i64 %20, i64* %22, align 8, !insn.addr !13
%23 = inttoptr i64 %20 to i8*, !insn.addr !14
store i8 0, i8* %23, align 1, !insn.addr !14
%24 = add i64 %1, -112, !insn.addr !15
%25 = call i64 @memset(i64 %24, i64 67, i64 99, i64 %arg4), !insn.addr !16
%26 = add i64 %1, -13, !insn.addr !17
%27 = inttoptr i64 %26 to i8*, !insn.addr !17
store i8 0, i8* %27, align 1, !insn.addr !17
%28 = load i64, i64* %22, align 8, !insn.addr !18
%29 = call i64 @strncpy(i64 %28, i64 %24, i64 99, i64 %24), !insn.addr !19
%30 = load i64, i64* %22, align 8, !insn.addr !20
%31 = add i64 %30, 99, !insn.addr !21
%32 = inttoptr i64 %31 to i8*, !insn.addr !22
store i8 0, i8* %32, align 1, !insn.addr !22
%33 = load i64, i64* %22, align 8, !insn.addr !23
%34 = call i64 @printLine(i64 %33, i64 %24, i64 99, i64 %24), !insn.addr !24
%35 = add i64 %1, -8, !insn.addr !25
%36 = inttoptr i64 %35 to i64*, !insn.addr !25
%37 = load i64, i64* %36, align 8, !insn.addr !25
%38 = call i64 @__readfsqword(i64 40), !insn.addr !26
%39 = icmp eq i64 %37, %38, !insn.addr !26
store i64 0, i64* %rax.0.reg2mem, !insn.addr !27
br i1 %39, label %dec_label_pc_108, label %dec_label_pc_103, !insn.addr !27
dec_label_pc_103: ; preds = %dec_label_pc_30
%40 = call i64 @__stack_chk_fail(), !insn.addr !28
store i64 %40, i64* %rax.0.reg2mem, !insn.addr !28
br label %dec_label_pc_108, !insn.addr !28
dec_label_pc_108: ; preds = %dec_label_pc_103, %dec_label_pc_30
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !29
}
define i64 @goodG2B1() local_unnamed_addr {
dec_label_pc_10a:
%rax.0.reg2mem = alloca i64, !insn.addr !30
%stack_var_-120 = alloca i64, align 8
%stack_var_-152 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-152 to i64, !insn.addr !31
%1 = call i64 @__readfsqword(i64 40), !insn.addr !32
%2 = add i64 %0, add (i64 ptrtoint ([3 x i8]* @global_var_f to i64), i64 add (i64 sub (i64 0, i64 trunc (i128 mul (i128 sext (i64 trunc (i128 udiv (i128 zext (i64 add (i64 sub (i64 ptrtoint (i128* @global_var_10 to i64), i64 1), i64 115) to i128), i128 zext (i64 ptrtoint (i128* @global_var_10 to i64) to i128)) to i64) to i128), i128 ptrtoint (i128* @global_var_10 to i128)) to i64)), i64 sub (i64 0, i64 trunc (i128 mul (i128 sext (i64 trunc (i128 udiv (i128 zext (i64 add (i64 sub (i64 ptrtoint (i128* @global_var_10 to i64), i64 1), i64 65) to i128), i128 zext (i64 ptrtoint (i128* @global_var_10 to i64) to i128)) to i64) to i128), i128 ptrtoint (i128* @global_var_10 to i128)) to i64)))), !insn.addr !33
%3 = and i64 %2, -16, !insn.addr !34
%4 = inttoptr i64 %3 to i8*, !insn.addr !35
store i8 0, i8* %4, align 16, !insn.addr !36
%5 = ptrtoint i64* %stack_var_-120 to i64, !insn.addr !37
%6 = call i64 @memset(i64 %5, i64 67, i64 99, i64 ptrtoint (i128* @global_var_10 to i64)), !insn.addr !38
%7 = call i64 @strncpy(i64 %3, i64 %5, i64 99, i64 %5), !insn.addr !39
%8 = add i64 %3, 99, !insn.addr !40
%9 = inttoptr i64 %8 to i8*, !insn.addr !41
store i8 0, i8* %9, align 1, !insn.addr !41
%10 = call i64 @printLine(i64 %3, i64 %5, i64 99, i64 %5), !insn.addr !42
%11 = call i64 @__readfsqword(i64 40), !insn.addr !43
%12 = icmp eq i64 %1, %11, !insn.addr !43
store i64 0, i64* %rax.0.reg2mem, !insn.addr !44
br i1 %12, label %dec_label_pc_220, label %dec_label_pc_21b, !insn.addr !44
dec_label_pc_21b: ; preds = %dec_label_pc_10a
%13 = call i64 @__stack_chk_fail(), !insn.addr !45
store i64 %13, i64* %rax.0.reg2mem, !insn.addr !45
br label %dec_label_pc_220, !insn.addr !45
dec_label_pc_220: ; preds = %dec_label_pc_21b, %dec_label_pc_10a
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !46
}
define i64 @goodG2B2() local_unnamed_addr {
dec_label_pc_222:
%rax.0.reg2mem = alloca i64, !insn.addr !47
%stack_var_-120 = alloca i64, align 8
%stack_var_-152 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-152 to i64, !insn.addr !48
%1 = call i64 @__readfsqword(i64 40), !insn.addr !49
%2 = add i64 %0, add (i64 ptrtoint ([3 x i8]* @global_var_f to i64), i64 add (i64 sub (i64 0, i64 trunc (i128 mul (i128 sext (i64 trunc (i128 udiv (i128 zext (i64 add (i64 sub (i64 ptrtoint (i128* @global_var_10 to i64), i64 1), i64 115) to i128), i128 zext (i64 ptrtoint (i128* @global_var_10 to i64) to i128)) to i64) to i128), i128 ptrtoint (i128* @global_var_10 to i128)) to i64)), i64 sub (i64 0, i64 trunc (i128 mul (i128 sext (i64 trunc (i128 udiv (i128 zext (i64 add (i64 sub (i64 ptrtoint (i128* @global_var_10 to i64), i64 1), i64 65) to i128), i128 zext (i64 ptrtoint (i128* @global_var_10 to i64) to i128)) to i64) to i128), i128 ptrtoint (i128* @global_var_10 to i128)) to i64)))), !insn.addr !50
%3 = and i64 %2, -16, !insn.addr !51
%4 = inttoptr i64 %3 to i8*, !insn.addr !52
store i8 0, i8* %4, align 16, !insn.addr !53
%5 = ptrtoint i64* %stack_var_-120 to i64, !insn.addr !54
%6 = call i64 @memset(i64 %5, i64 67, i64 99, i64 ptrtoint (i128* @global_var_10 to i64)), !insn.addr !55
%7 = call i64 @strncpy(i64 %3, i64 %5, i64 99, i64 %5), !insn.addr !56
%8 = add i64 %3, 99, !insn.addr !57
%9 = inttoptr i64 %8 to i8*, !insn.addr !58
store i8 0, i8* %9, align 1, !insn.addr !58
%10 = call i64 @printLine(i64 %3, i64 %5, i64 99, i64 %5), !insn.addr !59
%11 = call i64 @__readfsqword(i64 40), !insn.addr !60
%12 = icmp eq i64 %1, %11, !insn.addr !60
store i64 0, i64* %rax.0.reg2mem, !insn.addr !61
br i1 %12, label %dec_label_pc_32a, label %dec_label_pc_325, !insn.addr !61
dec_label_pc_325: ; preds = %dec_label_pc_222
%13 = call i64 @__stack_chk_fail(), !insn.addr !62
store i64 %13, i64* %rax.0.reg2mem, !insn.addr !62
br label %dec_label_pc_32a, !insn.addr !62
dec_label_pc_32a: ; preds = %dec_label_pc_325, %dec_label_pc_222
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !63
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_ncpy_06_good() local_unnamed_addr {
dec_label_pc_32c:
%0 = call i64 @goodG2B1(), !insn.addr !64
%1 = call i64 @goodG2B2(), !insn.addr !65
ret i64 %1, !insn.addr !66
}
declare i64 @memset(i64, i64, i64, i64) local_unnamed_addr
declare i64 @strncpy(i64, i64, i64, i64) local_unnamed_addr
declare i64 @printLine(i64, i64, i64, i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @__asm_int1() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 11}
!1 = !{i64 35}
!2 = !{i64 48}
!3 = !{i64 51}
!4 = !{i64 52}
!5 = !{i64 56}
!6 = !{i64 62}
!7 = !{i64 66}
!8 = !{i64 74}
!9 = !{i64 114}
!10 = !{i64 118}
!11 = !{i64 126}
!12 = !{i64 140}
!13 = !{i64 144}
!14 = !{i64 158}
!15 = !{i64 161}
!16 = !{i64 178}
!17 = !{i64 183}
!18 = !{i64 191}
!19 = !{i64 209}
!20 = !{i64 214}
!21 = !{i64 221}
!22 = !{i64 225}
!23 = !{i64 228}
!24 = !{i64 238}
!25 = !{i64 244}
!26 = !{i64 248}
!27 = !{i64 257}
!28 = !{i64 259}
!29 = !{i64 265}
!30 = !{i64 266}
!31 = !{i64 270}
!32 = !{i64 277}
!33 = !{i64 380}
!34 = !{i64 384}
!35 = !{i64 392}
!36 = !{i64 438}
!37 = !{i64 455}
!38 = !{i64 458}
!39 = !{i64 489}
!40 = !{i64 501}
!41 = !{i64 505}
!42 = !{i64 518}
!43 = !{i64 528}
!44 = !{i64 537}
!45 = !{i64 539}
!46 = !{i64 545}
!47 = !{i64 546}
!48 = !{i64 550}
!49 = !{i64 557}
!50 = !{i64 660}
!51 = !{i64 664}
!52 = !{i64 672}
!53 = !{i64 704}
!54 = !{i64 721}
!55 = !{i64 724}
!56 = !{i64 755}
!57 = !{i64 767}
!58 = !{i64 771}
!59 = !{i64 784}
!60 = !{i64 794}
!61 = !{i64 803}
!62 = !{i64 805}
!63 = !{i64 811}
!64 = !{i64 821}
!65 = !{i64 831}
!66 = !{i64 838}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_ncpy_06_bad() #0 {
entry:
%data = alloca i8*, align 8
%dataBadBuffer = alloca i8*, align 8
%dataGoodBuffer = alloca i8*, align 8
%source = alloca [100 x i8], align 16
%0 = alloca i8, i64 50, align 16
store i8* %0, i8** %dataBadBuffer, align 8
%1 = alloca i8, i64 100, align 16
store i8* %1, i8** %dataGoodBuffer, align 8
%2 = load i8*, i8** %dataBadBuffer, align 8
store i8* %2, i8** %data, align 8
%3 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %3, i64 0
store i8 0, i8* %arrayidx, align 1
%arraydecay = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
call void @llvm.memset.p0i8.i64(i8* align 16 %arraydecay, i8 67, i64 99, i1 false)
%arrayidx1 = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 99
store i8 0, i8* %arrayidx1, align 1
%4 = load i8*, i8** %data, align 8
%arraydecay2 = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
%call = call i8* @strncpy(i8* %4, i8* %arraydecay2, i64 99) #4
%5 = load i8*, i8** %data, align 8
%arrayidx3 = getelementptr inbounds i8, i8* %5, i64 99
store i8 0, i8* %arrayidx3, align 1
%6 = load i8*, i8** %data, align 8
call void @printLine(i8* %6)
ret void
}
; Function Attrs: argmemonly nounwind willreturn writeonly
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #1
; Function Attrs: nounwind
declare dso_local i8* @strncpy(i8*, i8*, i64) #2
declare dso_local void @printLine(i8*) #3
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_ncpy_06_good() #0 {
entry:
call void @goodG2B1()
call void @goodG2B2()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B1() #0 {
entry:
%data = alloca i8*, align 8
%dataBadBuffer = alloca i8*, align 8
%dataGoodBuffer = alloca i8*, align 8
%source = alloca [100 x i8], align 16
%0 = alloca i8, i64 50, align 16
store i8* %0, i8** %dataBadBuffer, align 8
%1 = alloca i8, i64 100, align 16
store i8* %1, i8** %dataGoodBuffer, align 8
%2 = load i8*, i8** %dataGoodBuffer, align 8
store i8* %2, i8** %data, align 8
%3 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %3, i64 0
store i8 0, i8* %arrayidx, align 1
%arraydecay = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
call void @llvm.memset.p0i8.i64(i8* align 16 %arraydecay, i8 67, i64 99, i1 false)
%arrayidx1 = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 99
store i8 0, i8* %arrayidx1, align 1
%4 = load i8*, i8** %data, align 8
%arraydecay2 = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
%call = call i8* @strncpy(i8* %4, i8* %arraydecay2, i64 99) #4
%5 = load i8*, i8** %data, align 8
%arrayidx3 = getelementptr inbounds i8, i8* %5, i64 99
store i8 0, i8* %arrayidx3, align 1
%6 = load i8*, i8** %data, align 8
call void @printLine(i8* %6)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B2() #0 {
entry:
%data = alloca i8*, align 8
%dataBadBuffer = alloca i8*, align 8
%dataGoodBuffer = alloca i8*, align 8
%source = alloca [100 x i8], align 16
%0 = alloca i8, i64 50, align 16
store i8* %0, i8** %dataBadBuffer, align 8
%1 = alloca i8, i64 100, align 16
store i8* %1, i8** %dataGoodBuffer, align 8
%2 = load i8*, i8** %dataGoodBuffer, align 8
store i8* %2, i8** %data, align 8
%3 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %3, i64 0
store i8 0, i8* %arrayidx, align 1
%arraydecay = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
call void @llvm.memset.p0i8.i64(i8* align 16 %arraydecay, i8 67, i64 99, i1 false)
%arrayidx1 = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 99
store i8 0, i8* %arrayidx1, align 1
%4 = load i8*, i8** %data, align 8
%arraydecay2 = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
%call = call i8* @strncpy(i8* %4, i8* %arraydecay2, i64 99) #4
%5 = load i8*, i8** %data, align 8
%arrayidx3 = getelementptr inbounds i8, i8* %5, i64 99
store i8 0, i8* %arrayidx3, align 1
%6 = load i8*, i8** %data, align 8
call void @printLine(i8* %6)
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" }
attributes #1 = { argmemonly nounwind willreturn writeonly }
attributes #2 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #3 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_10 = local_unnamed_addr constant [3 x i8] c"%(\00"
define i64 @_GLOBAL_OFFSET_TABLE_.1(i64 %arg1) local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
ret i64 0, !insn.addr !1
}
define i64 @function_30(i64 %arg1, i64 %arg2, i64 %arg3, i64 %arg4) local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%.reg2mem = alloca i64, !insn.addr !2
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = trunc i64 %2 to i8
%4 = mul i8 %3, 2, !insn.addr !2
%5 = inttoptr i64 %2 to i8*, !insn.addr !2
store i8 %4, i8* %5, align 1, !insn.addr !2
%6 = add i64 %2, -57, !insn.addr !3
%7 = inttoptr i64 %6 to i8*, !insn.addr !3
%8 = load i8, i8* %7, align 1, !insn.addr !3
%9 = trunc i64 %arg4 to i8, !insn.addr !3
%10 = add i8 %8, %9, !insn.addr !3
store i8 %10, i8* %7, align 1, !insn.addr !3
%11 = add i64 %1, -16, !insn.addr !4
%12 = inttoptr i64 %11 to i64*, !insn.addr !4
store i64 0, i64* %12, align 8, !insn.addr !4
%13 = add i64 %1, -48, !insn.addr !5
%14 = add i64 %1, -56, !insn.addr !6
%15 = inttoptr i64 %14 to i64*, !insn.addr !6
%16 = load i64, i64* %15, align 8, !insn.addr !6
%17 = call i64 @memcpy(i64 %16, i64 %13, i64 40, i64 %13), !insn.addr !7
%18 = load i64, i64* %15, align 8, !insn.addr !8
%19 = inttoptr i64 %18 to i32*, !insn.addr !9
%20 = load i32, i32* %19, align 4, !insn.addr !9
%21 = zext i32 %20 to i64, !insn.addr !10
%22 = call i64 @printIntLine(i64 %21), !insn.addr !11
%23 = add i64 %1, -8, !insn.addr !12
%24 = inttoptr i64 %23 to i64*, !insn.addr !12
%25 = load i64, i64* %24, align 8, !insn.addr !12
%26 = call i64 @__readfsqword(i64 40), !insn.addr !13
%27 = icmp eq i64 %26, %25, !insn.addr !13
store i64 0, i64* %.reg2mem, !insn.addr !14
br i1 %27, label %dec_label_pc_7d, label %dec_label_pc_78, !insn.addr !14
dec_label_pc_78: ; preds = %dec_label_pc_30
%28 = call i64 @__stack_chk_fail(), !insn.addr !15
store i64 %28, i64* %.reg2mem, !insn.addr !15
br label %dec_label_pc_7d, !insn.addr !15
dec_label_pc_7d: ; preds = %dec_label_pc_78, %dec_label_pc_30
%.reload = load i64, i64* %.reg2mem, !insn.addr !16
ret i64 %.reload, !insn.addr !16
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_44_bad() local_unnamed_addr {
dec_label_pc_7f:
%rax.0.reg2mem = alloca i64, !insn.addr !17
%0 = call i64 @__readfsqword(i64 40), !insn.addr !18
%1 = call i64 @__readfsqword(i64 40), !insn.addr !19
%2 = icmp eq i64 %0, %1, !insn.addr !19
store i64 0, i64* %rax.0.reg2mem, !insn.addr !20
br i1 %2, label %dec_label_pc_ff, label %dec_label_pc_fa, !insn.addr !20
dec_label_pc_fa: ; preds = %dec_label_pc_7f
%3 = call i64 @__stack_chk_fail(), !insn.addr !21
store i64 %3, i64* %rax.0.reg2mem, !insn.addr !21
br label %dec_label_pc_ff, !insn.addr !21
dec_label_pc_ff: ; preds = %dec_label_pc_fa, %dec_label_pc_7f
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !22
}
define i64 @goodG2BSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_101:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !23
%1 = load i64, i64* %0
%stack_var_-56 = alloca i64, align 8
%2 = call i64 @__readfsqword(i64 40), !insn.addr !24
store i64 0, i64* %stack_var_-56, align 8, !insn.addr !25
%3 = ptrtoint i64* %stack_var_-56 to i64, !insn.addr !26
%4 = call i64 @memcpy(i64 %arg1, i64 %3, i64 40, i64 %3), !insn.addr !27
%5 = and i64 %1, 4294967295, !insn.addr !28
%6 = call i64 @printIntLine(i64 %5), !insn.addr !29
%7 = call i64 @__readfsqword(i64 40), !insn.addr !30
%8 = icmp eq i64 %2, %7, !insn.addr !30
store i64 0, i64* %rax.0.reg2mem, !insn.addr !31
br i1 %8, label %dec_label_pc_17e, label %dec_label_pc_179, !insn.addr !31
dec_label_pc_179: ; preds = %dec_label_pc_101
%9 = call i64 @__stack_chk_fail(), !insn.addr !32
store i64 %9, i64* %rax.0.reg2mem, !insn.addr !32
br label %dec_label_pc_17e, !insn.addr !32
dec_label_pc_17e: ; preds = %dec_label_pc_179, %dec_label_pc_101
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !33
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_180:
%rax.0.reg2mem = alloca i64, !insn.addr !34
%0 = call i64 @__readfsqword(i64 40), !insn.addr !35
%1 = call i64 @__readfsqword(i64 40), !insn.addr !36
%2 = icmp eq i64 %0, %1, !insn.addr !36
store i64 0, i64* %rax.0.reg2mem, !insn.addr !37
br i1 %2, label %dec_label_pc_200, label %dec_label_pc_1fb, !insn.addr !37
dec_label_pc_1fb: ; preds = %dec_label_pc_180
%3 = call i64 @__stack_chk_fail(), !insn.addr !38
store i64 %3, i64* %rax.0.reg2mem, !insn.addr !38
br label %dec_label_pc_200, !insn.addr !38
dec_label_pc_200: ; preds = %dec_label_pc_1fb, %dec_label_pc_180
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !39
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_44_good() local_unnamed_addr {
dec_label_pc_202:
%0 = call i64 @goodG2B(), !insn.addr !40
ret i64 %0, !insn.addr !41
}
declare i64 @memcpy(i64, i64, i64, i64) local_unnamed_addr
declare i64 @printIntLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 12}
!1 = !{i64 27}
!2 = !{i64 48}
!3 = !{i64 50}
!4 = !{i64 59}
!5 = !{i64 67}
!6 = !{i64 71}
!7 = !{i64 86}
!8 = !{i64 91}
!9 = !{i64 95}
!10 = !{i64 97}
!11 = !{i64 99}
!12 = !{i64 105}
!13 = !{i64 109}
!14 = !{i64 118}
!15 = !{i64 120}
!16 = !{i64 126}
!17 = !{i64 127}
!18 = !{i64 135}
!19 = !{i64 239}
!20 = !{i64 248}
!21 = !{i64 250}
!22 = !{i64 256}
!23 = !{i64 257}
!24 = !{i64 269}
!25 = !{i64 284}
!26 = !{i64 324}
!27 = !{i64 343}
!28 = !{i64 354}
!29 = !{i64 356}
!30 = !{i64 366}
!31 = !{i64 375}
!32 = !{i64 377}
!33 = !{i64 383}
!34 = !{i64 384}
!35 = !{i64 392}
!36 = !{i64 496}
!37 = !{i64 505}
!38 = !{i64 507}
!39 = !{i64 513}
!40 = !{i64 523}
!41 = !{i64 530}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_44_bad() #0 {
entry:
%data = alloca i32*, align 8
%funcPtr = alloca void (i32*)*, align 8
store void (i32*)* @badSink, void (i32*)** %funcPtr, align 8
store i32* null, i32** %data, align 8
%0 = alloca i8, i64 10, align 16
%1 = bitcast i8* %0 to i32*
store i32* %1, i32** %data, align 8
%2 = load void (i32*)*, void (i32*)** %funcPtr, align 8
%3 = load i32*, i32** %data, align 8
call void %2(i32* %3)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @badSink(i32* %data) #0 {
entry:
%data.addr = alloca i32*, align 8
%source = alloca [10 x i32], align 16
store i32* %data, i32** %data.addr, align 8
%0 = bitcast [10 x i32]* %source to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %0, i8 0, i64 40, i1 false)
%1 = load i32*, i32** %data.addr, align 8
%2 = bitcast i32* %1 to i8*
%arraydecay = getelementptr inbounds [10 x i32], [10 x i32]* %source, i64 0, i64 0
%3 = bitcast i32* %arraydecay to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 %2, i8* align 16 %3, i64 40, i1 false)
%4 = load i32*, i32** %data.addr, align 8
%arrayidx = getelementptr inbounds i32, i32* %4, i64 0
%5 = load i32, i32* %arrayidx, align 4
call void @printIntLine(i32 %5)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_44_good() #0 {
entry:
call void @goodG2B()
ret void
}
; Function Attrs: argmemonly nounwind willreturn writeonly
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #1
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #2
declare dso_local void @printIntLine(i32) #3
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B() #0 {
entry:
%data = alloca i32*, align 8
%funcPtr = alloca void (i32*)*, align 8
store void (i32*)* @goodG2BSink, void (i32*)** %funcPtr, align 8
store i32* null, i32** %data, align 8
%0 = alloca i8, i64 40, align 16
%1 = bitcast i8* %0 to i32*
store i32* %1, i32** %data, align 8
%2 = load void (i32*)*, void (i32*)** %funcPtr, align 8
%3 = load i32*, i32** %data, align 8
call void %2(i32* %3)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2BSink(i32* %data) #0 {
entry:
%data.addr = alloca i32*, align 8
%source = alloca [10 x i32], align 16
store i32* %data, i32** %data.addr, align 8
%0 = bitcast [10 x i32]* %source to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %0, i8 0, i64 40, i1 false)
%1 = load i32*, i32** %data.addr, align 8
%2 = bitcast i32* %1 to i8*
%arraydecay = getelementptr inbounds [10 x i32], [10 x i32]* %source, i64 0, i64 0
%3 = bitcast i32* %arraydecay to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 %2, i8* align 16 %3, i64 40, i1 false)
%4 = load i32*, i32** %data.addr, align 8
%arrayidx = getelementptr inbounds i32, i32* %4, i64 0
%5 = load i32, i32* %arrayidx, align 4
call void @printIntLine(i32 %5)
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" }
attributes #1 = { argmemonly nounwind willreturn writeonly }
attributes #2 = { argmemonly nounwind willreturn }
attributes #3 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@0 = external global i32
define i64 @_GLOBAL_OFFSET_TABLE_.1(i64 %arg1) local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
ret i64 0, !insn.addr !1
}
define i64 @function_31(i64 %arg1, i64 %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_31:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !2
%storemerge1.reg2mem = alloca i64, !insn.addr !2
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = add i64 %2, -117, !insn.addr !2
%4 = inttoptr i64 %3 to i32*, !insn.addr !2
%5 = load i32, i32* %4, align 4, !insn.addr !2
%6 = add i32 %5, -1, !insn.addr !2
store i32 %6, i32* %4, align 4, !insn.addr !2
%7 = and i64 %arg3, 4294967295, !insn.addr !3
%8 = inttoptr i64 %2 to i64*, !insn.addr !4
%9 = inttoptr i64 %7 to i32*, !insn.addr !4
%10 = call i64 @_ZNSt3mapIiP14_twoIntsStructSt4lessIiESaISt4pairIKiS1_EEEixEOi(i64* %8, i32* %9), !insn.addr !4
%11 = inttoptr i64 %10 to i64*, !insn.addr !5
%12 = load i64, i64* %11, align 8, !insn.addr !5
%13 = add i64 %1, -824, !insn.addr !6
%14 = inttoptr i64 %13 to i64*, !insn.addr !6
store i64 %12, i64* %14, align 8, !insn.addr !6
%15 = add i64 %1, -832, !insn.addr !7
%16 = inttoptr i64 %15 to i64*, !insn.addr !7
store i64 0, i64* %16, align 8
%17 = add i64 %1, -816
%18 = add i64 %1, -812, !insn.addr !8
store i64 0, i64* %storemerge1.reg2mem
br label %dec_label_pc_63
dec_label_pc_63: ; preds = %dec_label_pc_31, %dec_label_pc_63
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%19 = mul i64 %storemerge1.reload, 8, !insn.addr !9
%20 = add i64 %19, %17, !insn.addr !9
%21 = inttoptr i64 %20 to i32*, !insn.addr !9
store i32 0, i32* %21, align 4, !insn.addr !9
%22 = load i64, i64* %16, align 8, !insn.addr !10
%23 = mul i64 %22, 8, !insn.addr !8
%24 = add i64 %18, %23, !insn.addr !8
%25 = inttoptr i64 %24 to i32*, !insn.addr !8
store i32 0, i32* %25, align 4, !insn.addr !8
%26 = load i64, i64* %16, align 8, !insn.addr !11
%27 = add i64 %26, 1, !insn.addr !11
store i64 %27, i64* %16, align 8
%28 = icmp ult i64 %27, 100
store i64 %27, i64* %storemerge1.reg2mem, !insn.addr !12
br i1 %28, label %dec_label_pc_63, label %dec_label_pc_91, !insn.addr !12
dec_label_pc_91: ; preds = %dec_label_pc_63
%29 = load i64, i64* %14, align 8, !insn.addr !13
%30 = call i64 @memmove(i64 %29, i64 %17, i64 800, i64 %17), !insn.addr !14
%31 = load i64, i64* %14, align 8, !insn.addr !15
%32 = call i64 @printStructLine(i64 %31), !insn.addr !16
%33 = add i64 %1, -8, !insn.addr !17
%34 = inttoptr i64 %33 to i64*, !insn.addr !17
%35 = load i64, i64* %34, align 8, !insn.addr !17
%36 = call i64 @__readfsqword(i64 40), !insn.addr !18
%37 = icmp eq i64 %35, %36, !insn.addr !18
store i64 0, i64* %rax.0.reg2mem, !insn.addr !19
br i1 %37, label %dec_label_pc_d3, label %dec_label_pc_ce, !insn.addr !19
dec_label_pc_ce: ; preds = %dec_label_pc_91
%38 = call i64 @__stack_chk_fail(), !insn.addr !20
store i64 %38, i64* %rax.0.reg2mem, !insn.addr !20
br label %dec_label_pc_d3, !insn.addr !20
dec_label_pc_d3: ; preds = %dec_label_pc_ce, %dec_label_pc_91
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !21
}
define i64 @_ZN67CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_alloca_memmove_7411goodG2BSinkESt3mapIiP14_twoIntsStructSt4lessIiESaISt4pairIKiS2_EEE(i64 %arg1) local_unnamed_addr {
dec_label_pc_d5:
%rax.0.reg2mem = alloca i64, !insn.addr !22
%storemerge1.reg2mem = alloca i64, !insn.addr !22
%stack_var_-824 = alloca i64, align 8
%stack_var_-844 = alloca i32, align 4
%stack_var_-8 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !23
%1 = call i64 @__readfsqword(i64 40), !insn.addr !24
store i32 2, i32* %stack_var_-844, align 4, !insn.addr !25
%2 = inttoptr i64 %arg1 to i64*, !insn.addr !26
%3 = call i64 @_ZNSt3mapIiP14_twoIntsStructSt4lessIiESaISt4pairIKiS1_EEEixEOi(i64* %2, i32* nonnull %stack_var_-844), !insn.addr !26
%4 = inttoptr i64 %3 to i64*, !insn.addr !27
%5 = load i64, i64* %4, align 8, !insn.addr !27
store i64 0, i64* %storemerge1.reg2mem
br label %dec_label_pc_138
dec_label_pc_138: ; preds = %dec_label_pc_138, %dec_label_pc_d5
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%6 = mul i64 %storemerge1.reload, 8, !insn.addr !28
%7 = add i64 %6, %0
%8 = add i64 %7, -816, !insn.addr !28
%9 = inttoptr i64 %8 to i32*, !insn.addr !28
store i32 0, i32* %9, align 8, !insn.addr !28
%10 = add i64 %7, -812, !insn.addr !29
%11 = inttoptr i64 %10 to i32*, !insn.addr !29
store i32 0, i32* %11, align 4, !insn.addr !29
%12 = add nuw nsw i64 %storemerge1.reload, 1, !insn.addr !30
%exitcond = icmp eq i64 %12, 100
store i64 %12, i64* %storemerge1.reg2mem, !insn.addr !31
br i1 %exitcond, label %dec_label_pc_166, label %dec_label_pc_138, !insn.addr !31
dec_label_pc_166: ; preds = %dec_label_pc_138
%13 = ptrtoint i64* %stack_var_-824 to i64, !insn.addr !32
%14 = call i64 @memmove(i64 %5, i64 %13, i64 800, i64 %13), !insn.addr !33
%15 = call i64 @printStructLine(i64 %5), !insn.addr !34
%16 = call i64 @__readfsqword(i64 40), !insn.addr !35
%17 = icmp eq i64 %1, %16, !insn.addr !35
store i64 0, i64* %rax.0.reg2mem, !insn.addr !36
br i1 %17, label %dec_label_pc_1a8, label %dec_label_pc_1a3, !insn.addr !36
dec_label_pc_1a3: ; preds = %dec_label_pc_166
%18 = call i64 @__stack_chk_fail(), !insn.addr !37
store i64 %18, i64* %rax.0.reg2mem, !insn.addr !37
br label %dec_label_pc_1a8, !insn.addr !37
dec_label_pc_1a8: ; preds = %dec_label_pc_1a3, %dec_label_pc_166
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !38
}
define i64 @_ZnwmPv(i64 %arg1, i64* %arg2) local_unnamed_addr {
dec_label_pc_1aa:
%0 = ptrtoint i64* %arg2 to i64
ret i64 %0, !insn.addr !39
}
define i64 @_ZdlPvS_(i64* %arg1, i64* %arg2) local_unnamed_addr {
dec_label_pc_1bc:
%0 = alloca i64
%1 = load i64, i64* %0
ret i64 %1, !insn.addr !40
}
define i64* @_ZSt4moveIRiEONSt16remove_referenceIT_E4typeEOS2_(i32** %arg1) local_unnamed_addr {
dec_label_pc_1ce:
%0 = bitcast i32** %arg1 to i64*, !insn.addr !41
ret i64* %0, !insn.addr !41
}
define i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_1dc:
%0 = bitcast i64* %arg1 to i32*, !insn.addr !42
ret i32* %0, !insn.addr !42
}
define i64 @_ZNSt5tupleIJOiEEC1IJiELb1EEEDpOT_(i64* %result, i64 %arg2) local_unnamed_addr {
dec_label_pc_1ea:
%0 = inttoptr i64 %arg2 to i64*, !insn.addr !43
%1 = call i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i64* %0), !insn.addr !43
%2 = call i64 @_ZNSt11_Tuple_implILm0EJOiEEC1IiEEOT_(i64* %result, i32* %1), !insn.addr !44
ret i64 %2, !insn.addr !45
}
define i64 @_ZNSt11_Tuple_implILm0EJOiEEC1IiEEOT_(i64* %result, i32* %arg2) local_unnamed_addr {
dec_label_pc_21e:
%0 = bitcast i32* %arg2 to i64*
%1 = call i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i64* %0), !insn.addr !46
%2 = call i64 @_ZNSt10_Head_baseILm0EOiLb0EEC1IiEEOT_(i64* %result, i32* %1), !insn.addr !47
ret i64 %2, !insn.addr !48
}
define i64 @_ZNSt10_Head_baseILm0EOiLb0EEC1IiEEOT_(i64* %result, i32* %arg2) local_unnamed_addr {
dec_label_pc_252:
%0 = ptrtoint i64* %result to i64
%1 = bitcast i32* %arg2 to i64*
%2 = call i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i64* %1), !insn.addr !49
%3 = ptrtoint i32* %2 to i64, !insn.addr !49
store i64 %3, i64* %result, align 8, !insn.addr !50
ret i64 %0, !insn.addr !51
}
define i64 @_ZNSt5tupleIJOiEEC1EOS1_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_27c:
%0 = call i64 @_ZNSt11_Tuple_implILm0EJOiEEC1EOS1_(i64* %result, i64* %arg2), !insn.addr !52
ret i64 %0, !insn.addr !53
}
define i64 @_ZSt16forward_as_tupleIJiEESt5tupleIJDpOT_EES3_(i64* %result, i64 %arg2) local_unnamed_addr {
dec_label_pc_2a2:
%0 = ptrtoint i64* %result to i64
%1 = inttoptr i64 %arg2 to i64*, !insn.addr !54
%2 = call i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i64* %1), !insn.addr !54
%3 = ptrtoint i32* %2 to i64, !insn.addr !54
%4 = call i64 @_ZNSt5tupleIJOiEEC1IJiELb1EEEDpOT_(i64* %result, i64 %3), !insn.addr !55
ret i64 %0, !insn.addr !56
}
define i64 @_ZNSt3mapIiP14_twoIntsStructSt4lessIiESaISt4pairIKiS1_EEEixEOi(i64* %result, i32* %arg2) local_unnamed_addr {
dec_label_pc_2da:
%rax.0.reg2mem = alloca i64, !insn.addr !57
%stack_var_-57 = alloca i64, align 8
%stack_var_-48 = alloca i64, align 8
%stack_var_-40 = alloca i64, align 8
%stack_var_-56 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !58
%1 = call i64 @_ZNSt3mapIiP14_twoIntsStructSt4lessIiESaISt4pairIKiS1_EEE11lower_boundERS5_(i64* %result, i32* %arg2), !insn.addr !59
store i64 %1, i64* %stack_var_-56, align 8, !insn.addr !60
%2 = call i64 @_ZNSt3mapIiP14_twoIntsStructSt4lessIiESaISt4pairIKiS1_EEE3endEv(i64* %result), !insn.addr !61
store i64 %2, i64* %stack_var_-40, align 8, !insn.addr !62
%3 = call i64 @_ZNKSt17_Rb_tree_iteratorISt4pairIKiP14_twoIntsStructEEeqERKS5_(i64* nonnull %stack_var_-56, i64* nonnull %stack_var_-40), !insn.addr !63
%4 = trunc i64 %3 to i8, !insn.addr !64
%5 = icmp eq i8 %4, 0, !insn.addr !64
%6 = icmp eq i1 %5, false, !insn.addr !65
br i1 %6, label %dec_label_pc_37a, label %dec_label_pc_338, !insn.addr !65
dec_label_pc_338: ; preds = %dec_label_pc_2da
%7 = call i64 @_ZNKSt3mapIiP14_twoIntsStructSt4lessIiESaISt4pairIKiS1_EEE8key_compEv(i64* %result), !insn.addr !66
%8 = call i64 @_ZNKSt17_Rb_tree_iteratorISt4pairIKiP14_twoIntsStructEEdeEv(i64* nonnull %stack_var_-56), !insn.addr !67
%9 = inttoptr i64 %8 to i32*, !insn.addr !68
%10 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* nonnull %stack_var_-48, i32* %arg2, i32* %9), !insn.addr !68
%11 = trunc i64 %10 to i8, !insn.addr !69
%12 = icmp ne i8 %11, 0, !insn.addr !69
%phitmp = icmp eq i1 %12, false
br i1 %phitmp, label %dec_label_pc_3d7, label %dec_label_pc_37a, !insn.addr !70
dec_label_pc_37a: ; preds = %dec_label_pc_2da, %dec_label_pc_338
%13 = ptrtoint i64* %result to i64
%14 = bitcast i32* %arg2 to i32**
%15 = call i64* @_ZSt4moveIRiEONSt16remove_referenceIT_E4typeEOS2_(i32** %14), !insn.addr !71
%16 = ptrtoint i64* %15 to i64, !insn.addr !71
%17 = call i64 @_ZSt16forward_as_tupleIJiEESt5tupleIJDpOT_EES3_(i64* nonnull %stack_var_-48, i64 %16), !insn.addr !72
%18 = call i64 @_ZNSt23_Rb_tree_const_iteratorISt4pairIKiP14_twoIntsStructEEC1ERKSt17_Rb_tree_iteratorIS4_E(i64* nonnull %stack_var_-40, i64* nonnull %stack_var_-56), !insn.addr !73
%19 = load i64, i64* %stack_var_-40, align 8, !insn.addr !74
%20 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJOiEESF_IJEEEEESt17_Rb_tree_iteratorIS4_ESt23_Rb_tree_const_iteratorIS4_EDpOT_(i64 %13, i64 %19, i64 459, i64* nonnull %stack_var_-48, i64* nonnull %stack_var_-57), !insn.addr !75
store i64 %20, i64* %stack_var_-56, align 8, !insn.addr !76
br label %dec_label_pc_3d7, !insn.addr !76
dec_label_pc_3d7: ; preds = %dec_label_pc_37a, %dec_label_pc_338
%21 = call i64 @_ZNKSt17_Rb_tree_iteratorISt4pairIKiP14_twoIntsStructEEdeEv(i64* nonnull %stack_var_-56), !insn.addr !77
%22 = add i64 %21, 8, !insn.addr !78
%23 = call i64 @__readfsqword(i64 40), !insn.addr !79
%24 = icmp eq i64 %0, %23, !insn.addr !79
store i64 %22, i64* %rax.0.reg2mem, !insn.addr !80
br i1 %24, label %dec_label_pc_3fb, label %dec_label_pc_3f6, !insn.addr !80
dec_label_pc_3f6: ; preds = %dec_label_pc_3d7
%25 = call i64 @__stack_chk_fail(), !insn.addr !81
store i64 %25, i64* %rax.0.reg2mem, !insn.addr !81
br label %dec_label_pc_3fb, !insn.addr !81
dec_label_pc_3fb: ; preds = %dec_label_pc_3f6, %dec_label_pc_3d7
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !82
}
define i64 @_ZNSt3mapIiP14_twoIntsStructSt4lessIiESaISt4pairIKiS1_EEE11lower_boundERS5_(i64* %result, i32* %arg2) local_unnamed_addr {
dec_label_pc_402:
%0 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE11lower_boundERS1_(i64* %result, i32* %arg2), !insn.addr !83
ret i64 %0, !insn.addr !84
}
define i64 @_ZNSt3mapIiP14_twoIntsStructSt4lessIiESaISt4pairIKiS1_EEE3endEv(i64* %result) local_unnamed_addr {
dec_label_pc_428:
%0 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE3endEv(i64* %result), !insn.addr !85
ret i64 %0, !insn.addr !86
}
define i64 @_ZNKSt17_Rb_tree_iteratorISt4pairIKiP14_twoIntsStructEEeqERKS5_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_442:
%0 = ptrtoint i64* %arg2 to i64
%1 = icmp eq i64* %result, %arg2, !insn.addr !87
%2 = zext i1 %1 to i64, !insn.addr !88
%3 = and i64 %0, -256, !insn.addr !88
%4 = or i64 %3, %2, !insn.addr !88
ret i64 %4, !insn.addr !89
}
define i64 @_ZNKSt3mapIiP14_twoIntsStructSt4lessIiESaISt4pairIKiS1_EEE8key_compEv(i64* %result) local_unnamed_addr {
dec_label_pc_464:
%0 = alloca i64
%1 = load i64, i64* %0
%2 = call i64 @_ZNKSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE8key_compEv(i64* %result), !insn.addr !90
%3 = and i64 %1, 4294967295, !insn.addr !91
ret i64 %3, !insn.addr !92
}
define i64 @_ZNKSt17_Rb_tree_iteratorISt4pairIKiP14_twoIntsStructEEdeEv(i64* %result) local_unnamed_addr {
dec_label_pc_486:
%0 = call i64 @_ZNSt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEE9_M_valptrEv(i64* %result), !insn.addr !93
ret i64 %0, !insn.addr !94
}
define i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %arg2, i32* %arg3) local_unnamed_addr {
dec_label_pc_4a4:
%0 = alloca i64
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = trunc i64 %1 to i32
%4 = trunc i64 %2 to i32
%5 = sub i32 %3, %4, !insn.addr !95
%6 = xor i64 %2, %1
%7 = trunc i64 %6 to i32, !insn.addr !95
%8 = xor i32 %5, %3, !insn.addr !95
%9 = and i32 %8, %7, !insn.addr !95
%10 = icmp slt i32 %9, 0, !insn.addr !95
%11 = icmp slt i32 %5, 0, !insn.addr !95
%12 = icmp ne i1 %11, %10, !insn.addr !96
%13 = zext i1 %12 to i64, !insn.addr !96
%14 = and i64 %2, 4294967040
%15 = or i64 %14, %13, !insn.addr !96
ret i64 %15, !insn.addr !97
}
define i64 @_ZNSt23_Rb_tree_const_iteratorISt4pairIKiP14_twoIntsStructEEC1ERKSt17_Rb_tree_iteratorIS4_E(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_4c8:
%0 = ptrtoint i64* %arg2 to i64
%1 = ptrtoint i64* %result to i64
store i64 %0, i64* %result, align 8, !insn.addr !98
ret i64 %1, !insn.addr !99
}
define i64 @_ZNSt11_Tuple_implILm0EJOiEE7_M_headERS1_(i64* %arg1) local_unnamed_addr {
dec_label_pc_4e5:
%0 = call i64 @_ZNSt10_Head_baseILm0EOiLb0EE7_M_headERS1_(i64* %arg1), !insn.addr !100
ret i64 %0, !insn.addr !101
}
define i64 @_ZNSt10_Head_baseILm0EOiLb0EE7_M_headERS1_(i64* %arg1) local_unnamed_addr {
dec_label_pc_4ff:
%0 = ptrtoint i64* %arg1 to i64
ret i64 %0, !insn.addr !102
}
define i32** @_ZSt7forwardIOiEOT_RNSt16remove_referenceIS1_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_510:
%0 = bitcast i64* %arg1 to i32**, !insn.addr !103
ret i32** %0, !insn.addr !103
}
define i64 @_ZNSt11_Tuple_implILm0EJOiEEC1EOS1_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_51e:
%0 = call i64 @_ZNSt11_Tuple_implILm0EJOiEE7_M_headERS1_(i64* %arg2), !insn.addr !104
%1 = inttoptr i64 %0 to i64*, !insn.addr !105
%2 = call i32** @_ZSt7forwardIOiEOT_RNSt16remove_referenceIS1_E4typeE(i64* %1), !insn.addr !105
%3 = bitcast i32** %2 to i32*, !insn.addr !106
%4 = call i64 @_ZNSt10_Head_baseILm0EOiLb0EEC1IiEEOT_(i64* %result, i32* %3), !insn.addr !106
ret i64 %4, !insn.addr !107
}
define i64** @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_55a:
%0 = bitcast i64* %arg1 to i64**, !insn.addr !108
ret i64** %0, !insn.addr !108
}
define i64* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_568:
ret i64* %arg1, !insn.addr !109
}
define i64* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_576:
ret i64* %arg1, !insn.addr !110
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJOiEESF_IJEEEEESt17_Rb_tree_iteratorIS4_ESt23_Rb_tree_const_iteratorIS4_EDpOT_(i64 %arg1, i64 %arg2, i64 %arg3, i64* %arg4, i64* %arg5) local_unnamed_addr {
dec_label_pc_584:
%rax.0.reg2mem = alloca i64, !insn.addr !111
%storemerge.reg2mem = alloca i64, !insn.addr !111
%stack_var_-72 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !112
%1 = call i64* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(i64* %arg5), !insn.addr !113
%2 = ptrtoint i64* %1 to i64, !insn.addr !113
%3 = call i64* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(i64* %arg4), !insn.addr !114
%4 = ptrtoint i64* %3 to i64, !insn.addr !114
%5 = inttoptr i64 %arg3 to i64*, !insn.addr !115
%6 = call i64** @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(i64* %5), !insn.addr !115
%7 = ptrtoint i64** %6 to i64, !insn.addr !115
%8 = call i64* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE14_M_create_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESF_IJEEEEEPSt13_Rb_tree_nodeIS4_EDpOT_(i64 %arg1, i64 %7, i64 %4, i64 %2), !insn.addr !116
%9 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE6_S_keyEPKSt13_Rb_tree_nodeIS4_E(i64* %8), !insn.addr !117
%10 = inttoptr i64 %arg1 to i64*, !insn.addr !118
%11 = inttoptr i64 %9 to i32*, !insn.addr !118
%12 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS4_ERS1_(i64* %10, i64 %arg2, i32* %11), !insn.addr !118
%13 = icmp eq i64 %9, 0, !insn.addr !119
br i1 %13, label %dec_label_pc_642, label %dec_label_pc_628, !insn.addr !120
dec_label_pc_628: ; preds = %dec_label_pc_584
%14 = inttoptr i64 %12 to i64*, !insn.addr !121
%15 = inttoptr i64 %9 to i64*, !insn.addr !121
%16 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE14_M_insert_nodeEPSt18_Rb_tree_node_baseSC_PSt13_Rb_tree_nodeIS4_E(i64* %10, i64* %14, i64* %15, i64* %8), !insn.addr !121
store i64 %16, i64* %storemerge.reg2mem, !insn.addr !122
br label %dec_label_pc_66c, !insn.addr !122
dec_label_pc_642: ; preds = %dec_label_pc_584
%17 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE12_M_drop_nodeEPSt13_Rb_tree_nodeIS4_E(i64* %10, i64* %8), !insn.addr !123
%18 = inttoptr i64 %12 to i64*, !insn.addr !124
%19 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiP14_twoIntsStructEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-72, i64* %18), !insn.addr !124
%20 = load i64, i64* %stack_var_-72, align 8, !insn.addr !125
store i64 %20, i64* %storemerge.reg2mem, !insn.addr !125
br label %dec_label_pc_66c, !insn.addr !125
dec_label_pc_66c: ; preds = %dec_label_pc_642, %dec_label_pc_628
%storemerge.reload = load i64, i64* %storemerge.reg2mem
%21 = call i64 @__readfsqword(i64 40), !insn.addr !126
%22 = icmp eq i64 %0, %21, !insn.addr !126
store i64 %storemerge.reload, i64* %rax.0.reg2mem, !insn.addr !127
br i1 %22, label %dec_label_pc_6b5, label %dec_label_pc_6b0, !insn.addr !127
dec_label_pc_6b0: ; preds = %dec_label_pc_66c
%23 = call i64 @__stack_chk_fail(), !insn.addr !128
store i64 %23, i64* %rax.0.reg2mem, !insn.addr !128
br label %dec_label_pc_6b5, !insn.addr !128
dec_label_pc_6b5: ; preds = %dec_label_pc_6b0, %dec_label_pc_66c
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !129
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE11lower_boundERS1_(i64* %result, i32* %arg2) local_unnamed_addr {
dec_label_pc_6e0:
%0 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE6_M_endEv(i64* %result), !insn.addr !130
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE8_M_beginEv(i64* %result), !insn.addr !131
%2 = inttoptr i64 %1 to i64*, !insn.addr !132
%3 = inttoptr i64 %0 to i64*, !insn.addr !132
%4 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE14_M_lower_boundEPSt13_Rb_tree_nodeIS4_EPSt18_Rb_tree_node_baseRS1_(i64* %result, i64* %2, i64* %3, i32* %arg2), !insn.addr !132
ret i64 %4, !insn.addr !133
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE3endEv(i64* %result) local_unnamed_addr {
dec_label_pc_72c:
%rax.0.reg2mem = alloca i64, !insn.addr !134
%0 = ptrtoint i64* %result to i64
%stack_var_-24 = alloca i64, align 8
%1 = call i64 @__readfsqword(i64 40), !insn.addr !135
%2 = add i64 %0, 8, !insn.addr !136
%3 = inttoptr i64 %2 to i64*, !insn.addr !137
%4 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiP14_twoIntsStructEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-24, i64* %3), !insn.addr !137
%5 = load i64, i64* %stack_var_-24, align 8, !insn.addr !138
%6 = call i64 @__readfsqword(i64 40), !insn.addr !139
%7 = icmp eq i64 %1, %6, !insn.addr !139
store i64 %5, i64* %rax.0.reg2mem, !insn.addr !140
br i1 %7, label %dec_label_pc_776, label %dec_label_pc_771, !insn.addr !140
dec_label_pc_771: ; preds = %dec_label_pc_72c
%8 = call i64 @__stack_chk_fail(), !insn.addr !141
store i64 %8, i64* %rax.0.reg2mem, !insn.addr !141
br label %dec_label_pc_776, !insn.addr !141
dec_label_pc_776: ; preds = %dec_label_pc_771, %dec_label_pc_72c
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !142
}
define i64 @_ZNKSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE8key_compEv(i64* %result) local_unnamed_addr {
dec_label_pc_778:
%0 = alloca i64
%1 = load i64, i64* %0
ret i64 %1, !insn.addr !143
}
define i64 @_ZNSt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEE9_M_valptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_782:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 32, !insn.addr !144
%2 = inttoptr i64 %1 to i64*, !insn.addr !145
%3 = call i64 @_ZN9__gnu_cxx16__aligned_membufISt4pairIKiP14_twoIntsStructEE6_M_ptrEv(i64* %2), !insn.addr !145
ret i64 %3, !insn.addr !146
}
define i64* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE14_M_create_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESF_IJEEEEEPSt13_Rb_tree_nodeIS4_EDpOT_(i64 %arg1, i64 %arg2, i64 %arg3, i64 %arg4) local_unnamed_addr {
dec_label_pc_7a0:
%0 = inttoptr i64 %arg1 to i64*, !insn.addr !147
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE11_M_get_nodeEv(i64* %0), !insn.addr !147
%2 = inttoptr i64 %arg4 to i64*, !insn.addr !148
%3 = call i64* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(i64* %2), !insn.addr !148
%4 = ptrtoint i64* %3 to i64, !insn.addr !148
%5 = inttoptr i64 %arg3 to i64*, !insn.addr !149
%6 = call i64* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(i64* %5), !insn.addr !149
%7 = ptrtoint i64* %6 to i64, !insn.addr !149
%8 = inttoptr i64 %arg2 to i64*, !insn.addr !150
%9 = call i64** @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(i64* %8), !insn.addr !150
%10 = ptrtoint i64** %9 to i64, !insn.addr !150
call void @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE17_M_construct_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESF_IJEEEEEvPSt13_Rb_tree_nodeIS4_EDpOT_(i64 %arg1, i64 %1, i64 %10, i64 %7, i64 %4), !insn.addr !151
%11 = inttoptr i64 %1 to i64*, !insn.addr !152
ret i64* %11, !insn.addr !152
}
define i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEERKS1_OT_(i64* %result, i64** %arg2, i64*** %arg3) local_unnamed_addr {
dec_label_pc_81c:
%0 = ptrtoint i64** %arg2 to i64
%1 = ptrtoint i64* %result to i64
store i64 %0, i64* %result, align 8, !insn.addr !153
%2 = bitcast i64*** %arg3 to i64*, !insn.addr !154
%3 = call i64*** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(i64* %2), !insn.addr !154
%4 = load i64**, i64*** %3, align 8, !insn.addr !155
%5 = ptrtoint i64** %4 to i64, !insn.addr !155
%6 = add i64 %1, 8, !insn.addr !156
%7 = inttoptr i64 %6 to i64*, !insn.addr !156
store i64 %5, i64* %7, align 8, !insn.addr !156
ret i64 %1, !insn.addr !157
}
define i64*** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_858:
%0 = bitcast i64* %arg1 to i64***, !insn.addr !158
ret i64*** %0, !insn.addr !158
}
define i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_S4_Lb1EEEOT_OT0_(i64* %result, i64*** %arg2, i64*** %arg3) local_unnamed_addr {
dec_label_pc_866:
%0 = ptrtoint i64* %result to i64
%1 = bitcast i64*** %arg2 to i64*, !insn.addr !159
%2 = call i64*** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(i64* %1), !insn.addr !159
%3 = load i64**, i64*** %2, align 8, !insn.addr !160
%4 = ptrtoint i64** %3 to i64, !insn.addr !160
store i64 %4, i64* %result, align 8, !insn.addr !161
%5 = bitcast i64*** %arg3 to i64*, !insn.addr !162
%6 = call i64*** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(i64* %5), !insn.addr !162
%7 = load i64**, i64*** %6, align 8, !insn.addr !163
%8 = ptrtoint i64** %7 to i64, !insn.addr !163
%9 = add i64 %0, 8, !insn.addr !164
%10 = inttoptr i64 %9 to i64*, !insn.addr !164
store i64 %8, i64* %10, align 8, !insn.addr !164
ret i64 %0, !insn.addr !165
}
define i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEEOT_RKS1_(i64* %result, i64*** %arg2, i64** %arg3) local_unnamed_addr {
dec_label_pc_8aa:
%0 = ptrtoint i64* %result to i64
%1 = bitcast i64*** %arg2 to i64*, !insn.addr !166
%2 = call i64*** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(i64* %1), !insn.addr !166
%3 = load i64**, i64*** %2, align 8, !insn.addr !167
%4 = ptrtoint i64** %3 to i64, !insn.addr !167
store i64 %4, i64* %result, align 8, !insn.addr !168
%5 = add i64 %0, 8, !insn.addr !169
%6 = inttoptr i64 %5 to i64*, !insn.addr !169
store i64 %4, i64* %6, align 8, !insn.addr !169
ret i64 %0, !insn.addr !170
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS4_ERS1_(i64* %result, i64 %arg2, i32* %arg3) local_unnamed_addr {
dec_label_pc_8e6:
%rax.1.reg2mem = alloca i64, !insn.addr !171
%rax.0.reg2mem = alloca i64, !insn.addr !171
%stack_var_-72 = alloca i64, align 8
%stack_var_-56 = alloca i64, align 8
%stack_var_-64 = alloca i64, align 8
%stack_var_-80 = alloca i64, align 8
%stack_var_-104 = alloca i64, align 8
store i64 %arg2, i64* %stack_var_-104, align 8, !insn.addr !172
%0 = call i64 @__readfsqword(i64 40), !insn.addr !173
%1 = call i64 @_ZNKSt23_Rb_tree_const_iteratorISt4pairIKiP14_twoIntsStructEE13_M_const_castEv(i64* nonnull %stack_var_-104), !insn.addr !174
store i64 %1, i64* %stack_var_-80, align 8, !insn.addr !175
%2 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE6_M_endEv(i64* %result), !insn.addr !176
%3 = icmp eq i64 %1, %2, !insn.addr !177
%4 = icmp eq i1 %3, false, !insn.addr !178
br i1 %4, label %dec_label_pc_9dc, label %dec_label_pc_938, !insn.addr !179
dec_label_pc_938: ; preds = %dec_label_pc_8e6
%5 = call i64 @_ZNKSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE4sizeEv(i64* %result), !insn.addr !180
%6 = icmp eq i64 %5, 0, !insn.addr !181
br i1 %6, label %dec_label_pc_984, label %dec_label_pc_949, !insn.addr !182
dec_label_pc_949: ; preds = %dec_label_pc_938
%7 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE12_M_rightmostEv(i64* %result), !insn.addr !183
%8 = inttoptr i64 %7 to i64*, !insn.addr !184
%9 = load i64, i64* %8, align 8, !insn.addr !184
%10 = inttoptr i64 %9 to i64*, !insn.addr !185
%11 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %10), !insn.addr !185
%12 = inttoptr i64 %11 to i32*, !insn.addr !186
%13 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %12, i32* %arg3), !insn.addr !186
%14 = trunc i64 %13 to i8, !insn.addr !187
%15 = icmp eq i8 %14, 0, !insn.addr !187
br i1 %15, label %dec_label_pc_984, label %dec_label_pc_98d, !insn.addr !188
dec_label_pc_984: ; preds = %dec_label_pc_949, %dec_label_pc_938
%16 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE24_M_get_insert_unique_posERS1_(i64* %result, i32* %arg3), !insn.addr !189
store i64 %16, i64* %rax.0.reg2mem, !insn.addr !190
br label %dec_label_pc_c70, !insn.addr !190
dec_label_pc_98d: ; preds = %dec_label_pc_949
%17 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE12_M_rightmostEv(i64* %result), !insn.addr !191
store i64 0, i64* %stack_var_-64, align 8, !insn.addr !192
%18 = bitcast i64* %stack_var_-64 to i64**, !insn.addr !193
%19 = inttoptr i64 %17 to i64***, !insn.addr !193
%20 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEERKS1_OT_(i64* nonnull %stack_var_-56, i64** nonnull %18, i64*** %19), !insn.addr !193
%21 = load i64, i64* %stack_var_-56, align 8, !insn.addr !194
store i64 %21, i64* %rax.0.reg2mem, !insn.addr !195
br label %dec_label_pc_c70, !insn.addr !195
dec_label_pc_9dc: ; preds = %dec_label_pc_8e6
%22 = inttoptr i64 %1 to i64*
%23 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %22), !insn.addr !196
%24 = inttoptr i64 %23 to i32*, !insn.addr !197
%25 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %arg3, i32* %24), !insn.addr !197
%26 = trunc i64 %25 to i8, !insn.addr !198
%27 = icmp eq i8 %26, 0, !insn.addr !198
br i1 %27, label %dec_label_pc_b1a, label %dec_label_pc_a06, !insn.addr !199
dec_label_pc_a06: ; preds = %dec_label_pc_9dc
store i64 %1, i64* %stack_var_-72, align 8, !insn.addr !200
%28 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE11_M_leftmostEv(i64* %result), !insn.addr !201
%29 = inttoptr i64 %28 to i64*, !insn.addr !202
%30 = load i64, i64* %29, align 8, !insn.addr !202
%31 = icmp eq i64 %1, %30, !insn.addr !203
%32 = icmp eq i1 %31, false, !insn.addr !204
br i1 %32, label %dec_label_pc_a68, label %dec_label_pc_a2b, !insn.addr !205
dec_label_pc_a2b: ; preds = %dec_label_pc_a06
%33 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE11_M_leftmostEv(i64* %result), !insn.addr !206
%34 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE11_M_leftmostEv(i64* %result), !insn.addr !207
%35 = inttoptr i64 %34 to i64***, !insn.addr !208
%36 = inttoptr i64 %33 to i64***, !insn.addr !208
%37 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_S4_Lb1EEEOT_OT0_(i64* nonnull %stack_var_-56, i64*** %35, i64*** %36), !insn.addr !208
%38 = load i64, i64* %stack_var_-56, align 8, !insn.addr !209
store i64 %38, i64* %rax.0.reg2mem, !insn.addr !210
br label %dec_label_pc_c70, !insn.addr !210
dec_label_pc_a68: ; preds = %dec_label_pc_a06
%39 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiP14_twoIntsStructEEmmEv(i64* nonnull %stack_var_-72), !insn.addr !211
%40 = inttoptr i64 %39 to i64*, !insn.addr !212
%41 = load i64, i64* %40, align 8, !insn.addr !212
%42 = inttoptr i64 %41 to i64*, !insn.addr !213
%43 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %42), !insn.addr !213
%44 = inttoptr i64 %43 to i32*, !insn.addr !214
%45 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %44, i32* %arg3), !insn.addr !214
%46 = trunc i64 %45 to i8, !insn.addr !215
%47 = icmp eq i8 %46, 0, !insn.addr !215
br i1 %47, label %dec_label_pc_b02, label %dec_label_pc_a9c, !insn.addr !216
dec_label_pc_a9c: ; preds = %dec_label_pc_a68
%48 = load i64, i64* %stack_var_-72, align 8, !insn.addr !217
%49 = inttoptr i64 %48 to i64*, !insn.addr !218
%50 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE8_S_rightEPSt18_Rb_tree_node_base(i64* %49), !insn.addr !218
%51 = icmp eq i64 %50, 0, !insn.addr !219
%52 = icmp eq i1 %51, false, !insn.addr !220
br i1 %52, label %dec_label_pc_ade, label %dec_label_pc_ab2, !insn.addr !221
dec_label_pc_ab2: ; preds = %dec_label_pc_a9c
store i64 0, i64* %stack_var_-64, align 8, !insn.addr !222
%53 = bitcast i64* %stack_var_-64 to i64**, !insn.addr !223
%54 = bitcast i64* %stack_var_-72 to i64***, !insn.addr !223
%55 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEERKS1_OT_(i64* nonnull %stack_var_-56, i64** nonnull %53, i64*** nonnull %54), !insn.addr !223
%56 = load i64, i64* %stack_var_-56, align 8, !insn.addr !224
store i64 %56, i64* %rax.0.reg2mem, !insn.addr !225
br label %dec_label_pc_c70, !insn.addr !225
dec_label_pc_ade: ; preds = %dec_label_pc_a9c
%57 = bitcast i64* %stack_var_-80 to i64***, !insn.addr !226
%58 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_S4_Lb1EEEOT_OT0_(i64* nonnull %stack_var_-56, i64*** nonnull %57, i64*** nonnull %57), !insn.addr !226
%59 = load i64, i64* %stack_var_-56, align 8, !insn.addr !227
store i64 %59, i64* %rax.0.reg2mem, !insn.addr !228
br label %dec_label_pc_c70, !insn.addr !228
dec_label_pc_b02: ; preds = %dec_label_pc_a68
%60 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE24_M_get_insert_unique_posERS1_(i64* %result, i32* %arg3), !insn.addr !229
store i64 %60, i64* %rax.0.reg2mem, !insn.addr !230
br label %dec_label_pc_c70, !insn.addr !230
dec_label_pc_b1a: ; preds = %dec_label_pc_9dc
%61 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %22), !insn.addr !231
%62 = inttoptr i64 %61 to i32*, !insn.addr !232
%63 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %62, i32* %arg3), !insn.addr !232
%64 = trunc i64 %63 to i8, !insn.addr !233
%65 = icmp eq i8 %64, 0, !insn.addr !233
br i1 %65, label %dec_label_pc_c49, label %dec_label_pc_b47, !insn.addr !234
dec_label_pc_b47: ; preds = %dec_label_pc_b1a
%66 = load i64, i64* %stack_var_-80, align 8
store i64 %66, i64* %stack_var_-72, align 8, !insn.addr !235
%67 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE12_M_rightmostEv(i64* %result), !insn.addr !236
%68 = inttoptr i64 %67 to i64*, !insn.addr !237
%69 = load i64, i64* %68, align 8, !insn.addr !237
%70 = icmp eq i64 %66, %69, !insn.addr !238
%71 = icmp eq i1 %70, false, !insn.addr !239
br i1 %71, label %dec_label_pc_ba3, label %dec_label_pc_b6c, !insn.addr !240
dec_label_pc_b6c: ; preds = %dec_label_pc_b47
%72 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE12_M_rightmostEv(i64* %result), !insn.addr !241
store i64 0, i64* %stack_var_-64, align 8, !insn.addr !242
%73 = bitcast i64* %stack_var_-64 to i64**, !insn.addr !243
%74 = inttoptr i64 %72 to i64***, !insn.addr !243
%75 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEERKS1_OT_(i64* nonnull %stack_var_-56, i64** nonnull %73, i64*** %74), !insn.addr !243
%76 = load i64, i64* %stack_var_-56, align 8, !insn.addr !244
store i64 %76, i64* %rax.0.reg2mem, !insn.addr !245
br label %dec_label_pc_c70, !insn.addr !245
dec_label_pc_ba3: ; preds = %dec_label_pc_b47
%77 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiP14_twoIntsStructEEppEv(i64* nonnull %stack_var_-72), !insn.addr !246
%78 = inttoptr i64 %77 to i64*, !insn.addr !247
%79 = load i64, i64* %78, align 8, !insn.addr !247
%80 = inttoptr i64 %79 to i64*, !insn.addr !248
%81 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %80), !insn.addr !248
%82 = inttoptr i64 %81 to i32*, !insn.addr !249
%83 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %arg3, i32* %82), !insn.addr !249
%84 = trunc i64 %83 to i8, !insn.addr !250
%85 = icmp eq i8 %84, 0, !insn.addr !250
br i1 %85, label %dec_label_pc_c34, label %dec_label_pc_bd4, !insn.addr !251
dec_label_pc_bd4: ; preds = %dec_label_pc_ba3
%86 = load i64, i64* %stack_var_-80, align 8, !insn.addr !252
%87 = inttoptr i64 %86 to i64*, !insn.addr !253
%88 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE8_S_rightEPSt18_Rb_tree_node_base(i64* %87), !insn.addr !253
%89 = icmp eq i64 %88, 0, !insn.addr !254
%90 = icmp eq i1 %89, false, !insn.addr !255
br i1 %90, label %dec_label_pc_c13, label %dec_label_pc_bea, !insn.addr !256
dec_label_pc_bea: ; preds = %dec_label_pc_bd4
store i64 0, i64* %stack_var_-64, align 8, !insn.addr !257
%91 = bitcast i64* %stack_var_-64 to i64**, !insn.addr !258
%92 = bitcast i64* %stack_var_-80 to i64***, !insn.addr !258
%93 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEERKS1_OT_(i64* nonnull %stack_var_-56, i64** nonnull %91, i64*** nonnull %92), !insn.addr !258
%94 = load i64, i64* %stack_var_-56, align 8, !insn.addr !259
store i64 %94, i64* %rax.0.reg2mem, !insn.addr !260
br label %dec_label_pc_c70, !insn.addr !260
dec_label_pc_c13: ; preds = %dec_label_pc_bd4
%95 = bitcast i64* %stack_var_-72 to i64***, !insn.addr !261
%96 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_S4_Lb1EEEOT_OT0_(i64* nonnull %stack_var_-56, i64*** nonnull %95, i64*** nonnull %95), !insn.addr !261
%97 = load i64, i64* %stack_var_-56, align 8, !insn.addr !262
store i64 %97, i64* %rax.0.reg2mem, !insn.addr !263
br label %dec_label_pc_c70, !insn.addr !263
dec_label_pc_c34: ; preds = %dec_label_pc_ba3
%98 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE24_M_get_insert_unique_posERS1_(i64* %result, i32* %arg3), !insn.addr !264
store i64 %98, i64* %rax.0.reg2mem, !insn.addr !265
br label %dec_label_pc_c70, !insn.addr !265
dec_label_pc_c49: ; preds = %dec_label_pc_b1a
store i64 0, i64* %stack_var_-64, align 8, !insn.addr !266
%99 = bitcast i64* %stack_var_-80 to i64***, !insn.addr !267
%100 = bitcast i64* %stack_var_-64 to i64**, !insn.addr !267
%101 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEEOT_RKS1_(i64* nonnull %stack_var_-56, i64*** nonnull %99, i64** nonnull %100), !insn.addr !267
%102 = load i64, i64* %stack_var_-56, align 8, !insn.addr !268
store i64 %102, i64* %rax.0.reg2mem, !insn.addr !269
br label %dec_label_pc_c70, !insn.addr !269
dec_label_pc_c70: ; preds = %dec_label_pc_c49, %dec_label_pc_c34, %dec_label_pc_c13, %dec_label_pc_bea, %dec_label_pc_b6c, %dec_label_pc_b02, %dec_label_pc_ade, %dec_label_pc_ab2, %dec_label_pc_a2b, %dec_label_pc_984, %dec_label_pc_98d
%rax.0.reload = load i64, i64* %rax.0.reg2mem
%103 = call i64 @__readfsqword(i64 40), !insn.addr !270
%104 = icmp eq i64 %0, %103, !insn.addr !270
store i64 %rax.0.reload, i64* %rax.1.reg2mem, !insn.addr !271
br i1 %104, label %dec_label_pc_c84, label %dec_label_pc_c7f, !insn.addr !271
dec_label_pc_c7f: ; preds = %dec_label_pc_c70
%105 = call i64 @__stack_chk_fail(), !insn.addr !272
store i64 %105, i64* %rax.1.reg2mem, !insn.addr !272
br label %dec_label_pc_c84, !insn.addr !272
dec_label_pc_c84: ; preds = %dec_label_pc_c7f, %dec_label_pc_c70
%rax.1.reload = load i64, i64* %rax.1.reg2mem
ret i64 %rax.1.reload, !insn.addr !273
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE6_S_keyEPKSt13_Rb_tree_nodeIS4_E(i64* %arg1) local_unnamed_addr {
dec_label_pc_c8b:
%rax.0.reg2mem = alloca i64, !insn.addr !274
%stack_var_-17 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !275
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE8_S_valueEPKSt13_Rb_tree_nodeIS4_E(i64* %arg1), !insn.addr !276
%2 = inttoptr i64 %1 to i64*, !insn.addr !277
%3 = call i64 @_ZNKSt10_Select1stISt4pairIKiP14_twoIntsStructEEclERKS4_(i64* nonnull %stack_var_-17, i64* %2), !insn.addr !277
%4 = call i64 @__readfsqword(i64 40), !insn.addr !278
%5 = icmp eq i64 %0, %4, !insn.addr !278
store i64 %3, i64* %rax.0.reg2mem, !insn.addr !279
br i1 %5, label %dec_label_pc_cd8, label %dec_label_pc_cd3, !insn.addr !279
dec_label_pc_cd3: ; preds = %dec_label_pc_c8b
%6 = call i64 @__stack_chk_fail(), !insn.addr !280
store i64 %6, i64* %rax.0.reg2mem, !insn.addr !280
br label %dec_label_pc_cd8, !insn.addr !280
dec_label_pc_cd8: ; preds = %dec_label_pc_cd3, %dec_label_pc_c8b
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !281
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE14_M_insert_nodeEPSt18_Rb_tree_node_baseSC_PSt13_Rb_tree_nodeIS4_E(i64* %result, i64* %arg2, i64* %arg3, i64* %arg4) local_unnamed_addr {
dec_label_pc_cda:
%rax.0.reg2mem = alloca i64, !insn.addr !282
%storemerge.reg2mem = alloca i1, !insn.addr !282
%stack_var_-40 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !283
%1 = icmp eq i64* %arg2, null, !insn.addr !284
%2 = icmp eq i1 %1, false, !insn.addr !285
store i1 true, i1* %storemerge.reg2mem, !insn.addr !285
br i1 %2, label %dec_label_pc_d5a, label %dec_label_pc_d0b, !insn.addr !285
dec_label_pc_d0b: ; preds = %dec_label_pc_cda
%3 = ptrtoint i64* %arg3 to i64
%4 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE6_M_endEv(i64* %result), !insn.addr !286
%5 = icmp eq i64 %4, %3, !insn.addr !287
store i1 true, i1* %storemerge.reg2mem, !insn.addr !288
br i1 %5, label %dec_label_pc_d5a, label %dec_label_pc_d1d, !insn.addr !288
dec_label_pc_d1d: ; preds = %dec_label_pc_d0b
%6 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %arg3), !insn.addr !289
%7 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE6_S_keyEPKSt13_Rb_tree_nodeIS4_E(i64* %arg4), !insn.addr !290
%8 = inttoptr i64 %7 to i32*, !insn.addr !291
%9 = inttoptr i64 %6 to i32*, !insn.addr !291
%10 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %8, i32* %9), !insn.addr !291
%11 = trunc i64 %10 to i8, !insn.addr !292
%12 = icmp ne i8 %11, 0, !insn.addr !292
store i1 %12, i1* %storemerge.reg2mem
br label %dec_label_pc_d5a
dec_label_pc_d5a: ; preds = %dec_label_pc_d1d, %dec_label_pc_cda, %dec_label_pc_d0b
%13 = ptrtoint i64* %result to i64
%storemerge.reload = load i1, i1* %storemerge.reg2mem
%14 = add i64 %13, 8, !insn.addr !293
%15 = inttoptr i64 %14 to i64*, !insn.addr !294
%16 = call i64 @_ZSt29_Rb_tree_insert_and_rebalancebPSt18_Rb_tree_node_baseS0_RS_(i1 %storemerge.reload, i64* %arg4, i64* %arg3, i64* %15), !insn.addr !294
%17 = add i64 %13, 40, !insn.addr !295
%18 = inttoptr i64 %17 to i64*, !insn.addr !295
%19 = load i64, i64* %18, align 8, !insn.addr !295
%20 = add i64 %19, 1, !insn.addr !296
store i64 %20, i64* %18, align 8, !insn.addr !297
%21 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiP14_twoIntsStructEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-40, i64* %arg4), !insn.addr !298
%22 = load i64, i64* %stack_var_-40, align 8, !insn.addr !299
%23 = call i64 @__readfsqword(i64 40), !insn.addr !300
%24 = icmp eq i64 %0, %23, !insn.addr !300
store i64 %22, i64* %rax.0.reg2mem, !insn.addr !301
br i1 %24, label %dec_label_pc_db7, label %dec_label_pc_db2, !insn.addr !301
dec_label_pc_db2: ; preds = %dec_label_pc_d5a
%25 = call i64 @__stack_chk_fail(), !insn.addr !302
store i64 %25, i64* %rax.0.reg2mem, !insn.addr !302
br label %dec_label_pc_db7, !insn.addr !302
dec_label_pc_db7: ; preds = %dec_label_pc_db2, %dec_label_pc_d5a
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !303
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE12_M_drop_nodeEPSt13_Rb_tree_nodeIS4_E(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_dc0:
%0 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE15_M_destroy_nodeEPSt13_Rb_tree_nodeIS4_E(i64* %result, i64* %arg2), !insn.addr !304
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE11_M_put_nodeEPSt13_Rb_tree_nodeIS4_E(i64* %result, i64* %arg2), !insn.addr !305
ret i64 %1, !insn.addr !306
}
define i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiP14_twoIntsStructEEC1EPSt18_Rb_tree_node_base(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_dfa:
%0 = ptrtoint i64* %arg2 to i64
%1 = ptrtoint i64* %result to i64
store i64 %0, i64* %result, align 8, !insn.addr !307
ret i64 %1, !insn.addr !308
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE8_M_beginEv(i64* %result) local_unnamed_addr {
dec_label_pc_e14:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 16, !insn.addr !309
%2 = inttoptr i64 %1 to i64*, !insn.addr !309
%3 = load i64, i64* %2, align 8, !insn.addr !309
ret i64 %3, !insn.addr !310
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE6_M_endEv(i64* %result) local_unnamed_addr {
dec_label_pc_e26:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 8, !insn.addr !311
ret i64 %1, !insn.addr !312
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE14_M_lower_boundEPSt13_Rb_tree_nodeIS4_EPSt18_Rb_tree_node_baseRS1_(i64* %result, i64* %arg2, i64* %arg3, i32* %arg4) local_unnamed_addr {
dec_label_pc_e38:
%rax.0.reg2mem = alloca i64, !insn.addr !313
%stack_var_-64.0.ph.lcssa.reg2mem = alloca i64, !insn.addr !313
%stack_var_-56.03.reg2mem = alloca i64, !insn.addr !313
%stack_var_-56.0.ph5.reg2mem = alloca i64, !insn.addr !313
%stack_var_-64.0.ph6.reg2mem = alloca i64, !insn.addr !313
%0 = ptrtoint i64* %arg3 to i64
%stack_var_-40 = alloca i64, align 8
%1 = call i64 @__readfsqword(i64 40), !insn.addr !314
%2 = icmp eq i64* %arg2, null, !insn.addr !315
store i64 %0, i64* %stack_var_-64.0.ph.lcssa.reg2mem, !insn.addr !316
br i1 %2, label %dec_label_pc_ebf, label %dec_label_pc_e67.lr.ph.lr.ph, !insn.addr !316
dec_label_pc_e67.lr.ph.lr.ph: ; preds = %dec_label_pc_e38
%3 = ptrtoint i64* %arg2 to i64
store i64 %0, i64* %stack_var_-64.0.ph6.reg2mem
store i64 %3, i64* %stack_var_-56.0.ph5.reg2mem
br label %dec_label_pc_e67.lr.ph
dec_label_pc_e67.lr.ph: ; preds = %dec_label_pc_e67.lr.ph.lr.ph, %dec_label_pc_e93
%stack_var_-56.0.ph5.reload = load i64, i64* %stack_var_-56.0.ph5.reg2mem
%stack_var_-64.0.ph6.reload = load i64, i64* %stack_var_-64.0.ph6.reg2mem
store i64 %stack_var_-56.0.ph5.reload, i64* %stack_var_-56.03.reg2mem
br label %dec_label_pc_e67
dec_label_pc_e67: ; preds = %dec_label_pc_e67.lr.ph, %dec_label_pc_ead
%stack_var_-56.03.reload = load i64, i64* %stack_var_-56.03.reg2mem
%4 = inttoptr i64 %stack_var_-56.03.reload to i64*
%5 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE6_S_keyEPKSt13_Rb_tree_nodeIS4_E(i64* %4), !insn.addr !317
%6 = inttoptr i64 %5 to i32*, !insn.addr !318
%7 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %6, i32* %arg4), !insn.addr !318
%8 = trunc i64 %7 to i8
%9 = icmp eq i8 %8, 1, !insn.addr !319
br i1 %9, label %dec_label_pc_ead, label %dec_label_pc_e93, !insn.addr !320
dec_label_pc_e93: ; preds = %dec_label_pc_e67
%10 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE7_S_leftEPSt18_Rb_tree_node_base(i64* %4), !insn.addr !321
%11 = icmp eq i64 %10, 0, !insn.addr !315
store i64 %stack_var_-56.03.reload, i64* %stack_var_-64.0.ph6.reg2mem, !insn.addr !316
store i64 %10, i64* %stack_var_-56.0.ph5.reg2mem, !insn.addr !316
store i64 %stack_var_-56.03.reload, i64* %stack_var_-64.0.ph.lcssa.reg2mem, !insn.addr !316
br i1 %11, label %dec_label_pc_ebf, label %dec_label_pc_e67.lr.ph, !insn.addr !316
dec_label_pc_ead: ; preds = %dec_label_pc_e67
%12 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE8_S_rightEPSt18_Rb_tree_node_base(i64* %4), !insn.addr !322
%13 = icmp eq i64 %12, 0, !insn.addr !315
store i64 %12, i64* %stack_var_-56.03.reg2mem, !insn.addr !316
store i64 %stack_var_-64.0.ph6.reload, i64* %stack_var_-64.0.ph.lcssa.reg2mem, !insn.addr !316
br i1 %13, label %dec_label_pc_ebf, label %dec_label_pc_e67, !insn.addr !316
dec_label_pc_ebf: ; preds = %dec_label_pc_e93, %dec_label_pc_ead, %dec_label_pc_e38
%stack_var_-64.0.ph.lcssa.reload = load i64, i64* %stack_var_-64.0.ph.lcssa.reg2mem
%14 = inttoptr i64 %stack_var_-64.0.ph.lcssa.reload to i64*, !insn.addr !323
%15 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiP14_twoIntsStructEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-40, i64* %14), !insn.addr !323
%16 = load i64, i64* %stack_var_-40, align 8, !insn.addr !324
%17 = call i64 @__readfsqword(i64 40), !insn.addr !325
%18 = icmp eq i64 %1, %17, !insn.addr !325
store i64 %16, i64* %rax.0.reg2mem, !insn.addr !326
br i1 %18, label %dec_label_pc_eea, label %dec_label_pc_ee5, !insn.addr !326
dec_label_pc_ee5: ; preds = %dec_label_pc_ebf
%19 = call i64 @__stack_chk_fail(), !insn.addr !327
store i64 %19, i64* %rax.0.reg2mem, !insn.addr !327
br label %dec_label_pc_eea, !insn.addr !327
dec_label_pc_eea: ; preds = %dec_label_pc_ee5, %dec_label_pc_ebf
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !328
}
define i64 @_ZN9__gnu_cxx16__aligned_membufISt4pairIKiP14_twoIntsStructEE6_M_ptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_ef2:
%0 = call i64 @_ZN9__gnu_cxx16__aligned_membufISt4pairIKiP14_twoIntsStructEE7_M_addrEv(i64* %result), !insn.addr !329
ret i64 %0, !insn.addr !330
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE11_M_get_nodeEv(i64* %result) local_unnamed_addr {
dec_label_pc_f0c:
%0 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE21_M_get_Node_allocatorEv(i64* %result), !insn.addr !331
%1 = inttoptr i64 %0 to i64*, !insn.addr !332
%2 = call i64 @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEEE8allocateERS7_m(i64* %1, i64 1), !insn.addr !332
ret i64 %2, !insn.addr !333
}
define void @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE17_M_construct_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESF_IJEEEEEvPSt13_Rb_tree_nodeIS4_EDpOT_(i64 %arg1, i64 %arg2, i64 %arg3, i64 %arg4, i64 %arg5) local_unnamed_addr {
dec_label_pc_f34:
%0 = inttoptr i64 %arg2 to i64*, !insn.addr !334
%1 = call i64 @_ZnwmPv(i64 48, i64* %0), !insn.addr !334
%2 = inttoptr i64 %arg5 to i64*, !insn.addr !335
%3 = call i64* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(i64* %2), !insn.addr !335
%4 = ptrtoint i64* %3 to i64, !insn.addr !335
%5 = inttoptr i64 %arg4 to i64*, !insn.addr !336
%6 = call i64* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(i64* %5), !insn.addr !336
%7 = inttoptr i64 %arg3 to i64*, !insn.addr !337
%8 = call i64** @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(i64* %7), !insn.addr !337
%9 = call i64 @_ZNSt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEE9_M_valptrEv(i64* %0), !insn.addr !338
%10 = inttoptr i64 %arg1 to i64*, !insn.addr !339
%11 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE21_M_get_Node_allocatorEv(i64* %10), !insn.addr !339
%12 = inttoptr i64 %11 to i64*, !insn.addr !340
%13 = inttoptr i64 %9 to i64*, !insn.addr !340
%14 = bitcast i64** %8 to i64*, !insn.addr !340
call void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEEE9constructIS5_JRKSt21piecewise_construct_tSt5tupleIJOiEESD_IJEEEEEvRS7_PT_DpOT0_(i64* %12, i64* %13, i64* %14, i64* %6, i64 %4), !insn.addr !340
ret void, !insn.addr !341
}
define i64 @_ZNKSt23_Rb_tree_const_iteratorISt4pairIKiP14_twoIntsStructEE13_M_const_castEv(i64* %result) local_unnamed_addr {
dec_label_pc_1028:
%rax.0.reg2mem = alloca i64, !insn.addr !342
%stack_var_-24 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !343
%1 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiP14_twoIntsStructEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-24, i64* %result), !insn.addr !344
%2 = load i64, i64* %stack_var_-24, align 8, !insn.addr !345
%3 = call i64 @__readfsqword(i64 40), !insn.addr !346
%4 = icmp eq i64 %0, %3, !insn.addr !346
store i64 %2, i64* %rax.0.reg2mem, !insn.addr !347
br i1 %4, label %dec_label_pc_1071, label %dec_label_pc_106c, !insn.addr !347
dec_label_pc_106c: ; preds = %dec_label_pc_1028
%5 = call i64 @__stack_chk_fail(), !insn.addr !348
store i64 %5, i64* %rax.0.reg2mem, !insn.addr !348
br label %dec_label_pc_1071, !insn.addr !348
dec_label_pc_1071: ; preds = %dec_label_pc_106c, %dec_label_pc_1028
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !349
}
define i64 @_ZNKSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE4sizeEv(i64* %result) local_unnamed_addr {
dec_label_pc_1074:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 40, !insn.addr !350
%2 = inttoptr i64 %1 to i64*, !insn.addr !350
%3 = load i64, i64* %2, align 8, !insn.addr !350
ret i64 %3, !insn.addr !351
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE12_M_rightmostEv(i64* %result) local_unnamed_addr {
dec_label_pc_1086:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 32, !insn.addr !352
ret i64 %1, !insn.addr !353
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %arg1) local_unnamed_addr {
dec_label_pc_1098:
%rax.0.reg2mem = alloca i64, !insn.addr !354
%stack_var_-17 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !355
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE8_S_valueEPKSt18_Rb_tree_node_base(i64* %arg1), !insn.addr !356
%2 = inttoptr i64 %1 to i64*, !insn.addr !357
%3 = call i64 @_ZNKSt10_Select1stISt4pairIKiP14_twoIntsStructEEclERKS4_(i64* nonnull %stack_var_-17, i64* %2), !insn.addr !357
%4 = call i64 @__readfsqword(i64 40), !insn.addr !358
%5 = icmp eq i64 %0, %4, !insn.addr !358
store i64 %3, i64* %rax.0.reg2mem, !insn.addr !359
br i1 %5, label %dec_label_pc_10e5, label %dec_label_pc_10e0, !insn.addr !359
dec_label_pc_10e0: ; preds = %dec_label_pc_1098
%6 = call i64 @__stack_chk_fail(), !insn.addr !360
store i64 %6, i64* %rax.0.reg2mem, !insn.addr !360
br label %dec_label_pc_10e5, !insn.addr !360
dec_label_pc_10e5: ; preds = %dec_label_pc_10e0, %dec_label_pc_1098
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !361
}
define i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRPSt13_Rb_tree_nodeIS_IKiP14_twoIntsStructEERS1_Lb1EEEOT_OT0_(i64* %result, i64*** %arg2, i64*** %arg3) local_unnamed_addr {
dec_label_pc_10e8:
%0 = ptrtoint i64* %result to i64
%1 = bitcast i64*** %arg2 to i64*, !insn.addr !362
%2 = call i64*** @_ZSt7forwardIRPSt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEEOT_RNSt16remove_referenceIS9_E4typeE(i64* %1), !insn.addr !362
%3 = load i64**, i64*** %2, align 8, !insn.addr !363
%4 = ptrtoint i64** %3 to i64, !insn.addr !363
store i64 %4, i64* %result, align 8, !insn.addr !364
%5 = bitcast i64*** %arg3 to i64*, !insn.addr !365
%6 = call i64*** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(i64* %5), !insn.addr !365
%7 = load i64**, i64*** %6, align 8, !insn.addr !366
%8 = ptrtoint i64** %7 to i64, !insn.addr !366
%9 = add i64 %0, 8, !insn.addr !367
%10 = inttoptr i64 %9 to i64*, !insn.addr !367
store i64 %8, i64* %10, align 8, !insn.addr !367
ret i64 %0, !insn.addr !368
}
define i64*** @_ZSt7forwardIRPSt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEEOT_RNSt16remove_referenceIS9_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_112c:
%0 = bitcast i64* %arg1 to i64***, !insn.addr !369
ret i64*** %0, !insn.addr !369
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE24_M_get_insert_unique_posERS1_(i64* %result, i32* %arg2) local_unnamed_addr {
dec_label_pc_113a:
%rax.1.reg2mem = alloca i64, !insn.addr !370
%storemerge.reg2mem = alloca i64, !insn.addr !370
%.reg2mem = alloca i64, !insn.addr !370
%stack_var_-64 = alloca i64, align 8
%stack_var_-56 = alloca i64, align 8
%stack_var_-72 = alloca i64, align 8
%stack_var_-80 = alloca i64, align 8
%stack_var_-88 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !371
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE8_M_beginEv(i64* %result)
store i64 %1, i64* %stack_var_-88, align 8, !insn.addr !372
%2 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE6_M_endEv(i64* %result), !insn.addr !373
store i64 %2, i64* %stack_var_-80, align 8, !insn.addr !374
%3 = icmp eq i64 %1, 0, !insn.addr !375
store i64 %1, i64* %.reg2mem, !insn.addr !376
br i1 %3, label %dec_label_pc_11da.thread, label %dec_label_pc_1187, !insn.addr !376
dec_label_pc_11da.thread: ; preds = %dec_label_pc_113a
%4 = inttoptr i64 %2 to i64*, !insn.addr !377
%5 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiP14_twoIntsStructEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-72, i64* %4), !insn.addr !377
br label %dec_label_pc_11f3
dec_label_pc_1187: ; preds = %dec_label_pc_113a, %dec_label_pc_11d4
%.reload = load i64, i64* %.reg2mem
store i64 %.reload, i64* %stack_var_-80, align 8, !insn.addr !378
%6 = inttoptr i64 %.reload to i64*, !insn.addr !379
%7 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE6_S_keyEPKSt13_Rb_tree_nodeIS4_E(i64* %6), !insn.addr !379
%8 = inttoptr i64 %7 to i32*, !insn.addr !380
%9 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %arg2, i32* %8), !insn.addr !380
%10 = trunc i64 %9 to i8
%11 = icmp eq i8 %10, 0
%12 = load i64, i64* %stack_var_-88, align 8
%13 = inttoptr i64 %12 to i64*
br i1 %11, label %dec_label_pc_11c8, label %dec_label_pc_11ba, !insn.addr !381
dec_label_pc_11ba: ; preds = %dec_label_pc_1187
%14 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE7_S_leftEPSt18_Rb_tree_node_base(i64* %13), !insn.addr !382
store i64 %14, i64* %storemerge.reg2mem, !insn.addr !383
br label %dec_label_pc_11d4, !insn.addr !383
dec_label_pc_11c8: ; preds = %dec_label_pc_1187
%15 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE8_S_rightEPSt18_Rb_tree_node_base(i64* %13), !insn.addr !384
store i64 %15, i64* %storemerge.reg2mem, !insn.addr !384
br label %dec_label_pc_11d4, !insn.addr !384
dec_label_pc_11d4: ; preds = %dec_label_pc_11c8, %dec_label_pc_11ba
%storemerge.reload = load i64, i64* %storemerge.reg2mem
store i64 %storemerge.reload, i64* %stack_var_-88, align 8, !insn.addr !385
%16 = icmp eq i64 %storemerge.reload, 0, !insn.addr !375
store i64 %storemerge.reload, i64* %.reg2mem, !insn.addr !376
br i1 %16, label %dec_label_pc_11da, label %dec_label_pc_1187, !insn.addr !376
dec_label_pc_11da: ; preds = %dec_label_pc_11d4
%.pre = load i64, i64* %stack_var_-80, align 8
%17 = inttoptr i64 %.pre to i64*, !insn.addr !377
%18 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiP14_twoIntsStructEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-72, i64* %17), !insn.addr !377
br i1 %11, label %dec_label_pc_1247, label %dec_label_pc_11f3, !insn.addr !386
dec_label_pc_11f3: ; preds = %dec_label_pc_11da.thread, %dec_label_pc_11da
%19 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE5beginEv(i64* %result), !insn.addr !387
store i64 %19, i64* %stack_var_-56, align 8, !insn.addr !388
%20 = call i64 @_ZNKSt17_Rb_tree_iteratorISt4pairIKiP14_twoIntsStructEEeqERKS5_(i64* nonnull %stack_var_-72, i64* nonnull %stack_var_-56), !insn.addr !389
%21 = trunc i64 %20 to i8, !insn.addr !390
%22 = icmp eq i8 %21, 0, !insn.addr !390
br i1 %22, label %dec_label_pc_123b, label %dec_label_pc_121a, !insn.addr !391
dec_label_pc_121a: ; preds = %dec_label_pc_11f3
%23 = bitcast i64* %stack_var_-88 to i64***, !insn.addr !392
%24 = bitcast i64* %stack_var_-80 to i64***, !insn.addr !392
%25 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRPSt13_Rb_tree_nodeIS_IKiP14_twoIntsStructEERS1_Lb1EEEOT_OT0_(i64* nonnull %stack_var_-56, i64*** nonnull %23, i64*** nonnull %24), !insn.addr !392
br label %dec_label_pc_12b8, !insn.addr !393
dec_label_pc_123b: ; preds = %dec_label_pc_11f3
%26 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiP14_twoIntsStructEEmmEv(i64* nonnull %stack_var_-72), !insn.addr !394
br label %dec_label_pc_1247, !insn.addr !394
dec_label_pc_1247: ; preds = %dec_label_pc_123b, %dec_label_pc_11da
%27 = load i64, i64* %stack_var_-72, align 8, !insn.addr !395
%28 = inttoptr i64 %27 to i64*, !insn.addr !396
%29 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %28), !insn.addr !396
%30 = inttoptr i64 %29 to i32*, !insn.addr !397
%31 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %30, i32* %arg2), !insn.addr !397
%32 = trunc i64 %31 to i8, !insn.addr !398
%33 = icmp eq i8 %32, 0, !insn.addr !398
br i1 %33, label %dec_label_pc_1291, label %dec_label_pc_1270, !insn.addr !399
dec_label_pc_1270: ; preds = %dec_label_pc_1247
%34 = bitcast i64* %stack_var_-88 to i64***, !insn.addr !400
%35 = bitcast i64* %stack_var_-80 to i64***, !insn.addr !400
%36 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRPSt13_Rb_tree_nodeIS_IKiP14_twoIntsStructEERS1_Lb1EEEOT_OT0_(i64* nonnull %stack_var_-56, i64*** nonnull %34, i64*** nonnull %35), !insn.addr !400
br label %dec_label_pc_12b8, !insn.addr !401
dec_label_pc_1291: ; preds = %dec_label_pc_1247
store i64 0, i64* %stack_var_-64, align 8, !insn.addr !402
%37 = bitcast i64* %stack_var_-72 to i64***, !insn.addr !403
%38 = bitcast i64* %stack_var_-64 to i64**, !insn.addr !403
%39 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEEOT_RKS1_(i64* nonnull %stack_var_-56, i64*** nonnull %37, i64** nonnull %38), !insn.addr !403
br label %dec_label_pc_12b8, !insn.addr !404
dec_label_pc_12b8: ; preds = %dec_label_pc_1291, %dec_label_pc_1270, %dec_label_pc_121a
%rax.0 = load i64, i64* %stack_var_-56, align 8
%40 = call i64 @__readfsqword(i64 40), !insn.addr !405
%41 = icmp eq i64 %0, %40, !insn.addr !405
store i64 %rax.0, i64* %rax.1.reg2mem, !insn.addr !406
br i1 %41, label %dec_label_pc_12cc, label %dec_label_pc_12c7, !insn.addr !406
dec_label_pc_12c7: ; preds = %dec_label_pc_12b8
%42 = call i64 @__stack_chk_fail(), !insn.addr !407
store i64 %42, i64* %rax.1.reg2mem, !insn.addr !407
br label %dec_label_pc_12cc, !insn.addr !407
dec_label_pc_12cc: ; preds = %dec_label_pc_12c7, %dec_label_pc_12b8
%rax.1.reload = load i64, i64* %rax.1.reg2mem
ret i64 %rax.1.reload, !insn.addr !408
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE11_M_leftmostEv(i64* %result) local_unnamed_addr {
dec_label_pc_12d4:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 24, !insn.addr !409
ret i64 %1, !insn.addr !410
}
define i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiP14_twoIntsStructEEmmEv(i64* %result) local_unnamed_addr {
dec_label_pc_12e6:
%0 = ptrtoint i64* %result to i64
%1 = call i64 @_ZSt18_Rb_tree_decrementPSt18_Rb_tree_node_base(i64* %result), !insn.addr !411
store i64 %1, i64* %result, align 8, !insn.addr !412
ret i64 %0, !insn.addr !413
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE8_S_rightEPSt18_Rb_tree_node_base(i64* %arg1) local_unnamed_addr {
dec_label_pc_1311:
%0 = ptrtoint i64* %arg1 to i64
%1 = add i64 %0, 24, !insn.addr !414
%2 = inttoptr i64 %1 to i64*, !insn.addr !414
%3 = load i64, i64* %2, align 8, !insn.addr !414
ret i64 %3, !insn.addr !415
}
define i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiP14_twoIntsStructEEppEv(i64* %result) local_unnamed_addr {
dec_label_pc_1324:
%0 = ptrtoint i64* %result to i64
%1 = call i64 @_ZSt18_Rb_tree_incrementPSt18_Rb_tree_node_base(i64* %result), !insn.addr !416
store i64 %1, i64* %result, align 8, !insn.addr !417
ret i64 %0, !insn.addr !418
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE8_S_valueEPKSt13_Rb_tree_nodeIS4_E(i64* %arg1) local_unnamed_addr {
dec_label_pc_134f:
%0 = call i64 @_ZNKSt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEE9_M_valptrEv(i64* %arg1), !insn.addr !419
ret i64 %0, !insn.addr !420
}
define i64 @_ZNKSt10_Select1stISt4pairIKiP14_twoIntsStructEEclERKS4_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_136a:
%0 = ptrtoint i64* %arg2 to i64
ret i64 %0, !insn.addr !421
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE15_M_destroy_nodeEPSt13_Rb_tree_nodeIS4_E(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_137c:
%0 = call i64 @_ZNSt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEE9_M_valptrEv(i64* %arg2), !insn.addr !422
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE21_M_get_Node_allocatorEv(i64* %result), !insn.addr !423
%2 = inttoptr i64 %1 to i64*, !insn.addr !424
%3 = inttoptr i64 %0 to i64*, !insn.addr !424
call void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEEE7destroyIS5_EEvRS7_PT_(i64* %2, i64* %3), !insn.addr !424
ret i64 ptrtoint (i32* @0 to i64), !insn.addr !425
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE11_M_put_nodeEPSt13_Rb_tree_nodeIS4_E(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_13c0:
%0 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE21_M_get_Node_allocatorEv(i64* %result), !insn.addr !426
%1 = inttoptr i64 %0 to i64*, !insn.addr !427
%2 = call i64 @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEEE10deallocateERS7_PS6_m(i64* %1, i64* %arg2, i64 1), !insn.addr !427
ret i64 %2, !insn.addr !428
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE7_S_leftEPSt18_Rb_tree_node_base(i64* %arg1) local_unnamed_addr {
dec_label_pc_13fa:
%0 = ptrtoint i64* %arg1 to i64
%1 = add i64 %0, 16, !insn.addr !429
%2 = inttoptr i64 %1 to i64*, !insn.addr !429
%3 = load i64, i64* %2, align 8, !insn.addr !429
ret i64 %3, !insn.addr !430
}
define i64 @_ZN9__gnu_cxx16__aligned_membufISt4pairIKiP14_twoIntsStructEE7_M_addrEv(i64* %result) local_unnamed_addr {
dec_label_pc_140c:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !431
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE21_M_get_Node_allocatorEv(i64* %result) local_unnamed_addr {
dec_label_pc_141a:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !432
}
define i64 @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEEE8allocateERS7_m(i64* %arg1, i64 %arg2) local_unnamed_addr {
dec_label_pc_1428:
%0 = call i64 @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEE8allocateEmPKv(i64* %arg1, i64 %arg2, i64* null), !insn.addr !433
ret i64 %0, !insn.addr !434
}
define void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEEE9constructIS5_JRKSt21piecewise_construct_tSt5tupleIJOiEESD_IJEEEEEvRS7_PT_DpOT0_(i64* %this, i64* %result, i64* %arg3, i64* %arg4, i64 %arg5) local_unnamed_addr {
dec_label_pc_1452:
%0 = ptrtoint i64* %result to i64
%1 = ptrtoint i64* %this to i64
%2 = inttoptr i64 %arg5 to i64*, !insn.addr !435
%3 = call i64* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(i64* %2), !insn.addr !435
%4 = ptrtoint i64* %3 to i64, !insn.addr !435
%5 = call i64* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(i64* %arg4), !insn.addr !436
%6 = ptrtoint i64* %5 to i64, !insn.addr !436
%7 = call i64** @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(i64* %arg3), !insn.addr !437
%8 = ptrtoint i64** %7 to i64, !insn.addr !437
call void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEE9constructIS6_JRKSt21piecewise_construct_tSt5tupleIJOiEESD_IJEEEEEvPT_DpOT0_(i64 %1, i64 %0, i64 %8, i64 %6, i64 %4), !insn.addr !438
ret void, !insn.addr !439
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE8_S_valueEPKSt18_Rb_tree_node_base(i64* %arg1) local_unnamed_addr {
dec_label_pc_14be:
%0 = call i64 @_ZNKSt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEE9_M_valptrEv(i64* %arg1), !insn.addr !440
ret i64 %0, !insn.addr !441
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE5beginEv(i64* %result) local_unnamed_addr {
dec_label_pc_14d8:
%rax.0.reg2mem = alloca i64, !insn.addr !442
%0 = ptrtoint i64* %result to i64
%stack_var_-24 = alloca i64, align 8
%1 = call i64 @__readfsqword(i64 40), !insn.addr !443
%2 = add i64 %0, 24, !insn.addr !444
%3 = inttoptr i64 %2 to i64*, !insn.addr !444
%4 = load i64, i64* %3, align 8, !insn.addr !444
%5 = inttoptr i64 %4 to i64*, !insn.addr !445
%6 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiP14_twoIntsStructEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-24, i64* %5), !insn.addr !445
%7 = load i64, i64* %stack_var_-24, align 8, !insn.addr !446
%8 = call i64 @__readfsqword(i64 40), !insn.addr !447
%9 = icmp eq i64 %1, %8, !insn.addr !447
store i64 %7, i64* %rax.0.reg2mem, !insn.addr !448
br i1 %9, label %dec_label_pc_1522, label %dec_label_pc_151d, !insn.addr !448
dec_label_pc_151d: ; preds = %dec_label_pc_14d8
%10 = call i64 @__stack_chk_fail(), !insn.addr !449
store i64 %10, i64* %rax.0.reg2mem, !insn.addr !449
br label %dec_label_pc_1522, !insn.addr !449
dec_label_pc_1522: ; preds = %dec_label_pc_151d, %dec_label_pc_14d8
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !450
}
define i64 @_ZNKSt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEE9_M_valptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_1524:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 32, !insn.addr !451
%2 = inttoptr i64 %1 to i64*, !insn.addr !452
%3 = call i64 @_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiP14_twoIntsStructEE6_M_ptrEv(i64* %2), !insn.addr !452
ret i64 %3, !insn.addr !453
}
define void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEEE7destroyIS5_EEvRS7_PT_(i64* %arg1, i64* %arg2) local_unnamed_addr {
dec_label_pc_1542:
call void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEE7destroyIS6_EEvPT_(i64* %arg1, i64* %arg2), !insn.addr !454
ret void, !insn.addr !455
}
define i64 @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEEE10deallocateERS7_PS6_m(i64* %arg1, i64* %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_1568:
%0 = call i64 @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEE10deallocateEPS7_m(i64* %arg1, i64* %arg2, i64 %arg3), !insn.addr !456
ret i64 %0, !insn.addr !457
}
define i64 @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEE8allocateEmPKv(i64* %result, i64 %arg2, i64* %arg3) local_unnamed_addr {
dec_label_pc_1596:
%0 = call i64 @_ZNK9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEE8max_sizeEv(i64* %result), !insn.addr !458
%1 = icmp uge i64 %0, %arg2
%2 = icmp ne i1 %1, true, !insn.addr !459
%3 = icmp eq i1 %2, false, !insn.addr !460
br i1 %3, label %dec_label_pc_15c6, label %dec_label_pc_15c1, !insn.addr !461
dec_label_pc_15c1: ; preds = %dec_label_pc_1596
%4 = call i64 @_ZSt17__throw_bad_allocv(), !insn.addr !462
br label %dec_label_pc_15c6, !insn.addr !462
dec_label_pc_15c6: ; preds = %dec_label_pc_15c1, %dec_label_pc_1596
%5 = mul i64 %arg2, 48, !insn.addr !463
%6 = call i64 @_Znwm(i64 %5), !insn.addr !464
ret i64 %6, !insn.addr !465
}
define void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEE9constructIS6_JRKSt21piecewise_construct_tSt5tupleIJOiEESD_IJEEEEEvPT_DpOT0_(i64 %arg1, i64 %arg2, i64 %arg3, i64 %arg4, i64 %arg5) local_unnamed_addr {
dec_label_pc_15e2:
%0 = alloca i64
%1 = load i64, i64* %0
%stack_var_-56 = alloca i64, align 8
%2 = call i64 @__readfsqword(i64 40), !insn.addr !466
%3 = inttoptr i64 %arg3 to i64*, !insn.addr !467
%4 = call i64** @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(i64* %3), !insn.addr !467
%5 = inttoptr i64 %arg4 to i64*, !insn.addr !468
%6 = call i64* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(i64* %5), !insn.addr !468
%7 = call i64 @_ZNSt5tupleIJOiEEC1EOS1_(i64* nonnull %stack_var_-56, i64* %6), !insn.addr !469
%8 = inttoptr i64 %arg5 to i64*, !insn.addr !470
%9 = call i64* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(i64* %8), !insn.addr !470
%10 = inttoptr i64 %arg2 to i64*, !insn.addr !471
%11 = call i64 @_ZnwmPv(i64 16, i64* %10), !insn.addr !471
%12 = icmp eq i64 %11, 0, !insn.addr !472
br i1 %12, label %dec_label_pc_1699, label %dec_label_pc_1665, !insn.addr !473
dec_label_pc_1665: ; preds = %dec_label_pc_15e2
%13 = ptrtoint i64* %6 to i64, !insn.addr !468
%14 = call i64 @_ZNSt4pairIKiP14_twoIntsStructEC1IJOiEJEEESt21piecewise_construct_tSt5tupleIJDpT_EES7_IJDpT0_EE(i64 %11, i64* nonnull %stack_var_-56, i64 %13, i64 %arg4, i64 %arg5, i64 %1), !insn.addr !474
br label %dec_label_pc_1699, !insn.addr !475
dec_label_pc_1699: ; preds = %dec_label_pc_1665, %dec_label_pc_15e2
%15 = call i64 @__readfsqword(i64 40), !insn.addr !476
%16 = icmp eq i64 %2, %15, !insn.addr !476
br i1 %16, label %dec_label_pc_16ae, label %dec_label_pc_16a9, !insn.addr !477
dec_label_pc_16a9: ; preds = %dec_label_pc_1699
%17 = call i64 @__stack_chk_fail(), !insn.addr !478
br label %dec_label_pc_16ae, !insn.addr !478
dec_label_pc_16ae: ; preds = %dec_label_pc_16a9, %dec_label_pc_1699
ret void, !insn.addr !479
}
define i64 @_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiP14_twoIntsStructEE6_M_ptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_16c8:
%0 = call i64 @_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiP14_twoIntsStructEE7_M_addrEv(i64* %result), !insn.addr !480
ret i64 %0, !insn.addr !481
}
define void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEE7destroyIS6_EEvPT_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_16e2:
ret void, !insn.addr !482
}
define i64 @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEE10deallocateEPS7_m(i64* %result, i64* %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_16f2:
%0 = call i64 @_ZdlPv(i64* %arg2), !insn.addr !483
ret i64 %0, !insn.addr !484
}
define i64 @_ZNK9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEE8max_sizeEv(i64* %result) local_unnamed_addr {
dec_label_pc_1716:
ret i64 384307168202282325, !insn.addr !485
}
define i64 @_ZNSt4pairIKiP14_twoIntsStructEC1IJOiEJEEESt21piecewise_construct_tSt5tupleIJDpT_EES7_IJDpT0_EE(i64 %arg1, i64* %arg2, i64 %arg3, i64 %arg4, i64 %arg5, i64 %arg6) local_unnamed_addr {
dec_label_pc_172a:
%rax.0.reg2mem = alloca i64, !insn.addr !486
%stack_var_16 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !487
%1 = ptrtoint i64* %stack_var_16 to i64, !insn.addr !488
%2 = inttoptr i64 %arg1 to i64*, !insn.addr !489
%3 = call i64 @_ZNSt4pairIKiP14_twoIntsStructEC1IJOiEJLm0EEJEJEEERSt5tupleIJDpT_EERS6_IJDpT1_EESt12_Index_tupleIJXspT0_EEESF_IJXspT2_EEE(i64* %2, i64* %arg2, i64 %1, i64 ptrtoint (i32* @0 to i64)), !insn.addr !489
%4 = call i64 @__readfsqword(i64 40), !insn.addr !490
%5 = icmp eq i64 %0, %4, !insn.addr !490
store i64 0, i64* %rax.0.reg2mem, !insn.addr !491
br i1 %5, label %dec_label_pc_177d, label %dec_label_pc_1778, !insn.addr !491
dec_label_pc_1778: ; preds = %dec_label_pc_172a
%6 = call i64 @__stack_chk_fail(), !insn.addr !492
store i64 %6, i64* %rax.0.reg2mem, !insn.addr !492
br label %dec_label_pc_177d, !insn.addr !492
dec_label_pc_177d: ; preds = %dec_label_pc_1778, %dec_label_pc_172a
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !493
}
define i64 @_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiP14_twoIntsStructEE7_M_addrEv(i64* %result) local_unnamed_addr {
dec_label_pc_1780:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !494
}
define i64* @_ZSt3getILm0EJOiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS5_(i64* %arg1) local_unnamed_addr {
dec_label_pc_178e:
%0 = call i32** @_ZSt12__get_helperILm0EOiJEERT0_RSt11_Tuple_implIXT_EJS1_DpT1_EE(i64* %arg1), !insn.addr !495
%1 = bitcast i32** %0 to i64*, !insn.addr !496
ret i64* %1, !insn.addr !496
}
define i32** @_ZSt12__get_helperILm0EOiJEERT0_RSt11_Tuple_implIXT_EJS1_DpT1_EE(i64* %arg1) local_unnamed_addr {
dec_label_pc_17a8:
%0 = call i64 @_ZNSt11_Tuple_implILm0EJOiEE7_M_headERS1_(i64* %arg1), !insn.addr !497
%1 = inttoptr i64 %0 to i32**, !insn.addr !498
ret i32** %1, !insn.addr !498
}
define i64 @_ZNSt4pairIKiP14_twoIntsStructEC1IJOiEJLm0EEJEJEEERSt5tupleIJDpT_EERS6_IJDpT1_EESt12_Index_tupleIJXspT0_EEESF_IJXspT2_EEE(i64* %arg1, i64* %arg2, i64 %arg3, i64 %arg4) local_unnamed_addr {
dec_label_pc_17c2:
%0 = ptrtoint i64* %arg1 to i64
%1 = call i64* @_ZSt3getILm0EJOiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS5_(i64* %arg2), !insn.addr !499
%2 = call i32** @_ZSt7forwardIOiEOT_RNSt16remove_referenceIS1_E4typeE(i64* %1), !insn.addr !500
%3 = bitcast i32** %2 to i32*, !insn.addr !501
%4 = load i32, i32* %3, align 4, !insn.addr !501
%5 = bitcast i64* %arg1 to i32*, !insn.addr !502
store i32 %4, i32* %5, align 4, !insn.addr !502
%6 = add i64 %0, 8, !insn.addr !503
%7 = inttoptr i64 %6 to i64*, !insn.addr !503
store i64 0, i64* %7, align 8, !insn.addr !503
ret i64 %0, !insn.addr !504
}
declare i64 @memmove(i64, i64, i64, i64) local_unnamed_addr
declare i64 @printStructLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @_ZSt29_Rb_tree_insert_and_rebalancebPSt18_Rb_tree_node_baseS0_RS_(i1, i64*, i64*, i64*) local_unnamed_addr
declare i64 @_ZSt18_Rb_tree_decrementPSt18_Rb_tree_node_base(i64*) local_unnamed_addr
declare i64 @_ZSt18_Rb_tree_incrementPSt18_Rb_tree_node_base(i64*) local_unnamed_addr
declare i64 @_ZSt17__throw_bad_allocv() local_unnamed_addr
declare i64 @_Znwm(i64) local_unnamed_addr
declare i64 @_ZdlPv(i64*) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 18}
!1 = !{i64 31}
!2 = !{i64 49}
!3 = !{i64 58}
!4 = !{i64 63}
!5 = !{i64 68}
!6 = !{i64 71}
!7 = !{i64 78}
!8 = !{i64 124}
!9 = !{i64 106}
!10 = !{i64 117}
!11 = !{i64 135}
!12 = !{i64 97}
!13 = !{i64 152}
!14 = !{i64 170}
!15 = !{i64 175}
!16 = !{i64 185}
!17 = !{i64 191}
!18 = !{i64 195}
!19 = !{i64 204}
!20 = !{i64 206}
!21 = !{i64 212}
!22 = !{i64 213}
!23 = !{i64 214}
!24 = !{i64 231}
!25 = !{i64 246}
!26 = !{i64 276}
!27 = !{i64 281}
!28 = !{i64 319}
!29 = !{i64 337}
!30 = !{i64 348}
!31 = !{i64 310}
!32 = !{i64 358}
!33 = !{i64 383}
!34 = !{i64 398}
!35 = !{i64 408}
!36 = !{i64 417}
!37 = !{i64 419}
!38 = !{i64 425}
!39 = !{i64 443}
!40 = !{i64 458}
!41 = !{i64 475}
!42 = !{i64 489}
!43 = !{i64 518}
!44 = !{i64 529}
!45 = !{i64 541}
!46 = !{i64 570}
!47 = !{i64 581}
!48 = !{i64 593}
!49 = !{i64 617}
!50 = !{i64 629}
!51 = !{i64 634}
!52 = !{i64 666}
!53 = !{i64 673}
!54 = !{i64 697}
!55 = !{i64 715}
!56 = !{i64 725}
!57 = !{i64 730}
!58 = !{i64 747}
!59 = !{i64 776}
!60 = !{i64 781}
!61 = !{i64 792}
!62 = !{i64 797}
!63 = !{i64 815}
!64 = !{i64 820}
!65 = !{i64 822}
!66 = !{i64 831}
!67 = !{i64 843}
!68 = !{i64 865}
!69 = !{i64 870}
!70 = !{i64 888}
!71 = !{i64 901}
!72 = !{i64 919}
!73 = !{i64 938}
!74 = !{i64 951}
!75 = !{i64 974}
!76 = !{i64 979}
!77 = !{i64 990}
!78 = !{i64 995}
!79 = !{i64 1003}
!80 = !{i64 1012}
!81 = !{i64 1014}
!82 = !{i64 1025}
!83 = !{i64 1056}
!84 = !{i64 1062}
!85 = !{i64 1083}
!86 = !{i64 1089}
!87 = !{i64 1116}
!88 = !{i64 1119}
!89 = !{i64 1123}
!90 = !{i64 1144}
!91 = !{i64 1149}
!92 = !{i64 1157}
!93 = !{i64 1180}
!94 = !{i64 1186}
!95 = !{i64 1216}
!96 = !{i64 1218}
!97 = !{i64 1222}
!98 = !{i64 1247}
!99 = !{i64 1252}
!100 = !{i64 1272}
!101 = !{i64 1278}
!102 = !{i64 1295}
!103 = !{i64 1309}
!104 = !{i64 1338}
!105 = !{i64 1346}
!106 = !{i64 1357}
!107 = !{i64 1369}
!108 = !{i64 1383}
!109 = !{i64 1397}
!110 = !{i64 1411}
!111 = !{i64 1412}
!112 = !{i64 1443}
!113 = !{i64 1465}
!114 = !{i64 1480}
!115 = !{i64 1495}
!116 = !{i64 1516}
!117 = !{i64 1532}
!118 = !{i64 1554}
!119 = !{i64 1571}
!120 = !{i64 1574}
!121 = !{i64 1595}
!122 = !{i64 1600}
!123 = !{i64 1616}
!124 = !{i64 1635}
!125 = !{i64 1640}
!126 = !{i64 1648}
!127 = !{i64 1657}
!128 = !{i64 1712}
!129 = !{i64 1725}
!130 = !{i64 1784}
!131 = !{i64 1799}
!132 = !{i64 1824}
!133 = !{i64 1835}
!134 = !{i64 1836}
!135 = !{i64 1848}
!136 = !{i64 1867}
!137 = !{i64 1881}
!138 = !{i64 1886}
!139 = !{i64 1894}
!140 = !{i64 1903}
!141 = !{i64 1905}
!142 = !{i64 1911}
!143 = !{i64 1921}
!144 = !{i64 1938}
!145 = !{i64 1945}
!146 = !{i64 1951}
!147 = !{i64 1986}
!148 = !{i64 2002}
!149 = !{i64 2017}
!150 = !{i64 2032}
!151 = !{i64 2057}
!152 = !{i64 2074}
!153 = !{i64 2107}
!154 = !{i64 2117}
!155 = !{i64 2122}
!156 = !{i64 2129}
!157 = !{i64 2135}
!158 = !{i64 2149}
!159 = !{i64 2177}
!160 = !{i64 2182}
!161 = !{i64 2189}
!162 = !{i64 2199}
!163 = !{i64 2204}
!164 = !{i64 2211}
!165 = !{i64 2217}
!166 = !{i64 2245}
!167 = !{i64 2250}
!168 = !{i64 2257}
!169 = !{i64 2271}
!170 = !{i64 2277}
!171 = !{i64 2278}
!172 = !{i64 2291}
!173 = !{i64 2299}
!174 = !{i64 2321}
!175 = !{i64 2326}
!176 = !{i64 2341}
!177 = !{i64 2346}
!178 = !{i64 2352}
!179 = !{i64 2354}
!180 = !{i64 2367}
!181 = !{i64 2372}
!182 = !{i64 2375}
!183 = !{i64 2388}
!184 = !{i64 2393}
!185 = !{i64 2399}
!186 = !{i64 2420}
!187 = !{i64 2425}
!188 = !{i64 2427}
!189 = !{i64 2514}
!190 = !{i64 2519}
!191 = !{i64 2452}
!192 = !{i64 2460}
!193 = !{i64 2482}
!194 = !{i64 2487}
!195 = !{i64 2495}
!196 = !{i64 2535}
!197 = !{i64 2553}
!198 = !{i64 2558}
!199 = !{i64 2560}
!200 = !{i64 2570}
!201 = !{i64 2585}
!202 = !{i64 2590}
!203 = !{i64 2593}
!204 = !{i64 2599}
!205 = !{i64 2601}
!206 = !{i64 2610}
!207 = !{i64 2625}
!208 = !{i64 2646}
!209 = !{i64 2651}
!210 = !{i64 2659}
!211 = !{i64 2675}
!212 = !{i64 2680}
!213 = !{i64 2686}
!214 = !{i64 2707}
!215 = !{i64 2712}
!216 = !{i64 2714}
!217 = !{i64 2716}
!218 = !{i64 2723}
!219 = !{i64 2728}
!220 = !{i64 2734}
!221 = !{i64 2736}
!222 = !{i64 2738}
!223 = !{i64 2764}
!224 = !{i64 2769}
!225 = !{i64 2777}
!226 = !{i64 2800}
!227 = !{i64 2805}
!228 = !{i64 2813}
!229 = !{i64 2832}
!230 = !{i64 2837}
!231 = !{i64 2853}
!232 = !{i64 2874}
!233 = !{i64 2879}
!234 = !{i64 2881}
!235 = !{i64 2891}
!236 = !{i64 2906}
!237 = !{i64 2911}
!238 = !{i64 2914}
!239 = !{i64 2920}
!240 = !{i64 2922}
!241 = !{i64 2931}
!242 = !{i64 2939}
!243 = !{i64 2961}
!244 = !{i64 2966}
!245 = !{i64 2974}
!246 = !{i64 2990}
!247 = !{i64 2995}
!248 = !{i64 3001}
!249 = !{i64 3019}
!250 = !{i64 3024}
!251 = !{i64 3026}
!252 = !{i64 3028}
!253 = !{i64 3035}
!254 = !{i64 3040}
!255 = !{i64 3046}
!256 = !{i64 3048}
!257 = !{i64 3050}
!258 = !{i64 3076}
!259 = !{i64 3081}
!260 = !{i64 3089}
!261 = !{i64 3109}
!262 = !{i64 3114}
!263 = !{i64 3122}
!264 = !{i64 3138}
!265 = !{i64 3143}
!266 = !{i64 3145}
!267 = !{i64 3171}
!268 = !{i64 3176}
!269 = !{i64 3180}
!270 = !{i64 3188}
!271 = !{i64 3197}
!272 = !{i64 3199}
!273 = !{i64 3210}
!274 = !{i64 3211}
!275 = !{i64 3223}
!276 = !{i64 3245}
!277 = !{i64 3263}
!278 = !{i64 3272}
!279 = !{i64 3281}
!280 = !{i64 3283}
!281 = !{i64 3289}
!282 = !{i64 3290}
!283 = !{i64 3317}
!284 = !{i64 3332}
!285 = !{i64 3337}
!286 = !{i64 3346}
!287 = !{i64 3351}
!288 = !{i64 3355}
!289 = !{i64 3368}
!290 = !{i64 3383}
!291 = !{i64 3397}
!292 = !{i64 3402}
!293 = !{i64 3425}
!294 = !{i64 3443}
!295 = !{i64 3452}
!296 = !{i64 3456}
!297 = !{i64 3464}
!298 = !{i64 3482}
!299 = !{i64 3487}
!300 = !{i64 3495}
!301 = !{i64 3504}
!302 = !{i64 3506}
!303 = !{i64 3519}
!304 = !{i64 3550}
!305 = !{i64 3569}
!306 = !{i64 3576}
!307 = !{i64 3598}
!308 = !{i64 3603}
!309 = !{i64 3616}
!310 = !{i64 3621}
!311 = !{i64 3634}
!312 = !{i64 3639}
!313 = !{i64 3640}
!314 = !{i64 3665}
!315 = !{i64 3680}
!316 = !{i64 3685}
!317 = !{i64 3698}
!318 = !{i64 3719}
!319 = !{i64 3727}
!320 = !{i64 3729}
!321 = !{i64 3746}
!322 = !{i64 3764}
!323 = !{i64 3789}
!324 = !{i64 3794}
!325 = !{i64 3802}
!326 = !{i64 3811}
!327 = !{i64 3813}
!328 = !{i64 3824}
!329 = !{i64 3845}
!330 = !{i64 3851}
!331 = !{i64 3871}
!332 = !{i64 3884}
!333 = !{i64 3890}
!334 = !{i64 3939}
!335 = !{i64 3954}
!336 = !{i64 3969}
!337 = !{i64 3984}
!338 = !{i64 3999}
!339 = !{i64 4014}
!340 = !{i64 4034}
!341 = !{i64 4104}
!342 = !{i64 4136}
!343 = !{i64 4148}
!344 = !{i64 4180}
!345 = !{i64 4185}
!346 = !{i64 4193}
!347 = !{i64 4202}
!348 = !{i64 4204}
!349 = !{i64 4210}
!350 = !{i64 4224}
!351 = !{i64 4229}
!352 = !{i64 4242}
!353 = !{i64 4247}
!354 = !{i64 4248}
!355 = !{i64 4260}
!356 = !{i64 4282}
!357 = !{i64 4300}
!358 = !{i64 4309}
!359 = !{i64 4318}
!360 = !{i64 4320}
!361 = !{i64 4326}
!362 = !{i64 4355}
!363 = !{i64 4360}
!364 = !{i64 4367}
!365 = !{i64 4377}
!366 = !{i64 4382}
!367 = !{i64 4389}
!368 = !{i64 4395}
!369 = !{i64 4409}
!370 = !{i64 4410}
!371 = !{i64 4427}
!372 = !{i64 4454}
!373 = !{i64 4465}
!374 = !{i64 4470}
!375 = !{i64 4482}
!376 = !{i64 4485}
!377 = !{i64 4584}
!378 = !{i64 4491}
!379 = !{i64 4506}
!380 = !{i64 4524}
!381 = !{i64 4536}
!382 = !{i64 4545}
!383 = !{i64 4550}
!384 = !{i64 4559}
!385 = !{i64 4564}
!386 = !{i64 4593}
!387 = !{i64 4602}
!388 = !{i64 4607}
!389 = !{i64 4625}
!390 = !{i64 4630}
!391 = !{i64 4632}
!392 = !{i64 4652}
!393 = !{i64 4665}
!394 = !{i64 4674}
!395 = !{i64 4683}
!396 = !{i64 4690}
!397 = !{i64 4711}
!398 = !{i64 4716}
!399 = !{i64 4718}
!400 = !{i64 4738}
!401 = !{i64 4751}
!402 = !{i64 4753}
!403 = !{i64 4779}
!404 = !{i64 4788}
!405 = !{i64 4796}
!406 = !{i64 4805}
!407 = !{i64 4807}
!408 = !{i64 4818}
!409 = !{i64 4832}
!410 = !{i64 4837}
!411 = !{i64 4860}
!412 = !{i64 4872}
!413 = !{i64 4880}
!414 = !{i64 4893}
!415 = !{i64 4898}
!416 = !{i64 4922}
!417 = !{i64 4934}
!418 = !{i64 4942}
!419 = !{i64 4962}
!420 = !{i64 4968}
!421 = !{i64 4987}
!422 = !{i64 5012}
!423 = !{i64 5027}
!424 = !{i64 5038}
!425 = !{i64 5050}
!426 = !{i64 5079}
!427 = !{i64 5102}
!428 = !{i64 5109}
!429 = !{i64 5126}
!430 = !{i64 5131}
!431 = !{i64 5145}
!432 = !{i64 5159}
!433 = !{i64 5195}
!434 = !{i64 5201}
!435 = !{i64 5240}
!436 = !{i64 5255}
!437 = !{i64 5270}
!438 = !{i64 5295}
!439 = !{i64 5309}
!440 = !{i64 5329}
!441 = !{i64 5335}
!442 = !{i64 5336}
!443 = !{i64 5348}
!444 = !{i64 5367}
!445 = !{i64 5381}
!446 = !{i64 5386}
!447 = !{i64 5394}
!448 = !{i64 5403}
!449 = !{i64 5405}
!450 = !{i64 5411}
!451 = !{i64 5428}
!452 = !{i64 5435}
!453 = !{i64 5441}
!454 = !{i64 5472}
!455 = !{i64 5479}
!456 = !{i64 5518}
!457 = !{i64 5525}
!458 = !{i64 5553}
!459 = !{i64 5562}
!460 = !{i64 5565}
!461 = !{i64 5567}
!462 = !{i64 5569}
!463 = !{i64 5587}
!464 = !{i64 5594}
!465 = !{i64 5600}
!466 = !{i64 5635}
!467 = !{i64 5657}
!468 = !{i64 5669}
!469 = !{i64 5687}
!470 = !{i64 5703}
!471 = !{i64 5720}
!472 = !{i64 5728}
!473 = !{i64 5731}
!474 = !{i64 5749}
!475 = !{i64 5758}
!476 = !{i64 5790}
!477 = !{i64 5799}
!478 = !{i64 5801}
!479 = !{i64 5816}
!480 = !{i64 5851}
!481 = !{i64 5857}
!482 = !{i64 5872}
!483 = !{i64 5901}
!484 = !{i64 5908}
!485 = !{i64 5929}
!486 = !{i64 5930}
!487 = !{i64 5946}
!488 = !{i64 5961}
!489 = !{i64 5983}
!490 = !{i64 5997}
!491 = !{i64 6006}
!492 = !{i64 6008}
!493 = !{i64 6014}
!494 = !{i64 6029}
!495 = !{i64 6049}
!496 = !{i64 6055}
!497 = !{i64 6075}
!498 = !{i64 6081}
!499 = !{i64 6109}
!500 = !{i64 6117}
!501 = !{i64 6122}
!502 = !{i64 6128}
!503 = !{i64 6134}
!504 = !{i64 6144}
### Assistant: %"struct.std::piecewise_construct_t" = type { i8 }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, std::pair<const int, _twoIntsStruct *>, std::_Select1st<std::pair<const int, _twoIntsStruct *>>, std::less<int>, std::allocator<std::pair<const int, _twoIntsStruct *>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, _twoIntsStruct *>, std::_Select1st<std::pair<const int, _twoIntsStruct *>>, std::less<int>, std::allocator<std::pair<const int, _twoIntsStruct *>>>::_Rb_tree_impl" = type { %"struct.std::_Rb_tree_key_compare", %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_key_compare" = type { %"struct.std::less" }
%"struct.std::less" = type { i8 }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }
%struct._twoIntsStruct = type { i32, i32 }
%"struct.std::_Rb_tree_iterator" = type { %"struct.std::_Rb_tree_node_base"* }
%"struct.std::_Rb_tree_const_iterator" = type { %"struct.std::_Rb_tree_node_base"* }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { i32* }
%"class.std::tuple.0" = type { i8 }
%"struct.std::pair" = type { i32, %struct._twoIntsStruct* }
%"struct.std::_Rb_tree_node" = type { %"struct.std::_Rb_tree_node_base", %"struct.__gnu_cxx::__aligned_membuf" }
%"struct.__gnu_cxx::__aligned_membuf" = type { [16 x i8] }
%"struct.std::pair.1" = type { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }
%"struct.std::_Select1st" = type { i8 }
%"class.std::allocator" = type { i8 }
%"class.__gnu_cxx::new_allocator" = type { i8 }
%"struct.std::_Index_tuple" = type { i8 }
%"struct.std::_Index_tuple.4" = type { i8 }
%"class.std::__pair_base" = type { i8 }
%"class.std::__pair_base.2" = type { i8 }
$_ZNSt3mapIiP14_twoIntsStructSt4lessIiESaISt4pairIKiS1_EEEixEOi = comdat any
$_ZNSt3mapIiP14_twoIntsStructSt4lessIiESaISt4pairIKiS1_EEE11lower_boundERS5_ = comdat any
$_ZSteqRKSt17_Rb_tree_iteratorISt4pairIKiP14_twoIntsStructEES7_ = comdat any
$_ZNSt3mapIiP14_twoIntsStructSt4lessIiESaISt4pairIKiS1_EEE3endEv = comdat any
$_ZNKSt3mapIiP14_twoIntsStructSt4lessIiESaISt4pairIKiS1_EEE8key_compEv = comdat any
$_ZNKSt4lessIiEclERKiS2_ = comdat any
$_ZNKSt17_Rb_tree_iteratorISt4pairIKiP14_twoIntsStructEEdeEv = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJOiEESF_IJEEEEESt17_Rb_tree_iteratorIS4_ESt23_Rb_tree_const_iteratorIS4_EDpOT_ = comdat any
$_ZNSt23_Rb_tree_const_iteratorISt4pairIKiP14_twoIntsStructEEC2ERKSt17_Rb_tree_iteratorIS4_E = comdat any
$_ZSt16forward_as_tupleIJiEESt5tupleIJDpOT_EES3_ = comdat any
$_ZSt4moveIRiEONSt16remove_referenceIT_E4typeEOS2_ = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE11lower_boundERS1_ = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE14_M_lower_boundEPSt13_Rb_tree_nodeIS4_EPSt18_Rb_tree_node_baseRS1_ = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE8_M_beginEv = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE6_M_endEv = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE6_S_keyEPKSt13_Rb_tree_nodeIS4_E = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE7_S_leftEPSt18_Rb_tree_node_base = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE8_S_rightEPSt18_Rb_tree_node_base = comdat any
$_ZNSt17_Rb_tree_iteratorISt4pairIKiP14_twoIntsStructEEC2EPSt18_Rb_tree_node_base = comdat any
$_ZNKSt10_Select1stISt4pairIKiP14_twoIntsStructEEclERKS4_ = comdat any
$_ZNKSt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEE9_M_valptrEv = comdat any
$_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiP14_twoIntsStructEE6_M_ptrEv = comdat any
$_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiP14_twoIntsStructEE7_M_addrEv = comdat any
$_ZNKSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE9_M_mbeginEv = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE3endEv = comdat any
$_ZNKSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE8key_compEv = comdat any
$_ZNSt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEE9_M_valptrEv = comdat any
$__clang_call_terminate = comdat any
$_ZN9__gnu_cxx16__aligned_membufISt4pairIKiP14_twoIntsStructEE6_M_ptrEv = comdat any
$_ZN9__gnu_cxx16__aligned_membufISt4pairIKiP14_twoIntsStructEE7_M_addrEv = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE14_M_create_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESF_IJEEEEEPSt13_Rb_tree_nodeIS4_EDpOT_ = comdat any
$_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE = comdat any
$_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE = comdat any
$_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS4_ERS1_ = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE14_M_insert_nodeEPSt18_Rb_tree_node_baseSC_PSt13_Rb_tree_nodeIS4_E = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE12_M_drop_nodeEPSt13_Rb_tree_nodeIS4_E = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE11_M_get_nodeEv = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE17_M_construct_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESF_IJEEEEEvPSt13_Rb_tree_nodeIS4_EDpOT_ = comdat any
$_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEEE8allocateERS7_m = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE21_M_get_Node_allocatorEv = comdat any
$_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEE8allocateEmPKv = comdat any
$_ZNK9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEE11_M_max_sizeEv = comdat any
$_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEEE9constructIS5_JRKSt21piecewise_construct_tSt5tupleIJOiEESD_IJEEEEEvRS7_PT_DpOT0_ = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE11_M_put_nodeEPSt13_Rb_tree_nodeIS4_E = comdat any
$_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEE9constructIS6_JRKSt21piecewise_construct_tSt5tupleIJOiEESD_IJEEEEEvPT_DpOT0_ = comdat any
$_ZNSt5tupleIJOiEEC2EOS1_ = comdat any
$_ZNSt4pairIKiP14_twoIntsStructEC2IJOiEJEEESt21piecewise_construct_tSt5tupleIJDpT_EES7_IJDpT0_EE = comdat any
$_ZNSt11_Tuple_implILm0EJOiEEC2EOS1_ = comdat any
$_ZNSt4pairIKiP14_twoIntsStructEC2IJOiEJLm0EEJEJEEERSt5tupleIJDpT_EERS6_IJDpT1_EESt12_Index_tupleIJXspT0_EEESF_IJXspT2_EEE = comdat any
$_ZSt7forwardIOiEOT_RNSt16remove_referenceIS1_E4typeE = comdat any
$_ZSt3getILm0EJOiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS5_ = comdat any
$_ZSt12__get_helperILm0EOiJEERT0_RSt11_Tuple_implIXT_EJS1_DpT1_EE = comdat any
$_ZNSt11_Tuple_implILm0EJOiEE7_M_headERS1_ = comdat any
$_ZNSt10_Head_baseILm0EOiLb0EE7_M_headERS1_ = comdat any
$_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEEE10deallocateERS7_PS6_m = comdat any
$_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEE10deallocateEPS7_m = comdat any
$_ZNKSt23_Rb_tree_const_iteratorISt4pairIKiP14_twoIntsStructEE13_M_const_castEv = comdat any
$_ZNKSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE4sizeEv = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE6_S_keyEPKSt18_Rb_tree_node_base = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE12_M_rightmostEv = comdat any
$_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_Lb1EEERKS1_OT_ = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE24_M_get_insert_unique_posERS1_ = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE11_M_leftmostEv = comdat any
$_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_S4_Lb1EEEOT_OT0_ = comdat any
$_ZNSt17_Rb_tree_iteratorISt4pairIKiP14_twoIntsStructEEmmEv = comdat any
$_ZNSt17_Rb_tree_iteratorISt4pairIKiP14_twoIntsStructEEppEv = comdat any
$_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_Lb1EEEOT_RKS1_ = comdat any
$_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE5beginEv = comdat any
$_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRPSt13_Rb_tree_nodeIS_IKiP14_twoIntsStructEERS1_Lb1EEEOT_OT0_ = comdat any
$_ZSt7forwardIRPSt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEEOT_RNSt16remove_referenceIS9_E4typeE = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE15_M_destroy_nodeEPSt13_Rb_tree_nodeIS4_E = comdat any
$_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEEE7destroyIS5_EEvRS7_PT_ = comdat any
$_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEE7destroyIS6_EEvPT_ = comdat any
$_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE = comdat any
$_ZNSt5tupleIJOiEEC2IJiELb1ELb1EEEDpOT_ = comdat any
$_ZNSt11_Tuple_implILm0EJOiEEC2IiEEOT_ = comdat any
$_ZNSt10_Head_baseILm0EOiLb0EEC2IiEEOT_ = comdat any
@_ZStL19piecewise_construct = internal constant %"struct.std::piecewise_construct_t" undef, align 1
; Function Attrs: noinline optnone uwtable
define dso_local void @_ZN67CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_alloca_memmove_747badSinkESt3mapIiP14_twoIntsStructSt4lessIiESaISt4pairIKiS2_EEE(%"class.std::map"* %dataMap) #0 {
entry:
%data = alloca %struct._twoIntsStruct*, align 8
%ref.tmp = alloca i32, align 4
%source = alloca [100 x %struct._twoIntsStruct], align 16
%i = alloca i64, align 8
store i32 2, i32* %ref.tmp, align 4
%call = call nonnull align 8 dereferenceable(8) %struct._twoIntsStruct** @_ZNSt3mapIiP14_twoIntsStructSt4lessIiESaISt4pairIKiS1_EEEixEOi(%"class.std::map"* %dataMap, i32* nonnull align 4 dereferenceable(4) %ref.tmp)
%0 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %call, align 8
store %struct._twoIntsStruct* %0, %struct._twoIntsStruct** %data, align 8
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %entry
%1 = load i64, i64* %i, align 8
%cmp = icmp ult i64 %1, 100
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%2 = load i64, i64* %i, align 8
%arrayidx = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %2
%intOne = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %arrayidx, i32 0, i32 0
store i32 0, i32* %intOne, align 8
%3 = load i64, i64* %i, align 8
%arrayidx1 = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %3
%intTwo = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %arrayidx1, i32 0, i32 1
store i32 0, i32* %intTwo, align 4
br label %for.inc
for.inc: ; preds = %for.body
%4 = load i64, i64* %i, align 8
%inc = add i64 %4, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%5 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data, align 8
%6 = bitcast %struct._twoIntsStruct* %5 to i8*
%arraydecay = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 0
%7 = bitcast %struct._twoIntsStruct* %arraydecay to i8*
call void @llvm.memmove.p0i8.p0i8.i64(i8* align 4 %6, i8* align 16 %7, i64 800, i1 false)
%8 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data, align 8
%arrayidx2 = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %8, i64 0
call void @printStructLine(%struct._twoIntsStruct* %arrayidx2)
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) %struct._twoIntsStruct** @_ZNSt3mapIiP14_twoIntsStructSt4lessIiESaISt4pairIKiS1_EEEixEOi(%"class.std::map"* %this, i32* nonnull align 4 dereferenceable(4) %__k) #0 comdat align 2 {
entry:
%this.addr = alloca %"class.std::map"*, align 8
%__k.addr = alloca i32*, align 8
%__i = alloca %"struct.std::_Rb_tree_iterator", align 8
%ref.tmp = alloca %"struct.std::_Rb_tree_iterator", align 8
%ref.tmp5 = alloca %"struct.std::less", align 1
%undef.agg.tmp = alloca %"struct.std::less", align 1
%ref.tmp8 = alloca %"struct.std::_Rb_tree_iterator", align 8
%agg.tmp = alloca %"struct.std::_Rb_tree_const_iterator", align 8
%ref.tmp9 = alloca %"class.std::tuple", align 8
%ref.tmp11 = alloca %"class.std::tuple.0", align 1
store %"class.std::map"* %this, %"class.std::map"** %this.addr, align 8
store i32* %__k, i32** %__k.addr, align 8
%this1 = load %"class.std::map"*, %"class.std::map"** %this.addr, align 8
%0 = load i32*, i32** %__k.addr, align 8
%call = call %"struct.std::_Rb_tree_node_base"* @_ZNSt3mapIiP14_twoIntsStructSt4lessIiESaISt4pairIKiS1_EEE11lower_boundERS5_(%"class.std::map"* %this1, i32* nonnull align 4 dereferenceable(4) %0)
%coerce.dive = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__i, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %call, %"struct.std::_Rb_tree_node_base"** %coerce.dive, align 8
%call2 = call %"struct.std::_Rb_tree_node_base"* @_ZNSt3mapIiP14_twoIntsStructSt4lessIiESaISt4pairIKiS1_EEE3endEv(%"class.std::map"* %this1) #11
%coerce.dive3 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %ref.tmp, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %call2, %"struct.std::_Rb_tree_node_base"** %coerce.dive3, align 8
%call4 = call zeroext i1 @_ZSteqRKSt17_Rb_tree_iteratorISt4pairIKiP14_twoIntsStructEES7_(%"struct.std::_Rb_tree_iterator"* nonnull align 8 dereferenceable(8) %__i, %"struct.std::_Rb_tree_iterator"* nonnull align 8 dereferenceable(8) %ref.tmp) #11
br i1 %call4, label %lor.end, label %lor.rhs
lor.rhs: ; preds = %entry
call void @_ZNKSt3mapIiP14_twoIntsStructSt4lessIiESaISt4pairIKiS1_EEE8key_compEv(%"class.std::map"* %this1)
%1 = load i32*, i32** %__k.addr, align 8
%call6 = call nonnull align 8 dereferenceable(16) %"struct.std::pair"* @_ZNKSt17_Rb_tree_iteratorISt4pairIKiP14_twoIntsStructEEdeEv(%"struct.std::_Rb_tree_iterator"* %__i) #11
%first = getelementptr inbounds %"struct.std::pair", %"struct.std::pair"* %call6, i32 0, i32 0
%call7 = call zeroext i1 @_ZNKSt4lessIiEclERKiS2_(%"struct.std::less"* %ref.tmp5, i32* nonnull align 4 dereferenceable(4) %1, i32* nonnull align 4 dereferenceable(4) %first)
br label %lor.end
lor.end: ; preds = %lor.rhs, %entry
%2 = phi i1 [ true, %entry ], [ %call7, %lor.rhs ]
br i1 %2, label %if.then, label %if.end
if.then: ; preds = %lor.end
%_M_t = getelementptr inbounds %"class.std::map", %"class.std::map"* %this1, i32 0, i32 0
call void @_ZNSt23_Rb_tree_const_iteratorISt4pairIKiP14_twoIntsStructEEC2ERKSt17_Rb_tree_iteratorIS4_E(%"struct.std::_Rb_tree_const_iterator"* %agg.tmp, %"struct.std::_Rb_tree_iterator"* nonnull align 8 dereferenceable(8) %__i) #11
%3 = load i32*, i32** %__k.addr, align 8
%call10 = call nonnull align 4 dereferenceable(4) i32* @_ZSt4moveIRiEONSt16remove_referenceIT_E4typeEOS2_(i32* nonnull align 4 dereferenceable(4) %3) #11
call void @_ZSt16forward_as_tupleIJiEESt5tupleIJDpOT_EES3_(%"class.std::tuple"* sret align 8 %ref.tmp9, i32* nonnull align 4 dereferenceable(4) %call10) #11
%coerce.dive12 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", %"struct.std::_Rb_tree_const_iterator"* %agg.tmp, i32 0, i32 0
%4 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %coerce.dive12, align 8
%call13 = call %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJOiEESF_IJEEEEESt17_Rb_tree_iteratorIS4_ESt23_Rb_tree_const_iteratorIS4_EDpOT_(%"class.std::_Rb_tree"* %_M_t, %"struct.std::_Rb_tree_node_base"* %4, %"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) @_ZStL19piecewise_construct, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %ref.tmp9, %"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %ref.tmp11)
%coerce.dive14 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %ref.tmp8, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %call13, %"struct.std::_Rb_tree_node_base"** %coerce.dive14, align 8
%5 = bitcast %"struct.std::_Rb_tree_iterator"* %__i to i8*
%6 = bitcast %"struct.std::_Rb_tree_iterator"* %ref.tmp8 to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %5, i8* align 8 %6, i64 8, i1 false)
br label %if.end
if.end: ; preds = %if.then, %lor.end
%call15 = call nonnull align 8 dereferenceable(16) %"struct.std::pair"* @_ZNKSt17_Rb_tree_iteratorISt4pairIKiP14_twoIntsStructEEdeEv(%"struct.std::_Rb_tree_iterator"* %__i) #11
%second = getelementptr inbounds %"struct.std::pair", %"struct.std::pair"* %call15, i32 0, i32 1
ret %struct._twoIntsStruct** %second
}
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memmove.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i1 immarg) #1
declare dso_local void @printStructLine(%struct._twoIntsStruct*) #2
; Function Attrs: noinline optnone uwtable
define dso_local void @_ZN67CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_alloca_memmove_7411goodG2BSinkESt3mapIiP14_twoIntsStructSt4lessIiESaISt4pairIKiS2_EEE(%"class.std::map"* %dataMap) #0 {
entry:
%data = alloca %struct._twoIntsStruct*, align 8
%ref.tmp = alloca i32, align 4
%source = alloca [100 x %struct._twoIntsStruct], align 16
%i = alloca i64, align 8
store i32 2, i32* %ref.tmp, align 4
%call = call nonnull align 8 dereferenceable(8) %struct._twoIntsStruct** @_ZNSt3mapIiP14_twoIntsStructSt4lessIiESaISt4pairIKiS1_EEEixEOi(%"class.std::map"* %dataMap, i32* nonnull align 4 dereferenceable(4) %ref.tmp)
%0 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %call, align 8
store %struct._twoIntsStruct* %0, %struct._twoIntsStruct** %data, align 8
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %entry
%1 = load i64, i64* %i, align 8
%cmp = icmp ult i64 %1, 100
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%2 = load i64, i64* %i, align 8
%arrayidx = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %2
%intOne = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %arrayidx, i32 0, i32 0
store i32 0, i32* %intOne, align 8
%3 = load i64, i64* %i, align 8
%arrayidx1 = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %3
%intTwo = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %arrayidx1, i32 0, i32 1
store i32 0, i32* %intTwo, align 4
br label %for.inc
for.inc: ; preds = %for.body
%4 = load i64, i64* %i, align 8
%inc = add i64 %4, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%5 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data, align 8
%6 = bitcast %struct._twoIntsStruct* %5 to i8*
%arraydecay = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 0
%7 = bitcast %struct._twoIntsStruct* %arraydecay to i8*
call void @llvm.memmove.p0i8.p0i8.i64(i8* align 4 %6, i8* align 16 %7, i64 800, i1 false)
%8 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data, align 8
%arrayidx2 = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %8, i64 0
call void @printStructLine(%struct._twoIntsStruct* %arrayidx2)
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node_base"* @_ZNSt3mapIiP14_twoIntsStructSt4lessIiESaISt4pairIKiS1_EEE11lower_boundERS5_(%"class.std::map"* %this, i32* nonnull align 4 dereferenceable(4) %__x) #0 comdat align 2 {
entry:
%retval = alloca %"struct.std::_Rb_tree_iterator", align 8
%this.addr = alloca %"class.std::map"*, align 8
%__x.addr = alloca i32*, align 8
store %"class.std::map"* %this, %"class.std::map"** %this.addr, align 8
store i32* %__x, i32** %__x.addr, align 8
%this1 = load %"class.std::map"*, %"class.std::map"** %this.addr, align 8
%_M_t = getelementptr inbounds %"class.std::map", %"class.std::map"* %this1, i32 0, i32 0
%0 = load i32*, i32** %__x.addr, align 8
%call = call %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE11lower_boundERS1_(%"class.std::_Rb_tree"* %_M_t, i32* nonnull align 4 dereferenceable(4) %0)
%coerce.dive = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %call, %"struct.std::_Rb_tree_node_base"** %coerce.dive, align 8
%coerce.dive2 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
%1 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %coerce.dive2, align 8
ret %"struct.std::_Rb_tree_node_base"* %1
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local zeroext i1 @_ZSteqRKSt17_Rb_tree_iteratorISt4pairIKiP14_twoIntsStructEES7_(%"struct.std::_Rb_tree_iterator"* nonnull align 8 dereferenceable(8) %__x, %"struct.std::_Rb_tree_iterator"* nonnull align 8 dereferenceable(8) %__y) #3 comdat {
entry:
%__x.addr = alloca %"struct.std::_Rb_tree_iterator"*, align 8
%__y.addr = alloca %"struct.std::_Rb_tree_iterator"*, align 8
store %"struct.std::_Rb_tree_iterator"* %__x, %"struct.std::_Rb_tree_iterator"** %__x.addr, align 8
store %"struct.std::_Rb_tree_iterator"* %__y, %"struct.std::_Rb_tree_iterator"** %__y.addr, align 8
%0 = load %"struct.std::_Rb_tree_iterator"*, %"struct.std::_Rb_tree_iterator"** %__x.addr, align 8
%_M_node = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %0, i32 0, i32 0
%1 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node, align 8
%2 = load %"struct.std::_Rb_tree_iterator"*, %"struct.std::_Rb_tree_iterator"** %__y.addr, align 8
%_M_node1 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %2, i32 0, i32 0
%3 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node1, align 8
%cmp = icmp eq %"struct.std::_Rb_tree_node_base"* %1, %3
ret i1 %cmp
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node_base"* @_ZNSt3mapIiP14_twoIntsStructSt4lessIiESaISt4pairIKiS1_EEE3endEv(%"class.std::map"* %this) #3 comdat align 2 {
entry:
%retval = alloca %"struct.std::_Rb_tree_iterator", align 8
%this.addr = alloca %"class.std::map"*, align 8
store %"class.std::map"* %this, %"class.std::map"** %this.addr, align 8
%this1 = load %"class.std::map"*, %"class.std::map"** %this.addr, align 8
%_M_t = getelementptr inbounds %"class.std::map", %"class.std::map"* %this1, i32 0, i32 0
%call = call %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE3endEv(%"class.std::_Rb_tree"* %_M_t) #11
%coerce.dive = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %call, %"struct.std::_Rb_tree_node_base"** %coerce.dive, align 8
%coerce.dive2 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
%0 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %coerce.dive2, align 8
ret %"struct.std::_Rb_tree_node_base"* %0
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNKSt3mapIiP14_twoIntsStructSt4lessIiESaISt4pairIKiS1_EEE8key_compEv(%"class.std::map"* %this) #0 comdat align 2 {
entry:
%this.addr = alloca %"class.std::map"*, align 8
%undef.agg.tmp = alloca %"struct.std::less", align 1
store %"class.std::map"* %this, %"class.std::map"** %this.addr, align 8
%this1 = load %"class.std::map"*, %"class.std::map"** %this.addr, align 8
%_M_t = getelementptr inbounds %"class.std::map", %"class.std::map"* %this1, i32 0, i32 0
call void @_ZNKSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE8key_compEv(%"class.std::_Rb_tree"* %_M_t)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local zeroext i1 @_ZNKSt4lessIiEclERKiS2_(%"struct.std::less"* %this, i32* nonnull align 4 dereferenceable(4) %__x, i32* nonnull align 4 dereferenceable(4) %__y) #3 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::less"*, align 8
%__x.addr = alloca i32*, align 8
%__y.addr = alloca i32*, align 8
store %"struct.std::less"* %this, %"struct.std::less"** %this.addr, align 8
store i32* %__x, i32** %__x.addr, align 8
store i32* %__y, i32** %__y.addr, align 8
%this1 = load %"struct.std::less"*, %"struct.std::less"** %this.addr, align 8
%0 = load i32*, i32** %__x.addr, align 8
%1 = load i32, i32* %0, align 4
%2 = load i32*, i32** %__y.addr, align 8
%3 = load i32, i32* %2, align 4
%cmp = icmp slt i32 %1, %3
ret i1 %cmp
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(16) %"struct.std::pair"* @_ZNKSt17_Rb_tree_iteratorISt4pairIKiP14_twoIntsStructEEdeEv(%"struct.std::_Rb_tree_iterator"* %this) #3 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%this.addr = alloca %"struct.std::_Rb_tree_iterator"*, align 8
store %"struct.std::_Rb_tree_iterator"* %this, %"struct.std::_Rb_tree_iterator"** %this.addr, align 8
%this1 = load %"struct.std::_Rb_tree_iterator"*, %"struct.std::_Rb_tree_iterator"** %this.addr, align 8
%_M_node = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %this1, i32 0, i32 0
%0 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node, align 8
%1 = bitcast %"struct.std::_Rb_tree_node_base"* %0 to %"struct.std::_Rb_tree_node"*
%call = invoke %"struct.std::pair"* @_ZNSt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEE9_M_valptrEv(%"struct.std::_Rb_tree_node"* %1)
to label %invoke.cont unwind label %terminate.lpad
invoke.cont: ; preds = %entry
ret %"struct.std::pair"* %call
terminate.lpad: ; preds = %entry
%2 = landingpad { i8*, i32 }
catch i8* null
%3 = extractvalue { i8*, i32 } %2, 0
call void @__clang_call_terminate(i8* %3) #12
unreachable
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJOiEESF_IJEEEEESt17_Rb_tree_iteratorIS4_ESt23_Rb_tree_const_iteratorIS4_EDpOT_(%"class.std::_Rb_tree"* %this, %"struct.std::_Rb_tree_node_base"* %__pos.coerce, %"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %__args, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %__args1, %"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %__args3) #0 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%retval = alloca %"struct.std::_Rb_tree_iterator", align 8
%__pos = alloca %"struct.std::_Rb_tree_const_iterator", align 8
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__args.addr = alloca %"struct.std::piecewise_construct_t"*, align 8
%__args.addr2 = alloca %"class.std::tuple"*, align 8
%__args.addr4 = alloca %"class.std::tuple.0"*, align 8
%__z = alloca %"struct.std::_Rb_tree_node"*, align 8
%__res = alloca %"struct.std::pair.1", align 8
%agg.tmp = alloca %"struct.std::_Rb_tree_const_iterator", align 8
%exn.slot = alloca i8*, align 8
%ehselector.slot = alloca i32, align 4
%coerce.dive = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", %"struct.std::_Rb_tree_const_iterator"* %__pos, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %__pos.coerce, %"struct.std::_Rb_tree_node_base"** %coerce.dive, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store %"struct.std::piecewise_construct_t"* %__args, %"struct.std::piecewise_construct_t"** %__args.addr, align 8
store %"class.std::tuple"* %__args1, %"class.std::tuple"** %__args.addr2, align 8
store %"class.std::tuple.0"* %__args3, %"class.std::tuple.0"** %__args.addr4, align 8
%this5 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%0 = load %"struct.std::piecewise_construct_t"*, %"struct.std::piecewise_construct_t"** %__args.addr, align 8
%call = call nonnull align 1 dereferenceable(1) %"struct.std::piecewise_construct_t"* @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(%"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %0) #11
%1 = load %"class.std::tuple"*, %"class.std::tuple"** %__args.addr2, align 8
%call6 = call nonnull align 8 dereferenceable(8) %"class.std::tuple"* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(%"class.std::tuple"* nonnull align 8 dereferenceable(8) %1) #11
%2 = load %"class.std::tuple.0"*, %"class.std::tuple.0"** %__args.addr4, align 8
%call7 = call nonnull align 1 dereferenceable(1) %"class.std::tuple.0"* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(%"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %2) #11
%call8 = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE14_M_create_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESF_IJEEEEEPSt13_Rb_tree_nodeIS4_EDpOT_(%"class.std::_Rb_tree"* %this5, %"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %call, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %call6, %"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %call7)
store %"struct.std::_Rb_tree_node"* %call8, %"struct.std::_Rb_tree_node"** %__z, align 8
%3 = bitcast %"struct.std::_Rb_tree_const_iterator"* %agg.tmp to i8*
%4 = bitcast %"struct.std::_Rb_tree_const_iterator"* %__pos to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %3, i8* align 8 %4, i64 8, i1 false)
%5 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__z, align 8
%call9 = invoke nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE6_S_keyEPKSt13_Rb_tree_nodeIS4_E(%"struct.std::_Rb_tree_node"* %5)
to label %invoke.cont unwind label %lpad
invoke.cont: ; preds = %entry
%coerce.dive10 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", %"struct.std::_Rb_tree_const_iterator"* %agg.tmp, i32 0, i32 0
%6 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %coerce.dive10, align 8
%call12 = invoke { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS4_ERS1_(%"class.std::_Rb_tree"* %this5, %"struct.std::_Rb_tree_node_base"* %6, i32* nonnull align 4 dereferenceable(4) %call9)
to label %invoke.cont11 unwind label %lpad
invoke.cont11: ; preds = %invoke.cont
%7 = bitcast %"struct.std::pair.1"* %__res to { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }*
%8 = getelementptr inbounds { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }, { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }* %7, i32 0, i32 0
%9 = extractvalue { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } %call12, 0
store %"struct.std::_Rb_tree_node_base"* %9, %"struct.std::_Rb_tree_node_base"** %8, align 8
%10 = getelementptr inbounds { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }, { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }* %7, i32 0, i32 1
%11 = extractvalue { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } %call12, 1
store %"struct.std::_Rb_tree_node_base"* %11, %"struct.std::_Rb_tree_node_base"** %10, align 8
%second = getelementptr inbounds %"struct.std::pair.1", %"struct.std::pair.1"* %__res, i32 0, i32 1
%12 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %second, align 8
%tobool = icmp ne %"struct.std::_Rb_tree_node_base"* %12, null
br i1 %tobool, label %if.then, label %if.end
if.then: ; preds = %invoke.cont11
%first = getelementptr inbounds %"struct.std::pair.1", %"struct.std::pair.1"* %__res, i32 0, i32 0
%13 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %first, align 8
%second13 = getelementptr inbounds %"struct.std::pair.1", %"struct.std::pair.1"* %__res, i32 0, i32 1
%14 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %second13, align 8
%15 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__z, align 8
%call15 = invoke %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE14_M_insert_nodeEPSt18_Rb_tree_node_baseSC_PSt13_Rb_tree_nodeIS4_E(%"class.std::_Rb_tree"* %this5, %"struct.std::_Rb_tree_node_base"* %13, %"struct.std::_Rb_tree_node_base"* %14, %"struct.std::_Rb_tree_node"* %15)
to label %invoke.cont14 unwind label %lpad
invoke.cont14: ; preds = %if.then
%coerce.dive16 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %call15, %"struct.std::_Rb_tree_node_base"** %coerce.dive16, align 8
br label %return
lpad: ; preds = %if.then, %invoke.cont, %entry
%16 = landingpad { i8*, i32 }
catch i8* null
%17 = extractvalue { i8*, i32 } %16, 0
store i8* %17, i8** %exn.slot, align 8
%18 = extractvalue { i8*, i32 } %16, 1
store i32 %18, i32* %ehselector.slot, align 4
br label %catch
catch: ; preds = %lpad
%exn = load i8*, i8** %exn.slot, align 8
%19 = call i8* @__cxa_begin_catch(i8* %exn) #11
%20 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__z, align 8
call void @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE12_M_drop_nodeEPSt13_Rb_tree_nodeIS4_E(%"class.std::_Rb_tree"* %this5, %"struct.std::_Rb_tree_node"* %20) #11
invoke void @__cxa_rethrow() #13
to label %unreachable unwind label %lpad18
if.end: ; preds = %invoke.cont11
%21 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__z, align 8
call void @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE12_M_drop_nodeEPSt13_Rb_tree_nodeIS4_E(%"class.std::_Rb_tree"* %this5, %"struct.std::_Rb_tree_node"* %21) #11
%first17 = getelementptr inbounds %"struct.std::pair.1", %"struct.std::pair.1"* %__res, i32 0, i32 0
%22 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %first17, align 8
call void @_ZNSt17_Rb_tree_iteratorISt4pairIKiP14_twoIntsStructEEC2EPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_iterator"* %retval, %"struct.std::_Rb_tree_node_base"* %22) #11
br label %return
lpad18: ; preds = %catch
%23 = landingpad { i8*, i32 }
cleanup
%24 = extractvalue { i8*, i32 } %23, 0
store i8* %24, i8** %exn.slot, align 8
%25 = extractvalue { i8*, i32 } %23, 1
store i32 %25, i32* %ehselector.slot, align 4
invoke void @__cxa_end_catch()
to label %invoke.cont19 unwind label %terminate.lpad
invoke.cont19: ; preds = %lpad18
br label %eh.resume
try.cont: ; No predecessors!
call void @llvm.trap()
unreachable
return: ; preds = %if.end, %invoke.cont14
%coerce.dive20 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
%26 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %coerce.dive20, align 8
ret %"struct.std::_Rb_tree_node_base"* %26
eh.resume: ; preds = %invoke.cont19
%exn21 = load i8*, i8** %exn.slot, align 8
%sel = load i32, i32* %ehselector.slot, align 4
%lpad.val = insertvalue { i8*, i32 } undef, i8* %exn21, 0
%lpad.val22 = insertvalue { i8*, i32 } %lpad.val, i32 %sel, 1
resume { i8*, i32 } %lpad.val22
terminate.lpad: ; preds = %lpad18
%27 = landingpad { i8*, i32 }
catch i8* null
%28 = extractvalue { i8*, i32 } %27, 0
call void @__clang_call_terminate(i8* %28) #12
unreachable
unreachable: ; preds = %catch
unreachable
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt23_Rb_tree_const_iteratorISt4pairIKiP14_twoIntsStructEEC2ERKSt17_Rb_tree_iteratorIS4_E(%"struct.std::_Rb_tree_const_iterator"* %this, %"struct.std::_Rb_tree_iterator"* nonnull align 8 dereferenceable(8) %__it) unnamed_addr #3 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Rb_tree_const_iterator"*, align 8
%__it.addr = alloca %"struct.std::_Rb_tree_iterator"*, align 8
store %"struct.std::_Rb_tree_const_iterator"* %this, %"struct.std::_Rb_tree_const_iterator"** %this.addr, align 8
store %"struct.std::_Rb_tree_iterator"* %__it, %"struct.std::_Rb_tree_iterator"** %__it.addr, align 8
%this1 = load %"struct.std::_Rb_tree_const_iterator"*, %"struct.std::_Rb_tree_const_iterator"** %this.addr, align 8
%_M_node = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", %"struct.std::_Rb_tree_const_iterator"* %this1, i32 0, i32 0
%0 = load %"struct.std::_Rb_tree_iterator"*, %"struct.std::_Rb_tree_iterator"** %__it.addr, align 8
%_M_node2 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %0, i32 0, i32 0
%1 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node2, align 8
store %"struct.std::_Rb_tree_node_base"* %1, %"struct.std::_Rb_tree_node_base"** %_M_node, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZSt16forward_as_tupleIJiEESt5tupleIJDpOT_EES3_(%"class.std::tuple"* noalias sret align 8 %agg.result, i32* nonnull align 4 dereferenceable(4) %__args) #3 comdat {
entry:
%result.ptr = alloca i8*, align 8
%__args.addr = alloca i32*, align 8
%0 = bitcast %"class.std::tuple"* %agg.result to i8*
store i8* %0, i8** %result.ptr, align 8
store i32* %__args, i32** %__args.addr, align 8
%1 = load i32*, i32** %__args.addr, align 8
%call = call nonnull align 4 dereferenceable(4) i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i32* nonnull align 4 dereferenceable(4) %1) #11
call void @_ZNSt5tupleIJOiEEC2IJiELb1ELb1EEEDpOT_(%"class.std::tuple"* %agg.result, i32* nonnull align 4 dereferenceable(4) %call) #11
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 4 dereferenceable(4) i32* @_ZSt4moveIRiEONSt16remove_referenceIT_E4typeEOS2_(i32* nonnull align 4 dereferenceable(4) %__t) #3 comdat {
entry:
%__t.addr = alloca i32*, align 8
store i32* %__t, i32** %__t.addr, align 8
%0 = load i32*, i32** %__t.addr, align 8
ret i32* %0
}
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #1
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE11lower_boundERS1_(%"class.std::_Rb_tree"* %this, i32* nonnull align 4 dereferenceable(4) %__k) #0 comdat align 2 {
entry:
%retval = alloca %"struct.std::_Rb_tree_iterator", align 8
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__k.addr = alloca i32*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store i32* %__k, i32** %__k.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%call = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE8_M_beginEv(%"class.std::_Rb_tree"* %this1) #11
%call2 = call %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE6_M_endEv(%"class.std::_Rb_tree"* %this1) #11
%0 = load i32*, i32** %__k.addr, align 8
%call3 = call %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE14_M_lower_boundEPSt13_Rb_tree_nodeIS4_EPSt18_Rb_tree_node_baseRS1_(%"class.std::_Rb_tree"* %this1, %"struct.std::_Rb_tree_node"* %call, %"struct.std::_Rb_tree_node_base"* %call2, i32* nonnull align 4 dereferenceable(4) %0)
%coerce.dive = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %call3, %"struct.std::_Rb_tree_node_base"** %coerce.dive, align 8
%coerce.dive4 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
%1 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %coerce.dive4, align 8
ret %"struct.std::_Rb_tree_node_base"* %1
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE14_M_lower_boundEPSt13_Rb_tree_nodeIS4_EPSt18_Rb_tree_node_baseRS1_(%"class.std::_Rb_tree"* %this, %"struct.std::_Rb_tree_node"* %__x, %"struct.std::_Rb_tree_node_base"* %__y, i32* nonnull align 4 dereferenceable(4) %__k) #0 comdat align 2 {
entry:
%retval = alloca %"struct.std::_Rb_tree_iterator", align 8
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__x.addr = alloca %"struct.std::_Rb_tree_node"*, align 8
%__y.addr = alloca %"struct.std::_Rb_tree_node_base"*, align 8
%__k.addr = alloca i32*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store %"struct.std::_Rb_tree_node"* %__x, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
store %"struct.std::_Rb_tree_node_base"* %__y, %"struct.std::_Rb_tree_node_base"** %__y.addr, align 8
store i32* %__k, i32** %__k.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
br label %while.cond
while.cond: ; preds = %if.end, %entry
%0 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
%cmp = icmp ne %"struct.std::_Rb_tree_node"* %0, null
br i1 %cmp, label %while.body, label %while.end
while.body: ; preds = %while.cond
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%1 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, _twoIntsStruct *>, std::_Select1st<std::pair<const int, _twoIntsStruct *>>, std::less<int>, std::allocator<std::pair<const int, _twoIntsStruct *>>>::_Rb_tree_impl"* %_M_impl to %"struct.std::_Rb_tree_key_compare"*
%_M_key_compare = getelementptr inbounds %"struct.std::_Rb_tree_key_compare", %"struct.std::_Rb_tree_key_compare"* %1, i32 0, i32 0
%2 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
%call = call nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE6_S_keyEPKSt13_Rb_tree_nodeIS4_E(%"struct.std::_Rb_tree_node"* %2)
%3 = load i32*, i32** %__k.addr, align 8
%call2 = call zeroext i1 @_ZNKSt4lessIiEclERKiS2_(%"struct.std::less"* %_M_key_compare, i32* nonnull align 4 dereferenceable(4) %call, i32* nonnull align 4 dereferenceable(4) %3)
br i1 %call2, label %if.else, label %if.then
if.then: ; preds = %while.body
%4 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
%5 = bitcast %"struct.std::_Rb_tree_node"* %4 to %"struct.std::_Rb_tree_node_base"*
store %"struct.std::_Rb_tree_node_base"* %5, %"struct.std::_Rb_tree_node_base"** %__y.addr, align 8
%6 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
%7 = bitcast %"struct.std::_Rb_tree_node"* %6 to %"struct.std::_Rb_tree_node_base"*
%call3 = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE7_S_leftEPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %7) #11
store %"struct.std::_Rb_tree_node"* %call3, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
br label %if.end
if.else: ; preds = %while.body
%8 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
%9 = bitcast %"struct.std::_Rb_tree_node"* %8 to %"struct.std::_Rb_tree_node_base"*
%call4 = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE8_S_rightEPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %9) #11
store %"struct.std::_Rb_tree_node"* %call4, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
br label %if.end
if.end: ; preds = %if.else, %if.then
br label %while.cond
while.end: ; preds = %while.cond
%10 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__y.addr, align 8
call void @_ZNSt17_Rb_tree_iteratorISt4pairIKiP14_twoIntsStructEEC2EPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_iterator"* %retval, %"struct.std::_Rb_tree_node_base"* %10) #11
%coerce.dive = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
%11 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %coerce.dive, align 8
ret %"struct.std::_Rb_tree_node_base"* %11
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE8_M_beginEv(%"class.std::_Rb_tree"* %this) #3 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%call = call %"struct.std::_Rb_tree_node"* @_ZNKSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE9_M_mbeginEv(%"class.std::_Rb_tree"* %this1) #11
ret %"struct.std::_Rb_tree_node"* %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE6_M_endEv(%"class.std::_Rb_tree"* %this) #3 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%0 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, _twoIntsStruct *>, std::_Select1st<std::pair<const int, _twoIntsStruct *>>, std::less<int>, std::allocator<std::pair<const int, _twoIntsStruct *>>>::_Rb_tree_impl"* %_M_impl to i8*
%add.ptr = getelementptr inbounds i8, i8* %0, i64 8
%1 = bitcast i8* %add.ptr to %"struct.std::_Rb_tree_header"*
%_M_header = getelementptr inbounds %"struct.std::_Rb_tree_header", %"struct.std::_Rb_tree_header"* %1, i32 0, i32 0
ret %"struct.std::_Rb_tree_node_base"* %_M_header
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE6_S_keyEPKSt13_Rb_tree_nodeIS4_E(%"struct.std::_Rb_tree_node"* %__x) #0 comdat align 2 {
entry:
%__x.addr = alloca %"struct.std::_Rb_tree_node"*, align 8
%ref.tmp = alloca %"struct.std::_Select1st", align 1
store %"struct.std::_Rb_tree_node"* %__x, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
%0 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
%call = call %"struct.std::pair"* @_ZNKSt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEE9_M_valptrEv(%"struct.std::_Rb_tree_node"* %0)
%call1 = call nonnull align 4 dereferenceable(4) i32* @_ZNKSt10_Select1stISt4pairIKiP14_twoIntsStructEEclERKS4_(%"struct.std::_Select1st"* %ref.tmp, %"struct.std::pair"* nonnull align 8 dereferenceable(16) %call)
ret i32* %call1
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE7_S_leftEPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %__x) #3 comdat align 2 {
entry:
%__x.addr = alloca %"struct.std::_Rb_tree_node_base"*, align 8
store %"struct.std::_Rb_tree_node_base"* %__x, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
%0 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
%_M_left = getelementptr inbounds %"struct.std::_Rb_tree_node_base", %"struct.std::_Rb_tree_node_base"* %0, i32 0, i32 2
%1 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_left, align 8
%2 = bitcast %"struct.std::_Rb_tree_node_base"* %1 to %"struct.std::_Rb_tree_node"*
ret %"struct.std::_Rb_tree_node"* %2
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE8_S_rightEPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %__x) #3 comdat align 2 {
entry:
%__x.addr = alloca %"struct.std::_Rb_tree_node_base"*, align 8
store %"struct.std::_Rb_tree_node_base"* %__x, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
%0 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
%_M_right = getelementptr inbounds %"struct.std::_Rb_tree_node_base", %"struct.std::_Rb_tree_node_base"* %0, i32 0, i32 3
%1 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_right, align 8
%2 = bitcast %"struct.std::_Rb_tree_node_base"* %1 to %"struct.std::_Rb_tree_node"*
ret %"struct.std::_Rb_tree_node"* %2
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt17_Rb_tree_iteratorISt4pairIKiP14_twoIntsStructEEC2EPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_iterator"* %this, %"struct.std::_Rb_tree_node_base"* %__x) unnamed_addr #3 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Rb_tree_iterator"*, align 8
%__x.addr = alloca %"struct.std::_Rb_tree_node_base"*, align 8
store %"struct.std::_Rb_tree_iterator"* %this, %"struct.std::_Rb_tree_iterator"** %this.addr, align 8
store %"struct.std::_Rb_tree_node_base"* %__x, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
%this1 = load %"struct.std::_Rb_tree_iterator"*, %"struct.std::_Rb_tree_iterator"** %this.addr, align 8
%_M_node = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %this1, i32 0, i32 0
%0 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
store %"struct.std::_Rb_tree_node_base"* %0, %"struct.std::_Rb_tree_node_base"** %_M_node, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 4 dereferenceable(4) i32* @_ZNKSt10_Select1stISt4pairIKiP14_twoIntsStructEEclERKS4_(%"struct.std::_Select1st"* %this, %"struct.std::pair"* nonnull align 8 dereferenceable(16) %__x) #3 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Select1st"*, align 8
%__x.addr = alloca %"struct.std::pair"*, align 8
store %"struct.std::_Select1st"* %this, %"struct.std::_Select1st"** %this.addr, align 8
store %"struct.std::pair"* %__x, %"struct.std::pair"** %__x.addr, align 8
%this1 = load %"struct.std::_Select1st"*, %"struct.std::_Select1st"** %this.addr, align 8
%0 = load %"struct.std::pair"*, %"struct.std::pair"** %__x.addr, align 8
%first = getelementptr inbounds %"struct.std::pair", %"struct.std::pair"* %0, i32 0, i32 0
ret i32* %first
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::pair"* @_ZNKSt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEE9_M_valptrEv(%"struct.std::_Rb_tree_node"* %this) #3 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Rb_tree_node"*, align 8
store %"struct.std::_Rb_tree_node"* %this, %"struct.std::_Rb_tree_node"** %this.addr, align 8
%this1 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %this.addr, align 8
%_M_storage = getelementptr inbounds %"struct.std::_Rb_tree_node", %"struct.std::_Rb_tree_node"* %this1, i32 0, i32 1
%call = call %"struct.std::pair"* @_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiP14_twoIntsStructEE6_M_ptrEv(%"struct.__gnu_cxx::__aligned_membuf"* %_M_storage) #11
ret %"struct.std::pair"* %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::pair"* @_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiP14_twoIntsStructEE6_M_ptrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this) #3 comdat align 2 {
entry:
%this.addr = alloca %"struct.__gnu_cxx::__aligned_membuf"*, align 8
store %"struct.__gnu_cxx::__aligned_membuf"* %this, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%this1 = load %"struct.__gnu_cxx::__aligned_membuf"*, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%call = call i8* @_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiP14_twoIntsStructEE7_M_addrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this1) #11
%0 = bitcast i8* %call to %"struct.std::pair"*
ret %"struct.std::pair"* %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i8* @_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiP14_twoIntsStructEE7_M_addrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this) #3 comdat align 2 {
entry:
%this.addr = alloca %"struct.__gnu_cxx::__aligned_membuf"*, align 8
store %"struct.__gnu_cxx::__aligned_membuf"* %this, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%this1 = load %"struct.__gnu_cxx::__aligned_membuf"*, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%_M_storage = getelementptr inbounds %"struct.__gnu_cxx::__aligned_membuf", %"struct.__gnu_cxx::__aligned_membuf"* %this1, i32 0, i32 0
%0 = bitcast [16 x i8]* %_M_storage to i8*
ret i8* %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node"* @_ZNKSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE9_M_mbeginEv(%"class.std::_Rb_tree"* %this) #3 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%0 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, _twoIntsStruct *>, std::_Select1st<std::pair<const int, _twoIntsStruct *>>, std::less<int>, std::allocator<std::pair<const int, _twoIntsStruct *>>>::_Rb_tree_impl"* %_M_impl to i8*
%add.ptr = getelementptr inbounds i8, i8* %0, i64 8
%1 = bitcast i8* %add.ptr to %"struct.std::_Rb_tree_header"*
%_M_header = getelementptr inbounds %"struct.std::_Rb_tree_header", %"struct.std::_Rb_tree_header"* %1, i32 0, i32 0
%_M_parent = getelementptr inbounds %"struct.std::_Rb_tree_node_base", %"struct.std::_Rb_tree_node_base"* %_M_header, i32 0, i32 1
%2 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_parent, align 8
%3 = bitcast %"struct.std::_Rb_tree_node_base"* %2 to %"struct.std::_Rb_tree_node"*
ret %"struct.std::_Rb_tree_node"* %3
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE3endEv(%"class.std::_Rb_tree"* %this) #3 comdat align 2 {
entry:
%retval = alloca %"struct.std::_Rb_tree_iterator", align 8
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%0 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, _twoIntsStruct *>, std::_Select1st<std::pair<const int, _twoIntsStruct *>>, std::less<int>, std::allocator<std::pair<const int, _twoIntsStruct *>>>::_Rb_tree_impl"* %_M_impl to i8*
%add.ptr = getelementptr inbounds i8, i8* %0, i64 8
%1 = bitcast i8* %add.ptr to %"struct.std::_Rb_tree_header"*
%_M_header = getelementptr inbounds %"struct.std::_Rb_tree_header", %"struct.std::_Rb_tree_header"* %1, i32 0, i32 0
call void @_ZNSt17_Rb_tree_iteratorISt4pairIKiP14_twoIntsStructEEC2EPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_iterator"* %retval, %"struct.std::_Rb_tree_node_base"* %_M_header) #11
%coerce.dive = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
%2 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %coerce.dive, align 8
ret %"struct.std::_Rb_tree_node_base"* %2
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNKSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE8key_compEv(%"class.std::_Rb_tree"* %this) #3 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%0 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, _twoIntsStruct *>, std::_Select1st<std::pair<const int, _twoIntsStruct *>>, std::less<int>, std::allocator<std::pair<const int, _twoIntsStruct *>>>::_Rb_tree_impl"* %_M_impl to %"struct.std::_Rb_tree_key_compare"*
%_M_key_compare = getelementptr inbounds %"struct.std::_Rb_tree_key_compare", %"struct.std::_Rb_tree_key_compare"* %0, i32 0, i32 0
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::pair"* @_ZNSt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEE9_M_valptrEv(%"struct.std::_Rb_tree_node"* %this) #3 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Rb_tree_node"*, align 8
store %"struct.std::_Rb_tree_node"* %this, %"struct.std::_Rb_tree_node"** %this.addr, align 8
%this1 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %this.addr, align 8
%_M_storage = getelementptr inbounds %"struct.std::_Rb_tree_node", %"struct.std::_Rb_tree_node"* %this1, i32 0, i32 1
%call = call %"struct.std::pair"* @_ZN9__gnu_cxx16__aligned_membufISt4pairIKiP14_twoIntsStructEE6_M_ptrEv(%"struct.__gnu_cxx::__aligned_membuf"* %_M_storage) #11
ret %"struct.std::pair"* %call
}
declare dso_local i32 @__gxx_personality_v0(...)
; Function Attrs: noinline noreturn nounwind
define linkonce_odr hidden void @__clang_call_terminate(i8* %0) #4 comdat {
%2 = call i8* @__cxa_begin_catch(i8* %0) #11
call void @_ZSt9terminatev() #12
unreachable
}
declare dso_local i8* @__cxa_begin_catch(i8*)
declare dso_local void @_ZSt9terminatev()
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::pair"* @_ZN9__gnu_cxx16__aligned_membufISt4pairIKiP14_twoIntsStructEE6_M_ptrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this) #3 comdat align 2 {
entry:
%this.addr = alloca %"struct.__gnu_cxx::__aligned_membuf"*, align 8
store %"struct.__gnu_cxx::__aligned_membuf"* %this, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%this1 = load %"struct.__gnu_cxx::__aligned_membuf"*, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%call = call i8* @_ZN9__gnu_cxx16__aligned_membufISt4pairIKiP14_twoIntsStructEE7_M_addrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this1) #11
%0 = bitcast i8* %call to %"struct.std::pair"*
ret %"struct.std::pair"* %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i8* @_ZN9__gnu_cxx16__aligned_membufISt4pairIKiP14_twoIntsStructEE7_M_addrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this) #3 comdat align 2 {
entry:
%this.addr = alloca %"struct.__gnu_cxx::__aligned_membuf"*, align 8
store %"struct.__gnu_cxx::__aligned_membuf"* %this, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%this1 = load %"struct.__gnu_cxx::__aligned_membuf"*, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%_M_storage = getelementptr inbounds %"struct.__gnu_cxx::__aligned_membuf", %"struct.__gnu_cxx::__aligned_membuf"* %this1, i32 0, i32 0
%0 = bitcast [16 x i8]* %_M_storage to i8*
ret i8* %0
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE14_M_create_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESF_IJEEEEEPSt13_Rb_tree_nodeIS4_EDpOT_(%"class.std::_Rb_tree"* %this, %"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %__args, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %__args1, %"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %__args3) #0 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__args.addr = alloca %"struct.std::piecewise_construct_t"*, align 8
%__args.addr2 = alloca %"class.std::tuple"*, align 8
%__args.addr4 = alloca %"class.std::tuple.0"*, align 8
%__tmp = alloca %"struct.std::_Rb_tree_node"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store %"struct.std::piecewise_construct_t"* %__args, %"struct.std::piecewise_construct_t"** %__args.addr, align 8
store %"class.std::tuple"* %__args1, %"class.std::tuple"** %__args.addr2, align 8
store %"class.std::tuple.0"* %__args3, %"class.std::tuple.0"** %__args.addr4, align 8
%this5 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%call = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE11_M_get_nodeEv(%"class.std::_Rb_tree"* %this5)
store %"struct.std::_Rb_tree_node"* %call, %"struct.std::_Rb_tree_node"** %__tmp, align 8
%0 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__tmp, align 8
%1 = load %"struct.std::piecewise_construct_t"*, %"struct.std::piecewise_construct_t"** %__args.addr, align 8
%call6 = call nonnull align 1 dereferenceable(1) %"struct.std::piecewise_construct_t"* @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(%"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %1) #11
%2 = load %"class.std::tuple"*, %"class.std::tuple"** %__args.addr2, align 8
%call7 = call nonnull align 8 dereferenceable(8) %"class.std::tuple"* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(%"class.std::tuple"* nonnull align 8 dereferenceable(8) %2) #11
%3 = load %"class.std::tuple.0"*, %"class.std::tuple.0"** %__args.addr4, align 8
%call8 = call nonnull align 1 dereferenceable(1) %"class.std::tuple.0"* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(%"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %3) #11
call void @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE17_M_construct_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESF_IJEEEEEvPSt13_Rb_tree_nodeIS4_EDpOT_(%"class.std::_Rb_tree"* %this5, %"struct.std::_Rb_tree_node"* %0, %"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %call6, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %call7, %"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %call8)
%4 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__tmp, align 8
ret %"struct.std::_Rb_tree_node"* %4
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 1 dereferenceable(1) %"struct.std::piecewise_construct_t"* @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(%"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %__t) #3 comdat {
entry:
%__t.addr = alloca %"struct.std::piecewise_construct_t"*, align 8
store %"struct.std::piecewise_construct_t"* %__t, %"struct.std::piecewise_construct_t"** %__t.addr, align 8
%0 = load %"struct.std::piecewise_construct_t"*, %"struct.std::piecewise_construct_t"** %__t.addr, align 8
ret %"struct.std::piecewise_construct_t"* %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) %"class.std::tuple"* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(%"class.std::tuple"* nonnull align 8 dereferenceable(8) %__t) #3 comdat {
entry:
%__t.addr = alloca %"class.std::tuple"*, align 8
store %"class.std::tuple"* %__t, %"class.std::tuple"** %__t.addr, align 8
%0 = load %"class.std::tuple"*, %"class.std::tuple"** %__t.addr, align 8
ret %"class.std::tuple"* %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 1 dereferenceable(1) %"class.std::tuple.0"* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(%"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %__t) #3 comdat {
entry:
%__t.addr = alloca %"class.std::tuple.0"*, align 8
store %"class.std::tuple.0"* %__t, %"class.std::tuple.0"** %__t.addr, align 8
%0 = load %"class.std::tuple.0"*, %"class.std::tuple.0"** %__t.addr, align 8
ret %"class.std::tuple.0"* %0
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS4_ERS1_(%"class.std::_Rb_tree"* %this, %"struct.std::_Rb_tree_node_base"* %__position.coerce, i32* nonnull align 4 dereferenceable(4) %__k) #0 comdat align 2 {
entry:
%retval = alloca %"struct.std::pair.1", align 8
%__position = alloca %"struct.std::_Rb_tree_const_iterator", align 8
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__k.addr = alloca i32*, align 8
%__pos = alloca %"struct.std::_Rb_tree_iterator", align 8
%ref.tmp = alloca %"struct.std::_Rb_tree_node_base"*, align 8
%__before = alloca %"struct.std::_Rb_tree_iterator", align 8
%ref.tmp37 = alloca %"struct.std::_Rb_tree_node_base"*, align 8
%__after = alloca %"struct.std::_Rb_tree_iterator", align 8
%ref.tmp55 = alloca %"struct.std::_Rb_tree_node_base"*, align 8
%ref.tmp69 = alloca %"struct.std::_Rb_tree_node_base"*, align 8
%ref.tmp78 = alloca %"struct.std::_Rb_tree_node_base"*, align 8
%coerce.dive = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", %"struct.std::_Rb_tree_const_iterator"* %__position, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %__position.coerce, %"struct.std::_Rb_tree_node_base"** %coerce.dive, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store i32* %__k, i32** %__k.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%call = call %"struct.std::_Rb_tree_node_base"* @_ZNKSt23_Rb_tree_const_iteratorISt4pairIKiP14_twoIntsStructEE13_M_const_castEv(%"struct.std::_Rb_tree_const_iterator"* %__position) #11
%coerce.dive2 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__pos, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %call, %"struct.std::_Rb_tree_node_base"** %coerce.dive2, align 8
%_M_node = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__pos, i32 0, i32 0
%0 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node, align 8
%call3 = call %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE6_M_endEv(%"class.std::_Rb_tree"* %this1) #11
%cmp = icmp eq %"struct.std::_Rb_tree_node_base"* %0, %call3
br i1 %cmp, label %if.then, label %if.else12
if.then: ; preds = %entry
%call4 = call i64 @_ZNKSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE4sizeEv(%"class.std::_Rb_tree"* %this1) #11
%cmp5 = icmp ugt i64 %call4, 0
br i1 %cmp5, label %land.lhs.true, label %if.else
land.lhs.true: ; preds = %if.then
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%1 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, _twoIntsStruct *>, std::_Select1st<std::pair<const int, _twoIntsStruct *>>, std::less<int>, std::allocator<std::pair<const int, _twoIntsStruct *>>>::_Rb_tree_impl"* %_M_impl to %"struct.std::_Rb_tree_key_compare"*
%_M_key_compare = getelementptr inbounds %"struct.std::_Rb_tree_key_compare", %"struct.std::_Rb_tree_key_compare"* %1, i32 0, i32 0
%call6 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE12_M_rightmostEv(%"class.std::_Rb_tree"* %this1) #11
%2 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %call6, align 8
%call7 = call nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE6_S_keyEPKSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %2)
%3 = load i32*, i32** %__k.addr, align 8
%call8 = call zeroext i1 @_ZNKSt4lessIiEclERKiS2_(%"struct.std::less"* %_M_key_compare, i32* nonnull align 4 dereferenceable(4) %call7, i32* nonnull align 4 dereferenceable(4) %3)
br i1 %call8, label %if.then9, label %if.else
if.then9: ; preds = %land.lhs.true
store %"struct.std::_Rb_tree_node_base"* null, %"struct.std::_Rb_tree_node_base"** %ref.tmp, align 8
%call10 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE12_M_rightmostEv(%"class.std::_Rb_tree"* %this1) #11
call void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_Lb1EEERKS1_OT_(%"struct.std::pair.1"* %retval, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %ref.tmp, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %call10)
br label %return
if.else: ; preds = %land.lhs.true, %if.then
%4 = load i32*, i32** %__k.addr, align 8
%call11 = call { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE24_M_get_insert_unique_posERS1_(%"class.std::_Rb_tree"* %this1, i32* nonnull align 4 dereferenceable(4) %4)
%5 = bitcast %"struct.std::pair.1"* %retval to { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }*
%6 = getelementptr inbounds { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }, { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }* %5, i32 0, i32 0
%7 = extractvalue { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } %call11, 0
store %"struct.std::_Rb_tree_node_base"* %7, %"struct.std::_Rb_tree_node_base"** %6, align 8
%8 = getelementptr inbounds { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }, { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }* %5, i32 0, i32 1
%9 = extractvalue { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } %call11, 1
store %"struct.std::_Rb_tree_node_base"* %9, %"struct.std::_Rb_tree_node_base"** %8, align 8
br label %return
if.else12: ; preds = %entry
%_M_impl13 = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%10 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, _twoIntsStruct *>, std::_Select1st<std::pair<const int, _twoIntsStruct *>>, std::less<int>, std::allocator<std::pair<const int, _twoIntsStruct *>>>::_Rb_tree_impl"* %_M_impl13 to %"struct.std::_Rb_tree_key_compare"*
%_M_key_compare14 = getelementptr inbounds %"struct.std::_Rb_tree_key_compare", %"struct.std::_Rb_tree_key_compare"* %10, i32 0, i32 0
%11 = load i32*, i32** %__k.addr, align 8
%_M_node15 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__pos, i32 0, i32 0
%12 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node15, align 8
%call16 = call nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE6_S_keyEPKSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %12)
%call17 = call zeroext i1 @_ZNKSt4lessIiEclERKiS2_(%"struct.std::less"* %_M_key_compare14, i32* nonnull align 4 dereferenceable(4) %11, i32* nonnull align 4 dereferenceable(4) %call16)
br i1 %call17, label %if.then18, label %if.else44
if.then18: ; preds = %if.else12
%13 = bitcast %"struct.std::_Rb_tree_iterator"* %__before to i8*
%14 = bitcast %"struct.std::_Rb_tree_iterator"* %__pos to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %13, i8* align 8 %14, i64 8, i1 false)
%_M_node19 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__pos, i32 0, i32 0
%15 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node19, align 8
%call20 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE11_M_leftmostEv(%"class.std::_Rb_tree"* %this1) #11
%16 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %call20, align 8
%cmp21 = icmp eq %"struct.std::_Rb_tree_node_base"* %15, %16
br i1 %cmp21, label %if.then22, label %if.else25
if.then22: ; preds = %if.then18
%call23 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE11_M_leftmostEv(%"class.std::_Rb_tree"* %this1) #11
%call24 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE11_M_leftmostEv(%"class.std::_Rb_tree"* %this1) #11
call void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_S4_Lb1EEEOT_OT0_(%"struct.std::pair.1"* %retval, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %call23, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %call24)
br label %return
if.else25: ; preds = %if.then18
%_M_impl26 = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%17 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, _twoIntsStruct *>, std::_Select1st<std::pair<const int, _twoIntsStruct *>>, std::less<int>, std::allocator<std::pair<const int, _twoIntsStruct *>>>::_Rb_tree_impl"* %_M_impl26 to %"struct.std::_Rb_tree_key_compare"*
%_M_key_compare27 = getelementptr inbounds %"struct.std::_Rb_tree_key_compare", %"struct.std::_Rb_tree_key_compare"* %17, i32 0, i32 0
%call28 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_iterator"* @_ZNSt17_Rb_tree_iteratorISt4pairIKiP14_twoIntsStructEEmmEv(%"struct.std::_Rb_tree_iterator"* %__before) #11
%_M_node29 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %call28, i32 0, i32 0
%18 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node29, align 8
%call30 = call nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE6_S_keyEPKSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %18)
%19 = load i32*, i32** %__k.addr, align 8
%call31 = call zeroext i1 @_ZNKSt4lessIiEclERKiS2_(%"struct.std::less"* %_M_key_compare27, i32* nonnull align 4 dereferenceable(4) %call30, i32* nonnull align 4 dereferenceable(4) %19)
br i1 %call31, label %if.then32, label %if.else42
if.then32: ; preds = %if.else25
%_M_node33 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__before, i32 0, i32 0
%20 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node33, align 8
%call34 = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE8_S_rightEPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %20) #11
%cmp35 = icmp eq %"struct.std::_Rb_tree_node"* %call34, null
br i1 %cmp35, label %if.then36, label %if.else39
if.then36: ; preds = %if.then32
store %"struct.std::_Rb_tree_node_base"* null, %"struct.std::_Rb_tree_node_base"** %ref.tmp37, align 8
%_M_node38 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__before, i32 0, i32 0
call void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_Lb1EEERKS1_OT_(%"struct.std::pair.1"* %retval, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %ref.tmp37, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %_M_node38)
br label %return
if.else39: ; preds = %if.then32
%_M_node40 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__pos, i32 0, i32 0
%_M_node41 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__pos, i32 0, i32 0
call void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_S4_Lb1EEEOT_OT0_(%"struct.std::pair.1"* %retval, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %_M_node40, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %_M_node41)
br label %return
if.else42: ; preds = %if.else25
%21 = load i32*, i32** %__k.addr, align 8
%call43 = call { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE24_M_get_insert_unique_posERS1_(%"class.std::_Rb_tree"* %this1, i32* nonnull align 4 dereferenceable(4) %21)
%22 = bitcast %"struct.std::pair.1"* %retval to { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }*
%23 = getelementptr inbounds { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }, { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }* %22, i32 0, i32 0
%24 = extractvalue { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } %call43, 0
store %"struct.std::_Rb_tree_node_base"* %24, %"struct.std::_Rb_tree_node_base"** %23, align 8
%25 = getelementptr inbounds { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }, { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }* %22, i32 0, i32 1
%26 = extractvalue { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } %call43, 1
store %"struct.std::_Rb_tree_node_base"* %26, %"struct.std::_Rb_tree_node_base"** %25, align 8
br label %return
if.else44: ; preds = %if.else12
%_M_impl45 = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%27 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, _twoIntsStruct *>, std::_Select1st<std::pair<const int, _twoIntsStruct *>>, std::less<int>, std::allocator<std::pair<const int, _twoIntsStruct *>>>::_Rb_tree_impl"* %_M_impl45 to %"struct.std::_Rb_tree_key_compare"*
%_M_key_compare46 = getelementptr inbounds %"struct.std::_Rb_tree_key_compare", %"struct.std::_Rb_tree_key_compare"* %27, i32 0, i32 0
%_M_node47 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__pos, i32 0, i32 0
%28 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node47, align 8
%call48 = call nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE6_S_keyEPKSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %28)
%29 = load i32*, i32** %__k.addr, align 8
%call49 = call zeroext i1 @_ZNKSt4lessIiEclERKiS2_(%"struct.std::less"* %_M_key_compare46, i32* nonnull align 4 dereferenceable(4) %call48, i32* nonnull align 4 dereferenceable(4) %29)
br i1 %call49, label %if.then50, label %if.else76
if.then50: ; preds = %if.else44
%30 = bitcast %"struct.std::_Rb_tree_iterator"* %__after to i8*
%31 = bitcast %"struct.std::_Rb_tree_iterator"* %__pos to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %30, i8* align 8 %31, i64 8, i1 false)
%_M_node51 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__pos, i32 0, i32 0
%32 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node51, align 8
%call52 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE12_M_rightmostEv(%"class.std::_Rb_tree"* %this1) #11
%33 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %call52, align 8
%cmp53 = icmp eq %"struct.std::_Rb_tree_node_base"* %32, %33
br i1 %cmp53, label %if.then54, label %if.else57
if.then54: ; preds = %if.then50
store %"struct.std::_Rb_tree_node_base"* null, %"struct.std::_Rb_tree_node_base"** %ref.tmp55, align 8
%call56 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE12_M_rightmostEv(%"class.std::_Rb_tree"* %this1) #11
call void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_Lb1EEERKS1_OT_(%"struct.std::pair.1"* %retval, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %ref.tmp55, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %call56)
br label %return
if.else57: ; preds = %if.then50
%_M_impl58 = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%34 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, _twoIntsStruct *>, std::_Select1st<std::pair<const int, _twoIntsStruct *>>, std::less<int>, std::allocator<std::pair<const int, _twoIntsStruct *>>>::_Rb_tree_impl"* %_M_impl58 to %"struct.std::_Rb_tree_key_compare"*
%_M_key_compare59 = getelementptr inbounds %"struct.std::_Rb_tree_key_compare", %"struct.std::_Rb_tree_key_compare"* %34, i32 0, i32 0
%35 = load i32*, i32** %__k.addr, align 8
%call60 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_iterator"* @_ZNSt17_Rb_tree_iteratorISt4pairIKiP14_twoIntsStructEEppEv(%"struct.std::_Rb_tree_iterator"* %__after) #11
%_M_node61 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %call60, i32 0, i32 0
%36 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node61, align 8
%call62 = call nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE6_S_keyEPKSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %36)
%call63 = call zeroext i1 @_ZNKSt4lessIiEclERKiS2_(%"struct.std::less"* %_M_key_compare59, i32* nonnull align 4 dereferenceable(4) %35, i32* nonnull align 4 dereferenceable(4) %call62)
br i1 %call63, label %if.then64, label %if.else74
if.then64: ; preds = %if.else57
%_M_node65 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__pos, i32 0, i32 0
%37 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node65, align 8
%call66 = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE8_S_rightEPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %37) #11
%cmp67 = icmp eq %"struct.std::_Rb_tree_node"* %call66, null
br i1 %cmp67, label %if.then68, label %if.else71
if.then68: ; preds = %if.then64
store %"struct.std::_Rb_tree_node_base"* null, %"struct.std::_Rb_tree_node_base"** %ref.tmp69, align 8
%_M_node70 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__pos, i32 0, i32 0
call void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_Lb1EEERKS1_OT_(%"struct.std::pair.1"* %retval, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %ref.tmp69, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %_M_node70)
br label %return
if.else71: ; preds = %if.then64
%_M_node72 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__after, i32 0, i32 0
%_M_node73 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__after, i32 0, i32 0
call void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_S4_Lb1EEEOT_OT0_(%"struct.std::pair.1"* %retval, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %_M_node72, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %_M_node73)
br label %return
if.else74: ; preds = %if.else57
%38 = load i32*, i32** %__k.addr, align 8
%call75 = call { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE24_M_get_insert_unique_posERS1_(%"class.std::_Rb_tree"* %this1, i32* nonnull align 4 dereferenceable(4) %38)
%39 = bitcast %"struct.std::pair.1"* %retval to { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }*
%40 = getelementptr inbounds { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }, { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }* %39, i32 0, i32 0
%41 = extractvalue { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } %call75, 0
store %"struct.std::_Rb_tree_node_base"* %41, %"struct.std::_Rb_tree_node_base"** %40, align 8
%42 = getelementptr inbounds { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }, { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }* %39, i32 0, i32 1
%43 = extractvalue { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } %call75, 1
store %"struct.std::_Rb_tree_node_base"* %43, %"struct.std::_Rb_tree_node_base"** %42, align 8
br label %return
if.else76: ; preds = %if.else44
%_M_node77 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__pos, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* null, %"struct.std::_Rb_tree_node_base"** %ref.tmp78, align 8
call void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_Lb1EEEOT_RKS1_(%"struct.std::pair.1"* %retval, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %_M_node77, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %ref.tmp78)
br label %return
return: ; preds = %if.else76, %if.else74, %if.else71, %if.then68, %if.then54, %if.else42, %if.else39, %if.then36, %if.then22, %if.else, %if.then9
%44 = bitcast %"struct.std::pair.1"* %retval to { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }*
%45 = load { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }, { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }* %44, align 8
ret { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } %45
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE14_M_insert_nodeEPSt18_Rb_tree_node_baseSC_PSt13_Rb_tree_nodeIS4_E(%"class.std::_Rb_tree"* %this, %"struct.std::_Rb_tree_node_base"* %__x, %"struct.std::_Rb_tree_node_base"* %__p, %"struct.std::_Rb_tree_node"* %__z) #0 comdat align 2 {
entry:
%retval = alloca %"struct.std::_Rb_tree_iterator", align 8
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__x.addr = alloca %"struct.std::_Rb_tree_node_base"*, align 8
%__p.addr = alloca %"struct.std::_Rb_tree_node_base"*, align 8
%__z.addr = alloca %"struct.std::_Rb_tree_node"*, align 8
%__insert_left = alloca i8, align 1
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store %"struct.std::_Rb_tree_node_base"* %__x, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
store %"struct.std::_Rb_tree_node_base"* %__p, %"struct.std::_Rb_tree_node_base"** %__p.addr, align 8
store %"struct.std::_Rb_tree_node"* %__z, %"struct.std::_Rb_tree_node"** %__z.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%0 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
%cmp = icmp ne %"struct.std::_Rb_tree_node_base"* %0, null
br i1 %cmp, label %lor.end, label %lor.lhs.false
lor.lhs.false: ; preds = %entry
%1 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__p.addr, align 8
%call = call %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE6_M_endEv(%"class.std::_Rb_tree"* %this1) #11
%cmp2 = icmp eq %"struct.std::_Rb_tree_node_base"* %1, %call
br i1 %cmp2, label %lor.end, label %lor.rhs
lor.rhs: ; preds = %lor.lhs.false
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%2 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, _twoIntsStruct *>, std::_Select1st<std::pair<const int, _twoIntsStruct *>>, std::less<int>, std::allocator<std::pair<const int, _twoIntsStruct *>>>::_Rb_tree_impl"* %_M_impl to %"struct.std::_Rb_tree_key_compare"*
%_M_key_compare = getelementptr inbounds %"struct.std::_Rb_tree_key_compare", %"struct.std::_Rb_tree_key_compare"* %2, i32 0, i32 0
%3 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__z.addr, align 8
%call3 = call nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE6_S_keyEPKSt13_Rb_tree_nodeIS4_E(%"struct.std::_Rb_tree_node"* %3)
%4 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__p.addr, align 8
%call4 = call nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE6_S_keyEPKSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %4)
%call5 = call zeroext i1 @_ZNKSt4lessIiEclERKiS2_(%"struct.std::less"* %_M_key_compare, i32* nonnull align 4 dereferenceable(4) %call3, i32* nonnull align 4 dereferenceable(4) %call4)
br label %lor.end
lor.end: ; preds = %lor.rhs, %lor.lhs.false, %entry
%5 = phi i1 [ true, %lor.lhs.false ], [ true, %entry ], [ %call5, %lor.rhs ]
%frombool = zext i1 %5 to i8
store i8 %frombool, i8* %__insert_left, align 1
%6 = load i8, i8* %__insert_left, align 1
%tobool = trunc i8 %6 to i1
%7 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__z.addr, align 8
%8 = bitcast %"struct.std::_Rb_tree_node"* %7 to %"struct.std::_Rb_tree_node_base"*
%9 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__p.addr, align 8
%_M_impl6 = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%10 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, _twoIntsStruct *>, std::_Select1st<std::pair<const int, _twoIntsStruct *>>, std::less<int>, std::allocator<std::pair<const int, _twoIntsStruct *>>>::_Rb_tree_impl"* %_M_impl6 to i8*
%add.ptr = getelementptr inbounds i8, i8* %10, i64 8
%11 = bitcast i8* %add.ptr to %"struct.std::_Rb_tree_header"*
%_M_header = getelementptr inbounds %"struct.std::_Rb_tree_header", %"struct.std::_Rb_tree_header"* %11, i32 0, i32 0
call void @_ZSt29_Rb_tree_insert_and_rebalancebPSt18_Rb_tree_node_baseS0_RS_(i1 zeroext %tobool, %"struct.std::_Rb_tree_node_base"* %8, %"struct.std::_Rb_tree_node_base"* %9, %"struct.std::_Rb_tree_node_base"* nonnull align 8 dereferenceable(32) %_M_header) #11
%_M_impl7 = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%12 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, _twoIntsStruct *>, std::_Select1st<std::pair<const int, _twoIntsStruct *>>, std::less<int>, std::allocator<std::pair<const int, _twoIntsStruct *>>>::_Rb_tree_impl"* %_M_impl7 to i8*
%add.ptr8 = getelementptr inbounds i8, i8* %12, i64 8
%13 = bitcast i8* %add.ptr8 to %"struct.std::_Rb_tree_header"*
%_M_node_count = getelementptr inbounds %"struct.std::_Rb_tree_header", %"struct.std::_Rb_tree_header"* %13, i32 0, i32 1
%14 = load i64, i64* %_M_node_count, align 8
%inc = add i64 %14, 1
store i64 %inc, i64* %_M_node_count, align 8
%15 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__z.addr, align 8
%16 = bitcast %"struct.std::_Rb_tree_node"* %15 to %"struct.std::_Rb_tree_node_base"*
call void @_ZNSt17_Rb_tree_iteratorISt4pairIKiP14_twoIntsStructEEC2EPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_iterator"* %retval, %"struct.std::_Rb_tree_node_base"* %16) #11
%coerce.dive = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
%17 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %coerce.dive, align 8
ret %"struct.std::_Rb_tree_node_base"* %17
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE12_M_drop_nodeEPSt13_Rb_tree_nodeIS4_E(%"class.std::_Rb_tree"* %this, %"struct.std::_Rb_tree_node"* %__p) #3 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__p.addr = alloca %"struct.std::_Rb_tree_node"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store %"struct.std::_Rb_tree_node"* %__p, %"struct.std::_Rb_tree_node"** %__p.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%0 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__p.addr, align 8
call void @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE15_M_destroy_nodeEPSt13_Rb_tree_nodeIS4_E(%"class.std::_Rb_tree"* %this1, %"struct.std::_Rb_tree_node"* %0) #11
%1 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__p.addr, align 8
call void @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE11_M_put_nodeEPSt13_Rb_tree_nodeIS4_E(%"class.std::_Rb_tree"* %this1, %"struct.std::_Rb_tree_node"* %1) #11
ret void
}
declare dso_local void @__cxa_rethrow()
declare dso_local void @__cxa_end_catch()
; Function Attrs: cold noreturn nounwind
declare void @llvm.trap() #5
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE11_M_get_nodeEv(%"class.std::_Rb_tree"* %this) #0 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%call = call nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE21_M_get_Node_allocatorEv(%"class.std::_Rb_tree"* %this1) #11
%call2 = call %"struct.std::_Rb_tree_node"* @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEEE8allocateERS7_m(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %call, i64 1)
ret %"struct.std::_Rb_tree_node"* %call2
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE17_M_construct_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESF_IJEEEEEvPSt13_Rb_tree_nodeIS4_EDpOT_(%"class.std::_Rb_tree"* %this, %"struct.std::_Rb_tree_node"* %__node, %"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %__args, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %__args1, %"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %__args3) #0 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__node.addr = alloca %"struct.std::_Rb_tree_node"*, align 8
%__args.addr = alloca %"struct.std::piecewise_construct_t"*, align 8
%__args.addr2 = alloca %"class.std::tuple"*, align 8
%__args.addr4 = alloca %"class.std::tuple.0"*, align 8
%exn.slot = alloca i8*, align 8
%ehselector.slot = alloca i32, align 4
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store %"struct.std::_Rb_tree_node"* %__node, %"struct.std::_Rb_tree_node"** %__node.addr, align 8
store %"struct.std::piecewise_construct_t"* %__args, %"struct.std::piecewise_construct_t"** %__args.addr, align 8
store %"class.std::tuple"* %__args1, %"class.std::tuple"** %__args.addr2, align 8
store %"class.std::tuple.0"* %__args3, %"class.std::tuple.0"** %__args.addr4, align 8
%this5 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%0 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__node.addr, align 8
%1 = bitcast %"struct.std::_Rb_tree_node"* %0 to i8*
%2 = bitcast i8* %1 to %"struct.std::_Rb_tree_node"*
%call = call nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE21_M_get_Node_allocatorEv(%"class.std::_Rb_tree"* %this5) #11
%3 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__node.addr, align 8
%call6 = invoke %"struct.std::pair"* @_ZNSt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEE9_M_valptrEv(%"struct.std::_Rb_tree_node"* %3)
to label %invoke.cont unwind label %lpad
invoke.cont: ; preds = %entry
%4 = load %"struct.std::piecewise_construct_t"*, %"struct.std::piecewise_construct_t"** %__args.addr, align 8
%call7 = call nonnull align 1 dereferenceable(1) %"struct.std::piecewise_construct_t"* @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(%"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %4) #11
%5 = load %"class.std::tuple"*, %"class.std::tuple"** %__args.addr2, align 8
%call8 = call nonnull align 8 dereferenceable(8) %"class.std::tuple"* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(%"class.std::tuple"* nonnull align 8 dereferenceable(8) %5) #11
%6 = load %"class.std::tuple.0"*, %"class.std::tuple.0"** %__args.addr4, align 8
%call9 = call nonnull align 1 dereferenceable(1) %"class.std::tuple.0"* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(%"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %6) #11
invoke void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEEE9constructIS5_JRKSt21piecewise_construct_tSt5tupleIJOiEESD_IJEEEEEvRS7_PT_DpOT0_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %call, %"struct.std::pair"* %call6, %"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %call7, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %call8, %"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %call9)
to label %invoke.cont10 unwind label %lpad
invoke.cont10: ; preds = %invoke.cont
br label %try.cont
lpad: ; preds = %invoke.cont, %entry
%7 = landingpad { i8*, i32 }
catch i8* null
%8 = extractvalue { i8*, i32 } %7, 0
store i8* %8, i8** %exn.slot, align 8
%9 = extractvalue { i8*, i32 } %7, 1
store i32 %9, i32* %ehselector.slot, align 4
br label %catch
catch: ; preds = %lpad
%exn = load i8*, i8** %exn.slot, align 8
%10 = call i8* @__cxa_begin_catch(i8* %exn) #11
%11 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__node.addr, align 8
%12 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__node.addr, align 8
call void @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE11_M_put_nodeEPSt13_Rb_tree_nodeIS4_E(%"class.std::_Rb_tree"* %this5, %"struct.std::_Rb_tree_node"* %12) #11
invoke void @__cxa_rethrow() #13
to label %unreachable unwind label %lpad11
lpad11: ; preds = %catch
%13 = landingpad { i8*, i32 }
cleanup
%14 = extractvalue { i8*, i32 } %13, 0
store i8* %14, i8** %exn.slot, align 8
%15 = extractvalue { i8*, i32 } %13, 1
store i32 %15, i32* %ehselector.slot, align 4
invoke void @__cxa_end_catch()
to label %invoke.cont12 unwind label %terminate.lpad
invoke.cont12: ; preds = %lpad11
br label %eh.resume
try.cont: ; preds = %invoke.cont10
ret void
eh.resume: ; preds = %invoke.cont12
%exn13 = load i8*, i8** %exn.slot, align 8
%sel = load i32, i32* %ehselector.slot, align 4
%lpad.val = insertvalue { i8*, i32 } undef, i8* %exn13, 0
%lpad.val14 = insertvalue { i8*, i32 } %lpad.val, i32 %sel, 1
resume { i8*, i32 } %lpad.val14
terminate.lpad: ; preds = %lpad11
%16 = landingpad { i8*, i32 }
catch i8* null
%17 = extractvalue { i8*, i32 } %16, 0
call void @__clang_call_terminate(i8* %17) #12
unreachable
unreachable: ; preds = %catch
unreachable
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node"* @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEEE8allocateERS7_m(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a, i64 %__n) #0 comdat align 2 {
entry:
%__a.addr = alloca %"class.std::allocator"*, align 8
%__n.addr = alloca i64, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
store i64 %__n, i64* %__n.addr, align 8
%0 = load %"class.std::allocator"*, %"class.std::allocator"** %__a.addr, align 8
%1 = bitcast %"class.std::allocator"* %0 to %"class.__gnu_cxx::new_allocator"*
%2 = load i64, i64* %__n.addr, align 8
%call = call %"struct.std::_Rb_tree_node"* @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEE8allocateEmPKv(%"class.__gnu_cxx::new_allocator"* %1, i64 %2, i8* null)
ret %"struct.std::_Rb_tree_node"* %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE21_M_get_Node_allocatorEv(%"class.std::_Rb_tree"* %this) #3 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%0 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, _twoIntsStruct *>, std::_Select1st<std::pair<const int, _twoIntsStruct *>>, std::less<int>, std::allocator<std::pair<const int, _twoIntsStruct *>>>::_Rb_tree_impl"* %_M_impl to %"class.std::allocator"*
ret %"class.std::allocator"* %0
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node"* @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEE8allocateEmPKv(%"class.__gnu_cxx::new_allocator"* %this, i64 %__n, i8* %0) #0 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
%__n.addr = alloca i64, align 8
%.addr = alloca i8*, align 8
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
store i64 %__n, i64* %__n.addr, align 8
store i8* %0, i8** %.addr, align 8
%this1 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
%1 = load i64, i64* %__n.addr, align 8
%call = call i64 @_ZNK9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEE11_M_max_sizeEv(%"class.__gnu_cxx::new_allocator"* %this1) #11
%cmp = icmp ugt i64 %1, %call
br i1 %cmp, label %if.then, label %if.end4
if.then: ; preds = %entry
%2 = load i64, i64* %__n.addr, align 8
%cmp2 = icmp ugt i64 %2, 384307168202282325
br i1 %cmp2, label %if.then3, label %if.end
if.then3: ; preds = %if.then
call void @_ZSt28__throw_bad_array_new_lengthv() #13
unreachable
if.end: ; preds = %if.then
call void @_ZSt17__throw_bad_allocv() #13
unreachable
if.end4: ; preds = %entry
%3 = load i64, i64* %__n.addr, align 8
%mul = mul i64 %3, 48
%call5 = call noalias nonnull i8* @_Znwm(i64 %mul) #14
%4 = bitcast i8* %call5 to %"struct.std::_Rb_tree_node"*
ret %"struct.std::_Rb_tree_node"* %4
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i64 @_ZNK9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEE11_M_max_sizeEv(%"class.__gnu_cxx::new_allocator"* %this) #3 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
%this1 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
ret i64 192153584101141162
}
; Function Attrs: noreturn
declare dso_local void @_ZSt28__throw_bad_array_new_lengthv() #6
; Function Attrs: noreturn
declare dso_local void @_ZSt17__throw_bad_allocv() #6
; Function Attrs: nobuiltin allocsize(0)
declare dso_local nonnull i8* @_Znwm(i64) #7
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEEE9constructIS5_JRKSt21piecewise_construct_tSt5tupleIJOiEESD_IJEEEEEvRS7_PT_DpOT0_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a, %"struct.std::pair"* %__p, %"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %__args, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %__args1, %"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %__args3) #0 comdat align 2 {
entry:
%__a.addr = alloca %"class.std::allocator"*, align 8
%__p.addr = alloca %"struct.std::pair"*, align 8
%__args.addr = alloca %"struct.std::piecewise_construct_t"*, align 8
%__args.addr2 = alloca %"class.std::tuple"*, align 8
%__args.addr4 = alloca %"class.std::tuple.0"*, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
store %"struct.std::pair"* %__p, %"struct.std::pair"** %__p.addr, align 8
store %"struct.std::piecewise_construct_t"* %__args, %"struct.std::piecewise_construct_t"** %__args.addr, align 8
store %"class.std::tuple"* %__args1, %"class.std::tuple"** %__args.addr2, align 8
store %"class.std::tuple.0"* %__args3, %"class.std::tuple.0"** %__args.addr4, align 8
%0 = load %"class.std::allocator"*, %"class.std::allocator"** %__a.addr, align 8
%1 = bitcast %"class.std::allocator"* %0 to %"class.__gnu_cxx::new_allocator"*
%2 = load %"struct.std::pair"*, %"struct.std::pair"** %__p.addr, align 8
%3 = load %"struct.std::piecewise_construct_t"*, %"struct.std::piecewise_construct_t"** %__args.addr, align 8
%call = call nonnull align 1 dereferenceable(1) %"struct.std::piecewise_construct_t"* @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(%"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %3) #11
%4 = load %"class.std::tuple"*, %"class.std::tuple"** %__args.addr2, align 8
%call5 = call nonnull align 8 dereferenceable(8) %"class.std::tuple"* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(%"class.std::tuple"* nonnull align 8 dereferenceable(8) %4) #11
%5 = load %"class.std::tuple.0"*, %"class.std::tuple.0"** %__args.addr4, align 8
%call6 = call nonnull align 1 dereferenceable(1) %"class.std::tuple.0"* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(%"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %5) #11
call void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEE9constructIS6_JRKSt21piecewise_construct_tSt5tupleIJOiEESD_IJEEEEEvPT_DpOT0_(%"class.__gnu_cxx::new_allocator"* %1, %"struct.std::pair"* %2, %"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %call, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %call5, %"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %call6)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE11_M_put_nodeEPSt13_Rb_tree_nodeIS4_E(%"class.std::_Rb_tree"* %this, %"struct.std::_Rb_tree_node"* %__p) #3 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__p.addr = alloca %"struct.std::_Rb_tree_node"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store %"struct.std::_Rb_tree_node"* %__p, %"struct.std::_Rb_tree_node"** %__p.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%call = call nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE21_M_get_Node_allocatorEv(%"class.std::_Rb_tree"* %this1) #11
%0 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__p.addr, align 8
invoke void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEEE10deallocateERS7_PS6_m(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %call, %"struct.std::_Rb_tree_node"* %0, i64 1)
to label %invoke.cont unwind label %terminate.lpad
invoke.cont: ; preds = %entry
ret void
terminate.lpad: ; preds = %entry
%1 = landingpad { i8*, i32 }
catch i8* null
%2 = extractvalue { i8*, i32 } %1, 0
call void @__clang_call_terminate(i8* %2) #12
unreachable
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEE9constructIS6_JRKSt21piecewise_construct_tSt5tupleIJOiEESD_IJEEEEEvPT_DpOT0_(%"class.__gnu_cxx::new_allocator"* %this, %"struct.std::pair"* %__p, %"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %__args, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %__args1, %"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %__args3) #0 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
%__p.addr = alloca %"struct.std::pair"*, align 8
%__args.addr = alloca %"struct.std::piecewise_construct_t"*, align 8
%__args.addr2 = alloca %"class.std::tuple"*, align 8
%__args.addr4 = alloca %"class.std::tuple.0"*, align 8
%agg.tmp = alloca %"struct.std::piecewise_construct_t", align 1
%agg.tmp6 = alloca %"class.std::tuple", align 8
%agg.tmp8 = alloca %"class.std::tuple.0", align 1
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
store %"struct.std::pair"* %__p, %"struct.std::pair"** %__p.addr, align 8
store %"struct.std::piecewise_construct_t"* %__args, %"struct.std::piecewise_construct_t"** %__args.addr, align 8
store %"class.std::tuple"* %__args1, %"class.std::tuple"** %__args.addr2, align 8
store %"class.std::tuple.0"* %__args3, %"class.std::tuple.0"** %__args.addr4, align 8
%this5 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
%0 = load %"struct.std::pair"*, %"struct.std::pair"** %__p.addr, align 8
%1 = bitcast %"struct.std::pair"* %0 to i8*
%2 = bitcast i8* %1 to %"struct.std::pair"*
%3 = load %"struct.std::piecewise_construct_t"*, %"struct.std::piecewise_construct_t"** %__args.addr, align 8
%call = call nonnull align 1 dereferenceable(1) %"struct.std::piecewise_construct_t"* @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(%"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %3) #11
%4 = load %"class.std::tuple"*, %"class.std::tuple"** %__args.addr2, align 8
%call7 = call nonnull align 8 dereferenceable(8) %"class.std::tuple"* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(%"class.std::tuple"* nonnull align 8 dereferenceable(8) %4) #11
call void @_ZNSt5tupleIJOiEEC2EOS1_(%"class.std::tuple"* %agg.tmp6, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %call7) #11
%5 = load %"class.std::tuple.0"*, %"class.std::tuple.0"** %__args.addr4, align 8
%call9 = call nonnull align 1 dereferenceable(1) %"class.std::tuple.0"* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(%"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %5) #11
call void @_ZNSt4pairIKiP14_twoIntsStructEC2IJOiEJEEESt21piecewise_construct_tSt5tupleIJDpT_EES7_IJDpT0_EE(%"struct.std::pair"* %2, %"class.std::tuple"* %agg.tmp6)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt5tupleIJOiEEC2EOS1_(%"class.std::tuple"* %this, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %0) unnamed_addr #3 comdat align 2 {
entry:
%this.addr = alloca %"class.std::tuple"*, align 8
%.addr = alloca %"class.std::tuple"*, align 8
store %"class.std::tuple"* %this, %"class.std::tuple"** %this.addr, align 8
store %"class.std::tuple"* %0, %"class.std::tuple"** %.addr, align 8
%this1 = load %"class.std::tuple"*, %"class.std::tuple"** %this.addr, align 8
%1 = bitcast %"class.std::tuple"* %this1 to %"struct.std::_Tuple_impl"*
%2 = load %"class.std::tuple"*, %"class.std::tuple"** %.addr, align 8
%3 = bitcast %"class.std::tuple"* %2 to %"struct.std::_Tuple_impl"*
call void @_ZNSt11_Tuple_implILm0EJOiEEC2EOS1_(%"struct.std::_Tuple_impl"* %1, %"struct.std::_Tuple_impl"* nonnull align 8 dereferenceable(8) %3) #11
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt4pairIKiP14_twoIntsStructEC2IJOiEJEEESt21piecewise_construct_tSt5tupleIJDpT_EES7_IJDpT0_EE(%"struct.std::pair"* %this, %"class.std::tuple"* %__first) unnamed_addr #0 comdat align 2 {
entry:
%0 = alloca %"struct.std::piecewise_construct_t", align 1
%__second = alloca %"class.std::tuple.0", align 1
%this.addr = alloca %"struct.std::pair"*, align 8
%agg.tmp = alloca %"struct.std::_Index_tuple", align 1
%agg.tmp3 = alloca %"struct.std::_Index_tuple.4", align 1
store %"struct.std::pair"* %this, %"struct.std::pair"** %this.addr, align 8
%this2 = load %"struct.std::pair"*, %"struct.std::pair"** %this.addr, align 8
call void @_ZNSt4pairIKiP14_twoIntsStructEC2IJOiEJLm0EEJEJEEERSt5tupleIJDpT_EERS6_IJDpT1_EESt12_Index_tupleIJXspT0_EEESF_IJXspT2_EEE(%"struct.std::pair"* %this2, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %__first, %"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %__second)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt11_Tuple_implILm0EJOiEEC2EOS1_(%"struct.std::_Tuple_impl"* %this, %"struct.std::_Tuple_impl"* nonnull align 8 dereferenceable(8) %__in) unnamed_addr #3 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Tuple_impl"*, align 8
%__in.addr = alloca %"struct.std::_Tuple_impl"*, align 8
store %"struct.std::_Tuple_impl"* %this, %"struct.std::_Tuple_impl"** %this.addr, align 8
store %"struct.std::_Tuple_impl"* %__in, %"struct.std::_Tuple_impl"** %__in.addr, align 8
%this1 = load %"struct.std::_Tuple_impl"*, %"struct.std::_Tuple_impl"** %this.addr, align 8
%0 = bitcast %"struct.std::_Tuple_impl"* %this1 to %"struct.std::_Head_base"*
%1 = load %"struct.std::_Tuple_impl"*, %"struct.std::_Tuple_impl"** %__in.addr, align 8
%2 = bitcast %"struct.std::_Tuple_impl"* %1 to %"struct.std::_Head_base"*
%3 = bitcast %"struct.std::_Head_base"* %0 to i8*
%4 = bitcast %"struct.std::_Head_base"* %2 to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %3, i8* align 8 %4, i64 8, i1 false)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt4pairIKiP14_twoIntsStructEC2IJOiEJLm0EEJEJEEERSt5tupleIJDpT_EERS6_IJDpT1_EESt12_Index_tupleIJXspT0_EEESF_IJXspT2_EEE(%"struct.std::pair"* %this, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %__tuple1, %"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %__tuple2) unnamed_addr #3 comdat align 2 {
entry:
%0 = alloca %"struct.std::_Index_tuple", align 1
%1 = alloca %"struct.std::_Index_tuple.4", align 1
%this.addr = alloca %"struct.std::pair"*, align 8
%__tuple1.addr = alloca %"class.std::tuple"*, align 8
%__tuple2.addr = alloca %"class.std::tuple.0"*, align 8
store %"struct.std::pair"* %this, %"struct.std::pair"** %this.addr, align 8
store %"class.std::tuple"* %__tuple1, %"class.std::tuple"** %__tuple1.addr, align 8
store %"class.std::tuple.0"* %__tuple2, %"class.std::tuple.0"** %__tuple2.addr, align 8
%this2 = load %"struct.std::pair"*, %"struct.std::pair"** %this.addr, align 8
%2 = bitcast %"struct.std::pair"* %this2 to %"class.std::__pair_base"*
%first = getelementptr inbounds %"struct.std::pair", %"struct.std::pair"* %this2, i32 0, i32 0
%3 = load %"class.std::tuple"*, %"class.std::tuple"** %__tuple1.addr, align 8
%call = call nonnull align 4 dereferenceable(4) i32* @_ZSt3getILm0EJOiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS5_(%"class.std::tuple"* nonnull align 8 dereferenceable(8) %3) #11
%call3 = call nonnull align 4 dereferenceable(4) i32* @_ZSt7forwardIOiEOT_RNSt16remove_referenceIS1_E4typeE(i32* nonnull align 4 dereferenceable(4) %call) #11
%4 = load i32, i32* %call3, align 4
store i32 %4, i32* %first, align 8
%second = getelementptr inbounds %"struct.std::pair", %"struct.std::pair"* %this2, i32 0, i32 1
store %struct._twoIntsStruct* null, %struct._twoIntsStruct** %second, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 4 dereferenceable(4) i32* @_ZSt7forwardIOiEOT_RNSt16remove_referenceIS1_E4typeE(i32* nonnull align 4 dereferenceable(4) %__t) #3 comdat {
entry:
%__t.addr = alloca i32*, align 8
store i32* %__t, i32** %__t.addr, align 8
%0 = load i32*, i32** %__t.addr, align 8
ret i32* %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 4 dereferenceable(4) i32* @_ZSt3getILm0EJOiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS5_(%"class.std::tuple"* nonnull align 8 dereferenceable(8) %__t) #3 comdat {
entry:
%__t.addr = alloca %"class.std::tuple"*, align 8
store %"class.std::tuple"* %__t, %"class.std::tuple"** %__t.addr, align 8
%0 = load %"class.std::tuple"*, %"class.std::tuple"** %__t.addr, align 8
%1 = bitcast %"class.std::tuple"* %0 to %"struct.std::_Tuple_impl"*
%call = call nonnull align 4 dereferenceable(4) i32* @_ZSt12__get_helperILm0EOiJEERT0_RSt11_Tuple_implIXT_EJS1_DpT1_EE(%"struct.std::_Tuple_impl"* nonnull align 8 dereferenceable(8) %1) #11
ret i32* %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 4 dereferenceable(4) i32* @_ZSt12__get_helperILm0EOiJEERT0_RSt11_Tuple_implIXT_EJS1_DpT1_EE(%"struct.std::_Tuple_impl"* nonnull align 8 dereferenceable(8) %__t) #3 comdat {
entry:
%__t.addr = alloca %"struct.std::_Tuple_impl"*, align 8
store %"struct.std::_Tuple_impl"* %__t, %"struct.std::_Tuple_impl"** %__t.addr, align 8
%0 = load %"struct.std::_Tuple_impl"*, %"struct.std::_Tuple_impl"** %__t.addr, align 8
%call = call nonnull align 4 dereferenceable(4) i32* @_ZNSt11_Tuple_implILm0EJOiEE7_M_headERS1_(%"struct.std::_Tuple_impl"* nonnull align 8 dereferenceable(8) %0) #11
ret i32* %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 4 dereferenceable(4) i32* @_ZNSt11_Tuple_implILm0EJOiEE7_M_headERS1_(%"struct.std::_Tuple_impl"* nonnull align 8 dereferenceable(8) %__t) #3 comdat align 2 {
entry:
%__t.addr = alloca %"struct.std::_Tuple_impl"*, align 8
store %"struct.std::_Tuple_impl"* %__t, %"struct.std::_Tuple_impl"** %__t.addr, align 8
%0 = load %"struct.std::_Tuple_impl"*, %"struct.std::_Tuple_impl"** %__t.addr, align 8
%1 = bitcast %"struct.std::_Tuple_impl"* %0 to %"struct.std::_Head_base"*
%call = call nonnull align 4 dereferenceable(4) i32* @_ZNSt10_Head_baseILm0EOiLb0EE7_M_headERS1_(%"struct.std::_Head_base"* nonnull align 8 dereferenceable(8) %1) #11
ret i32* %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 4 dereferenceable(4) i32* @_ZNSt10_Head_baseILm0EOiLb0EE7_M_headERS1_(%"struct.std::_Head_base"* nonnull align 8 dereferenceable(8) %__b) #3 comdat align 2 {
entry:
%__b.addr = alloca %"struct.std::_Head_base"*, align 8
store %"struct.std::_Head_base"* %__b, %"struct.std::_Head_base"** %__b.addr, align 8
%0 = load %"struct.std::_Head_base"*, %"struct.std::_Head_base"** %__b.addr, align 8
%_M_head_impl = getelementptr inbounds %"struct.std::_Head_base", %"struct.std::_Head_base"* %0, i32 0, i32 0
%1 = load i32*, i32** %_M_head_impl, align 8
ret i32* %1
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEEE10deallocateERS7_PS6_m(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a, %"struct.std::_Rb_tree_node"* %__p, i64 %__n) #0 comdat align 2 {
entry:
%__a.addr = alloca %"class.std::allocator"*, align 8
%__p.addr = alloca %"struct.std::_Rb_tree_node"*, align 8
%__n.addr = alloca i64, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
store %"struct.std::_Rb_tree_node"* %__p, %"struct.std::_Rb_tree_node"** %__p.addr, align 8
store i64 %__n, i64* %__n.addr, align 8
%0 = load %"class.std::allocator"*, %"class.std::allocator"** %__a.addr, align 8
%1 = bitcast %"class.std::allocator"* %0 to %"class.__gnu_cxx::new_allocator"*
%2 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__p.addr, align 8
%3 = load i64, i64* %__n.addr, align 8
call void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEE10deallocateEPS7_m(%"class.__gnu_cxx::new_allocator"* %1, %"struct.std::_Rb_tree_node"* %2, i64 %3)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEE10deallocateEPS7_m(%"class.__gnu_cxx::new_allocator"* %this, %"struct.std::_Rb_tree_node"* %__p, i64 %__t) #3 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
%__p.addr = alloca %"struct.std::_Rb_tree_node"*, align 8
%__t.addr = alloca i64, align 8
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
store %"struct.std::_Rb_tree_node"* %__p, %"struct.std::_Rb_tree_node"** %__p.addr, align 8
store i64 %__t, i64* %__t.addr, align 8
%this1 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
%0 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__p.addr, align 8
%1 = bitcast %"struct.std::_Rb_tree_node"* %0 to i8*
call void @_ZdlPv(i8* %1) #11
ret void
}
; Function Attrs: nobuiltin nounwind
declare dso_local void @_ZdlPv(i8*) #8
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node_base"* @_ZNKSt23_Rb_tree_const_iteratorISt4pairIKiP14_twoIntsStructEE13_M_const_castEv(%"struct.std::_Rb_tree_const_iterator"* %this) #3 comdat align 2 {
entry:
%retval = alloca %"struct.std::_Rb_tree_iterator", align 8
%this.addr = alloca %"struct.std::_Rb_tree_const_iterator"*, align 8
store %"struct.std::_Rb_tree_const_iterator"* %this, %"struct.std::_Rb_tree_const_iterator"** %this.addr, align 8
%this1 = load %"struct.std::_Rb_tree_const_iterator"*, %"struct.std::_Rb_tree_const_iterator"** %this.addr, align 8
%_M_node = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", %"struct.std::_Rb_tree_const_iterator"* %this1, i32 0, i32 0
%0 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node, align 8
call void @_ZNSt17_Rb_tree_iteratorISt4pairIKiP14_twoIntsStructEEC2EPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_iterator"* %retval, %"struct.std::_Rb_tree_node_base"* %0) #11
%coerce.dive = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
%1 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %coerce.dive, align 8
ret %"struct.std::_Rb_tree_node_base"* %1
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i64 @_ZNKSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE4sizeEv(%"class.std::_Rb_tree"* %this) #3 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%0 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, _twoIntsStruct *>, std::_Select1st<std::pair<const int, _twoIntsStruct *>>, std::less<int>, std::allocator<std::pair<const int, _twoIntsStruct *>>>::_Rb_tree_impl"* %_M_impl to i8*
%add.ptr = getelementptr inbounds i8, i8* %0, i64 8
%1 = bitcast i8* %add.ptr to %"struct.std::_Rb_tree_header"*
%_M_node_count = getelementptr inbounds %"struct.std::_Rb_tree_header", %"struct.std::_Rb_tree_header"* %1, i32 0, i32 1
%2 = load i64, i64* %_M_node_count, align 8
ret i64 %2
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE6_S_keyEPKSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %__x) #0 comdat align 2 {
entry:
%__x.addr = alloca %"struct.std::_Rb_tree_node_base"*, align 8
store %"struct.std::_Rb_tree_node_base"* %__x, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
%0 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
%1 = bitcast %"struct.std::_Rb_tree_node_base"* %0 to %"struct.std::_Rb_tree_node"*
%call = call nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE6_S_keyEPKSt13_Rb_tree_nodeIS4_E(%"struct.std::_Rb_tree_node"* %1)
ret i32* %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE12_M_rightmostEv(%"class.std::_Rb_tree"* %this) #3 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%0 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, _twoIntsStruct *>, std::_Select1st<std::pair<const int, _twoIntsStruct *>>, std::less<int>, std::allocator<std::pair<const int, _twoIntsStruct *>>>::_Rb_tree_impl"* %_M_impl to i8*
%add.ptr = getelementptr inbounds i8, i8* %0, i64 8
%1 = bitcast i8* %add.ptr to %"struct.std::_Rb_tree_header"*
%_M_header = getelementptr inbounds %"struct.std::_Rb_tree_header", %"struct.std::_Rb_tree_header"* %1, i32 0, i32 0
%_M_right = getelementptr inbounds %"struct.std::_Rb_tree_node_base", %"struct.std::_Rb_tree_node_base"* %_M_header, i32 0, i32 3
ret %"struct.std::_Rb_tree_node_base"** %_M_right
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_Lb1EEERKS1_OT_(%"struct.std::pair.1"* %this, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %__x, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %__y) unnamed_addr #3 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::pair.1"*, align 8
%__x.addr = alloca %"struct.std::_Rb_tree_node_base"**, align 8
%__y.addr = alloca %"struct.std::_Rb_tree_node_base"**, align 8
store %"struct.std::pair.1"* %this, %"struct.std::pair.1"** %this.addr, align 8
store %"struct.std::_Rb_tree_node_base"** %__x, %"struct.std::_Rb_tree_node_base"*** %__x.addr, align 8
store %"struct.std::_Rb_tree_node_base"** %__y, %"struct.std::_Rb_tree_node_base"*** %__y.addr, align 8
%this1 = load %"struct.std::pair.1"*, %"struct.std::pair.1"** %this.addr, align 8
%0 = bitcast %"struct.std::pair.1"* %this1 to %"class.std::__pair_base.2"*
%first = getelementptr inbounds %"struct.std::pair.1", %"struct.std::pair.1"* %this1, i32 0, i32 0
%1 = load %"struct.std::_Rb_tree_node_base"**, %"struct.std::_Rb_tree_node_base"*** %__x.addr, align 8
%2 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %1, align 8
store %"struct.std::_Rb_tree_node_base"* %2, %"struct.std::_Rb_tree_node_base"** %first, align 8
%second = getelementptr inbounds %"struct.std::pair.1", %"struct.std::pair.1"* %this1, i32 0, i32 1
%3 = load %"struct.std::_Rb_tree_node_base"**, %"struct.std::_Rb_tree_node_base"*** %__y.addr, align 8
%call = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(%"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %3) #11
%4 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %call, align 8
store %"struct.std::_Rb_tree_node_base"* %4, %"struct.std::_Rb_tree_node_base"** %second, align 8
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE24_M_get_insert_unique_posERS1_(%"class.std::_Rb_tree"* %this, i32* nonnull align 4 dereferenceable(4) %__k) #0 comdat align 2 {
entry:
%retval = alloca %"struct.std::pair.1", align 8
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__k.addr = alloca i32*, align 8
%__x = alloca %"struct.std::_Rb_tree_node"*, align 8
%__y = alloca %"struct.std::_Rb_tree_node_base"*, align 8
%__comp = alloca i8, align 1
%__j = alloca %"struct.std::_Rb_tree_iterator", align 8
%ref.tmp = alloca %"struct.std::_Rb_tree_iterator", align 8
%ref.tmp20 = alloca %"struct.std::_Rb_tree_node_base"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store i32* %__k, i32** %__k.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%call = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE8_M_beginEv(%"class.std::_Rb_tree"* %this1) #11
store %"struct.std::_Rb_tree_node"* %call, %"struct.std::_Rb_tree_node"** %__x, align 8
%call2 = call %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE6_M_endEv(%"class.std::_Rb_tree"* %this1) #11
store %"struct.std::_Rb_tree_node_base"* %call2, %"struct.std::_Rb_tree_node_base"** %__y, align 8
store i8 1, i8* %__comp, align 1
br label %while.cond
while.cond: ; preds = %cond.end, %entry
%0 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x, align 8
%cmp = icmp ne %"struct.std::_Rb_tree_node"* %0, null
br i1 %cmp, label %while.body, label %while.end
while.body: ; preds = %while.cond
%1 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x, align 8
%2 = bitcast %"struct.std::_Rb_tree_node"* %1 to %"struct.std::_Rb_tree_node_base"*
store %"struct.std::_Rb_tree_node_base"* %2, %"struct.std::_Rb_tree_node_base"** %__y, align 8
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%3 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, _twoIntsStruct *>, std::_Select1st<std::pair<const int, _twoIntsStruct *>>, std::less<int>, std::allocator<std::pair<const int, _twoIntsStruct *>>>::_Rb_tree_impl"* %_M_impl to %"struct.std::_Rb_tree_key_compare"*
%_M_key_compare = getelementptr inbounds %"struct.std::_Rb_tree_key_compare", %"struct.std::_Rb_tree_key_compare"* %3, i32 0, i32 0
%4 = load i32*, i32** %__k.addr, align 8
%5 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x, align 8
%call3 = call nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE6_S_keyEPKSt13_Rb_tree_nodeIS4_E(%"struct.std::_Rb_tree_node"* %5)
%call4 = call zeroext i1 @_ZNKSt4lessIiEclERKiS2_(%"struct.std::less"* %_M_key_compare, i32* nonnull align 4 dereferenceable(4) %4, i32* nonnull align 4 dereferenceable(4) %call3)
%frombool = zext i1 %call4 to i8
store i8 %frombool, i8* %__comp, align 1
%6 = load i8, i8* %__comp, align 1
%tobool = trunc i8 %6 to i1
br i1 %tobool, label %cond.true, label %cond.false
cond.true: ; preds = %while.body
%7 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x, align 8
%8 = bitcast %"struct.std::_Rb_tree_node"* %7 to %"struct.std::_Rb_tree_node_base"*
%call5 = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE7_S_leftEPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %8) #11
br label %cond.end
cond.false: ; preds = %while.body
%9 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x, align 8
%10 = bitcast %"struct.std::_Rb_tree_node"* %9 to %"struct.std::_Rb_tree_node_base"*
%call6 = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE8_S_rightEPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %10) #11
br label %cond.end
cond.end: ; preds = %cond.false, %cond.true
%cond = phi %"struct.std::_Rb_tree_node"* [ %call5, %cond.true ], [ %call6, %cond.false ]
store %"struct.std::_Rb_tree_node"* %cond, %"struct.std::_Rb_tree_node"** %__x, align 8
br label %while.cond
while.end: ; preds = %while.cond
%11 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__y, align 8
call void @_ZNSt17_Rb_tree_iteratorISt4pairIKiP14_twoIntsStructEEC2EPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_iterator"* %__j, %"struct.std::_Rb_tree_node_base"* %11) #11
%12 = load i8, i8* %__comp, align 1
%tobool7 = trunc i8 %12 to i1
br i1 %tobool7, label %if.then, label %if.end12
if.then: ; preds = %while.end
%call8 = call %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE5beginEv(%"class.std::_Rb_tree"* %this1) #11
%coerce.dive = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %ref.tmp, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %call8, %"struct.std::_Rb_tree_node_base"** %coerce.dive, align 8
%call9 = call zeroext i1 @_ZSteqRKSt17_Rb_tree_iteratorISt4pairIKiP14_twoIntsStructEES7_(%"struct.std::_Rb_tree_iterator"* nonnull align 8 dereferenceable(8) %__j, %"struct.std::_Rb_tree_iterator"* nonnull align 8 dereferenceable(8) %ref.tmp) #11
br i1 %call9, label %if.then10, label %if.else
if.then10: ; preds = %if.then
call void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRPSt13_Rb_tree_nodeIS_IKiP14_twoIntsStructEERS1_Lb1EEEOT_OT0_(%"struct.std::pair.1"* %retval, %"struct.std::_Rb_tree_node"** nonnull align 8 dereferenceable(8) %__x, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %__y)
br label %return
if.else: ; preds = %if.then
%call11 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_iterator"* @_ZNSt17_Rb_tree_iteratorISt4pairIKiP14_twoIntsStructEEmmEv(%"struct.std::_Rb_tree_iterator"* %__j) #11
br label %if.end
if.end: ; preds = %if.else
br label %if.end12
if.end12: ; preds = %if.end, %while.end
%_M_impl13 = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%13 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, _twoIntsStruct *>, std::_Select1st<std::pair<const int, _twoIntsStruct *>>, std::less<int>, std::allocator<std::pair<const int, _twoIntsStruct *>>>::_Rb_tree_impl"* %_M_impl13 to %"struct.std::_Rb_tree_key_compare"*
%_M_key_compare14 = getelementptr inbounds %"struct.std::_Rb_tree_key_compare", %"struct.std::_Rb_tree_key_compare"* %13, i32 0, i32 0
%_M_node = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__j, i32 0, i32 0
%14 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node, align 8
%call15 = call nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE6_S_keyEPKSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %14)
%15 = load i32*, i32** %__k.addr, align 8
%call16 = call zeroext i1 @_ZNKSt4lessIiEclERKiS2_(%"struct.std::less"* %_M_key_compare14, i32* nonnull align 4 dereferenceable(4) %call15, i32* nonnull align 4 dereferenceable(4) %15)
br i1 %call16, label %if.then17, label %if.end18
if.then17: ; preds = %if.end12
call void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRPSt13_Rb_tree_nodeIS_IKiP14_twoIntsStructEERS1_Lb1EEEOT_OT0_(%"struct.std::pair.1"* %retval, %"struct.std::_Rb_tree_node"** nonnull align 8 dereferenceable(8) %__x, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %__y)
br label %return
if.end18: ; preds = %if.end12
%_M_node19 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__j, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* null, %"struct.std::_Rb_tree_node_base"** %ref.tmp20, align 8
call void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_Lb1EEEOT_RKS1_(%"struct.std::pair.1"* %retval, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %_M_node19, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %ref.tmp20)
br label %return
return: ; preds = %if.end18, %if.then17, %if.then10
%16 = bitcast %"struct.std::pair.1"* %retval to { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }*
%17 = load { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }, { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }* %16, align 8
ret { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } %17
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE11_M_leftmostEv(%"class.std::_Rb_tree"* %this) #3 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%0 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, _twoIntsStruct *>, std::_Select1st<std::pair<const int, _twoIntsStruct *>>, std::less<int>, std::allocator<std::pair<const int, _twoIntsStruct *>>>::_Rb_tree_impl"* %_M_impl to i8*
%add.ptr = getelementptr inbounds i8, i8* %0, i64 8
%1 = bitcast i8* %add.ptr to %"struct.std::_Rb_tree_header"*
%_M_header = getelementptr inbounds %"struct.std::_Rb_tree_header", %"struct.std::_Rb_tree_header"* %1, i32 0, i32 0
%_M_left = getelementptr inbounds %"struct.std::_Rb_tree_node_base", %"struct.std::_Rb_tree_node_base"* %_M_header, i32 0, i32 2
ret %"struct.std::_Rb_tree_node_base"** %_M_left
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_S4_Lb1EEEOT_OT0_(%"struct.std::pair.1"* %this, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %__x, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %__y) unnamed_addr #3 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::pair.1"*, align 8
%__x.addr = alloca %"struct.std::_Rb_tree_node_base"**, align 8
%__y.addr = alloca %"struct.std::_Rb_tree_node_base"**, align 8
store %"struct.std::pair.1"* %this, %"struct.std::pair.1"** %this.addr, align 8
store %"struct.std::_Rb_tree_node_base"** %__x, %"struct.std::_Rb_tree_node_base"*** %__x.addr, align 8
store %"struct.std::_Rb_tree_node_base"** %__y, %"struct.std::_Rb_tree_node_base"*** %__y.addr, align 8
%this1 = load %"struct.std::pair.1"*, %"struct.std::pair.1"** %this.addr, align 8
%0 = bitcast %"struct.std::pair.1"* %this1 to %"class.std::__pair_base.2"*
%first = getelementptr inbounds %"struct.std::pair.1", %"struct.std::pair.1"* %this1, i32 0, i32 0
%1 = load %"struct.std::_Rb_tree_node_base"**, %"struct.std::_Rb_tree_node_base"*** %__x.addr, align 8
%call = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(%"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %1) #11
%2 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %call, align 8
store %"struct.std::_Rb_tree_node_base"* %2, %"struct.std::_Rb_tree_node_base"** %first, align 8
%second = getelementptr inbounds %"struct.std::pair.1", %"struct.std::pair.1"* %this1, i32 0, i32 1
%3 = load %"struct.std::_Rb_tree_node_base"**, %"struct.std::_Rb_tree_node_base"*** %__y.addr, align 8
%call2 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(%"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %3) #11
%4 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %call2, align 8
store %"struct.std::_Rb_tree_node_base"* %4, %"struct.std::_Rb_tree_node_base"** %second, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_iterator"* @_ZNSt17_Rb_tree_iteratorISt4pairIKiP14_twoIntsStructEEmmEv(%"struct.std::_Rb_tree_iterator"* %this) #3 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Rb_tree_iterator"*, align 8
store %"struct.std::_Rb_tree_iterator"* %this, %"struct.std::_Rb_tree_iterator"** %this.addr, align 8
%this1 = load %"struct.std::_Rb_tree_iterator"*, %"struct.std::_Rb_tree_iterator"** %this.addr, align 8
%_M_node = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %this1, i32 0, i32 0
%0 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node, align 8
%call = call %"struct.std::_Rb_tree_node_base"* @_ZSt18_Rb_tree_decrementPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %0) #15
%_M_node2 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %this1, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %call, %"struct.std::_Rb_tree_node_base"** %_M_node2, align 8
ret %"struct.std::_Rb_tree_iterator"* %this1
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_iterator"* @_ZNSt17_Rb_tree_iteratorISt4pairIKiP14_twoIntsStructEEppEv(%"struct.std::_Rb_tree_iterator"* %this) #3 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Rb_tree_iterator"*, align 8
store %"struct.std::_Rb_tree_iterator"* %this, %"struct.std::_Rb_tree_iterator"** %this.addr, align 8
%this1 = load %"struct.std::_Rb_tree_iterator"*, %"struct.std::_Rb_tree_iterator"** %this.addr, align 8
%_M_node = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %this1, i32 0, i32 0
%0 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node, align 8
%call = call %"struct.std::_Rb_tree_node_base"* @_ZSt18_Rb_tree_incrementPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %0) #15
%_M_node2 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %this1, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %call, %"struct.std::_Rb_tree_node_base"** %_M_node2, align 8
ret %"struct.std::_Rb_tree_iterator"* %this1
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_Lb1EEEOT_RKS1_(%"struct.std::pair.1"* %this, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %__x, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %__y) unnamed_addr #3 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::pair.1"*, align 8
%__x.addr = alloca %"struct.std::_Rb_tree_node_base"**, align 8
%__y.addr = alloca %"struct.std::_Rb_tree_node_base"**, align 8
store %"struct.std::pair.1"* %this, %"struct.std::pair.1"** %this.addr, align 8
store %"struct.std::_Rb_tree_node_base"** %__x, %"struct.std::_Rb_tree_node_base"*** %__x.addr, align 8
store %"struct.std::_Rb_tree_node_base"** %__y, %"struct.std::_Rb_tree_node_base"*** %__y.addr, align 8
%this1 = load %"struct.std::pair.1"*, %"struct.std::pair.1"** %this.addr, align 8
%0 = bitcast %"struct.std::pair.1"* %this1 to %"class.std::__pair_base.2"*
%first = getelementptr inbounds %"struct.std::pair.1", %"struct.std::pair.1"* %this1, i32 0, i32 0
%1 = load %"struct.std::_Rb_tree_node_base"**, %"struct.std::_Rb_tree_node_base"*** %__x.addr, align 8
%call = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(%"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %1) #11
%2 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %call, align 8
store %"struct.std::_Rb_tree_node_base"* %2, %"struct.std::_Rb_tree_node_base"** %first, align 8
%second = getelementptr inbounds %"struct.std::pair.1", %"struct.std::pair.1"* %this1, i32 0, i32 1
%3 = load %"struct.std::_Rb_tree_node_base"**, %"struct.std::_Rb_tree_node_base"*** %__y.addr, align 8
%4 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %3, align 8
store %"struct.std::_Rb_tree_node_base"* %4, %"struct.std::_Rb_tree_node_base"** %second, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(%"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %__t) #3 comdat {
entry:
%__t.addr = alloca %"struct.std::_Rb_tree_node_base"**, align 8
store %"struct.std::_Rb_tree_node_base"** %__t, %"struct.std::_Rb_tree_node_base"*** %__t.addr, align 8
%0 = load %"struct.std::_Rb_tree_node_base"**, %"struct.std::_Rb_tree_node_base"*** %__t.addr, align 8
ret %"struct.std::_Rb_tree_node_base"** %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE5beginEv(%"class.std::_Rb_tree"* %this) #3 comdat align 2 {
entry:
%retval = alloca %"struct.std::_Rb_tree_iterator", align 8
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%0 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, _twoIntsStruct *>, std::_Select1st<std::pair<const int, _twoIntsStruct *>>, std::less<int>, std::allocator<std::pair<const int, _twoIntsStruct *>>>::_Rb_tree_impl"* %_M_impl to i8*
%add.ptr = getelementptr inbounds i8, i8* %0, i64 8
%1 = bitcast i8* %add.ptr to %"struct.std::_Rb_tree_header"*
%_M_header = getelementptr inbounds %"struct.std::_Rb_tree_header", %"struct.std::_Rb_tree_header"* %1, i32 0, i32 0
%_M_left = getelementptr inbounds %"struct.std::_Rb_tree_node_base", %"struct.std::_Rb_tree_node_base"* %_M_header, i32 0, i32 2
%2 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_left, align 8
call void @_ZNSt17_Rb_tree_iteratorISt4pairIKiP14_twoIntsStructEEC2EPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_iterator"* %retval, %"struct.std::_Rb_tree_node_base"* %2) #11
%coerce.dive = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
%3 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %coerce.dive, align 8
ret %"struct.std::_Rb_tree_node_base"* %3
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRPSt13_Rb_tree_nodeIS_IKiP14_twoIntsStructEERS1_Lb1EEEOT_OT0_(%"struct.std::pair.1"* %this, %"struct.std::_Rb_tree_node"** nonnull align 8 dereferenceable(8) %__x, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %__y) unnamed_addr #3 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::pair.1"*, align 8
%__x.addr = alloca %"struct.std::_Rb_tree_node"**, align 8
%__y.addr = alloca %"struct.std::_Rb_tree_node_base"**, align 8
store %"struct.std::pair.1"* %this, %"struct.std::pair.1"** %this.addr, align 8
store %"struct.std::_Rb_tree_node"** %__x, %"struct.std::_Rb_tree_node"*** %__x.addr, align 8
store %"struct.std::_Rb_tree_node_base"** %__y, %"struct.std::_Rb_tree_node_base"*** %__y.addr, align 8
%this1 = load %"struct.std::pair.1"*, %"struct.std::pair.1"** %this.addr, align 8
%0 = bitcast %"struct.std::pair.1"* %this1 to %"class.std::__pair_base.2"*
%first = getelementptr inbounds %"struct.std::pair.1", %"struct.std::pair.1"* %this1, i32 0, i32 0
%1 = load %"struct.std::_Rb_tree_node"**, %"struct.std::_Rb_tree_node"*** %__x.addr, align 8
%call = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node"** @_ZSt7forwardIRPSt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEEOT_RNSt16remove_referenceIS9_E4typeE(%"struct.std::_Rb_tree_node"** nonnull align 8 dereferenceable(8) %1) #11
%2 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %call, align 8
%3 = bitcast %"struct.std::_Rb_tree_node"* %2 to %"struct.std::_Rb_tree_node_base"*
store %"struct.std::_Rb_tree_node_base"* %3, %"struct.std::_Rb_tree_node_base"** %first, align 8
%second = getelementptr inbounds %"struct.std::pair.1", %"struct.std::pair.1"* %this1, i32 0, i32 1
%4 = load %"struct.std::_Rb_tree_node_base"**, %"struct.std::_Rb_tree_node_base"*** %__y.addr, align 8
%call2 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(%"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %4) #11
%5 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %call2, align 8
store %"struct.std::_Rb_tree_node_base"* %5, %"struct.std::_Rb_tree_node_base"** %second, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node"** @_ZSt7forwardIRPSt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEEOT_RNSt16remove_referenceIS9_E4typeE(%"struct.std::_Rb_tree_node"** nonnull align 8 dereferenceable(8) %__t) #3 comdat {
entry:
%__t.addr = alloca %"struct.std::_Rb_tree_node"**, align 8
store %"struct.std::_Rb_tree_node"** %__t, %"struct.std::_Rb_tree_node"*** %__t.addr, align 8
%0 = load %"struct.std::_Rb_tree_node"**, %"struct.std::_Rb_tree_node"*** %__t.addr, align 8
ret %"struct.std::_Rb_tree_node"** %0
}
; Function Attrs: nounwind readonly
declare dso_local %"struct.std::_Rb_tree_node_base"* @_ZSt18_Rb_tree_decrementPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"*) #9
; Function Attrs: nounwind readonly
declare dso_local %"struct.std::_Rb_tree_node_base"* @_ZSt18_Rb_tree_incrementPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"*) #9
; Function Attrs: nounwind
declare dso_local void @_ZSt29_Rb_tree_insert_and_rebalancebPSt18_Rb_tree_node_baseS0_RS_(i1 zeroext, %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* nonnull align 8 dereferenceable(32)) #10
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE15_M_destroy_nodeEPSt13_Rb_tree_nodeIS4_E(%"class.std::_Rb_tree"* %this, %"struct.std::_Rb_tree_node"* %__p) #3 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__p.addr = alloca %"struct.std::_Rb_tree_node"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store %"struct.std::_Rb_tree_node"* %__p, %"struct.std::_Rb_tree_node"** %__p.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%call = call nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZNSt8_Rb_treeIiSt4pairIKiP14_twoIntsStructESt10_Select1stIS4_ESt4lessIiESaIS4_EE21_M_get_Node_allocatorEv(%"class.std::_Rb_tree"* %this1) #11
%0 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__p.addr, align 8
%call2 = invoke %"struct.std::pair"* @_ZNSt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEE9_M_valptrEv(%"struct.std::_Rb_tree_node"* %0)
to label %invoke.cont unwind label %terminate.lpad
invoke.cont: ; preds = %entry
call void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEEE7destroyIS5_EEvRS7_PT_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %call, %"struct.std::pair"* %call2) #11
%1 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__p.addr, align 8
ret void
terminate.lpad: ; preds = %entry
%2 = landingpad { i8*, i32 }
catch i8* null
%3 = extractvalue { i8*, i32 } %2, 0
call void @__clang_call_terminate(i8* %3) #12
unreachable
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEEE7destroyIS5_EEvRS7_PT_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a, %"struct.std::pair"* %__p) #3 comdat align 2 {
entry:
%__a.addr = alloca %"class.std::allocator"*, align 8
%__p.addr = alloca %"struct.std::pair"*, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
store %"struct.std::pair"* %__p, %"struct.std::pair"** %__p.addr, align 8
%0 = load %"class.std::allocator"*, %"class.std::allocator"** %__a.addr, align 8
%1 = bitcast %"class.std::allocator"* %0 to %"class.__gnu_cxx::new_allocator"*
%2 = load %"struct.std::pair"*, %"struct.std::pair"** %__p.addr, align 8
call void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEE7destroyIS6_EEvPT_(%"class.__gnu_cxx::new_allocator"* %1, %"struct.std::pair"* %2) #11
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiP14_twoIntsStructEEE7destroyIS6_EEvPT_(%"class.__gnu_cxx::new_allocator"* %this, %"struct.std::pair"* %__p) #3 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
%__p.addr = alloca %"struct.std::pair"*, align 8
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
store %"struct.std::pair"* %__p, %"struct.std::pair"** %__p.addr, align 8
%this1 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
%0 = load %"struct.std::pair"*, %"struct.std::pair"** %__p.addr, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 4 dereferenceable(4) i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i32* nonnull align 4 dereferenceable(4) %__t) #3 comdat {
entry:
%__t.addr = alloca i32*, align 8
store i32* %__t, i32** %__t.addr, align 8
%0 = load i32*, i32** %__t.addr, align 8
ret i32* %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt5tupleIJOiEEC2IJiELb1ELb1EEEDpOT_(%"class.std::tuple"* %this, i32* nonnull align 4 dereferenceable(4) %__elements) unnamed_addr #3 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%this.addr = alloca %"class.std::tuple"*, align 8
%__elements.addr = alloca i32*, align 8
store %"class.std::tuple"* %this, %"class.std::tuple"** %this.addr, align 8
store i32* %__elements, i32** %__elements.addr, align 8
%this1 = load %"class.std::tuple"*, %"class.std::tuple"** %this.addr, align 8
%0 = bitcast %"class.std::tuple"* %this1 to %"struct.std::_Tuple_impl"*
%1 = load i32*, i32** %__elements.addr, align 8
%call = call nonnull align 4 dereferenceable(4) i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i32* nonnull align 4 dereferenceable(4) %1) #11
invoke void @_ZNSt11_Tuple_implILm0EJOiEEC2IiEEOT_(%"struct.std::_Tuple_impl"* %0, i32* nonnull align 4 dereferenceable(4) %call)
to label %invoke.cont unwind label %terminate.lpad
invoke.cont: ; preds = %entry
ret void
terminate.lpad: ; preds = %entry
%2 = landingpad { i8*, i32 }
catch i8* null
%3 = extractvalue { i8*, i32 } %2, 0
call void @__clang_call_terminate(i8* %3) #12
unreachable
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt11_Tuple_implILm0EJOiEEC2IiEEOT_(%"struct.std::_Tuple_impl"* %this, i32* nonnull align 4 dereferenceable(4) %__head) unnamed_addr #0 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Tuple_impl"*, align 8
%__head.addr = alloca i32*, align 8
store %"struct.std::_Tuple_impl"* %this, %"struct.std::_Tuple_impl"** %this.addr, align 8
store i32* %__head, i32** %__head.addr, align 8
%this1 = load %"struct.std::_Tuple_impl"*, %"struct.std::_Tuple_impl"** %this.addr, align 8
%0 = bitcast %"struct.std::_Tuple_impl"* %this1 to %"struct.std::_Head_base"*
%1 = load i32*, i32** %__head.addr, align 8
%call = call nonnull align 4 dereferenceable(4) i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i32* nonnull align 4 dereferenceable(4) %1) #11
call void @_ZNSt10_Head_baseILm0EOiLb0EEC2IiEEOT_(%"struct.std::_Head_base"* %0, i32* nonnull align 4 dereferenceable(4) %call)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt10_Head_baseILm0EOiLb0EEC2IiEEOT_(%"struct.std::_Head_base"* %this, i32* nonnull align 4 dereferenceable(4) %__h) unnamed_addr #3 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Head_base"*, align 8
%__h.addr = alloca i32*, align 8
store %"struct.std::_Head_base"* %this, %"struct.std::_Head_base"** %this.addr, align 8
store i32* %__h, i32** %__h.addr, align 8
%this1 = load %"struct.std::_Head_base"*, %"struct.std::_Head_base"** %this.addr, align 8
%_M_head_impl = getelementptr inbounds %"struct.std::_Head_base", %"struct.std::_Head_base"* %this1, i32 0, i32 0
%0 = load i32*, i32** %__h.addr, align 8
%call = call nonnull align 4 dereferenceable(4) i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i32* nonnull align 4 dereferenceable(4) %0) #11
store i32* %call, i32** %_M_head_impl, align 8
ret void
}
attributes #0 = { noinline 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" }
attributes #1 = { argmemonly nounwind willreturn }
attributes #2 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #3 = { 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" }
attributes #4 = { noinline noreturn nounwind }
attributes #5 = { cold noreturn nounwind }
attributes #6 = { noreturn "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #7 = { nobuiltin allocsize(0) "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #8 = { nobuiltin nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #9 = { nounwind readonly "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #10 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #11 = { nounwind }
attributes #12 = { noreturn nounwind }
attributes #13 = { noreturn }
attributes #14 = { allocsize(0) }
attributes #15 = { nounwind readonly }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%stack_var_-72 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
%1 = ptrtoint i64* %stack_var_-72 to i64, !insn.addr !1
ret i64 %1, !insn.addr !2
}
define i64 @function_30() local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !3
%1 = load i64, i64* %0
%2 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_ncpy_52b_badSink(), !insn.addr !3
%3 = add i64 %1, -8, !insn.addr !4
%4 = inttoptr i64 %3 to i64*, !insn.addr !4
%5 = load i64, i64* %4, align 8, !insn.addr !4
%6 = call i64 @__readfsqword(i64 40), !insn.addr !5
%7 = icmp eq i64 %5, %6, !insn.addr !5
store i64 0, i64* %rax.0.reg2mem, !insn.addr !6
br i1 %7, label %dec_label_pc_4a, label %dec_label_pc_45, !insn.addr !6
dec_label_pc_45: ; preds = %dec_label_pc_30
%8 = call i64 @__stack_chk_fail(), !insn.addr !7
store i64 %8, i64* %rax.0.reg2mem, !insn.addr !7
br label %dec_label_pc_4a, !insn.addr !7
dec_label_pc_4a: ; preds = %dec_label_pc_45, %dec_label_pc_30
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !8
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_4c:
%rax.0.reg2mem = alloca i64, !insn.addr !9
%stack_var_-72 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !10
%1 = ptrtoint i64* %stack_var_-72 to i64, !insn.addr !11
%2 = bitcast i64* %stack_var_-72 to i32*, !insn.addr !12
store i32 0, i32* %2, align 8, !insn.addr !12
%3 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_ncpy_52b_goodG2BSink(i64 %1), !insn.addr !13
%4 = call i64 @__readfsqword(i64 40), !insn.addr !14
%5 = icmp eq i64 %0, %4, !insn.addr !14
store i64 0, i64* %rax.0.reg2mem, !insn.addr !15
br i1 %5, label %dec_label_pc_96, label %dec_label_pc_91, !insn.addr !15
dec_label_pc_91: ; preds = %dec_label_pc_4c
%6 = call i64 @__stack_chk_fail(), !insn.addr !16
store i64 %6, i64* %rax.0.reg2mem, !insn.addr !16
br label %dec_label_pc_96, !insn.addr !16
dec_label_pc_96: ; preds = %dec_label_pc_91, %dec_label_pc_4c
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !17
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_ncpy_52_good() local_unnamed_addr {
dec_label_pc_98:
%0 = call i64 @goodG2B(), !insn.addr !18
ret i64 %0, !insn.addr !19
}
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_ncpy_52b_badSink() local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_ncpy_52b_goodG2BSink(i64) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 8}
!1 = !{i64 27}
!2 = !{i64 31}
!3 = !{i64 48}
!4 = !{i64 54}
!5 = !{i64 58}
!6 = !{i64 67}
!7 = !{i64 69}
!8 = !{i64 75}
!9 = !{i64 76}
!10 = !{i64 84}
!11 = !{i64 103}
!12 = !{i64 111}
!13 = !{i64 124}
!14 = !{i64 134}
!15 = !{i64 143}
!16 = !{i64 145}
!17 = !{i64 151}
!18 = !{i64 161}
!19 = !{i64 168}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_ncpy_52_bad() #0 {
entry:
%data = alloca i32*, align 8
%dataBadBuffer = alloca [10 x i32], align 16
%dataGoodBuffer = alloca [11 x i32], align 16
%arraydecay = getelementptr inbounds [10 x i32], [10 x i32]* %dataBadBuffer, i64 0, i64 0
store i32* %arraydecay, i32** %data, align 8
%0 = load i32*, i32** %data, align 8
%arrayidx = getelementptr inbounds i32, i32* %0, i64 0
store i32 0, i32* %arrayidx, align 4
%1 = load i32*, i32** %data, align 8
call void @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_ncpy_52b_badSink(i32* %1)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_ncpy_52b_badSink(i32*) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_ncpy_52_good() #0 {
entry:
call void @goodG2B()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B() #0 {
entry:
%data = alloca i32*, align 8
%dataBadBuffer = alloca [10 x i32], align 16
%dataGoodBuffer = alloca [11 x i32], align 16
%arraydecay = getelementptr inbounds [11 x i32], [11 x i32]* %dataGoodBuffer, i64 0, i64 0
store i32* %arraydecay, i32** %data, align 8
%0 = load i32*, i32** %data, align 8
%arrayidx = getelementptr inbounds i32, i32* %0, i64 0
store i32 0, i32* %arrayidx, align 4
%1 = load i32*, i32** %data, align 8
call void @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_ncpy_52b_goodG2BSink(i32* %1)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_ncpy_52b_goodG2BSink(i32*) #1
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" }
attributes #1 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_10 = constant [3 x i8] c"%(\00"
@0 = external global i32
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%stack_var_-232 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
%1 = ptrtoint i64* %stack_var_-232 to i64, !insn.addr !1
ret i64 %1, !insn.addr !2
}
define i64 @function_35(i64 %arg1, i64 %arg2) local_unnamed_addr {
dec_label_pc_35:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !3
%1 = load i64, i64* %0
%2 = add i64 %1, -232, !insn.addr !3
%3 = inttoptr i64 %2 to i64*, !insn.addr !3
%4 = load i64, i64* %3, align 8, !insn.addr !3
%5 = inttoptr i64 %4 to i8*, !insn.addr !4
store i8 0, i8* %5, align 1, !insn.addr !4
%6 = add i64 %1, -176, !insn.addr !5
%7 = inttoptr i64 %6 to i32*, !insn.addr !5
store i32 0, i32* %7, align 4, !insn.addr !5
%8 = add i64 %1, -224, !insn.addr !6
%9 = inttoptr i64 %8 to i64*, !insn.addr !7
%10 = call i64 @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEEixEOi(i64* %9, i32* %7), !insn.addr !7
%11 = load i64, i64* %3, align 8, !insn.addr !8
%12 = inttoptr i64 %10 to i64*, !insn.addr !9
store i64 %11, i64* %12, align 8, !insn.addr !9
store i32 1, i32* %7, align 4, !insn.addr !10
%13 = call i64 @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEEixEOi(i64* %9, i32* %7), !insn.addr !11
%14 = load i64, i64* %3, align 8, !insn.addr !12
%15 = inttoptr i64 %13 to i64*, !insn.addr !13
store i64 %14, i64* %15, align 8, !insn.addr !13
store i32 2, i32* %7, align 4, !insn.addr !14
%16 = call i64 @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEEixEOi(i64* %9, i32* %7), !insn.addr !15
%17 = load i64, i64* %3, align 8, !insn.addr !16
%18 = inttoptr i64 %16 to i64*, !insn.addr !17
store i64 %17, i64* %18, align 8, !insn.addr !17
%19 = inttoptr i64 %6 to i64*, !insn.addr !18
%20 = call i64 @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEEC1ERKS7_(i64* %19, i64* %9), !insn.addr !18
%21 = call i64 @_ZN63CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_ncat_747badSinkESt3mapIiPcSt4lessIiESaISt4pairIKiS1_EEE(i64 %6), !insn.addr !19
%22 = call i64 @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEED1Ev(i64* %19), !insn.addr !20
%23 = call i64 @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEED1Ev(i64* %9), !insn.addr !21
%24 = add i64 %1, -24, !insn.addr !22
%25 = inttoptr i64 %24 to i64*, !insn.addr !22
%26 = load i64, i64* %25, align 8, !insn.addr !22
%27 = call i64 @__readfsqword(i64 40), !insn.addr !23
%28 = icmp eq i64 %26, %27, !insn.addr !23
store i64 0, i64* %rax.0.reg2mem, !insn.addr !24
br i1 %28, label %dec_label_pc_15d, label %dec_label_pc_158, !insn.addr !24
dec_label_pc_158: ; preds = %dec_label_pc_35
%29 = call i64 @__stack_chk_fail(), !insn.addr !25
store i64 %29, i64* %rax.0.reg2mem, !insn.addr !25
br label %dec_label_pc_15d, !insn.addr !25
dec_label_pc_15d: ; preds = %dec_label_pc_158, %dec_label_pc_35
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !26
}
define i64 @_ZN63CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_ncat_74L7goodG2BEv() local_unnamed_addr {
dec_label_pc_167:
%rax.0.reg2mem = alloca i64, !insn.addr !27
%stack_var_-184 = alloca i32, align 4
%stack_var_-136 = alloca i64, align 8
%stack_var_-232 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !28
%1 = call i64 @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEEC1Ev(i64* nonnull %stack_var_-232), !insn.addr !29
%2 = ptrtoint i64* %stack_var_-136 to i64, !insn.addr !30
%3 = bitcast i64* %stack_var_-136 to i8*, !insn.addr !31
store i8 0, i8* %3, align 8, !insn.addr !31
store i32 0, i32* %stack_var_-184, align 4, !insn.addr !32
%4 = call i64 @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEEixEOi(i64* nonnull %stack_var_-232, i32* nonnull %stack_var_-184), !insn.addr !33
%5 = inttoptr i64 %4 to i64*, !insn.addr !34
store i64 %2, i64* %5, align 8, !insn.addr !34
store i32 1, i32* %stack_var_-184, align 4, !insn.addr !35
%6 = call i64 @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEEixEOi(i64* nonnull %stack_var_-232, i32* nonnull %stack_var_-184), !insn.addr !36
%7 = inttoptr i64 %6 to i64*, !insn.addr !37
store i64 %2, i64* %7, align 8, !insn.addr !37
store i32 2, i32* %stack_var_-184, align 4, !insn.addr !38
%8 = call i64 @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEEixEOi(i64* nonnull %stack_var_-232, i32* nonnull %stack_var_-184), !insn.addr !39
%9 = inttoptr i64 %8 to i64*, !insn.addr !40
store i64 %2, i64* %9, align 8, !insn.addr !40
%10 = bitcast i32* %stack_var_-184 to i64*, !insn.addr !41
%11 = call i64 @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEEC1ERKS7_(i64* nonnull %10, i64* nonnull %stack_var_-232), !insn.addr !41
%12 = ptrtoint i32* %stack_var_-184 to i64, !insn.addr !42
%13 = call i64 @_ZN63CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_ncat_7411goodG2BSinkESt3mapIiPcSt4lessIiESaISt4pairIKiS1_EEE(i64 %12), !insn.addr !43
%14 = call i64 @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEED1Ev(i64* nonnull %10), !insn.addr !44
%15 = call i64 @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEED1Ev(i64* nonnull %stack_var_-232), !insn.addr !45
%16 = call i64 @__readfsqword(i64 40), !insn.addr !46
%17 = icmp eq i64 %0, %16, !insn.addr !46
store i64 0, i64* %rax.0.reg2mem, !insn.addr !47
br i1 %17, label %dec_label_pc_2c4, label %dec_label_pc_2bf, !insn.addr !47
dec_label_pc_2bf: ; preds = %dec_label_pc_167
%18 = call i64 @__stack_chk_fail(), !insn.addr !48
store i64 %18, i64* %rax.0.reg2mem, !insn.addr !48
br label %dec_label_pc_2c4, !insn.addr !48
dec_label_pc_2c4: ; preds = %dec_label_pc_2bf, %dec_label_pc_167
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !49
}
define i64 @_ZN63CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_ncat_744goodEv() local_unnamed_addr {
dec_label_pc_2ce:
%0 = call i64 @_ZN63CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_ncat_74L7goodG2BEv(), !insn.addr !50
ret i64 %0, !insn.addr !51
}
define i64 @_ZnwmPv(i64 %arg1, i64* %arg2) local_unnamed_addr {
dec_label_pc_2da:
%0 = ptrtoint i64* %arg2 to i64
ret i64 %0, !insn.addr !52
}
define i64 @_ZdlPvS_(i64* %arg1, i64* %arg2) local_unnamed_addr {
dec_label_pc_2ec:
%0 = alloca i64
%1 = load i64, i64* %0
ret i64 %1, !insn.addr !53
}
define i64 @_ZNSt18_Rb_tree_node_base10_S_minimumEPS_(i64* %arg1) local_unnamed_addr {
dec_label_pc_2fe:
%storemerge.reg2mem = alloca i64, !insn.addr !54
%0 = ptrtoint i64* %arg1 to i64
store i64 %0, i64* %storemerge.reg2mem, !insn.addr !55
br label %dec_label_pc_306, !insn.addr !55
dec_label_pc_306: ; preds = %dec_label_pc_306, %dec_label_pc_2fe
%storemerge.reload = load i64, i64* %storemerge.reg2mem
%1 = add i64 %storemerge.reload, ptrtoint ([3 x i8]* @global_var_10 to i64), !insn.addr !56
%2 = inttoptr i64 %1 to i64*, !insn.addr !56
%3 = load i64, i64* %2, align 8, !insn.addr !56
%4 = icmp eq i64 %3, 0, !insn.addr !57
store i64 %3, i64* %storemerge.reg2mem, !insn.addr !58
br i1 %4, label %dec_label_pc_321, label %dec_label_pc_306, !insn.addr !58
dec_label_pc_321: ; preds = %dec_label_pc_306
ret i64 %storemerge.reload, !insn.addr !59
}
define i64 @_ZNSt18_Rb_tree_node_base10_S_maximumEPS_(i64* %arg1) local_unnamed_addr {
dec_label_pc_327:
%storemerge.reg2mem = alloca i64, !insn.addr !60
%0 = ptrtoint i64* %arg1 to i64
store i64 %0, i64* %storemerge.reg2mem, !insn.addr !61
br label %dec_label_pc_32f, !insn.addr !61
dec_label_pc_32f: ; preds = %dec_label_pc_32f, %dec_label_pc_327
%storemerge.reload = load i64, i64* %storemerge.reg2mem
%1 = add i64 %storemerge.reload, 24, !insn.addr !62
%2 = inttoptr i64 %1 to i64*, !insn.addr !62
%3 = load i64, i64* %2, align 8, !insn.addr !62
%4 = icmp eq i64 %3, 0, !insn.addr !63
store i64 %3, i64* %storemerge.reg2mem, !insn.addr !64
br i1 %4, label %dec_label_pc_34a, label %dec_label_pc_32f, !insn.addr !64
dec_label_pc_34a: ; preds = %dec_label_pc_32f
ret i64 %storemerge.reload, !insn.addr !65
}
define i64 @_ZNSt15_Rb_tree_headerC1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_350:
%0 = bitcast i64* %result to i32*, !insn.addr !66
store i32 0, i32* %0, align 4, !insn.addr !66
%1 = call i64 @_ZNSt15_Rb_tree_header8_M_resetEv(i64* %result), !insn.addr !67
ret i64 %1, !insn.addr !68
}
define i64 @_ZNSt15_Rb_tree_header8_M_resetEv(i64* %result) local_unnamed_addr {
dec_label_pc_376:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 8, !insn.addr !69
%2 = inttoptr i64 %1 to i64*, !insn.addr !69
store i64 0, i64* %2, align 8, !insn.addr !69
%3 = add i64 %0, ptrtoint ([3 x i8]* @global_var_10 to i64), !insn.addr !70
%4 = inttoptr i64 %3 to i64*, !insn.addr !70
store i64 %0, i64* %4, align 8, !insn.addr !70
%5 = add i64 %0, 24, !insn.addr !71
%6 = inttoptr i64 %5 to i64*, !insn.addr !71
store i64 %0, i64* %6, align 8, !insn.addr !71
%7 = add i64 %0, 32, !insn.addr !72
%8 = inttoptr i64 %7 to i64*, !insn.addr !72
store i64 0, i64* %8, align 8, !insn.addr !72
ret i64 %0, !insn.addr !73
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE13_Rb_tree_implIS7_Lb1EEC1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_3b2:
%0 = ptrtoint i64* %result to i64
%1 = call i64 @_ZNSaISt13_Rb_tree_nodeISt4pairIKiPcEEEC1Ev(i64* %result), !insn.addr !74
%2 = call i64 @_ZNSt20_Rb_tree_key_compareISt4lessIiEEC1Ev(i64* %result), !insn.addr !75
%3 = add i64 %0, 8, !insn.addr !76
%4 = inttoptr i64 %3 to i64*, !insn.addr !77
%5 = call i64 @_ZNSt15_Rb_tree_headerC1Ev(i64* %4), !insn.addr !77
ret i64 %5, !insn.addr !78
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE13_Rb_tree_implIS7_Lb1EED1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_3ea:
%0 = call i64 @_ZNSaISt13_Rb_tree_nodeISt4pairIKiPcEEED1Ev(i64* %result), !insn.addr !79
ret i64 %0, !insn.addr !80
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EEC1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_406:
%0 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE13_Rb_tree_implIS7_Lb1EEC1Ev(i64* %result), !insn.addr !81
ret i64 %0, !insn.addr !82
}
define i64 @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEEC1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_422:
%0 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EEC1Ev(i64* %result), !insn.addr !83
ret i64 %0, !insn.addr !84
}
define i64 @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEED1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_43e:
%0 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EED1Ev(i64* %result), !insn.addr !85
ret i64 %0, !insn.addr !86
}
define i64 @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEEC1ERKS7_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_45a:
%0 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EEC1ERKS9_(i64* %result, i64* %arg2), !insn.addr !87
ret i64 %0, !insn.addr !88
}
define i64 @_ZNSaISt13_Rb_tree_nodeISt4pairIKiPcEEEC1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_554:
%0 = call i64 @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEEC1Ev(i64* %result), !insn.addr !89
ret i64 %0, !insn.addr !90
}
define i64 @_ZNSaISt13_Rb_tree_nodeISt4pairIKiPcEEED1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_570:
%0 = call i64 @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEED1Ev(i64* %result), !insn.addr !91
ret i64 %0, !insn.addr !92
}
define i64 @_ZNSt20_Rb_tree_key_compareISt4lessIiEEC1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_58c:
%0 = alloca i64
%1 = load i64, i64* %0
ret i64 %1, !insn.addr !93
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EED1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_598:
%0 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_M_beginEv(i64* %result), !insn.addr !94
%1 = inttoptr i64 %0 to i64*, !insn.addr !95
%2 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_M_eraseEPSt13_Rb_tree_nodeIS3_E(i64* %result, i64* %1), !insn.addr !95
%3 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE13_Rb_tree_implIS7_Lb1EED1Ev(i64* %result), !insn.addr !96
ret i64 %3, !insn.addr !97
}
define i64* @_ZSt4moveIRiEONSt16remove_referenceIT_E4typeEOS2_(i32** %arg1) local_unnamed_addr {
dec_label_pc_5d1:
%0 = bitcast i32** %arg1 to i64*, !insn.addr !98
ret i64* %0, !insn.addr !98
}
define i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_5df:
%0 = bitcast i64* %arg1 to i32*, !insn.addr !99
ret i32* %0, !insn.addr !99
}
define i64 @_ZNSt5tupleIJOiEEC1IJiELb1EEEDpOT_(i64* %result, i64 %arg2) local_unnamed_addr {
dec_label_pc_5ee:
%0 = inttoptr i64 %arg2 to i64*, !insn.addr !100
%1 = call i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i64* %0), !insn.addr !100
%2 = call i64 @_ZNSt11_Tuple_implILm0EJOiEEC1IiEEOT_(i64* %result, i32* %1), !insn.addr !101
ret i64 %2, !insn.addr !102
}
define i64 @_ZNSt11_Tuple_implILm0EJOiEEC1IiEEOT_(i64* %result, i32* %arg2) local_unnamed_addr {
dec_label_pc_622:
%0 = bitcast i32* %arg2 to i64*
%1 = call i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i64* %0), !insn.addr !103
%2 = call i64 @_ZNSt10_Head_baseILm0EOiLb0EEC1IiEEOT_(i64* %result, i32* %1), !insn.addr !104
ret i64 %2, !insn.addr !105
}
define i64 @_ZNSt10_Head_baseILm0EOiLb0EEC1IiEEOT_(i64* %result, i32* %arg2) local_unnamed_addr {
dec_label_pc_656:
%0 = ptrtoint i64* %result to i64
%1 = bitcast i32* %arg2 to i64*
%2 = call i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i64* %1), !insn.addr !106
%3 = ptrtoint i32* %2 to i64, !insn.addr !106
store i64 %3, i64* %result, align 8, !insn.addr !107
ret i64 %0, !insn.addr !108
}
define i64 @_ZNSt5tupleIJOiEEC1EOS1_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_680:
%0 = call i64 @_ZNSt11_Tuple_implILm0EJOiEEC1EOS1_(i64* %result, i64* %arg2), !insn.addr !109
ret i64 %0, !insn.addr !110
}
define i64 @_ZSt16forward_as_tupleIJiEESt5tupleIJDpOT_EES3_(i64* %result, i64 %arg2) local_unnamed_addr {
dec_label_pc_6a6:
%0 = ptrtoint i64* %result to i64
%1 = inttoptr i64 %arg2 to i64*, !insn.addr !111
%2 = call i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i64* %1), !insn.addr !111
%3 = ptrtoint i32* %2 to i64, !insn.addr !111
%4 = call i64 @_ZNSt5tupleIJOiEEC1IJiELb1EEEDpOT_(i64* %result, i64 %3), !insn.addr !112
ret i64 %0, !insn.addr !113
}
define i64 @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEEixEOi(i64* %result, i32* %arg2) local_unnamed_addr {
dec_label_pc_6da:
%rax.0.reg2mem = alloca i64, !insn.addr !114
%stack_var_-57 = alloca i64, align 8
%stack_var_-48 = alloca i64, align 8
%stack_var_-40 = alloca i64, align 8
%stack_var_-56 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !115
%1 = call i64 @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE11lower_boundERS4_(i64* %result, i32* %arg2), !insn.addr !116
store i64 %1, i64* %stack_var_-56, align 8, !insn.addr !117
%2 = call i64 @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE3endEv(i64* %result), !insn.addr !118
store i64 %2, i64* %stack_var_-40, align 8, !insn.addr !119
%3 = call i64 @_ZNKSt17_Rb_tree_iteratorISt4pairIKiPcEEeqERKS4_(i64* nonnull %stack_var_-56, i64* nonnull %stack_var_-40), !insn.addr !120
%4 = trunc i64 %3 to i8, !insn.addr !121
%5 = icmp eq i8 %4, 0, !insn.addr !121
%6 = icmp eq i1 %5, false, !insn.addr !122
br i1 %6, label %dec_label_pc_77a, label %dec_label_pc_738, !insn.addr !122
dec_label_pc_738: ; preds = %dec_label_pc_6da
%7 = call i64 @_ZNKSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE8key_compEv(i64* %result), !insn.addr !123
%8 = call i64 @_ZNKSt17_Rb_tree_iteratorISt4pairIKiPcEEdeEv(i64* nonnull %stack_var_-56), !insn.addr !124
%9 = inttoptr i64 %8 to i32*, !insn.addr !125
%10 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* nonnull %stack_var_-48, i32* %arg2, i32* %9), !insn.addr !125
%11 = trunc i64 %10 to i8, !insn.addr !126
%12 = icmp ne i8 %11, 0, !insn.addr !126
%phitmp = icmp eq i1 %12, false
br i1 %phitmp, label %dec_label_pc_7d7, label %dec_label_pc_77a, !insn.addr !127
dec_label_pc_77a: ; preds = %dec_label_pc_6da, %dec_label_pc_738
%13 = ptrtoint i64* %result to i64
%14 = bitcast i32* %arg2 to i32**
%15 = call i64* @_ZSt4moveIRiEONSt16remove_referenceIT_E4typeEOS2_(i32** %14), !insn.addr !128
%16 = ptrtoint i64* %15 to i64, !insn.addr !128
%17 = call i64 @_ZSt16forward_as_tupleIJiEESt5tupleIJDpOT_EES3_(i64* nonnull %stack_var_-48, i64 %16), !insn.addr !129
%18 = call i64 @_ZNSt23_Rb_tree_const_iteratorISt4pairIKiPcEEC1ERKSt17_Rb_tree_iteratorIS3_E(i64* nonnull %stack_var_-40, i64* nonnull %stack_var_-56), !insn.addr !130
%19 = load i64, i64* %stack_var_-40, align 8, !insn.addr !131
%20 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJOiEESE_IJEEEEESt17_Rb_tree_iteratorIS3_ESt23_Rb_tree_const_iteratorIS3_EDpOT_(i64 %13, i64 %19, i64 763, i64* nonnull %stack_var_-48, i64* nonnull %stack_var_-57), !insn.addr !132
store i64 %20, i64* %stack_var_-56, align 8, !insn.addr !133
br label %dec_label_pc_7d7, !insn.addr !133
dec_label_pc_7d7: ; preds = %dec_label_pc_77a, %dec_label_pc_738
%21 = call i64 @_ZNKSt17_Rb_tree_iteratorISt4pairIKiPcEEdeEv(i64* nonnull %stack_var_-56), !insn.addr !134
%22 = add i64 %21, 8, !insn.addr !135
%23 = call i64 @__readfsqword(i64 40), !insn.addr !136
%24 = icmp eq i64 %0, %23, !insn.addr !136
store i64 %22, i64* %rax.0.reg2mem, !insn.addr !137
br i1 %24, label %dec_label_pc_7fb, label %dec_label_pc_7f6, !insn.addr !137
dec_label_pc_7f6: ; preds = %dec_label_pc_7d7
%25 = call i64 @__stack_chk_fail(), !insn.addr !138
store i64 %25, i64* %rax.0.reg2mem, !insn.addr !138
br label %dec_label_pc_7fb, !insn.addr !138
dec_label_pc_7fb: ; preds = %dec_label_pc_7f6, %dec_label_pc_7d7
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !139
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EEC1ERKS9_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_802:
%rax.0.reg2mem = alloca i64, !insn.addr !140
%0 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE13_Rb_tree_implIS7_Lb1EEC1ERKSB_(i64* %result, i64* %arg2), !insn.addr !141
%1 = call i64 @_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_M_rootEv(i64* %arg2), !insn.addr !142
%2 = icmp eq i64 %1, 0, !insn.addr !143
%3 = icmp eq i1 %2, false, !insn.addr !144
%4 = zext i1 %3 to i64, !insn.addr !144
%5 = and i64 %1, -256, !insn.addr !144
%6 = or i64 %5, %4, !insn.addr !144
%7 = icmp eq i1 %3, false, !insn.addr !145
store i64 %6, i64* %rax.0.reg2mem, !insn.addr !146
br i1 %7, label %dec_label_pc_87d, label %dec_label_pc_83c, !insn.addr !146
dec_label_pc_83c: ; preds = %dec_label_pc_802
%8 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_M_rootEv(i64* %result), !insn.addr !147
%9 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_M_copyERKS9_(i64* %result, i64* %arg2), !insn.addr !148
%10 = inttoptr i64 %8 to i64*, !insn.addr !149
store i64 %9, i64* %10, align 8, !insn.addr !149
store i64 %9, i64* %rax.0.reg2mem, !insn.addr !150
br label %dec_label_pc_87d, !insn.addr !150
dec_label_pc_87d: ; preds = %dec_label_pc_83c, %dec_label_pc_802
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !151
}
define i64 @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEEC1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_886:
%0 = alloca i64
%1 = load i64, i64* %0
ret i64 %1, !insn.addr !152
}
define i64 @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEED1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_892:
%0 = alloca i64
%1 = load i64, i64* %0
ret i64 %1, !insn.addr !153
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_M_eraseEPSt13_Rb_tree_nodeIS3_E(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_89e:
%rax.0.lcssa.reg2mem = alloca i64, !insn.addr !154
%storemerge1.reg2mem = alloca i64, !insn.addr !154
%0 = icmp eq i64* %arg2, null, !insn.addr !155
br i1 %0, label %dec_label_pc_900, label %dec_label_pc_8b5.lr.ph, !insn.addr !156
dec_label_pc_8b5.lr.ph: ; preds = %dec_label_pc_89e
%1 = ptrtoint i64* %arg2 to i64
store i64 %1, i64* %storemerge1.reg2mem
br label %dec_label_pc_8b5
dec_label_pc_8b5: ; preds = %dec_label_pc_8b5.lr.ph, %dec_label_pc_8b5
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%2 = inttoptr i64 %storemerge1.reload to i64*, !insn.addr !157
%3 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPSt18_Rb_tree_node_base(i64* %2), !insn.addr !157
%4 = inttoptr i64 %3 to i64*, !insn.addr !158
%5 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_M_eraseEPSt13_Rb_tree_nodeIS3_E(i64* %result, i64* %4), !insn.addr !158
%6 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_S_leftEPSt18_Rb_tree_node_base(i64* %2), !insn.addr !159
%7 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_drop_nodeEPSt13_Rb_tree_nodeIS3_E(i64* %result, i64* %2), !insn.addr !160
%8 = icmp eq i64 %6, 0, !insn.addr !155
store i64 %6, i64* %storemerge1.reg2mem, !insn.addr !156
store i64 0, i64* %rax.0.lcssa.reg2mem, !insn.addr !156
br i1 %8, label %dec_label_pc_900, label %dec_label_pc_8b5, !insn.addr !156
dec_label_pc_900: ; preds = %dec_label_pc_8b5, %dec_label_pc_89e
%rax.0.lcssa.reload = load i64, i64* %rax.0.lcssa.reg2mem
ret i64 %rax.0.lcssa.reload, !insn.addr !161
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_M_beginEv(i64* %result) local_unnamed_addr {
dec_label_pc_904:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, ptrtoint ([3 x i8]* @global_var_10 to i64), !insn.addr !162
%2 = inttoptr i64 %1 to i64*, !insn.addr !162
%3 = load i64, i64* %2, align 8, !insn.addr !162
ret i64 %3, !insn.addr !163
}
define i64 @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE11lower_boundERS4_(i64* %result, i32* %arg2) local_unnamed_addr {
dec_label_pc_916:
%0 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11lower_boundERS1_(i64* %result, i32* %arg2), !insn.addr !164
ret i64 %0, !insn.addr !165
}
define i64 @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE3endEv(i64* %result) local_unnamed_addr {
dec_label_pc_93c:
%0 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE3endEv(i64* %result), !insn.addr !166
ret i64 %0, !insn.addr !167
}
define i64 @_ZNKSt17_Rb_tree_iteratorISt4pairIKiPcEEeqERKS4_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_956:
%0 = ptrtoint i64* %arg2 to i64
%1 = icmp eq i64* %result, %arg2, !insn.addr !168
%2 = zext i1 %1 to i64, !insn.addr !169
%3 = and i64 %0, -256, !insn.addr !169
%4 = or i64 %3, %2, !insn.addr !169
ret i64 %4, !insn.addr !170
}
define i64 @_ZNKSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE8key_compEv(i64* %result) local_unnamed_addr {
dec_label_pc_978:
%0 = alloca i64
%1 = load i64, i64* %0
%2 = call i64 @_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8key_compEv(i64* %result), !insn.addr !171
%3 = and i64 %1, 4294967295, !insn.addr !172
ret i64 %3, !insn.addr !173
}
define i64 @_ZNKSt17_Rb_tree_iteratorISt4pairIKiPcEEdeEv(i64* %result) local_unnamed_addr {
dec_label_pc_99a:
%0 = call i64 @_ZNSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(i64* %result), !insn.addr !174
ret i64 %0, !insn.addr !175
}
define i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %arg2, i32* %arg3) local_unnamed_addr {
dec_label_pc_9b8:
%0 = alloca i64
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = trunc i64 %1 to i32
%4 = trunc i64 %2 to i32
%5 = sub i32 %3, %4, !insn.addr !176
%6 = xor i64 %2, %1
%7 = trunc i64 %6 to i32, !insn.addr !176
%8 = xor i32 %5, %3, !insn.addr !176
%9 = and i32 %8, %7, !insn.addr !176
%10 = icmp slt i32 %9, 0, !insn.addr !176
%11 = icmp slt i32 %5, 0, !insn.addr !176
%12 = icmp ne i1 %11, %10, !insn.addr !177
%13 = zext i1 %12 to i64, !insn.addr !177
%14 = and i64 %2, 4294967040
%15 = or i64 %14, %13, !insn.addr !177
ret i64 %15, !insn.addr !178
}
define i64 @_ZNSt23_Rb_tree_const_iteratorISt4pairIKiPcEEC1ERKSt17_Rb_tree_iteratorIS3_E(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_9dc:
%0 = ptrtoint i64* %arg2 to i64
%1 = ptrtoint i64* %result to i64
store i64 %0, i64* %result, align 8, !insn.addr !179
ret i64 %1, !insn.addr !180
}
define i64 @_ZNSt11_Tuple_implILm0EJOiEE7_M_headERS1_(i64* %arg1) local_unnamed_addr {
dec_label_pc_9f9:
%0 = call i64 @_ZNSt10_Head_baseILm0EOiLb0EE7_M_headERS1_(i64* %arg1), !insn.addr !181
ret i64 %0, !insn.addr !182
}
define i64 @_ZNSt10_Head_baseILm0EOiLb0EE7_M_headERS1_(i64* %arg1) local_unnamed_addr {
dec_label_pc_a13:
%0 = ptrtoint i64* %arg1 to i64
ret i64 %0, !insn.addr !183
}
define i32** @_ZSt7forwardIOiEOT_RNSt16remove_referenceIS1_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_a24:
%0 = bitcast i64* %arg1 to i32**, !insn.addr !184
ret i32** %0, !insn.addr !184
}
define i64 @_ZNSt11_Tuple_implILm0EJOiEEC1EOS1_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_a32:
%0 = call i64 @_ZNSt11_Tuple_implILm0EJOiEE7_M_headERS1_(i64* %arg2), !insn.addr !185
%1 = inttoptr i64 %0 to i64*, !insn.addr !186
%2 = call i32** @_ZSt7forwardIOiEOT_RNSt16remove_referenceIS1_E4typeE(i64* %1), !insn.addr !186
%3 = bitcast i32** %2 to i32*, !insn.addr !187
%4 = call i64 @_ZNSt10_Head_baseILm0EOiLb0EEC1IiEEOT_(i64* %result, i32* %3), !insn.addr !187
ret i64 %4, !insn.addr !188
}
define i64** @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_a6e:
%0 = bitcast i64* %arg1 to i64**, !insn.addr !189
ret i64** %0, !insn.addr !189
}
define i64* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_a7c:
ret i64* %arg1, !insn.addr !190
}
define i64* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_a8a:
ret i64* %arg1, !insn.addr !191
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJOiEESE_IJEEEEESt17_Rb_tree_iteratorIS3_ESt23_Rb_tree_const_iteratorIS3_EDpOT_(i64 %arg1, i64 %arg2, i64 %arg3, i64* %arg4, i64* %arg5) local_unnamed_addr {
dec_label_pc_a98:
%rax.0.reg2mem = alloca i64, !insn.addr !192
%storemerge.reg2mem = alloca i64, !insn.addr !192
%stack_var_-72 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !193
%1 = call i64* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(i64* %arg5), !insn.addr !194
%2 = ptrtoint i64* %1 to i64, !insn.addr !194
%3 = call i64* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(i64* %arg4), !insn.addr !195
%4 = ptrtoint i64* %3 to i64, !insn.addr !195
%5 = inttoptr i64 %arg3 to i64*, !insn.addr !196
%6 = call i64** @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(i64* %5), !insn.addr !196
%7 = ptrtoint i64** %6 to i64, !insn.addr !196
%8 = call i64* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_create_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESE_IJEEEEEPSt13_Rb_tree_nodeIS3_EDpOT_(i64 %arg1, i64 %7, i64 %4, i64 %2), !insn.addr !197
%9 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt13_Rb_tree_nodeIS3_E(i64* %8), !insn.addr !198
%10 = inttoptr i64 %arg1 to i64*, !insn.addr !199
%11 = inttoptr i64 %9 to i32*, !insn.addr !199
%12 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS3_ERS1_(i64* %10, i64 %arg2, i32* %11), !insn.addr !199
%13 = icmp eq i64 %9, 0, !insn.addr !200
br i1 %13, label %dec_label_pc_b56, label %dec_label_pc_b3c, !insn.addr !201
dec_label_pc_b3c: ; preds = %dec_label_pc_a98
%14 = inttoptr i64 %12 to i64*, !insn.addr !202
%15 = inttoptr i64 %9 to i64*, !insn.addr !202
%16 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_insert_nodeEPSt18_Rb_tree_node_baseSB_PSt13_Rb_tree_nodeIS3_E(i64* %10, i64* %14, i64* %15, i64* %8), !insn.addr !202
store i64 %16, i64* %storemerge.reg2mem, !insn.addr !203
br label %dec_label_pc_b80, !insn.addr !203
dec_label_pc_b56: ; preds = %dec_label_pc_a98
%17 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_drop_nodeEPSt13_Rb_tree_nodeIS3_E(i64* %10, i64* %8), !insn.addr !204
%18 = inttoptr i64 %12 to i64*, !insn.addr !205
%19 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-72, i64* %18), !insn.addr !205
%20 = load i64, i64* %stack_var_-72, align 8, !insn.addr !206
store i64 %20, i64* %storemerge.reg2mem, !insn.addr !206
br label %dec_label_pc_b80, !insn.addr !206
dec_label_pc_b80: ; preds = %dec_label_pc_b56, %dec_label_pc_b3c
%storemerge.reload = load i64, i64* %storemerge.reg2mem
%21 = call i64 @__readfsqword(i64 40), !insn.addr !207
%22 = icmp eq i64 %0, %21, !insn.addr !207
store i64 %storemerge.reload, i64* %rax.0.reg2mem, !insn.addr !208
br i1 %22, label %dec_label_pc_bc9, label %dec_label_pc_bc4, !insn.addr !208
dec_label_pc_bc4: ; preds = %dec_label_pc_b80
%23 = call i64 @__stack_chk_fail(), !insn.addr !209
store i64 %23, i64* %rax.0.reg2mem, !insn.addr !209
br label %dec_label_pc_bc9, !insn.addr !209
dec_label_pc_bc9: ; preds = %dec_label_pc_bc4, %dec_label_pc_b80
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !210
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE13_Rb_tree_implIS7_Lb1EEC1ERKSB_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_bd2:
%rax.0.reg2mem = alloca i64, !insn.addr !211
%0 = ptrtoint i64* %result to i64
%1 = call i64 @__readfsqword(i64 40), !insn.addr !212
%2 = call i64 @_ZN9__gnu_cxx14__alloc_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE17_S_select_on_copyERKS7_(i64* %result, i64* %arg2), !insn.addr !213
%3 = call i64 @_ZNSt20_Rb_tree_key_compareISt4lessIiEEC1ERKS1_(i64* %result, i64* %arg2), !insn.addr !214
%4 = add i64 %0, 8, !insn.addr !215
%5 = inttoptr i64 %4 to i64*, !insn.addr !216
%6 = call i64 @_ZNSt15_Rb_tree_headerC1Ev(i64* %5), !insn.addr !216
%7 = call i64 @__readfsqword(i64 40), !insn.addr !217
%8 = icmp eq i64 %1, %7, !insn.addr !217
store i64 0, i64* %rax.0.reg2mem, !insn.addr !218
br i1 %8, label %dec_label_pc_c3c, label %dec_label_pc_c37, !insn.addr !218
dec_label_pc_c37: ; preds = %dec_label_pc_bd2
%9 = call i64 @__stack_chk_fail(), !insn.addr !219
store i64 %9, i64* %rax.0.reg2mem, !insn.addr !219
br label %dec_label_pc_c3c, !insn.addr !219
dec_label_pc_c3c: ; preds = %dec_label_pc_c37, %dec_label_pc_bd2
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !220
}
define i64 @_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_M_rootEv(i64* %result) local_unnamed_addr {
dec_label_pc_c3e:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, ptrtoint ([3 x i8]* @global_var_10 to i64), !insn.addr !221
%2 = inttoptr i64 %1 to i64*, !insn.addr !221
%3 = load i64, i64* %2, align 8, !insn.addr !221
ret i64 %3, !insn.addr !222
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_M_rootEv(i64* %result) local_unnamed_addr {
dec_label_pc_c50:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, ptrtoint ([3 x i8]* @global_var_10 to i64), !insn.addr !223
ret i64 %1, !insn.addr !224
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_M_copyERKS9_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_c62:
%rax.0.reg2mem = alloca i64, !insn.addr !225
%stack_var_-24 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !226
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_Alloc_nodeC1ERS9_(i64* nonnull %stack_var_-24, i64* %result), !insn.addr !227
%2 = call i64* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_M_copyINS9_11_Alloc_nodeEEEPSt13_Rb_tree_nodeIS3_ERKS9_RT_(i64* %result, i64* %arg2, i64* nonnull %stack_var_-24), !insn.addr !228
%3 = ptrtoint i64* %2 to i64, !insn.addr !228
%4 = call i64 @__readfsqword(i64 40), !insn.addr !229
%5 = icmp eq i64 %0, %4, !insn.addr !229
store i64 %3, i64* %rax.0.reg2mem, !insn.addr !230
br i1 %5, label %dec_label_pc_cbf, label %dec_label_pc_cba, !insn.addr !230
dec_label_pc_cba: ; preds = %dec_label_pc_c62
%6 = call i64 @__stack_chk_fail(), !insn.addr !231
store i64 %6, i64* %rax.0.reg2mem, !insn.addr !231
br label %dec_label_pc_cbf, !insn.addr !231
dec_label_pc_cbf: ; preds = %dec_label_pc_cba, %dec_label_pc_c62
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !232
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPSt18_Rb_tree_node_base(i64* %arg1) local_unnamed_addr {
dec_label_pc_cc1:
%0 = ptrtoint i64* %arg1 to i64
%1 = add i64 %0, 24, !insn.addr !233
%2 = inttoptr i64 %1 to i64*, !insn.addr !233
%3 = load i64, i64* %2, align 8, !insn.addr !233
ret i64 %3, !insn.addr !234
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_S_leftEPSt18_Rb_tree_node_base(i64* %arg1) local_unnamed_addr {
dec_label_pc_cd3:
%0 = ptrtoint i64* %arg1 to i64
%1 = add i64 %0, ptrtoint ([3 x i8]* @global_var_10 to i64), !insn.addr !235
%2 = inttoptr i64 %1 to i64*, !insn.addr !235
%3 = load i64, i64* %2, align 8, !insn.addr !235
ret i64 %3, !insn.addr !236
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_drop_nodeEPSt13_Rb_tree_nodeIS3_E(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_ce6:
%0 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE15_M_destroy_nodeEPSt13_Rb_tree_nodeIS3_E(i64* %result, i64* %arg2), !insn.addr !237
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_put_nodeEPSt13_Rb_tree_nodeIS3_E(i64* %result, i64* %arg2), !insn.addr !238
ret i64 %1, !insn.addr !239
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11lower_boundERS1_(i64* %result, i32* %arg2) local_unnamed_addr {
dec_label_pc_d20:
%0 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_M_endEv(i64* %result), !insn.addr !240
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_M_beginEv(i64* %result), !insn.addr !241
%2 = inttoptr i64 %1 to i64*, !insn.addr !242
%3 = inttoptr i64 %0 to i64*, !insn.addr !242
%4 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_lower_boundEPSt13_Rb_tree_nodeIS3_EPSt18_Rb_tree_node_baseRS1_(i64* %result, i64* %2, i64* %3, i32* %arg2), !insn.addr !242
ret i64 %4, !insn.addr !243
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE3endEv(i64* %result) local_unnamed_addr {
dec_label_pc_d6c:
%rax.0.reg2mem = alloca i64, !insn.addr !244
%0 = ptrtoint i64* %result to i64
%stack_var_-24 = alloca i64, align 8
%1 = call i64 @__readfsqword(i64 40), !insn.addr !245
%2 = add i64 %0, 8, !insn.addr !246
%3 = inttoptr i64 %2 to i64*, !insn.addr !247
%4 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-24, i64* %3), !insn.addr !247
%5 = load i64, i64* %stack_var_-24, align 8, !insn.addr !248
%6 = call i64 @__readfsqword(i64 40), !insn.addr !249
%7 = icmp eq i64 %1, %6, !insn.addr !249
store i64 %5, i64* %rax.0.reg2mem, !insn.addr !250
br i1 %7, label %dec_label_pc_db6, label %dec_label_pc_db1, !insn.addr !250
dec_label_pc_db1: ; preds = %dec_label_pc_d6c
%8 = call i64 @__stack_chk_fail(), !insn.addr !251
store i64 %8, i64* %rax.0.reg2mem, !insn.addr !251
br label %dec_label_pc_db6, !insn.addr !251
dec_label_pc_db6: ; preds = %dec_label_pc_db1, %dec_label_pc_d6c
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !252
}
define i64 @_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8key_compEv(i64* %result) local_unnamed_addr {
dec_label_pc_db8:
%0 = alloca i64
%1 = load i64, i64* %0
ret i64 %1, !insn.addr !253
}
define i64 @_ZNSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_dc2:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 32, !insn.addr !254
%2 = inttoptr i64 %1 to i64*, !insn.addr !255
%3 = call i64 @_ZN9__gnu_cxx16__aligned_membufISt4pairIKiPcEE6_M_ptrEv(i64* %2), !insn.addr !255
ret i64 %3, !insn.addr !256
}
define i64* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_create_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESE_IJEEEEEPSt13_Rb_tree_nodeIS3_EDpOT_(i64 %arg1, i64 %arg2, i64 %arg3, i64 %arg4) local_unnamed_addr {
dec_label_pc_de0:
%0 = inttoptr i64 %arg1 to i64*, !insn.addr !257
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_get_nodeEv(i64* %0), !insn.addr !257
%2 = inttoptr i64 %arg4 to i64*, !insn.addr !258
%3 = call i64* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(i64* %2), !insn.addr !258
%4 = ptrtoint i64* %3 to i64, !insn.addr !258
%5 = inttoptr i64 %arg3 to i64*, !insn.addr !259
%6 = call i64* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(i64* %5), !insn.addr !259
%7 = ptrtoint i64* %6 to i64, !insn.addr !259
%8 = inttoptr i64 %arg2 to i64*, !insn.addr !260
%9 = call i64** @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(i64* %8), !insn.addr !260
%10 = ptrtoint i64** %9 to i64, !insn.addr !260
call void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE17_M_construct_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESE_IJEEEEEvPSt13_Rb_tree_nodeIS3_EDpOT_(i64 %arg1, i64 %1, i64 %10, i64 %7, i64 %4), !insn.addr !261
%11 = inttoptr i64 %1 to i64*, !insn.addr !262
ret i64* %11, !insn.addr !262
}
define i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEERKS1_OT_(i64* %result, i64** %arg2, i64*** %arg3) local_unnamed_addr {
dec_label_pc_e5c:
%0 = ptrtoint i64** %arg2 to i64
%1 = ptrtoint i64* %result to i64
store i64 %0, i64* %result, align 8, !insn.addr !263
%2 = bitcast i64*** %arg3 to i64*, !insn.addr !264
%3 = call i64*** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(i64* %2), !insn.addr !264
%4 = load i64**, i64*** %3, align 8, !insn.addr !265
%5 = ptrtoint i64** %4 to i64, !insn.addr !265
%6 = add i64 %1, 8, !insn.addr !266
%7 = inttoptr i64 %6 to i64*, !insn.addr !266
store i64 %5, i64* %7, align 8, !insn.addr !266
ret i64 %1, !insn.addr !267
}
define i64*** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_e98:
%0 = bitcast i64* %arg1 to i64***, !insn.addr !268
ret i64*** %0, !insn.addr !268
}
define i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_S4_Lb1EEEOT_OT0_(i64* %result, i64*** %arg2, i64*** %arg3) local_unnamed_addr {
dec_label_pc_ea6:
%0 = ptrtoint i64* %result to i64
%1 = bitcast i64*** %arg2 to i64*, !insn.addr !269
%2 = call i64*** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(i64* %1), !insn.addr !269
%3 = load i64**, i64*** %2, align 8, !insn.addr !270
%4 = ptrtoint i64** %3 to i64, !insn.addr !270
store i64 %4, i64* %result, align 8, !insn.addr !271
%5 = bitcast i64*** %arg3 to i64*, !insn.addr !272
%6 = call i64*** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(i64* %5), !insn.addr !272
%7 = load i64**, i64*** %6, align 8, !insn.addr !273
%8 = ptrtoint i64** %7 to i64, !insn.addr !273
%9 = add i64 %0, 8, !insn.addr !274
%10 = inttoptr i64 %9 to i64*, !insn.addr !274
store i64 %8, i64* %10, align 8, !insn.addr !274
ret i64 %0, !insn.addr !275
}
define i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEEOT_RKS1_(i64* %result, i64*** %arg2, i64** %arg3) local_unnamed_addr {
dec_label_pc_eea:
%0 = ptrtoint i64* %result to i64
%1 = bitcast i64*** %arg2 to i64*, !insn.addr !276
%2 = call i64*** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(i64* %1), !insn.addr !276
%3 = load i64**, i64*** %2, align 8, !insn.addr !277
%4 = ptrtoint i64** %3 to i64, !insn.addr !277
store i64 %4, i64* %result, align 8, !insn.addr !278
%5 = add i64 %0, 8, !insn.addr !279
%6 = inttoptr i64 %5 to i64*, !insn.addr !279
store i64 %4, i64* %6, align 8, !insn.addr !279
ret i64 %0, !insn.addr !280
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS3_ERS1_(i64* %result, i64 %arg2, i32* %arg3) local_unnamed_addr {
dec_label_pc_f26:
%rax.1.reg2mem = alloca i64, !insn.addr !281
%rax.0.reg2mem = alloca i64, !insn.addr !281
%stack_var_-72 = alloca i64, align 8
%stack_var_-56 = alloca i64, align 8
%stack_var_-64 = alloca i64, align 8
%stack_var_-80 = alloca i64, align 8
%stack_var_-104 = alloca i64, align 8
store i64 %arg2, i64* %stack_var_-104, align 8, !insn.addr !282
%0 = call i64 @__readfsqword(i64 40), !insn.addr !283
%1 = call i64 @_ZNKSt23_Rb_tree_const_iteratorISt4pairIKiPcEE13_M_const_castEv(i64* nonnull %stack_var_-104), !insn.addr !284
store i64 %1, i64* %stack_var_-80, align 8, !insn.addr !285
%2 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_M_endEv(i64* %result), !insn.addr !286
%3 = icmp eq i64 %1, %2, !insn.addr !287
%4 = icmp eq i1 %3, false, !insn.addr !288
br i1 %4, label %dec_label_pc_101c, label %dec_label_pc_f78, !insn.addr !289
dec_label_pc_f78: ; preds = %dec_label_pc_f26
%5 = call i64 @_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE4sizeEv(i64* %result), !insn.addr !290
%6 = icmp eq i64 %5, 0, !insn.addr !291
br i1 %6, label %dec_label_pc_fc4, label %dec_label_pc_f89, !insn.addr !292
dec_label_pc_f89: ; preds = %dec_label_pc_f78
%7 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_rightmostEv(i64* %result), !insn.addr !293
%8 = inttoptr i64 %7 to i64*, !insn.addr !294
%9 = load i64, i64* %8, align 8, !insn.addr !294
%10 = inttoptr i64 %9 to i64*, !insn.addr !295
%11 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %10), !insn.addr !295
%12 = inttoptr i64 %11 to i32*, !insn.addr !296
%13 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %12, i32* %arg3), !insn.addr !296
%14 = trunc i64 %13 to i8, !insn.addr !297
%15 = icmp eq i8 %14, 0, !insn.addr !297
br i1 %15, label %dec_label_pc_fc4, label %dec_label_pc_fcd, !insn.addr !298
dec_label_pc_fc4: ; preds = %dec_label_pc_f89, %dec_label_pc_f78
%16 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE24_M_get_insert_unique_posERS1_(i64* %result, i32* %arg3), !insn.addr !299
store i64 %16, i64* %rax.0.reg2mem, !insn.addr !300
br label %dec_label_pc_12b0, !insn.addr !300
dec_label_pc_fcd: ; preds = %dec_label_pc_f89
%17 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_rightmostEv(i64* %result), !insn.addr !301
store i64 0, i64* %stack_var_-64, align 8, !insn.addr !302
%18 = bitcast i64* %stack_var_-64 to i64**, !insn.addr !303
%19 = inttoptr i64 %17 to i64***, !insn.addr !303
%20 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEERKS1_OT_(i64* nonnull %stack_var_-56, i64** nonnull %18, i64*** %19), !insn.addr !303
%21 = load i64, i64* %stack_var_-56, align 8, !insn.addr !304
store i64 %21, i64* %rax.0.reg2mem, !insn.addr !305
br label %dec_label_pc_12b0, !insn.addr !305
dec_label_pc_101c: ; preds = %dec_label_pc_f26
%22 = inttoptr i64 %1 to i64*
%23 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %22), !insn.addr !306
%24 = inttoptr i64 %23 to i32*, !insn.addr !307
%25 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %arg3, i32* %24), !insn.addr !307
%26 = trunc i64 %25 to i8, !insn.addr !308
%27 = icmp eq i8 %26, 0, !insn.addr !308
br i1 %27, label %dec_label_pc_115a, label %dec_label_pc_1046, !insn.addr !309
dec_label_pc_1046: ; preds = %dec_label_pc_101c
store i64 %1, i64* %stack_var_-72, align 8, !insn.addr !310
%28 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_leftmostEv(i64* %result), !insn.addr !311
%29 = inttoptr i64 %28 to i64*, !insn.addr !312
%30 = load i64, i64* %29, align 8, !insn.addr !312
%31 = icmp eq i64 %1, %30, !insn.addr !313
%32 = icmp eq i1 %31, false, !insn.addr !314
br i1 %32, label %dec_label_pc_10a8, label %dec_label_pc_106b, !insn.addr !315
dec_label_pc_106b: ; preds = %dec_label_pc_1046
%33 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_leftmostEv(i64* %result), !insn.addr !316
%34 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_leftmostEv(i64* %result), !insn.addr !317
%35 = inttoptr i64 %34 to i64***, !insn.addr !318
%36 = inttoptr i64 %33 to i64***, !insn.addr !318
%37 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_S4_Lb1EEEOT_OT0_(i64* nonnull %stack_var_-56, i64*** %35, i64*** %36), !insn.addr !318
%38 = load i64, i64* %stack_var_-56, align 8, !insn.addr !319
store i64 %38, i64* %rax.0.reg2mem, !insn.addr !320
br label %dec_label_pc_12b0, !insn.addr !320
dec_label_pc_10a8: ; preds = %dec_label_pc_1046
%39 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEmmEv(i64* nonnull %stack_var_-72), !insn.addr !321
%40 = inttoptr i64 %39 to i64*, !insn.addr !322
%41 = load i64, i64* %40, align 8, !insn.addr !322
%42 = inttoptr i64 %41 to i64*, !insn.addr !323
%43 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %42), !insn.addr !323
%44 = inttoptr i64 %43 to i32*, !insn.addr !324
%45 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %44, i32* %arg3), !insn.addr !324
%46 = trunc i64 %45 to i8, !insn.addr !325
%47 = icmp eq i8 %46, 0, !insn.addr !325
br i1 %47, label %dec_label_pc_1142, label %dec_label_pc_10dc, !insn.addr !326
dec_label_pc_10dc: ; preds = %dec_label_pc_10a8
%48 = load i64, i64* %stack_var_-72, align 8, !insn.addr !327
%49 = inttoptr i64 %48 to i64*, !insn.addr !328
%50 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPSt18_Rb_tree_node_base(i64* %49), !insn.addr !328
%51 = icmp eq i64 %50, 0, !insn.addr !329
%52 = icmp eq i1 %51, false, !insn.addr !330
br i1 %52, label %dec_label_pc_111e, label %dec_label_pc_10f2, !insn.addr !331
dec_label_pc_10f2: ; preds = %dec_label_pc_10dc
store i64 0, i64* %stack_var_-64, align 8, !insn.addr !332
%53 = bitcast i64* %stack_var_-64 to i64**, !insn.addr !333
%54 = bitcast i64* %stack_var_-72 to i64***, !insn.addr !333
%55 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEERKS1_OT_(i64* nonnull %stack_var_-56, i64** nonnull %53, i64*** nonnull %54), !insn.addr !333
%56 = load i64, i64* %stack_var_-56, align 8, !insn.addr !334
store i64 %56, i64* %rax.0.reg2mem, !insn.addr !335
br label %dec_label_pc_12b0, !insn.addr !335
dec_label_pc_111e: ; preds = %dec_label_pc_10dc
%57 = bitcast i64* %stack_var_-80 to i64***, !insn.addr !336
%58 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_S4_Lb1EEEOT_OT0_(i64* nonnull %stack_var_-56, i64*** nonnull %57, i64*** nonnull %57), !insn.addr !336
%59 = load i64, i64* %stack_var_-56, align 8, !insn.addr !337
store i64 %59, i64* %rax.0.reg2mem, !insn.addr !338
br label %dec_label_pc_12b0, !insn.addr !338
dec_label_pc_1142: ; preds = %dec_label_pc_10a8
%60 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE24_M_get_insert_unique_posERS1_(i64* %result, i32* %arg3), !insn.addr !339
store i64 %60, i64* %rax.0.reg2mem, !insn.addr !340
br label %dec_label_pc_12b0, !insn.addr !340
dec_label_pc_115a: ; preds = %dec_label_pc_101c
%61 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %22), !insn.addr !341
%62 = inttoptr i64 %61 to i32*, !insn.addr !342
%63 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %62, i32* %arg3), !insn.addr !342
%64 = trunc i64 %63 to i8, !insn.addr !343
%65 = icmp eq i8 %64, 0, !insn.addr !343
br i1 %65, label %dec_label_pc_1289, label %dec_label_pc_1187, !insn.addr !344
dec_label_pc_1187: ; preds = %dec_label_pc_115a
%66 = load i64, i64* %stack_var_-80, align 8
store i64 %66, i64* %stack_var_-72, align 8, !insn.addr !345
%67 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_rightmostEv(i64* %result), !insn.addr !346
%68 = inttoptr i64 %67 to i64*, !insn.addr !347
%69 = load i64, i64* %68, align 8, !insn.addr !347
%70 = icmp eq i64 %66, %69, !insn.addr !348
%71 = icmp eq i1 %70, false, !insn.addr !349
br i1 %71, label %dec_label_pc_11e3, label %dec_label_pc_11ac, !insn.addr !350
dec_label_pc_11ac: ; preds = %dec_label_pc_1187
%72 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_rightmostEv(i64* %result), !insn.addr !351
store i64 0, i64* %stack_var_-64, align 8, !insn.addr !352
%73 = bitcast i64* %stack_var_-64 to i64**, !insn.addr !353
%74 = inttoptr i64 %72 to i64***, !insn.addr !353
%75 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEERKS1_OT_(i64* nonnull %stack_var_-56, i64** nonnull %73, i64*** %74), !insn.addr !353
%76 = load i64, i64* %stack_var_-56, align 8, !insn.addr !354
store i64 %76, i64* %rax.0.reg2mem, !insn.addr !355
br label %dec_label_pc_12b0, !insn.addr !355
dec_label_pc_11e3: ; preds = %dec_label_pc_1187
%77 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEppEv(i64* nonnull %stack_var_-72), !insn.addr !356
%78 = inttoptr i64 %77 to i64*, !insn.addr !357
%79 = load i64, i64* %78, align 8, !insn.addr !357
%80 = inttoptr i64 %79 to i64*, !insn.addr !358
%81 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %80), !insn.addr !358
%82 = inttoptr i64 %81 to i32*, !insn.addr !359
%83 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %arg3, i32* %82), !insn.addr !359
%84 = trunc i64 %83 to i8, !insn.addr !360
%85 = icmp eq i8 %84, 0, !insn.addr !360
br i1 %85, label %dec_label_pc_1274, label %dec_label_pc_1214, !insn.addr !361
dec_label_pc_1214: ; preds = %dec_label_pc_11e3
%86 = load i64, i64* %stack_var_-80, align 8, !insn.addr !362
%87 = inttoptr i64 %86 to i64*, !insn.addr !363
%88 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPSt18_Rb_tree_node_base(i64* %87), !insn.addr !363
%89 = icmp eq i64 %88, 0, !insn.addr !364
%90 = icmp eq i1 %89, false, !insn.addr !365
br i1 %90, label %dec_label_pc_1253, label %dec_label_pc_122a, !insn.addr !366
dec_label_pc_122a: ; preds = %dec_label_pc_1214
store i64 0, i64* %stack_var_-64, align 8, !insn.addr !367
%91 = bitcast i64* %stack_var_-64 to i64**, !insn.addr !368
%92 = bitcast i64* %stack_var_-80 to i64***, !insn.addr !368
%93 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEERKS1_OT_(i64* nonnull %stack_var_-56, i64** nonnull %91, i64*** nonnull %92), !insn.addr !368
%94 = load i64, i64* %stack_var_-56, align 8, !insn.addr !369
store i64 %94, i64* %rax.0.reg2mem, !insn.addr !370
br label %dec_label_pc_12b0, !insn.addr !370
dec_label_pc_1253: ; preds = %dec_label_pc_1214
%95 = bitcast i64* %stack_var_-72 to i64***, !insn.addr !371
%96 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_S4_Lb1EEEOT_OT0_(i64* nonnull %stack_var_-56, i64*** nonnull %95, i64*** nonnull %95), !insn.addr !371
%97 = load i64, i64* %stack_var_-56, align 8, !insn.addr !372
store i64 %97, i64* %rax.0.reg2mem, !insn.addr !373
br label %dec_label_pc_12b0, !insn.addr !373
dec_label_pc_1274: ; preds = %dec_label_pc_11e3
%98 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE24_M_get_insert_unique_posERS1_(i64* %result, i32* %arg3), !insn.addr !374
store i64 %98, i64* %rax.0.reg2mem, !insn.addr !375
br label %dec_label_pc_12b0, !insn.addr !375
dec_label_pc_1289: ; preds = %dec_label_pc_115a
store i64 0, i64* %stack_var_-64, align 8, !insn.addr !376
%99 = bitcast i64* %stack_var_-80 to i64***, !insn.addr !377
%100 = bitcast i64* %stack_var_-64 to i64**, !insn.addr !377
%101 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEEOT_RKS1_(i64* nonnull %stack_var_-56, i64*** nonnull %99, i64** nonnull %100), !insn.addr !377
%102 = load i64, i64* %stack_var_-56, align 8, !insn.addr !378
store i64 %102, i64* %rax.0.reg2mem, !insn.addr !379
br label %dec_label_pc_12b0, !insn.addr !379
dec_label_pc_12b0: ; preds = %dec_label_pc_1289, %dec_label_pc_1274, %dec_label_pc_1253, %dec_label_pc_122a, %dec_label_pc_11ac, %dec_label_pc_1142, %dec_label_pc_111e, %dec_label_pc_10f2, %dec_label_pc_106b, %dec_label_pc_fc4, %dec_label_pc_fcd
%rax.0.reload = load i64, i64* %rax.0.reg2mem
%103 = call i64 @__readfsqword(i64 40), !insn.addr !380
%104 = icmp eq i64 %0, %103, !insn.addr !380
store i64 %rax.0.reload, i64* %rax.1.reg2mem, !insn.addr !381
br i1 %104, label %dec_label_pc_12c4, label %dec_label_pc_12bf, !insn.addr !381
dec_label_pc_12bf: ; preds = %dec_label_pc_12b0
%105 = call i64 @__stack_chk_fail(), !insn.addr !382
store i64 %105, i64* %rax.1.reg2mem, !insn.addr !382
br label %dec_label_pc_12c4, !insn.addr !382
dec_label_pc_12c4: ; preds = %dec_label_pc_12bf, %dec_label_pc_12b0
%rax.1.reload = load i64, i64* %rax.1.reg2mem
ret i64 %rax.1.reload, !insn.addr !383
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt13_Rb_tree_nodeIS3_E(i64* %arg1) local_unnamed_addr {
dec_label_pc_12cb:
%rax.0.reg2mem = alloca i64, !insn.addr !384
%stack_var_-17 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !385
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_valueEPKSt13_Rb_tree_nodeIS3_E(i64* %arg1), !insn.addr !386
%2 = inttoptr i64 %1 to i64*, !insn.addr !387
%3 = call i64 @_ZNKSt10_Select1stISt4pairIKiPcEEclERKS3_(i64* nonnull %stack_var_-17, i64* %2), !insn.addr !387
%4 = call i64 @__readfsqword(i64 40), !insn.addr !388
%5 = icmp eq i64 %0, %4, !insn.addr !388
store i64 %3, i64* %rax.0.reg2mem, !insn.addr !389
br i1 %5, label %dec_label_pc_1318, label %dec_label_pc_1313, !insn.addr !389
dec_label_pc_1313: ; preds = %dec_label_pc_12cb
%6 = call i64 @__stack_chk_fail(), !insn.addr !390
store i64 %6, i64* %rax.0.reg2mem, !insn.addr !390
br label %dec_label_pc_1318, !insn.addr !390
dec_label_pc_1318: ; preds = %dec_label_pc_1313, %dec_label_pc_12cb
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !391
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_insert_nodeEPSt18_Rb_tree_node_baseSB_PSt13_Rb_tree_nodeIS3_E(i64* %result, i64* %arg2, i64* %arg3, i64* %arg4) local_unnamed_addr {
dec_label_pc_131a:
%rax.0.reg2mem = alloca i64, !insn.addr !392
%storemerge.reg2mem = alloca i1, !insn.addr !392
%stack_var_-40 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !393
%1 = icmp eq i64* %arg2, null, !insn.addr !394
%2 = icmp eq i1 %1, false, !insn.addr !395
store i1 true, i1* %storemerge.reg2mem, !insn.addr !395
br i1 %2, label %dec_label_pc_139a, label %dec_label_pc_134b, !insn.addr !395
dec_label_pc_134b: ; preds = %dec_label_pc_131a
%3 = ptrtoint i64* %arg3 to i64
%4 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_M_endEv(i64* %result), !insn.addr !396
%5 = icmp eq i64 %4, %3, !insn.addr !397
store i1 true, i1* %storemerge.reg2mem, !insn.addr !398
br i1 %5, label %dec_label_pc_139a, label %dec_label_pc_135d, !insn.addr !398
dec_label_pc_135d: ; preds = %dec_label_pc_134b
%6 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %arg3), !insn.addr !399
%7 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt13_Rb_tree_nodeIS3_E(i64* %arg4), !insn.addr !400
%8 = inttoptr i64 %7 to i32*, !insn.addr !401
%9 = inttoptr i64 %6 to i32*, !insn.addr !401
%10 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %8, i32* %9), !insn.addr !401
%11 = trunc i64 %10 to i8, !insn.addr !402
%12 = icmp ne i8 %11, 0, !insn.addr !402
store i1 %12, i1* %storemerge.reg2mem
br label %dec_label_pc_139a
dec_label_pc_139a: ; preds = %dec_label_pc_135d, %dec_label_pc_131a, %dec_label_pc_134b
%13 = ptrtoint i64* %result to i64
%storemerge.reload = load i1, i1* %storemerge.reg2mem
%14 = add i64 %13, 8, !insn.addr !403
%15 = inttoptr i64 %14 to i64*, !insn.addr !404
%16 = call i64 @_ZSt29_Rb_tree_insert_and_rebalancebPSt18_Rb_tree_node_baseS0_RS_(i1 %storemerge.reload, i64* %arg4, i64* %arg3, i64* %15), !insn.addr !404
%17 = add i64 %13, 40, !insn.addr !405
%18 = inttoptr i64 %17 to i64*, !insn.addr !405
%19 = load i64, i64* %18, align 8, !insn.addr !405
%20 = add i64 %19, 1, !insn.addr !406
store i64 %20, i64* %18, align 8, !insn.addr !407
%21 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-40, i64* %arg4), !insn.addr !408
%22 = load i64, i64* %stack_var_-40, align 8, !insn.addr !409
%23 = call i64 @__readfsqword(i64 40), !insn.addr !410
%24 = icmp eq i64 %0, %23, !insn.addr !410
store i64 %22, i64* %rax.0.reg2mem, !insn.addr !411
br i1 %24, label %dec_label_pc_13f7, label %dec_label_pc_13f2, !insn.addr !411
dec_label_pc_13f2: ; preds = %dec_label_pc_139a
%25 = call i64 @__stack_chk_fail(), !insn.addr !412
store i64 %25, i64* %rax.0.reg2mem, !insn.addr !412
br label %dec_label_pc_13f7, !insn.addr !412
dec_label_pc_13f7: ; preds = %dec_label_pc_13f2, %dec_label_pc_139a
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !413
}
define i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC1EPSt18_Rb_tree_node_base(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_1400:
%0 = ptrtoint i64* %arg2 to i64
%1 = ptrtoint i64* %result to i64
store i64 %0, i64* %result, align 8, !insn.addr !414
ret i64 %1, !insn.addr !415
}
define i64 @_ZN9__gnu_cxx14__alloc_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE17_S_select_on_copyERKS7_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_141a:
%rax.0.reg2mem = alloca i64, !insn.addr !416
%0 = ptrtoint i64* %result to i64
%1 = call i64 @__readfsqword(i64 40), !insn.addr !417
%2 = call i64 @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE37select_on_container_copy_constructionERKS6_(i64* %result, i64* %arg2), !insn.addr !418
%3 = call i64 @__readfsqword(i64 40), !insn.addr !419
%4 = icmp eq i64 %1, %3, !insn.addr !419
store i64 %0, i64* %rax.0.reg2mem, !insn.addr !420
br i1 %4, label %dec_label_pc_1464, label %dec_label_pc_145f, !insn.addr !420
dec_label_pc_145f: ; preds = %dec_label_pc_141a
%5 = call i64 @__stack_chk_fail(), !insn.addr !421
store i64 %5, i64* %rax.0.reg2mem, !insn.addr !421
br label %dec_label_pc_1464, !insn.addr !421
dec_label_pc_1464: ; preds = %dec_label_pc_145f, %dec_label_pc_141a
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !422
}
define i64 @_ZNSaISt13_Rb_tree_nodeISt4pairIKiPcEEEC1ERKS5_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_1466:
%0 = call i64 @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEEC1ERKS7_(i64* %result, i64* %arg2), !insn.addr !423
ret i64 %0, !insn.addr !424
}
define i64 @_ZNSt20_Rb_tree_key_compareISt4lessIiEEC1ERKS1_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_148c:
%0 = alloca i64
%1 = load i64, i64* %0
ret i64 %1, !insn.addr !425
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_Alloc_nodeC1ERS9_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_149c:
%0 = ptrtoint i64* %arg2 to i64
%1 = ptrtoint i64* %result to i64
store i64 %0, i64* %result, align 8, !insn.addr !426
ret i64 %1, !insn.addr !427
}
define i64* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_M_copyINS9_11_Alloc_nodeEEEPSt13_Rb_tree_nodeIS3_ERKS9_RT_(i64* %result, i64* %arg2, i64* %arg3) local_unnamed_addr {
dec_label_pc_14b6:
%0 = ptrtoint i64* %arg2 to i64
%1 = ptrtoint i64* %result to i64
%2 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_M_endEv(i64* %result), !insn.addr !428
%3 = call i64 @_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_M_beginEv(i64* %arg2), !insn.addr !429
%4 = inttoptr i64 %3 to i64*, !insn.addr !430
%5 = inttoptr i64 %2 to i64*, !insn.addr !430
%6 = call i64* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_M_copyINS9_11_Alloc_nodeEEEPSt13_Rb_tree_nodeIS3_EPKSD_PSt18_Rb_tree_node_baseRT_(i64* %result, i64* %4, i64* %5, i64* %arg3), !insn.addr !430
%7 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_leftmostEv(i64* %result), !insn.addr !431
%8 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE10_S_minimumEPSt18_Rb_tree_node_base(i64* %6), !insn.addr !432
%9 = inttoptr i64 %7 to i64*, !insn.addr !433
store i64 %8, i64* %9, align 8, !insn.addr !433
%10 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_rightmostEv(i64* %result), !insn.addr !434
%11 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE10_S_maximumEPSt18_Rb_tree_node_base(i64* %6), !insn.addr !435
%12 = inttoptr i64 %10 to i64*, !insn.addr !436
store i64 %11, i64* %12, align 8, !insn.addr !436
%13 = add i64 %0, 40, !insn.addr !437
%14 = inttoptr i64 %13 to i64*, !insn.addr !437
%15 = load i64, i64* %14, align 8, !insn.addr !437
%16 = add i64 %1, 40, !insn.addr !438
%17 = inttoptr i64 %16 to i64*, !insn.addr !438
store i64 %15, i64* %17, align 8, !insn.addr !438
ret i64* %6, !insn.addr !439
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE15_M_destroy_nodeEPSt13_Rb_tree_nodeIS3_E(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_155a:
%0 = call i64 @_ZNSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(i64* %arg2), !insn.addr !440
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE21_M_get_Node_allocatorEv(i64* %result), !insn.addr !441
%2 = inttoptr i64 %1 to i64*, !insn.addr !442
%3 = inttoptr i64 %0 to i64*, !insn.addr !442
call void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE7destroyIS4_EEvRS6_PT_(i64* %2, i64* %3), !insn.addr !442
ret i64 ptrtoint (i32* @0 to i64), !insn.addr !443
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_put_nodeEPSt13_Rb_tree_nodeIS3_E(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_159a:
%0 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE21_M_get_Node_allocatorEv(i64* %result), !insn.addr !444
%1 = inttoptr i64 %0 to i64*, !insn.addr !445
%2 = call i64 @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE10deallocateERS6_PS5_m(i64* %1, i64* %arg2, i64 1), !insn.addr !445
ret i64 %2, !insn.addr !446
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_M_endEv(i64* %result) local_unnamed_addr {
dec_label_pc_15d0:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 8, !insn.addr !447
ret i64 %1, !insn.addr !448
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_lower_boundEPSt13_Rb_tree_nodeIS3_EPSt18_Rb_tree_node_baseRS1_(i64* %result, i64* %arg2, i64* %arg3, i32* %arg4) local_unnamed_addr {
dec_label_pc_15e2:
%rax.0.reg2mem = alloca i64, !insn.addr !449
%stack_var_-64.0.ph.lcssa.reg2mem = alloca i64, !insn.addr !449
%stack_var_-56.03.reg2mem = alloca i64, !insn.addr !449
%stack_var_-56.0.ph5.reg2mem = alloca i64, !insn.addr !449
%stack_var_-64.0.ph6.reg2mem = alloca i64, !insn.addr !449
%0 = ptrtoint i64* %arg3 to i64
%stack_var_-40 = alloca i64, align 8
%1 = call i64 @__readfsqword(i64 40), !insn.addr !450
%2 = icmp eq i64* %arg2, null, !insn.addr !451
store i64 %0, i64* %stack_var_-64.0.ph.lcssa.reg2mem, !insn.addr !452
br i1 %2, label %dec_label_pc_1669, label %dec_label_pc_1611.lr.ph.lr.ph, !insn.addr !452
dec_label_pc_1611.lr.ph.lr.ph: ; preds = %dec_label_pc_15e2
%3 = ptrtoint i64* %arg2 to i64
store i64 %0, i64* %stack_var_-64.0.ph6.reg2mem
store i64 %3, i64* %stack_var_-56.0.ph5.reg2mem
br label %dec_label_pc_1611.lr.ph
dec_label_pc_1611.lr.ph: ; preds = %dec_label_pc_1611.lr.ph.lr.ph, %dec_label_pc_163d
%stack_var_-56.0.ph5.reload = load i64, i64* %stack_var_-56.0.ph5.reg2mem
%stack_var_-64.0.ph6.reload = load i64, i64* %stack_var_-64.0.ph6.reg2mem
store i64 %stack_var_-56.0.ph5.reload, i64* %stack_var_-56.03.reg2mem
br label %dec_label_pc_1611
dec_label_pc_1611: ; preds = %dec_label_pc_1611.lr.ph, %dec_label_pc_1657
%stack_var_-56.03.reload = load i64, i64* %stack_var_-56.03.reg2mem
%4 = inttoptr i64 %stack_var_-56.03.reload to i64*
%5 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt13_Rb_tree_nodeIS3_E(i64* %4), !insn.addr !453
%6 = inttoptr i64 %5 to i32*, !insn.addr !454
%7 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %6, i32* %arg4), !insn.addr !454
%8 = trunc i64 %7 to i8
%9 = icmp eq i8 %8, 1, !insn.addr !455
br i1 %9, label %dec_label_pc_1657, label %dec_label_pc_163d, !insn.addr !456
dec_label_pc_163d: ; preds = %dec_label_pc_1611
%10 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_S_leftEPSt18_Rb_tree_node_base(i64* %4), !insn.addr !457
%11 = icmp eq i64 %10, 0, !insn.addr !451
store i64 %stack_var_-56.03.reload, i64* %stack_var_-64.0.ph6.reg2mem, !insn.addr !452
store i64 %10, i64* %stack_var_-56.0.ph5.reg2mem, !insn.addr !452
store i64 %stack_var_-56.03.reload, i64* %stack_var_-64.0.ph.lcssa.reg2mem, !insn.addr !452
br i1 %11, label %dec_label_pc_1669, label %dec_label_pc_1611.lr.ph, !insn.addr !452
dec_label_pc_1657: ; preds = %dec_label_pc_1611
%12 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPSt18_Rb_tree_node_base(i64* %4), !insn.addr !458
%13 = icmp eq i64 %12, 0, !insn.addr !451
store i64 %12, i64* %stack_var_-56.03.reg2mem, !insn.addr !452
store i64 %stack_var_-64.0.ph6.reload, i64* %stack_var_-64.0.ph.lcssa.reg2mem, !insn.addr !452
br i1 %13, label %dec_label_pc_1669, label %dec_label_pc_1611, !insn.addr !452
dec_label_pc_1669: ; preds = %dec_label_pc_163d, %dec_label_pc_1657, %dec_label_pc_15e2
%stack_var_-64.0.ph.lcssa.reload = load i64, i64* %stack_var_-64.0.ph.lcssa.reg2mem
%14 = inttoptr i64 %stack_var_-64.0.ph.lcssa.reload to i64*, !insn.addr !459
%15 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-40, i64* %14), !insn.addr !459
%16 = load i64, i64* %stack_var_-40, align 8, !insn.addr !460
%17 = call i64 @__readfsqword(i64 40), !insn.addr !461
%18 = icmp eq i64 %1, %17, !insn.addr !461
store i64 %16, i64* %rax.0.reg2mem, !insn.addr !462
br i1 %18, label %dec_label_pc_1694, label %dec_label_pc_168f, !insn.addr !462
dec_label_pc_168f: ; preds = %dec_label_pc_1669
%19 = call i64 @__stack_chk_fail(), !insn.addr !463
store i64 %19, i64* %rax.0.reg2mem, !insn.addr !463
br label %dec_label_pc_1694, !insn.addr !463
dec_label_pc_1694: ; preds = %dec_label_pc_168f, %dec_label_pc_1669
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !464
}
define i64 @_ZN9__gnu_cxx16__aligned_membufISt4pairIKiPcEE6_M_ptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_169c:
%0 = call i64 @_ZN9__gnu_cxx16__aligned_membufISt4pairIKiPcEE7_M_addrEv(i64* %result), !insn.addr !465
ret i64 %0, !insn.addr !466
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_get_nodeEv(i64* %result) local_unnamed_addr {
dec_label_pc_16b6:
%0 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE21_M_get_Node_allocatorEv(i64* %result), !insn.addr !467
%1 = inttoptr i64 %0 to i64*, !insn.addr !468
%2 = call i64 @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE8allocateERS6_m(i64* %1, i64 1), !insn.addr !468
ret i64 %2, !insn.addr !469
}
define void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE17_M_construct_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESE_IJEEEEEvPSt13_Rb_tree_nodeIS3_EDpOT_(i64 %arg1, i64 %arg2, i64 %arg3, i64 %arg4, i64 %arg5) local_unnamed_addr {
dec_label_pc_16de:
%0 = inttoptr i64 %arg2 to i64*, !insn.addr !470
%1 = call i64 @_ZnwmPv(i64 48, i64* %0), !insn.addr !470
%2 = inttoptr i64 %arg5 to i64*, !insn.addr !471
%3 = call i64* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(i64* %2), !insn.addr !471
%4 = ptrtoint i64* %3 to i64, !insn.addr !471
%5 = inttoptr i64 %arg4 to i64*, !insn.addr !472
%6 = call i64* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(i64* %5), !insn.addr !472
%7 = inttoptr i64 %arg3 to i64*, !insn.addr !473
%8 = call i64** @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(i64* %7), !insn.addr !473
%9 = call i64 @_ZNSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(i64* %0), !insn.addr !474
%10 = inttoptr i64 %arg1 to i64*, !insn.addr !475
%11 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE21_M_get_Node_allocatorEv(i64* %10), !insn.addr !475
%12 = inttoptr i64 %11 to i64*, !insn.addr !476
%13 = inttoptr i64 %9 to i64*, !insn.addr !476
%14 = bitcast i64** %8 to i64*, !insn.addr !476
call void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE9constructIS4_JRKSt21piecewise_construct_tSt5tupleIJOiEESC_IJEEEEEvRS6_PT_DpOT0_(i64* %12, i64* %13, i64* %14, i64* %6, i64 %4), !insn.addr !476
ret void, !insn.addr !477
}
define i64 @_ZNKSt23_Rb_tree_const_iteratorISt4pairIKiPcEE13_M_const_castEv(i64* %result) local_unnamed_addr {
dec_label_pc_17b4:
%rax.0.reg2mem = alloca i64, !insn.addr !478
%stack_var_-24 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !479
%1 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-24, i64* %result), !insn.addr !480
%2 = load i64, i64* %stack_var_-24, align 8, !insn.addr !481
%3 = call i64 @__readfsqword(i64 40), !insn.addr !482
%4 = icmp eq i64 %0, %3, !insn.addr !482
store i64 %2, i64* %rax.0.reg2mem, !insn.addr !483
br i1 %4, label %dec_label_pc_17fd, label %dec_label_pc_17f8, !insn.addr !483
dec_label_pc_17f8: ; preds = %dec_label_pc_17b4
%5 = call i64 @__stack_chk_fail(), !insn.addr !484
store i64 %5, i64* %rax.0.reg2mem, !insn.addr !484
br label %dec_label_pc_17fd, !insn.addr !484
dec_label_pc_17fd: ; preds = %dec_label_pc_17f8, %dec_label_pc_17b4
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !485
}
define i64 @_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE4sizeEv(i64* %result) local_unnamed_addr {
dec_label_pc_1800:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 40, !insn.addr !486
%2 = inttoptr i64 %1 to i64*, !insn.addr !486
%3 = load i64, i64* %2, align 8, !insn.addr !486
ret i64 %3, !insn.addr !487
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_rightmostEv(i64* %result) local_unnamed_addr {
dec_label_pc_1812:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 32, !insn.addr !488
ret i64 %1, !insn.addr !489
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %arg1) local_unnamed_addr {
dec_label_pc_1824:
%rax.0.reg2mem = alloca i64, !insn.addr !490
%stack_var_-17 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !491
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_valueEPKSt18_Rb_tree_node_base(i64* %arg1), !insn.addr !492
%2 = inttoptr i64 %1 to i64*, !insn.addr !493
%3 = call i64 @_ZNKSt10_Select1stISt4pairIKiPcEEclERKS3_(i64* nonnull %stack_var_-17, i64* %2), !insn.addr !493
%4 = call i64 @__readfsqword(i64 40), !insn.addr !494
%5 = icmp eq i64 %0, %4, !insn.addr !494
store i64 %3, i64* %rax.0.reg2mem, !insn.addr !495
br i1 %5, label %dec_label_pc_1871, label %dec_label_pc_186c, !insn.addr !495
dec_label_pc_186c: ; preds = %dec_label_pc_1824
%6 = call i64 @__stack_chk_fail(), !insn.addr !496
store i64 %6, i64* %rax.0.reg2mem, !insn.addr !496
br label %dec_label_pc_1871, !insn.addr !496
dec_label_pc_1871: ; preds = %dec_label_pc_186c, %dec_label_pc_1824
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !497
}
define i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRPSt13_Rb_tree_nodeIS_IKiPcEERS1_Lb1EEEOT_OT0_(i64* %result, i64*** %arg2, i64*** %arg3) local_unnamed_addr {
dec_label_pc_1874:
%0 = ptrtoint i64* %result to i64
%1 = bitcast i64*** %arg2 to i64*, !insn.addr !498
%2 = call i64*** @_ZSt7forwardIRPSt13_Rb_tree_nodeISt4pairIKiPcEEEOT_RNSt16remove_referenceIS8_E4typeE(i64* %1), !insn.addr !498
%3 = load i64**, i64*** %2, align 8, !insn.addr !499
%4 = ptrtoint i64** %3 to i64, !insn.addr !499
store i64 %4, i64* %result, align 8, !insn.addr !500
%5 = bitcast i64*** %arg3 to i64*, !insn.addr !501
%6 = call i64*** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(i64* %5), !insn.addr !501
%7 = load i64**, i64*** %6, align 8, !insn.addr !502
%8 = ptrtoint i64** %7 to i64, !insn.addr !502
%9 = add i64 %0, 8, !insn.addr !503
%10 = inttoptr i64 %9 to i64*, !insn.addr !503
store i64 %8, i64* %10, align 8, !insn.addr !503
ret i64 %0, !insn.addr !504
}
define i64*** @_ZSt7forwardIRPSt13_Rb_tree_nodeISt4pairIKiPcEEEOT_RNSt16remove_referenceIS8_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_18b8:
%0 = bitcast i64* %arg1 to i64***, !insn.addr !505
ret i64*** %0, !insn.addr !505
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE24_M_get_insert_unique_posERS1_(i64* %result, i32* %arg2) local_unnamed_addr {
dec_label_pc_18c6:
%rax.1.reg2mem = alloca i64, !insn.addr !506
%storemerge.reg2mem = alloca i64, !insn.addr !506
%.reg2mem = alloca i64, !insn.addr !506
%stack_var_-64 = alloca i64, align 8
%stack_var_-56 = alloca i64, align 8
%stack_var_-72 = alloca i64, align 8
%stack_var_-80 = alloca i64, align 8
%stack_var_-88 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !507
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_M_beginEv(i64* %result)
store i64 %1, i64* %stack_var_-88, align 8, !insn.addr !508
%2 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_M_endEv(i64* %result), !insn.addr !509
store i64 %2, i64* %stack_var_-80, align 8, !insn.addr !510
%3 = icmp eq i64 %1, 0, !insn.addr !511
store i64 %1, i64* %.reg2mem, !insn.addr !512
br i1 %3, label %dec_label_pc_1966.thread, label %dec_label_pc_1913, !insn.addr !512
dec_label_pc_1966.thread: ; preds = %dec_label_pc_18c6
%4 = inttoptr i64 %2 to i64*, !insn.addr !513
%5 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-72, i64* %4), !insn.addr !513
br label %dec_label_pc_197f
dec_label_pc_1913: ; preds = %dec_label_pc_18c6, %dec_label_pc_1960
%.reload = load i64, i64* %.reg2mem
store i64 %.reload, i64* %stack_var_-80, align 8, !insn.addr !514
%6 = inttoptr i64 %.reload to i64*, !insn.addr !515
%7 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt13_Rb_tree_nodeIS3_E(i64* %6), !insn.addr !515
%8 = inttoptr i64 %7 to i32*, !insn.addr !516
%9 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %arg2, i32* %8), !insn.addr !516
%10 = trunc i64 %9 to i8
%11 = icmp eq i8 %10, 0
%12 = load i64, i64* %stack_var_-88, align 8
%13 = inttoptr i64 %12 to i64*
br i1 %11, label %dec_label_pc_1954, label %dec_label_pc_1946, !insn.addr !517
dec_label_pc_1946: ; preds = %dec_label_pc_1913
%14 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_S_leftEPSt18_Rb_tree_node_base(i64* %13), !insn.addr !518
store i64 %14, i64* %storemerge.reg2mem, !insn.addr !519
br label %dec_label_pc_1960, !insn.addr !519
dec_label_pc_1954: ; preds = %dec_label_pc_1913
%15 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPSt18_Rb_tree_node_base(i64* %13), !insn.addr !520
store i64 %15, i64* %storemerge.reg2mem, !insn.addr !520
br label %dec_label_pc_1960, !insn.addr !520
dec_label_pc_1960: ; preds = %dec_label_pc_1954, %dec_label_pc_1946
%storemerge.reload = load i64, i64* %storemerge.reg2mem
store i64 %storemerge.reload, i64* %stack_var_-88, align 8, !insn.addr !521
%16 = icmp eq i64 %storemerge.reload, 0, !insn.addr !511
store i64 %storemerge.reload, i64* %.reg2mem, !insn.addr !512
br i1 %16, label %dec_label_pc_1966, label %dec_label_pc_1913, !insn.addr !512
dec_label_pc_1966: ; preds = %dec_label_pc_1960
%.pre = load i64, i64* %stack_var_-80, align 8
%17 = inttoptr i64 %.pre to i64*, !insn.addr !513
%18 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-72, i64* %17), !insn.addr !513
br i1 %11, label %dec_label_pc_19d3, label %dec_label_pc_197f, !insn.addr !522
dec_label_pc_197f: ; preds = %dec_label_pc_1966.thread, %dec_label_pc_1966
%19 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE5beginEv(i64* %result), !insn.addr !523
store i64 %19, i64* %stack_var_-56, align 8, !insn.addr !524
%20 = call i64 @_ZNKSt17_Rb_tree_iteratorISt4pairIKiPcEEeqERKS4_(i64* nonnull %stack_var_-72, i64* nonnull %stack_var_-56), !insn.addr !525
%21 = trunc i64 %20 to i8, !insn.addr !526
%22 = icmp eq i8 %21, 0, !insn.addr !526
br i1 %22, label %dec_label_pc_19c7, label %dec_label_pc_19a6, !insn.addr !527
dec_label_pc_19a6: ; preds = %dec_label_pc_197f
%23 = bitcast i64* %stack_var_-88 to i64***, !insn.addr !528
%24 = bitcast i64* %stack_var_-80 to i64***, !insn.addr !528
%25 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRPSt13_Rb_tree_nodeIS_IKiPcEERS1_Lb1EEEOT_OT0_(i64* nonnull %stack_var_-56, i64*** nonnull %23, i64*** nonnull %24), !insn.addr !528
br label %dec_label_pc_1a44, !insn.addr !529
dec_label_pc_19c7: ; preds = %dec_label_pc_197f
%26 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEmmEv(i64* nonnull %stack_var_-72), !insn.addr !530
br label %dec_label_pc_19d3, !insn.addr !530
dec_label_pc_19d3: ; preds = %dec_label_pc_19c7, %dec_label_pc_1966
%27 = load i64, i64* %stack_var_-72, align 8, !insn.addr !531
%28 = inttoptr i64 %27 to i64*, !insn.addr !532
%29 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %28), !insn.addr !532
%30 = inttoptr i64 %29 to i32*, !insn.addr !533
%31 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %30, i32* %arg2), !insn.addr !533
%32 = trunc i64 %31 to i8, !insn.addr !534
%33 = icmp eq i8 %32, 0, !insn.addr !534
br i1 %33, label %dec_label_pc_1a1d, label %dec_label_pc_19fc, !insn.addr !535
dec_label_pc_19fc: ; preds = %dec_label_pc_19d3
%34 = bitcast i64* %stack_var_-88 to i64***, !insn.addr !536
%35 = bitcast i64* %stack_var_-80 to i64***, !insn.addr !536
%36 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRPSt13_Rb_tree_nodeIS_IKiPcEERS1_Lb1EEEOT_OT0_(i64* nonnull %stack_var_-56, i64*** nonnull %34, i64*** nonnull %35), !insn.addr !536
br label %dec_label_pc_1a44, !insn.addr !537
dec_label_pc_1a1d: ; preds = %dec_label_pc_19d3
store i64 0, i64* %stack_var_-64, align 8, !insn.addr !538
%37 = bitcast i64* %stack_var_-72 to i64***, !insn.addr !539
%38 = bitcast i64* %stack_var_-64 to i64**, !insn.addr !539
%39 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEEOT_RKS1_(i64* nonnull %stack_var_-56, i64*** nonnull %37, i64** nonnull %38), !insn.addr !539
br label %dec_label_pc_1a44, !insn.addr !540
dec_label_pc_1a44: ; preds = %dec_label_pc_1a1d, %dec_label_pc_19fc, %dec_label_pc_19a6
%rax.0 = load i64, i64* %stack_var_-56, align 8
%40 = call i64 @__readfsqword(i64 40), !insn.addr !541
%41 = icmp eq i64 %0, %40, !insn.addr !541
store i64 %rax.0, i64* %rax.1.reg2mem, !insn.addr !542
br i1 %41, label %dec_label_pc_1a58, label %dec_label_pc_1a53, !insn.addr !542
dec_label_pc_1a53: ; preds = %dec_label_pc_1a44
%42 = call i64 @__stack_chk_fail(), !insn.addr !543
store i64 %42, i64* %rax.1.reg2mem, !insn.addr !543
br label %dec_label_pc_1a58, !insn.addr !543
dec_label_pc_1a58: ; preds = %dec_label_pc_1a53, %dec_label_pc_1a44
%rax.1.reload = load i64, i64* %rax.1.reg2mem
ret i64 %rax.1.reload, !insn.addr !544
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_leftmostEv(i64* %result) local_unnamed_addr {
dec_label_pc_1a60:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 24, !insn.addr !545
ret i64 %1, !insn.addr !546
}
define i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEmmEv(i64* %result) local_unnamed_addr {
dec_label_pc_1a72:
%0 = ptrtoint i64* %result to i64
%1 = call i64 @_ZSt18_Rb_tree_decrementPSt18_Rb_tree_node_base(i64* %result), !insn.addr !547
store i64 %1, i64* %result, align 8, !insn.addr !548
ret i64 %0, !insn.addr !549
}
define i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEppEv(i64* %result) local_unnamed_addr {
dec_label_pc_1a9e:
%0 = ptrtoint i64* %result to i64
%1 = call i64 @_ZSt18_Rb_tree_incrementPSt18_Rb_tree_node_base(i64* %result), !insn.addr !550
store i64 %1, i64* %result, align 8, !insn.addr !551
ret i64 %0, !insn.addr !552
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_valueEPKSt13_Rb_tree_nodeIS3_E(i64* %arg1) local_unnamed_addr {
dec_label_pc_1ac9:
%0 = call i64 @_ZNKSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(i64* %arg1), !insn.addr !553
ret i64 %0, !insn.addr !554
}
define i64 @_ZNKSt10_Select1stISt4pairIKiPcEEclERKS3_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_1ae4:
%0 = ptrtoint i64* %arg2 to i64
ret i64 %0, !insn.addr !555
}
define i64 @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE37select_on_container_copy_constructionERKS6_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_1af6:
%0 = ptrtoint i64* %result to i64
%1 = call i64 @_ZNSaISt13_Rb_tree_nodeISt4pairIKiPcEEEC1ERKS5_(i64* %result, i64* %arg2), !insn.addr !556
ret i64 %0, !insn.addr !557
}
define i64 @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEEC1ERKS7_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_1b20:
%0 = alloca i64
%1 = load i64, i64* %0
ret i64 %1, !insn.addr !558
}
define i64 @_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_M_beginEv(i64* %result) local_unnamed_addr {
dec_label_pc_1b30:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, ptrtoint ([3 x i8]* @global_var_10 to i64), !insn.addr !559
%2 = inttoptr i64 %1 to i64*, !insn.addr !559
%3 = load i64, i64* %2, align 8, !insn.addr !559
ret i64 %3, !insn.addr !560
}
define i64* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_M_copyINS9_11_Alloc_nodeEEEPSt13_Rb_tree_nodeIS3_EPKSD_PSt18_Rb_tree_node_baseRT_(i64* %result, i64* %arg2, i64* %arg3, i64* %arg4) local_unnamed_addr {
dec_label_pc_1b42:
%stack_var_-64.01.reg2mem = alloca i64, !insn.addr !561
%storemerge2.reg2mem = alloca i64, !insn.addr !561
%0 = ptrtoint i64* %arg3 to i64
%1 = ptrtoint i64* %arg2 to i64
%2 = call i64* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE13_M_clone_nodeINS9_11_Alloc_nodeEEEPSt13_Rb_tree_nodeIS3_EPKSD_RT_(i64* %result, i64* %arg2, i64* %arg4), !insn.addr !562
%3 = ptrtoint i64* %2 to i64, !insn.addr !562
%4 = add i64 %3, 8, !insn.addr !563
%5 = inttoptr i64 %4 to i64*, !insn.addr !563
store i64 %0, i64* %5, align 8, !insn.addr !563
%6 = add i64 %1, 24, !insn.addr !564
%7 = inttoptr i64 %6 to i64*, !insn.addr !564
%8 = load i64, i64* %7, align 8, !insn.addr !564
%9 = icmp eq i64 %8, 0, !insn.addr !565
br i1 %9, label %dec_label_pc_1bbd, label %dec_label_pc_1b8f, !insn.addr !566
dec_label_pc_1b8f: ; preds = %dec_label_pc_1b42
%10 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPKSt18_Rb_tree_node_base(i64* %arg2), !insn.addr !567
%11 = inttoptr i64 %10 to i64*, !insn.addr !568
%12 = call i64* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_M_copyINS9_11_Alloc_nodeEEEPSt13_Rb_tree_nodeIS3_EPKSD_PSt18_Rb_tree_node_baseRT_(i64* %result, i64* %11, i64* %2, i64* %arg4), !insn.addr !568
%13 = ptrtoint i64* %12 to i64, !insn.addr !568
%14 = add i64 %3, 24, !insn.addr !569
%15 = inttoptr i64 %14 to i64*, !insn.addr !569
store i64 %13, i64* %15, align 8, !insn.addr !569
br label %dec_label_pc_1bbd, !insn.addr !569
dec_label_pc_1bbd: ; preds = %dec_label_pc_1b8f, %dec_label_pc_1b42
%16 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_S_leftEPKSt18_Rb_tree_node_base(i64* %arg2), !insn.addr !570
%17 = icmp eq i64 %16, 0, !insn.addr !571
store i64 %16, i64* %storemerge2.reg2mem, !insn.addr !572
store i64 %3, i64* %stack_var_-64.01.reg2mem, !insn.addr !572
br i1 %17, label %dec_label_pc_1c6b, label %dec_label_pc_1be0, !insn.addr !572
dec_label_pc_1be0: ; preds = %dec_label_pc_1bbd, %dec_label_pc_1c4e
%stack_var_-64.01.reload = load i64, i64* %stack_var_-64.01.reg2mem
%storemerge2.reload = load i64, i64* %storemerge2.reg2mem
%18 = inttoptr i64 %storemerge2.reload to i64*, !insn.addr !573
%19 = call i64* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE13_M_clone_nodeINS9_11_Alloc_nodeEEEPSt13_Rb_tree_nodeIS3_EPKSD_RT_(i64* %result, i64* %18, i64* %arg4), !insn.addr !573
%20 = ptrtoint i64* %19 to i64, !insn.addr !573
%21 = add i64 %stack_var_-64.01.reload, ptrtoint ([3 x i8]* @global_var_10 to i64), !insn.addr !574
%22 = inttoptr i64 %21 to i64*, !insn.addr !574
store i64 %20, i64* %22, align 8, !insn.addr !574
%23 = add i64 %20, 8, !insn.addr !575
%24 = inttoptr i64 %23 to i64*, !insn.addr !575
store i64 %stack_var_-64.01.reload, i64* %24, align 8, !insn.addr !575
%25 = add i64 %storemerge2.reload, 24, !insn.addr !576
%26 = inttoptr i64 %25 to i64*, !insn.addr !576
%27 = load i64, i64* %26, align 8, !insn.addr !576
%28 = icmp eq i64 %27, 0, !insn.addr !577
br i1 %28, label %dec_label_pc_1c4e, label %dec_label_pc_1c20, !insn.addr !578
dec_label_pc_1c20: ; preds = %dec_label_pc_1be0
%29 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPKSt18_Rb_tree_node_base(i64* %18), !insn.addr !579
%30 = inttoptr i64 %29 to i64*, !insn.addr !580
%31 = call i64* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_M_copyINS9_11_Alloc_nodeEEEPSt13_Rb_tree_nodeIS3_EPKSD_PSt18_Rb_tree_node_baseRT_(i64* %result, i64* %30, i64* %19, i64* %arg4), !insn.addr !580
%32 = ptrtoint i64* %31 to i64, !insn.addr !580
%33 = add i64 %20, 24, !insn.addr !581
%34 = inttoptr i64 %33 to i64*, !insn.addr !581
store i64 %32, i64* %34, align 8, !insn.addr !581
br label %dec_label_pc_1c4e, !insn.addr !581
dec_label_pc_1c4e: ; preds = %dec_label_pc_1c20, %dec_label_pc_1be0
%35 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_S_leftEPKSt18_Rb_tree_node_base(i64* %18), !insn.addr !582
%36 = icmp eq i64 %35, 0, !insn.addr !571
store i64 %35, i64* %storemerge2.reg2mem, !insn.addr !572
store i64 %20, i64* %stack_var_-64.01.reg2mem, !insn.addr !572
br i1 %36, label %dec_label_pc_1c6b, label %dec_label_pc_1be0, !insn.addr !572
dec_label_pc_1c6b: ; preds = %dec_label_pc_1c4e, %dec_label_pc_1bbd
ret i64* %2, !insn.addr !583
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE10_S_minimumEPSt18_Rb_tree_node_base(i64* %arg1) local_unnamed_addr {
dec_label_pc_1cab:
%0 = call i64 @_ZNSt18_Rb_tree_node_base10_S_minimumEPS_(i64* %arg1), !insn.addr !584
ret i64 %0, !insn.addr !585
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE10_S_maximumEPSt18_Rb_tree_node_base(i64* %arg1) local_unnamed_addr {
dec_label_pc_1cc5:
%0 = call i64 @_ZNSt18_Rb_tree_node_base10_S_maximumEPS_(i64* %arg1), !insn.addr !586
ret i64 %0, !insn.addr !587
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE21_M_get_Node_allocatorEv(i64* %result) local_unnamed_addr {
dec_label_pc_1ce0:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !588
}
define void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE7destroyIS4_EEvRS6_PT_(i64* %arg1, i64* %arg2) local_unnamed_addr {
dec_label_pc_1cee:
call void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE7destroyIS5_EEvPT_(i64* %arg1, i64* %arg2), !insn.addr !589
ret void, !insn.addr !590
}
define i64 @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE10deallocateERS6_PS5_m(i64* %arg1, i64* %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_1d14:
%0 = call i64 @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE10deallocateEPS6_m(i64* %arg1, i64* %arg2, i64 %arg3), !insn.addr !591
ret i64 %0, !insn.addr !592
}
define i64 @_ZN9__gnu_cxx16__aligned_membufISt4pairIKiPcEE7_M_addrEv(i64* %result) local_unnamed_addr {
dec_label_pc_1d42:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !593
}
define i64 @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE8allocateERS6_m(i64* %arg1, i64 %arg2) local_unnamed_addr {
dec_label_pc_1d50:
%0 = call i64 @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE8allocateEmPKv(i64* %arg1, i64 %arg2, i64* null), !insn.addr !594
ret i64 %0, !insn.addr !595
}
define void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE9constructIS4_JRKSt21piecewise_construct_tSt5tupleIJOiEESC_IJEEEEEvRS6_PT_DpOT0_(i64* %this, i64* %result, i64* %arg3, i64* %arg4, i64 %arg5) local_unnamed_addr {
dec_label_pc_1d7a:
%0 = ptrtoint i64* %result to i64
%1 = ptrtoint i64* %this to i64
%2 = inttoptr i64 %arg5 to i64*, !insn.addr !596
%3 = call i64* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(i64* %2), !insn.addr !596
%4 = ptrtoint i64* %3 to i64, !insn.addr !596
%5 = call i64* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(i64* %arg4), !insn.addr !597
%6 = ptrtoint i64* %5 to i64, !insn.addr !597
%7 = call i64** @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(i64* %arg3), !insn.addr !598
%8 = ptrtoint i64** %7 to i64, !insn.addr !598
call void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE9constructIS5_JRKSt21piecewise_construct_tSt5tupleIJOiEESC_IJEEEEEvPT_DpOT0_(i64 %1, i64 %0, i64 %8, i64 %6, i64 %4), !insn.addr !599
ret void, !insn.addr !600
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_valueEPKSt18_Rb_tree_node_base(i64* %arg1) local_unnamed_addr {
dec_label_pc_1de6:
%0 = call i64 @_ZNKSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(i64* %arg1), !insn.addr !601
ret i64 %0, !insn.addr !602
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE5beginEv(i64* %result) local_unnamed_addr {
dec_label_pc_1e00:
%rax.0.reg2mem = alloca i64, !insn.addr !603
%0 = ptrtoint i64* %result to i64
%stack_var_-24 = alloca i64, align 8
%1 = call i64 @__readfsqword(i64 40), !insn.addr !604
%2 = add i64 %0, 24, !insn.addr !605
%3 = inttoptr i64 %2 to i64*, !insn.addr !605
%4 = load i64, i64* %3, align 8, !insn.addr !605
%5 = inttoptr i64 %4 to i64*, !insn.addr !606
%6 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-24, i64* %5), !insn.addr !606
%7 = load i64, i64* %stack_var_-24, align 8, !insn.addr !607
%8 = call i64 @__readfsqword(i64 40), !insn.addr !608
%9 = icmp eq i64 %1, %8, !insn.addr !608
store i64 %7, i64* %rax.0.reg2mem, !insn.addr !609
br i1 %9, label %dec_label_pc_1e4a, label %dec_label_pc_1e45, !insn.addr !609
dec_label_pc_1e45: ; preds = %dec_label_pc_1e00
%10 = call i64 @__stack_chk_fail(), !insn.addr !610
store i64 %10, i64* %rax.0.reg2mem, !insn.addr !610
br label %dec_label_pc_1e4a, !insn.addr !610
dec_label_pc_1e4a: ; preds = %dec_label_pc_1e45, %dec_label_pc_1e00
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !611
}
define i64 @_ZNKSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_1e4c:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 32, !insn.addr !612
%2 = inttoptr i64 %1 to i64*, !insn.addr !613
%3 = call i64 @_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiPcEE6_M_ptrEv(i64* %2), !insn.addr !613
ret i64 %3, !insn.addr !614
}
define i64* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE13_M_clone_nodeINS9_11_Alloc_nodeEEEPSt13_Rb_tree_nodeIS3_EPKSD_RT_(i64* %result, i64* %arg2, i64* %arg3) local_unnamed_addr {
dec_label_pc_1e6a:
%0 = alloca i64
%1 = load i64, i64* %0
%2 = call i64 @_ZNKSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(i64* %arg2), !insn.addr !615
%3 = inttoptr i64 %2 to i64**, !insn.addr !616
%4 = call i64* @_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_Alloc_nodeclIRKS3_EEPSt13_Rb_tree_nodeIS3_EOT_(i64* %arg3, i64** %3), !insn.addr !616
%5 = ptrtoint i64* %4 to i64, !insn.addr !616
%6 = trunc i64 %1 to i32
%7 = bitcast i64* %4 to i32*, !insn.addr !617
store i32 %6, i32* %7, align 4, !insn.addr !617
%8 = add i64 %5, ptrtoint ([3 x i8]* @global_var_10 to i64), !insn.addr !618
%9 = inttoptr i64 %8 to i64*, !insn.addr !618
store i64 0, i64* %9, align 8, !insn.addr !618
%10 = add i64 %5, 24, !insn.addr !619
%11 = inttoptr i64 %10 to i64*, !insn.addr !619
store i64 0, i64* %11, align 8, !insn.addr !619
ret i64* %4, !insn.addr !620
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPKSt18_Rb_tree_node_base(i64* %arg1) local_unnamed_addr {
dec_label_pc_1eca:
%0 = ptrtoint i64* %arg1 to i64
%1 = add i64 %0, 24, !insn.addr !621
%2 = inttoptr i64 %1 to i64*, !insn.addr !621
%3 = load i64, i64* %2, align 8, !insn.addr !621
ret i64 %3, !insn.addr !622
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_S_leftEPKSt18_Rb_tree_node_base(i64* %arg1) local_unnamed_addr {
dec_label_pc_1edc:
%0 = ptrtoint i64* %arg1 to i64
%1 = add i64 %0, ptrtoint ([3 x i8]* @global_var_10 to i64), !insn.addr !623
%2 = inttoptr i64 %1 to i64*, !insn.addr !623
%3 = load i64, i64* %2, align 8, !insn.addr !623
ret i64 %3, !insn.addr !624
}
define void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE7destroyIS5_EEvPT_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_1eee:
ret void, !insn.addr !625
}
define i64 @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE10deallocateEPS6_m(i64* %result, i64* %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_1efe:
%0 = call i64 @_ZdlPv(i64* %arg2), !insn.addr !626
ret i64 %0, !insn.addr !627
}
define i64 @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE8allocateEmPKv(i64* %result, i64 %arg2, i64* %arg3) local_unnamed_addr {
dec_label_pc_1f22:
%0 = call i64 @_ZNK9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE8max_sizeEv(i64* %result), !insn.addr !628
%1 = icmp uge i64 %0, %arg2
%2 = icmp ne i1 %1, true, !insn.addr !629
%3 = icmp eq i1 %2, false, !insn.addr !630
br i1 %3, label %dec_label_pc_1f52, label %dec_label_pc_1f4d, !insn.addr !631
dec_label_pc_1f4d: ; preds = %dec_label_pc_1f22
%4 = call i64 @_ZSt17__throw_bad_allocv(), !insn.addr !632
br label %dec_label_pc_1f52, !insn.addr !632
dec_label_pc_1f52: ; preds = %dec_label_pc_1f4d, %dec_label_pc_1f22
%5 = mul i64 %arg2, 48, !insn.addr !633
%6 = call i64 @_Znwm(i64 %5), !insn.addr !634
ret i64 %6, !insn.addr !635
}
define void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE9constructIS5_JRKSt21piecewise_construct_tSt5tupleIJOiEESC_IJEEEEEvPT_DpOT0_(i64 %arg1, i64 %arg2, i64 %arg3, i64 %arg4, i64 %arg5) local_unnamed_addr {
dec_label_pc_1f6e:
%0 = alloca i64
%1 = load i64, i64* %0
%stack_var_-56 = alloca i64, align 8
%2 = call i64 @__readfsqword(i64 40), !insn.addr !636
%3 = inttoptr i64 %arg3 to i64*, !insn.addr !637
%4 = call i64** @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(i64* %3), !insn.addr !637
%5 = inttoptr i64 %arg4 to i64*, !insn.addr !638
%6 = call i64* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(i64* %5), !insn.addr !638
%7 = call i64 @_ZNSt5tupleIJOiEEC1EOS1_(i64* nonnull %stack_var_-56, i64* %6), !insn.addr !639
%8 = inttoptr i64 %arg5 to i64*, !insn.addr !640
%9 = call i64* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(i64* %8), !insn.addr !640
%10 = inttoptr i64 %arg2 to i64*, !insn.addr !641
%11 = call i64 @_ZnwmPv(i64 ptrtoint ([3 x i8]* @global_var_10 to i64), i64* %10), !insn.addr !641
%12 = icmp eq i64 %11, 0, !insn.addr !642
br i1 %12, label %dec_label_pc_2025, label %dec_label_pc_1ff1, !insn.addr !643
dec_label_pc_1ff1: ; preds = %dec_label_pc_1f6e
%13 = ptrtoint i64* %6 to i64, !insn.addr !638
%14 = call i64 @_ZNSt4pairIKiPcEC1IJOiEJEEESt21piecewise_construct_tSt5tupleIJDpT_EES6_IJDpT0_EE(i64 %11, i64* nonnull %stack_var_-56, i64 %13, i64 %arg4, i64 %arg5, i64 %1), !insn.addr !644
br label %dec_label_pc_2025, !insn.addr !645
dec_label_pc_2025: ; preds = %dec_label_pc_1ff1, %dec_label_pc_1f6e
%15 = call i64 @__readfsqword(i64 40), !insn.addr !646
%16 = icmp eq i64 %2, %15, !insn.addr !646
br i1 %16, label %dec_label_pc_203a, label %dec_label_pc_2035, !insn.addr !647
dec_label_pc_2035: ; preds = %dec_label_pc_2025
%17 = call i64 @__stack_chk_fail(), !insn.addr !648
br label %dec_label_pc_203a, !insn.addr !648
dec_label_pc_203a: ; preds = %dec_label_pc_2035, %dec_label_pc_2025
ret void, !insn.addr !649
}
define i64 @_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiPcEE6_M_ptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_2046:
%0 = call i64 @_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiPcEE7_M_addrEv(i64* %result), !insn.addr !650
ret i64 %0, !insn.addr !651
}
define i64** @_ZSt7forwardIRKSt4pairIKiPcEEOT_RNSt16remove_referenceIS6_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_2060:
%0 = bitcast i64* %arg1 to i64**, !insn.addr !652
ret i64** %0, !insn.addr !652
}
define i64* @_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_Alloc_nodeclIRKS3_EEPSt13_Rb_tree_nodeIS3_EOT_(i64* %result, i64** %arg2) local_unnamed_addr {
dec_label_pc_206e:
%0 = bitcast i64** %arg2 to i64*
%1 = call i64** @_ZSt7forwardIRKSt4pairIKiPcEEOT_RNSt16remove_referenceIS6_E4typeE(i64* %0), !insn.addr !653
%2 = ptrtoint i64** %1 to i64, !insn.addr !653
%3 = call i64* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_create_nodeIJRKS3_EEEPSt13_Rb_tree_nodeIS3_EDpOT_(i64* %result, i64 %2), !insn.addr !654
ret i64* %3, !insn.addr !655
}
define i64 @_ZNK9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE8max_sizeEv(i64* %result) local_unnamed_addr {
dec_label_pc_20a4:
ret i64 384307168202282325, !insn.addr !656
}
define i64 @_ZNSt4pairIKiPcEC1IJOiEJEEESt21piecewise_construct_tSt5tupleIJDpT_EES6_IJDpT0_EE(i64 %arg1, i64* %arg2, i64 %arg3, i64 %arg4, i64 %arg5, i64 %arg6) local_unnamed_addr {
dec_label_pc_20b8:
%rax.0.reg2mem = alloca i64, !insn.addr !657
%stack_var_16 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !658
%1 = ptrtoint i64* %stack_var_16 to i64, !insn.addr !659
%2 = inttoptr i64 %arg1 to i64*, !insn.addr !660
%3 = call i64 @_ZNSt4pairIKiPcEC1IJOiEJLm0EEJEJEEERSt5tupleIJDpT_EERS5_IJDpT1_EESt12_Index_tupleIJXspT0_EEESE_IJXspT2_EEE(i64* %2, i64* %arg2, i64 %1, i64 ptrtoint (i32* @0 to i64)), !insn.addr !660
%4 = call i64 @__readfsqword(i64 40), !insn.addr !661
%5 = icmp eq i64 %0, %4, !insn.addr !661
store i64 0, i64* %rax.0.reg2mem, !insn.addr !662
br i1 %5, label %dec_label_pc_210b, label %dec_label_pc_2106, !insn.addr !662
dec_label_pc_2106: ; preds = %dec_label_pc_20b8
%6 = call i64 @__stack_chk_fail(), !insn.addr !663
store i64 %6, i64* %rax.0.reg2mem, !insn.addr !663
br label %dec_label_pc_210b, !insn.addr !663
dec_label_pc_210b: ; preds = %dec_label_pc_2106, %dec_label_pc_20b8
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !664
}
define i64 @_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiPcEE7_M_addrEv(i64* %result) local_unnamed_addr {
dec_label_pc_210e:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !665
}
define i64* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_create_nodeIJRKS3_EEEPSt13_Rb_tree_nodeIS3_EDpOT_(i64* %result, i64 %arg2) local_unnamed_addr {
dec_label_pc_211c:
%0 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_get_nodeEv(i64* %result), !insn.addr !666
%1 = inttoptr i64 %arg2 to i64*, !insn.addr !667
%2 = call i64** @_ZSt7forwardIRKSt4pairIKiPcEEOT_RNSt16remove_referenceIS6_E4typeE(i64* %1), !insn.addr !667
%3 = ptrtoint i64** %2 to i64, !insn.addr !667
%4 = inttoptr i64 %0 to i64*, !insn.addr !668
call void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE17_M_construct_nodeIJRKS3_EEEvPSt13_Rb_tree_nodeIS3_EDpOT_(i64* %result, i64* %4, i64 %3), !insn.addr !668
ret i64* %4, !insn.addr !669
}
define i64* @_ZSt3getILm0EJOiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS5_(i64* %arg1) local_unnamed_addr {
dec_label_pc_2164:
%0 = call i32** @_ZSt12__get_helperILm0EOiJEERT0_RSt11_Tuple_implIXT_EJS1_DpT1_EE(i64* %arg1), !insn.addr !670
%1 = bitcast i32** %0 to i64*, !insn.addr !671
ret i64* %1, !insn.addr !671
}
define i32** @_ZSt12__get_helperILm0EOiJEERT0_RSt11_Tuple_implIXT_EJS1_DpT1_EE(i64* %arg1) local_unnamed_addr {
dec_label_pc_217e:
%0 = call i64 @_ZNSt11_Tuple_implILm0EJOiEE7_M_headERS1_(i64* %arg1), !insn.addr !672
%1 = inttoptr i64 %0 to i32**, !insn.addr !673
ret i32** %1, !insn.addr !673
}
define i64 @_ZNSt4pairIKiPcEC1IJOiEJLm0EEJEJEEERSt5tupleIJDpT_EERS5_IJDpT1_EESt12_Index_tupleIJXspT0_EEESE_IJXspT2_EEE(i64* %arg1, i64* %arg2, i64 %arg3, i64 %arg4) local_unnamed_addr {
dec_label_pc_2198:
%0 = ptrtoint i64* %arg1 to i64
%1 = call i64* @_ZSt3getILm0EJOiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS5_(i64* %arg2), !insn.addr !674
%2 = call i32** @_ZSt7forwardIOiEOT_RNSt16remove_referenceIS1_E4typeE(i64* %1), !insn.addr !675
%3 = bitcast i32** %2 to i32*, !insn.addr !676
%4 = load i32, i32* %3, align 4, !insn.addr !676
%5 = bitcast i64* %arg1 to i32*, !insn.addr !677
store i32 %4, i32* %5, align 4, !insn.addr !677
%6 = add i64 %0, 8, !insn.addr !678
%7 = inttoptr i64 %6 to i64*, !insn.addr !678
store i64 0, i64* %7, align 8, !insn.addr !678
ret i64 %0, !insn.addr !679
}
define void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE17_M_construct_nodeIJRKS3_EEEvPSt13_Rb_tree_nodeIS3_EDpOT_(i64* %result, i64* %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_21d8:
%0 = call i64 @_ZnwmPv(i64 48, i64* %arg2), !insn.addr !680
%1 = inttoptr i64 %arg3 to i64*, !insn.addr !681
%2 = call i64** @_ZSt7forwardIRKSt4pairIKiPcEEOT_RNSt16remove_referenceIS6_E4typeE(i64* %1), !insn.addr !681
%3 = ptrtoint i64** %2 to i64, !insn.addr !681
%4 = call i64 @_ZNSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(i64* %arg2), !insn.addr !682
%5 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE21_M_get_Node_allocatorEv(i64* %result), !insn.addr !683
%6 = inttoptr i64 %5 to i64*, !insn.addr !684
%7 = inttoptr i64 %4 to i64*, !insn.addr !684
call void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE9constructIS4_JRKS4_EEEvRS6_PT_DpOT0_(i64* %6, i64* %7, i64 %3), !insn.addr !684
ret void, !insn.addr !685
}
define void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE9constructIS4_JRKS4_EEEvRS6_PT_DpOT0_(i64* %arg1, i64* %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_2279:
%0 = inttoptr i64 %arg3 to i64*, !insn.addr !686
%1 = call i64** @_ZSt7forwardIRKSt4pairIKiPcEEOT_RNSt16remove_referenceIS6_E4typeE(i64* %0), !insn.addr !686
%2 = ptrtoint i64** %1 to i64, !insn.addr !686
call void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE9constructIS5_JRKS5_EEEvPT_DpOT0_(i64* %arg1, i64* %arg2, i64 %2), !insn.addr !687
ret void, !insn.addr !688
}
define void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE9constructIS5_JRKS5_EEEvPT_DpOT0_(i64* %result, i64* %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_22b2:
%0 = inttoptr i64 %arg3 to i64*, !insn.addr !689
%1 = call i64** @_ZSt7forwardIRKSt4pairIKiPcEEOT_RNSt16remove_referenceIS6_E4typeE(i64* %0), !insn.addr !689
%2 = call i64 @_ZnwmPv(i64 ptrtoint ([3 x i8]* @global_var_10 to i64), i64* %arg2), !insn.addr !690
%3 = icmp eq i64 %2, 0, !insn.addr !691
br i1 %3, label %dec_label_pc_22fd, label %dec_label_pc_22ef, !insn.addr !692
dec_label_pc_22ef: ; preds = %dec_label_pc_22b2
%4 = ptrtoint i64** %1 to i64, !insn.addr !689
%5 = load i64*, i64** %1, align 8
%6 = ptrtoint i64* %5 to i64
%7 = add i64 %4, 8, !insn.addr !693
%8 = inttoptr i64 %7 to i64*, !insn.addr !693
%9 = load i64, i64* %8, align 8, !insn.addr !693
%10 = inttoptr i64 %2 to i64*, !insn.addr !694
store i64 %6, i64* %10, align 8, !insn.addr !694
%11 = add i64 %2, 8, !insn.addr !695
%12 = inttoptr i64 %11 to i64*, !insn.addr !695
store i64 %9, i64* %12, align 8, !insn.addr !695
br label %dec_label_pc_22fd, !insn.addr !695
dec_label_pc_22fd: ; preds = %dec_label_pc_22ef, %dec_label_pc_22b2
ret void, !insn.addr !696
}
declare i64 @_ZN63CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_ncat_747badSinkESt3mapIiPcSt4lessIiESaISt4pairIKiS1_EEE(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @_ZN63CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_ncat_7411goodG2BSinkESt3mapIiPcSt4lessIiESaISt4pairIKiS1_EEE(i64) local_unnamed_addr
declare i64 @_ZSt29_Rb_tree_insert_and_rebalancebPSt18_Rb_tree_node_baseS0_RS_(i1, i64*, i64*, i64*) local_unnamed_addr
declare i64 @_ZSt18_Rb_tree_decrementPSt18_Rb_tree_node_base(i64*) local_unnamed_addr
declare i64 @_ZSt18_Rb_tree_incrementPSt18_Rb_tree_node_base(i64*) local_unnamed_addr
declare i64 @_ZdlPv(i64*) local_unnamed_addr
declare i64 @_ZSt17__throw_bad_allocv() local_unnamed_addr
declare i64 @_Znwm(i64) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 12}
!1 = !{i64 27}
!2 = !{i64 34}
!3 = !{i64 53}
!4 = !{i64 60}
!5 = !{i64 63}
!6 = !{i64 80}
!7 = !{i64 93}
!8 = !{i64 101}
!9 = !{i64 108}
!10 = !{i64 111}
!11 = !{i64 141}
!12 = !{i64 149}
!13 = !{i64 156}
!14 = !{i64 159}
!15 = !{i64 189}
!16 = !{i64 197}
!17 = !{i64 204}
!18 = !{i64 227}
!19 = !{i64 242}
!20 = !{i64 257}
!21 = !{i64 272}
!22 = !{i64 278}
!23 = !{i64 282}
!24 = !{i64 291}
!25 = !{i64 344}
!26 = !{i64 358}
!27 = !{i64 359}
!28 = !{i64 371}
!29 = !{i64 396}
!30 = !{i64 405}
!31 = !{i64 419}
!32 = !{i64 422}
!33 = !{i64 452}
!34 = !{i64 467}
!35 = !{i64 470}
!36 = !{i64 500}
!37 = !{i64 515}
!38 = !{i64 518}
!39 = !{i64 548}
!40 = !{i64 563}
!41 = !{i64 586}
!42 = !{i64 598}
!43 = !{i64 601}
!44 = !{i64 616}
!45 = !{i64 631}
!46 = !{i64 641}
!47 = !{i64 650}
!48 = !{i64 703}
!49 = !{i64 717}
!50 = !{i64 722}
!51 = !{i64 729}
!52 = !{i64 747}
!53 = !{i64 762}
!54 = !{i64 766}
!55 = !{i64 770}
!56 = !{i64 778}
!57 = !{i64 782}
!58 = !{i64 785}
!59 = !{i64 806}
!60 = !{i64 807}
!61 = !{i64 811}
!62 = !{i64 819}
!63 = !{i64 823}
!64 = !{i64 826}
!65 = !{i64 847}
!66 = !{i64 864}
!67 = !{i64 877}
!68 = !{i64 884}
!69 = !{i64 898}
!70 = !{i64 914}
!71 = !{i64 926}
!72 = !{i64 934}
!73 = !{i64 944}
!74 = !{i64 965}
!75 = !{i64 977}
!76 = !{i64 986}
!77 = !{i64 993}
!78 = !{i64 1000}
!79 = !{i64 1021}
!80 = !{i64 1028}
!81 = !{i64 1049}
!82 = !{i64 1056}
!83 = !{i64 1077}
!84 = !{i64 1084}
!85 = !{i64 1105}
!86 = !{i64 1112}
!87 = !{i64 1144}
!88 = !{i64 1151}
!89 = !{i64 1383}
!90 = !{i64 1390}
!91 = !{i64 1411}
!92 = !{i64 1418}
!93 = !{i64 1430}
!94 = !{i64 1451}
!95 = !{i64 1469}
!96 = !{i64 1481}
!97 = !{i64 1488}
!98 = !{i64 1502}
!99 = !{i64 1516}
!100 = !{i64 1546}
!101 = !{i64 1557}
!102 = !{i64 1569}
!103 = !{i64 1598}
!104 = !{i64 1609}
!105 = !{i64 1621}
!106 = !{i64 1645}
!107 = !{i64 1657}
!108 = !{i64 1662}
!109 = !{i64 1694}
!110 = !{i64 1701}
!111 = !{i64 1725}
!112 = !{i64 1743}
!113 = !{i64 1753}
!114 = !{i64 1754}
!115 = !{i64 1771}
!116 = !{i64 1800}
!117 = !{i64 1805}
!118 = !{i64 1816}
!119 = !{i64 1821}
!120 = !{i64 1839}
!121 = !{i64 1844}
!122 = !{i64 1846}
!123 = !{i64 1855}
!124 = !{i64 1867}
!125 = !{i64 1889}
!126 = !{i64 1894}
!127 = !{i64 1912}
!128 = !{i64 1925}
!129 = !{i64 1943}
!130 = !{i64 1962}
!131 = !{i64 1975}
!132 = !{i64 1998}
!133 = !{i64 2003}
!134 = !{i64 2014}
!135 = !{i64 2019}
!136 = !{i64 2027}
!137 = !{i64 2036}
!138 = !{i64 2038}
!139 = !{i64 2049}
!140 = !{i64 2050}
!141 = !{i64 2081}
!142 = !{i64 2093}
!143 = !{i64 2098}
!144 = !{i64 2101}
!145 = !{i64 2104}
!146 = !{i64 2106}
!147 = !{i64 2115}
!148 = !{i64 2137}
!149 = !{i64 2142}
!150 = !{i64 2145}
!151 = !{i64 2180}
!152 = !{i64 2192}
!153 = !{i64 2204}
!154 = !{i64 2206}
!155 = !{i64 2222}
!156 = !{i64 2227}
!157 = !{i64 2236}
!158 = !{i64 2254}
!159 = !{i64 2266}
!160 = !{i64 2289}
!161 = !{i64 2306}
!162 = !{i64 2320}
!163 = !{i64 2325}
!164 = !{i64 2356}
!165 = !{i64 2362}
!166 = !{i64 2383}
!167 = !{i64 2389}
!168 = !{i64 2416}
!169 = !{i64 2419}
!170 = !{i64 2423}
!171 = !{i64 2444}
!172 = !{i64 2449}
!173 = !{i64 2457}
!174 = !{i64 2480}
!175 = !{i64 2486}
!176 = !{i64 2516}
!177 = !{i64 2518}
!178 = !{i64 2522}
!179 = !{i64 2547}
!180 = !{i64 2552}
!181 = !{i64 2572}
!182 = !{i64 2578}
!183 = !{i64 2595}
!184 = !{i64 2609}
!185 = !{i64 2638}
!186 = !{i64 2646}
!187 = !{i64 2657}
!188 = !{i64 2669}
!189 = !{i64 2683}
!190 = !{i64 2697}
!191 = !{i64 2711}
!192 = !{i64 2712}
!193 = !{i64 2743}
!194 = !{i64 2765}
!195 = !{i64 2780}
!196 = !{i64 2795}
!197 = !{i64 2816}
!198 = !{i64 2832}
!199 = !{i64 2854}
!200 = !{i64 2871}
!201 = !{i64 2874}
!202 = !{i64 2895}
!203 = !{i64 2900}
!204 = !{i64 2916}
!205 = !{i64 2935}
!206 = !{i64 2940}
!207 = !{i64 2948}
!208 = !{i64 2957}
!209 = !{i64 3012}
!210 = !{i64 3025}
!211 = !{i64 3026}
!212 = !{i64 3042}
!213 = !{i64 3071}
!214 = !{i64 3090}
!215 = !{i64 3099}
!216 = !{i64 3106}
!217 = !{i64 3116}
!218 = !{i64 3125}
!219 = !{i64 3127}
!220 = !{i64 3133}
!221 = !{i64 3146}
!222 = !{i64 3151}
!223 = !{i64 3164}
!224 = !{i64 3169}
!225 = !{i64 3170}
!226 = !{i64 3186}
!227 = !{i64 3215}
!228 = !{i64 3238}
!229 = !{i64 3247}
!230 = !{i64 3256}
!231 = !{i64 3258}
!232 = !{i64 3264}
!233 = !{i64 3277}
!234 = !{i64 3282}
!235 = !{i64 3295}
!236 = !{i64 3300}
!237 = !{i64 3332}
!238 = !{i64 3351}
!239 = !{i64 3358}
!240 = !{i64 3384}
!241 = !{i64 3399}
!242 = !{i64 3424}
!243 = !{i64 3435}
!244 = !{i64 3436}
!245 = !{i64 3448}
!246 = !{i64 3467}
!247 = !{i64 3481}
!248 = !{i64 3486}
!249 = !{i64 3494}
!250 = !{i64 3503}
!251 = !{i64 3505}
!252 = !{i64 3511}
!253 = !{i64 3521}
!254 = !{i64 3538}
!255 = !{i64 3545}
!256 = !{i64 3551}
!257 = !{i64 3586}
!258 = !{i64 3602}
!259 = !{i64 3617}
!260 = !{i64 3632}
!261 = !{i64 3657}
!262 = !{i64 3674}
!263 = !{i64 3707}
!264 = !{i64 3717}
!265 = !{i64 3722}
!266 = !{i64 3729}
!267 = !{i64 3735}
!268 = !{i64 3749}
!269 = !{i64 3777}
!270 = !{i64 3782}
!271 = !{i64 3789}
!272 = !{i64 3799}
!273 = !{i64 3804}
!274 = !{i64 3811}
!275 = !{i64 3817}
!276 = !{i64 3845}
!277 = !{i64 3850}
!278 = !{i64 3857}
!279 = !{i64 3871}
!280 = !{i64 3877}
!281 = !{i64 3878}
!282 = !{i64 3891}
!283 = !{i64 3899}
!284 = !{i64 3921}
!285 = !{i64 3926}
!286 = !{i64 3941}
!287 = !{i64 3946}
!288 = !{i64 3952}
!289 = !{i64 3954}
!290 = !{i64 3967}
!291 = !{i64 3972}
!292 = !{i64 3975}
!293 = !{i64 3988}
!294 = !{i64 3993}
!295 = !{i64 3999}
!296 = !{i64 4020}
!297 = !{i64 4025}
!298 = !{i64 4027}
!299 = !{i64 4114}
!300 = !{i64 4119}
!301 = !{i64 4052}
!302 = !{i64 4060}
!303 = !{i64 4082}
!304 = !{i64 4087}
!305 = !{i64 4095}
!306 = !{i64 4135}
!307 = !{i64 4153}
!308 = !{i64 4158}
!309 = !{i64 4160}
!310 = !{i64 4170}
!311 = !{i64 4185}
!312 = !{i64 4190}
!313 = !{i64 4193}
!314 = !{i64 4199}
!315 = !{i64 4201}
!316 = !{i64 4210}
!317 = !{i64 4225}
!318 = !{i64 4246}
!319 = !{i64 4251}
!320 = !{i64 4259}
!321 = !{i64 4275}
!322 = !{i64 4280}
!323 = !{i64 4286}
!324 = !{i64 4307}
!325 = !{i64 4312}
!326 = !{i64 4314}
!327 = !{i64 4316}
!328 = !{i64 4323}
!329 = !{i64 4328}
!330 = !{i64 4334}
!331 = !{i64 4336}
!332 = !{i64 4338}
!333 = !{i64 4364}
!334 = !{i64 4369}
!335 = !{i64 4377}
!336 = !{i64 4400}
!337 = !{i64 4405}
!338 = !{i64 4413}
!339 = !{i64 4432}
!340 = !{i64 4437}
!341 = !{i64 4453}
!342 = !{i64 4474}
!343 = !{i64 4479}
!344 = !{i64 4481}
!345 = !{i64 4491}
!346 = !{i64 4506}
!347 = !{i64 4511}
!348 = !{i64 4514}
!349 = !{i64 4520}
!350 = !{i64 4522}
!351 = !{i64 4531}
!352 = !{i64 4539}
!353 = !{i64 4561}
!354 = !{i64 4566}
!355 = !{i64 4574}
!356 = !{i64 4590}
!357 = !{i64 4595}
!358 = !{i64 4601}
!359 = !{i64 4619}
!360 = !{i64 4624}
!361 = !{i64 4626}
!362 = !{i64 4628}
!363 = !{i64 4635}
!364 = !{i64 4640}
!365 = !{i64 4646}
!366 = !{i64 4648}
!367 = !{i64 4650}
!368 = !{i64 4676}
!369 = !{i64 4681}
!370 = !{i64 4689}
!371 = !{i64 4709}
!372 = !{i64 4714}
!373 = !{i64 4722}
!374 = !{i64 4738}
!375 = !{i64 4743}
!376 = !{i64 4745}
!377 = !{i64 4771}
!378 = !{i64 4776}
!379 = !{i64 4780}
!380 = !{i64 4788}
!381 = !{i64 4797}
!382 = !{i64 4799}
!383 = !{i64 4810}
!384 = !{i64 4811}
!385 = !{i64 4823}
!386 = !{i64 4845}
!387 = !{i64 4863}
!388 = !{i64 4872}
!389 = !{i64 4881}
!390 = !{i64 4883}
!391 = !{i64 4889}
!392 = !{i64 4890}
!393 = !{i64 4917}
!394 = !{i64 4932}
!395 = !{i64 4937}
!396 = !{i64 4946}
!397 = !{i64 4951}
!398 = !{i64 4955}
!399 = !{i64 4968}
!400 = !{i64 4983}
!401 = !{i64 4997}
!402 = !{i64 5002}
!403 = !{i64 5025}
!404 = !{i64 5043}
!405 = !{i64 5052}
!406 = !{i64 5056}
!407 = !{i64 5064}
!408 = !{i64 5082}
!409 = !{i64 5087}
!410 = !{i64 5095}
!411 = !{i64 5104}
!412 = !{i64 5106}
!413 = !{i64 5119}
!414 = !{i64 5140}
!415 = !{i64 5145}
!416 = !{i64 5146}
!417 = !{i64 5162}
!418 = !{i64 5191}
!419 = !{i64 5204}
!420 = !{i64 5213}
!421 = !{i64 5215}
!422 = !{i64 5221}
!423 = !{i64 5252}
!424 = !{i64 5259}
!425 = !{i64 5274}
!426 = !{i64 5296}
!427 = !{i64 5301}
!428 = !{i64 5330}
!429 = !{i64 5345}
!430 = !{i64 5370}
!431 = !{i64 5386}
!432 = !{i64 5401}
!433 = !{i64 5406}
!434 = !{i64 5416}
!435 = !{i64 5431}
!436 = !{i64 5436}
!437 = !{i64 5443}
!438 = !{i64 5451}
!439 = !{i64 5465}
!440 = !{i64 5490}
!441 = !{i64 5505}
!442 = !{i64 5516}
!443 = !{i64 5528}
!444 = !{i64 5553}
!445 = !{i64 5576}
!446 = !{i64 5583}
!447 = !{i64 5596}
!448 = !{i64 5601}
!449 = !{i64 5602}
!450 = !{i64 5627}
!451 = !{i64 5642}
!452 = !{i64 5647}
!453 = !{i64 5660}
!454 = !{i64 5681}
!455 = !{i64 5689}
!456 = !{i64 5691}
!457 = !{i64 5708}
!458 = !{i64 5726}
!459 = !{i64 5751}
!460 = !{i64 5756}
!461 = !{i64 5764}
!462 = !{i64 5773}
!463 = !{i64 5775}
!464 = !{i64 5786}
!465 = !{i64 5807}
!466 = !{i64 5813}
!467 = !{i64 5833}
!468 = !{i64 5846}
!469 = !{i64 5852}
!470 = !{i64 5901}
!471 = !{i64 5916}
!472 = !{i64 5931}
!473 = !{i64 5946}
!474 = !{i64 5961}
!475 = !{i64 5976}
!476 = !{i64 5996}
!477 = !{i64 6066}
!478 = !{i64 6068}
!479 = !{i64 6080}
!480 = !{i64 6112}
!481 = !{i64 6117}
!482 = !{i64 6125}
!483 = !{i64 6134}
!484 = !{i64 6136}
!485 = !{i64 6142}
!486 = !{i64 6156}
!487 = !{i64 6161}
!488 = !{i64 6174}
!489 = !{i64 6179}
!490 = !{i64 6180}
!491 = !{i64 6192}
!492 = !{i64 6214}
!493 = !{i64 6232}
!494 = !{i64 6241}
!495 = !{i64 6250}
!496 = !{i64 6252}
!497 = !{i64 6258}
!498 = !{i64 6287}
!499 = !{i64 6292}
!500 = !{i64 6299}
!501 = !{i64 6309}
!502 = !{i64 6314}
!503 = !{i64 6321}
!504 = !{i64 6327}
!505 = !{i64 6341}
!506 = !{i64 6342}
!507 = !{i64 6359}
!508 = !{i64 6386}
!509 = !{i64 6397}
!510 = !{i64 6402}
!511 = !{i64 6414}
!512 = !{i64 6417}
!513 = !{i64 6516}
!514 = !{i64 6423}
!515 = !{i64 6438}
!516 = !{i64 6456}
!517 = !{i64 6468}
!518 = !{i64 6477}
!519 = !{i64 6482}
!520 = !{i64 6491}
!521 = !{i64 6496}
!522 = !{i64 6525}
!523 = !{i64 6534}
!524 = !{i64 6539}
!525 = !{i64 6557}
!526 = !{i64 6562}
!527 = !{i64 6564}
!528 = !{i64 6584}
!529 = !{i64 6597}
!530 = !{i64 6606}
!531 = !{i64 6615}
!532 = !{i64 6622}
!533 = !{i64 6643}
!534 = !{i64 6648}
!535 = !{i64 6650}
!536 = !{i64 6670}
!537 = !{i64 6683}
!538 = !{i64 6685}
!539 = !{i64 6711}
!540 = !{i64 6720}
!541 = !{i64 6728}
!542 = !{i64 6737}
!543 = !{i64 6739}
!544 = !{i64 6750}
!545 = !{i64 6764}
!546 = !{i64 6769}
!547 = !{i64 6792}
!548 = !{i64 6804}
!549 = !{i64 6812}
!550 = !{i64 6836}
!551 = !{i64 6848}
!552 = !{i64 6856}
!553 = !{i64 6876}
!554 = !{i64 6882}
!555 = !{i64 6901}
!556 = !{i64 6932}
!557 = !{i64 6942}
!558 = !{i64 6958}
!559 = !{i64 6972}
!560 = !{i64 6977}
!561 = !{i64 6978}
!562 = !{i64 7021}
!563 = !{i64 7038}
!564 = !{i64 7046}
!565 = !{i64 7050}
!566 = !{i64 7053}
!567 = !{i64 7062}
!568 = !{i64 7085}
!569 = !{i64 7097}
!570 = !{i64 7116}
!571 = !{i64 7125}
!572 = !{i64 7130}
!573 = !{i64 7154}
!574 = !{i64 7171}
!575 = !{i64 7183}
!576 = !{i64 7191}
!577 = !{i64 7195}
!578 = !{i64 7198}
!579 = !{i64 7207}
!580 = !{i64 7230}
!581 = !{i64 7242}
!582 = !{i64 7261}
!583 = !{i64 7338}
!584 = !{i64 7358}
!585 = !{i64 7364}
!586 = !{i64 7384}
!587 = !{i64 7390}
!588 = !{i64 7405}
!589 = !{i64 7436}
!590 = !{i64 7443}
!591 = !{i64 7482}
!592 = !{i64 7489}
!593 = !{i64 7503}
!594 = !{i64 7539}
!595 = !{i64 7545}
!596 = !{i64 7584}
!597 = !{i64 7599}
!598 = !{i64 7614}
!599 = !{i64 7639}
!600 = !{i64 7653}
!601 = !{i64 7673}
!602 = !{i64 7679}
!603 = !{i64 7680}
!604 = !{i64 7692}
!605 = !{i64 7711}
!606 = !{i64 7725}
!607 = !{i64 7730}
!608 = !{i64 7738}
!609 = !{i64 7747}
!610 = !{i64 7749}
!611 = !{i64 7755}
!612 = !{i64 7772}
!613 = !{i64 7779}
!614 = !{i64 7785}
!615 = !{i64 7813}
!616 = !{i64 7831}
!617 = !{i64 7850}
!618 = !{i64 7856}
!619 = !{i64 7868}
!620 = !{i64 7881}
!621 = !{i64 7894}
!622 = !{i64 7899}
!623 = !{i64 7912}
!624 = !{i64 7917}
!625 = !{i64 7932}
!626 = !{i64 7961}
!627 = !{i64 7968}
!628 = !{i64 7997}
!629 = !{i64 8006}
!630 = !{i64 8009}
!631 = !{i64 8011}
!632 = !{i64 8013}
!633 = !{i64 8031}
!634 = !{i64 8038}
!635 = !{i64 8044}
!636 = !{i64 8079}
!637 = !{i64 8101}
!638 = !{i64 8113}
!639 = !{i64 8131}
!640 = !{i64 8147}
!641 = !{i64 8164}
!642 = !{i64 8172}
!643 = !{i64 8175}
!644 = !{i64 8193}
!645 = !{i64 8202}
!646 = !{i64 8234}
!647 = !{i64 8243}
!648 = !{i64 8245}
!649 = !{i64 8260}
!650 = !{i64 8281}
!651 = !{i64 8287}
!652 = !{i64 8301}
!653 = !{i64 8333}
!654 = !{i64 8344}
!655 = !{i64 8355}
!656 = !{i64 8375}
!657 = !{i64 8376}
!658 = !{i64 8392}
!659 = !{i64 8407}
!660 = !{i64 8429}
!661 = !{i64 8443}
!662 = !{i64 8452}
!663 = !{i64 8454}
!664 = !{i64 8460}
!665 = !{i64 8475}
!666 = !{i64 8499}
!667 = !{i64 8515}
!668 = !{i64 8537}
!669 = !{i64 8547}
!670 = !{i64 8567}
!671 = !{i64 8573}
!672 = !{i64 8593}
!673 = !{i64 8599}
!674 = !{i64 8627}
!675 = !{i64 8635}
!676 = !{i64 8640}
!677 = !{i64 8646}
!678 = !{i64 8652}
!679 = !{i64 8662}
!680 = !{i64 8699}
!681 = !{i64 8714}
!682 = !{i64 8729}
!683 = !{i64 8744}
!684 = !{i64 8758}
!685 = !{i64 8824}
!686 = !{i64 8852}
!687 = !{i64 8874}
!688 = !{i64 8881}
!689 = !{i64 8910}
!690 = !{i64 8930}
!691 = !{i64 8938}
!692 = !{i64 8941}
!693 = !{i64 8946}
!694 = !{i64 8950}
!695 = !{i64 8953}
!696 = !{i64 8964}
### Assistant: %"struct.std::piecewise_construct_t" = type { i8 }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl" = type { %"struct.std::_Rb_tree_key_compare", %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_key_compare" = type { %"struct.std::less" }
%"struct.std::less" = type { i8 }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }
%"struct.std::_Rb_tree_iterator" = type { %"struct.std::_Rb_tree_node_base"* }
%"struct.std::_Rb_tree_const_iterator" = type { %"struct.std::_Rb_tree_node_base"* }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { i32* }
%"class.std::tuple.0" = type { i8 }
%"struct.std::pair" = type { i32, i8* }
%"class.std::allocator" = type { i8 }
%"class.__gnu_cxx::new_allocator" = type { i8 }
%"struct.std::_Rb_tree_node" = type { %"struct.std::_Rb_tree_node_base", %"struct.__gnu_cxx::__aligned_membuf" }
%"struct.__gnu_cxx::__aligned_membuf" = type { [16 x i8] }
%"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node" = type { %"class.std::_Rb_tree"* }
%"struct.std::pair.1" = type { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }
%"struct.std::_Select1st" = type { i8 }
%"struct.std::_Index_tuple" = type { i8 }
%"struct.std::_Index_tuple.4" = type { i8 }
%"class.std::__pair_base" = type { i8 }
%"class.std::__pair_base.2" = type { i8 }
$_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEEC2Ev = comdat any
$_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEEixEOi = comdat any
$_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEEC2ERKS7_ = comdat any
$_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEED2Ev = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EEC2Ev = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE13_Rb_tree_implIS7_Lb1EEC2Ev = comdat any
$_ZNSaISt13_Rb_tree_nodeISt4pairIKiPcEEEC2Ev = comdat any
$_ZNSt20_Rb_tree_key_compareISt4lessIiEEC2Ev = comdat any
$_ZNSt15_Rb_tree_headerC2Ev = comdat any
$_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEEC2Ev = comdat any
$_ZNSt15_Rb_tree_header8_M_resetEv = comdat any
$__clang_call_terminate = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EEC2ERKS9_ = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE13_Rb_tree_implIS7_Lb1EEC2ERKSB_ = comdat any
$_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_M_rootEv = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_M_copyERKS9_ = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_M_rootEv = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE13_Rb_tree_implIS7_Lb1EED2Ev = comdat any
$_ZN9__gnu_cxx14__alloc_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEES6_E17_S_select_on_copyERKS7_ = comdat any
$_ZNSaISt13_Rb_tree_nodeISt4pairIKiPcEEED2Ev = comdat any
$_ZNSt20_Rb_tree_key_compareISt4lessIiEEC2ERKS1_ = comdat any
$_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE37select_on_container_copy_constructionERKS6_ = comdat any
$_ZNSaISt13_Rb_tree_nodeISt4pairIKiPcEEEC2ERKS5_ = comdat any
$_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEEC2ERKS7_ = comdat any
$_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEED2Ev = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_Alloc_nodeC2ERS9_ = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_M_copyILb0ENS9_11_Alloc_nodeEEEPSt13_Rb_tree_nodeIS3_ERKS9_RT0_ = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_M_copyILb0ENS9_11_Alloc_nodeEEEPSt13_Rb_tree_nodeIS3_ESE_PSt18_Rb_tree_node_baseRT0_ = comdat any
$_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE9_M_mbeginEv = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_M_endEv = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE10_S_minimumEPSt18_Rb_tree_node_base = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_leftmostEv = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE10_S_maximumEPSt18_Rb_tree_node_base = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_rightmostEv = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE13_M_clone_nodeILb0ENS9_11_Alloc_nodeEEEPSt13_Rb_tree_nodeIS3_ESE_RT0_ = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPSt18_Rb_tree_node_base = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_S_leftEPSt18_Rb_tree_node_base = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_M_eraseEPSt13_Rb_tree_nodeIS3_E = comdat any
$_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_Alloc_nodeclIRKS3_EEPSt13_Rb_tree_nodeIS3_EOT_ = comdat any
$_ZSt7forwardIRKSt4pairIKiPcEEOT_RNSt16remove_referenceIS6_E4typeE = comdat any
$_ZNSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_create_nodeIJRKS3_EEEPSt13_Rb_tree_nodeIS3_EDpOT_ = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_get_nodeEv = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE17_M_construct_nodeIJRKS3_EEEvPSt13_Rb_tree_nodeIS3_EDpOT_ = comdat any
$_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE8allocateERS6_m = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE21_M_get_Node_allocatorEv = comdat any
$_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE8allocateEmPKv = comdat any
$_ZNK9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE11_M_max_sizeEv = comdat any
$_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE9constructIS4_JRKS4_EEEvRS6_PT_DpOT0_ = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_put_nodeEPSt13_Rb_tree_nodeIS3_E = comdat any
$_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE9constructIS5_JRKS5_EEEvPT_DpOT0_ = comdat any
$_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE10deallocateERS6_PS5_m = comdat any
$_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE10deallocateEPS6_m = comdat any
$_ZN9__gnu_cxx16__aligned_membufISt4pairIKiPcEE6_M_ptrEv = comdat any
$_ZN9__gnu_cxx16__aligned_membufISt4pairIKiPcEE7_M_addrEv = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_drop_nodeEPSt13_Rb_tree_nodeIS3_E = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE15_M_destroy_nodeEPSt13_Rb_tree_nodeIS3_E = comdat any
$_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE7destroyIS4_EEvRS6_PT_ = comdat any
$_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE7destroyIS5_EEvPT_ = comdat any
$_ZNSt18_Rb_tree_node_base10_S_minimumEPS_ = comdat any
$_ZNSt18_Rb_tree_node_base10_S_maximumEPS_ = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EED2Ev = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_M_beginEv = comdat any
$_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE11lower_boundERS4_ = comdat any
$_ZSteqRKSt17_Rb_tree_iteratorISt4pairIKiPcEES6_ = comdat any
$_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE3endEv = comdat any
$_ZNKSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE8key_compEv = comdat any
$_ZNKSt4lessIiEclERKiS2_ = comdat any
$_ZNKSt17_Rb_tree_iteratorISt4pairIKiPcEEdeEv = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJOiEESE_IJEEEEESt17_Rb_tree_iteratorIS3_ESt23_Rb_tree_const_iteratorIS3_EDpOT_ = comdat any
$_ZNSt23_Rb_tree_const_iteratorISt4pairIKiPcEEC2ERKSt17_Rb_tree_iteratorIS3_E = comdat any
$_ZSt16forward_as_tupleIJiEESt5tupleIJDpOT_EES3_ = comdat any
$_ZSt4moveIRiEONSt16remove_referenceIT_E4typeEOS2_ = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11lower_boundERS1_ = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_lower_boundEPSt13_Rb_tree_nodeIS3_EPSt18_Rb_tree_node_baseRS1_ = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt13_Rb_tree_nodeIS3_E = comdat any
$_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC2EPSt18_Rb_tree_node_base = comdat any
$_ZNKSt10_Select1stISt4pairIKiPcEEclERKS3_ = comdat any
$_ZNKSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv = comdat any
$_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiPcEE6_M_ptrEv = comdat any
$_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiPcEE7_M_addrEv = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE3endEv = comdat any
$_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8key_compEv = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_create_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESE_IJEEEEEPSt13_Rb_tree_nodeIS3_EDpOT_ = comdat any
$_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE = comdat any
$_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE = comdat any
$_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS3_ERS1_ = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_insert_nodeEPSt18_Rb_tree_node_baseSB_PSt13_Rb_tree_nodeIS3_E = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE17_M_construct_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESE_IJEEEEEvPSt13_Rb_tree_nodeIS3_EDpOT_ = comdat any
$_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE9constructIS4_JRKSt21piecewise_construct_tSt5tupleIJOiEESC_IJEEEEEvRS6_PT_DpOT0_ = comdat any
$_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE9constructIS5_JRKSt21piecewise_construct_tSt5tupleIJOiEESC_IJEEEEEvPT_DpOT0_ = comdat any
$_ZNSt5tupleIJOiEEC2EOS1_ = comdat any
$_ZNSt4pairIKiPcEC2IJOiEJEEESt21piecewise_construct_tSt5tupleIJDpT_EES6_IJDpT0_EE = comdat any
$_ZNSt11_Tuple_implILm0EJOiEEC2EOS1_ = comdat any
$_ZNSt4pairIKiPcEC2IJOiEJLm0EEJEJEEERSt5tupleIJDpT_EERS5_IJDpT1_EESt12_Index_tupleIJXspT0_EEESE_IJXspT2_EEE = comdat any
$_ZSt7forwardIOiEOT_RNSt16remove_referenceIS1_E4typeE = comdat any
$_ZSt3getILm0EJOiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS5_ = comdat any
$_ZSt12__get_helperILm0EOiJEERT0_RSt11_Tuple_implIXT_EJS1_DpT1_EE = comdat any
$_ZNSt11_Tuple_implILm0EJOiEE7_M_headERS1_ = comdat any
$_ZNSt10_Head_baseILm0EOiLb0EE7_M_headERS1_ = comdat any
$_ZNKSt23_Rb_tree_const_iteratorISt4pairIKiPcEE13_M_const_castEv = comdat any
$_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE4sizeEv = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base = comdat any
$_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_Lb1EEERKS1_OT_ = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE24_M_get_insert_unique_posERS1_ = comdat any
$_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_S4_Lb1EEEOT_OT0_ = comdat any
$_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEmmEv = comdat any
$_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEppEv = comdat any
$_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_Lb1EEEOT_RKS1_ = comdat any
$_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE5beginEv = comdat any
$_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRPSt13_Rb_tree_nodeIS_IKiPcEERS1_Lb1EEEOT_OT0_ = comdat any
$_ZSt7forwardIRPSt13_Rb_tree_nodeISt4pairIKiPcEEEOT_RNSt16remove_referenceIS8_E4typeE = comdat any
$_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE = comdat any
$_ZNSt5tupleIJOiEEC2IJiELb1ELb1EEEDpOT_ = comdat any
$_ZNSt11_Tuple_implILm0EJOiEEC2IiEEOT_ = comdat any
$_ZNSt10_Head_baseILm0EOiLb0EEC2IiEEOT_ = comdat any
@_ZStL19piecewise_construct = internal constant %"struct.std::piecewise_construct_t" undef, align 1
; Function Attrs: noinline optnone uwtable
define dso_local void @_ZN63CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_ncat_743badEv() #0 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%data = alloca i8*, align 8
%dataMap = alloca %"class.std::map", align 8
%dataBadBuffer = alloca [50 x i8], align 16
%dataGoodBuffer = alloca [100 x i8], align 16
%ref.tmp = alloca i32, align 4
%exn.slot = alloca i8*, align 8
%ehselector.slot = alloca i32, align 4
%ref.tmp1 = alloca i32, align 4
%ref.tmp4 = alloca i32, align 4
%agg.tmp = alloca %"class.std::map", align 8
call void @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEEC2Ev(%"class.std::map"* %dataMap) #11
%arraydecay = getelementptr inbounds [50 x i8], [50 x i8]* %dataBadBuffer, i64 0, i64 0
store i8* %arraydecay, i8** %data, align 8
%0 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %0, i64 0
store i8 0, i8* %arrayidx, align 1
%1 = load i8*, i8** %data, align 8
store i32 0, i32* %ref.tmp, align 4
%call = invoke nonnull align 8 dereferenceable(8) i8** @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEEixEOi(%"class.std::map"* %dataMap, i32* nonnull align 4 dereferenceable(4) %ref.tmp)
to label %invoke.cont unwind label %lpad
invoke.cont: ; preds = %entry
store i8* %1, i8** %call, align 8
%2 = load i8*, i8** %data, align 8
store i32 1, i32* %ref.tmp1, align 4
%call3 = invoke nonnull align 8 dereferenceable(8) i8** @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEEixEOi(%"class.std::map"* %dataMap, i32* nonnull align 4 dereferenceable(4) %ref.tmp1)
to label %invoke.cont2 unwind label %lpad
invoke.cont2: ; preds = %invoke.cont
store i8* %2, i8** %call3, align 8
%3 = load i8*, i8** %data, align 8
store i32 2, i32* %ref.tmp4, align 4
%call6 = invoke nonnull align 8 dereferenceable(8) i8** @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEEixEOi(%"class.std::map"* %dataMap, i32* nonnull align 4 dereferenceable(4) %ref.tmp4)
to label %invoke.cont5 unwind label %lpad
invoke.cont5: ; preds = %invoke.cont2
store i8* %3, i8** %call6, align 8
invoke void @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEEC2ERKS7_(%"class.std::map"* %agg.tmp, %"class.std::map"* nonnull align 8 dereferenceable(48) %dataMap)
to label %invoke.cont7 unwind label %lpad
invoke.cont7: ; preds = %invoke.cont5
invoke void @_ZN63CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_ncat_747badSinkESt3mapIiPcSt4lessIiESaISt4pairIKiS1_EEE(%"class.std::map"* %agg.tmp)
to label %invoke.cont9 unwind label %lpad8
invoke.cont9: ; preds = %invoke.cont7
call void @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEED2Ev(%"class.std::map"* %agg.tmp) #11
call void @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEED2Ev(%"class.std::map"* %dataMap) #11
ret void
lpad: ; preds = %invoke.cont5, %invoke.cont2, %invoke.cont, %entry
%4 = landingpad { i8*, i32 }
cleanup
%5 = extractvalue { i8*, i32 } %4, 0
store i8* %5, i8** %exn.slot, align 8
%6 = extractvalue { i8*, i32 } %4, 1
store i32 %6, i32* %ehselector.slot, align 4
br label %ehcleanup
lpad8: ; preds = %invoke.cont7
%7 = landingpad { i8*, i32 }
cleanup
%8 = extractvalue { i8*, i32 } %7, 0
store i8* %8, i8** %exn.slot, align 8
%9 = extractvalue { i8*, i32 } %7, 1
store i32 %9, i32* %ehselector.slot, align 4
call void @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEED2Ev(%"class.std::map"* %agg.tmp) #11
br label %ehcleanup
ehcleanup: ; preds = %lpad8, %lpad
call void @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEED2Ev(%"class.std::map"* %dataMap) #11
br label %eh.resume
eh.resume: ; preds = %ehcleanup
%exn = load i8*, i8** %exn.slot, align 8
%sel = load i32, i32* %ehselector.slot, align 4
%lpad.val = insertvalue { i8*, i32 } undef, i8* %exn, 0
%lpad.val10 = insertvalue { i8*, i32 } %lpad.val, i32 %sel, 1
resume { i8*, i32 } %lpad.val10
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEEC2Ev(%"class.std::map"* %this) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::map"*, align 8
store %"class.std::map"* %this, %"class.std::map"** %this.addr, align 8
%this1 = load %"class.std::map"*, %"class.std::map"** %this.addr, align 8
%_M_t = getelementptr inbounds %"class.std::map", %"class.std::map"* %this1, i32 0, i32 0
call void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EEC2Ev(%"class.std::_Rb_tree"* %_M_t) #11
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) i8** @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEEixEOi(%"class.std::map"* %this, i32* nonnull align 4 dereferenceable(4) %__k) #0 comdat align 2 {
entry:
%this.addr = alloca %"class.std::map"*, align 8
%__k.addr = alloca i32*, align 8
%__i = alloca %"struct.std::_Rb_tree_iterator", align 8
%ref.tmp = alloca %"struct.std::_Rb_tree_iterator", align 8
%ref.tmp5 = alloca %"struct.std::less", align 1
%undef.agg.tmp = alloca %"struct.std::less", align 1
%ref.tmp8 = alloca %"struct.std::_Rb_tree_iterator", align 8
%agg.tmp = alloca %"struct.std::_Rb_tree_const_iterator", align 8
%ref.tmp9 = alloca %"class.std::tuple", align 8
%ref.tmp11 = alloca %"class.std::tuple.0", align 1
store %"class.std::map"* %this, %"class.std::map"** %this.addr, align 8
store i32* %__k, i32** %__k.addr, align 8
%this1 = load %"class.std::map"*, %"class.std::map"** %this.addr, align 8
%0 = load i32*, i32** %__k.addr, align 8
%call = call %"struct.std::_Rb_tree_node_base"* @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE11lower_boundERS4_(%"class.std::map"* %this1, i32* nonnull align 4 dereferenceable(4) %0)
%coerce.dive = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__i, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %call, %"struct.std::_Rb_tree_node_base"** %coerce.dive, align 8
%call2 = call %"struct.std::_Rb_tree_node_base"* @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE3endEv(%"class.std::map"* %this1) #11
%coerce.dive3 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %ref.tmp, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %call2, %"struct.std::_Rb_tree_node_base"** %coerce.dive3, align 8
%call4 = call zeroext i1 @_ZSteqRKSt17_Rb_tree_iteratorISt4pairIKiPcEES6_(%"struct.std::_Rb_tree_iterator"* nonnull align 8 dereferenceable(8) %__i, %"struct.std::_Rb_tree_iterator"* nonnull align 8 dereferenceable(8) %ref.tmp) #11
br i1 %call4, label %lor.end, label %lor.rhs
lor.rhs: ; preds = %entry
call void @_ZNKSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE8key_compEv(%"class.std::map"* %this1)
%1 = load i32*, i32** %__k.addr, align 8
%call6 = call nonnull align 8 dereferenceable(16) %"struct.std::pair"* @_ZNKSt17_Rb_tree_iteratorISt4pairIKiPcEEdeEv(%"struct.std::_Rb_tree_iterator"* %__i) #11
%first = getelementptr inbounds %"struct.std::pair", %"struct.std::pair"* %call6, i32 0, i32 0
%call7 = call zeroext i1 @_ZNKSt4lessIiEclERKiS2_(%"struct.std::less"* %ref.tmp5, i32* nonnull align 4 dereferenceable(4) %1, i32* nonnull align 4 dereferenceable(4) %first)
br label %lor.end
lor.end: ; preds = %lor.rhs, %entry
%2 = phi i1 [ true, %entry ], [ %call7, %lor.rhs ]
br i1 %2, label %if.then, label %if.end
if.then: ; preds = %lor.end
%_M_t = getelementptr inbounds %"class.std::map", %"class.std::map"* %this1, i32 0, i32 0
call void @_ZNSt23_Rb_tree_const_iteratorISt4pairIKiPcEEC2ERKSt17_Rb_tree_iteratorIS3_E(%"struct.std::_Rb_tree_const_iterator"* %agg.tmp, %"struct.std::_Rb_tree_iterator"* nonnull align 8 dereferenceable(8) %__i) #11
%3 = load i32*, i32** %__k.addr, align 8
%call10 = call nonnull align 4 dereferenceable(4) i32* @_ZSt4moveIRiEONSt16remove_referenceIT_E4typeEOS2_(i32* nonnull align 4 dereferenceable(4) %3) #11
call void @_ZSt16forward_as_tupleIJiEESt5tupleIJDpOT_EES3_(%"class.std::tuple"* sret align 8 %ref.tmp9, i32* nonnull align 4 dereferenceable(4) %call10) #11
%coerce.dive12 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", %"struct.std::_Rb_tree_const_iterator"* %agg.tmp, i32 0, i32 0
%4 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %coerce.dive12, align 8
%call13 = call %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJOiEESE_IJEEEEESt17_Rb_tree_iteratorIS3_ESt23_Rb_tree_const_iteratorIS3_EDpOT_(%"class.std::_Rb_tree"* %_M_t, %"struct.std::_Rb_tree_node_base"* %4, %"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) @_ZStL19piecewise_construct, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %ref.tmp9, %"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %ref.tmp11)
%coerce.dive14 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %ref.tmp8, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %call13, %"struct.std::_Rb_tree_node_base"** %coerce.dive14, align 8
%5 = bitcast %"struct.std::_Rb_tree_iterator"* %__i to i8*
%6 = bitcast %"struct.std::_Rb_tree_iterator"* %ref.tmp8 to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %5, i8* align 8 %6, i64 8, i1 false)
br label %if.end
if.end: ; preds = %if.then, %lor.end
%call15 = call nonnull align 8 dereferenceable(16) %"struct.std::pair"* @_ZNKSt17_Rb_tree_iteratorISt4pairIKiPcEEdeEv(%"struct.std::_Rb_tree_iterator"* %__i) #11
%second = getelementptr inbounds %"struct.std::pair", %"struct.std::pair"* %call15, i32 0, i32 1
ret i8** %second
}
declare dso_local i32 @__gxx_personality_v0(...)
declare dso_local void @_ZN63CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_ncat_747badSinkESt3mapIiPcSt4lessIiESaISt4pairIKiS1_EEE(%"class.std::map"*) #2
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEEC2ERKS7_(%"class.std::map"* %this, %"class.std::map"* nonnull align 8 dereferenceable(48) %0) unnamed_addr #0 comdat align 2 {
entry:
%this.addr = alloca %"class.std::map"*, align 8
%.addr = alloca %"class.std::map"*, align 8
store %"class.std::map"* %this, %"class.std::map"** %this.addr, align 8
store %"class.std::map"* %0, %"class.std::map"** %.addr, align 8
%this1 = load %"class.std::map"*, %"class.std::map"** %this.addr, align 8
%_M_t = getelementptr inbounds %"class.std::map", %"class.std::map"* %this1, i32 0, i32 0
%1 = load %"class.std::map"*, %"class.std::map"** %.addr, align 8
%_M_t2 = getelementptr inbounds %"class.std::map", %"class.std::map"* %1, i32 0, i32 0
call void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EEC2ERKS9_(%"class.std::_Rb_tree"* %_M_t, %"class.std::_Rb_tree"* nonnull align 8 dereferenceable(48) %_M_t2)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEED2Ev(%"class.std::map"* %this) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::map"*, align 8
store %"class.std::map"* %this, %"class.std::map"** %this.addr, align 8
%this1 = load %"class.std::map"*, %"class.std::map"** %this.addr, align 8
%_M_t = getelementptr inbounds %"class.std::map", %"class.std::map"* %this1, i32 0, i32 0
call void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EED2Ev(%"class.std::_Rb_tree"* %_M_t) #11
ret void
}
; Function Attrs: noinline optnone uwtable
define dso_local void @_ZN63CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_ncat_744goodEv() #0 {
entry:
call void @_ZN63CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_ncat_74L7goodG2BEv()
ret void
}
; Function Attrs: noinline optnone uwtable
define internal void @_ZN63CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_ncat_74L7goodG2BEv() #0 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%data = alloca i8*, align 8
%dataMap = alloca %"class.std::map", align 8
%dataBadBuffer = alloca [50 x i8], align 16
%dataGoodBuffer = alloca [100 x i8], align 16
%ref.tmp = alloca i32, align 4
%exn.slot = alloca i8*, align 8
%ehselector.slot = alloca i32, align 4
%ref.tmp1 = alloca i32, align 4
%ref.tmp4 = alloca i32, align 4
%agg.tmp = alloca %"class.std::map", align 8
call void @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEEC2Ev(%"class.std::map"* %dataMap) #11
%arraydecay = getelementptr inbounds [100 x i8], [100 x i8]* %dataGoodBuffer, i64 0, i64 0
store i8* %arraydecay, i8** %data, align 8
%0 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %0, i64 0
store i8 0, i8* %arrayidx, align 1
%1 = load i8*, i8** %data, align 8
store i32 0, i32* %ref.tmp, align 4
%call = invoke nonnull align 8 dereferenceable(8) i8** @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEEixEOi(%"class.std::map"* %dataMap, i32* nonnull align 4 dereferenceable(4) %ref.tmp)
to label %invoke.cont unwind label %lpad
invoke.cont: ; preds = %entry
store i8* %1, i8** %call, align 8
%2 = load i8*, i8** %data, align 8
store i32 1, i32* %ref.tmp1, align 4
%call3 = invoke nonnull align 8 dereferenceable(8) i8** @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEEixEOi(%"class.std::map"* %dataMap, i32* nonnull align 4 dereferenceable(4) %ref.tmp1)
to label %invoke.cont2 unwind label %lpad
invoke.cont2: ; preds = %invoke.cont
store i8* %2, i8** %call3, align 8
%3 = load i8*, i8** %data, align 8
store i32 2, i32* %ref.tmp4, align 4
%call6 = invoke nonnull align 8 dereferenceable(8) i8** @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEEixEOi(%"class.std::map"* %dataMap, i32* nonnull align 4 dereferenceable(4) %ref.tmp4)
to label %invoke.cont5 unwind label %lpad
invoke.cont5: ; preds = %invoke.cont2
store i8* %3, i8** %call6, align 8
invoke void @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEEC2ERKS7_(%"class.std::map"* %agg.tmp, %"class.std::map"* nonnull align 8 dereferenceable(48) %dataMap)
to label %invoke.cont7 unwind label %lpad
invoke.cont7: ; preds = %invoke.cont5
invoke void @_ZN63CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_ncat_7411goodG2BSinkESt3mapIiPcSt4lessIiESaISt4pairIKiS1_EEE(%"class.std::map"* %agg.tmp)
to label %invoke.cont9 unwind label %lpad8
invoke.cont9: ; preds = %invoke.cont7
call void @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEED2Ev(%"class.std::map"* %agg.tmp) #11
call void @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEED2Ev(%"class.std::map"* %dataMap) #11
ret void
lpad: ; preds = %invoke.cont5, %invoke.cont2, %invoke.cont, %entry
%4 = landingpad { i8*, i32 }
cleanup
%5 = extractvalue { i8*, i32 } %4, 0
store i8* %5, i8** %exn.slot, align 8
%6 = extractvalue { i8*, i32 } %4, 1
store i32 %6, i32* %ehselector.slot, align 4
br label %ehcleanup
lpad8: ; preds = %invoke.cont7
%7 = landingpad { i8*, i32 }
cleanup
%8 = extractvalue { i8*, i32 } %7, 0
store i8* %8, i8** %exn.slot, align 8
%9 = extractvalue { i8*, i32 } %7, 1
store i32 %9, i32* %ehselector.slot, align 4
call void @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEED2Ev(%"class.std::map"* %agg.tmp) #11
br label %ehcleanup
ehcleanup: ; preds = %lpad8, %lpad
call void @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEED2Ev(%"class.std::map"* %dataMap) #11
br label %eh.resume
eh.resume: ; preds = %ehcleanup
%exn = load i8*, i8** %exn.slot, align 8
%sel = load i32, i32* %ehselector.slot, align 4
%lpad.val = insertvalue { i8*, i32 } undef, i8* %exn, 0
%lpad.val10 = insertvalue { i8*, i32 } %lpad.val, i32 %sel, 1
resume { i8*, i32 } %lpad.val10
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EEC2Ev(%"class.std::_Rb_tree"* %this) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
call void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE13_Rb_tree_implIS7_Lb1EEC2Ev(%"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl) #11
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE13_Rb_tree_implIS7_Lb1EEC2Ev(%"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %this) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"*, align 8
store %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %this, %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"** %this.addr, align 8
%this1 = load %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"*, %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"** %this.addr, align 8
%0 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %this1 to %"class.std::allocator"*
call void @_ZNSaISt13_Rb_tree_nodeISt4pairIKiPcEEEC2Ev(%"class.std::allocator"* %0) #11
%1 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %this1 to %"struct.std::_Rb_tree_key_compare"*
call void @_ZNSt20_Rb_tree_key_compareISt4lessIiEEC2Ev(%"struct.std::_Rb_tree_key_compare"* %1) #11
%2 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %this1 to i8*
%3 = getelementptr inbounds i8, i8* %2, i64 8
%4 = bitcast i8* %3 to %"struct.std::_Rb_tree_header"*
call void @_ZNSt15_Rb_tree_headerC2Ev(%"struct.std::_Rb_tree_header"* %4) #11
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSaISt13_Rb_tree_nodeISt4pairIKiPcEEEC2Ev(%"class.std::allocator"* %this) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::allocator"*, align 8
store %"class.std::allocator"* %this, %"class.std::allocator"** %this.addr, align 8
%this1 = load %"class.std::allocator"*, %"class.std::allocator"** %this.addr, align 8
%0 = bitcast %"class.std::allocator"* %this1 to %"class.__gnu_cxx::new_allocator"*
call void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEEC2Ev(%"class.__gnu_cxx::new_allocator"* %0) #11
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt20_Rb_tree_key_compareISt4lessIiEEC2Ev(%"struct.std::_Rb_tree_key_compare"* %this) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Rb_tree_key_compare"*, align 8
store %"struct.std::_Rb_tree_key_compare"* %this, %"struct.std::_Rb_tree_key_compare"** %this.addr, align 8
%this1 = load %"struct.std::_Rb_tree_key_compare"*, %"struct.std::_Rb_tree_key_compare"** %this.addr, align 8
%_M_key_compare = getelementptr inbounds %"struct.std::_Rb_tree_key_compare", %"struct.std::_Rb_tree_key_compare"* %this1, i32 0, i32 0
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt15_Rb_tree_headerC2Ev(%"struct.std::_Rb_tree_header"* %this) unnamed_addr #1 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%this.addr = alloca %"struct.std::_Rb_tree_header"*, align 8
store %"struct.std::_Rb_tree_header"* %this, %"struct.std::_Rb_tree_header"** %this.addr, align 8
%this1 = load %"struct.std::_Rb_tree_header"*, %"struct.std::_Rb_tree_header"** %this.addr, align 8
%_M_header = getelementptr inbounds %"struct.std::_Rb_tree_header", %"struct.std::_Rb_tree_header"* %this1, i32 0, i32 0
%_M_header2 = getelementptr inbounds %"struct.std::_Rb_tree_header", %"struct.std::_Rb_tree_header"* %this1, i32 0, i32 0
%_M_color = getelementptr inbounds %"struct.std::_Rb_tree_node_base", %"struct.std::_Rb_tree_node_base"* %_M_header2, i32 0, i32 0
store i32 0, i32* %_M_color, align 8
invoke void @_ZNSt15_Rb_tree_header8_M_resetEv(%"struct.std::_Rb_tree_header"* %this1)
to label %invoke.cont unwind label %terminate.lpad
invoke.cont: ; preds = %entry
ret void
terminate.lpad: ; preds = %entry
%0 = landingpad { i8*, i32 }
catch i8* null
%1 = extractvalue { i8*, i32 } %0, 0
call void @__clang_call_terminate(i8* %1) #12
unreachable
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEEC2Ev(%"class.__gnu_cxx::new_allocator"* %this) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
%this1 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt15_Rb_tree_header8_M_resetEv(%"struct.std::_Rb_tree_header"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Rb_tree_header"*, align 8
store %"struct.std::_Rb_tree_header"* %this, %"struct.std::_Rb_tree_header"** %this.addr, align 8
%this1 = load %"struct.std::_Rb_tree_header"*, %"struct.std::_Rb_tree_header"** %this.addr, align 8
%_M_header = getelementptr inbounds %"struct.std::_Rb_tree_header", %"struct.std::_Rb_tree_header"* %this1, i32 0, i32 0
%_M_parent = getelementptr inbounds %"struct.std::_Rb_tree_node_base", %"struct.std::_Rb_tree_node_base"* %_M_header, i32 0, i32 1
store %"struct.std::_Rb_tree_node_base"* null, %"struct.std::_Rb_tree_node_base"** %_M_parent, align 8
%_M_header2 = getelementptr inbounds %"struct.std::_Rb_tree_header", %"struct.std::_Rb_tree_header"* %this1, i32 0, i32 0
%_M_header3 = getelementptr inbounds %"struct.std::_Rb_tree_header", %"struct.std::_Rb_tree_header"* %this1, i32 0, i32 0
%_M_left = getelementptr inbounds %"struct.std::_Rb_tree_node_base", %"struct.std::_Rb_tree_node_base"* %_M_header3, i32 0, i32 2
store %"struct.std::_Rb_tree_node_base"* %_M_header2, %"struct.std::_Rb_tree_node_base"** %_M_left, align 8
%_M_header4 = getelementptr inbounds %"struct.std::_Rb_tree_header", %"struct.std::_Rb_tree_header"* %this1, i32 0, i32 0
%_M_header5 = getelementptr inbounds %"struct.std::_Rb_tree_header", %"struct.std::_Rb_tree_header"* %this1, i32 0, i32 0
%_M_right = getelementptr inbounds %"struct.std::_Rb_tree_node_base", %"struct.std::_Rb_tree_node_base"* %_M_header5, i32 0, i32 3
store %"struct.std::_Rb_tree_node_base"* %_M_header4, %"struct.std::_Rb_tree_node_base"** %_M_right, align 8
%_M_node_count = getelementptr inbounds %"struct.std::_Rb_tree_header", %"struct.std::_Rb_tree_header"* %this1, i32 0, i32 1
store i64 0, i64* %_M_node_count, align 8
ret void
}
; Function Attrs: noinline noreturn nounwind
define linkonce_odr hidden void @__clang_call_terminate(i8* %0) #3 comdat {
%2 = call i8* @__cxa_begin_catch(i8* %0) #11
call void @_ZSt9terminatev() #12
unreachable
}
declare dso_local i8* @__cxa_begin_catch(i8*)
declare dso_local void @_ZSt9terminatev()
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EEC2ERKS9_(%"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"* nonnull align 8 dereferenceable(48) %__x) unnamed_addr #0 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__x.addr = alloca %"class.std::_Rb_tree"*, align 8
%exn.slot = alloca i8*, align 8
%ehselector.slot = alloca i32, align 4
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store %"class.std::_Rb_tree"* %__x, %"class.std::_Rb_tree"** %__x.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%0 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %__x.addr, align 8
%_M_impl2 = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %0, i32 0, i32 0
call void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE13_Rb_tree_implIS7_Lb1EEC2ERKSB_(%"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl, %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* nonnull align 8 dereferenceable(48) %_M_impl2)
%1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %__x.addr, align 8
%call = call %"struct.std::_Rb_tree_node_base"* @_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_M_rootEv(%"class.std::_Rb_tree"* %1) #11
%cmp = icmp ne %"struct.std::_Rb_tree_node_base"* %call, null
br i1 %cmp, label %if.then, label %if.end
if.then: ; preds = %entry
%2 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %__x.addr, align 8
%call3 = invoke %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_M_copyERKS9_(%"class.std::_Rb_tree"* %this1, %"class.std::_Rb_tree"* nonnull align 8 dereferenceable(48) %2)
to label %invoke.cont unwind label %lpad
invoke.cont: ; preds = %if.then
%3 = bitcast %"struct.std::_Rb_tree_node"* %call3 to %"struct.std::_Rb_tree_node_base"*
%call4 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_M_rootEv(%"class.std::_Rb_tree"* %this1) #11
store %"struct.std::_Rb_tree_node_base"* %3, %"struct.std::_Rb_tree_node_base"** %call4, align 8
br label %if.end
lpad: ; preds = %if.then
%4 = landingpad { i8*, i32 }
cleanup
%5 = extractvalue { i8*, i32 } %4, 0
store i8* %5, i8** %exn.slot, align 8
%6 = extractvalue { i8*, i32 } %4, 1
store i32 %6, i32* %ehselector.slot, align 4
call void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE13_Rb_tree_implIS7_Lb1EED2Ev(%"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl) #11
br label %eh.resume
if.end: ; preds = %invoke.cont, %entry
ret void
eh.resume: ; preds = %lpad
%exn = load i8*, i8** %exn.slot, align 8
%sel = load i32, i32* %ehselector.slot, align 4
%lpad.val = insertvalue { i8*, i32 } undef, i8* %exn, 0
%lpad.val5 = insertvalue { i8*, i32 } %lpad.val, i32 %sel, 1
resume { i8*, i32 } %lpad.val5
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE13_Rb_tree_implIS7_Lb1EEC2ERKSB_(%"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %this, %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* nonnull align 8 dereferenceable(48) %__x) unnamed_addr #0 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%this.addr = alloca %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"*, align 8
%__x.addr = alloca %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"*, align 8
%ref.tmp = alloca %"class.std::allocator", align 1
%exn.slot = alloca i8*, align 8
%ehselector.slot = alloca i32, align 4
store %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %this, %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"** %this.addr, align 8
store %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %__x, %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"** %__x.addr, align 8
%this1 = load %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"*, %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"** %this.addr, align 8
%0 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %this1 to %"class.std::allocator"*
%1 = load %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"*, %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"** %__x.addr, align 8
%2 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %1 to %"class.std::allocator"*
call void @_ZN9__gnu_cxx14__alloc_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEES6_E17_S_select_on_copyERKS7_(%"class.std::allocator"* sret align 1 %ref.tmp, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %2)
call void @_ZNSaISt13_Rb_tree_nodeISt4pairIKiPcEEEC2ERKS5_(%"class.std::allocator"* %0, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %ref.tmp) #11
call void @_ZNSaISt13_Rb_tree_nodeISt4pairIKiPcEEED2Ev(%"class.std::allocator"* %ref.tmp) #11
%3 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %this1 to %"struct.std::_Rb_tree_key_compare"*
%4 = load %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"*, %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"** %__x.addr, align 8
%5 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %4 to %"struct.std::_Rb_tree_key_compare"*
%_M_key_compare = getelementptr inbounds %"struct.std::_Rb_tree_key_compare", %"struct.std::_Rb_tree_key_compare"* %5, i32 0, i32 0
invoke void @_ZNSt20_Rb_tree_key_compareISt4lessIiEEC2ERKS1_(%"struct.std::_Rb_tree_key_compare"* %3, %"struct.std::less"* nonnull align 1 dereferenceable(1) %_M_key_compare)
to label %invoke.cont unwind label %lpad
invoke.cont: ; preds = %entry
%6 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %this1 to i8*
%7 = getelementptr inbounds i8, i8* %6, i64 8
%8 = bitcast i8* %7 to %"struct.std::_Rb_tree_header"*
call void @_ZNSt15_Rb_tree_headerC2Ev(%"struct.std::_Rb_tree_header"* %8) #11
ret void
lpad: ; preds = %entry
%9 = landingpad { i8*, i32 }
cleanup
%10 = extractvalue { i8*, i32 } %9, 0
store i8* %10, i8** %exn.slot, align 8
%11 = extractvalue { i8*, i32 } %9, 1
store i32 %11, i32* %ehselector.slot, align 4
%12 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %this1 to %"class.std::allocator"*
call void @_ZNSaISt13_Rb_tree_nodeISt4pairIKiPcEEED2Ev(%"class.std::allocator"* %12) #11
br label %eh.resume
eh.resume: ; preds = %lpad
%exn = load i8*, i8** %exn.slot, align 8
%sel = load i32, i32* %ehselector.slot, align 4
%lpad.val = insertvalue { i8*, i32 } undef, i8* %exn, 0
%lpad.val2 = insertvalue { i8*, i32 } %lpad.val, i32 %sel, 1
resume { i8*, i32 } %lpad.val2
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node_base"* @_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_M_rootEv(%"class.std::_Rb_tree"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%0 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl to i8*
%add.ptr = getelementptr inbounds i8, i8* %0, i64 8
%1 = bitcast i8* %add.ptr to %"struct.std::_Rb_tree_header"*
%_M_header = getelementptr inbounds %"struct.std::_Rb_tree_header", %"struct.std::_Rb_tree_header"* %1, i32 0, i32 0
%_M_parent = getelementptr inbounds %"struct.std::_Rb_tree_node_base", %"struct.std::_Rb_tree_node_base"* %_M_header, i32 0, i32 1
%2 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_parent, align 8
ret %"struct.std::_Rb_tree_node_base"* %2
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_M_copyERKS9_(%"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"* nonnull align 8 dereferenceable(48) %__x) #0 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__x.addr = alloca %"class.std::_Rb_tree"*, align 8
%__an = alloca %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node", align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store %"class.std::_Rb_tree"* %__x, %"class.std::_Rb_tree"** %__x.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
call void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_Alloc_nodeC2ERS9_(%"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node"* %__an, %"class.std::_Rb_tree"* nonnull align 8 dereferenceable(48) %this1)
%0 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %__x.addr, align 8
%call = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_M_copyILb0ENS9_11_Alloc_nodeEEEPSt13_Rb_tree_nodeIS3_ERKS9_RT0_(%"class.std::_Rb_tree"* %this1, %"class.std::_Rb_tree"* nonnull align 8 dereferenceable(48) %0, %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node"* nonnull align 8 dereferenceable(8) %__an)
ret %"struct.std::_Rb_tree_node"* %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_M_rootEv(%"class.std::_Rb_tree"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%0 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl to i8*
%add.ptr = getelementptr inbounds i8, i8* %0, i64 8
%1 = bitcast i8* %add.ptr to %"struct.std::_Rb_tree_header"*
%_M_header = getelementptr inbounds %"struct.std::_Rb_tree_header", %"struct.std::_Rb_tree_header"* %1, i32 0, i32 0
%_M_parent = getelementptr inbounds %"struct.std::_Rb_tree_node_base", %"struct.std::_Rb_tree_node_base"* %_M_header, i32 0, i32 1
ret %"struct.std::_Rb_tree_node_base"** %_M_parent
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE13_Rb_tree_implIS7_Lb1EED2Ev(%"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %this) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"*, align 8
store %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %this, %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"** %this.addr, align 8
%this1 = load %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"*, %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"** %this.addr, align 8
%0 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %this1 to %"class.std::allocator"*
call void @_ZNSaISt13_Rb_tree_nodeISt4pairIKiPcEEED2Ev(%"class.std::allocator"* %0) #11
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx14__alloc_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEES6_E17_S_select_on_copyERKS7_(%"class.std::allocator"* noalias sret align 1 %agg.result, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a) #0 comdat align 2 {
entry:
%result.ptr = alloca i8*, align 8
%__a.addr = alloca %"class.std::allocator"*, align 8
%0 = bitcast %"class.std::allocator"* %agg.result to i8*
store i8* %0, i8** %result.ptr, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
%1 = load %"class.std::allocator"*, %"class.std::allocator"** %__a.addr, align 8
call void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE37select_on_container_copy_constructionERKS6_(%"class.std::allocator"* sret align 1 %agg.result, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %1)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSaISt13_Rb_tree_nodeISt4pairIKiPcEEED2Ev(%"class.std::allocator"* %this) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::allocator"*, align 8
store %"class.std::allocator"* %this, %"class.std::allocator"** %this.addr, align 8
%this1 = load %"class.std::allocator"*, %"class.std::allocator"** %this.addr, align 8
%0 = bitcast %"class.std::allocator"* %this1 to %"class.__gnu_cxx::new_allocator"*
call void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEED2Ev(%"class.__gnu_cxx::new_allocator"* %0) #11
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt20_Rb_tree_key_compareISt4lessIiEEC2ERKS1_(%"struct.std::_Rb_tree_key_compare"* %this, %"struct.std::less"* nonnull align 1 dereferenceable(1) %__comp) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Rb_tree_key_compare"*, align 8
%__comp.addr = alloca %"struct.std::less"*, align 8
store %"struct.std::_Rb_tree_key_compare"* %this, %"struct.std::_Rb_tree_key_compare"** %this.addr, align 8
store %"struct.std::less"* %__comp, %"struct.std::less"** %__comp.addr, align 8
%this1 = load %"struct.std::_Rb_tree_key_compare"*, %"struct.std::_Rb_tree_key_compare"** %this.addr, align 8
%_M_key_compare = getelementptr inbounds %"struct.std::_Rb_tree_key_compare", %"struct.std::_Rb_tree_key_compare"* %this1, i32 0, i32 0
%0 = load %"struct.std::less"*, %"struct.std::less"** %__comp.addr, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE37select_on_container_copy_constructionERKS6_(%"class.std::allocator"* noalias sret align 1 %agg.result, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %__rhs) #1 comdat align 2 {
entry:
%result.ptr = alloca i8*, align 8
%__rhs.addr = alloca %"class.std::allocator"*, align 8
%0 = bitcast %"class.std::allocator"* %agg.result to i8*
store i8* %0, i8** %result.ptr, align 8
store %"class.std::allocator"* %__rhs, %"class.std::allocator"** %__rhs.addr, align 8
%1 = load %"class.std::allocator"*, %"class.std::allocator"** %__rhs.addr, align 8
call void @_ZNSaISt13_Rb_tree_nodeISt4pairIKiPcEEEC2ERKS5_(%"class.std::allocator"* %agg.result, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %1) #11
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSaISt13_Rb_tree_nodeISt4pairIKiPcEEEC2ERKS5_(%"class.std::allocator"* %this, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::allocator"*, align 8
%__a.addr = alloca %"class.std::allocator"*, align 8
store %"class.std::allocator"* %this, %"class.std::allocator"** %this.addr, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
%this1 = load %"class.std::allocator"*, %"class.std::allocator"** %this.addr, align 8
%0 = bitcast %"class.std::allocator"* %this1 to %"class.__gnu_cxx::new_allocator"*
%1 = load %"class.std::allocator"*, %"class.std::allocator"** %__a.addr, align 8
%2 = bitcast %"class.std::allocator"* %1 to %"class.__gnu_cxx::new_allocator"*
call void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEEC2ERKS7_(%"class.__gnu_cxx::new_allocator"* %0, %"class.__gnu_cxx::new_allocator"* nonnull align 1 dereferenceable(1) %2) #11
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEEC2ERKS7_(%"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"* nonnull align 1 dereferenceable(1) %0) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
%.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
store %"class.__gnu_cxx::new_allocator"* %0, %"class.__gnu_cxx::new_allocator"** %.addr, align 8
%this1 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEED2Ev(%"class.__gnu_cxx::new_allocator"* %this) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
%this1 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_Alloc_nodeC2ERS9_(%"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node"* %this, %"class.std::_Rb_tree"* nonnull align 8 dereferenceable(48) %__t) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node"*, align 8
%__t.addr = alloca %"class.std::_Rb_tree"*, align 8
store %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node"* %this, %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node"** %this.addr, align 8
store %"class.std::_Rb_tree"* %__t, %"class.std::_Rb_tree"** %__t.addr, align 8
%this1 = load %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node"*, %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node"** %this.addr, align 8
%_M_t = getelementptr inbounds %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node", %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node"* %this1, i32 0, i32 0
%0 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %__t.addr, align 8
store %"class.std::_Rb_tree"* %0, %"class.std::_Rb_tree"** %_M_t, align 8
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_M_copyILb0ENS9_11_Alloc_nodeEEEPSt13_Rb_tree_nodeIS3_ERKS9_RT0_(%"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"* nonnull align 8 dereferenceable(48) %__x, %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node"* nonnull align 8 dereferenceable(8) %__gen) #0 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__x.addr = alloca %"class.std::_Rb_tree"*, align 8
%__gen.addr = alloca %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node"*, align 8
%__root = alloca %"struct.std::_Rb_tree_node"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store %"class.std::_Rb_tree"* %__x, %"class.std::_Rb_tree"** %__x.addr, align 8
store %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node"* %__gen, %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node"** %__gen.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%0 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %__x.addr, align 8
%call = call %"struct.std::_Rb_tree_node"* @_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE9_M_mbeginEv(%"class.std::_Rb_tree"* %0) #11
%call2 = call %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_M_endEv(%"class.std::_Rb_tree"* %this1) #11
%1 = load %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node"*, %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node"** %__gen.addr, align 8
%call3 = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_M_copyILb0ENS9_11_Alloc_nodeEEEPSt13_Rb_tree_nodeIS3_ESE_PSt18_Rb_tree_node_baseRT0_(%"class.std::_Rb_tree"* %this1, %"struct.std::_Rb_tree_node"* %call, %"struct.std::_Rb_tree_node_base"* %call2, %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node"* nonnull align 8 dereferenceable(8) %1)
store %"struct.std::_Rb_tree_node"* %call3, %"struct.std::_Rb_tree_node"** %__root, align 8
%2 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__root, align 8
%3 = bitcast %"struct.std::_Rb_tree_node"* %2 to %"struct.std::_Rb_tree_node_base"*
%call4 = call %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE10_S_minimumEPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %3) #11
%call5 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_leftmostEv(%"class.std::_Rb_tree"* %this1) #11
store %"struct.std::_Rb_tree_node_base"* %call4, %"struct.std::_Rb_tree_node_base"** %call5, align 8
%4 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__root, align 8
%5 = bitcast %"struct.std::_Rb_tree_node"* %4 to %"struct.std::_Rb_tree_node_base"*
%call6 = call %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE10_S_maximumEPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %5) #11
%call7 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_rightmostEv(%"class.std::_Rb_tree"* %this1) #11
store %"struct.std::_Rb_tree_node_base"* %call6, %"struct.std::_Rb_tree_node_base"** %call7, align 8
%6 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %__x.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %6, i32 0, i32 0
%7 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl to i8*
%add.ptr = getelementptr inbounds i8, i8* %7, i64 8
%8 = bitcast i8* %add.ptr to %"struct.std::_Rb_tree_header"*
%_M_node_count = getelementptr inbounds %"struct.std::_Rb_tree_header", %"struct.std::_Rb_tree_header"* %8, i32 0, i32 1
%9 = load i64, i64* %_M_node_count, align 8
%_M_impl8 = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%10 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl8 to i8*
%add.ptr9 = getelementptr inbounds i8, i8* %10, i64 8
%11 = bitcast i8* %add.ptr9 to %"struct.std::_Rb_tree_header"*
%_M_node_count10 = getelementptr inbounds %"struct.std::_Rb_tree_header", %"struct.std::_Rb_tree_header"* %11, i32 0, i32 1
store i64 %9, i64* %_M_node_count10, align 8
%12 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__root, align 8
ret %"struct.std::_Rb_tree_node"* %12
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_M_copyILb0ENS9_11_Alloc_nodeEEEPSt13_Rb_tree_nodeIS3_ESE_PSt18_Rb_tree_node_baseRT0_(%"class.std::_Rb_tree"* %this, %"struct.std::_Rb_tree_node"* %__x, %"struct.std::_Rb_tree_node_base"* %__p, %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node"* nonnull align 8 dereferenceable(8) %__node_gen) #0 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__x.addr = alloca %"struct.std::_Rb_tree_node"*, align 8
%__p.addr = alloca %"struct.std::_Rb_tree_node_base"*, align 8
%__node_gen.addr = alloca %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node"*, align 8
%__top = alloca %"struct.std::_Rb_tree_node"*, align 8
%exn.slot = alloca i8*, align 8
%ehselector.slot = alloca i32, align 4
%__y = alloca %"struct.std::_Rb_tree_node"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store %"struct.std::_Rb_tree_node"* %__x, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
store %"struct.std::_Rb_tree_node_base"* %__p, %"struct.std::_Rb_tree_node_base"** %__p.addr, align 8
store %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node"* %__node_gen, %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node"** %__node_gen.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%0 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
%1 = load %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node"*, %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node"** %__node_gen.addr, align 8
%call = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE13_M_clone_nodeILb0ENS9_11_Alloc_nodeEEEPSt13_Rb_tree_nodeIS3_ESE_RT0_(%"class.std::_Rb_tree"* %this1, %"struct.std::_Rb_tree_node"* %0, %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node"* nonnull align 8 dereferenceable(8) %1)
store %"struct.std::_Rb_tree_node"* %call, %"struct.std::_Rb_tree_node"** %__top, align 8
%2 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__p.addr, align 8
%3 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__top, align 8
%4 = bitcast %"struct.std::_Rb_tree_node"* %3 to %"struct.std::_Rb_tree_node_base"*
%_M_parent = getelementptr inbounds %"struct.std::_Rb_tree_node_base", %"struct.std::_Rb_tree_node_base"* %4, i32 0, i32 1
store %"struct.std::_Rb_tree_node_base"* %2, %"struct.std::_Rb_tree_node_base"** %_M_parent, align 8
%5 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
%6 = bitcast %"struct.std::_Rb_tree_node"* %5 to %"struct.std::_Rb_tree_node_base"*
%_M_right = getelementptr inbounds %"struct.std::_Rb_tree_node_base", %"struct.std::_Rb_tree_node_base"* %6, i32 0, i32 3
%7 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_right, align 8
%tobool = icmp ne %"struct.std::_Rb_tree_node_base"* %7, null
br i1 %tobool, label %if.then, label %if.end
if.then: ; preds = %entry
%8 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
%9 = bitcast %"struct.std::_Rb_tree_node"* %8 to %"struct.std::_Rb_tree_node_base"*
%call2 = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %9) #11
%10 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__top, align 8
%11 = bitcast %"struct.std::_Rb_tree_node"* %10 to %"struct.std::_Rb_tree_node_base"*
%12 = load %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node"*, %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node"** %__node_gen.addr, align 8
%call3 = invoke %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_M_copyILb0ENS9_11_Alloc_nodeEEEPSt13_Rb_tree_nodeIS3_ESE_PSt18_Rb_tree_node_baseRT0_(%"class.std::_Rb_tree"* %this1, %"struct.std::_Rb_tree_node"* %call2, %"struct.std::_Rb_tree_node_base"* %11, %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node"* nonnull align 8 dereferenceable(8) %12)
to label %invoke.cont unwind label %lpad
invoke.cont: ; preds = %if.then
%13 = bitcast %"struct.std::_Rb_tree_node"* %call3 to %"struct.std::_Rb_tree_node_base"*
%14 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__top, align 8
%15 = bitcast %"struct.std::_Rb_tree_node"* %14 to %"struct.std::_Rb_tree_node_base"*
%_M_right4 = getelementptr inbounds %"struct.std::_Rb_tree_node_base", %"struct.std::_Rb_tree_node_base"* %15, i32 0, i32 3
store %"struct.std::_Rb_tree_node_base"* %13, %"struct.std::_Rb_tree_node_base"** %_M_right4, align 8
br label %if.end
lpad: ; preds = %if.then11, %while.body, %if.then
%16 = landingpad { i8*, i32 }
catch i8* null
%17 = extractvalue { i8*, i32 } %16, 0
store i8* %17, i8** %exn.slot, align 8
%18 = extractvalue { i8*, i32 } %16, 1
store i32 %18, i32* %ehselector.slot, align 4
br label %catch
catch: ; preds = %lpad
%exn = load i8*, i8** %exn.slot, align 8
%19 = call i8* @__cxa_begin_catch(i8* %exn) #11
%20 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__top, align 8
invoke void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_M_eraseEPSt13_Rb_tree_nodeIS3_E(%"class.std::_Rb_tree"* %this1, %"struct.std::_Rb_tree_node"* %20)
to label %invoke.cont19 unwind label %lpad18
invoke.cont19: ; preds = %catch
invoke void @__cxa_rethrow() #13
to label %unreachable unwind label %lpad18
if.end: ; preds = %invoke.cont, %entry
%21 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__top, align 8
%22 = bitcast %"struct.std::_Rb_tree_node"* %21 to %"struct.std::_Rb_tree_node_base"*
store %"struct.std::_Rb_tree_node_base"* %22, %"struct.std::_Rb_tree_node_base"** %__p.addr, align 8
%23 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
%24 = bitcast %"struct.std::_Rb_tree_node"* %23 to %"struct.std::_Rb_tree_node_base"*
%call5 = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_S_leftEPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %24) #11
store %"struct.std::_Rb_tree_node"* %call5, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
br label %while.cond
while.cond: ; preds = %if.end16, %if.end
%25 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
%cmp = icmp ne %"struct.std::_Rb_tree_node"* %25, null
br i1 %cmp, label %while.body, label %while.end
while.body: ; preds = %while.cond
%26 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
%27 = load %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node"*, %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node"** %__node_gen.addr, align 8
%call7 = invoke %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE13_M_clone_nodeILb0ENS9_11_Alloc_nodeEEEPSt13_Rb_tree_nodeIS3_ESE_RT0_(%"class.std::_Rb_tree"* %this1, %"struct.std::_Rb_tree_node"* %26, %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node"* nonnull align 8 dereferenceable(8) %27)
to label %invoke.cont6 unwind label %lpad
invoke.cont6: ; preds = %while.body
store %"struct.std::_Rb_tree_node"* %call7, %"struct.std::_Rb_tree_node"** %__y, align 8
%28 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__y, align 8
%29 = bitcast %"struct.std::_Rb_tree_node"* %28 to %"struct.std::_Rb_tree_node_base"*
%30 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__p.addr, align 8
%_M_left = getelementptr inbounds %"struct.std::_Rb_tree_node_base", %"struct.std::_Rb_tree_node_base"* %30, i32 0, i32 2
store %"struct.std::_Rb_tree_node_base"* %29, %"struct.std::_Rb_tree_node_base"** %_M_left, align 8
%31 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__p.addr, align 8
%32 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__y, align 8
%33 = bitcast %"struct.std::_Rb_tree_node"* %32 to %"struct.std::_Rb_tree_node_base"*
%_M_parent8 = getelementptr inbounds %"struct.std::_Rb_tree_node_base", %"struct.std::_Rb_tree_node_base"* %33, i32 0, i32 1
store %"struct.std::_Rb_tree_node_base"* %31, %"struct.std::_Rb_tree_node_base"** %_M_parent8, align 8
%34 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
%35 = bitcast %"struct.std::_Rb_tree_node"* %34 to %"struct.std::_Rb_tree_node_base"*
%_M_right9 = getelementptr inbounds %"struct.std::_Rb_tree_node_base", %"struct.std::_Rb_tree_node_base"* %35, i32 0, i32 3
%36 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_right9, align 8
%tobool10 = icmp ne %"struct.std::_Rb_tree_node_base"* %36, null
br i1 %tobool10, label %if.then11, label %if.end16
if.then11: ; preds = %invoke.cont6
%37 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
%38 = bitcast %"struct.std::_Rb_tree_node"* %37 to %"struct.std::_Rb_tree_node_base"*
%call12 = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %38) #11
%39 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__y, align 8
%40 = bitcast %"struct.std::_Rb_tree_node"* %39 to %"struct.std::_Rb_tree_node_base"*
%41 = load %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node"*, %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node"** %__node_gen.addr, align 8
%call14 = invoke %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_M_copyILb0ENS9_11_Alloc_nodeEEEPSt13_Rb_tree_nodeIS3_ESE_PSt18_Rb_tree_node_baseRT0_(%"class.std::_Rb_tree"* %this1, %"struct.std::_Rb_tree_node"* %call12, %"struct.std::_Rb_tree_node_base"* %40, %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node"* nonnull align 8 dereferenceable(8) %41)
to label %invoke.cont13 unwind label %lpad
invoke.cont13: ; preds = %if.then11
%42 = bitcast %"struct.std::_Rb_tree_node"* %call14 to %"struct.std::_Rb_tree_node_base"*
%43 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__y, align 8
%44 = bitcast %"struct.std::_Rb_tree_node"* %43 to %"struct.std::_Rb_tree_node_base"*
%_M_right15 = getelementptr inbounds %"struct.std::_Rb_tree_node_base", %"struct.std::_Rb_tree_node_base"* %44, i32 0, i32 3
store %"struct.std::_Rb_tree_node_base"* %42, %"struct.std::_Rb_tree_node_base"** %_M_right15, align 8
br label %if.end16
if.end16: ; preds = %invoke.cont13, %invoke.cont6
%45 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__y, align 8
%46 = bitcast %"struct.std::_Rb_tree_node"* %45 to %"struct.std::_Rb_tree_node_base"*
store %"struct.std::_Rb_tree_node_base"* %46, %"struct.std::_Rb_tree_node_base"** %__p.addr, align 8
%47 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
%48 = bitcast %"struct.std::_Rb_tree_node"* %47 to %"struct.std::_Rb_tree_node_base"*
%call17 = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_S_leftEPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %48) #11
store %"struct.std::_Rb_tree_node"* %call17, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
br label %while.cond
while.end: ; preds = %while.cond
br label %try.cont
lpad18: ; preds = %invoke.cont19, %catch
%49 = landingpad { i8*, i32 }
cleanup
%50 = extractvalue { i8*, i32 } %49, 0
store i8* %50, i8** %exn.slot, align 8
%51 = extractvalue { i8*, i32 } %49, 1
store i32 %51, i32* %ehselector.slot, align 4
invoke void @__cxa_end_catch()
to label %invoke.cont20 unwind label %terminate.lpad
invoke.cont20: ; preds = %lpad18
br label %eh.resume
try.cont: ; preds = %while.end
%52 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__top, align 8
ret %"struct.std::_Rb_tree_node"* %52
eh.resume: ; preds = %invoke.cont20
%exn21 = load i8*, i8** %exn.slot, align 8
%sel = load i32, i32* %ehselector.slot, align 4
%lpad.val = insertvalue { i8*, i32 } undef, i8* %exn21, 0
%lpad.val22 = insertvalue { i8*, i32 } %lpad.val, i32 %sel, 1
resume { i8*, i32 } %lpad.val22
terminate.lpad: ; preds = %lpad18
%53 = landingpad { i8*, i32 }
catch i8* null
%54 = extractvalue { i8*, i32 } %53, 0
call void @__clang_call_terminate(i8* %54) #12
unreachable
unreachable: ; preds = %invoke.cont19
unreachable
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node"* @_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE9_M_mbeginEv(%"class.std::_Rb_tree"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%0 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl to i8*
%add.ptr = getelementptr inbounds i8, i8* %0, i64 8
%1 = bitcast i8* %add.ptr to %"struct.std::_Rb_tree_header"*
%_M_header = getelementptr inbounds %"struct.std::_Rb_tree_header", %"struct.std::_Rb_tree_header"* %1, i32 0, i32 0
%_M_parent = getelementptr inbounds %"struct.std::_Rb_tree_node_base", %"struct.std::_Rb_tree_node_base"* %_M_header, i32 0, i32 1
%2 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_parent, align 8
%3 = bitcast %"struct.std::_Rb_tree_node_base"* %2 to %"struct.std::_Rb_tree_node"*
ret %"struct.std::_Rb_tree_node"* %3
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_M_endEv(%"class.std::_Rb_tree"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%0 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl to i8*
%add.ptr = getelementptr inbounds i8, i8* %0, i64 8
%1 = bitcast i8* %add.ptr to %"struct.std::_Rb_tree_header"*
%_M_header = getelementptr inbounds %"struct.std::_Rb_tree_header", %"struct.std::_Rb_tree_header"* %1, i32 0, i32 0
ret %"struct.std::_Rb_tree_node_base"* %_M_header
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE10_S_minimumEPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %__x) #1 comdat align 2 {
entry:
%__x.addr = alloca %"struct.std::_Rb_tree_node_base"*, align 8
store %"struct.std::_Rb_tree_node_base"* %__x, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
%0 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
%call = call %"struct.std::_Rb_tree_node_base"* @_ZNSt18_Rb_tree_node_base10_S_minimumEPS_(%"struct.std::_Rb_tree_node_base"* %0) #11
ret %"struct.std::_Rb_tree_node_base"* %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_leftmostEv(%"class.std::_Rb_tree"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%0 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl to i8*
%add.ptr = getelementptr inbounds i8, i8* %0, i64 8
%1 = bitcast i8* %add.ptr to %"struct.std::_Rb_tree_header"*
%_M_header = getelementptr inbounds %"struct.std::_Rb_tree_header", %"struct.std::_Rb_tree_header"* %1, i32 0, i32 0
%_M_left = getelementptr inbounds %"struct.std::_Rb_tree_node_base", %"struct.std::_Rb_tree_node_base"* %_M_header, i32 0, i32 2
ret %"struct.std::_Rb_tree_node_base"** %_M_left
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE10_S_maximumEPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %__x) #1 comdat align 2 {
entry:
%__x.addr = alloca %"struct.std::_Rb_tree_node_base"*, align 8
store %"struct.std::_Rb_tree_node_base"* %__x, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
%0 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
%call = call %"struct.std::_Rb_tree_node_base"* @_ZNSt18_Rb_tree_node_base10_S_maximumEPS_(%"struct.std::_Rb_tree_node_base"* %0) #11
ret %"struct.std::_Rb_tree_node_base"* %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_rightmostEv(%"class.std::_Rb_tree"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%0 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl to i8*
%add.ptr = getelementptr inbounds i8, i8* %0, i64 8
%1 = bitcast i8* %add.ptr to %"struct.std::_Rb_tree_header"*
%_M_header = getelementptr inbounds %"struct.std::_Rb_tree_header", %"struct.std::_Rb_tree_header"* %1, i32 0, i32 0
%_M_right = getelementptr inbounds %"struct.std::_Rb_tree_node_base", %"struct.std::_Rb_tree_node_base"* %_M_header, i32 0, i32 3
ret %"struct.std::_Rb_tree_node_base"** %_M_right
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE13_M_clone_nodeILb0ENS9_11_Alloc_nodeEEEPSt13_Rb_tree_nodeIS3_ESE_RT0_(%"class.std::_Rb_tree"* %this, %"struct.std::_Rb_tree_node"* %__x, %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node"* nonnull align 8 dereferenceable(8) %__node_gen) #0 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__x.addr = alloca %"struct.std::_Rb_tree_node"*, align 8
%__node_gen.addr = alloca %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node"*, align 8
%__tmp = alloca %"struct.std::_Rb_tree_node"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store %"struct.std::_Rb_tree_node"* %__x, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
store %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node"* %__node_gen, %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node"** %__node_gen.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%0 = load %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node"*, %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node"** %__node_gen.addr, align 8
%1 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
%call = call %"struct.std::pair"* @_ZNSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(%"struct.std::_Rb_tree_node"* %1)
%call2 = call nonnull align 8 dereferenceable(16) %"struct.std::pair"* @_ZSt7forwardIRKSt4pairIKiPcEEOT_RNSt16remove_referenceIS6_E4typeE(%"struct.std::pair"* nonnull align 8 dereferenceable(16) %call) #11
%call3 = call %"struct.std::_Rb_tree_node"* @_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_Alloc_nodeclIRKS3_EEPSt13_Rb_tree_nodeIS3_EOT_(%"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node"* %0, %"struct.std::pair"* nonnull align 8 dereferenceable(16) %call2)
store %"struct.std::_Rb_tree_node"* %call3, %"struct.std::_Rb_tree_node"** %__tmp, align 8
%2 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
%3 = bitcast %"struct.std::_Rb_tree_node"* %2 to %"struct.std::_Rb_tree_node_base"*
%_M_color = getelementptr inbounds %"struct.std::_Rb_tree_node_base", %"struct.std::_Rb_tree_node_base"* %3, i32 0, i32 0
%4 = load i32, i32* %_M_color, align 8
%5 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__tmp, align 8
%6 = bitcast %"struct.std::_Rb_tree_node"* %5 to %"struct.std::_Rb_tree_node_base"*
%_M_color4 = getelementptr inbounds %"struct.std::_Rb_tree_node_base", %"struct.std::_Rb_tree_node_base"* %6, i32 0, i32 0
store i32 %4, i32* %_M_color4, align 8
%7 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__tmp, align 8
%8 = bitcast %"struct.std::_Rb_tree_node"* %7 to %"struct.std::_Rb_tree_node_base"*
%_M_left = getelementptr inbounds %"struct.std::_Rb_tree_node_base", %"struct.std::_Rb_tree_node_base"* %8, i32 0, i32 2
store %"struct.std::_Rb_tree_node_base"* null, %"struct.std::_Rb_tree_node_base"** %_M_left, align 8
%9 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__tmp, align 8
%10 = bitcast %"struct.std::_Rb_tree_node"* %9 to %"struct.std::_Rb_tree_node_base"*
%_M_right = getelementptr inbounds %"struct.std::_Rb_tree_node_base", %"struct.std::_Rb_tree_node_base"* %10, i32 0, i32 3
store %"struct.std::_Rb_tree_node_base"* null, %"struct.std::_Rb_tree_node_base"** %_M_right, align 8
%11 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__tmp, align 8
ret %"struct.std::_Rb_tree_node"* %11
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %__x) #1 comdat align 2 {
entry:
%__x.addr = alloca %"struct.std::_Rb_tree_node_base"*, align 8
store %"struct.std::_Rb_tree_node_base"* %__x, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
%0 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
%_M_right = getelementptr inbounds %"struct.std::_Rb_tree_node_base", %"struct.std::_Rb_tree_node_base"* %0, i32 0, i32 3
%1 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_right, align 8
%2 = bitcast %"struct.std::_Rb_tree_node_base"* %1 to %"struct.std::_Rb_tree_node"*
ret %"struct.std::_Rb_tree_node"* %2
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_S_leftEPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %__x) #1 comdat align 2 {
entry:
%__x.addr = alloca %"struct.std::_Rb_tree_node_base"*, align 8
store %"struct.std::_Rb_tree_node_base"* %__x, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
%0 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
%_M_left = getelementptr inbounds %"struct.std::_Rb_tree_node_base", %"struct.std::_Rb_tree_node_base"* %0, i32 0, i32 2
%1 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_left, align 8
%2 = bitcast %"struct.std::_Rb_tree_node_base"* %1 to %"struct.std::_Rb_tree_node"*
ret %"struct.std::_Rb_tree_node"* %2
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_M_eraseEPSt13_Rb_tree_nodeIS3_E(%"class.std::_Rb_tree"* %this, %"struct.std::_Rb_tree_node"* %__x) #0 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__x.addr = alloca %"struct.std::_Rb_tree_node"*, align 8
%__y = alloca %"struct.std::_Rb_tree_node"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store %"struct.std::_Rb_tree_node"* %__x, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
br label %while.cond
while.cond: ; preds = %while.body, %entry
%0 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
%cmp = icmp ne %"struct.std::_Rb_tree_node"* %0, null
br i1 %cmp, label %while.body, label %while.end
while.body: ; preds = %while.cond
%1 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
%2 = bitcast %"struct.std::_Rb_tree_node"* %1 to %"struct.std::_Rb_tree_node_base"*
%call = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %2) #11
call void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_M_eraseEPSt13_Rb_tree_nodeIS3_E(%"class.std::_Rb_tree"* %this1, %"struct.std::_Rb_tree_node"* %call)
%3 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
%4 = bitcast %"struct.std::_Rb_tree_node"* %3 to %"struct.std::_Rb_tree_node_base"*
%call2 = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_S_leftEPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %4) #11
store %"struct.std::_Rb_tree_node"* %call2, %"struct.std::_Rb_tree_node"** %__y, align 8
%5 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
call void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_drop_nodeEPSt13_Rb_tree_nodeIS3_E(%"class.std::_Rb_tree"* %this1, %"struct.std::_Rb_tree_node"* %5) #11
%6 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__y, align 8
store %"struct.std::_Rb_tree_node"* %6, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
br label %while.cond
while.end: ; preds = %while.cond
ret void
}
declare dso_local void @__cxa_rethrow()
declare dso_local void @__cxa_end_catch()
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node"* @_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_Alloc_nodeclIRKS3_EEPSt13_Rb_tree_nodeIS3_EOT_(%"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node"* %this, %"struct.std::pair"* nonnull align 8 dereferenceable(16) %__arg) #0 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node"*, align 8
%__arg.addr = alloca %"struct.std::pair"*, align 8
store %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node"* %this, %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node"** %this.addr, align 8
store %"struct.std::pair"* %__arg, %"struct.std::pair"** %__arg.addr, align 8
%this1 = load %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node"*, %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node"** %this.addr, align 8
%_M_t = getelementptr inbounds %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node", %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Alloc_node"* %this1, i32 0, i32 0
%0 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %_M_t, align 8
%1 = load %"struct.std::pair"*, %"struct.std::pair"** %__arg.addr, align 8
%call = call nonnull align 8 dereferenceable(16) %"struct.std::pair"* @_ZSt7forwardIRKSt4pairIKiPcEEOT_RNSt16remove_referenceIS6_E4typeE(%"struct.std::pair"* nonnull align 8 dereferenceable(16) %1) #11
%call2 = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_create_nodeIJRKS3_EEEPSt13_Rb_tree_nodeIS3_EDpOT_(%"class.std::_Rb_tree"* %0, %"struct.std::pair"* nonnull align 8 dereferenceable(16) %call)
ret %"struct.std::_Rb_tree_node"* %call2
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(16) %"struct.std::pair"* @_ZSt7forwardIRKSt4pairIKiPcEEOT_RNSt16remove_referenceIS6_E4typeE(%"struct.std::pair"* nonnull align 8 dereferenceable(16) %__t) #1 comdat {
entry:
%__t.addr = alloca %"struct.std::pair"*, align 8
store %"struct.std::pair"* %__t, %"struct.std::pair"** %__t.addr, align 8
%0 = load %"struct.std::pair"*, %"struct.std::pair"** %__t.addr, align 8
ret %"struct.std::pair"* %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::pair"* @_ZNSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(%"struct.std::_Rb_tree_node"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Rb_tree_node"*, align 8
store %"struct.std::_Rb_tree_node"* %this, %"struct.std::_Rb_tree_node"** %this.addr, align 8
%this1 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %this.addr, align 8
%_M_storage = getelementptr inbounds %"struct.std::_Rb_tree_node", %"struct.std::_Rb_tree_node"* %this1, i32 0, i32 1
%call = call %"struct.std::pair"* @_ZN9__gnu_cxx16__aligned_membufISt4pairIKiPcEE6_M_ptrEv(%"struct.__gnu_cxx::__aligned_membuf"* %_M_storage) #11
ret %"struct.std::pair"* %call
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_create_nodeIJRKS3_EEEPSt13_Rb_tree_nodeIS3_EDpOT_(%"class.std::_Rb_tree"* %this, %"struct.std::pair"* nonnull align 8 dereferenceable(16) %__args) #0 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__args.addr = alloca %"struct.std::pair"*, align 8
%__tmp = alloca %"struct.std::_Rb_tree_node"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store %"struct.std::pair"* %__args, %"struct.std::pair"** %__args.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%call = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_get_nodeEv(%"class.std::_Rb_tree"* %this1)
store %"struct.std::_Rb_tree_node"* %call, %"struct.std::_Rb_tree_node"** %__tmp, align 8
%0 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__tmp, align 8
%1 = load %"struct.std::pair"*, %"struct.std::pair"** %__args.addr, align 8
%call2 = call nonnull align 8 dereferenceable(16) %"struct.std::pair"* @_ZSt7forwardIRKSt4pairIKiPcEEOT_RNSt16remove_referenceIS6_E4typeE(%"struct.std::pair"* nonnull align 8 dereferenceable(16) %1) #11
call void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE17_M_construct_nodeIJRKS3_EEEvPSt13_Rb_tree_nodeIS3_EDpOT_(%"class.std::_Rb_tree"* %this1, %"struct.std::_Rb_tree_node"* %0, %"struct.std::pair"* nonnull align 8 dereferenceable(16) %call2)
%2 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__tmp, align 8
ret %"struct.std::_Rb_tree_node"* %2
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_get_nodeEv(%"class.std::_Rb_tree"* %this) #0 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%call = call nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE21_M_get_Node_allocatorEv(%"class.std::_Rb_tree"* %this1) #11
%call2 = call %"struct.std::_Rb_tree_node"* @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE8allocateERS6_m(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %call, i64 1)
ret %"struct.std::_Rb_tree_node"* %call2
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE17_M_construct_nodeIJRKS3_EEEvPSt13_Rb_tree_nodeIS3_EDpOT_(%"class.std::_Rb_tree"* %this, %"struct.std::_Rb_tree_node"* %__node, %"struct.std::pair"* nonnull align 8 dereferenceable(16) %__args) #0 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__node.addr = alloca %"struct.std::_Rb_tree_node"*, align 8
%__args.addr = alloca %"struct.std::pair"*, align 8
%exn.slot = alloca i8*, align 8
%ehselector.slot = alloca i32, align 4
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store %"struct.std::_Rb_tree_node"* %__node, %"struct.std::_Rb_tree_node"** %__node.addr, align 8
store %"struct.std::pair"* %__args, %"struct.std::pair"** %__args.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%0 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__node.addr, align 8
%1 = bitcast %"struct.std::_Rb_tree_node"* %0 to i8*
%2 = bitcast i8* %1 to %"struct.std::_Rb_tree_node"*
%call = call nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE21_M_get_Node_allocatorEv(%"class.std::_Rb_tree"* %this1) #11
%3 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__node.addr, align 8
%call2 = invoke %"struct.std::pair"* @_ZNSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(%"struct.std::_Rb_tree_node"* %3)
to label %invoke.cont unwind label %lpad
invoke.cont: ; preds = %entry
%4 = load %"struct.std::pair"*, %"struct.std::pair"** %__args.addr, align 8
%call3 = call nonnull align 8 dereferenceable(16) %"struct.std::pair"* @_ZSt7forwardIRKSt4pairIKiPcEEOT_RNSt16remove_referenceIS6_E4typeE(%"struct.std::pair"* nonnull align 8 dereferenceable(16) %4) #11
call void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE9constructIS4_JRKS4_EEEvRS6_PT_DpOT0_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %call, %"struct.std::pair"* %call2, %"struct.std::pair"* nonnull align 8 dereferenceable(16) %call3) #11
br label %try.cont
lpad: ; preds = %entry
%5 = landingpad { i8*, i32 }
catch i8* null
%6 = extractvalue { i8*, i32 } %5, 0
store i8* %6, i8** %exn.slot, align 8
%7 = extractvalue { i8*, i32 } %5, 1
store i32 %7, i32* %ehselector.slot, align 4
br label %catch
catch: ; preds = %lpad
%exn = load i8*, i8** %exn.slot, align 8
%8 = call i8* @__cxa_begin_catch(i8* %exn) #11
%9 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__node.addr, align 8
%10 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__node.addr, align 8
call void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_put_nodeEPSt13_Rb_tree_nodeIS3_E(%"class.std::_Rb_tree"* %this1, %"struct.std::_Rb_tree_node"* %10) #11
invoke void @__cxa_rethrow() #13
to label %unreachable unwind label %lpad4
lpad4: ; preds = %catch
%11 = landingpad { i8*, i32 }
cleanup
%12 = extractvalue { i8*, i32 } %11, 0
store i8* %12, i8** %exn.slot, align 8
%13 = extractvalue { i8*, i32 } %11, 1
store i32 %13, i32* %ehselector.slot, align 4
invoke void @__cxa_end_catch()
to label %invoke.cont5 unwind label %terminate.lpad
invoke.cont5: ; preds = %lpad4
br label %eh.resume
try.cont: ; preds = %invoke.cont
ret void
eh.resume: ; preds = %invoke.cont5
%exn6 = load i8*, i8** %exn.slot, align 8
%sel = load i32, i32* %ehselector.slot, align 4
%lpad.val = insertvalue { i8*, i32 } undef, i8* %exn6, 0
%lpad.val7 = insertvalue { i8*, i32 } %lpad.val, i32 %sel, 1
resume { i8*, i32 } %lpad.val7
terminate.lpad: ; preds = %lpad4
%14 = landingpad { i8*, i32 }
catch i8* null
%15 = extractvalue { i8*, i32 } %14, 0
call void @__clang_call_terminate(i8* %15) #12
unreachable
unreachable: ; preds = %catch
unreachable
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node"* @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE8allocateERS6_m(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a, i64 %__n) #0 comdat align 2 {
entry:
%__a.addr = alloca %"class.std::allocator"*, align 8
%__n.addr = alloca i64, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
store i64 %__n, i64* %__n.addr, align 8
%0 = load %"class.std::allocator"*, %"class.std::allocator"** %__a.addr, align 8
%1 = bitcast %"class.std::allocator"* %0 to %"class.__gnu_cxx::new_allocator"*
%2 = load i64, i64* %__n.addr, align 8
%call = call %"struct.std::_Rb_tree_node"* @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE8allocateEmPKv(%"class.__gnu_cxx::new_allocator"* %1, i64 %2, i8* null)
ret %"struct.std::_Rb_tree_node"* %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE21_M_get_Node_allocatorEv(%"class.std::_Rb_tree"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%0 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl to %"class.std::allocator"*
ret %"class.std::allocator"* %0
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node"* @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE8allocateEmPKv(%"class.__gnu_cxx::new_allocator"* %this, i64 %__n, i8* %0) #0 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
%__n.addr = alloca i64, align 8
%.addr = alloca i8*, align 8
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
store i64 %__n, i64* %__n.addr, align 8
store i8* %0, i8** %.addr, align 8
%this1 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
%1 = load i64, i64* %__n.addr, align 8
%call = call i64 @_ZNK9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE11_M_max_sizeEv(%"class.__gnu_cxx::new_allocator"* %this1) #11
%cmp = icmp ugt i64 %1, %call
br i1 %cmp, label %if.then, label %if.end4
if.then: ; preds = %entry
%2 = load i64, i64* %__n.addr, align 8
%cmp2 = icmp ugt i64 %2, 384307168202282325
br i1 %cmp2, label %if.then3, label %if.end
if.then3: ; preds = %if.then
call void @_ZSt28__throw_bad_array_new_lengthv() #13
unreachable
if.end: ; preds = %if.then
call void @_ZSt17__throw_bad_allocv() #13
unreachable
if.end4: ; preds = %entry
%3 = load i64, i64* %__n.addr, align 8
%mul = mul i64 %3, 48
%call5 = call noalias nonnull i8* @_Znwm(i64 %mul) #14
%4 = bitcast i8* %call5 to %"struct.std::_Rb_tree_node"*
ret %"struct.std::_Rb_tree_node"* %4
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i64 @_ZNK9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE11_M_max_sizeEv(%"class.__gnu_cxx::new_allocator"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
%this1 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
ret i64 192153584101141162
}
; Function Attrs: noreturn
declare dso_local void @_ZSt28__throw_bad_array_new_lengthv() #4
; Function Attrs: noreturn
declare dso_local void @_ZSt17__throw_bad_allocv() #4
; Function Attrs: nobuiltin allocsize(0)
declare dso_local nonnull i8* @_Znwm(i64) #5
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE9constructIS4_JRKS4_EEEvRS6_PT_DpOT0_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a, %"struct.std::pair"* %__p, %"struct.std::pair"* nonnull align 8 dereferenceable(16) %__args) #1 comdat align 2 {
entry:
%__a.addr = alloca %"class.std::allocator"*, align 8
%__p.addr = alloca %"struct.std::pair"*, align 8
%__args.addr = alloca %"struct.std::pair"*, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
store %"struct.std::pair"* %__p, %"struct.std::pair"** %__p.addr, align 8
store %"struct.std::pair"* %__args, %"struct.std::pair"** %__args.addr, align 8
%0 = load %"class.std::allocator"*, %"class.std::allocator"** %__a.addr, align 8
%1 = bitcast %"class.std::allocator"* %0 to %"class.__gnu_cxx::new_allocator"*
%2 = load %"struct.std::pair"*, %"struct.std::pair"** %__p.addr, align 8
%3 = load %"struct.std::pair"*, %"struct.std::pair"** %__args.addr, align 8
%call = call nonnull align 8 dereferenceable(16) %"struct.std::pair"* @_ZSt7forwardIRKSt4pairIKiPcEEOT_RNSt16remove_referenceIS6_E4typeE(%"struct.std::pair"* nonnull align 8 dereferenceable(16) %3) #11
call void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE9constructIS5_JRKS5_EEEvPT_DpOT0_(%"class.__gnu_cxx::new_allocator"* %1, %"struct.std::pair"* %2, %"struct.std::pair"* nonnull align 8 dereferenceable(16) %call) #11
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_put_nodeEPSt13_Rb_tree_nodeIS3_E(%"class.std::_Rb_tree"* %this, %"struct.std::_Rb_tree_node"* %__p) #1 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__p.addr = alloca %"struct.std::_Rb_tree_node"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store %"struct.std::_Rb_tree_node"* %__p, %"struct.std::_Rb_tree_node"** %__p.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%call = call nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE21_M_get_Node_allocatorEv(%"class.std::_Rb_tree"* %this1) #11
%0 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__p.addr, align 8
invoke void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE10deallocateERS6_PS5_m(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %call, %"struct.std::_Rb_tree_node"* %0, i64 1)
to label %invoke.cont unwind label %terminate.lpad
invoke.cont: ; preds = %entry
ret void
terminate.lpad: ; preds = %entry
%1 = landingpad { i8*, i32 }
catch i8* null
%2 = extractvalue { i8*, i32 } %1, 0
call void @__clang_call_terminate(i8* %2) #12
unreachable
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE9constructIS5_JRKS5_EEEvPT_DpOT0_(%"class.__gnu_cxx::new_allocator"* %this, %"struct.std::pair"* %__p, %"struct.std::pair"* nonnull align 8 dereferenceable(16) %__args) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
%__p.addr = alloca %"struct.std::pair"*, align 8
%__args.addr = alloca %"struct.std::pair"*, align 8
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
store %"struct.std::pair"* %__p, %"struct.std::pair"** %__p.addr, align 8
store %"struct.std::pair"* %__args, %"struct.std::pair"** %__args.addr, align 8
%this1 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
%0 = load %"struct.std::pair"*, %"struct.std::pair"** %__p.addr, align 8
%1 = bitcast %"struct.std::pair"* %0 to i8*
%2 = bitcast i8* %1 to %"struct.std::pair"*
%3 = load %"struct.std::pair"*, %"struct.std::pair"** %__args.addr, align 8
%call = call nonnull align 8 dereferenceable(16) %"struct.std::pair"* @_ZSt7forwardIRKSt4pairIKiPcEEOT_RNSt16remove_referenceIS6_E4typeE(%"struct.std::pair"* nonnull align 8 dereferenceable(16) %3) #11
%4 = bitcast %"struct.std::pair"* %2 to i8*
%5 = bitcast %"struct.std::pair"* %call to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %4, i8* align 8 %5, i64 16, i1 false)
ret void
}
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #6
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE10deallocateERS6_PS5_m(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a, %"struct.std::_Rb_tree_node"* %__p, i64 %__n) #0 comdat align 2 {
entry:
%__a.addr = alloca %"class.std::allocator"*, align 8
%__p.addr = alloca %"struct.std::_Rb_tree_node"*, align 8
%__n.addr = alloca i64, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
store %"struct.std::_Rb_tree_node"* %__p, %"struct.std::_Rb_tree_node"** %__p.addr, align 8
store i64 %__n, i64* %__n.addr, align 8
%0 = load %"class.std::allocator"*, %"class.std::allocator"** %__a.addr, align 8
%1 = bitcast %"class.std::allocator"* %0 to %"class.__gnu_cxx::new_allocator"*
%2 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__p.addr, align 8
%3 = load i64, i64* %__n.addr, align 8
call void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE10deallocateEPS6_m(%"class.__gnu_cxx::new_allocator"* %1, %"struct.std::_Rb_tree_node"* %2, i64 %3)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE10deallocateEPS6_m(%"class.__gnu_cxx::new_allocator"* %this, %"struct.std::_Rb_tree_node"* %__p, i64 %__t) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
%__p.addr = alloca %"struct.std::_Rb_tree_node"*, align 8
%__t.addr = alloca i64, align 8
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
store %"struct.std::_Rb_tree_node"* %__p, %"struct.std::_Rb_tree_node"** %__p.addr, align 8
store i64 %__t, i64* %__t.addr, align 8
%this1 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
%0 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__p.addr, align 8
%1 = bitcast %"struct.std::_Rb_tree_node"* %0 to i8*
call void @_ZdlPv(i8* %1) #11
ret void
}
; Function Attrs: nobuiltin nounwind
declare dso_local void @_ZdlPv(i8*) #7
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::pair"* @_ZN9__gnu_cxx16__aligned_membufISt4pairIKiPcEE6_M_ptrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.__gnu_cxx::__aligned_membuf"*, align 8
store %"struct.__gnu_cxx::__aligned_membuf"* %this, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%this1 = load %"struct.__gnu_cxx::__aligned_membuf"*, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%call = call i8* @_ZN9__gnu_cxx16__aligned_membufISt4pairIKiPcEE7_M_addrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this1) #11
%0 = bitcast i8* %call to %"struct.std::pair"*
ret %"struct.std::pair"* %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i8* @_ZN9__gnu_cxx16__aligned_membufISt4pairIKiPcEE7_M_addrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.__gnu_cxx::__aligned_membuf"*, align 8
store %"struct.__gnu_cxx::__aligned_membuf"* %this, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%this1 = load %"struct.__gnu_cxx::__aligned_membuf"*, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%_M_storage = getelementptr inbounds %"struct.__gnu_cxx::__aligned_membuf", %"struct.__gnu_cxx::__aligned_membuf"* %this1, i32 0, i32 0
%0 = bitcast [16 x i8]* %_M_storage to i8*
ret i8* %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_drop_nodeEPSt13_Rb_tree_nodeIS3_E(%"class.std::_Rb_tree"* %this, %"struct.std::_Rb_tree_node"* %__p) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__p.addr = alloca %"struct.std::_Rb_tree_node"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store %"struct.std::_Rb_tree_node"* %__p, %"struct.std::_Rb_tree_node"** %__p.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%0 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__p.addr, align 8
call void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE15_M_destroy_nodeEPSt13_Rb_tree_nodeIS3_E(%"class.std::_Rb_tree"* %this1, %"struct.std::_Rb_tree_node"* %0) #11
%1 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__p.addr, align 8
call void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_put_nodeEPSt13_Rb_tree_nodeIS3_E(%"class.std::_Rb_tree"* %this1, %"struct.std::_Rb_tree_node"* %1) #11
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE15_M_destroy_nodeEPSt13_Rb_tree_nodeIS3_E(%"class.std::_Rb_tree"* %this, %"struct.std::_Rb_tree_node"* %__p) #1 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__p.addr = alloca %"struct.std::_Rb_tree_node"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store %"struct.std::_Rb_tree_node"* %__p, %"struct.std::_Rb_tree_node"** %__p.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%call = call nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE21_M_get_Node_allocatorEv(%"class.std::_Rb_tree"* %this1) #11
%0 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__p.addr, align 8
%call2 = invoke %"struct.std::pair"* @_ZNSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(%"struct.std::_Rb_tree_node"* %0)
to label %invoke.cont unwind label %terminate.lpad
invoke.cont: ; preds = %entry
call void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE7destroyIS4_EEvRS6_PT_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %call, %"struct.std::pair"* %call2) #11
%1 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__p.addr, align 8
ret void
terminate.lpad: ; preds = %entry
%2 = landingpad { i8*, i32 }
catch i8* null
%3 = extractvalue { i8*, i32 } %2, 0
call void @__clang_call_terminate(i8* %3) #12
unreachable
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE7destroyIS4_EEvRS6_PT_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a, %"struct.std::pair"* %__p) #1 comdat align 2 {
entry:
%__a.addr = alloca %"class.std::allocator"*, align 8
%__p.addr = alloca %"struct.std::pair"*, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
store %"struct.std::pair"* %__p, %"struct.std::pair"** %__p.addr, align 8
%0 = load %"class.std::allocator"*, %"class.std::allocator"** %__a.addr, align 8
%1 = bitcast %"class.std::allocator"* %0 to %"class.__gnu_cxx::new_allocator"*
%2 = load %"struct.std::pair"*, %"struct.std::pair"** %__p.addr, align 8
call void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE7destroyIS5_EEvPT_(%"class.__gnu_cxx::new_allocator"* %1, %"struct.std::pair"* %2) #11
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE7destroyIS5_EEvPT_(%"class.__gnu_cxx::new_allocator"* %this, %"struct.std::pair"* %__p) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
%__p.addr = alloca %"struct.std::pair"*, align 8
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
store %"struct.std::pair"* %__p, %"struct.std::pair"** %__p.addr, align 8
%this1 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
%0 = load %"struct.std::pair"*, %"struct.std::pair"** %__p.addr, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node_base"* @_ZNSt18_Rb_tree_node_base10_S_minimumEPS_(%"struct.std::_Rb_tree_node_base"* %__x) #1 comdat align 2 {
entry:
%__x.addr = alloca %"struct.std::_Rb_tree_node_base"*, align 8
store %"struct.std::_Rb_tree_node_base"* %__x, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
br label %while.cond
while.cond: ; preds = %while.body, %entry
%0 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
%_M_left = getelementptr inbounds %"struct.std::_Rb_tree_node_base", %"struct.std::_Rb_tree_node_base"* %0, i32 0, i32 2
%1 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_left, align 8
%cmp = icmp ne %"struct.std::_Rb_tree_node_base"* %1, null
br i1 %cmp, label %while.body, label %while.end
while.body: ; preds = %while.cond
%2 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
%_M_left1 = getelementptr inbounds %"struct.std::_Rb_tree_node_base", %"struct.std::_Rb_tree_node_base"* %2, i32 0, i32 2
%3 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_left1, align 8
store %"struct.std::_Rb_tree_node_base"* %3, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
br label %while.cond
while.end: ; preds = %while.cond
%4 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
ret %"struct.std::_Rb_tree_node_base"* %4
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node_base"* @_ZNSt18_Rb_tree_node_base10_S_maximumEPS_(%"struct.std::_Rb_tree_node_base"* %__x) #1 comdat align 2 {
entry:
%__x.addr = alloca %"struct.std::_Rb_tree_node_base"*, align 8
store %"struct.std::_Rb_tree_node_base"* %__x, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
br label %while.cond
while.cond: ; preds = %while.body, %entry
%0 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
%_M_right = getelementptr inbounds %"struct.std::_Rb_tree_node_base", %"struct.std::_Rb_tree_node_base"* %0, i32 0, i32 3
%1 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_right, align 8
%cmp = icmp ne %"struct.std::_Rb_tree_node_base"* %1, null
br i1 %cmp, label %while.body, label %while.end
while.body: ; preds = %while.cond
%2 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
%_M_right1 = getelementptr inbounds %"struct.std::_Rb_tree_node_base", %"struct.std::_Rb_tree_node_base"* %2, i32 0, i32 3
%3 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_right1, align 8
store %"struct.std::_Rb_tree_node_base"* %3, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
br label %while.cond
while.end: ; preds = %while.cond
%4 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
ret %"struct.std::_Rb_tree_node_base"* %4
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EED2Ev(%"class.std::_Rb_tree"* %this) unnamed_addr #1 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%exn.slot = alloca i8*, align 8
%ehselector.slot = alloca i32, align 4
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%call = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_M_beginEv(%"class.std::_Rb_tree"* %this1) #11
invoke void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_M_eraseEPSt13_Rb_tree_nodeIS3_E(%"class.std::_Rb_tree"* %this1, %"struct.std::_Rb_tree_node"* %call)
to label %invoke.cont unwind label %lpad
invoke.cont: ; preds = %entry
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
call void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE13_Rb_tree_implIS7_Lb1EED2Ev(%"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl) #11
ret void
lpad: ; preds = %entry
%0 = landingpad { i8*, i32 }
catch i8* null
%1 = extractvalue { i8*, i32 } %0, 0
store i8* %1, i8** %exn.slot, align 8
%2 = extractvalue { i8*, i32 } %0, 1
store i32 %2, i32* %ehselector.slot, align 4
%_M_impl2 = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
call void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE13_Rb_tree_implIS7_Lb1EED2Ev(%"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl2) #11
br label %terminate.handler
terminate.handler: ; preds = %lpad
%exn = load i8*, i8** %exn.slot, align 8
call void @__clang_call_terminate(i8* %exn) #12
unreachable
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_M_beginEv(%"class.std::_Rb_tree"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%call = call %"struct.std::_Rb_tree_node"* @_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE9_M_mbeginEv(%"class.std::_Rb_tree"* %this1) #11
ret %"struct.std::_Rb_tree_node"* %call
}
declare dso_local void @_ZN63CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_ncat_7411goodG2BSinkESt3mapIiPcSt4lessIiESaISt4pairIKiS1_EEE(%"class.std::map"*) #2
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node_base"* @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE11lower_boundERS4_(%"class.std::map"* %this, i32* nonnull align 4 dereferenceable(4) %__x) #0 comdat align 2 {
entry:
%retval = alloca %"struct.std::_Rb_tree_iterator", align 8
%this.addr = alloca %"class.std::map"*, align 8
%__x.addr = alloca i32*, align 8
store %"class.std::map"* %this, %"class.std::map"** %this.addr, align 8
store i32* %__x, i32** %__x.addr, align 8
%this1 = load %"class.std::map"*, %"class.std::map"** %this.addr, align 8
%_M_t = getelementptr inbounds %"class.std::map", %"class.std::map"* %this1, i32 0, i32 0
%0 = load i32*, i32** %__x.addr, align 8
%call = call %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11lower_boundERS1_(%"class.std::_Rb_tree"* %_M_t, i32* nonnull align 4 dereferenceable(4) %0)
%coerce.dive = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %call, %"struct.std::_Rb_tree_node_base"** %coerce.dive, align 8
%coerce.dive2 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
%1 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %coerce.dive2, align 8
ret %"struct.std::_Rb_tree_node_base"* %1
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local zeroext i1 @_ZSteqRKSt17_Rb_tree_iteratorISt4pairIKiPcEES6_(%"struct.std::_Rb_tree_iterator"* nonnull align 8 dereferenceable(8) %__x, %"struct.std::_Rb_tree_iterator"* nonnull align 8 dereferenceable(8) %__y) #1 comdat {
entry:
%__x.addr = alloca %"struct.std::_Rb_tree_iterator"*, align 8
%__y.addr = alloca %"struct.std::_Rb_tree_iterator"*, align 8
store %"struct.std::_Rb_tree_iterator"* %__x, %"struct.std::_Rb_tree_iterator"** %__x.addr, align 8
store %"struct.std::_Rb_tree_iterator"* %__y, %"struct.std::_Rb_tree_iterator"** %__y.addr, align 8
%0 = load %"struct.std::_Rb_tree_iterator"*, %"struct.std::_Rb_tree_iterator"** %__x.addr, align 8
%_M_node = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %0, i32 0, i32 0
%1 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node, align 8
%2 = load %"struct.std::_Rb_tree_iterator"*, %"struct.std::_Rb_tree_iterator"** %__y.addr, align 8
%_M_node1 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %2, i32 0, i32 0
%3 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node1, align 8
%cmp = icmp eq %"struct.std::_Rb_tree_node_base"* %1, %3
ret i1 %cmp
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node_base"* @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE3endEv(%"class.std::map"* %this) #1 comdat align 2 {
entry:
%retval = alloca %"struct.std::_Rb_tree_iterator", align 8
%this.addr = alloca %"class.std::map"*, align 8
store %"class.std::map"* %this, %"class.std::map"** %this.addr, align 8
%this1 = load %"class.std::map"*, %"class.std::map"** %this.addr, align 8
%_M_t = getelementptr inbounds %"class.std::map", %"class.std::map"* %this1, i32 0, i32 0
%call = call %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE3endEv(%"class.std::_Rb_tree"* %_M_t) #11
%coerce.dive = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %call, %"struct.std::_Rb_tree_node_base"** %coerce.dive, align 8
%coerce.dive2 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
%0 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %coerce.dive2, align 8
ret %"struct.std::_Rb_tree_node_base"* %0
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNKSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE8key_compEv(%"class.std::map"* %this) #0 comdat align 2 {
entry:
%this.addr = alloca %"class.std::map"*, align 8
%undef.agg.tmp = alloca %"struct.std::less", align 1
store %"class.std::map"* %this, %"class.std::map"** %this.addr, align 8
%this1 = load %"class.std::map"*, %"class.std::map"** %this.addr, align 8
%_M_t = getelementptr inbounds %"class.std::map", %"class.std::map"* %this1, i32 0, i32 0
call void @_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8key_compEv(%"class.std::_Rb_tree"* %_M_t)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local zeroext i1 @_ZNKSt4lessIiEclERKiS2_(%"struct.std::less"* %this, i32* nonnull align 4 dereferenceable(4) %__x, i32* nonnull align 4 dereferenceable(4) %__y) #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::less"*, align 8
%__x.addr = alloca i32*, align 8
%__y.addr = alloca i32*, align 8
store %"struct.std::less"* %this, %"struct.std::less"** %this.addr, align 8
store i32* %__x, i32** %__x.addr, align 8
store i32* %__y, i32** %__y.addr, align 8
%this1 = load %"struct.std::less"*, %"struct.std::less"** %this.addr, align 8
%0 = load i32*, i32** %__x.addr, align 8
%1 = load i32, i32* %0, align 4
%2 = load i32*, i32** %__y.addr, align 8
%3 = load i32, i32* %2, align 4
%cmp = icmp slt i32 %1, %3
ret i1 %cmp
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(16) %"struct.std::pair"* @_ZNKSt17_Rb_tree_iteratorISt4pairIKiPcEEdeEv(%"struct.std::_Rb_tree_iterator"* %this) #1 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%this.addr = alloca %"struct.std::_Rb_tree_iterator"*, align 8
store %"struct.std::_Rb_tree_iterator"* %this, %"struct.std::_Rb_tree_iterator"** %this.addr, align 8
%this1 = load %"struct.std::_Rb_tree_iterator"*, %"struct.std::_Rb_tree_iterator"** %this.addr, align 8
%_M_node = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %this1, i32 0, i32 0
%0 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node, align 8
%1 = bitcast %"struct.std::_Rb_tree_node_base"* %0 to %"struct.std::_Rb_tree_node"*
%call = invoke %"struct.std::pair"* @_ZNSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(%"struct.std::_Rb_tree_node"* %1)
to label %invoke.cont unwind label %terminate.lpad
invoke.cont: ; preds = %entry
ret %"struct.std::pair"* %call
terminate.lpad: ; preds = %entry
%2 = landingpad { i8*, i32 }
catch i8* null
%3 = extractvalue { i8*, i32 } %2, 0
call void @__clang_call_terminate(i8* %3) #12
unreachable
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJOiEESE_IJEEEEESt17_Rb_tree_iteratorIS3_ESt23_Rb_tree_const_iteratorIS3_EDpOT_(%"class.std::_Rb_tree"* %this, %"struct.std::_Rb_tree_node_base"* %__pos.coerce, %"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %__args, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %__args1, %"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %__args3) #0 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%retval = alloca %"struct.std::_Rb_tree_iterator", align 8
%__pos = alloca %"struct.std::_Rb_tree_const_iterator", align 8
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__args.addr = alloca %"struct.std::piecewise_construct_t"*, align 8
%__args.addr2 = alloca %"class.std::tuple"*, align 8
%__args.addr4 = alloca %"class.std::tuple.0"*, align 8
%__z = alloca %"struct.std::_Rb_tree_node"*, align 8
%__res = alloca %"struct.std::pair.1", align 8
%agg.tmp = alloca %"struct.std::_Rb_tree_const_iterator", align 8
%exn.slot = alloca i8*, align 8
%ehselector.slot = alloca i32, align 4
%coerce.dive = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", %"struct.std::_Rb_tree_const_iterator"* %__pos, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %__pos.coerce, %"struct.std::_Rb_tree_node_base"** %coerce.dive, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store %"struct.std::piecewise_construct_t"* %__args, %"struct.std::piecewise_construct_t"** %__args.addr, align 8
store %"class.std::tuple"* %__args1, %"class.std::tuple"** %__args.addr2, align 8
store %"class.std::tuple.0"* %__args3, %"class.std::tuple.0"** %__args.addr4, align 8
%this5 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%0 = load %"struct.std::piecewise_construct_t"*, %"struct.std::piecewise_construct_t"** %__args.addr, align 8
%call = call nonnull align 1 dereferenceable(1) %"struct.std::piecewise_construct_t"* @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(%"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %0) #11
%1 = load %"class.std::tuple"*, %"class.std::tuple"** %__args.addr2, align 8
%call6 = call nonnull align 8 dereferenceable(8) %"class.std::tuple"* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(%"class.std::tuple"* nonnull align 8 dereferenceable(8) %1) #11
%2 = load %"class.std::tuple.0"*, %"class.std::tuple.0"** %__args.addr4, align 8
%call7 = call nonnull align 1 dereferenceable(1) %"class.std::tuple.0"* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(%"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %2) #11
%call8 = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_create_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESE_IJEEEEEPSt13_Rb_tree_nodeIS3_EDpOT_(%"class.std::_Rb_tree"* %this5, %"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %call, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %call6, %"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %call7)
store %"struct.std::_Rb_tree_node"* %call8, %"struct.std::_Rb_tree_node"** %__z, align 8
%3 = bitcast %"struct.std::_Rb_tree_const_iterator"* %agg.tmp to i8*
%4 = bitcast %"struct.std::_Rb_tree_const_iterator"* %__pos to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %3, i8* align 8 %4, i64 8, i1 false)
%5 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__z, align 8
%call9 = invoke nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt13_Rb_tree_nodeIS3_E(%"struct.std::_Rb_tree_node"* %5)
to label %invoke.cont unwind label %lpad
invoke.cont: ; preds = %entry
%coerce.dive10 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", %"struct.std::_Rb_tree_const_iterator"* %agg.tmp, i32 0, i32 0
%6 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %coerce.dive10, align 8
%call12 = invoke { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS3_ERS1_(%"class.std::_Rb_tree"* %this5, %"struct.std::_Rb_tree_node_base"* %6, i32* nonnull align 4 dereferenceable(4) %call9)
to label %invoke.cont11 unwind label %lpad
invoke.cont11: ; preds = %invoke.cont
%7 = bitcast %"struct.std::pair.1"* %__res to { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }*
%8 = getelementptr inbounds { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }, { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }* %7, i32 0, i32 0
%9 = extractvalue { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } %call12, 0
store %"struct.std::_Rb_tree_node_base"* %9, %"struct.std::_Rb_tree_node_base"** %8, align 8
%10 = getelementptr inbounds { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }, { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }* %7, i32 0, i32 1
%11 = extractvalue { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } %call12, 1
store %"struct.std::_Rb_tree_node_base"* %11, %"struct.std::_Rb_tree_node_base"** %10, align 8
%second = getelementptr inbounds %"struct.std::pair.1", %"struct.std::pair.1"* %__res, i32 0, i32 1
%12 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %second, align 8
%tobool = icmp ne %"struct.std::_Rb_tree_node_base"* %12, null
br i1 %tobool, label %if.then, label %if.end
if.then: ; preds = %invoke.cont11
%first = getelementptr inbounds %"struct.std::pair.1", %"struct.std::pair.1"* %__res, i32 0, i32 0
%13 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %first, align 8
%second13 = getelementptr inbounds %"struct.std::pair.1", %"struct.std::pair.1"* %__res, i32 0, i32 1
%14 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %second13, align 8
%15 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__z, align 8
%call15 = invoke %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_insert_nodeEPSt18_Rb_tree_node_baseSB_PSt13_Rb_tree_nodeIS3_E(%"class.std::_Rb_tree"* %this5, %"struct.std::_Rb_tree_node_base"* %13, %"struct.std::_Rb_tree_node_base"* %14, %"struct.std::_Rb_tree_node"* %15)
to label %invoke.cont14 unwind label %lpad
invoke.cont14: ; preds = %if.then
%coerce.dive16 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %call15, %"struct.std::_Rb_tree_node_base"** %coerce.dive16, align 8
br label %return
lpad: ; preds = %if.then, %invoke.cont, %entry
%16 = landingpad { i8*, i32 }
catch i8* null
%17 = extractvalue { i8*, i32 } %16, 0
store i8* %17, i8** %exn.slot, align 8
%18 = extractvalue { i8*, i32 } %16, 1
store i32 %18, i32* %ehselector.slot, align 4
br label %catch
catch: ; preds = %lpad
%exn = load i8*, i8** %exn.slot, align 8
%19 = call i8* @__cxa_begin_catch(i8* %exn) #11
%20 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__z, align 8
call void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_drop_nodeEPSt13_Rb_tree_nodeIS3_E(%"class.std::_Rb_tree"* %this5, %"struct.std::_Rb_tree_node"* %20) #11
invoke void @__cxa_rethrow() #13
to label %unreachable unwind label %lpad18
if.end: ; preds = %invoke.cont11
%21 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__z, align 8
call void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_drop_nodeEPSt13_Rb_tree_nodeIS3_E(%"class.std::_Rb_tree"* %this5, %"struct.std::_Rb_tree_node"* %21) #11
%first17 = getelementptr inbounds %"struct.std::pair.1", %"struct.std::pair.1"* %__res, i32 0, i32 0
%22 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %first17, align 8
call void @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC2EPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_iterator"* %retval, %"struct.std::_Rb_tree_node_base"* %22) #11
br label %return
lpad18: ; preds = %catch
%23 = landingpad { i8*, i32 }
cleanup
%24 = extractvalue { i8*, i32 } %23, 0
store i8* %24, i8** %exn.slot, align 8
%25 = extractvalue { i8*, i32 } %23, 1
store i32 %25, i32* %ehselector.slot, align 4
invoke void @__cxa_end_catch()
to label %invoke.cont19 unwind label %terminate.lpad
invoke.cont19: ; preds = %lpad18
br label %eh.resume
try.cont: ; No predecessors!
call void @llvm.trap()
unreachable
return: ; preds = %if.end, %invoke.cont14
%coerce.dive20 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
%26 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %coerce.dive20, align 8
ret %"struct.std::_Rb_tree_node_base"* %26
eh.resume: ; preds = %invoke.cont19
%exn21 = load i8*, i8** %exn.slot, align 8
%sel = load i32, i32* %ehselector.slot, align 4
%lpad.val = insertvalue { i8*, i32 } undef, i8* %exn21, 0
%lpad.val22 = insertvalue { i8*, i32 } %lpad.val, i32 %sel, 1
resume { i8*, i32 } %lpad.val22
terminate.lpad: ; preds = %lpad18
%27 = landingpad { i8*, i32 }
catch i8* null
%28 = extractvalue { i8*, i32 } %27, 0
call void @__clang_call_terminate(i8* %28) #12
unreachable
unreachable: ; preds = %catch
unreachable
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt23_Rb_tree_const_iteratorISt4pairIKiPcEEC2ERKSt17_Rb_tree_iteratorIS3_E(%"struct.std::_Rb_tree_const_iterator"* %this, %"struct.std::_Rb_tree_iterator"* nonnull align 8 dereferenceable(8) %__it) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Rb_tree_const_iterator"*, align 8
%__it.addr = alloca %"struct.std::_Rb_tree_iterator"*, align 8
store %"struct.std::_Rb_tree_const_iterator"* %this, %"struct.std::_Rb_tree_const_iterator"** %this.addr, align 8
store %"struct.std::_Rb_tree_iterator"* %__it, %"struct.std::_Rb_tree_iterator"** %__it.addr, align 8
%this1 = load %"struct.std::_Rb_tree_const_iterator"*, %"struct.std::_Rb_tree_const_iterator"** %this.addr, align 8
%_M_node = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", %"struct.std::_Rb_tree_const_iterator"* %this1, i32 0, i32 0
%0 = load %"struct.std::_Rb_tree_iterator"*, %"struct.std::_Rb_tree_iterator"** %__it.addr, align 8
%_M_node2 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %0, i32 0, i32 0
%1 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node2, align 8
store %"struct.std::_Rb_tree_node_base"* %1, %"struct.std::_Rb_tree_node_base"** %_M_node, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZSt16forward_as_tupleIJiEESt5tupleIJDpOT_EES3_(%"class.std::tuple"* noalias sret align 8 %agg.result, i32* nonnull align 4 dereferenceable(4) %__args) #1 comdat {
entry:
%result.ptr = alloca i8*, align 8
%__args.addr = alloca i32*, align 8
%0 = bitcast %"class.std::tuple"* %agg.result to i8*
store i8* %0, i8** %result.ptr, align 8
store i32* %__args, i32** %__args.addr, align 8
%1 = load i32*, i32** %__args.addr, align 8
%call = call nonnull align 4 dereferenceable(4) i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i32* nonnull align 4 dereferenceable(4) %1) #11
call void @_ZNSt5tupleIJOiEEC2IJiELb1ELb1EEEDpOT_(%"class.std::tuple"* %agg.result, i32* nonnull align 4 dereferenceable(4) %call) #11
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 4 dereferenceable(4) i32* @_ZSt4moveIRiEONSt16remove_referenceIT_E4typeEOS2_(i32* nonnull align 4 dereferenceable(4) %__t) #1 comdat {
entry:
%__t.addr = alloca i32*, align 8
store i32* %__t, i32** %__t.addr, align 8
%0 = load i32*, i32** %__t.addr, align 8
ret i32* %0
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11lower_boundERS1_(%"class.std::_Rb_tree"* %this, i32* nonnull align 4 dereferenceable(4) %__k) #0 comdat align 2 {
entry:
%retval = alloca %"struct.std::_Rb_tree_iterator", align 8
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__k.addr = alloca i32*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store i32* %__k, i32** %__k.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%call = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_M_beginEv(%"class.std::_Rb_tree"* %this1) #11
%call2 = call %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_M_endEv(%"class.std::_Rb_tree"* %this1) #11
%0 = load i32*, i32** %__k.addr, align 8
%call3 = call %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_lower_boundEPSt13_Rb_tree_nodeIS3_EPSt18_Rb_tree_node_baseRS1_(%"class.std::_Rb_tree"* %this1, %"struct.std::_Rb_tree_node"* %call, %"struct.std::_Rb_tree_node_base"* %call2, i32* nonnull align 4 dereferenceable(4) %0)
%coerce.dive = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %call3, %"struct.std::_Rb_tree_node_base"** %coerce.dive, align 8
%coerce.dive4 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
%1 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %coerce.dive4, align 8
ret %"struct.std::_Rb_tree_node_base"* %1
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_lower_boundEPSt13_Rb_tree_nodeIS3_EPSt18_Rb_tree_node_baseRS1_(%"class.std::_Rb_tree"* %this, %"struct.std::_Rb_tree_node"* %__x, %"struct.std::_Rb_tree_node_base"* %__y, i32* nonnull align 4 dereferenceable(4) %__k) #0 comdat align 2 {
entry:
%retval = alloca %"struct.std::_Rb_tree_iterator", align 8
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__x.addr = alloca %"struct.std::_Rb_tree_node"*, align 8
%__y.addr = alloca %"struct.std::_Rb_tree_node_base"*, align 8
%__k.addr = alloca i32*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store %"struct.std::_Rb_tree_node"* %__x, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
store %"struct.std::_Rb_tree_node_base"* %__y, %"struct.std::_Rb_tree_node_base"** %__y.addr, align 8
store i32* %__k, i32** %__k.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
br label %while.cond
while.cond: ; preds = %if.end, %entry
%0 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
%cmp = icmp ne %"struct.std::_Rb_tree_node"* %0, null
br i1 %cmp, label %while.body, label %while.end
while.body: ; preds = %while.cond
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%1 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl to %"struct.std::_Rb_tree_key_compare"*
%_M_key_compare = getelementptr inbounds %"struct.std::_Rb_tree_key_compare", %"struct.std::_Rb_tree_key_compare"* %1, i32 0, i32 0
%2 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
%call = call nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt13_Rb_tree_nodeIS3_E(%"struct.std::_Rb_tree_node"* %2)
%3 = load i32*, i32** %__k.addr, align 8
%call2 = call zeroext i1 @_ZNKSt4lessIiEclERKiS2_(%"struct.std::less"* %_M_key_compare, i32* nonnull align 4 dereferenceable(4) %call, i32* nonnull align 4 dereferenceable(4) %3)
br i1 %call2, label %if.else, label %if.then
if.then: ; preds = %while.body
%4 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
%5 = bitcast %"struct.std::_Rb_tree_node"* %4 to %"struct.std::_Rb_tree_node_base"*
store %"struct.std::_Rb_tree_node_base"* %5, %"struct.std::_Rb_tree_node_base"** %__y.addr, align 8
%6 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
%7 = bitcast %"struct.std::_Rb_tree_node"* %6 to %"struct.std::_Rb_tree_node_base"*
%call3 = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_S_leftEPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %7) #11
store %"struct.std::_Rb_tree_node"* %call3, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
br label %if.end
if.else: ; preds = %while.body
%8 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
%9 = bitcast %"struct.std::_Rb_tree_node"* %8 to %"struct.std::_Rb_tree_node_base"*
%call4 = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %9) #11
store %"struct.std::_Rb_tree_node"* %call4, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
br label %if.end
if.end: ; preds = %if.else, %if.then
br label %while.cond
while.end: ; preds = %while.cond
%10 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__y.addr, align 8
call void @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC2EPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_iterator"* %retval, %"struct.std::_Rb_tree_node_base"* %10) #11
%coerce.dive = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
%11 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %coerce.dive, align 8
ret %"struct.std::_Rb_tree_node_base"* %11
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt13_Rb_tree_nodeIS3_E(%"struct.std::_Rb_tree_node"* %__x) #0 comdat align 2 {
entry:
%__x.addr = alloca %"struct.std::_Rb_tree_node"*, align 8
%ref.tmp = alloca %"struct.std::_Select1st", align 1
store %"struct.std::_Rb_tree_node"* %__x, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
%0 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
%call = call %"struct.std::pair"* @_ZNKSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(%"struct.std::_Rb_tree_node"* %0)
%call1 = call nonnull align 4 dereferenceable(4) i32* @_ZNKSt10_Select1stISt4pairIKiPcEEclERKS3_(%"struct.std::_Select1st"* %ref.tmp, %"struct.std::pair"* nonnull align 8 dereferenceable(16) %call)
ret i32* %call1
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC2EPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_iterator"* %this, %"struct.std::_Rb_tree_node_base"* %__x) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Rb_tree_iterator"*, align 8
%__x.addr = alloca %"struct.std::_Rb_tree_node_base"*, align 8
store %"struct.std::_Rb_tree_iterator"* %this, %"struct.std::_Rb_tree_iterator"** %this.addr, align 8
store %"struct.std::_Rb_tree_node_base"* %__x, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
%this1 = load %"struct.std::_Rb_tree_iterator"*, %"struct.std::_Rb_tree_iterator"** %this.addr, align 8
%_M_node = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %this1, i32 0, i32 0
%0 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
store %"struct.std::_Rb_tree_node_base"* %0, %"struct.std::_Rb_tree_node_base"** %_M_node, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 4 dereferenceable(4) i32* @_ZNKSt10_Select1stISt4pairIKiPcEEclERKS3_(%"struct.std::_Select1st"* %this, %"struct.std::pair"* nonnull align 8 dereferenceable(16) %__x) #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Select1st"*, align 8
%__x.addr = alloca %"struct.std::pair"*, align 8
store %"struct.std::_Select1st"* %this, %"struct.std::_Select1st"** %this.addr, align 8
store %"struct.std::pair"* %__x, %"struct.std::pair"** %__x.addr, align 8
%this1 = load %"struct.std::_Select1st"*, %"struct.std::_Select1st"** %this.addr, align 8
%0 = load %"struct.std::pair"*, %"struct.std::pair"** %__x.addr, align 8
%first = getelementptr inbounds %"struct.std::pair", %"struct.std::pair"* %0, i32 0, i32 0
ret i32* %first
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::pair"* @_ZNKSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(%"struct.std::_Rb_tree_node"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Rb_tree_node"*, align 8
store %"struct.std::_Rb_tree_node"* %this, %"struct.std::_Rb_tree_node"** %this.addr, align 8
%this1 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %this.addr, align 8
%_M_storage = getelementptr inbounds %"struct.std::_Rb_tree_node", %"struct.std::_Rb_tree_node"* %this1, i32 0, i32 1
%call = call %"struct.std::pair"* @_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiPcEE6_M_ptrEv(%"struct.__gnu_cxx::__aligned_membuf"* %_M_storage) #11
ret %"struct.std::pair"* %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::pair"* @_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiPcEE6_M_ptrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.__gnu_cxx::__aligned_membuf"*, align 8
store %"struct.__gnu_cxx::__aligned_membuf"* %this, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%this1 = load %"struct.__gnu_cxx::__aligned_membuf"*, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%call = call i8* @_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiPcEE7_M_addrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this1) #11
%0 = bitcast i8* %call to %"struct.std::pair"*
ret %"struct.std::pair"* %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i8* @_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiPcEE7_M_addrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.__gnu_cxx::__aligned_membuf"*, align 8
store %"struct.__gnu_cxx::__aligned_membuf"* %this, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%this1 = load %"struct.__gnu_cxx::__aligned_membuf"*, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%_M_storage = getelementptr inbounds %"struct.__gnu_cxx::__aligned_membuf", %"struct.__gnu_cxx::__aligned_membuf"* %this1, i32 0, i32 0
%0 = bitcast [16 x i8]* %_M_storage to i8*
ret i8* %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE3endEv(%"class.std::_Rb_tree"* %this) #1 comdat align 2 {
entry:
%retval = alloca %"struct.std::_Rb_tree_iterator", align 8
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%0 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl to i8*
%add.ptr = getelementptr inbounds i8, i8* %0, i64 8
%1 = bitcast i8* %add.ptr to %"struct.std::_Rb_tree_header"*
%_M_header = getelementptr inbounds %"struct.std::_Rb_tree_header", %"struct.std::_Rb_tree_header"* %1, i32 0, i32 0
call void @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC2EPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_iterator"* %retval, %"struct.std::_Rb_tree_node_base"* %_M_header) #11
%coerce.dive = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
%2 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %coerce.dive, align 8
ret %"struct.std::_Rb_tree_node_base"* %2
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8key_compEv(%"class.std::_Rb_tree"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%0 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl to %"struct.std::_Rb_tree_key_compare"*
%_M_key_compare = getelementptr inbounds %"struct.std::_Rb_tree_key_compare", %"struct.std::_Rb_tree_key_compare"* %0, i32 0, i32 0
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_create_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESE_IJEEEEEPSt13_Rb_tree_nodeIS3_EDpOT_(%"class.std::_Rb_tree"* %this, %"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %__args, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %__args1, %"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %__args3) #0 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__args.addr = alloca %"struct.std::piecewise_construct_t"*, align 8
%__args.addr2 = alloca %"class.std::tuple"*, align 8
%__args.addr4 = alloca %"class.std::tuple.0"*, align 8
%__tmp = alloca %"struct.std::_Rb_tree_node"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store %"struct.std::piecewise_construct_t"* %__args, %"struct.std::piecewise_construct_t"** %__args.addr, align 8
store %"class.std::tuple"* %__args1, %"class.std::tuple"** %__args.addr2, align 8
store %"class.std::tuple.0"* %__args3, %"class.std::tuple.0"** %__args.addr4, align 8
%this5 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%call = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_get_nodeEv(%"class.std::_Rb_tree"* %this5)
store %"struct.std::_Rb_tree_node"* %call, %"struct.std::_Rb_tree_node"** %__tmp, align 8
%0 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__tmp, align 8
%1 = load %"struct.std::piecewise_construct_t"*, %"struct.std::piecewise_construct_t"** %__args.addr, align 8
%call6 = call nonnull align 1 dereferenceable(1) %"struct.std::piecewise_construct_t"* @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(%"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %1) #11
%2 = load %"class.std::tuple"*, %"class.std::tuple"** %__args.addr2, align 8
%call7 = call nonnull align 8 dereferenceable(8) %"class.std::tuple"* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(%"class.std::tuple"* nonnull align 8 dereferenceable(8) %2) #11
%3 = load %"class.std::tuple.0"*, %"class.std::tuple.0"** %__args.addr4, align 8
%call8 = call nonnull align 1 dereferenceable(1) %"class.std::tuple.0"* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(%"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %3) #11
call void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE17_M_construct_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESE_IJEEEEEvPSt13_Rb_tree_nodeIS3_EDpOT_(%"class.std::_Rb_tree"* %this5, %"struct.std::_Rb_tree_node"* %0, %"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %call6, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %call7, %"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %call8)
%4 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__tmp, align 8
ret %"struct.std::_Rb_tree_node"* %4
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 1 dereferenceable(1) %"struct.std::piecewise_construct_t"* @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(%"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %__t) #1 comdat {
entry:
%__t.addr = alloca %"struct.std::piecewise_construct_t"*, align 8
store %"struct.std::piecewise_construct_t"* %__t, %"struct.std::piecewise_construct_t"** %__t.addr, align 8
%0 = load %"struct.std::piecewise_construct_t"*, %"struct.std::piecewise_construct_t"** %__t.addr, align 8
ret %"struct.std::piecewise_construct_t"* %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) %"class.std::tuple"* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(%"class.std::tuple"* nonnull align 8 dereferenceable(8) %__t) #1 comdat {
entry:
%__t.addr = alloca %"class.std::tuple"*, align 8
store %"class.std::tuple"* %__t, %"class.std::tuple"** %__t.addr, align 8
%0 = load %"class.std::tuple"*, %"class.std::tuple"** %__t.addr, align 8
ret %"class.std::tuple"* %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 1 dereferenceable(1) %"class.std::tuple.0"* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(%"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %__t) #1 comdat {
entry:
%__t.addr = alloca %"class.std::tuple.0"*, align 8
store %"class.std::tuple.0"* %__t, %"class.std::tuple.0"** %__t.addr, align 8
%0 = load %"class.std::tuple.0"*, %"class.std::tuple.0"** %__t.addr, align 8
ret %"class.std::tuple.0"* %0
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS3_ERS1_(%"class.std::_Rb_tree"* %this, %"struct.std::_Rb_tree_node_base"* %__position.coerce, i32* nonnull align 4 dereferenceable(4) %__k) #0 comdat align 2 {
entry:
%retval = alloca %"struct.std::pair.1", align 8
%__position = alloca %"struct.std::_Rb_tree_const_iterator", align 8
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__k.addr = alloca i32*, align 8
%__pos = alloca %"struct.std::_Rb_tree_iterator", align 8
%ref.tmp = alloca %"struct.std::_Rb_tree_node_base"*, align 8
%__before = alloca %"struct.std::_Rb_tree_iterator", align 8
%ref.tmp37 = alloca %"struct.std::_Rb_tree_node_base"*, align 8
%__after = alloca %"struct.std::_Rb_tree_iterator", align 8
%ref.tmp55 = alloca %"struct.std::_Rb_tree_node_base"*, align 8
%ref.tmp69 = alloca %"struct.std::_Rb_tree_node_base"*, align 8
%ref.tmp78 = alloca %"struct.std::_Rb_tree_node_base"*, align 8
%coerce.dive = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", %"struct.std::_Rb_tree_const_iterator"* %__position, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %__position.coerce, %"struct.std::_Rb_tree_node_base"** %coerce.dive, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store i32* %__k, i32** %__k.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%call = call %"struct.std::_Rb_tree_node_base"* @_ZNKSt23_Rb_tree_const_iteratorISt4pairIKiPcEE13_M_const_castEv(%"struct.std::_Rb_tree_const_iterator"* %__position) #11
%coerce.dive2 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__pos, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %call, %"struct.std::_Rb_tree_node_base"** %coerce.dive2, align 8
%_M_node = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__pos, i32 0, i32 0
%0 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node, align 8
%call3 = call %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_M_endEv(%"class.std::_Rb_tree"* %this1) #11
%cmp = icmp eq %"struct.std::_Rb_tree_node_base"* %0, %call3
br i1 %cmp, label %if.then, label %if.else12
if.then: ; preds = %entry
%call4 = call i64 @_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE4sizeEv(%"class.std::_Rb_tree"* %this1) #11
%cmp5 = icmp ugt i64 %call4, 0
br i1 %cmp5, label %land.lhs.true, label %if.else
land.lhs.true: ; preds = %if.then
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%1 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl to %"struct.std::_Rb_tree_key_compare"*
%_M_key_compare = getelementptr inbounds %"struct.std::_Rb_tree_key_compare", %"struct.std::_Rb_tree_key_compare"* %1, i32 0, i32 0
%call6 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_rightmostEv(%"class.std::_Rb_tree"* %this1) #11
%2 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %call6, align 8
%call7 = call nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %2)
%3 = load i32*, i32** %__k.addr, align 8
%call8 = call zeroext i1 @_ZNKSt4lessIiEclERKiS2_(%"struct.std::less"* %_M_key_compare, i32* nonnull align 4 dereferenceable(4) %call7, i32* nonnull align 4 dereferenceable(4) %3)
br i1 %call8, label %if.then9, label %if.else
if.then9: ; preds = %land.lhs.true
store %"struct.std::_Rb_tree_node_base"* null, %"struct.std::_Rb_tree_node_base"** %ref.tmp, align 8
%call10 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_rightmostEv(%"class.std::_Rb_tree"* %this1) #11
call void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_Lb1EEERKS1_OT_(%"struct.std::pair.1"* %retval, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %ref.tmp, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %call10)
br label %return
if.else: ; preds = %land.lhs.true, %if.then
%4 = load i32*, i32** %__k.addr, align 8
%call11 = call { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE24_M_get_insert_unique_posERS1_(%"class.std::_Rb_tree"* %this1, i32* nonnull align 4 dereferenceable(4) %4)
%5 = bitcast %"struct.std::pair.1"* %retval to { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }*
%6 = getelementptr inbounds { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }, { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }* %5, i32 0, i32 0
%7 = extractvalue { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } %call11, 0
store %"struct.std::_Rb_tree_node_base"* %7, %"struct.std::_Rb_tree_node_base"** %6, align 8
%8 = getelementptr inbounds { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }, { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }* %5, i32 0, i32 1
%9 = extractvalue { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } %call11, 1
store %"struct.std::_Rb_tree_node_base"* %9, %"struct.std::_Rb_tree_node_base"** %8, align 8
br label %return
if.else12: ; preds = %entry
%_M_impl13 = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%10 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl13 to %"struct.std::_Rb_tree_key_compare"*
%_M_key_compare14 = getelementptr inbounds %"struct.std::_Rb_tree_key_compare", %"struct.std::_Rb_tree_key_compare"* %10, i32 0, i32 0
%11 = load i32*, i32** %__k.addr, align 8
%_M_node15 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__pos, i32 0, i32 0
%12 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node15, align 8
%call16 = call nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %12)
%call17 = call zeroext i1 @_ZNKSt4lessIiEclERKiS2_(%"struct.std::less"* %_M_key_compare14, i32* nonnull align 4 dereferenceable(4) %11, i32* nonnull align 4 dereferenceable(4) %call16)
br i1 %call17, label %if.then18, label %if.else44
if.then18: ; preds = %if.else12
%13 = bitcast %"struct.std::_Rb_tree_iterator"* %__before to i8*
%14 = bitcast %"struct.std::_Rb_tree_iterator"* %__pos to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %13, i8* align 8 %14, i64 8, i1 false)
%_M_node19 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__pos, i32 0, i32 0
%15 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node19, align 8
%call20 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_leftmostEv(%"class.std::_Rb_tree"* %this1) #11
%16 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %call20, align 8
%cmp21 = icmp eq %"struct.std::_Rb_tree_node_base"* %15, %16
br i1 %cmp21, label %if.then22, label %if.else25
if.then22: ; preds = %if.then18
%call23 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_leftmostEv(%"class.std::_Rb_tree"* %this1) #11
%call24 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_leftmostEv(%"class.std::_Rb_tree"* %this1) #11
call void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_S4_Lb1EEEOT_OT0_(%"struct.std::pair.1"* %retval, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %call23, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %call24)
br label %return
if.else25: ; preds = %if.then18
%_M_impl26 = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%17 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl26 to %"struct.std::_Rb_tree_key_compare"*
%_M_key_compare27 = getelementptr inbounds %"struct.std::_Rb_tree_key_compare", %"struct.std::_Rb_tree_key_compare"* %17, i32 0, i32 0
%call28 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_iterator"* @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEmmEv(%"struct.std::_Rb_tree_iterator"* %__before) #11
%_M_node29 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %call28, i32 0, i32 0
%18 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node29, align 8
%call30 = call nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %18)
%19 = load i32*, i32** %__k.addr, align 8
%call31 = call zeroext i1 @_ZNKSt4lessIiEclERKiS2_(%"struct.std::less"* %_M_key_compare27, i32* nonnull align 4 dereferenceable(4) %call30, i32* nonnull align 4 dereferenceable(4) %19)
br i1 %call31, label %if.then32, label %if.else42
if.then32: ; preds = %if.else25
%_M_node33 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__before, i32 0, i32 0
%20 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node33, align 8
%call34 = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %20) #11
%cmp35 = icmp eq %"struct.std::_Rb_tree_node"* %call34, null
br i1 %cmp35, label %if.then36, label %if.else39
if.then36: ; preds = %if.then32
store %"struct.std::_Rb_tree_node_base"* null, %"struct.std::_Rb_tree_node_base"** %ref.tmp37, align 8
%_M_node38 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__before, i32 0, i32 0
call void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_Lb1EEERKS1_OT_(%"struct.std::pair.1"* %retval, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %ref.tmp37, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %_M_node38)
br label %return
if.else39: ; preds = %if.then32
%_M_node40 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__pos, i32 0, i32 0
%_M_node41 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__pos, i32 0, i32 0
call void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_S4_Lb1EEEOT_OT0_(%"struct.std::pair.1"* %retval, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %_M_node40, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %_M_node41)
br label %return
if.else42: ; preds = %if.else25
%21 = load i32*, i32** %__k.addr, align 8
%call43 = call { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE24_M_get_insert_unique_posERS1_(%"class.std::_Rb_tree"* %this1, i32* nonnull align 4 dereferenceable(4) %21)
%22 = bitcast %"struct.std::pair.1"* %retval to { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }*
%23 = getelementptr inbounds { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }, { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }* %22, i32 0, i32 0
%24 = extractvalue { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } %call43, 0
store %"struct.std::_Rb_tree_node_base"* %24, %"struct.std::_Rb_tree_node_base"** %23, align 8
%25 = getelementptr inbounds { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }, { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }* %22, i32 0, i32 1
%26 = extractvalue { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } %call43, 1
store %"struct.std::_Rb_tree_node_base"* %26, %"struct.std::_Rb_tree_node_base"** %25, align 8
br label %return
if.else44: ; preds = %if.else12
%_M_impl45 = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%27 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl45 to %"struct.std::_Rb_tree_key_compare"*
%_M_key_compare46 = getelementptr inbounds %"struct.std::_Rb_tree_key_compare", %"struct.std::_Rb_tree_key_compare"* %27, i32 0, i32 0
%_M_node47 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__pos, i32 0, i32 0
%28 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node47, align 8
%call48 = call nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %28)
%29 = load i32*, i32** %__k.addr, align 8
%call49 = call zeroext i1 @_ZNKSt4lessIiEclERKiS2_(%"struct.std::less"* %_M_key_compare46, i32* nonnull align 4 dereferenceable(4) %call48, i32* nonnull align 4 dereferenceable(4) %29)
br i1 %call49, label %if.then50, label %if.else76
if.then50: ; preds = %if.else44
%30 = bitcast %"struct.std::_Rb_tree_iterator"* %__after to i8*
%31 = bitcast %"struct.std::_Rb_tree_iterator"* %__pos to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %30, i8* align 8 %31, i64 8, i1 false)
%_M_node51 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__pos, i32 0, i32 0
%32 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node51, align 8
%call52 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_rightmostEv(%"class.std::_Rb_tree"* %this1) #11
%33 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %call52, align 8
%cmp53 = icmp eq %"struct.std::_Rb_tree_node_base"* %32, %33
br i1 %cmp53, label %if.then54, label %if.else57
if.then54: ; preds = %if.then50
store %"struct.std::_Rb_tree_node_base"* null, %"struct.std::_Rb_tree_node_base"** %ref.tmp55, align 8
%call56 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_rightmostEv(%"class.std::_Rb_tree"* %this1) #11
call void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_Lb1EEERKS1_OT_(%"struct.std::pair.1"* %retval, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %ref.tmp55, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %call56)
br label %return
if.else57: ; preds = %if.then50
%_M_impl58 = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%34 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl58 to %"struct.std::_Rb_tree_key_compare"*
%_M_key_compare59 = getelementptr inbounds %"struct.std::_Rb_tree_key_compare", %"struct.std::_Rb_tree_key_compare"* %34, i32 0, i32 0
%35 = load i32*, i32** %__k.addr, align 8
%call60 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_iterator"* @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEppEv(%"struct.std::_Rb_tree_iterator"* %__after) #11
%_M_node61 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %call60, i32 0, i32 0
%36 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node61, align 8
%call62 = call nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %36)
%call63 = call zeroext i1 @_ZNKSt4lessIiEclERKiS2_(%"struct.std::less"* %_M_key_compare59, i32* nonnull align 4 dereferenceable(4) %35, i32* nonnull align 4 dereferenceable(4) %call62)
br i1 %call63, label %if.then64, label %if.else74
if.then64: ; preds = %if.else57
%_M_node65 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__pos, i32 0, i32 0
%37 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node65, align 8
%call66 = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %37) #11
%cmp67 = icmp eq %"struct.std::_Rb_tree_node"* %call66, null
br i1 %cmp67, label %if.then68, label %if.else71
if.then68: ; preds = %if.then64
store %"struct.std::_Rb_tree_node_base"* null, %"struct.std::_Rb_tree_node_base"** %ref.tmp69, align 8
%_M_node70 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__pos, i32 0, i32 0
call void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_Lb1EEERKS1_OT_(%"struct.std::pair.1"* %retval, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %ref.tmp69, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %_M_node70)
br label %return
if.else71: ; preds = %if.then64
%_M_node72 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__after, i32 0, i32 0
%_M_node73 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__after, i32 0, i32 0
call void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_S4_Lb1EEEOT_OT0_(%"struct.std::pair.1"* %retval, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %_M_node72, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %_M_node73)
br label %return
if.else74: ; preds = %if.else57
%38 = load i32*, i32** %__k.addr, align 8
%call75 = call { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE24_M_get_insert_unique_posERS1_(%"class.std::_Rb_tree"* %this1, i32* nonnull align 4 dereferenceable(4) %38)
%39 = bitcast %"struct.std::pair.1"* %retval to { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }*
%40 = getelementptr inbounds { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }, { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }* %39, i32 0, i32 0
%41 = extractvalue { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } %call75, 0
store %"struct.std::_Rb_tree_node_base"* %41, %"struct.std::_Rb_tree_node_base"** %40, align 8
%42 = getelementptr inbounds { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }, { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }* %39, i32 0, i32 1
%43 = extractvalue { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } %call75, 1
store %"struct.std::_Rb_tree_node_base"* %43, %"struct.std::_Rb_tree_node_base"** %42, align 8
br label %return
if.else76: ; preds = %if.else44
%_M_node77 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__pos, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* null, %"struct.std::_Rb_tree_node_base"** %ref.tmp78, align 8
call void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_Lb1EEEOT_RKS1_(%"struct.std::pair.1"* %retval, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %_M_node77, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %ref.tmp78)
br label %return
return: ; preds = %if.else76, %if.else74, %if.else71, %if.then68, %if.then54, %if.else42, %if.else39, %if.then36, %if.then22, %if.else, %if.then9
%44 = bitcast %"struct.std::pair.1"* %retval to { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }*
%45 = load { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }, { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }* %44, align 8
ret { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } %45
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_insert_nodeEPSt18_Rb_tree_node_baseSB_PSt13_Rb_tree_nodeIS3_E(%"class.std::_Rb_tree"* %this, %"struct.std::_Rb_tree_node_base"* %__x, %"struct.std::_Rb_tree_node_base"* %__p, %"struct.std::_Rb_tree_node"* %__z) #0 comdat align 2 {
entry:
%retval = alloca %"struct.std::_Rb_tree_iterator", align 8
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__x.addr = alloca %"struct.std::_Rb_tree_node_base"*, align 8
%__p.addr = alloca %"struct.std::_Rb_tree_node_base"*, align 8
%__z.addr = alloca %"struct.std::_Rb_tree_node"*, align 8
%__insert_left = alloca i8, align 1
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store %"struct.std::_Rb_tree_node_base"* %__x, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
store %"struct.std::_Rb_tree_node_base"* %__p, %"struct.std::_Rb_tree_node_base"** %__p.addr, align 8
store %"struct.std::_Rb_tree_node"* %__z, %"struct.std::_Rb_tree_node"** %__z.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%0 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
%cmp = icmp ne %"struct.std::_Rb_tree_node_base"* %0, null
br i1 %cmp, label %lor.end, label %lor.lhs.false
lor.lhs.false: ; preds = %entry
%1 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__p.addr, align 8
%call = call %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_M_endEv(%"class.std::_Rb_tree"* %this1) #11
%cmp2 = icmp eq %"struct.std::_Rb_tree_node_base"* %1, %call
br i1 %cmp2, label %lor.end, label %lor.rhs
lor.rhs: ; preds = %lor.lhs.false
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%2 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl to %"struct.std::_Rb_tree_key_compare"*
%_M_key_compare = getelementptr inbounds %"struct.std::_Rb_tree_key_compare", %"struct.std::_Rb_tree_key_compare"* %2, i32 0, i32 0
%3 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__z.addr, align 8
%call3 = call nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt13_Rb_tree_nodeIS3_E(%"struct.std::_Rb_tree_node"* %3)
%4 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__p.addr, align 8
%call4 = call nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %4)
%call5 = call zeroext i1 @_ZNKSt4lessIiEclERKiS2_(%"struct.std::less"* %_M_key_compare, i32* nonnull align 4 dereferenceable(4) %call3, i32* nonnull align 4 dereferenceable(4) %call4)
br label %lor.end
lor.end: ; preds = %lor.rhs, %lor.lhs.false, %entry
%5 = phi i1 [ true, %lor.lhs.false ], [ true, %entry ], [ %call5, %lor.rhs ]
%frombool = zext i1 %5 to i8
store i8 %frombool, i8* %__insert_left, align 1
%6 = load i8, i8* %__insert_left, align 1
%tobool = trunc i8 %6 to i1
%7 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__z.addr, align 8
%8 = bitcast %"struct.std::_Rb_tree_node"* %7 to %"struct.std::_Rb_tree_node_base"*
%9 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__p.addr, align 8
%_M_impl6 = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%10 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl6 to i8*
%add.ptr = getelementptr inbounds i8, i8* %10, i64 8
%11 = bitcast i8* %add.ptr to %"struct.std::_Rb_tree_header"*
%_M_header = getelementptr inbounds %"struct.std::_Rb_tree_header", %"struct.std::_Rb_tree_header"* %11, i32 0, i32 0
call void @_ZSt29_Rb_tree_insert_and_rebalancebPSt18_Rb_tree_node_baseS0_RS_(i1 zeroext %tobool, %"struct.std::_Rb_tree_node_base"* %8, %"struct.std::_Rb_tree_node_base"* %9, %"struct.std::_Rb_tree_node_base"* nonnull align 8 dereferenceable(32) %_M_header) #11
%_M_impl7 = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%12 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl7 to i8*
%add.ptr8 = getelementptr inbounds i8, i8* %12, i64 8
%13 = bitcast i8* %add.ptr8 to %"struct.std::_Rb_tree_header"*
%_M_node_count = getelementptr inbounds %"struct.std::_Rb_tree_header", %"struct.std::_Rb_tree_header"* %13, i32 0, i32 1
%14 = load i64, i64* %_M_node_count, align 8
%inc = add i64 %14, 1
store i64 %inc, i64* %_M_node_count, align 8
%15 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__z.addr, align 8
%16 = bitcast %"struct.std::_Rb_tree_node"* %15 to %"struct.std::_Rb_tree_node_base"*
call void @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC2EPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_iterator"* %retval, %"struct.std::_Rb_tree_node_base"* %16) #11
%coerce.dive = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
%17 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %coerce.dive, align 8
ret %"struct.std::_Rb_tree_node_base"* %17
}
; Function Attrs: cold noreturn nounwind
declare void @llvm.trap() #8
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE17_M_construct_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESE_IJEEEEEvPSt13_Rb_tree_nodeIS3_EDpOT_(%"class.std::_Rb_tree"* %this, %"struct.std::_Rb_tree_node"* %__node, %"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %__args, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %__args1, %"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %__args3) #0 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__node.addr = alloca %"struct.std::_Rb_tree_node"*, align 8
%__args.addr = alloca %"struct.std::piecewise_construct_t"*, align 8
%__args.addr2 = alloca %"class.std::tuple"*, align 8
%__args.addr4 = alloca %"class.std::tuple.0"*, align 8
%exn.slot = alloca i8*, align 8
%ehselector.slot = alloca i32, align 4
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store %"struct.std::_Rb_tree_node"* %__node, %"struct.std::_Rb_tree_node"** %__node.addr, align 8
store %"struct.std::piecewise_construct_t"* %__args, %"struct.std::piecewise_construct_t"** %__args.addr, align 8
store %"class.std::tuple"* %__args1, %"class.std::tuple"** %__args.addr2, align 8
store %"class.std::tuple.0"* %__args3, %"class.std::tuple.0"** %__args.addr4, align 8
%this5 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%0 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__node.addr, align 8
%1 = bitcast %"struct.std::_Rb_tree_node"* %0 to i8*
%2 = bitcast i8* %1 to %"struct.std::_Rb_tree_node"*
%call = call nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE21_M_get_Node_allocatorEv(%"class.std::_Rb_tree"* %this5) #11
%3 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__node.addr, align 8
%call6 = invoke %"struct.std::pair"* @_ZNSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(%"struct.std::_Rb_tree_node"* %3)
to label %invoke.cont unwind label %lpad
invoke.cont: ; preds = %entry
%4 = load %"struct.std::piecewise_construct_t"*, %"struct.std::piecewise_construct_t"** %__args.addr, align 8
%call7 = call nonnull align 1 dereferenceable(1) %"struct.std::piecewise_construct_t"* @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(%"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %4) #11
%5 = load %"class.std::tuple"*, %"class.std::tuple"** %__args.addr2, align 8
%call8 = call nonnull align 8 dereferenceable(8) %"class.std::tuple"* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(%"class.std::tuple"* nonnull align 8 dereferenceable(8) %5) #11
%6 = load %"class.std::tuple.0"*, %"class.std::tuple.0"** %__args.addr4, align 8
%call9 = call nonnull align 1 dereferenceable(1) %"class.std::tuple.0"* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(%"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %6) #11
invoke void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE9constructIS4_JRKSt21piecewise_construct_tSt5tupleIJOiEESC_IJEEEEEvRS6_PT_DpOT0_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %call, %"struct.std::pair"* %call6, %"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %call7, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %call8, %"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %call9)
to label %invoke.cont10 unwind label %lpad
invoke.cont10: ; preds = %invoke.cont
br label %try.cont
lpad: ; preds = %invoke.cont, %entry
%7 = landingpad { i8*, i32 }
catch i8* null
%8 = extractvalue { i8*, i32 } %7, 0
store i8* %8, i8** %exn.slot, align 8
%9 = extractvalue { i8*, i32 } %7, 1
store i32 %9, i32* %ehselector.slot, align 4
br label %catch
catch: ; preds = %lpad
%exn = load i8*, i8** %exn.slot, align 8
%10 = call i8* @__cxa_begin_catch(i8* %exn) #11
%11 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__node.addr, align 8
%12 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__node.addr, align 8
call void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_put_nodeEPSt13_Rb_tree_nodeIS3_E(%"class.std::_Rb_tree"* %this5, %"struct.std::_Rb_tree_node"* %12) #11
invoke void @__cxa_rethrow() #13
to label %unreachable unwind label %lpad11
lpad11: ; preds = %catch
%13 = landingpad { i8*, i32 }
cleanup
%14 = extractvalue { i8*, i32 } %13, 0
store i8* %14, i8** %exn.slot, align 8
%15 = extractvalue { i8*, i32 } %13, 1
store i32 %15, i32* %ehselector.slot, align 4
invoke void @__cxa_end_catch()
to label %invoke.cont12 unwind label %terminate.lpad
invoke.cont12: ; preds = %lpad11
br label %eh.resume
try.cont: ; preds = %invoke.cont10
ret void
eh.resume: ; preds = %invoke.cont12
%exn13 = load i8*, i8** %exn.slot, align 8
%sel = load i32, i32* %ehselector.slot, align 4
%lpad.val = insertvalue { i8*, i32 } undef, i8* %exn13, 0
%lpad.val14 = insertvalue { i8*, i32 } %lpad.val, i32 %sel, 1
resume { i8*, i32 } %lpad.val14
terminate.lpad: ; preds = %lpad11
%16 = landingpad { i8*, i32 }
catch i8* null
%17 = extractvalue { i8*, i32 } %16, 0
call void @__clang_call_terminate(i8* %17) #12
unreachable
unreachable: ; preds = %catch
unreachable
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE9constructIS4_JRKSt21piecewise_construct_tSt5tupleIJOiEESC_IJEEEEEvRS6_PT_DpOT0_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a, %"struct.std::pair"* %__p, %"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %__args, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %__args1, %"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %__args3) #0 comdat align 2 {
entry:
%__a.addr = alloca %"class.std::allocator"*, align 8
%__p.addr = alloca %"struct.std::pair"*, align 8
%__args.addr = alloca %"struct.std::piecewise_construct_t"*, align 8
%__args.addr2 = alloca %"class.std::tuple"*, align 8
%__args.addr4 = alloca %"class.std::tuple.0"*, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
store %"struct.std::pair"* %__p, %"struct.std::pair"** %__p.addr, align 8
store %"struct.std::piecewise_construct_t"* %__args, %"struct.std::piecewise_construct_t"** %__args.addr, align 8
store %"class.std::tuple"* %__args1, %"class.std::tuple"** %__args.addr2, align 8
store %"class.std::tuple.0"* %__args3, %"class.std::tuple.0"** %__args.addr4, align 8
%0 = load %"class.std::allocator"*, %"class.std::allocator"** %__a.addr, align 8
%1 = bitcast %"class.std::allocator"* %0 to %"class.__gnu_cxx::new_allocator"*
%2 = load %"struct.std::pair"*, %"struct.std::pair"** %__p.addr, align 8
%3 = load %"struct.std::piecewise_construct_t"*, %"struct.std::piecewise_construct_t"** %__args.addr, align 8
%call = call nonnull align 1 dereferenceable(1) %"struct.std::piecewise_construct_t"* @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(%"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %3) #11
%4 = load %"class.std::tuple"*, %"class.std::tuple"** %__args.addr2, align 8
%call5 = call nonnull align 8 dereferenceable(8) %"class.std::tuple"* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(%"class.std::tuple"* nonnull align 8 dereferenceable(8) %4) #11
%5 = load %"class.std::tuple.0"*, %"class.std::tuple.0"** %__args.addr4, align 8
%call6 = call nonnull align 1 dereferenceable(1) %"class.std::tuple.0"* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(%"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %5) #11
call void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE9constructIS5_JRKSt21piecewise_construct_tSt5tupleIJOiEESC_IJEEEEEvPT_DpOT0_(%"class.__gnu_cxx::new_allocator"* %1, %"struct.std::pair"* %2, %"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %call, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %call5, %"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %call6)
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE9constructIS5_JRKSt21piecewise_construct_tSt5tupleIJOiEESC_IJEEEEEvPT_DpOT0_(%"class.__gnu_cxx::new_allocator"* %this, %"struct.std::pair"* %__p, %"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %__args, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %__args1, %"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %__args3) #0 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
%__p.addr = alloca %"struct.std::pair"*, align 8
%__args.addr = alloca %"struct.std::piecewise_construct_t"*, align 8
%__args.addr2 = alloca %"class.std::tuple"*, align 8
%__args.addr4 = alloca %"class.std::tuple.0"*, align 8
%agg.tmp = alloca %"struct.std::piecewise_construct_t", align 1
%agg.tmp6 = alloca %"class.std::tuple", align 8
%agg.tmp8 = alloca %"class.std::tuple.0", align 1
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
store %"struct.std::pair"* %__p, %"struct.std::pair"** %__p.addr, align 8
store %"struct.std::piecewise_construct_t"* %__args, %"struct.std::piecewise_construct_t"** %__args.addr, align 8
store %"class.std::tuple"* %__args1, %"class.std::tuple"** %__args.addr2, align 8
store %"class.std::tuple.0"* %__args3, %"class.std::tuple.0"** %__args.addr4, align 8
%this5 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
%0 = load %"struct.std::pair"*, %"struct.std::pair"** %__p.addr, align 8
%1 = bitcast %"struct.std::pair"* %0 to i8*
%2 = bitcast i8* %1 to %"struct.std::pair"*
%3 = load %"struct.std::piecewise_construct_t"*, %"struct.std::piecewise_construct_t"** %__args.addr, align 8
%call = call nonnull align 1 dereferenceable(1) %"struct.std::piecewise_construct_t"* @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(%"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %3) #11
%4 = load %"class.std::tuple"*, %"class.std::tuple"** %__args.addr2, align 8
%call7 = call nonnull align 8 dereferenceable(8) %"class.std::tuple"* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(%"class.std::tuple"* nonnull align 8 dereferenceable(8) %4) #11
call void @_ZNSt5tupleIJOiEEC2EOS1_(%"class.std::tuple"* %agg.tmp6, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %call7) #11
%5 = load %"class.std::tuple.0"*, %"class.std::tuple.0"** %__args.addr4, align 8
%call9 = call nonnull align 1 dereferenceable(1) %"class.std::tuple.0"* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(%"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %5) #11
call void @_ZNSt4pairIKiPcEC2IJOiEJEEESt21piecewise_construct_tSt5tupleIJDpT_EES6_IJDpT0_EE(%"struct.std::pair"* %2, %"class.std::tuple"* %agg.tmp6)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt5tupleIJOiEEC2EOS1_(%"class.std::tuple"* %this, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %0) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::tuple"*, align 8
%.addr = alloca %"class.std::tuple"*, align 8
store %"class.std::tuple"* %this, %"class.std::tuple"** %this.addr, align 8
store %"class.std::tuple"* %0, %"class.std::tuple"** %.addr, align 8
%this1 = load %"class.std::tuple"*, %"class.std::tuple"** %this.addr, align 8
%1 = bitcast %"class.std::tuple"* %this1 to %"struct.std::_Tuple_impl"*
%2 = load %"class.std::tuple"*, %"class.std::tuple"** %.addr, align 8
%3 = bitcast %"class.std::tuple"* %2 to %"struct.std::_Tuple_impl"*
call void @_ZNSt11_Tuple_implILm0EJOiEEC2EOS1_(%"struct.std::_Tuple_impl"* %1, %"struct.std::_Tuple_impl"* nonnull align 8 dereferenceable(8) %3) #11
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt4pairIKiPcEC2IJOiEJEEESt21piecewise_construct_tSt5tupleIJDpT_EES6_IJDpT0_EE(%"struct.std::pair"* %this, %"class.std::tuple"* %__first) unnamed_addr #0 comdat align 2 {
entry:
%0 = alloca %"struct.std::piecewise_construct_t", align 1
%__second = alloca %"class.std::tuple.0", align 1
%this.addr = alloca %"struct.std::pair"*, align 8
%agg.tmp = alloca %"struct.std::_Index_tuple", align 1
%agg.tmp3 = alloca %"struct.std::_Index_tuple.4", align 1
store %"struct.std::pair"* %this, %"struct.std::pair"** %this.addr, align 8
%this2 = load %"struct.std::pair"*, %"struct.std::pair"** %this.addr, align 8
call void @_ZNSt4pairIKiPcEC2IJOiEJLm0EEJEJEEERSt5tupleIJDpT_EERS5_IJDpT1_EESt12_Index_tupleIJXspT0_EEESE_IJXspT2_EEE(%"struct.std::pair"* %this2, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %__first, %"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %__second)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt11_Tuple_implILm0EJOiEEC2EOS1_(%"struct.std::_Tuple_impl"* %this, %"struct.std::_Tuple_impl"* nonnull align 8 dereferenceable(8) %__in) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Tuple_impl"*, align 8
%__in.addr = alloca %"struct.std::_Tuple_impl"*, align 8
store %"struct.std::_Tuple_impl"* %this, %"struct.std::_Tuple_impl"** %this.addr, align 8
store %"struct.std::_Tuple_impl"* %__in, %"struct.std::_Tuple_impl"** %__in.addr, align 8
%this1 = load %"struct.std::_Tuple_impl"*, %"struct.std::_Tuple_impl"** %this.addr, align 8
%0 = bitcast %"struct.std::_Tuple_impl"* %this1 to %"struct.std::_Head_base"*
%1 = load %"struct.std::_Tuple_impl"*, %"struct.std::_Tuple_impl"** %__in.addr, align 8
%2 = bitcast %"struct.std::_Tuple_impl"* %1 to %"struct.std::_Head_base"*
%3 = bitcast %"struct.std::_Head_base"* %0 to i8*
%4 = bitcast %"struct.std::_Head_base"* %2 to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %3, i8* align 8 %4, i64 8, i1 false)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt4pairIKiPcEC2IJOiEJLm0EEJEJEEERSt5tupleIJDpT_EERS5_IJDpT1_EESt12_Index_tupleIJXspT0_EEESE_IJXspT2_EEE(%"struct.std::pair"* %this, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %__tuple1, %"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %__tuple2) unnamed_addr #1 comdat align 2 {
entry:
%0 = alloca %"struct.std::_Index_tuple", align 1
%1 = alloca %"struct.std::_Index_tuple.4", align 1
%this.addr = alloca %"struct.std::pair"*, align 8
%__tuple1.addr = alloca %"class.std::tuple"*, align 8
%__tuple2.addr = alloca %"class.std::tuple.0"*, align 8
store %"struct.std::pair"* %this, %"struct.std::pair"** %this.addr, align 8
store %"class.std::tuple"* %__tuple1, %"class.std::tuple"** %__tuple1.addr, align 8
store %"class.std::tuple.0"* %__tuple2, %"class.std::tuple.0"** %__tuple2.addr, align 8
%this2 = load %"struct.std::pair"*, %"struct.std::pair"** %this.addr, align 8
%2 = bitcast %"struct.std::pair"* %this2 to %"class.std::__pair_base"*
%first = getelementptr inbounds %"struct.std::pair", %"struct.std::pair"* %this2, i32 0, i32 0
%3 = load %"class.std::tuple"*, %"class.std::tuple"** %__tuple1.addr, align 8
%call = call nonnull align 4 dereferenceable(4) i32* @_ZSt3getILm0EJOiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS5_(%"class.std::tuple"* nonnull align 8 dereferenceable(8) %3) #11
%call3 = call nonnull align 4 dereferenceable(4) i32* @_ZSt7forwardIOiEOT_RNSt16remove_referenceIS1_E4typeE(i32* nonnull align 4 dereferenceable(4) %call) #11
%4 = load i32, i32* %call3, align 4
store i32 %4, i32* %first, align 8
%second = getelementptr inbounds %"struct.std::pair", %"struct.std::pair"* %this2, i32 0, i32 1
store i8* null, i8** %second, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 4 dereferenceable(4) i32* @_ZSt7forwardIOiEOT_RNSt16remove_referenceIS1_E4typeE(i32* nonnull align 4 dereferenceable(4) %__t) #1 comdat {
entry:
%__t.addr = alloca i32*, align 8
store i32* %__t, i32** %__t.addr, align 8
%0 = load i32*, i32** %__t.addr, align 8
ret i32* %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 4 dereferenceable(4) i32* @_ZSt3getILm0EJOiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS5_(%"class.std::tuple"* nonnull align 8 dereferenceable(8) %__t) #1 comdat {
entry:
%__t.addr = alloca %"class.std::tuple"*, align 8
store %"class.std::tuple"* %__t, %"class.std::tuple"** %__t.addr, align 8
%0 = load %"class.std::tuple"*, %"class.std::tuple"** %__t.addr, align 8
%1 = bitcast %"class.std::tuple"* %0 to %"struct.std::_Tuple_impl"*
%call = call nonnull align 4 dereferenceable(4) i32* @_ZSt12__get_helperILm0EOiJEERT0_RSt11_Tuple_implIXT_EJS1_DpT1_EE(%"struct.std::_Tuple_impl"* nonnull align 8 dereferenceable(8) %1) #11
ret i32* %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 4 dereferenceable(4) i32* @_ZSt12__get_helperILm0EOiJEERT0_RSt11_Tuple_implIXT_EJS1_DpT1_EE(%"struct.std::_Tuple_impl"* nonnull align 8 dereferenceable(8) %__t) #1 comdat {
entry:
%__t.addr = alloca %"struct.std::_Tuple_impl"*, align 8
store %"struct.std::_Tuple_impl"* %__t, %"struct.std::_Tuple_impl"** %__t.addr, align 8
%0 = load %"struct.std::_Tuple_impl"*, %"struct.std::_Tuple_impl"** %__t.addr, align 8
%call = call nonnull align 4 dereferenceable(4) i32* @_ZNSt11_Tuple_implILm0EJOiEE7_M_headERS1_(%"struct.std::_Tuple_impl"* nonnull align 8 dereferenceable(8) %0) #11
ret i32* %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 4 dereferenceable(4) i32* @_ZNSt11_Tuple_implILm0EJOiEE7_M_headERS1_(%"struct.std::_Tuple_impl"* nonnull align 8 dereferenceable(8) %__t) #1 comdat align 2 {
entry:
%__t.addr = alloca %"struct.std::_Tuple_impl"*, align 8
store %"struct.std::_Tuple_impl"* %__t, %"struct.std::_Tuple_impl"** %__t.addr, align 8
%0 = load %"struct.std::_Tuple_impl"*, %"struct.std::_Tuple_impl"** %__t.addr, align 8
%1 = bitcast %"struct.std::_Tuple_impl"* %0 to %"struct.std::_Head_base"*
%call = call nonnull align 4 dereferenceable(4) i32* @_ZNSt10_Head_baseILm0EOiLb0EE7_M_headERS1_(%"struct.std::_Head_base"* nonnull align 8 dereferenceable(8) %1) #11
ret i32* %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 4 dereferenceable(4) i32* @_ZNSt10_Head_baseILm0EOiLb0EE7_M_headERS1_(%"struct.std::_Head_base"* nonnull align 8 dereferenceable(8) %__b) #1 comdat align 2 {
entry:
%__b.addr = alloca %"struct.std::_Head_base"*, align 8
store %"struct.std::_Head_base"* %__b, %"struct.std::_Head_base"** %__b.addr, align 8
%0 = load %"struct.std::_Head_base"*, %"struct.std::_Head_base"** %__b.addr, align 8
%_M_head_impl = getelementptr inbounds %"struct.std::_Head_base", %"struct.std::_Head_base"* %0, i32 0, i32 0
%1 = load i32*, i32** %_M_head_impl, align 8
ret i32* %1
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node_base"* @_ZNKSt23_Rb_tree_const_iteratorISt4pairIKiPcEE13_M_const_castEv(%"struct.std::_Rb_tree_const_iterator"* %this) #1 comdat align 2 {
entry:
%retval = alloca %"struct.std::_Rb_tree_iterator", align 8
%this.addr = alloca %"struct.std::_Rb_tree_const_iterator"*, align 8
store %"struct.std::_Rb_tree_const_iterator"* %this, %"struct.std::_Rb_tree_const_iterator"** %this.addr, align 8
%this1 = load %"struct.std::_Rb_tree_const_iterator"*, %"struct.std::_Rb_tree_const_iterator"** %this.addr, align 8
%_M_node = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", %"struct.std::_Rb_tree_const_iterator"* %this1, i32 0, i32 0
%0 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node, align 8
call void @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC2EPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_iterator"* %retval, %"struct.std::_Rb_tree_node_base"* %0) #11
%coerce.dive = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
%1 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %coerce.dive, align 8
ret %"struct.std::_Rb_tree_node_base"* %1
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i64 @_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE4sizeEv(%"class.std::_Rb_tree"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%0 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl to i8*
%add.ptr = getelementptr inbounds i8, i8* %0, i64 8
%1 = bitcast i8* %add.ptr to %"struct.std::_Rb_tree_header"*
%_M_node_count = getelementptr inbounds %"struct.std::_Rb_tree_header", %"struct.std::_Rb_tree_header"* %1, i32 0, i32 1
%2 = load i64, i64* %_M_node_count, align 8
ret i64 %2
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %__x) #0 comdat align 2 {
entry:
%__x.addr = alloca %"struct.std::_Rb_tree_node_base"*, align 8
store %"struct.std::_Rb_tree_node_base"* %__x, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
%0 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
%1 = bitcast %"struct.std::_Rb_tree_node_base"* %0 to %"struct.std::_Rb_tree_node"*
%call = call nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt13_Rb_tree_nodeIS3_E(%"struct.std::_Rb_tree_node"* %1)
ret i32* %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_Lb1EEERKS1_OT_(%"struct.std::pair.1"* %this, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %__x, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %__y) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::pair.1"*, align 8
%__x.addr = alloca %"struct.std::_Rb_tree_node_base"**, align 8
%__y.addr = alloca %"struct.std::_Rb_tree_node_base"**, align 8
store %"struct.std::pair.1"* %this, %"struct.std::pair.1"** %this.addr, align 8
store %"struct.std::_Rb_tree_node_base"** %__x, %"struct.std::_Rb_tree_node_base"*** %__x.addr, align 8
store %"struct.std::_Rb_tree_node_base"** %__y, %"struct.std::_Rb_tree_node_base"*** %__y.addr, align 8
%this1 = load %"struct.std::pair.1"*, %"struct.std::pair.1"** %this.addr, align 8
%0 = bitcast %"struct.std::pair.1"* %this1 to %"class.std::__pair_base.2"*
%first = getelementptr inbounds %"struct.std::pair.1", %"struct.std::pair.1"* %this1, i32 0, i32 0
%1 = load %"struct.std::_Rb_tree_node_base"**, %"struct.std::_Rb_tree_node_base"*** %__x.addr, align 8
%2 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %1, align 8
store %"struct.std::_Rb_tree_node_base"* %2, %"struct.std::_Rb_tree_node_base"** %first, align 8
%second = getelementptr inbounds %"struct.std::pair.1", %"struct.std::pair.1"* %this1, i32 0, i32 1
%3 = load %"struct.std::_Rb_tree_node_base"**, %"struct.std::_Rb_tree_node_base"*** %__y.addr, align 8
%call = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(%"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %3) #11
%4 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %call, align 8
store %"struct.std::_Rb_tree_node_base"* %4, %"struct.std::_Rb_tree_node_base"** %second, align 8
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE24_M_get_insert_unique_posERS1_(%"class.std::_Rb_tree"* %this, i32* nonnull align 4 dereferenceable(4) %__k) #0 comdat align 2 {
entry:
%retval = alloca %"struct.std::pair.1", align 8
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__k.addr = alloca i32*, align 8
%__x = alloca %"struct.std::_Rb_tree_node"*, align 8
%__y = alloca %"struct.std::_Rb_tree_node_base"*, align 8
%__comp = alloca i8, align 1
%__j = alloca %"struct.std::_Rb_tree_iterator", align 8
%ref.tmp = alloca %"struct.std::_Rb_tree_iterator", align 8
%ref.tmp20 = alloca %"struct.std::_Rb_tree_node_base"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store i32* %__k, i32** %__k.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%call = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_M_beginEv(%"class.std::_Rb_tree"* %this1) #11
store %"struct.std::_Rb_tree_node"* %call, %"struct.std::_Rb_tree_node"** %__x, align 8
%call2 = call %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_M_endEv(%"class.std::_Rb_tree"* %this1) #11
store %"struct.std::_Rb_tree_node_base"* %call2, %"struct.std::_Rb_tree_node_base"** %__y, align 8
store i8 1, i8* %__comp, align 1
br label %while.cond
while.cond: ; preds = %cond.end, %entry
%0 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x, align 8
%cmp = icmp ne %"struct.std::_Rb_tree_node"* %0, null
br i1 %cmp, label %while.body, label %while.end
while.body: ; preds = %while.cond
%1 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x, align 8
%2 = bitcast %"struct.std::_Rb_tree_node"* %1 to %"struct.std::_Rb_tree_node_base"*
store %"struct.std::_Rb_tree_node_base"* %2, %"struct.std::_Rb_tree_node_base"** %__y, align 8
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%3 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl to %"struct.std::_Rb_tree_key_compare"*
%_M_key_compare = getelementptr inbounds %"struct.std::_Rb_tree_key_compare", %"struct.std::_Rb_tree_key_compare"* %3, i32 0, i32 0
%4 = load i32*, i32** %__k.addr, align 8
%5 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x, align 8
%call3 = call nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt13_Rb_tree_nodeIS3_E(%"struct.std::_Rb_tree_node"* %5)
%call4 = call zeroext i1 @_ZNKSt4lessIiEclERKiS2_(%"struct.std::less"* %_M_key_compare, i32* nonnull align 4 dereferenceable(4) %4, i32* nonnull align 4 dereferenceable(4) %call3)
%frombool = zext i1 %call4 to i8
store i8 %frombool, i8* %__comp, align 1
%6 = load i8, i8* %__comp, align 1
%tobool = trunc i8 %6 to i1
br i1 %tobool, label %cond.true, label %cond.false
cond.true: ; preds = %while.body
%7 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x, align 8
%8 = bitcast %"struct.std::_Rb_tree_node"* %7 to %"struct.std::_Rb_tree_node_base"*
%call5 = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_S_leftEPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %8) #11
br label %cond.end
cond.false: ; preds = %while.body
%9 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x, align 8
%10 = bitcast %"struct.std::_Rb_tree_node"* %9 to %"struct.std::_Rb_tree_node_base"*
%call6 = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %10) #11
br label %cond.end
cond.end: ; preds = %cond.false, %cond.true
%cond = phi %"struct.std::_Rb_tree_node"* [ %call5, %cond.true ], [ %call6, %cond.false ]
store %"struct.std::_Rb_tree_node"* %cond, %"struct.std::_Rb_tree_node"** %__x, align 8
br label %while.cond
while.end: ; preds = %while.cond
%11 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__y, align 8
call void @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC2EPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_iterator"* %__j, %"struct.std::_Rb_tree_node_base"* %11) #11
%12 = load i8, i8* %__comp, align 1
%tobool7 = trunc i8 %12 to i1
br i1 %tobool7, label %if.then, label %if.end12
if.then: ; preds = %while.end
%call8 = call %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE5beginEv(%"class.std::_Rb_tree"* %this1) #11
%coerce.dive = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %ref.tmp, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %call8, %"struct.std::_Rb_tree_node_base"** %coerce.dive, align 8
%call9 = call zeroext i1 @_ZSteqRKSt17_Rb_tree_iteratorISt4pairIKiPcEES6_(%"struct.std::_Rb_tree_iterator"* nonnull align 8 dereferenceable(8) %__j, %"struct.std::_Rb_tree_iterator"* nonnull align 8 dereferenceable(8) %ref.tmp) #11
br i1 %call9, label %if.then10, label %if.else
if.then10: ; preds = %if.then
call void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRPSt13_Rb_tree_nodeIS_IKiPcEERS1_Lb1EEEOT_OT0_(%"struct.std::pair.1"* %retval, %"struct.std::_Rb_tree_node"** nonnull align 8 dereferenceable(8) %__x, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %__y)
br label %return
if.else: ; preds = %if.then
%call11 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_iterator"* @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEmmEv(%"struct.std::_Rb_tree_iterator"* %__j) #11
br label %if.end
if.end: ; preds = %if.else
br label %if.end12
if.end12: ; preds = %if.end, %while.end
%_M_impl13 = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%13 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl13 to %"struct.std::_Rb_tree_key_compare"*
%_M_key_compare14 = getelementptr inbounds %"struct.std::_Rb_tree_key_compare", %"struct.std::_Rb_tree_key_compare"* %13, i32 0, i32 0
%_M_node = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__j, i32 0, i32 0
%14 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node, align 8
%call15 = call nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %14)
%15 = load i32*, i32** %__k.addr, align 8
%call16 = call zeroext i1 @_ZNKSt4lessIiEclERKiS2_(%"struct.std::less"* %_M_key_compare14, i32* nonnull align 4 dereferenceable(4) %call15, i32* nonnull align 4 dereferenceable(4) %15)
br i1 %call16, label %if.then17, label %if.end18
if.then17: ; preds = %if.end12
call void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRPSt13_Rb_tree_nodeIS_IKiPcEERS1_Lb1EEEOT_OT0_(%"struct.std::pair.1"* %retval, %"struct.std::_Rb_tree_node"** nonnull align 8 dereferenceable(8) %__x, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %__y)
br label %return
if.end18: ; preds = %if.end12
%_M_node19 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__j, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* null, %"struct.std::_Rb_tree_node_base"** %ref.tmp20, align 8
call void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_Lb1EEEOT_RKS1_(%"struct.std::pair.1"* %retval, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %_M_node19, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %ref.tmp20)
br label %return
return: ; preds = %if.end18, %if.then17, %if.then10
%16 = bitcast %"struct.std::pair.1"* %retval to { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }*
%17 = load { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }, { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }* %16, align 8
ret { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } %17
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_S4_Lb1EEEOT_OT0_(%"struct.std::pair.1"* %this, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %__x, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %__y) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::pair.1"*, align 8
%__x.addr = alloca %"struct.std::_Rb_tree_node_base"**, align 8
%__y.addr = alloca %"struct.std::_Rb_tree_node_base"**, align 8
store %"struct.std::pair.1"* %this, %"struct.std::pair.1"** %this.addr, align 8
store %"struct.std::_Rb_tree_node_base"** %__x, %"struct.std::_Rb_tree_node_base"*** %__x.addr, align 8
store %"struct.std::_Rb_tree_node_base"** %__y, %"struct.std::_Rb_tree_node_base"*** %__y.addr, align 8
%this1 = load %"struct.std::pair.1"*, %"struct.std::pair.1"** %this.addr, align 8
%0 = bitcast %"struct.std::pair.1"* %this1 to %"class.std::__pair_base.2"*
%first = getelementptr inbounds %"struct.std::pair.1", %"struct.std::pair.1"* %this1, i32 0, i32 0
%1 = load %"struct.std::_Rb_tree_node_base"**, %"struct.std::_Rb_tree_node_base"*** %__x.addr, align 8
%call = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(%"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %1) #11
%2 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %call, align 8
store %"struct.std::_Rb_tree_node_base"* %2, %"struct.std::_Rb_tree_node_base"** %first, align 8
%second = getelementptr inbounds %"struct.std::pair.1", %"struct.std::pair.1"* %this1, i32 0, i32 1
%3 = load %"struct.std::_Rb_tree_node_base"**, %"struct.std::_Rb_tree_node_base"*** %__y.addr, align 8
%call2 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(%"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %3) #11
%4 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %call2, align 8
store %"struct.std::_Rb_tree_node_base"* %4, %"struct.std::_Rb_tree_node_base"** %second, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_iterator"* @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEmmEv(%"struct.std::_Rb_tree_iterator"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Rb_tree_iterator"*, align 8
store %"struct.std::_Rb_tree_iterator"* %this, %"struct.std::_Rb_tree_iterator"** %this.addr, align 8
%this1 = load %"struct.std::_Rb_tree_iterator"*, %"struct.std::_Rb_tree_iterator"** %this.addr, align 8
%_M_node = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %this1, i32 0, i32 0
%0 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node, align 8
%call = call %"struct.std::_Rb_tree_node_base"* @_ZSt18_Rb_tree_decrementPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %0) #15
%_M_node2 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %this1, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %call, %"struct.std::_Rb_tree_node_base"** %_M_node2, align 8
ret %"struct.std::_Rb_tree_iterator"* %this1
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_iterator"* @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEppEv(%"struct.std::_Rb_tree_iterator"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Rb_tree_iterator"*, align 8
store %"struct.std::_Rb_tree_iterator"* %this, %"struct.std::_Rb_tree_iterator"** %this.addr, align 8
%this1 = load %"struct.std::_Rb_tree_iterator"*, %"struct.std::_Rb_tree_iterator"** %this.addr, align 8
%_M_node = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %this1, i32 0, i32 0
%0 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node, align 8
%call = call %"struct.std::_Rb_tree_node_base"* @_ZSt18_Rb_tree_incrementPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %0) #15
%_M_node2 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %this1, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %call, %"struct.std::_Rb_tree_node_base"** %_M_node2, align 8
ret %"struct.std::_Rb_tree_iterator"* %this1
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_Lb1EEEOT_RKS1_(%"struct.std::pair.1"* %this, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %__x, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %__y) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::pair.1"*, align 8
%__x.addr = alloca %"struct.std::_Rb_tree_node_base"**, align 8
%__y.addr = alloca %"struct.std::_Rb_tree_node_base"**, align 8
store %"struct.std::pair.1"* %this, %"struct.std::pair.1"** %this.addr, align 8
store %"struct.std::_Rb_tree_node_base"** %__x, %"struct.std::_Rb_tree_node_base"*** %__x.addr, align 8
store %"struct.std::_Rb_tree_node_base"** %__y, %"struct.std::_Rb_tree_node_base"*** %__y.addr, align 8
%this1 = load %"struct.std::pair.1"*, %"struct.std::pair.1"** %this.addr, align 8
%0 = bitcast %"struct.std::pair.1"* %this1 to %"class.std::__pair_base.2"*
%first = getelementptr inbounds %"struct.std::pair.1", %"struct.std::pair.1"* %this1, i32 0, i32 0
%1 = load %"struct.std::_Rb_tree_node_base"**, %"struct.std::_Rb_tree_node_base"*** %__x.addr, align 8
%call = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(%"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %1) #11
%2 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %call, align 8
store %"struct.std::_Rb_tree_node_base"* %2, %"struct.std::_Rb_tree_node_base"** %first, align 8
%second = getelementptr inbounds %"struct.std::pair.1", %"struct.std::pair.1"* %this1, i32 0, i32 1
%3 = load %"struct.std::_Rb_tree_node_base"**, %"struct.std::_Rb_tree_node_base"*** %__y.addr, align 8
%4 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %3, align 8
store %"struct.std::_Rb_tree_node_base"* %4, %"struct.std::_Rb_tree_node_base"** %second, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(%"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %__t) #1 comdat {
entry:
%__t.addr = alloca %"struct.std::_Rb_tree_node_base"**, align 8
store %"struct.std::_Rb_tree_node_base"** %__t, %"struct.std::_Rb_tree_node_base"*** %__t.addr, align 8
%0 = load %"struct.std::_Rb_tree_node_base"**, %"struct.std::_Rb_tree_node_base"*** %__t.addr, align 8
ret %"struct.std::_Rb_tree_node_base"** %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE5beginEv(%"class.std::_Rb_tree"* %this) #1 comdat align 2 {
entry:
%retval = alloca %"struct.std::_Rb_tree_iterator", align 8
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%0 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl to i8*
%add.ptr = getelementptr inbounds i8, i8* %0, i64 8
%1 = bitcast i8* %add.ptr to %"struct.std::_Rb_tree_header"*
%_M_header = getelementptr inbounds %"struct.std::_Rb_tree_header", %"struct.std::_Rb_tree_header"* %1, i32 0, i32 0
%_M_left = getelementptr inbounds %"struct.std::_Rb_tree_node_base", %"struct.std::_Rb_tree_node_base"* %_M_header, i32 0, i32 2
%2 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_left, align 8
call void @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC2EPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_iterator"* %retval, %"struct.std::_Rb_tree_node_base"* %2) #11
%coerce.dive = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
%3 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %coerce.dive, align 8
ret %"struct.std::_Rb_tree_node_base"* %3
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRPSt13_Rb_tree_nodeIS_IKiPcEERS1_Lb1EEEOT_OT0_(%"struct.std::pair.1"* %this, %"struct.std::_Rb_tree_node"** nonnull align 8 dereferenceable(8) %__x, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %__y) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::pair.1"*, align 8
%__x.addr = alloca %"struct.std::_Rb_tree_node"**, align 8
%__y.addr = alloca %"struct.std::_Rb_tree_node_base"**, align 8
store %"struct.std::pair.1"* %this, %"struct.std::pair.1"** %this.addr, align 8
store %"struct.std::_Rb_tree_node"** %__x, %"struct.std::_Rb_tree_node"*** %__x.addr, align 8
store %"struct.std::_Rb_tree_node_base"** %__y, %"struct.std::_Rb_tree_node_base"*** %__y.addr, align 8
%this1 = load %"struct.std::pair.1"*, %"struct.std::pair.1"** %this.addr, align 8
%0 = bitcast %"struct.std::pair.1"* %this1 to %"class.std::__pair_base.2"*
%first = getelementptr inbounds %"struct.std::pair.1", %"struct.std::pair.1"* %this1, i32 0, i32 0
%1 = load %"struct.std::_Rb_tree_node"**, %"struct.std::_Rb_tree_node"*** %__x.addr, align 8
%call = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node"** @_ZSt7forwardIRPSt13_Rb_tree_nodeISt4pairIKiPcEEEOT_RNSt16remove_referenceIS8_E4typeE(%"struct.std::_Rb_tree_node"** nonnull align 8 dereferenceable(8) %1) #11
%2 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %call, align 8
%3 = bitcast %"struct.std::_Rb_tree_node"* %2 to %"struct.std::_Rb_tree_node_base"*
store %"struct.std::_Rb_tree_node_base"* %3, %"struct.std::_Rb_tree_node_base"** %first, align 8
%second = getelementptr inbounds %"struct.std::pair.1", %"struct.std::pair.1"* %this1, i32 0, i32 1
%4 = load %"struct.std::_Rb_tree_node_base"**, %"struct.std::_Rb_tree_node_base"*** %__y.addr, align 8
%call2 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(%"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %4) #11
%5 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %call2, align 8
store %"struct.std::_Rb_tree_node_base"* %5, %"struct.std::_Rb_tree_node_base"** %second, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node"** @_ZSt7forwardIRPSt13_Rb_tree_nodeISt4pairIKiPcEEEOT_RNSt16remove_referenceIS8_E4typeE(%"struct.std::_Rb_tree_node"** nonnull align 8 dereferenceable(8) %__t) #1 comdat {
entry:
%__t.addr = alloca %"struct.std::_Rb_tree_node"**, align 8
store %"struct.std::_Rb_tree_node"** %__t, %"struct.std::_Rb_tree_node"*** %__t.addr, align 8
%0 = load %"struct.std::_Rb_tree_node"**, %"struct.std::_Rb_tree_node"*** %__t.addr, align 8
ret %"struct.std::_Rb_tree_node"** %0
}
; Function Attrs: nounwind readonly
declare dso_local %"struct.std::_Rb_tree_node_base"* @_ZSt18_Rb_tree_decrementPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"*) #9
; Function Attrs: nounwind readonly
declare dso_local %"struct.std::_Rb_tree_node_base"* @_ZSt18_Rb_tree_incrementPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"*) #9
; Function Attrs: nounwind
declare dso_local void @_ZSt29_Rb_tree_insert_and_rebalancebPSt18_Rb_tree_node_baseS0_RS_(i1 zeroext, %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* nonnull align 8 dereferenceable(32)) #10
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 4 dereferenceable(4) i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i32* nonnull align 4 dereferenceable(4) %__t) #1 comdat {
entry:
%__t.addr = alloca i32*, align 8
store i32* %__t, i32** %__t.addr, align 8
%0 = load i32*, i32** %__t.addr, align 8
ret i32* %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt5tupleIJOiEEC2IJiELb1ELb1EEEDpOT_(%"class.std::tuple"* %this, i32* nonnull align 4 dereferenceable(4) %__elements) unnamed_addr #1 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%this.addr = alloca %"class.std::tuple"*, align 8
%__elements.addr = alloca i32*, align 8
store %"class.std::tuple"* %this, %"class.std::tuple"** %this.addr, align 8
store i32* %__elements, i32** %__elements.addr, align 8
%this1 = load %"class.std::tuple"*, %"class.std::tuple"** %this.addr, align 8
%0 = bitcast %"class.std::tuple"* %this1 to %"struct.std::_Tuple_impl"*
%1 = load i32*, i32** %__elements.addr, align 8
%call = call nonnull align 4 dereferenceable(4) i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i32* nonnull align 4 dereferenceable(4) %1) #11
invoke void @_ZNSt11_Tuple_implILm0EJOiEEC2IiEEOT_(%"struct.std::_Tuple_impl"* %0, i32* nonnull align 4 dereferenceable(4) %call)
to label %invoke.cont unwind label %terminate.lpad
invoke.cont: ; preds = %entry
ret void
terminate.lpad: ; preds = %entry
%2 = landingpad { i8*, i32 }
catch i8* null
%3 = extractvalue { i8*, i32 } %2, 0
call void @__clang_call_terminate(i8* %3) #12
unreachable
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt11_Tuple_implILm0EJOiEEC2IiEEOT_(%"struct.std::_Tuple_impl"* %this, i32* nonnull align 4 dereferenceable(4) %__head) unnamed_addr #0 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Tuple_impl"*, align 8
%__head.addr = alloca i32*, align 8
store %"struct.std::_Tuple_impl"* %this, %"struct.std::_Tuple_impl"** %this.addr, align 8
store i32* %__head, i32** %__head.addr, align 8
%this1 = load %"struct.std::_Tuple_impl"*, %"struct.std::_Tuple_impl"** %this.addr, align 8
%0 = bitcast %"struct.std::_Tuple_impl"* %this1 to %"struct.std::_Head_base"*
%1 = load i32*, i32** %__head.addr, align 8
%call = call nonnull align 4 dereferenceable(4) i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i32* nonnull align 4 dereferenceable(4) %1) #11
call void @_ZNSt10_Head_baseILm0EOiLb0EEC2IiEEOT_(%"struct.std::_Head_base"* %0, i32* nonnull align 4 dereferenceable(4) %call)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt10_Head_baseILm0EOiLb0EEC2IiEEOT_(%"struct.std::_Head_base"* %this, i32* nonnull align 4 dereferenceable(4) %__h) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Head_base"*, align 8
%__h.addr = alloca i32*, align 8
store %"struct.std::_Head_base"* %this, %"struct.std::_Head_base"** %this.addr, align 8
store i32* %__h, i32** %__h.addr, align 8
%this1 = load %"struct.std::_Head_base"*, %"struct.std::_Head_base"** %this.addr, align 8
%_M_head_impl = getelementptr inbounds %"struct.std::_Head_base", %"struct.std::_Head_base"* %this1, i32 0, i32 0
%0 = load i32*, i32** %__h.addr, align 8
%call = call nonnull align 4 dereferenceable(4) i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i32* nonnull align 4 dereferenceable(4) %0) #11
store i32* %call, i32** %_M_head_impl, align 8
ret void
}
attributes #0 = { noinline 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" }
attributes #1 = { 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" }
attributes #2 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #3 = { noinline noreturn nounwind }
attributes #4 = { noreturn "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #5 = { nobuiltin allocsize(0) "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #6 = { argmemonly nounwind willreturn }
attributes #7 = { nobuiltin nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #8 = { cold noreturn nounwind }
attributes #9 = { nounwind readonly "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #10 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #11 = { nounwind }
attributes #12 = { noreturn nounwind }
attributes #13 = { noreturn }
attributes #14 = { allocsize(0) }
attributes #15 = { nounwind readonly }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%stack_var_-27 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
%1 = ptrtoint i64* %stack_var_-27 to i64, !insn.addr !1
ret i64 %1, !insn.addr !2
}
define i64 @function_30(i64 %arg1, i64 %arg2, i64 %arg3, i64 %arg4, i64 %arg5) local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !3
%1 = load i64, i64* %0
%2 = add i64 %arg5, -119, !insn.addr !3
%3 = inttoptr i64 %2 to i8*, !insn.addr !3
%4 = load i8, i8* %3, align 1, !insn.addr !3
%5 = lshr i8 %4, 7, !insn.addr !3
%6 = mul i8 %4, 2, !insn.addr !3
%7 = or i8 %5, %6, !insn.addr !3
store i8 %7, i8* %3, align 1, !insn.addr !3
%8 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_ncpy_66b_badSink(), !insn.addr !4
%9 = add i64 %1, -8, !insn.addr !5
%10 = inttoptr i64 %9 to i64*, !insn.addr !5
%11 = load i64, i64* %10, align 8, !insn.addr !5
%12 = call i64 @__readfsqword(i64 40), !insn.addr !6
%13 = icmp eq i64 %11, %12, !insn.addr !6
store i64 0, i64* %rax.0.reg2mem, !insn.addr !7
br i1 %13, label %dec_label_pc_4f, label %dec_label_pc_4a, !insn.addr !7
dec_label_pc_4a: ; preds = %dec_label_pc_30
%14 = call i64 @__stack_chk_fail(), !insn.addr !8
store i64 %14, i64* %rax.0.reg2mem, !insn.addr !8
br label %dec_label_pc_4f, !insn.addr !8
dec_label_pc_4f: ; preds = %dec_label_pc_4a, %dec_label_pc_30
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !9
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_51:
%rax.0.reg2mem = alloca i64, !insn.addr !10
%stack_var_-72 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !11
%1 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_ncpy_66b_goodG2BSink(i64* nonnull %stack_var_-72), !insn.addr !12
%2 = call i64 @__readfsqword(i64 40), !insn.addr !13
%3 = icmp eq i64 %0, %2, !insn.addr !13
store i64 0, i64* %rax.0.reg2mem, !insn.addr !14
br i1 %3, label %dec_label_pc_a0, label %dec_label_pc_9b, !insn.addr !14
dec_label_pc_9b: ; preds = %dec_label_pc_51
%4 = call i64 @__stack_chk_fail(), !insn.addr !15
store i64 %4, i64* %rax.0.reg2mem, !insn.addr !15
br label %dec_label_pc_a0, !insn.addr !15
dec_label_pc_a0: ; preds = %dec_label_pc_9b, %dec_label_pc_51
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !16
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_ncpy_66_good() local_unnamed_addr {
dec_label_pc_a2:
%0 = call i64 @goodG2B(), !insn.addr !17
ret i64 %0, !insn.addr !18
}
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_ncpy_66b_badSink() local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_ncpy_66b_goodG2BSink(i64*) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 8}
!1 = !{i64 27}
!2 = !{i64 35}
!3 = !{i64 48}
!4 = !{i64 53}
!5 = !{i64 59}
!6 = !{i64 63}
!7 = !{i64 72}
!8 = !{i64 74}
!9 = !{i64 80}
!10 = !{i64 81}
!11 = !{i64 89}
!12 = !{i64 134}
!13 = !{i64 144}
!14 = !{i64 153}
!15 = !{i64 155}
!16 = !{i64 161}
!17 = !{i64 171}
!18 = !{i64 178}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_ncpy_66_bad() #0 {
entry:
%data = alloca i8*, align 8
%dataArray = alloca [5 x i8*], align 16
%dataBadBuffer = alloca [10 x i8], align 1
%dataGoodBuffer = alloca [11 x i8], align 1
%arraydecay = getelementptr inbounds [10 x i8], [10 x i8]* %dataBadBuffer, i64 0, i64 0
store i8* %arraydecay, i8** %data, align 8
%0 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %0, i64 0
store i8 0, i8* %arrayidx, align 1
%1 = load i8*, i8** %data, align 8
%arrayidx1 = getelementptr inbounds [5 x i8*], [5 x i8*]* %dataArray, i64 0, i64 2
store i8* %1, i8** %arrayidx1, align 16
%arraydecay2 = getelementptr inbounds [5 x i8*], [5 x i8*]* %dataArray, i64 0, i64 0
call void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_ncpy_66b_badSink(i8** %arraydecay2)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_ncpy_66b_badSink(i8**) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_ncpy_66_good() #0 {
entry:
call void @goodG2B()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B() #0 {
entry:
%data = alloca i8*, align 8
%dataArray = alloca [5 x i8*], align 16
%dataBadBuffer = alloca [10 x i8], align 1
%dataGoodBuffer = alloca [11 x i8], align 1
%arraydecay = getelementptr inbounds [11 x i8], [11 x i8]* %dataGoodBuffer, i64 0, i64 0
store i8* %arraydecay, i8** %data, align 8
%0 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %0, i64 0
store i8 0, i8* %arrayidx, align 1
%1 = load i8*, i8** %data, align 8
%arrayidx1 = getelementptr inbounds [5 x i8*], [5 x i8*]* %dataArray, i64 0, i64 2
store i8* %1, i8** %arrayidx1, align 16
%arraydecay2 = getelementptr inbounds [5 x i8*], [5 x i8*]* %dataArray, i64 0, i64 0
call void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_ncpy_66b_goodG2BSink(i8** %arraydecay2)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_ncpy_66b_goodG2BSink(i8**) #1
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" }
attributes #1 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_190 = constant i64 955610320750919936
define i64 @_GLOBAL_OFFSET_TABLE_.1(i64 %arg1) local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
ret i64 %arg1, !insn.addr !1
}
define i64 @function_33() local_unnamed_addr {
dec_label_pc_33:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !2
%1 = load i64, i64* %0
%2 = add i64 %1, -416, !insn.addr !2
%3 = inttoptr i64 %2 to i8*, !insn.addr !3
call void @__asm_rep_stosq_memset(i8* %3, i64 0, i64 50), !insn.addr !3
%4 = add i64 %1, -424, !insn.addr !4
%5 = inttoptr i64 %4 to i64*, !insn.addr !4
%6 = load i64, i64* %5, align 8, !insn.addr !4
%7 = call i64 @memmove(i64 %6, i64 %2, i64* nonnull @global_var_190, i64 %2), !insn.addr !5
%8 = load i64, i64* %5, align 8, !insn.addr !6
%9 = inttoptr i64 %8 to i32*, !insn.addr !7
%10 = load i32, i32* %9, align 4, !insn.addr !7
%11 = zext i32 %10 to i64, !insn.addr !8
%12 = call i64 @printIntLine(i64 %11), !insn.addr !9
%13 = add i64 %1, -8, !insn.addr !10
%14 = inttoptr i64 %13 to i64*, !insn.addr !10
%15 = load i64, i64* %14, align 8, !insn.addr !10
%16 = call i64 @__readfsqword(i64 40), !insn.addr !11
%17 = icmp eq i64 %15, %16, !insn.addr !11
store i64 0, i64* %rax.0.reg2mem, !insn.addr !12
br i1 %17, label %dec_label_pc_8d, label %dec_label_pc_88, !insn.addr !12
dec_label_pc_88: ; preds = %dec_label_pc_33
%18 = call i64 @__stack_chk_fail(), !insn.addr !13
store i64 %18, i64* %rax.0.reg2mem, !insn.addr !13
br label %dec_label_pc_8d, !insn.addr !13
dec_label_pc_8d: ; preds = %dec_label_pc_88, %dec_label_pc_33
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !14
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove_66b_goodG2BSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_8f:
%rax.0.reg2mem = alloca i64, !insn.addr !15
%stack_var_-424 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !16
%1 = add i64 %arg1, 16, !insn.addr !17
%2 = inttoptr i64 %1 to i64*, !insn.addr !17
%3 = load i64, i64* %2, align 8, !insn.addr !17
%4 = bitcast i64* %stack_var_-424 to i8*, !insn.addr !18
call void @__asm_rep_stosq_memset(i8* nonnull %4, i64 0, i64 50), !insn.addr !18
%5 = ptrtoint i64* %stack_var_-424 to i64, !insn.addr !19
%6 = call i64 @memmove(i64 %3, i64 %5, i64* nonnull @global_var_190, i64 %5), !insn.addr !20
%7 = inttoptr i64 %3 to i32*, !insn.addr !21
%8 = load i32, i32* %7, align 4, !insn.addr !21
%9 = zext i32 %8 to i64, !insn.addr !22
%10 = call i64 @printIntLine(i64 %9), !insn.addr !23
%11 = call i64 @__readfsqword(i64 40), !insn.addr !24
%12 = icmp eq i64 %0, %11, !insn.addr !24
store i64 0, i64* %rax.0.reg2mem, !insn.addr !25
br i1 %12, label %dec_label_pc_11c, label %dec_label_pc_117, !insn.addr !25
dec_label_pc_117: ; preds = %dec_label_pc_8f
%13 = call i64 @__stack_chk_fail(), !insn.addr !26
store i64 %13, i64* %rax.0.reg2mem, !insn.addr !26
br label %dec_label_pc_11c, !insn.addr !26
dec_label_pc_11c: ; preds = %dec_label_pc_117, %dec_label_pc_8f
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !27
}
declare i64 @memmove(i64, i64, i64*, i64) local_unnamed_addr
declare i64 @printIntLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare void @__asm_rep_stosq_memset(i8*, i64, i64) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 18}
!1 = !{i64 33}
!2 = !{i64 51}
!3 = !{i64 71}
!4 = !{i64 81}
!5 = !{i64 99}
!6 = !{i64 104}
!7 = !{i64 111}
!8 = !{i64 113}
!9 = !{i64 115}
!10 = !{i64 121}
!11 = !{i64 125}
!12 = !{i64 134}
!13 = !{i64 136}
!14 = !{i64 142}
!15 = !{i64 143}
!16 = !{i64 161}
!17 = !{i64 183}
!18 = !{i64 214}
!19 = !{i64 217}
!20 = !{i64 242}
!21 = !{i64 254}
!22 = !{i64 256}
!23 = !{i64 258}
!24 = !{i64 268}
!25 = !{i64 277}
!26 = !{i64 279}
!27 = !{i64 285}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove_66b_badSink(i32** %dataArray) #0 {
entry:
%dataArray.addr = alloca i32**, align 8
%data = alloca i32*, align 8
%source = alloca [100 x i32], align 16
store i32** %dataArray, i32*** %dataArray.addr, align 8
%0 = load i32**, i32*** %dataArray.addr, align 8
%arrayidx = getelementptr inbounds i32*, i32** %0, i64 2
%1 = load i32*, i32** %arrayidx, align 8
store i32* %1, i32** %data, align 8
%2 = bitcast [100 x i32]* %source to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %2, i8 0, i64 400, i1 false)
%3 = load i32*, i32** %data, align 8
%4 = bitcast i32* %3 to i8*
%arraydecay = getelementptr inbounds [100 x i32], [100 x i32]* %source, i64 0, i64 0
%5 = bitcast i32* %arraydecay to i8*
call void @llvm.memmove.p0i8.p0i8.i64(i8* align 4 %4, i8* align 16 %5, i64 400, i1 false)
%6 = load i32*, i32** %data, align 8
%arrayidx1 = getelementptr inbounds i32, i32* %6, i64 0
%7 = load i32, i32* %arrayidx1, align 4
call void @printIntLine(i32 %7)
ret void
}
; Function Attrs: argmemonly nounwind willreturn writeonly
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #1
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memmove.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i1 immarg) #2
declare dso_local void @printIntLine(i32) #3
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove_66b_goodG2BSink(i32** %dataArray) #0 {
entry:
%dataArray.addr = alloca i32**, align 8
%data = alloca i32*, align 8
%source = alloca [100 x i32], align 16
store i32** %dataArray, i32*** %dataArray.addr, align 8
%0 = load i32**, i32*** %dataArray.addr, align 8
%arrayidx = getelementptr inbounds i32*, i32** %0, i64 2
%1 = load i32*, i32** %arrayidx, align 8
store i32* %1, i32** %data, align 8
%2 = bitcast [100 x i32]* %source to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %2, i8 0, i64 400, i1 false)
%3 = load i32*, i32** %data, align 8
%4 = bitcast i32* %3 to i8*
%arraydecay = getelementptr inbounds [100 x i32], [100 x i32]* %source, i64 0, i64 0
%5 = bitcast i32* %arraydecay to i8*
call void @llvm.memmove.p0i8.p0i8.i64(i8* align 4 %4, i8* align 16 %5, i64 400, i1 false)
%6 = load i32*, i32** %data, align 8
%arrayidx1 = getelementptr inbounds i32, i32* %6, i64 0
%7 = load i32, i32* %arrayidx1, align 4
call void @printIntLine(i32 %7)
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" }
attributes #1 = { argmemonly nounwind willreturn writeonly }
attributes #2 = { argmemonly nounwind willreturn }
attributes #3 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
define i64 @_GLOBAL_OFFSET_TABLE_.1(i64 %arg1) local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
ret i64 0, !insn.addr !1
}
define i64 @function_30(i64 %arg1, i64 %arg2, i64 %arg3, i64 %arg4) local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%.reg2mem = alloca i64, !insn.addr !2
%storemerge1.reg2mem = alloca i64, !insn.addr !2
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = trunc i64 %2 to i8
%4 = mul i8 %3, 2, !insn.addr !2
%5 = inttoptr i64 %2 to i8*, !insn.addr !2
store i8 %4, i8* %5, align 1, !insn.addr !2
%6 = inttoptr i64 %arg3 to i8*, !insn.addr !3
call void @__asm_rep_stosq_memset(i8* %6, i64 %2, i64 %arg4), !insn.addr !3
%7 = add i64 %1, -824, !insn.addr !4
%8 = inttoptr i64 %7 to i64*, !insn.addr !4
store i64 0, i64* %8, align 8
%9 = add i64 %1, -840
%10 = inttoptr i64 %9 to i64*
%11 = add i64 %1, -816, !insn.addr !5
store i64 0, i64* %storemerge1.reg2mem
br label %dec_label_pc_45
dec_label_pc_45: ; preds = %dec_label_pc_30, %dec_label_pc_45
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%12 = mul i64 %storemerge1.reload, 8, !insn.addr !6
%13 = load i64, i64* %10, align 8, !insn.addr !7
%14 = add i64 %13, %12, !insn.addr !8
%15 = add i64 %11, %12, !insn.addr !5
%16 = inttoptr i64 %15 to i64*, !insn.addr !5
%17 = load i64, i64* %16, align 8, !insn.addr !5
%18 = inttoptr i64 %14 to i64*, !insn.addr !9
store i64 %17, i64* %18, align 8, !insn.addr !9
%19 = load i64, i64* %8, align 8, !insn.addr !10
%20 = add i64 %19, 1, !insn.addr !10
store i64 %20, i64* %8, align 8
%21 = icmp ult i64 %20, 100
store i64 %20, i64* %storemerge1.reg2mem, !insn.addr !11
br i1 %21, label %dec_label_pc_45, label %dec_label_pc_82, !insn.addr !11
dec_label_pc_82: ; preds = %dec_label_pc_45
%22 = load i64, i64* %10, align 8, !insn.addr !12
%23 = inttoptr i64 %22 to i64*, !insn.addr !13
%24 = load i64, i64* %23, align 8, !insn.addr !13
%25 = call i64 @printLongLongLine(i64 %24), !insn.addr !14
%26 = add i64 %1, -8, !insn.addr !15
%27 = inttoptr i64 %26 to i64*, !insn.addr !15
%28 = load i64, i64* %27, align 8, !insn.addr !15
%29 = call i64 @__readfsqword(i64 40), !insn.addr !16
%30 = icmp eq i64 %29, %28, !insn.addr !16
store i64 0, i64* %.reg2mem, !insn.addr !17
br i1 %30, label %dec_label_pc_a9, label %dec_label_pc_a4, !insn.addr !17
dec_label_pc_a4: ; preds = %dec_label_pc_82
%31 = call i64 @__stack_chk_fail(), !insn.addr !18
store i64 %31, i64* %.reg2mem, !insn.addr !18
br label %dec_label_pc_a9, !insn.addr !18
dec_label_pc_a9: ; preds = %dec_label_pc_a4, %dec_label_pc_82
%.reload = load i64, i64* %.reg2mem, !insn.addr !19
ret i64 %.reload, !insn.addr !19
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_loop_52c_goodG2BSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_ab:
%0 = alloca i1
%rax.0.reg2mem = alloca i64, !insn.addr !20
%storemerge1.reg2mem = alloca i64, !insn.addr !20
%1 = load i1, i1* %0
%stack_var_-824 = alloca i64, align 8
%stack_var_-8 = alloca i64, align 8
%2 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !21
%3 = call i64 @__readfsqword(i64 40), !insn.addr !22
%4 = bitcast i64* %stack_var_-824 to i8*, !insn.addr !23
call void @__asm_rep_stosq_memset(i8* nonnull %4, i64 0, i64 100), !insn.addr !23
%5 = add i64 %2, -816, !insn.addr !24
store i64 0, i64* %storemerge1.reg2mem
br label %dec_label_pc_f0
dec_label_pc_f0: ; preds = %dec_label_pc_f0, %dec_label_pc_ab
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%6 = mul i64 %storemerge1.reload, 8, !insn.addr !25
%7 = add i64 %6, %arg1, !insn.addr !26
%8 = add i64 %5, %6, !insn.addr !24
%9 = inttoptr i64 %8 to i64*, !insn.addr !24
%10 = load i64, i64* %9, align 8, !insn.addr !24
%11 = inttoptr i64 %7 to i64*, !insn.addr !27
store i64 %10, i64* %11, align 8, !insn.addr !27
%12 = add nuw nsw i64 %storemerge1.reload, 1, !insn.addr !28
%exitcond = icmp eq i64 %12, 100
store i64 %12, i64* %storemerge1.reg2mem, !insn.addr !29
br i1 %exitcond, label %dec_label_pc_12d, label %dec_label_pc_f0, !insn.addr !29
dec_label_pc_12d: ; preds = %dec_label_pc_f0
%13 = select i1 %1, i64 -800, i64 800, !insn.addr !23
%14 = ptrtoint i64* %stack_var_-824 to i64, !insn.addr !30
%15 = add i64 %13, %14, !insn.addr !23
%16 = call i64 @printLongLongLine(i64 %15), !insn.addr !31
%17 = call i64 @__readfsqword(i64 40), !insn.addr !32
%18 = icmp eq i64 %3, %17, !insn.addr !32
store i64 0, i64* %rax.0.reg2mem, !insn.addr !33
br i1 %18, label %dec_label_pc_154, label %dec_label_pc_14f, !insn.addr !33
dec_label_pc_14f: ; preds = %dec_label_pc_12d
%19 = call i64 @__stack_chk_fail(), !insn.addr !34
store i64 %19, i64* %rax.0.reg2mem, !insn.addr !34
br label %dec_label_pc_154, !insn.addr !34
dec_label_pc_154: ; preds = %dec_label_pc_14f, %dec_label_pc_12d
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !35
}
declare i64 @printLongLongLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare void @__asm_rep_stosq_memset(i8*, i64, i64) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 18}
!1 = !{i64 33}
!2 = !{i64 48}
!3 = !{i64 53}
!4 = !{i64 56}
!5 = !{i64 101}
!6 = !{i64 76}
!7 = !{i64 84}
!8 = !{i64 91}
!9 = !{i64 109}
!10 = !{i64 112}
!11 = !{i64 128}
!12 = !{i64 130}
!13 = !{i64 137}
!14 = !{i64 143}
!15 = !{i64 149}
!16 = !{i64 153}
!17 = !{i64 162}
!18 = !{i64 164}
!19 = !{i64 170}
!20 = !{i64 171}
!21 = !{i64 172}
!22 = !{i64 189}
!23 = !{i64 224}
!24 = !{i64 272}
!25 = !{i64 247}
!26 = !{i64 262}
!27 = !{i64 280}
!28 = !{i64 283}
!29 = !{i64 299}
!30 = !{i64 221}
!31 = !{i64 314}
!32 = !{i64 324}
!33 = !{i64 333}
!34 = !{i64 335}
!35 = !{i64 341}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_loop_52c_badSink(i64* %data) #0 {
entry:
%data.addr = alloca i64*, align 8
%source = alloca [100 x i64], align 16
%i = alloca i64, align 8
store i64* %data, i64** %data.addr, align 8
%0 = bitcast [100 x i64]* %source to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %0, i8 0, i64 800, i1 false)
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %entry
%1 = load i64, i64* %i, align 8
%cmp = icmp ult i64 %1, 100
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%2 = load i64, i64* %i, align 8
%arrayidx = getelementptr inbounds [100 x i64], [100 x i64]* %source, i64 0, i64 %2
%3 = load i64, i64* %arrayidx, align 8
%4 = load i64*, i64** %data.addr, align 8
%5 = load i64, i64* %i, align 8
%arrayidx1 = getelementptr inbounds i64, i64* %4, i64 %5
store i64 %3, i64* %arrayidx1, align 8
br label %for.inc
for.inc: ; preds = %for.body
%6 = load i64, i64* %i, align 8
%inc = add i64 %6, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%7 = load i64*, i64** %data.addr, align 8
%arrayidx2 = getelementptr inbounds i64, i64* %7, i64 0
%8 = load i64, i64* %arrayidx2, align 8
call void @printLongLongLine(i64 %8)
ret void
}
; Function Attrs: argmemonly nounwind willreturn writeonly
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #1
declare dso_local void @printLongLongLine(i64) #2
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_loop_52c_goodG2BSink(i64* %data) #0 {
entry:
%data.addr = alloca i64*, align 8
%source = alloca [100 x i64], align 16
%i = alloca i64, align 8
store i64* %data, i64** %data.addr, align 8
%0 = bitcast [100 x i64]* %source to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %0, i8 0, i64 800, i1 false)
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %entry
%1 = load i64, i64* %i, align 8
%cmp = icmp ult i64 %1, 100
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%2 = load i64, i64* %i, align 8
%arrayidx = getelementptr inbounds [100 x i64], [100 x i64]* %source, i64 0, i64 %2
%3 = load i64, i64* %arrayidx, align 8
%4 = load i64*, i64** %data.addr, align 8
%5 = load i64, i64* %i, align 8
%arrayidx1 = getelementptr inbounds i64, i64* %4, i64 %5
store i64 %3, i64* %arrayidx1, align 8
br label %for.inc
for.inc: ; preds = %for.body
%6 = load i64, i64* %i, align 8
%inc = add i64 %6, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%7 = load i64*, i64** %data.addr, align 8
%arrayidx2 = getelementptr inbounds i64, i64* %7, i64 0
%8 = load i64, i64* %arrayidx2, align 8
call void @printLongLongLine(i64 %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" }
attributes #1 = { argmemonly nounwind willreturn writeonly }
attributes #2 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_3cc = constant [21 x i8] c"Benign, fixed string\00"
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
ret i64 1, !insn.addr !0
}
define i64 @staticReturnsFalse() local_unnamed_addr {
dec_label_pc_b:
ret i64 0, !insn.addr !1
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_alloca_memmove_08_bad() local_unnamed_addr {
dec_label_pc_16:
%rax.0.reg2mem = alloca i64, !insn.addr !2
%storemerge1.reg2mem = alloca i64, !insn.addr !2
%stack_var_-824 = alloca i64, align 8
%stack_var_-856 = alloca i64, align 8
%stack_var_-8 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !3
%1 = call i64 @_GLOBAL_OFFSET_TABLE_.1(), !insn.addr !4
%2 = trunc i64 %1 to i32, !insn.addr !5
%3 = icmp eq i32 %2, 0, !insn.addr !5
br i1 %3, label %dec_label_pc_be, label %dec_label_pc_b0, !insn.addr !6
dec_label_pc_b0: ; preds = %dec_label_pc_16
%4 = ptrtoint i64* %stack_var_-856 to i64, !insn.addr !7
%5 = add i64 %4, -401, !insn.addr !8
%6 = and i64 %5, -16, !insn.addr !9
store i64 %6, i64* %stack_var_-856, align 8, !insn.addr !10
br label %dec_label_pc_be, !insn.addr !10
dec_label_pc_be: ; preds = %dec_label_pc_b0, %dec_label_pc_16
%7 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !11
store i64 0, i64* %storemerge1.reg2mem
br label %dec_label_pc_cb
dec_label_pc_cb: ; preds = %dec_label_pc_cb, %dec_label_pc_be
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%8 = mul i64 %storemerge1.reload, 8, !insn.addr !12
%9 = add i64 %8, %7
%10 = add i64 %9, -816, !insn.addr !12
%11 = inttoptr i64 %10 to i32*, !insn.addr !12
store i32 0, i32* %11, align 8, !insn.addr !12
%12 = add i64 %9, -812, !insn.addr !13
%13 = inttoptr i64 %12 to i32*, !insn.addr !13
store i32 0, i32* %13, align 4, !insn.addr !13
%14 = add nuw nsw i64 %storemerge1.reload, 1, !insn.addr !14
%exitcond = icmp eq i64 %14, 100
store i64 %14, i64* %storemerge1.reg2mem, !insn.addr !15
br i1 %exitcond, label %dec_label_pc_101, label %dec_label_pc_cb, !insn.addr !15
dec_label_pc_101: ; preds = %dec_label_pc_cb
%15 = load i64, i64* %stack_var_-856, align 8, !insn.addr !16
%16 = call i64 @memmove(i64 %15, i64* nonnull %stack_var_-824, i64 800, i64* nonnull %stack_var_-824), !insn.addr !17
%17 = load i64, i64* %stack_var_-856, align 8, !insn.addr !18
%18 = call i64 @printStructLine(i64 %17), !insn.addr !19
%19 = call i64 @__readfsqword(i64 40), !insn.addr !20
%20 = icmp eq i64 %0, %19, !insn.addr !20
store i64 0, i64* %rax.0.reg2mem, !insn.addr !21
br i1 %20, label %dec_label_pc_143, label %dec_label_pc_13e, !insn.addr !21
dec_label_pc_13e: ; preds = %dec_label_pc_101
%21 = call i64 @__stack_chk_fail(), !insn.addr !22
store i64 %21, i64* %rax.0.reg2mem, !insn.addr !22
br label %dec_label_pc_143, !insn.addr !22
dec_label_pc_143: ; preds = %dec_label_pc_13e, %dec_label_pc_101
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !23
}
define i64 @goodG2B1() local_unnamed_addr {
dec_label_pc_145:
%rax.0.reg2mem = alloca i64, !insn.addr !24
%storemerge1.reg2mem = alloca i64, !insn.addr !24
%stack_var_-824 = alloca i64, align 8
%stack_var_-856 = alloca i64, align 8
%stack_var_-8 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !25
%1 = call i64 @staticReturnsFalse(), !insn.addr !26
%2 = trunc i64 %1 to i32, !insn.addr !27
%3 = icmp eq i32 %2, 0, !insn.addr !27
br i1 %3, label %dec_label_pc_1ed, label %dec_label_pc_1df, !insn.addr !28
dec_label_pc_1df: ; preds = %dec_label_pc_145
%4 = call i64 @printLine(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @global_var_3cc, i64 0, i64 0)), !insn.addr !29
br label %dec_label_pc_1fb, !insn.addr !30
dec_label_pc_1ed: ; preds = %dec_label_pc_145
%5 = ptrtoint i64* %stack_var_-856 to i64, !insn.addr !31
%6 = add i64 %5, -1217, !insn.addr !32
%7 = and i64 %6, -16, !insn.addr !33
store i64 %7, i64* %stack_var_-856, align 8, !insn.addr !34
br label %dec_label_pc_1fb, !insn.addr !34
dec_label_pc_1fb: ; preds = %dec_label_pc_1ed, %dec_label_pc_1df
%8 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !35
store i64 0, i64* %storemerge1.reg2mem
br label %dec_label_pc_208
dec_label_pc_208: ; preds = %dec_label_pc_208, %dec_label_pc_1fb
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%9 = mul i64 %storemerge1.reload, 8, !insn.addr !36
%10 = add i64 %9, %8
%11 = add i64 %10, -816, !insn.addr !36
%12 = inttoptr i64 %11 to i32*, !insn.addr !36
store i32 0, i32* %12, align 8, !insn.addr !36
%13 = add i64 %10, -812, !insn.addr !37
%14 = inttoptr i64 %13 to i32*, !insn.addr !37
store i32 0, i32* %14, align 4, !insn.addr !37
%15 = add nuw nsw i64 %storemerge1.reload, 1, !insn.addr !38
%exitcond = icmp eq i64 %15, 100
store i64 %15, i64* %storemerge1.reg2mem, !insn.addr !39
br i1 %exitcond, label %dec_label_pc_23e, label %dec_label_pc_208, !insn.addr !39
dec_label_pc_23e: ; preds = %dec_label_pc_208
%16 = load i64, i64* %stack_var_-856, align 8, !insn.addr !40
%17 = call i64 @memmove(i64 %16, i64* nonnull %stack_var_-824, i64 800, i64* nonnull %stack_var_-824), !insn.addr !41
%18 = load i64, i64* %stack_var_-856, align 8, !insn.addr !42
%19 = call i64 @printStructLine(i64 %18), !insn.addr !43
%20 = call i64 @__readfsqword(i64 40), !insn.addr !44
%21 = icmp eq i64 %0, %20, !insn.addr !44
store i64 0, i64* %rax.0.reg2mem, !insn.addr !45
br i1 %21, label %dec_label_pc_280, label %dec_label_pc_27b, !insn.addr !45
dec_label_pc_27b: ; preds = %dec_label_pc_23e
%22 = call i64 @__stack_chk_fail(), !insn.addr !46
store i64 %22, i64* %rax.0.reg2mem, !insn.addr !46
br label %dec_label_pc_280, !insn.addr !46
dec_label_pc_280: ; preds = %dec_label_pc_27b, %dec_label_pc_23e
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !47
}
define i64 @goodG2B2() local_unnamed_addr {
dec_label_pc_282:
%rax.0.reg2mem = alloca i64, !insn.addr !48
%storemerge1.reg2mem = alloca i64, !insn.addr !48
%stack_var_-824 = alloca i64, align 8
%stack_var_-856 = alloca i64, align 8
%stack_var_-8 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !49
%1 = call i64 @_GLOBAL_OFFSET_TABLE_.1(), !insn.addr !50
%2 = trunc i64 %1 to i32, !insn.addr !51
%3 = icmp eq i32 %2, 0, !insn.addr !51
br i1 %3, label %dec_label_pc_32a, label %dec_label_pc_31c, !insn.addr !52
dec_label_pc_31c: ; preds = %dec_label_pc_282
%4 = ptrtoint i64* %stack_var_-856 to i64, !insn.addr !53
%5 = add i64 %4, -1217, !insn.addr !54
%6 = and i64 %5, -16, !insn.addr !55
store i64 %6, i64* %stack_var_-856, align 8, !insn.addr !56
br label %dec_label_pc_32a, !insn.addr !56
dec_label_pc_32a: ; preds = %dec_label_pc_31c, %dec_label_pc_282
%7 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !57
store i64 0, i64* %storemerge1.reg2mem
br label %dec_label_pc_337
dec_label_pc_337: ; preds = %dec_label_pc_337, %dec_label_pc_32a
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%8 = mul i64 %storemerge1.reload, 8, !insn.addr !58
%9 = add i64 %8, %7
%10 = add i64 %9, -816, !insn.addr !58
%11 = inttoptr i64 %10 to i32*, !insn.addr !58
store i32 0, i32* %11, align 8, !insn.addr !58
%12 = add i64 %9, -812, !insn.addr !59
%13 = inttoptr i64 %12 to i32*, !insn.addr !59
store i32 0, i32* %13, align 4, !insn.addr !59
%14 = add nuw nsw i64 %storemerge1.reload, 1, !insn.addr !60
%exitcond = icmp eq i64 %14, 100
store i64 %14, i64* %storemerge1.reg2mem, !insn.addr !61
br i1 %exitcond, label %dec_label_pc_36d, label %dec_label_pc_337, !insn.addr !61
dec_label_pc_36d: ; preds = %dec_label_pc_337
%15 = load i64, i64* %stack_var_-856, align 8, !insn.addr !62
%16 = call i64 @memmove(i64 %15, i64* nonnull %stack_var_-824, i64 800, i64* nonnull %stack_var_-824), !insn.addr !63
%17 = load i64, i64* %stack_var_-856, align 8, !insn.addr !64
%18 = call i64 @printStructLine(i64 %17), !insn.addr !65
%19 = call i64 @__readfsqword(i64 40), !insn.addr !66
%20 = icmp eq i64 %0, %19, !insn.addr !66
store i64 0, i64* %rax.0.reg2mem, !insn.addr !67
br i1 %20, label %dec_label_pc_3af, label %dec_label_pc_3aa, !insn.addr !67
dec_label_pc_3aa: ; preds = %dec_label_pc_36d
%21 = call i64 @__stack_chk_fail(), !insn.addr !68
store i64 %21, i64* %rax.0.reg2mem, !insn.addr !68
br label %dec_label_pc_3af, !insn.addr !68
dec_label_pc_3af: ; preds = %dec_label_pc_3aa, %dec_label_pc_36d
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !69
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_alloca_memmove_08_good() local_unnamed_addr {
dec_label_pc_3b1:
%0 = call i64 @goodG2B1(), !insn.addr !70
%1 = call i64 @goodG2B2(), !insn.addr !71
ret i64 %1, !insn.addr !72
}
declare i64 @memmove(i64, i64*, i64, i64*) local_unnamed_addr
declare i64 @printStructLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @printLine(i8*) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 10}
!1 = !{i64 21}
!2 = !{i64 22}
!3 = !{i64 33}
!4 = !{i64 167}
!5 = !{i64 172}
!6 = !{i64 174}
!7 = !{i64 26}
!8 = !{i64 86}
!9 = !{i64 90}
!10 = !{i64 183}
!11 = !{i64 23}
!12 = !{i64 210}
!13 = !{i64 228}
!14 = !{i64 239}
!15 = !{i64 255}
!16 = !{i64 264}
!17 = !{i64 282}
!18 = !{i64 287}
!19 = !{i64 297}
!20 = !{i64 307}
!21 = !{i64 316}
!22 = !{i64 318}
!23 = !{i64 324}
!24 = !{i64 325}
!25 = !{i64 336}
!26 = !{i64 470}
!27 = !{i64 475}
!28 = !{i64 477}
!29 = !{i64 486}
!30 = !{i64 491}
!31 = !{i64 329}
!32 = !{i64 446}
!33 = !{i64 450}
!34 = !{i64 500}
!35 = !{i64 326}
!36 = !{i64 527}
!37 = !{i64 545}
!38 = !{i64 556}
!39 = !{i64 572}
!40 = !{i64 581}
!41 = !{i64 599}
!42 = !{i64 604}
!43 = !{i64 614}
!44 = !{i64 624}
!45 = !{i64 633}
!46 = !{i64 635}
!47 = !{i64 641}
!48 = !{i64 642}
!49 = !{i64 653}
!50 = !{i64 787}
!51 = !{i64 792}
!52 = !{i64 794}
!53 = !{i64 646}
!54 = !{i64 763}
!55 = !{i64 767}
!56 = !{i64 803}
!57 = !{i64 643}
!58 = !{i64 830}
!59 = !{i64 848}
!60 = !{i64 859}
!61 = !{i64 875}
!62 = !{i64 884}
!63 = !{i64 902}
!64 = !{i64 907}
!65 = !{i64 917}
!66 = !{i64 927}
!67 = !{i64 936}
!68 = !{i64 938}
!69 = !{i64 944}
!70 = !{i64 954}
!71 = !{i64 964}
!72 = !{i64 971}
### Assistant: %struct._twoIntsStruct = type { i32, i32 }
@.str = private unnamed_addr constant [21 x i8] c"Benign, fixed string\00", align 1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_alloca_memmove_08_bad() #0 {
entry:
%data = alloca %struct._twoIntsStruct*, align 8
%dataBadBuffer = alloca %struct._twoIntsStruct*, align 8
%dataGoodBuffer = alloca %struct._twoIntsStruct*, align 8
%source = alloca [100 x %struct._twoIntsStruct], align 16
%i = alloca i64, align 8
%0 = alloca i8, i64 400, align 16
%1 = bitcast i8* %0 to %struct._twoIntsStruct*
store %struct._twoIntsStruct* %1, %struct._twoIntsStruct** %dataBadBuffer, align 8
%2 = alloca i8, i64 800, align 16
%3 = bitcast i8* %2 to %struct._twoIntsStruct*
store %struct._twoIntsStruct* %3, %struct._twoIntsStruct** %dataGoodBuffer, align 8
%call = call i32 @staticReturnsTrue()
%tobool = icmp ne i32 %call, 0
br i1 %tobool, label %if.then, label %if.end
if.then: ; preds = %entry
%4 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %dataBadBuffer, align 8
store %struct._twoIntsStruct* %4, %struct._twoIntsStruct** %data, align 8
br label %if.end
if.end: ; preds = %if.then, %entry
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %if.end
%5 = load i64, i64* %i, align 8
%cmp = icmp ult i64 %5, 100
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%6 = load i64, i64* %i, align 8
%arrayidx = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %6
%intOne = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %arrayidx, i32 0, i32 0
store i32 0, i32* %intOne, align 8
%7 = load i64, i64* %i, align 8
%arrayidx1 = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %7
%intTwo = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %arrayidx1, i32 0, i32 1
store i32 0, i32* %intTwo, align 4
br label %for.inc
for.inc: ; preds = %for.body
%8 = load i64, i64* %i, align 8
%inc = add i64 %8, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%9 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data, align 8
%10 = bitcast %struct._twoIntsStruct* %9 to i8*
%arraydecay = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 0
%11 = bitcast %struct._twoIntsStruct* %arraydecay to i8*
call void @llvm.memmove.p0i8.p0i8.i64(i8* align 4 %10, i8* align 16 %11, i64 800, i1 false)
%12 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data, align 8
%arrayidx2 = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %12, i64 0
call void @printStructLine(%struct._twoIntsStruct* %arrayidx2)
ret void
}
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memmove.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i1 immarg) #1
declare dso_local void @printStructLine(%struct._twoIntsStruct*) #2
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_alloca_memmove_08_good() #0 {
entry:
call void @goodG2B1()
call void @goodG2B2()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal i32 @staticReturnsTrue() #0 {
entry:
ret i32 1
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B1() #0 {
entry:
%data = alloca %struct._twoIntsStruct*, align 8
%dataBadBuffer = alloca %struct._twoIntsStruct*, align 8
%dataGoodBuffer = alloca %struct._twoIntsStruct*, align 8
%source = alloca [100 x %struct._twoIntsStruct], align 16
%i = alloca i64, align 8
%0 = alloca i8, i64 400, align 16
%1 = bitcast i8* %0 to %struct._twoIntsStruct*
store %struct._twoIntsStruct* %1, %struct._twoIntsStruct** %dataBadBuffer, align 8
%2 = alloca i8, i64 800, align 16
%3 = bitcast i8* %2 to %struct._twoIntsStruct*
store %struct._twoIntsStruct* %3, %struct._twoIntsStruct** %dataGoodBuffer, align 8
%call = call i32 @staticReturnsFalse()
%tobool = icmp ne i32 %call, 0
br i1 %tobool, label %if.then, label %if.else
if.then: ; preds = %entry
call void @printLine(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
br label %if.end
if.else: ; preds = %entry
%4 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %dataGoodBuffer, align 8
store %struct._twoIntsStruct* %4, %struct._twoIntsStruct** %data, align 8
br label %if.end
if.end: ; preds = %if.else, %if.then
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %if.end
%5 = load i64, i64* %i, align 8
%cmp = icmp ult i64 %5, 100
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%6 = load i64, i64* %i, align 8
%arrayidx = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %6
%intOne = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %arrayidx, i32 0, i32 0
store i32 0, i32* %intOne, align 8
%7 = load i64, i64* %i, align 8
%arrayidx1 = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %7
%intTwo = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %arrayidx1, i32 0, i32 1
store i32 0, i32* %intTwo, align 4
br label %for.inc
for.inc: ; preds = %for.body
%8 = load i64, i64* %i, align 8
%inc = add i64 %8, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%9 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data, align 8
%10 = bitcast %struct._twoIntsStruct* %9 to i8*
%arraydecay = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 0
%11 = bitcast %struct._twoIntsStruct* %arraydecay to i8*
call void @llvm.memmove.p0i8.p0i8.i64(i8* align 4 %10, i8* align 16 %11, i64 800, i1 false)
%12 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data, align 8
%arrayidx2 = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %12, i64 0
call void @printStructLine(%struct._twoIntsStruct* %arrayidx2)
ret void
}
declare dso_local void @printLine(i8*) #2
; Function Attrs: noinline nounwind optnone uwtable
define internal i32 @staticReturnsFalse() #0 {
entry:
ret i32 0
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B2() #0 {
entry:
%data = alloca %struct._twoIntsStruct*, align 8
%dataBadBuffer = alloca %struct._twoIntsStruct*, align 8
%dataGoodBuffer = alloca %struct._twoIntsStruct*, align 8
%source = alloca [100 x %struct._twoIntsStruct], align 16
%i = alloca i64, align 8
%0 = alloca i8, i64 400, align 16
%1 = bitcast i8* %0 to %struct._twoIntsStruct*
store %struct._twoIntsStruct* %1, %struct._twoIntsStruct** %dataBadBuffer, align 8
%2 = alloca i8, i64 800, align 16
%3 = bitcast i8* %2 to %struct._twoIntsStruct*
store %struct._twoIntsStruct* %3, %struct._twoIntsStruct** %dataGoodBuffer, align 8
%call = call i32 @staticReturnsTrue()
%tobool = icmp ne i32 %call, 0
br i1 %tobool, label %if.then, label %if.end
if.then: ; preds = %entry
%4 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %dataGoodBuffer, align 8
store %struct._twoIntsStruct* %4, %struct._twoIntsStruct** %data, align 8
br label %if.end
if.end: ; preds = %if.then, %entry
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %if.end
%5 = load i64, i64* %i, align 8
%cmp = icmp ult i64 %5, 100
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%6 = load i64, i64* %i, align 8
%arrayidx = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %6
%intOne = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %arrayidx, i32 0, i32 0
store i32 0, i32* %intOne, align 8
%7 = load i64, i64* %i, align 8
%arrayidx1 = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %7
%intTwo = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %arrayidx1, i32 0, i32 1
store i32 0, i32* %intTwo, align 4
br label %for.inc
for.inc: ; preds = %for.body
%8 = load i64, i64* %i, align 8
%inc = add i64 %8, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%9 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data, align 8
%10 = bitcast %struct._twoIntsStruct* %9 to i8*
%arraydecay = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 0
%11 = bitcast %struct._twoIntsStruct* %arraydecay to i8*
call void @llvm.memmove.p0i8.p0i8.i64(i8* align 4 %10, i8* align 16 %11, i64 800, i1 false)
%12 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data, align 8
%arrayidx2 = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %12, i64 0
call void @printStructLine(%struct._twoIntsStruct* %arrayidx2)
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" }
attributes #1 = { argmemonly nounwind willreturn }
attributes #2 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_f = local_unnamed_addr constant [3 x i8] c"%(\00"
@global_var_190 = constant i64 8826367443462
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%stack_var_-632 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
%1 = ptrtoint i64* %stack_var_-632 to i64, !insn.addr !1
ret i64 %1, !insn.addr !2
}
define i64 @function_30(i64 %arg1, i64 %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%.reg2mem = alloca i64, !insn.addr !3
%1 = load i64, i64* %0
%rax = alloca i64, align 8
%2 = load i64, i64* %0
%3 = bitcast i64* %rax to i8*
%4 = trunc i64 %2 to i8
%5 = mul i8 %4, 2, !insn.addr !3
%6 = inttoptr i64 %2 to i8*, !insn.addr !3
store i8 %5, i8* %6, align 1, !insn.addr !3
%7 = load i8, i8* %3, align 8, !insn.addr !4
%8 = load i64, i64* %rax, align 8
%9 = trunc i64 %8 to i8, !insn.addr !4
%10 = add i8 %7, %9, !insn.addr !4
%11 = inttoptr i64 %8 to i8*, !insn.addr !4
store i8 %10, i8* %11, align 1, !insn.addr !4
%12 = inttoptr i64 %arg3 to i8*, !insn.addr !5
%13 = load i64, i64* %rax, align 8, !insn.addr !5
call void @__asm_rep_stosq_memset(i8* %12, i64 %13, i64 50), !insn.addr !5
%14 = add i64 %1, -416, !insn.addr !6
%15 = add i64 %1, -632, !insn.addr !7
%16 = inttoptr i64 %15 to i64*, !insn.addr !7
%17 = load i64, i64* %16, align 8, !insn.addr !7
%18 = call i64 @memmove(i64 %17, i64 %14, i64* nonnull @global_var_190, i64 %14), !insn.addr !8
%19 = load i64, i64* %16, align 8, !insn.addr !9
%20 = inttoptr i64 %19 to i32*, !insn.addr !10
%21 = load i32, i32* %20, align 4, !insn.addr !10
%22 = zext i32 %21 to i64, !insn.addr !11
%23 = call i64 @printIntLine(i64 %22), !insn.addr !12
%24 = add i64 %1, -8, !insn.addr !13
%25 = inttoptr i64 %24 to i64*, !insn.addr !13
%26 = load i64, i64* %25, align 8, !insn.addr !13
%27 = call i64 @__readfsqword(i64 40), !insn.addr !14
%28 = xor i64 %27, %26, !insn.addr !14
%29 = icmp eq i64 %28, 0, !insn.addr !14
store i64 %28, i64* %rax, align 8, !insn.addr !14
store i64 0, i64* %.reg2mem, !insn.addr !15
br i1 %29, label %dec_label_pc_82, label %dec_label_pc_7d, !insn.addr !15
dec_label_pc_7d: ; preds = %dec_label_pc_30
%30 = call i64 @__stack_chk_fail(), !insn.addr !16
store i64 %30, i64* %rax, align 8, !insn.addr !16
store i64 %30, i64* %.reg2mem, !insn.addr !16
br label %dec_label_pc_82, !insn.addr !16
dec_label_pc_82: ; preds = %dec_label_pc_7d, %dec_label_pc_30
%.reload = load i64, i64* %.reg2mem, !insn.addr !17
ret i64 %.reload, !insn.addr !17
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_84:
%rax.0.reg2mem = alloca i64, !insn.addr !18
%stack_var_-424 = alloca i64, align 8
%stack_var_-824 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !19
%1 = ptrtoint i64* %stack_var_-824 to i64, !insn.addr !20
%2 = bitcast i64* %stack_var_-424 to i8*, !insn.addr !21
call void @__asm_rep_stosq_memset(i8* nonnull %2, i64 0, i64 50), !insn.addr !21
%3 = ptrtoint i64* %stack_var_-424 to i64, !insn.addr !22
%4 = call i64 @memmove(i64 %1, i64 %3, i64* nonnull @global_var_190, i64 %3), !insn.addr !23
%5 = bitcast i64* %stack_var_-824 to i32*, !insn.addr !24
%6 = load i32, i32* %5, align 8, !insn.addr !24
%7 = zext i32 %6 to i64, !insn.addr !25
%8 = call i64 @printIntLine(i64 %7), !insn.addr !26
%9 = call i64 @__readfsqword(i64 40), !insn.addr !27
%10 = icmp eq i64 %0, %9, !insn.addr !27
store i64 0, i64* %rax.0.reg2mem, !insn.addr !28
br i1 %10, label %dec_label_pc_106, label %dec_label_pc_101, !insn.addr !28
dec_label_pc_101: ; preds = %dec_label_pc_84
%11 = call i64 @__stack_chk_fail(), !insn.addr !29
store i64 %11, i64* %rax.0.reg2mem, !insn.addr !29
br label %dec_label_pc_106, !insn.addr !29
dec_label_pc_106: ; preds = %dec_label_pc_101, %dec_label_pc_84
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !30
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove_01_good() local_unnamed_addr {
dec_label_pc_108:
%0 = call i64 @goodG2B(), !insn.addr !31
ret i64 %0, !insn.addr !32
}
declare i64 @memmove(i64, i64, i64*, i64) local_unnamed_addr
declare i64 @printIntLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare void @__asm_rep_stosq_memset(i8*, i64, i64) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 11}
!1 = !{i64 26}
!2 = !{i64 33}
!3 = !{i64 48}
!4 = !{i64 50}
!5 = !{i64 60}
!6 = !{i64 63}
!7 = !{i64 70}
!8 = !{i64 88}
!9 = !{i64 93}
!10 = !{i64 100}
!11 = !{i64 102}
!12 = !{i64 104}
!13 = !{i64 110}
!14 = !{i64 114}
!15 = !{i64 123}
!16 = !{i64 125}
!17 = !{i64 131}
!18 = !{i64 132}
!19 = !{i64 143}
!20 = !{i64 165}
!21 = !{i64 192}
!22 = !{i64 195}
!23 = !{i64 220}
!24 = !{i64 232}
!25 = !{i64 234}
!26 = !{i64 236}
!27 = !{i64 246}
!28 = !{i64 255}
!29 = !{i64 257}
!30 = !{i64 263}
!31 = !{i64 273}
!32 = !{i64 280}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove_01_bad() #0 {
entry:
%data = alloca i32*, align 8
%dataBadBuffer = alloca [50 x i32], align 16
%dataGoodBuffer = alloca [100 x i32], align 16
%source = alloca [100 x i32], align 16
%arraydecay = getelementptr inbounds [50 x i32], [50 x i32]* %dataBadBuffer, i64 0, i64 0
store i32* %arraydecay, i32** %data, align 8
%0 = bitcast [100 x i32]* %source to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %0, i8 0, i64 400, i1 false)
%1 = load i32*, i32** %data, align 8
%2 = bitcast i32* %1 to i8*
%arraydecay1 = getelementptr inbounds [100 x i32], [100 x i32]* %source, i64 0, i64 0
%3 = bitcast i32* %arraydecay1 to i8*
call void @llvm.memmove.p0i8.p0i8.i64(i8* align 4 %2, i8* align 16 %3, i64 400, i1 false)
%4 = load i32*, i32** %data, align 8
%arrayidx = getelementptr inbounds i32, i32* %4, i64 0
%5 = load i32, i32* %arrayidx, align 4
call void @printIntLine(i32 %5)
ret void
}
; Function Attrs: argmemonly nounwind willreturn writeonly
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #1
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memmove.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i1 immarg) #2
declare dso_local void @printIntLine(i32) #3
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove_01_good() #0 {
entry:
call void @goodG2B()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B() #0 {
entry:
%data = alloca i32*, align 8
%dataBadBuffer = alloca [50 x i32], align 16
%dataGoodBuffer = alloca [100 x i32], align 16
%source = alloca [100 x i32], align 16
%arraydecay = getelementptr inbounds [100 x i32], [100 x i32]* %dataGoodBuffer, i64 0, i64 0
store i32* %arraydecay, i32** %data, align 8
%0 = bitcast [100 x i32]* %source to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %0, i8 0, i64 400, i1 false)
%1 = load i32*, i32** %data, align 8
%2 = bitcast i32* %1 to i8*
%arraydecay1 = getelementptr inbounds [100 x i32], [100 x i32]* %source, i64 0, i64 0
%3 = bitcast i32* %arraydecay1 to i8*
call void @llvm.memmove.p0i8.p0i8.i64(i8* align 4 %2, i8* align 16 %3, i64 400, i1 false)
%4 = load i32*, i32** %data, align 8
%arrayidx = getelementptr inbounds i32, i32* %4, i64 0
%5 = load i32, i32* %arrayidx, align 4
call void @printIntLine(i32 %5)
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" }
attributes #1 = { argmemonly nounwind willreturn writeonly }
attributes #2 = { argmemonly nounwind willreturn }
attributes #3 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_f = local_unnamed_addr constant [3 x i8] c"%(\00"
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%stack_var_-424 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
%1 = ptrtoint i64* %stack_var_-424 to i64, !insn.addr !1
ret i64 %1, !insn.addr !2
}
define i64 @function_30() local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !3
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = and i64 %2, 4294967295, !insn.addr !3
%4 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove_64b_badSink(i64 %3), !insn.addr !4
%5 = add i64 %1, -8, !insn.addr !5
%6 = inttoptr i64 %5 to i64*, !insn.addr !5
%7 = load i64, i64* %6, align 8, !insn.addr !5
%8 = call i64 @__readfsqword(i64 40), !insn.addr !6
%9 = icmp eq i64 %7, %8, !insn.addr !6
store i64 0, i64* %rax.0.reg2mem, !insn.addr !7
br i1 %9, label %dec_label_pc_4c, label %dec_label_pc_47, !insn.addr !7
dec_label_pc_47: ; preds = %dec_label_pc_30
%10 = call i64 @__stack_chk_fail(), !insn.addr !8
store i64 %10, i64* %rax.0.reg2mem, !insn.addr !8
br label %dec_label_pc_4c, !insn.addr !8
dec_label_pc_4c: ; preds = %dec_label_pc_47, %dec_label_pc_30
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !9
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_4e:
%rax.0.reg2mem = alloca i64, !insn.addr !10
%stack_var_-432 = alloca i64, align 8
%stack_var_-424 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !11
%1 = ptrtoint i64* %stack_var_-424 to i64, !insn.addr !12
store i64 %1, i64* %stack_var_-432, align 8, !insn.addr !12
%2 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove_64b_goodG2BSink(i64* nonnull %stack_var_-432), !insn.addr !13
%3 = call i64 @__readfsqword(i64 40), !insn.addr !14
%4 = icmp eq i64 %0, %3, !insn.addr !14
store i64 0, i64* %rax.0.reg2mem, !insn.addr !15
br i1 %4, label %dec_label_pc_9a, label %dec_label_pc_95, !insn.addr !15
dec_label_pc_95: ; preds = %dec_label_pc_4e
%5 = call i64 @__stack_chk_fail(), !insn.addr !16
store i64 %5, i64* %rax.0.reg2mem, !insn.addr !16
br label %dec_label_pc_9a, !insn.addr !16
dec_label_pc_9a: ; preds = %dec_label_pc_95, %dec_label_pc_4e
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !17
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove_64_good() local_unnamed_addr {
dec_label_pc_9c:
%0 = call i64 @goodG2B(), !insn.addr !18
ret i64 %0, !insn.addr !19
}
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove_64b_badSink(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove_64b_goodG2BSink(i64*) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 11}
!1 = !{i64 26}
!2 = !{i64 33}
!3 = !{i64 48}
!4 = !{i64 50}
!5 = !{i64 56}
!6 = !{i64 60}
!7 = !{i64 69}
!8 = !{i64 71}
!9 = !{i64 77}
!10 = !{i64 78}
!11 = !{i64 89}
!12 = !{i64 111}
!13 = !{i64 128}
!14 = !{i64 138}
!15 = !{i64 147}
!16 = !{i64 149}
!17 = !{i64 155}
!18 = !{i64 165}
!19 = !{i64 172}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove_64_bad() #0 {
entry:
%data = alloca i32*, align 8
%dataBadBuffer = alloca [50 x i32], align 16
%dataGoodBuffer = alloca [100 x i32], align 16
%arraydecay = getelementptr inbounds [50 x i32], [50 x i32]* %dataBadBuffer, i64 0, i64 0
store i32* %arraydecay, i32** %data, align 8
%0 = bitcast i32** %data to i8*
call void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove_64b_badSink(i8* %0)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove_64b_badSink(i8*) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove_64_good() #0 {
entry:
call void @goodG2B()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B() #0 {
entry:
%data = alloca i32*, align 8
%dataBadBuffer = alloca [50 x i32], align 16
%dataGoodBuffer = alloca [100 x i32], align 16
%arraydecay = getelementptr inbounds [100 x i32], [100 x i32]* %dataGoodBuffer, i64 0, i64 0
store i32* %arraydecay, i32** %data, align 8
%0 = bitcast i32** %data to i8*
call void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove_64b_goodG2BSink(i8* %0)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_declare_memmove_64b_goodG2BSink(i8*) #1
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" }
attributes #1 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_f = local_unnamed_addr constant [3 x i8] c"%(\00"
@global_var_320 = constant i64 120259084069
@global_var_260 = constant [21 x i8] c"Benign, fixed string\00"
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%0 = alloca i64
%storemerge1.reg2mem = alloca i64, !insn.addr !0
%merge.reg2mem = alloca i64, !insn.addr !0
%stack_var_-824 = alloca i64, align 8
%1 = load i64, i64* %0
%stack_var_-8 = alloca i64, align 8
%2 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !1
%3 = call i64 @__readfsqword(i64 40), !insn.addr !2
%4 = call i64 @globalReturnsTrue(), !insn.addr !3
%5 = trunc i64 %4 to i32, !insn.addr !4
%6 = icmp eq i32 %5, 0, !insn.addr !4
store i64 %4, i64* %merge.reg2mem, !insn.addr !5
store i64 0, i64* %storemerge1.reg2mem, !insn.addr !5
br i1 %6, label %dec_label_pc_43, label %dec_label_pc_28, !insn.addr !5
dec_label_pc_28: ; preds = %dec_label_pc_79, %dec_label_pc_b6, %dec_label_pc_0
%merge.reload = load i64, i64* %merge.reg2mem
ret i64 %merge.reload, !insn.addr !5
dec_label_pc_43: ; preds = %dec_label_pc_0, %dec_label_pc_43
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%7 = mul i64 %storemerge1.reload, 8, !insn.addr !6
%8 = add i64 %7, %2
%9 = add i64 %8, -816, !insn.addr !6
%10 = inttoptr i64 %9 to i32*, !insn.addr !6
store i32 0, i32* %10, align 8, !insn.addr !6
%11 = add i64 %8, -812, !insn.addr !7
%12 = inttoptr i64 %11 to i32*, !insn.addr !7
store i32 0, i32* %12, align 4, !insn.addr !7
%13 = add nuw nsw i64 %storemerge1.reload, 1, !insn.addr !8
%exitcond = icmp eq i64 %13, 100
store i64 %13, i64* %storemerge1.reg2mem, !insn.addr !9
br i1 %exitcond, label %dec_label_pc_79, label %dec_label_pc_43, !insn.addr !9
dec_label_pc_79: ; preds = %dec_label_pc_43
%14 = call i64 @memcpy(i64 %1, i64* nonnull %stack_var_-824, i64* nonnull @global_var_320, i64* nonnull %stack_var_-824), !insn.addr !10
%15 = call i64 @printStructLine(i64 %1), !insn.addr !11
%16 = call i64 @__readfsqword(i64 40), !insn.addr !12
%17 = icmp eq i64 %3, %16, !insn.addr !12
store i64 0, i64* %merge.reg2mem, !insn.addr !13
br i1 %17, label %dec_label_pc_28, label %dec_label_pc_b6, !insn.addr !13
dec_label_pc_b6: ; preds = %dec_label_pc_79
%18 = call i64 @__stack_chk_fail(), !insn.addr !14
store i64 %18, i64* %merge.reg2mem, !insn.addr !14
br label %dec_label_pc_28, !insn.addr !14
}
define i64 @goodG2B1() local_unnamed_addr {
dec_label_pc_bd:
%rax.0.reg2mem = alloca i64, !insn.addr !15
%storemerge1.reg2mem = alloca i64, !insn.addr !15
%stack_var_-1640.0.reg2mem = alloca i64, !insn.addr !15
%stack_var_-824 = alloca i64, align 8
%stack_var_-1624 = alloca i64, align 8
%stack_var_-8 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !16
%1 = call i64 @globalReturnsFalse(), !insn.addr !17
%2 = trunc i64 %1 to i32, !insn.addr !18
%3 = icmp eq i32 %2, 0, !insn.addr !18
br i1 %3, label %dec_label_pc_f3, label %dec_label_pc_e5, !insn.addr !19
dec_label_pc_e5: ; preds = %dec_label_pc_bd
%4 = call i64 @printLine(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @global_var_260, i64 0, i64 0)), !insn.addr !20
br label %dec_label_pc_101, !insn.addr !21
dec_label_pc_f3: ; preds = %dec_label_pc_bd
%5 = ptrtoint i64* %stack_var_-1624 to i64, !insn.addr !22
store i64 %5, i64* %stack_var_-1640.0.reg2mem, !insn.addr !22
br label %dec_label_pc_101, !insn.addr !22
dec_label_pc_101: ; preds = %dec_label_pc_f3, %dec_label_pc_e5
%6 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !23
%stack_var_-1640.0.reload = load i64, i64* %stack_var_-1640.0.reg2mem
store i64 0, i64* %storemerge1.reg2mem
br label %dec_label_pc_10e
dec_label_pc_10e: ; preds = %dec_label_pc_10e, %dec_label_pc_101
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%7 = mul i64 %storemerge1.reload, 8, !insn.addr !24
%8 = add i64 %7, %6
%9 = add i64 %8, -816, !insn.addr !24
%10 = inttoptr i64 %9 to i32*, !insn.addr !24
store i32 0, i32* %10, align 8, !insn.addr !24
%11 = add i64 %8, -812, !insn.addr !25
%12 = inttoptr i64 %11 to i32*, !insn.addr !25
store i32 0, i32* %12, align 4, !insn.addr !25
%13 = add nuw nsw i64 %storemerge1.reload, 1, !insn.addr !26
%exitcond = icmp eq i64 %13, 100
store i64 %13, i64* %storemerge1.reg2mem, !insn.addr !27
br i1 %exitcond, label %dec_label_pc_144, label %dec_label_pc_10e, !insn.addr !27
dec_label_pc_144: ; preds = %dec_label_pc_10e
%14 = call i64 @memcpy(i64 %stack_var_-1640.0.reload, i64* nonnull %stack_var_-824, i64* nonnull @global_var_320, i64* nonnull %stack_var_-824), !insn.addr !28
%15 = call i64 @printStructLine(i64 %stack_var_-1640.0.reload), !insn.addr !29
%16 = call i64 @__readfsqword(i64 40), !insn.addr !30
%17 = icmp eq i64 %0, %16, !insn.addr !30
store i64 0, i64* %rax.0.reg2mem, !insn.addr !31
br i1 %17, label %dec_label_pc_186, label %dec_label_pc_181, !insn.addr !31
dec_label_pc_181: ; preds = %dec_label_pc_144
%18 = call i64 @__stack_chk_fail(), !insn.addr !32
store i64 %18, i64* %rax.0.reg2mem, !insn.addr !32
br label %dec_label_pc_186, !insn.addr !32
dec_label_pc_186: ; preds = %dec_label_pc_181, %dec_label_pc_144
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !33
}
define i64 @goodG2B2() local_unnamed_addr {
dec_label_pc_188:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !34
%storemerge1.reg2mem = alloca i64, !insn.addr !34
%stack_var_-824 = alloca i64, align 8
%stack_var_-1624 = alloca i64, align 8
%1 = load i64, i64* %0
%stack_var_-8 = alloca i64, align 8
%2 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !35
%3 = call i64 @__readfsqword(i64 40), !insn.addr !36
%4 = call i64 @globalReturnsTrue(), !insn.addr !37
%5 = trunc i64 %4 to i32, !insn.addr !38
store i64 0, i64* %storemerge1.reg2mem
br label %dec_label_pc_1cb
dec_label_pc_1cb: ; preds = %dec_label_pc_1cb, %dec_label_pc_188
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%6 = mul i64 %storemerge1.reload, 8, !insn.addr !39
%7 = add i64 %6, %2
%8 = add i64 %7, -816, !insn.addr !39
%9 = inttoptr i64 %8 to i32*, !insn.addr !39
store i32 0, i32* %9, align 8, !insn.addr !39
%10 = add i64 %7, -812, !insn.addr !40
%11 = inttoptr i64 %10 to i32*, !insn.addr !40
store i32 0, i32* %11, align 4, !insn.addr !40
%12 = add nuw nsw i64 %storemerge1.reload, 1, !insn.addr !41
%exitcond = icmp eq i64 %12, 100
store i64 %12, i64* %storemerge1.reg2mem, !insn.addr !42
br i1 %exitcond, label %dec_label_pc_201, label %dec_label_pc_1cb, !insn.addr !42
dec_label_pc_201: ; preds = %dec_label_pc_1cb
%13 = ptrtoint i64* %stack_var_-1624 to i64
%14 = icmp eq i32 %5, 0, !insn.addr !38
%spec.select = select i1 %14, i64 %1, i64 %13
%15 = call i64 @memcpy(i64 %spec.select, i64* nonnull %stack_var_-824, i64* nonnull @global_var_320, i64* nonnull %stack_var_-824), !insn.addr !43
%16 = call i64 @printStructLine(i64 %spec.select), !insn.addr !44
%17 = call i64 @__readfsqword(i64 40), !insn.addr !45
%18 = icmp eq i64 %3, %17, !insn.addr !45
store i64 0, i64* %rax.0.reg2mem, !insn.addr !46
br i1 %18, label %dec_label_pc_243, label %dec_label_pc_23e, !insn.addr !46
dec_label_pc_23e: ; preds = %dec_label_pc_201
%19 = call i64 @__stack_chk_fail(), !insn.addr !47
store i64 %19, i64* %rax.0.reg2mem, !insn.addr !47
br label %dec_label_pc_243, !insn.addr !47
dec_label_pc_243: ; preds = %dec_label_pc_23e, %dec_label_pc_201
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !48
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_memcpy_11_good() local_unnamed_addr {
dec_label_pc_245:
%0 = call i64 @goodG2B1(), !insn.addr !49
%1 = call i64 @goodG2B2(), !insn.addr !50
ret i64 %1, !insn.addr !51
}
declare i64 @globalReturnsTrue() local_unnamed_addr
declare i64 @memcpy(i64, i64*, i64*, i64*) local_unnamed_addr
declare i64 @printStructLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @globalReturnsFalse() local_unnamed_addr
declare i64 @printLine(i8*) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 0}
!1 = !{i64 1}
!2 = !{i64 11}
!3 = !{i64 31}
!4 = !{i64 36}
!5 = !{i64 38}
!6 = !{i64 74}
!7 = !{i64 92}
!8 = !{i64 103}
!9 = !{i64 119}
!10 = !{i64 146}
!11 = !{i64 161}
!12 = !{i64 171}
!13 = !{i64 180}
!14 = !{i64 182}
!15 = !{i64 189}
!16 = !{i64 200}
!17 = !{i64 220}
!18 = !{i64 225}
!19 = !{i64 227}
!20 = !{i64 236}
!21 = !{i64 241}
!22 = !{i64 250}
!23 = !{i64 190}
!24 = !{i64 277}
!25 = !{i64 295}
!26 = !{i64 306}
!27 = !{i64 322}
!28 = !{i64 349}
!29 = !{i64 364}
!30 = !{i64 374}
!31 = !{i64 383}
!32 = !{i64 385}
!33 = !{i64 391}
!34 = !{i64 392}
!35 = !{i64 393}
!36 = !{i64 403}
!37 = !{i64 423}
!38 = !{i64 428}
!39 = !{i64 466}
!40 = !{i64 484}
!41 = !{i64 495}
!42 = !{i64 511}
!43 = !{i64 538}
!44 = !{i64 553}
!45 = !{i64 563}
!46 = !{i64 572}
!47 = !{i64 574}
!48 = !{i64 580}
!49 = !{i64 590}
!50 = !{i64 600}
!51 = !{i64 607}
### Assistant: %struct._twoIntsStruct = type { i32, i32 }
@.str = private unnamed_addr constant [21 x i8] c"Benign, fixed string\00", align 1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_memcpy_11_bad() #0 {
entry:
%data = alloca %struct._twoIntsStruct*, align 8
%dataBadBuffer = alloca [50 x %struct._twoIntsStruct], align 16
%dataGoodBuffer = alloca [100 x %struct._twoIntsStruct], align 16
%source = alloca [100 x %struct._twoIntsStruct], align 16
%i = alloca i64, align 8
%call = call i32 (...) @globalReturnsTrue()
%tobool = icmp ne i32 %call, 0
br i1 %tobool, label %if.then, label %if.end
if.then: ; preds = %entry
%arraydecay = getelementptr inbounds [50 x %struct._twoIntsStruct], [50 x %struct._twoIntsStruct]* %dataBadBuffer, i64 0, i64 0
store %struct._twoIntsStruct* %arraydecay, %struct._twoIntsStruct** %data, align 8
br label %if.end
if.end: ; preds = %if.then, %entry
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %if.end
%0 = load i64, i64* %i, align 8
%cmp = icmp ult i64 %0, 100
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%1 = load i64, i64* %i, align 8
%arrayidx = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %1
%intOne = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %arrayidx, i32 0, i32 0
store i32 0, i32* %intOne, align 8
%2 = load i64, i64* %i, align 8
%arrayidx1 = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %2
%intTwo = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %arrayidx1, i32 0, i32 1
store i32 0, i32* %intTwo, align 4
br label %for.inc
for.inc: ; preds = %for.body
%3 = load i64, i64* %i, align 8
%inc = add i64 %3, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%4 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data, align 8
%5 = bitcast %struct._twoIntsStruct* %4 to i8*
%arraydecay2 = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 0
%6 = bitcast %struct._twoIntsStruct* %arraydecay2 to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 %5, i8* align 16 %6, i64 800, i1 false)
%7 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data, align 8
%arrayidx3 = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %7, i64 0
call void @printStructLine(%struct._twoIntsStruct* %arrayidx3)
ret void
}
declare dso_local i32 @globalReturnsTrue(...) #1
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #2
declare dso_local void @printStructLine(%struct._twoIntsStruct*) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_declare_memcpy_11_good() #0 {
entry:
call void @goodG2B1()
call void @goodG2B2()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B1() #0 {
entry:
%data = alloca %struct._twoIntsStruct*, align 8
%dataBadBuffer = alloca [50 x %struct._twoIntsStruct], align 16
%dataGoodBuffer = alloca [100 x %struct._twoIntsStruct], align 16
%source = alloca [100 x %struct._twoIntsStruct], align 16
%i = alloca i64, align 8
%call = call i32 (...) @globalReturnsFalse()
%tobool = icmp ne i32 %call, 0
br i1 %tobool, label %if.then, label %if.else
if.then: ; preds = %entry
call void @printLine(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
br label %if.end
if.else: ; preds = %entry
%arraydecay = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %dataGoodBuffer, i64 0, i64 0
store %struct._twoIntsStruct* %arraydecay, %struct._twoIntsStruct** %data, align 8
br label %if.end
if.end: ; preds = %if.else, %if.then
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %if.end
%0 = load i64, i64* %i, align 8
%cmp = icmp ult i64 %0, 100
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%1 = load i64, i64* %i, align 8
%arrayidx = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %1
%intOne = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %arrayidx, i32 0, i32 0
store i32 0, i32* %intOne, align 8
%2 = load i64, i64* %i, align 8
%arrayidx1 = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %2
%intTwo = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %arrayidx1, i32 0, i32 1
store i32 0, i32* %intTwo, align 4
br label %for.inc
for.inc: ; preds = %for.body
%3 = load i64, i64* %i, align 8
%inc = add i64 %3, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%4 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data, align 8
%5 = bitcast %struct._twoIntsStruct* %4 to i8*
%arraydecay2 = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 0
%6 = bitcast %struct._twoIntsStruct* %arraydecay2 to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 %5, i8* align 16 %6, i64 800, i1 false)
%7 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data, align 8
%arrayidx3 = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %7, i64 0
call void @printStructLine(%struct._twoIntsStruct* %arrayidx3)
ret void
}
declare dso_local i32 @globalReturnsFalse(...) #1
declare dso_local void @printLine(i8*) #1
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B2() #0 {
entry:
%data = alloca %struct._twoIntsStruct*, align 8
%dataBadBuffer = alloca [50 x %struct._twoIntsStruct], align 16
%dataGoodBuffer = alloca [100 x %struct._twoIntsStruct], align 16
%source = alloca [100 x %struct._twoIntsStruct], align 16
%i = alloca i64, align 8
%call = call i32 (...) @globalReturnsTrue()
%tobool = icmp ne i32 %call, 0
br i1 %tobool, label %if.then, label %if.end
if.then: ; preds = %entry
%arraydecay = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %dataGoodBuffer, i64 0, i64 0
store %struct._twoIntsStruct* %arraydecay, %struct._twoIntsStruct** %data, align 8
br label %if.end
if.end: ; preds = %if.then, %entry
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %if.end
%0 = load i64, i64* %i, align 8
%cmp = icmp ult i64 %0, 100
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%1 = load i64, i64* %i, align 8
%arrayidx = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %1
%intOne = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %arrayidx, i32 0, i32 0
store i32 0, i32* %intOne, align 8
%2 = load i64, i64* %i, align 8
%arrayidx1 = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %2
%intTwo = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %arrayidx1, i32 0, i32 1
store i32 0, i32* %intTwo, align 4
br label %for.inc
for.inc: ; preds = %for.body
%3 = load i64, i64* %i, align 8
%inc = add i64 %3, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%4 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data, align 8
%5 = bitcast %struct._twoIntsStruct* %4 to i8*
%arraydecay2 = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 0
%6 = bitcast %struct._twoIntsStruct* %arraydecay2 to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 %5, i8* align 16 %6, i64 800, i1 false)
%7 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data, align 8
%arrayidx3 = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %7, i64 0
call void @printStructLine(%struct._twoIntsStruct* %arrayidx3)
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" }
attributes #1 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #2 = { argmemonly nounwind willreturn }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
define i64 @_GLOBAL_OFFSET_TABLE_.1(i64 %arg1) local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_52c_badSink(i64 %arg1), !insn.addr !0
ret i64 %0, !insn.addr !1
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_52b_goodG2BSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_1b:
%0 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_52c_goodG2BSink(i64 %arg1), !insn.addr !2
ret i64 %0, !insn.addr !3
}
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_52c_badSink(i64) local_unnamed_addr
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_52c_goodG2BSink(i64) local_unnamed_addr
!0 = !{i64 19}
!1 = !{i64 26}
!2 = !{i64 46}
!3 = !{i64 53}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_52b_badSink(i32* %data) #0 {
entry:
%data.addr = alloca i32*, align 8
store i32* %data, i32** %data.addr, align 8
%0 = load i32*, i32** %data.addr, align 8
call void @CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_52c_badSink(i32* %0)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_52c_badSink(i32*) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_52b_goodG2BSink(i32* %data) #0 {
entry:
%data.addr = alloca i32*, align 8
store i32* %data, i32** %data.addr, align 8
%0 = load i32*, i32** %data.addr, align 8
call void @CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_52c_goodG2BSink(i32* %0)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE131_memcpy_52c_goodG2BSink(i32*) #1
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" }
attributes #1 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
define i64 @_GLOBAL_OFFSET_TABLE_.1(i64 %arg1) local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
ret i64 %arg1, !insn.addr !1
}
define i64 @function_30() local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !2
%1 = load i64, i64* %0
%2 = add i64 %1, -832, !insn.addr !2
%3 = inttoptr i64 %2 to i32*, !insn.addr !2
%4 = load i32, i32* %3, align 4, !insn.addr !2
%5 = zext i32 %4 to i64, !insn.addr !2
%6 = inttoptr i64 %5 to i64*, !insn.addr !3
%7 = load i64, i64* %6, align 8, !insn.addr !3
%8 = add i64 %1, -824, !insn.addr !4
%9 = inttoptr i64 %8 to i64*, !insn.addr !4
store i64 %7, i64* %9, align 8, !insn.addr !4
%10 = add i64 %1, -816, !insn.addr !5
%11 = inttoptr i64 %10 to i8*, !insn.addr !6
call void @__asm_rep_stosq_memset(i8* %11, i64 0, i64 100), !insn.addr !6
%12 = load i64, i64* %9, align 8, !insn.addr !7
%13 = call i64 @memmove(i64 %12, i64 %10, i64 800, i64 %10), !insn.addr !8
%14 = load i64, i64* %9, align 8, !insn.addr !9
%15 = inttoptr i64 %14 to i64*, !insn.addr !10
%16 = load i64, i64* %15, align 8, !insn.addr !10
%17 = call i64 @printLongLongLine(i64 %16), !insn.addr !11
%18 = add i64 %1, -8, !insn.addr !12
%19 = inttoptr i64 %18 to i64*, !insn.addr !12
%20 = load i64, i64* %19, align 8, !insn.addr !12
%21 = call i64 @__readfsqword(i64 40), !insn.addr !13
%22 = icmp eq i64 %20, %21, !insn.addr !13
store i64 0, i64* %rax.0.reg2mem, !insn.addr !14
br i1 %22, label %dec_label_pc_9c, label %dec_label_pc_97, !insn.addr !14
dec_label_pc_97: ; preds = %dec_label_pc_30
%23 = call i64 @__stack_chk_fail(), !insn.addr !15
store i64 %23, i64* %rax.0.reg2mem, !insn.addr !15
br label %dec_label_pc_9c, !insn.addr !15
dec_label_pc_9c: ; preds = %dec_label_pc_97, %dec_label_pc_30
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !16
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_memmove_64b_goodG2BSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_9e:
%rax.0.reg2mem = alloca i64, !insn.addr !17
%stack_var_-824 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !18
%1 = bitcast i64* %stack_var_-824 to i8*, !insn.addr !19
call void @__asm_rep_stosq_memset(i8* nonnull %1, i64 0, i64 100), !insn.addr !19
%2 = ptrtoint i64* %stack_var_-824 to i64, !insn.addr !20
%3 = call i64 @memmove(i64 %arg1, i64 %2, i64 800, i64 %2), !insn.addr !21
%4 = call i64 @printLongLongLine(i64 %arg1), !insn.addr !22
%5 = call i64 @__readfsqword(i64 40), !insn.addr !23
%6 = icmp eq i64 %0, %5, !insn.addr !23
store i64 0, i64* %rax.0.reg2mem, !insn.addr !24
br i1 %6, label %dec_label_pc_13a, label %dec_label_pc_135, !insn.addr !24
dec_label_pc_135: ; preds = %dec_label_pc_9e
%7 = call i64 @__stack_chk_fail(), !insn.addr !25
store i64 %7, i64* %rax.0.reg2mem, !insn.addr !25
br label %dec_label_pc_13a, !insn.addr !25
dec_label_pc_13a: ; preds = %dec_label_pc_135, %dec_label_pc_9e
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !26
}
declare i64 @memmove(i64, i64, i64, i64) local_unnamed_addr
declare i64 @printLongLongLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare void @__asm_rep_stosq_memset(i8*, i64, i64) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 18}
!1 = !{i64 33}
!2 = !{i64 48}
!3 = !{i64 54}
!4 = !{i64 57}
!5 = !{i64 64}
!6 = !{i64 84}
!7 = !{i64 94}
!8 = !{i64 112}
!9 = !{i64 117}
!10 = !{i64 124}
!11 = !{i64 130}
!12 = !{i64 136}
!13 = !{i64 140}
!14 = !{i64 149}
!15 = !{i64 151}
!16 = !{i64 157}
!17 = !{i64 158}
!18 = !{i64 176}
!19 = !{i64 242}
!20 = !{i64 245}
!21 = !{i64 270}
!22 = !{i64 288}
!23 = !{i64 298}
!24 = !{i64 307}
!25 = !{i64 309}
!26 = !{i64 315}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_memmove_64b_badSink(i8* %dataVoidPtr) #0 {
entry:
%dataVoidPtr.addr = alloca i8*, align 8
%dataPtr = alloca i64**, align 8
%data = alloca i64*, align 8
%source = alloca [100 x i64], align 16
store i8* %dataVoidPtr, i8** %dataVoidPtr.addr, align 8
%0 = load i8*, i8** %dataVoidPtr.addr, align 8
%1 = bitcast i8* %0 to i64**
store i64** %1, i64*** %dataPtr, align 8
%2 = load i64**, i64*** %dataPtr, align 8
%3 = load i64*, i64** %2, align 8
store i64* %3, i64** %data, align 8
%4 = bitcast [100 x i64]* %source to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %4, i8 0, i64 800, i1 false)
%5 = load i64*, i64** %data, align 8
%6 = bitcast i64* %5 to i8*
%arraydecay = getelementptr inbounds [100 x i64], [100 x i64]* %source, i64 0, i64 0
%7 = bitcast i64* %arraydecay to i8*
call void @llvm.memmove.p0i8.p0i8.i64(i8* align 8 %6, i8* align 16 %7, i64 800, i1 false)
%8 = load i64*, i64** %data, align 8
%arrayidx = getelementptr inbounds i64, i64* %8, i64 0
%9 = load i64, i64* %arrayidx, align 8
call void @printLongLongLine(i64 %9)
ret void
}
; Function Attrs: argmemonly nounwind willreturn writeonly
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #1
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memmove.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i1 immarg) #2
declare dso_local void @printLongLongLine(i64) #3
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_memmove_64b_goodG2BSink(i8* %dataVoidPtr) #0 {
entry:
%dataVoidPtr.addr = alloca i8*, align 8
%dataPtr = alloca i64**, align 8
%data = alloca i64*, align 8
%source = alloca [100 x i64], align 16
store i8* %dataVoidPtr, i8** %dataVoidPtr.addr, align 8
%0 = load i8*, i8** %dataVoidPtr.addr, align 8
%1 = bitcast i8* %0 to i64**
store i64** %1, i64*** %dataPtr, align 8
%2 = load i64**, i64*** %dataPtr, align 8
%3 = load i64*, i64** %2, align 8
store i64* %3, i64** %data, align 8
%4 = bitcast [100 x i64]* %source to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %4, i8 0, i64 800, i1 false)
%5 = load i64*, i64** %data, align 8
%6 = bitcast i64* %5 to i8*
%arraydecay = getelementptr inbounds [100 x i64], [100 x i64]* %source, i64 0, i64 0
%7 = bitcast i64* %arraydecay to i8*
call void @llvm.memmove.p0i8.p0i8.i64(i8* align 8 %6, i8* align 16 %7, i64 800, i1 false)
%8 = load i64*, i64** %data, align 8
%arrayidx = getelementptr inbounds i64, i64* %8, i64 0
%9 = load i64, i64* %arrayidx, align 8
call void @printLongLongLine(i64 %9)
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" }
attributes #1 = { argmemonly nounwind willreturn writeonly }
attributes #2 = { argmemonly nounwind willreturn }
attributes #3 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_168 = local_unnamed_addr constant [7 x i32] %wide-string
@global_var_170 = local_unnamed_addr constant [5 x i32] %wide-string
@global_var_178 = local_unnamed_addr constant [3 x i32] %wide-string
@global_var_158 = local_unnamed_addr constant [11 x i32] %wide-string
@global_var_160 = local_unnamed_addr constant [9 x i32] %wide-string
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%stack_var_-120 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
%1 = ptrtoint i64* %stack_var_-120 to i64, !insn.addr !1
ret i64 %1, !insn.addr !2
}
define i64 @function_30(i64 %arg1, i64 %arg2, i64 %arg3, i64 %arg4) local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !3
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = add i64 %2, -117, !insn.addr !3
%4 = inttoptr i64 %3 to i8*, !insn.addr !3
%5 = load i8, i8* %4, align 1, !insn.addr !3
%6 = trunc i64 %arg4 to i8, !insn.addr !3
%7 = add i8 %5, %6, !insn.addr !3
%8 = icmp ult i8 %7, %5, !insn.addr !3
store i8 %7, i8* %4, align 1, !insn.addr !3
%9 = zext i1 %8 to i64, !insn.addr !4
%10 = add i64 %2, 296, !insn.addr !4
%11 = add i64 %10, %9, !insn.addr !4
%12 = and i64 %11, 4294967295, !insn.addr !4
%13 = add i64 %1, -64, !insn.addr !5
%14 = inttoptr i64 %13 to i64*, !insn.addr !5
store i64 %12, i64* %14, align 8, !insn.addr !5
%15 = add i64 %1, -56, !insn.addr !6
%16 = inttoptr i64 %15 to i64*, !insn.addr !6
store i64 %arg3, i64* %16, align 8, !insn.addr !6
%17 = add i64 %1, -48, !insn.addr !7
%18 = inttoptr i64 %17 to i64*, !insn.addr !7
store i64 279172874305, i64* %18, align 8, !insn.addr !7
%19 = add i64 %1, -40, !insn.addr !8
%20 = inttoptr i64 %19 to i64*, !insn.addr !8
store i64 279172874305, i64* %20, align 8, !insn.addr !8
%21 = add i64 %1, -32, !insn.addr !9
%22 = inttoptr i64 %21 to i64*, !insn.addr !9
store i64 279172874305, i64* %22, align 8, !insn.addr !9
%23 = load i32, i32* inttoptr (i64 384 to i32*), align 128, !insn.addr !10
%24 = add i64 %1, -24, !insn.addr !11
%25 = inttoptr i64 %24 to i32*, !insn.addr !11
store i32 %23, i32* %25, align 4, !insn.addr !11
%26 = add i64 %1, -120, !insn.addr !12
%27 = inttoptr i64 %26 to i64*, !insn.addr !12
%28 = load i64, i64* %27, align 8, !insn.addr !12
%29 = call i64 @wcscpy(i64 %28, i64 %13, i64 %13), !insn.addr !13
%30 = load i64, i64* %27, align 8, !insn.addr !14
%31 = call i64 @printWLine(i64 %30), !insn.addr !15
%32 = add i64 %1, -8, !insn.addr !16
%33 = inttoptr i64 %32 to i64*, !insn.addr !16
%34 = load i64, i64* %33, align 8, !insn.addr !16
%35 = call i64 @__readfsqword(i64 40), !insn.addr !17
%36 = icmp eq i64 %34, %35, !insn.addr !17
store i64 0, i64* %rax.0.reg2mem, !insn.addr !18
br i1 %36, label %dec_label_pc_9e, label %dec_label_pc_99, !insn.addr !18
dec_label_pc_99: ; preds = %dec_label_pc_30
%37 = call i64 @__stack_chk_fail(), !insn.addr !19
store i64 %37, i64* %rax.0.reg2mem, !insn.addr !19
br label %dec_label_pc_9e, !insn.addr !19
dec_label_pc_9e: ; preds = %dec_label_pc_99, %dec_label_pc_30
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !20
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_a0:
%rax.0.reg2mem = alloca i64, !insn.addr !21
%stack_var_-72 = alloca i32*, align 8
%stack_var_-120 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !22
%1 = ptrtoint i64* %stack_var_-120 to i64, !insn.addr !23
%2 = bitcast i64* %stack_var_-120 to i32*, !insn.addr !24
store i32 0, i32* %2, align 8, !insn.addr !24
store i32* inttoptr (i64 279172874305 to i32*), i32** %stack_var_-72, align 8, !insn.addr !25
%3 = ptrtoint i32** %stack_var_-72 to i64, !insn.addr !26
%4 = call i64 @wcscpy(i64 %1, i64 %3, i64 %3), !insn.addr !27
%5 = call i64 @printWLine(i64 %1), !insn.addr !28
%6 = call i64 @__readfsqword(i64 40), !insn.addr !29
%7 = icmp eq i64 %0, %6, !insn.addr !29
store i64 0, i64* %rax.0.reg2mem, !insn.addr !30
br i1 %7, label %dec_label_pc_13e, label %dec_label_pc_139, !insn.addr !30
dec_label_pc_139: ; preds = %dec_label_pc_a0
%8 = call i64 @__stack_chk_fail(), !insn.addr !31
store i64 %8, i64* %rax.0.reg2mem, !insn.addr !31
br label %dec_label_pc_13e, !insn.addr !31
dec_label_pc_13e: ; preds = %dec_label_pc_139, %dec_label_pc_a0
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !32
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_cpy_18_good() local_unnamed_addr {
dec_label_pc_140:
%0 = call i64 @goodG2B(), !insn.addr !33
ret i64 %0, !insn.addr !34
}
declare i64 @wcscpy(i64, i64, i64) local_unnamed_addr
declare i64 @printWLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 8}
!1 = !{i64 28}
!2 = !{i64 32}
!3 = !{i64 48}
!4 = !{i64 51}
!5 = !{i64 56}
!6 = !{i64 60}
!7 = !{i64 78}
!8 = !{i64 82}
!9 = !{i64 93}
!10 = !{i64 97}
!11 = !{i64 103}
!12 = !{i64 110}
!13 = !{i64 120}
!14 = !{i64 125}
!15 = !{i64 132}
!16 = !{i64 138}
!17 = !{i64 142}
!18 = !{i64 151}
!19 = !{i64 153}
!20 = !{i64 159}
!21 = !{i64 160}
!22 = !{i64 168}
!23 = !{i64 188}
!24 = !{i64 196}
!25 = !{i64 216}
!26 = !{i64 266}
!27 = !{i64 280}
!28 = !{i64 292}
!29 = !{i64 302}
!30 = !{i64 311}
!31 = !{i64 313}
!32 = !{i64 319}
!33 = !{i64 329}
!34 = !{i64 336}
### Assistant: @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_cpy_18_bad.source = private unnamed_addr constant [11 x i32] [i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 0], align 16
@__const.goodG2B.source = private unnamed_addr constant [11 x i32] [i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 0], align 16
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_cpy_18_bad() #0 {
entry:
%data = alloca i32*, align 8
%dataBadBuffer = alloca [10 x i32], align 16
%dataGoodBuffer = alloca [11 x i32], align 16
%source1 = alloca [11 x i32], align 16
br label %source
source: ; preds = %entry
%arraydecay = getelementptr inbounds [10 x i32], [10 x i32]* %dataBadBuffer, i64 0, i64 0
store i32* %arraydecay, i32** %data, align 8
%0 = load i32*, i32** %data, align 8
%arrayidx = getelementptr inbounds i32, i32* %0, i64 0
store i32 0, i32* %arrayidx, align 4
%1 = bitcast [11 x i32]* %source1 to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 %1, i8* align 16 bitcast ([11 x i32]* @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_cpy_18_bad.source to i8*), i64 44, i1 false)
%2 = load i32*, i32** %data, align 8
%arraydecay2 = getelementptr inbounds [11 x i32], [11 x i32]* %source1, i64 0, i64 0
%call = call i32* @wcscpy(i32* %2, i32* %arraydecay2) #4
%3 = load i32*, i32** %data, align 8
call void @printWLine(i32* %3)
ret void
}
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #1
; Function Attrs: nounwind
declare dso_local i32* @wcscpy(i32*, i32*) #2
declare dso_local void @printWLine(i32*) #3
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_cpy_18_good() #0 {
entry:
call void @goodG2B()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B() #0 {
entry:
%data = alloca i32*, align 8
%dataBadBuffer = alloca [10 x i32], align 16
%dataGoodBuffer = alloca [11 x i32], align 16
%source1 = alloca [11 x i32], align 16
br label %source
source: ; preds = %entry
%arraydecay = getelementptr inbounds [11 x i32], [11 x i32]* %dataGoodBuffer, i64 0, i64 0
store i32* %arraydecay, i32** %data, align 8
%0 = load i32*, i32** %data, align 8
%arrayidx = getelementptr inbounds i32, i32* %0, i64 0
store i32 0, i32* %arrayidx, align 4
%1 = bitcast [11 x i32]* %source1 to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 %1, i8* align 16 bitcast ([11 x i32]* @__const.goodG2B.source to i8*), i64 44, i1 false)
%2 = load i32*, i32** %data, align 8
%arraydecay2 = getelementptr inbounds [11 x i32], [11 x i32]* %source1, i64 0, i64 0
%call = call i32* @wcscpy(i32* %2, i32* %arraydecay2) #4
%3 = load i32*, i32** %data, align 8
call void @printWLine(i32* %3)
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" }
attributes #1 = { argmemonly nounwind willreturn }
attributes #2 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #3 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_3d8 = constant [10 x i8] c"127.0.0.1\00"
@global_var_d = constant i64 -556888036579737560
@global_var_3e8 = constant [32 x i8] c"ERROR: Array index is negative.\00"
@global_var_408 = constant [36 x i8] c"ERROR: Array index is out-of-bounds\00"
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
ret i64 0, !insn.addr !1
}
define i64 @function_30() local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%.reg2mem = alloca i64, !insn.addr !2
%storemerge1.reg2mem = alloca i32, !insn.addr !2
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = load i64, i64* %0
%4 = load i64, i64* %0
%5 = load i64, i64* %0
%6 = trunc i64 %5 to i8
%7 = mul i8 %6, 2, !insn.addr !2
%8 = zext i8 %7 to i64, !insn.addr !2
%9 = and i64 %5, -256, !insn.addr !2
%10 = or i64 %9, %8, !insn.addr !2
%11 = inttoptr i64 %10 to i8*, !insn.addr !3
%12 = load i8, i8* %11, align 2, !insn.addr !3
%13 = add i8 %7, %12, !insn.addr !3
store i8 %13, i8* %11, align 2, !insn.addr !3
%14 = call i64 @socket(i64 %1, i64 %2, i64 %4), !insn.addr !4
%15 = trunc i64 %14 to i32, !insn.addr !5
%16 = add i64 %3, -76, !insn.addr !5
%17 = inttoptr i64 %16 to i32*, !insn.addr !5
store i32 %15, i32* %17, align 4, !insn.addr !5
%18 = icmp eq i32 %15, -1, !insn.addr !6
%.pre = add i64 %3, -64
br i1 %18, label %dec_label_pc_f0, label %dec_label_pc_46, !insn.addr !7
dec_label_pc_46: ; preds = %dec_label_pc_30
%19 = call i64 @memset(i64 %.pre, i64 0, i64 16), !insn.addr !8
%20 = inttoptr i64 %.pre to i16*, !insn.addr !9
store i16 2, i16* %20, align 2, !insn.addr !9
%21 = call i64 @inet_addr(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @global_var_3d8, i64 0, i64 0)), !insn.addr !10
%22 = trunc i64 %21 to i32, !insn.addr !11
%23 = add i64 %3, -60, !insn.addr !11
%24 = inttoptr i64 %23 to i32*, !insn.addr !11
store i32 %22, i32* %24, align 4, !insn.addr !11
%25 = call i64 @htons(i64 27015), !insn.addr !12
%26 = trunc i64 %25 to i16, !insn.addr !13
%27 = add i64 %3, -62, !insn.addr !13
%28 = inttoptr i64 %27 to i16*, !insn.addr !13
store i16 %26, i16* %28, align 2, !insn.addr !13
%29 = load i32, i32* %17, align 4, !insn.addr !14
%30 = zext i32 %29 to i64, !insn.addr !15
%31 = call i64 @connect(i64 %30, i64 %.pre, i64 16, i64 %.pre), !insn.addr !16
%32 = trunc i64 %31 to i32, !insn.addr !17
%33 = icmp eq i32 %32, -1, !insn.addr !17
br i1 %33, label %dec_label_pc_e0, label %dec_label_pc_9a, !insn.addr !18
dec_label_pc_9a: ; preds = %dec_label_pc_46
%34 = add i64 %3, -22, !insn.addr !19
%35 = load i32, i32* %17, align 4, !insn.addr !20
%36 = zext i32 %35 to i64, !insn.addr !21
%37 = call i64 @recv(i64 %36, i64 %34, i64* nonnull @global_var_d, i64 0), !insn.addr !22
%38 = trunc i64 %37 to i32, !insn.addr !23
%39 = add i64 %3, -72, !insn.addr !23
%40 = inttoptr i64 %39 to i32*, !insn.addr !23
store i32 %38, i32* %40, align 4, !insn.addr !23
switch i32 %38, label %dec_label_pc_c1 [
i32 -1, label %dec_label_pc_e0
i32 0, label %dec_label_pc_e0
]
dec_label_pc_c1: ; preds = %dec_label_pc_9a
%sext = mul i64 %37, 4294967296
%41 = ashr exact i64 %sext, 32, !insn.addr !24
%42 = add i64 %41, %34, !insn.addr !25
%43 = inttoptr i64 %42 to i8*, !insn.addr !25
store i8 0, i8* %43, align 1, !insn.addr !25
%44 = call i64 @atoi(i64 %34), !insn.addr !26
%45 = trunc i64 %44 to i32, !insn.addr !27
%46 = add i64 %3, -84, !insn.addr !27
%47 = inttoptr i64 %46 to i32*, !insn.addr !27
store i32 %45, i32* %47, align 4, !insn.addr !27
br label %dec_label_pc_e0, !insn.addr !28
dec_label_pc_e0: ; preds = %dec_label_pc_9a, %dec_label_pc_9a, %dec_label_pc_46, %dec_label_pc_c1
%.pr = load i32, i32* %17, align 4
%48 = icmp eq i32 %.pr, -1, !insn.addr !29
br i1 %48, label %dec_label_pc_f0, label %dec_label_pc_e6, !insn.addr !30
dec_label_pc_e6: ; preds = %dec_label_pc_e0
%49 = zext i32 %.pr to i64, !insn.addr !31
%50 = call i64 @close(i64 %49), !insn.addr !32
br label %dec_label_pc_f0, !insn.addr !32
dec_label_pc_f0: ; preds = %dec_label_pc_30, %dec_label_pc_e6, %dec_label_pc_e0
%51 = add i64 %3, -84, !insn.addr !33
%52 = inttoptr i64 %51 to i32*, !insn.addr !33
%53 = load i32, i32* %52, align 4, !insn.addr !33
%54 = add i64 %3, -88, !insn.addr !34
%55 = inttoptr i64 %54 to i32*, !insn.addr !34
store i32 %53, i32* %55, align 4, !insn.addr !34
%56 = add i64 %3, -68, !insn.addr !35
%57 = inttoptr i64 %56 to i32*, !insn.addr !35
store i32 %53, i32* %57, align 4, !insn.addr !35
%58 = inttoptr i64 %.pre to i64*, !insn.addr !36
store i64 0, i64* %58, align 8, !insn.addr !36
%59 = add i64 %3, -56, !insn.addr !37
%60 = inttoptr i64 %59 to i64*, !insn.addr !37
store i64 0, i64* %60, align 8, !insn.addr !37
%61 = add i64 %3, -48, !insn.addr !38
%62 = inttoptr i64 %61 to i64*, !insn.addr !38
store i64 0, i64* %62, align 8, !insn.addr !38
%63 = add i64 %3, -40, !insn.addr !39
%64 = inttoptr i64 %63 to i64*, !insn.addr !39
store i64 0, i64* %64, align 8, !insn.addr !39
%65 = add i64 %3, -32, !insn.addr !40
%66 = inttoptr i64 %65 to i64*, !insn.addr !40
store i64 0, i64* %66, align 8, !insn.addr !40
%67 = load i32, i32* %57, align 4, !insn.addr !41
%68 = icmp slt i32 %67, 0, !insn.addr !41
br i1 %68, label %dec_label_pc_15c, label %dec_label_pc_12a, !insn.addr !42
dec_label_pc_12a: ; preds = %dec_label_pc_f0
%69 = sext i32 %67 to i64, !insn.addr !43
%70 = mul i64 %69, 4, !insn.addr !44
%71 = add i64 %70, %.pre, !insn.addr !44
%72 = inttoptr i64 %71 to i32*, !insn.addr !44
store i32 1, i32* %72, align 4, !insn.addr !44
%73 = add i64 %3, -80, !insn.addr !45
%74 = inttoptr i64 %73 to i32*, !insn.addr !45
store i32 0, i32* %74, align 4
store i32 0, i32* %storemerge1.reg2mem
br label %dec_label_pc_140
dec_label_pc_140: ; preds = %dec_label_pc_12a, %dec_label_pc_140
%storemerge1.reload = load i32, i32* %storemerge1.reg2mem
%75 = sext i32 %storemerge1.reload to i64, !insn.addr !46
%76 = mul i64 %75, 4, !insn.addr !47
%77 = add i64 %76, %.pre, !insn.addr !47
%78 = inttoptr i64 %77 to i32*, !insn.addr !47
%79 = load i32, i32* %78, align 4, !insn.addr !47
%80 = zext i32 %79 to i64, !insn.addr !48
%81 = call i64 @printIntLine(i64 %80), !insn.addr !49
%82 = load i32, i32* %74, align 4, !insn.addr !50
%83 = add i32 %82, 1, !insn.addr !50
store i32 %83, i32* %74, align 4
%84 = icmp slt i32 %83, 10, !insn.addr !51
store i32 %83, i32* %storemerge1.reg2mem, !insn.addr !51
br i1 %84, label %dec_label_pc_140, label %dec_label_pc_168, !insn.addr !51
dec_label_pc_15c: ; preds = %dec_label_pc_f0
%85 = call i64 @printLine(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @global_var_3e8, i64 0, i64 0)), !insn.addr !52
br label %dec_label_pc_168, !insn.addr !52
dec_label_pc_168: ; preds = %dec_label_pc_140, %dec_label_pc_15c
%86 = add i64 %3, -8, !insn.addr !53
%87 = inttoptr i64 %86 to i64*, !insn.addr !53
%88 = load i64, i64* %87, align 8, !insn.addr !53
%89 = call i64 @__readfsqword(i64 40), !insn.addr !54
%90 = icmp eq i64 %89, %88, !insn.addr !54
store i64 0, i64* %.reg2mem, !insn.addr !55
br i1 %90, label %dec_label_pc_17d, label %dec_label_pc_178, !insn.addr !55
dec_label_pc_178: ; preds = %dec_label_pc_168
%91 = call i64 @__stack_chk_fail(), !insn.addr !56
store i64 %91, i64* %.reg2mem, !insn.addr !56
br label %dec_label_pc_17d, !insn.addr !56
dec_label_pc_17d: ; preds = %dec_label_pc_178, %dec_label_pc_168
%.reload = load i64, i64* %.reg2mem, !insn.addr !57
ret i64 %.reload, !insn.addr !57
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_17f:
%rax.0.reg2mem = alloca i64, !insn.addr !58
%indvars.iv.reg2mem = alloca i64, !insn.addr !58
%stack_var_-8 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !59
%1 = call i64 @__readfsqword(i64 40), !insn.addr !60
%2 = add i64 %0, -20, !insn.addr !61
%3 = inttoptr i64 %2 to i32*, !insn.addr !61
store i32 1, i32* %3, align 4, !insn.addr !61
%4 = add i64 %0, -48, !insn.addr !62
store i64 0, i64* %indvars.iv.reg2mem
br label %dec_label_pc_1f4
dec_label_pc_1f4: ; preds = %dec_label_pc_1f4, %dec_label_pc_17f
%indvars.iv.reload = load i64, i64* %indvars.iv.reg2mem
%5 = mul i64 %indvars.iv.reload, 4, !insn.addr !62
%6 = add i64 %4, %5, !insn.addr !62
%7 = inttoptr i64 %6 to i32*, !insn.addr !62
%8 = load i32, i32* %7, align 4, !insn.addr !62
%9 = zext i32 %8 to i64, !insn.addr !63
%10 = call i64 @printIntLine(i64 %9), !insn.addr !64
%indvars.iv.next = add nuw nsw i64 %indvars.iv.reload, 1
%exitcond = icmp eq i64 %indvars.iv.next, 10
store i64 %indvars.iv.next, i64* %indvars.iv.reg2mem, !insn.addr !65
br i1 %exitcond, label %dec_label_pc_21c, label %dec_label_pc_1f4, !insn.addr !65
dec_label_pc_21c: ; preds = %dec_label_pc_1f4
%11 = call i64 @__readfsqword(i64 40), !insn.addr !66
%12 = icmp eq i64 %1, %11, !insn.addr !66
store i64 0, i64* %rax.0.reg2mem, !insn.addr !67
br i1 %12, label %dec_label_pc_231, label %dec_label_pc_22c, !insn.addr !67
dec_label_pc_22c: ; preds = %dec_label_pc_21c
%13 = call i64 @__stack_chk_fail(), !insn.addr !68
store i64 %13, i64* %rax.0.reg2mem, !insn.addr !68
br label %dec_label_pc_231, !insn.addr !68
dec_label_pc_231: ; preds = %dec_label_pc_22c, %dec_label_pc_21c
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !69
}
define i64 @goodB2G() local_unnamed_addr {
dec_label_pc_233:
%rax.0.reg2mem = alloca i64, !insn.addr !70
%indvars.iv.reg2mem = alloca i64, !insn.addr !70
%stack_var_-30 = alloca i64, align 8
%stack_var_-72 = alloca i64, align 8
%stack_var_-8 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !71
%1 = call i64 @socket(i64 2, i64 1, i64 6), !insn.addr !72
%2 = trunc i64 %1 to i32, !insn.addr !73
%3 = icmp eq i32 %2, -1, !insn.addr !74
br i1 %3, label %dec_label_pc_323.thread, label %dec_label_pc_279, !insn.addr !75
dec_label_pc_323.thread: ; preds = %dec_label_pc_233
store i64 0, i64* %stack_var_-72, align 8, !insn.addr !76
br label %dec_label_pc_395
dec_label_pc_279: ; preds = %dec_label_pc_233
%4 = ptrtoint i64* %stack_var_-72 to i64, !insn.addr !77
%5 = call i64 @memset(i64 %4, i64 0, i64 16), !insn.addr !78
store i64 2, i64* %stack_var_-72, align 8, !insn.addr !79
%6 = call i64 @inet_addr(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @global_var_3d8, i64 0, i64 0)), !insn.addr !80
%7 = call i64 @htons(i64 27015), !insn.addr !81
%8 = and i64 %1, 4294967295
%9 = call i64 @connect(i64 %8, i64 %4, i64 16, i64 %4), !insn.addr !82
%10 = trunc i64 %9 to i32, !insn.addr !83
%11 = icmp eq i32 %10, -1, !insn.addr !83
br i1 %11, label %dec_label_pc_323.thread7, label %dec_label_pc_2cd, !insn.addr !84
dec_label_pc_2cd: ; preds = %dec_label_pc_279
%12 = ptrtoint i64* %stack_var_-30 to i64, !insn.addr !85
%13 = call i64 @recv(i64 %8, i64 %12, i64* nonnull @global_var_d, i64 0), !insn.addr !86
%14 = trunc i64 %13 to i32, !insn.addr !87
%15 = add i32 %14, 1
%16 = icmp ult i32 %15, 2
br i1 %16, label %dec_label_pc_323.thread7, label %dec_label_pc_323, !insn.addr !88
dec_label_pc_323.thread7: ; preds = %dec_label_pc_2cd, %dec_label_pc_279
%17 = call i64 @close(i64 %8), !insn.addr !89
store i64 0, i64* %stack_var_-72, align 8, !insn.addr !76
br label %dec_label_pc_395
dec_label_pc_323: ; preds = %dec_label_pc_2cd
%18 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !90
%sext = mul i64 %13, 4294967296
%19 = ashr exact i64 %sext, 32, !insn.addr !91
%20 = add i64 %18, -22, !insn.addr !92
%21 = add i64 %20, %19, !insn.addr !92
%22 = inttoptr i64 %21 to i8*, !insn.addr !92
store i8 0, i8* %22, align 1, !insn.addr !92
%23 = call i64 @atoi(i64 %12), !insn.addr !93
%24 = trunc i64 %23 to i32, !insn.addr !94
%25 = call i64 @close(i64 %8), !insn.addr !89
store i64 0, i64* %stack_var_-72, align 8, !insn.addr !76
%26 = icmp ugt i32 %24, 9
br i1 %26, label %dec_label_pc_395, label %dec_label_pc_363, !insn.addr !95
dec_label_pc_363: ; preds = %dec_label_pc_323
%sext8 = mul i64 %23, 4294967296
%27 = ashr exact i64 %sext8, 30, !insn.addr !96
%28 = add i64 %18, -64, !insn.addr !96
%29 = add i64 %27, %28, !insn.addr !96
%30 = inttoptr i64 %29 to i32*, !insn.addr !96
store i32 1, i32* %30, align 4, !insn.addr !96
store i64 0, i64* %indvars.iv.reg2mem
br label %dec_label_pc_379
dec_label_pc_379: ; preds = %dec_label_pc_379, %dec_label_pc_363
%indvars.iv.reload = load i64, i64* %indvars.iv.reg2mem
%31 = mul i64 %indvars.iv.reload, 4, !insn.addr !97
%32 = add i64 %31, %28, !insn.addr !97
%33 = inttoptr i64 %32 to i32*, !insn.addr !97
%34 = load i32, i32* %33, align 4, !insn.addr !97
%35 = zext i32 %34 to i64, !insn.addr !98
%36 = call i64 @printIntLine(i64 %35), !insn.addr !99
%indvars.iv.next = add nuw nsw i64 %indvars.iv.reload, 1
%exitcond = icmp eq i64 %indvars.iv.next, 10
store i64 %indvars.iv.next, i64* %indvars.iv.reg2mem, !insn.addr !100
br i1 %exitcond, label %dec_label_pc_3a1, label %dec_label_pc_379, !insn.addr !100
dec_label_pc_395: ; preds = %dec_label_pc_323.thread7, %dec_label_pc_323.thread, %dec_label_pc_323
%37 = call i64 @printLine(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @global_var_408, i64 0, i64 0)), !insn.addr !101
br label %dec_label_pc_3a1, !insn.addr !101
dec_label_pc_3a1: ; preds = %dec_label_pc_379, %dec_label_pc_395
%38 = call i64 @__readfsqword(i64 40), !insn.addr !102
%39 = icmp eq i64 %0, %38, !insn.addr !102
store i64 0, i64* %rax.0.reg2mem, !insn.addr !103
br i1 %39, label %dec_label_pc_3b6, label %dec_label_pc_3b1, !insn.addr !103
dec_label_pc_3b1: ; preds = %dec_label_pc_3a1
%40 = call i64 @__stack_chk_fail(), !insn.addr !104
store i64 %40, i64* %rax.0.reg2mem, !insn.addr !104
br label %dec_label_pc_3b6, !insn.addr !104
dec_label_pc_3b6: ; preds = %dec_label_pc_3b1, %dec_label_pc_3a1
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !105
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_34_good() local_unnamed_addr {
dec_label_pc_3b8:
%0 = call i64 @goodG2B(), !insn.addr !106
%1 = call i64 @goodB2G(), !insn.addr !107
ret i64 %1, !insn.addr !108
}
declare i64 @socket(i64, i64, i64) local_unnamed_addr
declare i64 @memset(i64, i64, i64) local_unnamed_addr
declare i64 @inet_addr(i8*) local_unnamed_addr
declare i64 @htons(i64) local_unnamed_addr
declare i64 @connect(i64, i64, i64, i64) local_unnamed_addr
declare i64 @recv(i64, i64, i64*, i64) local_unnamed_addr
declare i64 @atoi(i64) local_unnamed_addr
declare i64 @close(i64) local_unnamed_addr
declare i64 @printIntLine(i64) local_unnamed_addr
declare i64 @printLine(i8*) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 8}
!1 = !{i64 30}
!2 = !{i64 48}
!3 = !{i64 50}
!4 = !{i64 52}
!5 = !{i64 57}
!6 = !{i64 60}
!7 = !{i64 64}
!8 = !{i64 87}
!9 = !{i64 92}
!10 = !{i64 105}
!11 = !{i64 110}
!12 = !{i64 118}
!13 = !{i64 123}
!14 = !{i64 131}
!15 = !{i64 142}
!16 = !{i64 144}
!17 = !{i64 149}
!18 = !{i64 152}
!19 = !{i64 154}
!20 = !{i64 158}
!21 = !{i64 171}
!22 = !{i64 173}
!23 = !{i64 178}
!24 = !{i64 196}
!25 = !{i64 198}
!26 = !{i64 210}
!27 = !{i64 215}
!28 = !{i64 218}
!29 = !{i64 224}
!30 = !{i64 228}
!31 = !{i64 233}
!32 = !{i64 235}
!33 = !{i64 240}
!34 = !{i64 243}
!35 = !{i64 249}
!36 = !{i64 252}
!37 = !{i64 260}
!38 = !{i64 268}
!39 = !{i64 276}
!40 = !{i64 284}
!41 = !{i64 292}
!42 = !{i64 296}
!43 = !{i64 301}
!44 = !{i64 303}
!45 = !{i64 311}
!46 = !{i64 323}
!47 = !{i64 325}
!48 = !{i64 329}
!49 = !{i64 331}
!50 = !{i64 336}
!51 = !{i64 344}
!52 = !{i64 355}
!53 = !{i64 361}
!54 = !{i64 365}
!55 = !{i64 374}
!56 = !{i64 376}
!57 = !{i64 382}
!58 = !{i64 383}
!59 = !{i64 384}
!60 = !{i64 391}
!61 = !{i64 483}
!62 = !{i64 505}
!63 = !{i64 509}
!64 = !{i64 511}
!65 = !{i64 524}
!66 = !{i64 545}
!67 = !{i64 554}
!68 = !{i64 556}
!69 = !{i64 562}
!70 = !{i64 563}
!71 = !{i64 571}
!72 = !{i64 615}
!73 = !{i64 620}
!74 = !{i64 623}
!75 = !{i64 627}
!76 = !{i64 815}
!77 = !{i64 647}
!78 = !{i64 650}
!79 = !{i64 655}
!80 = !{i64 668}
!81 = !{i64 681}
!82 = !{i64 707}
!83 = !{i64 712}
!84 = !{i64 715}
!85 = !{i64 717}
!86 = !{i64 736}
!87 = !{i64 741}
!88 = !{i64 748}
!89 = !{i64 798}
!90 = !{i64 564}
!91 = !{i64 759}
!92 = !{i64 761}
!93 = !{i64 773}
!94 = !{i64 778}
!95 = !{i64 859}
!96 = !{i64 872}
!97 = !{i64 894}
!98 = !{i64 898}
!99 = !{i64 900}
!100 = !{i64 913}
!101 = !{i64 924}
!102 = !{i64 934}
!103 = !{i64 943}
!104 = !{i64 945}
!105 = !{i64 951}
!106 = !{i64 961}
!107 = !{i64 971}
!108 = !{i64 978}
### Assistant: %union.CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_34_unionType = type { i32 }
%struct.sockaddr_in = type { i16, i16, %struct.in_addr, [8 x i8] }
%struct.in_addr = type { i32 }
%struct.sockaddr = type { i16, [14 x i8] }
@.str = private unnamed_addr constant [10 x i8] c"127.0.0.1\00", align 1
@.str.1 = private unnamed_addr constant [32 x i8] c"ERROR: Array index is negative.\00", align 1
@.str.2 = private unnamed_addr constant [36 x i8] c"ERROR: Array index is out-of-bounds\00", align 1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_34_bad() #0 {
entry:
%data = alloca i32, align 4
%myUnion = alloca %union.CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_34_unionType, align 4
%recvResult = alloca i32, align 4
%service = alloca %struct.sockaddr_in, align 4
%connectSocket = alloca i32, align 4
%inputBuffer = alloca [14 x i8], align 1
%data21 = alloca i32, align 4
%i = alloca i32, align 4
%buffer = alloca [10 x i32], align 16
store i32 -1, i32* %data, align 4
store i32 -1, i32* %connectSocket, align 4
br label %do.body
do.body: ; preds = %entry
%call = call i32 @socket(i32 2, i32 1, i32 6) #6
store i32 %call, i32* %connectSocket, align 4
%0 = load i32, i32* %connectSocket, align 4
%cmp = icmp eq i32 %0, -1
br i1 %cmp, label %if.then, label %if.end
if.then: ; preds = %do.body
br label %do.end
if.end: ; preds = %do.body
%1 = bitcast %struct.sockaddr_in* %service to i8*
call void @llvm.memset.p0i8.i64(i8* align 4 %1, i8 0, i64 16, i1 false)
%sin_family = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %service, i32 0, i32 0
store i16 2, i16* %sin_family, align 4
%call1 = call i32 @inet_addr(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0)) #6
%sin_addr = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %service, i32 0, i32 2
%s_addr = getelementptr inbounds %struct.in_addr, %struct.in_addr* %sin_addr, i32 0, i32 0
store i32 %call1, i32* %s_addr, align 4
%call2 = call zeroext i16 @htons(i16 zeroext 27015) #7
%sin_port = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %service, i32 0, i32 1
store i16 %call2, i16* %sin_port, align 2
%2 = load i32, i32* %connectSocket, align 4
%3 = bitcast %struct.sockaddr_in* %service to %struct.sockaddr*
%call3 = call i32 @connect(i32 %2, %struct.sockaddr* %3, i32 16)
%cmp4 = icmp eq i32 %call3, -1
br i1 %cmp4, label %if.then5, label %if.end6
if.then5: ; preds = %if.end
br label %do.end
if.end6: ; preds = %if.end
%4 = load i32, i32* %connectSocket, align 4
%arraydecay = getelementptr inbounds [14 x i8], [14 x i8]* %inputBuffer, i64 0, i64 0
%call7 = call i64 @recv(i32 %4, i8* %arraydecay, i64 13, i32 0)
%conv = trunc i64 %call7 to i32
store i32 %conv, i32* %recvResult, align 4
%5 = load i32, i32* %recvResult, align 4
%cmp8 = icmp eq i32 %5, -1
br i1 %cmp8, label %if.then12, label %lor.lhs.false
lor.lhs.false: ; preds = %if.end6
%6 = load i32, i32* %recvResult, align 4
%cmp10 = icmp eq i32 %6, 0
br i1 %cmp10, label %if.then12, label %if.end13
if.then12: ; preds = %lor.lhs.false, %if.end6
br label %do.end
if.end13: ; preds = %lor.lhs.false
%7 = load i32, i32* %recvResult, align 4
%idxprom = sext i32 %7 to i64
%arrayidx = getelementptr inbounds [14 x i8], [14 x i8]* %inputBuffer, i64 0, i64 %idxprom
store i8 0, i8* %arrayidx, align 1
%arraydecay14 = getelementptr inbounds [14 x i8], [14 x i8]* %inputBuffer, i64 0, i64 0
%call15 = call i32 @atoi(i8* %arraydecay14) #8
store i32 %call15, i32* %data, align 4
br label %do.end
do.end: ; preds = %if.end13, %if.then12, %if.then5, %if.then
%8 = load i32, i32* %connectSocket, align 4
%cmp16 = icmp ne i32 %8, -1
br i1 %cmp16, label %if.then18, label %if.end20
if.then18: ; preds = %do.end
%9 = load i32, i32* %connectSocket, align 4
%call19 = call i32 @close(i32 %9)
br label %if.end20
if.end20: ; preds = %if.then18, %do.end
%10 = load i32, i32* %data, align 4
%unionFirst = bitcast %union.CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_34_unionType* %myUnion to i32*
store i32 %10, i32* %unionFirst, align 4
%unionSecond = bitcast %union.CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_34_unionType* %myUnion to i32*
%11 = load i32, i32* %unionSecond, align 4
store i32 %11, i32* %data21, align 4
%12 = bitcast [10 x i32]* %buffer to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %12, i8 0, i64 40, i1 false)
%13 = load i32, i32* %data21, align 4
%cmp22 = icmp sge i32 %13, 0
br i1 %cmp22, label %if.then24, label %if.else
if.then24: ; preds = %if.end20
%14 = load i32, i32* %data21, align 4
%idxprom25 = sext i32 %14 to i64
%arrayidx26 = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom25
store i32 1, i32* %arrayidx26, align 4
store i32 0, i32* %i, align 4
br label %for.cond
for.cond: ; preds = %for.inc, %if.then24
%15 = load i32, i32* %i, align 4
%cmp27 = icmp slt i32 %15, 10
br i1 %cmp27, label %for.body, label %for.end
for.body: ; preds = %for.cond
%16 = load i32, i32* %i, align 4
%idxprom29 = sext i32 %16 to i64
%arrayidx30 = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom29
%17 = load i32, i32* %arrayidx30, align 4
call void @printIntLine(i32 %17)
br label %for.inc
for.inc: ; preds = %for.body
%18 = load i32, i32* %i, align 4
%inc = add nsw i32 %18, 1
store i32 %inc, i32* %i, align 4
br label %for.cond
for.end: ; preds = %for.cond
br label %if.end31
if.else: ; preds = %if.end20
call void @printLine(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
br label %if.end31
if.end31: ; preds = %if.else, %for.end
ret void
}
; Function Attrs: nounwind
declare dso_local i32 @socket(i32, i32, i32) #1
; Function Attrs: argmemonly nounwind willreturn writeonly
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #2
; Function Attrs: nounwind
declare dso_local i32 @inet_addr(i8*) #1
; Function Attrs: nounwind readnone
declare dso_local zeroext i16 @htons(i16 zeroext) #3
declare dso_local i32 @connect(i32, %struct.sockaddr*, i32) #4
declare dso_local i64 @recv(i32, i8*, i64, i32) #4
; Function Attrs: nounwind readonly
declare dso_local i32 @atoi(i8*) #5
declare dso_local i32 @close(i32) #4
declare dso_local void @printIntLine(i32) #4
declare dso_local void @printLine(i8*) #4
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_34_good() #0 {
entry:
call void @goodG2B()
call void @goodB2G()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B() #0 {
entry:
%data = alloca i32, align 4
%myUnion = alloca %union.CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_34_unionType, align 4
%data1 = alloca i32, align 4
%i = alloca i32, align 4
%buffer = alloca [10 x i32], align 16
store i32 -1, i32* %data, align 4
store i32 7, i32* %data, align 4
%0 = load i32, i32* %data, align 4
%unionFirst = bitcast %union.CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_34_unionType* %myUnion to i32*
store i32 %0, i32* %unionFirst, align 4
%unionSecond = bitcast %union.CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_34_unionType* %myUnion to i32*
%1 = load i32, i32* %unionSecond, align 4
store i32 %1, i32* %data1, align 4
%2 = bitcast [10 x i32]* %buffer to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %2, i8 0, i64 40, i1 false)
%3 = load i32, i32* %data1, align 4
%cmp = icmp sge i32 %3, 0
br i1 %cmp, label %if.then, label %if.else
if.then: ; preds = %entry
%4 = load i32, i32* %data1, align 4
%idxprom = sext i32 %4 to i64
%arrayidx = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom
store i32 1, i32* %arrayidx, align 4
store i32 0, i32* %i, align 4
br label %for.cond
for.cond: ; preds = %for.inc, %if.then
%5 = load i32, i32* %i, align 4
%cmp2 = icmp slt i32 %5, 10
br i1 %cmp2, label %for.body, label %for.end
for.body: ; preds = %for.cond
%6 = load i32, i32* %i, align 4
%idxprom3 = sext i32 %6 to i64
%arrayidx4 = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom3
%7 = load i32, i32* %arrayidx4, align 4
call void @printIntLine(i32 %7)
br label %for.inc
for.inc: ; preds = %for.body
%8 = load i32, i32* %i, align 4
%inc = add nsw i32 %8, 1
store i32 %inc, i32* %i, align 4
br label %for.cond
for.end: ; preds = %for.cond
br label %if.end
if.else: ; preds = %entry
call void @printLine(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
br label %if.end
if.end: ; preds = %if.else, %for.end
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodB2G() #0 {
entry:
%data = alloca i32, align 4
%myUnion = alloca %union.CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_34_unionType, align 4
%recvResult = alloca i32, align 4
%service = alloca %struct.sockaddr_in, align 4
%connectSocket = alloca i32, align 4
%inputBuffer = alloca [14 x i8], align 1
%data21 = alloca i32, align 4
%i = alloca i32, align 4
%buffer = alloca [10 x i32], align 16
store i32 -1, i32* %data, align 4
store i32 -1, i32* %connectSocket, align 4
br label %do.body
do.body: ; preds = %entry
%call = call i32 @socket(i32 2, i32 1, i32 6) #6
store i32 %call, i32* %connectSocket, align 4
%0 = load i32, i32* %connectSocket, align 4
%cmp = icmp eq i32 %0, -1
br i1 %cmp, label %if.then, label %if.end
if.then: ; preds = %do.body
br label %do.end
if.end: ; preds = %do.body
%1 = bitcast %struct.sockaddr_in* %service to i8*
call void @llvm.memset.p0i8.i64(i8* align 4 %1, i8 0, i64 16, i1 false)
%sin_family = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %service, i32 0, i32 0
store i16 2, i16* %sin_family, align 4
%call1 = call i32 @inet_addr(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0)) #6
%sin_addr = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %service, i32 0, i32 2
%s_addr = getelementptr inbounds %struct.in_addr, %struct.in_addr* %sin_addr, i32 0, i32 0
store i32 %call1, i32* %s_addr, align 4
%call2 = call zeroext i16 @htons(i16 zeroext 27015) #7
%sin_port = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %service, i32 0, i32 1
store i16 %call2, i16* %sin_port, align 2
%2 = load i32, i32* %connectSocket, align 4
%3 = bitcast %struct.sockaddr_in* %service to %struct.sockaddr*
%call3 = call i32 @connect(i32 %2, %struct.sockaddr* %3, i32 16)
%cmp4 = icmp eq i32 %call3, -1
br i1 %cmp4, label %if.then5, label %if.end6
if.then5: ; preds = %if.end
br label %do.end
if.end6: ; preds = %if.end
%4 = load i32, i32* %connectSocket, align 4
%arraydecay = getelementptr inbounds [14 x i8], [14 x i8]* %inputBuffer, i64 0, i64 0
%call7 = call i64 @recv(i32 %4, i8* %arraydecay, i64 13, i32 0)
%conv = trunc i64 %call7 to i32
store i32 %conv, i32* %recvResult, align 4
%5 = load i32, i32* %recvResult, align 4
%cmp8 = icmp eq i32 %5, -1
br i1 %cmp8, label %if.then12, label %lor.lhs.false
lor.lhs.false: ; preds = %if.end6
%6 = load i32, i32* %recvResult, align 4
%cmp10 = icmp eq i32 %6, 0
br i1 %cmp10, label %if.then12, label %if.end13
if.then12: ; preds = %lor.lhs.false, %if.end6
br label %do.end
if.end13: ; preds = %lor.lhs.false
%7 = load i32, i32* %recvResult, align 4
%idxprom = sext i32 %7 to i64
%arrayidx = getelementptr inbounds [14 x i8], [14 x i8]* %inputBuffer, i64 0, i64 %idxprom
store i8 0, i8* %arrayidx, align 1
%arraydecay14 = getelementptr inbounds [14 x i8], [14 x i8]* %inputBuffer, i64 0, i64 0
%call15 = call i32 @atoi(i8* %arraydecay14) #8
store i32 %call15, i32* %data, align 4
br label %do.end
do.end: ; preds = %if.end13, %if.then12, %if.then5, %if.then
%8 = load i32, i32* %connectSocket, align 4
%cmp16 = icmp ne i32 %8, -1
br i1 %cmp16, label %if.then18, label %if.end20
if.then18: ; preds = %do.end
%9 = load i32, i32* %connectSocket, align 4
%call19 = call i32 @close(i32 %9)
br label %if.end20
if.end20: ; preds = %if.then18, %do.end
%10 = load i32, i32* %data, align 4
%unionFirst = bitcast %union.CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_34_unionType* %myUnion to i32*
store i32 %10, i32* %unionFirst, align 4
%unionSecond = bitcast %union.CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_34_unionType* %myUnion to i32*
%11 = load i32, i32* %unionSecond, align 4
store i32 %11, i32* %data21, align 4
%12 = bitcast [10 x i32]* %buffer to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %12, i8 0, i64 40, i1 false)
%13 = load i32, i32* %data21, align 4
%cmp22 = icmp sge i32 %13, 0
br i1 %cmp22, label %land.lhs.true, label %if.else
land.lhs.true: ; preds = %if.end20
%14 = load i32, i32* %data21, align 4
%cmp24 = icmp slt i32 %14, 10
br i1 %cmp24, label %if.then26, label %if.else
if.then26: ; preds = %land.lhs.true
%15 = load i32, i32* %data21, align 4
%idxprom27 = sext i32 %15 to i64
%arrayidx28 = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom27
store i32 1, i32* %arrayidx28, align 4
store i32 0, i32* %i, align 4
br label %for.cond
for.cond: ; preds = %for.inc, %if.then26
%16 = load i32, i32* %i, align 4
%cmp29 = icmp slt i32 %16, 10
br i1 %cmp29, label %for.body, label %for.end
for.body: ; preds = %for.cond
%17 = load i32, i32* %i, align 4
%idxprom31 = sext i32 %17 to i64
%arrayidx32 = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom31
%18 = load i32, i32* %arrayidx32, align 4
call void @printIntLine(i32 %18)
br label %for.inc
for.inc: ; preds = %for.body
%19 = load i32, i32* %i, align 4
%inc = add nsw i32 %19, 1
store i32 %inc, i32* %i, align 4
br label %for.cond
for.end: ; preds = %for.cond
br label %if.end33
if.else: ; preds = %land.lhs.true, %if.end20
call void @printLine(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
br label %if.end33
if.end33: ; preds = %if.else, %for.end
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" }
attributes #1 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #2 = { argmemonly nounwind willreturn writeonly }
attributes #3 = { nounwind readnone "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #4 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #5 = { nounwind readonly "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #6 = { nounwind }
attributes #7 = { nounwind readnone }
attributes #8 = { nounwind readonly }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_10 = constant [3 x i8] c"%(\00"
define i64 @_GLOBAL_OFFSET_TABLE_.1(i64 %arg1) local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
%1 = add i64 %arg1, ptrtoint ([3 x i8]* @global_var_10 to i64), !insn.addr !1
%2 = inttoptr i64 %1 to i64*, !insn.addr !1
%3 = load i64, i64* %2, align 8, !insn.addr !1
ret i64 %3, !insn.addr !2
}
define i64 @function_30() local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !3
%1 = load i64, i64* %0
%2 = add i64 %1, -40, !insn.addr !3
%3 = inttoptr i64 %2 to i32*, !insn.addr !3
store i32 0, i32* %3, align 4, !insn.addr !3
%4 = add i64 %1, -32, !insn.addr !4
%5 = inttoptr i64 %4 to i64*, !insn.addr !4
store i64 0, i64* %5, align 8, !insn.addr !4
%6 = add i64 %1, -24, !insn.addr !5
%7 = inttoptr i64 %6 to i64*, !insn.addr !5
store i64 0, i64* %7, align 8, !insn.addr !5
%8 = add i64 %1, -16, !insn.addr !6
%9 = inttoptr i64 %8 to i64*, !insn.addr !6
store i64 0, i64* %9, align 8, !insn.addr !6
%10 = add i64 %1, -48, !insn.addr !7
%11 = add i64 %1, -56, !insn.addr !8
%12 = inttoptr i64 %11 to i64*, !insn.addr !8
%13 = load i64, i64* %12, align 8, !insn.addr !8
%14 = call i64 @memmove(i64 %13, i64 %10, i64 40, i64 %10), !insn.addr !9
%15 = load i64, i64* %12, align 8, !insn.addr !10
%16 = inttoptr i64 %15 to i32*, !insn.addr !11
%17 = load i32, i32* %16, align 4, !insn.addr !11
%18 = zext i32 %17 to i64, !insn.addr !12
%19 = call i64 @printIntLine(i64 %18), !insn.addr !13
%20 = add i64 %1, -8, !insn.addr !14
%21 = inttoptr i64 %20 to i64*, !insn.addr !14
%22 = load i64, i64* %21, align 8, !insn.addr !14
%23 = call i64 @__readfsqword(i64 40), !insn.addr !15
%24 = icmp eq i64 %22, %23, !insn.addr !15
store i64 0, i64* %rax.0.reg2mem, !insn.addr !16
br i1 %24, label %dec_label_pc_89, label %dec_label_pc_84, !insn.addr !16
dec_label_pc_84: ; preds = %dec_label_pc_30
%25 = call i64 @__stack_chk_fail(), !insn.addr !17
store i64 %25, i64* %rax.0.reg2mem, !insn.addr !17
br label %dec_label_pc_89, !insn.addr !17
dec_label_pc_89: ; preds = %dec_label_pc_84, %dec_label_pc_30
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !18
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE131_memmove_66b_goodG2BSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_8b:
%rax.0.reg2mem = alloca i64, !insn.addr !19
%stack_var_-56 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !20
%1 = add i64 %arg1, ptrtoint ([3 x i8]* @global_var_10 to i64), !insn.addr !21
%2 = inttoptr i64 %1 to i64*, !insn.addr !21
%3 = load i64, i64* %2, align 8, !insn.addr !21
store i64 0, i64* %stack_var_-56, align 8, !insn.addr !22
%4 = ptrtoint i64* %stack_var_-56 to i64, !insn.addr !23
%5 = call i64 @memmove(i64 %3, i64 %4, i64 40, i64 %4), !insn.addr !24
%6 = inttoptr i64 %3 to i32*, !insn.addr !25
%7 = load i32, i32* %6, align 4, !insn.addr !25
%8 = zext i32 %7 to i64, !insn.addr !26
%9 = call i64 @printIntLine(i64 %8), !insn.addr !27
%10 = call i64 @__readfsqword(i64 40), !insn.addr !28
%11 = icmp eq i64 %0, %10, !insn.addr !28
store i64 0, i64* %rax.0.reg2mem, !insn.addr !29
br i1 %11, label %dec_label_pc_114, label %dec_label_pc_10f, !insn.addr !29
dec_label_pc_10f: ; preds = %dec_label_pc_8b
%12 = call i64 @__stack_chk_fail(), !insn.addr !30
store i64 %12, i64* %rax.0.reg2mem, !insn.addr !30
br label %dec_label_pc_114, !insn.addr !30
dec_label_pc_114: ; preds = %dec_label_pc_10f, %dec_label_pc_8b
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !31
}
declare i64 @memmove(i64, i64, i64, i64) local_unnamed_addr
declare i64 @printIntLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 12}
!1 = !{i64 31}
!2 = !{i64 35}
!3 = !{i64 48}
!4 = !{i64 55}
!5 = !{i64 63}
!6 = !{i64 71}
!7 = !{i64 79}
!8 = !{i64 83}
!9 = !{i64 98}
!10 = !{i64 103}
!11 = !{i64 107}
!12 = !{i64 109}
!13 = !{i64 111}
!14 = !{i64 117}
!15 = !{i64 121}
!16 = !{i64 130}
!17 = !{i64 132}
!18 = !{i64 138}
!19 = !{i64 139}
!20 = !{i64 151}
!21 = !{i64 170}
!22 = !{i64 178}
!23 = !{i64 218}
!24 = !{i64 237}
!25 = !{i64 246}
!26 = !{i64 248}
!27 = !{i64 250}
!28 = !{i64 260}
!29 = !{i64 269}
!30 = !{i64 271}
!31 = !{i64 277}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE131_memmove_66b_badSink(i32** %dataArray) #0 {
entry:
%dataArray.addr = alloca i32**, align 8
%data = alloca i32*, align 8
%source = alloca [10 x i32], align 16
store i32** %dataArray, i32*** %dataArray.addr, align 8
%0 = load i32**, i32*** %dataArray.addr, align 8
%arrayidx = getelementptr inbounds i32*, i32** %0, i64 2
%1 = load i32*, i32** %arrayidx, align 8
store i32* %1, i32** %data, align 8
%2 = bitcast [10 x i32]* %source to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %2, i8 0, i64 40, i1 false)
%3 = load i32*, i32** %data, align 8
%4 = bitcast i32* %3 to i8*
%arraydecay = getelementptr inbounds [10 x i32], [10 x i32]* %source, i64 0, i64 0
%5 = bitcast i32* %arraydecay to i8*
call void @llvm.memmove.p0i8.p0i8.i64(i8* align 4 %4, i8* align 16 %5, i64 40, i1 false)
%6 = load i32*, i32** %data, align 8
%arrayidx1 = getelementptr inbounds i32, i32* %6, i64 0
%7 = load i32, i32* %arrayidx1, align 4
call void @printIntLine(i32 %7)
ret void
}
; Function Attrs: argmemonly nounwind willreturn writeonly
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #1
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memmove.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i1 immarg) #2
declare dso_local void @printIntLine(i32) #3
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE131_memmove_66b_goodG2BSink(i32** %dataArray) #0 {
entry:
%dataArray.addr = alloca i32**, align 8
%data = alloca i32*, align 8
%source = alloca [10 x i32], align 16
store i32** %dataArray, i32*** %dataArray.addr, align 8
%0 = load i32**, i32*** %dataArray.addr, align 8
%arrayidx = getelementptr inbounds i32*, i32** %0, i64 2
%1 = load i32*, i32** %arrayidx, align 8
store i32* %1, i32** %data, align 8
%2 = bitcast [10 x i32]* %source to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %2, i8 0, i64 40, i1 false)
%3 = load i32*, i32** %data, align 8
%4 = bitcast i32* %3 to i8*
%arraydecay = getelementptr inbounds [10 x i32], [10 x i32]* %source, i64 0, i64 0
%5 = bitcast i32* %arraydecay to i8*
call void @llvm.memmove.p0i8.p0i8.i64(i8* align 4 %4, i8* align 16 %5, i64 40, i1 false)
%6 = load i32*, i32** %data, align 8
%arrayidx1 = getelementptr inbounds i32, i32* %6, i64 0
%7 = load i32, i32* %arrayidx1, align 4
call void @printIntLine(i32 %7)
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" }
attributes #1 = { argmemonly nounwind willreturn writeonly }
attributes #2 = { argmemonly nounwind willreturn }
attributes #3 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_f = constant [3 x i8] c"%(\00"
@global_var_350 = constant [21 x i8] c"Benign, fixed string\00"
@global_var_10 = external constant i128
@global_var_34c = local_unnamed_addr global i32 5
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
ret i64 add (i64 sub (i64 ptrtoint (i128* @global_var_10 to i64), i64 1), i64 65), !insn.addr !1
}
define i64 @function_30(i64 %arg1, i64 %arg2, i64 %arg3, i64 %arg4) local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !2
%.pre-phi2.reg2mem = alloca i64*, !insn.addr !2
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = load i64, i64* %0
%4 = add i64 %3, -9, !insn.addr !2
%5 = inttoptr i64 %4 to i8*, !insn.addr !2
%6 = load i8, i8* %5, align 1, !insn.addr !2
%7 = trunc i64 %arg4 to i8, !insn.addr !2
%8 = add i8 %6, %7, !insn.addr !2
store i8 %8, i8* %5, align 1, !insn.addr !2
%9 = call i64 @__asm_int1(), !insn.addr !3
%10 = mul i64 %9, ptrtoint (i128* @global_var_10 to i64), !insn.addr !4
%11 = sub i64 %2, %10, !insn.addr !5
%12 = add i64 %11, ptrtoint ([3 x i8]* @global_var_f to i64), !insn.addr !6
%13 = and i64 %12, -16, !insn.addr !7
%14 = add i64 %1, -128, !insn.addr !8
%15 = inttoptr i64 %14 to i64*, !insn.addr !8
store i64 %13, i64* %15, align 8, !insn.addr !8
%16 = add i64 %11, add (i64 ptrtoint ([3 x i8]* @global_var_f to i64), i64 sub (i64 0, i64 trunc (i128 mul (i128 sext (i64 trunc (i128 udiv (i128 zext (i64 add (i64 sub (i64 ptrtoint (i128* @global_var_10 to i64), i64 1), i64 115) to i128), i128 zext (i64 ptrtoint (i128* @global_var_10 to i64) to i128)) to i64) to i128), i128 ptrtoint (i128* @global_var_10 to i128)) to i64))), !insn.addr !9
%17 = and i64 %16, -16, !insn.addr !10
%18 = add i64 %1, -120, !insn.addr !11
%19 = inttoptr i64 %18 to i64*, !insn.addr !11
store i64 %17, i64* %19, align 8, !insn.addr !11
%20 = load i32, i32* inttoptr (i64 844 to i32*), align 4, !insn.addr !12
%21 = icmp eq i32 %20, 5, !insn.addr !13
%22 = icmp eq i1 %21, false, !insn.addr !14
br i1 %22, label %dec_label_pc_30.dec_label_pc_a2_crit_edge, label %dec_label_pc_8d, !insn.addr !14
dec_label_pc_30.dec_label_pc_a2_crit_edge: ; preds = %dec_label_pc_30
%.pre = add i64 %1, -136, !insn.addr !15
%.pre1 = inttoptr i64 %.pre to i64*, !insn.addr !15
store i64* %.pre1, i64** %.pre-phi2.reg2mem
br label %dec_label_pc_a2
dec_label_pc_8d: ; preds = %dec_label_pc_30
%23 = load i64, i64* %15, align 8, !insn.addr !16
%24 = add i64 %1, -136
%25 = inttoptr i64 %24 to i64*
store i64 %23, i64* %25, align 8, !insn.addr !17
%26 = inttoptr i64 %23 to i8*, !insn.addr !18
store i8 0, i8* %26, align 1, !insn.addr !18
store i64* %25, i64** %.pre-phi2.reg2mem, !insn.addr !18
br label %dec_label_pc_a2, !insn.addr !18
dec_label_pc_a2: ; preds = %dec_label_pc_30.dec_label_pc_a2_crit_edge, %dec_label_pc_8d
%.pre-phi2.reload = load i64*, i64** %.pre-phi2.reg2mem
%27 = add i64 %1, -112, !insn.addr !19
%28 = call i64 @memset(i64 %27, i64 67, i64 99, i64 %arg4), !insn.addr !20
%29 = add i64 %1, -13, !insn.addr !21
%30 = inttoptr i64 %29 to i8*, !insn.addr !21
store i8 0, i8* %30, align 1, !insn.addr !21
%31 = load i64, i64* %.pre-phi2.reload, align 8, !insn.addr !15
%32 = call i64 @strncpy(i64 %31, i64 %27, i64 99, i64 %27), !insn.addr !22
%33 = load i64, i64* %.pre-phi2.reload, align 8, !insn.addr !23
%34 = add i64 %33, 99, !insn.addr !24
%35 = inttoptr i64 %34 to i8*, !insn.addr !25
store i8 0, i8* %35, align 1, !insn.addr !25
%36 = load i64, i64* %.pre-phi2.reload, align 8, !insn.addr !26
%37 = call i64 @printLine(i64 %36, i64 %27, i64 99, i64 %27), !insn.addr !27
%38 = add i64 %1, -8, !insn.addr !28
%39 = inttoptr i64 %38 to i64*, !insn.addr !28
%40 = load i64, i64* %39, align 8, !insn.addr !28
%41 = call i64 @__readfsqword(i64 40), !insn.addr !29
%42 = icmp eq i64 %40, %41, !insn.addr !29
store i64 0, i64* %rax.0.reg2mem, !insn.addr !30
br i1 %42, label %dec_label_pc_109, label %dec_label_pc_104, !insn.addr !30
dec_label_pc_104: ; preds = %dec_label_pc_a2
%43 = call i64 @__stack_chk_fail(), !insn.addr !31
store i64 %43, i64* %rax.0.reg2mem, !insn.addr !31
br label %dec_label_pc_109, !insn.addr !31
dec_label_pc_109: ; preds = %dec_label_pc_104, %dec_label_pc_a2
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !32
}
define i64 @goodG2B1() local_unnamed_addr {
dec_label_pc_10b:
%rax.0.reg2mem = alloca i64, !insn.addr !33
%stack_var_-144.0.reg2mem = alloca i64, !insn.addr !33
%stack_var_-120 = alloca i64, align 8
%stack_var_-152 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !34
%1 = load i32, i32* @global_var_34c, align 4, !insn.addr !35
%2 = icmp eq i32 %1, 5, !insn.addr !36
br i1 %2, label %dec_label_pc_1a6, label %dec_label_pc_198, !insn.addr !37
dec_label_pc_198: ; preds = %dec_label_pc_10b
%3 = call i64 @printLine(i64 ptrtoint ([21 x i8]* @global_var_350 to i64), i64 ptrtoint (i128* @global_var_10 to i64), i64 trunc (i128 urem (i128 zext (i64 add (i64 sub (i64 ptrtoint (i128* @global_var_10 to i64), i64 1), i64 115) to i128), i128 zext (i64 ptrtoint (i128* @global_var_10 to i64) to i128)) to i64), i64 ptrtoint (i128* @global_var_10 to i64)), !insn.addr !38
br label %dec_label_pc_1bb, !insn.addr !39
dec_label_pc_1a6: ; preds = %dec_label_pc_10b
%4 = ptrtoint i64* %stack_var_-152 to i64, !insn.addr !40
%5 = add i64 %4, add (i64 ptrtoint ([3 x i8]* @global_var_f to i64), i64 add (i64 sub (i64 0, i64 trunc (i128 mul (i128 sext (i64 trunc (i128 udiv (i128 zext (i64 add (i64 sub (i64 ptrtoint (i128* @global_var_10 to i64), i64 1), i64 115) to i128), i128 zext (i64 ptrtoint (i128* @global_var_10 to i64) to i128)) to i64) to i128), i128 ptrtoint (i128* @global_var_10 to i128)) to i64)), i64 sub (i64 0, i64 trunc (i128 mul (i128 sext (i64 trunc (i128 udiv (i128 zext (i64 add (i64 sub (i64 ptrtoint (i128* @global_var_10 to i64), i64 1), i64 65) to i128), i128 zext (i64 ptrtoint (i128* @global_var_10 to i64) to i128)) to i64) to i128), i128 ptrtoint (i128* @global_var_10 to i128)) to i64)))), !insn.addr !41
%6 = and i64 %5, -16, !insn.addr !42
%7 = inttoptr i64 %6 to i8*, !insn.addr !43
store i8 0, i8* %7, align 16, !insn.addr !44
store i64 %6, i64* %stack_var_-144.0.reg2mem, !insn.addr !44
br label %dec_label_pc_1bb, !insn.addr !44
dec_label_pc_1bb: ; preds = %dec_label_pc_1a6, %dec_label_pc_198
%stack_var_-144.0.reload = load i64, i64* %stack_var_-144.0.reg2mem
%8 = ptrtoint i64* %stack_var_-120 to i64, !insn.addr !45
%9 = call i64 @memset(i64 %8, i64 67, i64 99, i64 ptrtoint (i128* @global_var_10 to i64)), !insn.addr !46
%10 = call i64 @strncpy(i64 %stack_var_-144.0.reload, i64 %8, i64 99, i64 %8), !insn.addr !47
%11 = add i64 %stack_var_-144.0.reload, 99, !insn.addr !48
%12 = inttoptr i64 %11 to i8*, !insn.addr !49
store i8 0, i8* %12, align 1, !insn.addr !49
%13 = call i64 @printLine(i64 %stack_var_-144.0.reload, i64 %8, i64 99, i64 %8), !insn.addr !50
%14 = call i64 @__readfsqword(i64 40), !insn.addr !51
%15 = icmp eq i64 %0, %14, !insn.addr !51
store i64 0, i64* %rax.0.reg2mem, !insn.addr !52
br i1 %15, label %dec_label_pc_222, label %dec_label_pc_21d, !insn.addr !52
dec_label_pc_21d: ; preds = %dec_label_pc_1bb
%16 = call i64 @__stack_chk_fail(), !insn.addr !53
store i64 %16, i64* %rax.0.reg2mem, !insn.addr !53
br label %dec_label_pc_222, !insn.addr !53
dec_label_pc_222: ; preds = %dec_label_pc_21d, %dec_label_pc_1bb
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !54
}
define i64 @goodG2B2() local_unnamed_addr {
dec_label_pc_224:
%rax.0.reg2mem = alloca i64, !insn.addr !55
%stack_var_-144.0.reg2mem = alloca i64, !insn.addr !55
%stack_var_-120 = alloca i64, align 8
%stack_var_-152 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !56
%1 = load i32, i32* @global_var_34c, align 4, !insn.addr !57
%2 = icmp eq i32 %1, 5, !insn.addr !58
%3 = icmp eq i1 %2, false, !insn.addr !59
br i1 %3, label %dec_label_pc_2c6, label %dec_label_pc_2b1, !insn.addr !59
dec_label_pc_2b1: ; preds = %dec_label_pc_224
%4 = ptrtoint i64* %stack_var_-152 to i64, !insn.addr !60
%5 = add i64 %4, add (i64 ptrtoint ([3 x i8]* @global_var_f to i64), i64 add (i64 sub (i64 0, i64 trunc (i128 mul (i128 sext (i64 trunc (i128 udiv (i128 zext (i64 add (i64 sub (i64 ptrtoint (i128* @global_var_10 to i64), i64 1), i64 115) to i128), i128 zext (i64 ptrtoint (i128* @global_var_10 to i64) to i128)) to i64) to i128), i128 ptrtoint (i128* @global_var_10 to i128)) to i64)), i64 sub (i64 0, i64 trunc (i128 mul (i128 sext (i64 trunc (i128 udiv (i128 zext (i64 add (i64 sub (i64 ptrtoint (i128* @global_var_10 to i64), i64 1), i64 65) to i128), i128 zext (i64 ptrtoint (i128* @global_var_10 to i64) to i128)) to i64) to i128), i128 ptrtoint (i128* @global_var_10 to i128)) to i64)))), !insn.addr !61
%6 = and i64 %5, -16, !insn.addr !62
%7 = inttoptr i64 %6 to i8*, !insn.addr !63
store i8 0, i8* %7, align 16, !insn.addr !64
store i64 %6, i64* %stack_var_-144.0.reg2mem, !insn.addr !64
br label %dec_label_pc_2c6, !insn.addr !64
dec_label_pc_2c6: ; preds = %dec_label_pc_2b1, %dec_label_pc_224
%stack_var_-144.0.reload = load i64, i64* %stack_var_-144.0.reg2mem
%8 = ptrtoint i64* %stack_var_-120 to i64, !insn.addr !65
%9 = call i64 @memset(i64 %8, i64 67, i64 99, i64 ptrtoint (i128* @global_var_10 to i64)), !insn.addr !66
%10 = call i64 @strncpy(i64 %stack_var_-144.0.reload, i64 %8, i64 99, i64 %8), !insn.addr !67
%11 = add i64 %stack_var_-144.0.reload, 99, !insn.addr !68
%12 = inttoptr i64 %11 to i8*, !insn.addr !69
store i8 0, i8* %12, align 1, !insn.addr !69
%13 = call i64 @printLine(i64 %stack_var_-144.0.reload, i64 %8, i64 99, i64 %8), !insn.addr !70
%14 = call i64 @__readfsqword(i64 40), !insn.addr !71
%15 = icmp eq i64 %0, %14, !insn.addr !71
store i64 0, i64* %rax.0.reg2mem, !insn.addr !72
br i1 %15, label %dec_label_pc_32d, label %dec_label_pc_328, !insn.addr !72
dec_label_pc_328: ; preds = %dec_label_pc_2c6
%16 = call i64 @__stack_chk_fail(), !insn.addr !73
store i64 %16, i64* %rax.0.reg2mem, !insn.addr !73
br label %dec_label_pc_32d, !insn.addr !73
dec_label_pc_32d: ; preds = %dec_label_pc_328, %dec_label_pc_2c6
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !74
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_ncpy_07_good() local_unnamed_addr {
dec_label_pc_32f:
%0 = call i64 @goodG2B1(), !insn.addr !75
%1 = call i64 @goodG2B2(), !insn.addr !76
ret i64 %1, !insn.addr !77
}
declare i64 @memset(i64, i64, i64, i64) local_unnamed_addr
declare i64 @strncpy(i64, i64, i64, i64) local_unnamed_addr
declare i64 @printLine(i64, i64, i64, i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @__asm_int1() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 11}
!1 = !{i64 35}
!2 = !{i64 48}
!3 = !{i64 51}
!4 = !{i64 52}
!5 = !{i64 56}
!6 = !{i64 62}
!7 = !{i64 66}
!8 = !{i64 74}
!9 = !{i64 114}
!10 = !{i64 118}
!11 = !{i64 126}
!12 = !{i64 130}
!13 = !{i64 136}
!14 = !{i64 139}
!15 = !{i64 192}
!16 = !{i64 141}
!17 = !{i64 145}
!18 = !{i64 159}
!19 = !{i64 162}
!20 = !{i64 179}
!21 = !{i64 184}
!22 = !{i64 210}
!23 = !{i64 215}
!24 = !{i64 222}
!25 = !{i64 226}
!26 = !{i64 229}
!27 = !{i64 239}
!28 = !{i64 245}
!29 = !{i64 249}
!30 = !{i64 258}
!31 = !{i64 260}
!32 = !{i64 266}
!33 = !{i64 267}
!34 = !{i64 278}
!35 = !{i64 397}
!36 = !{i64 403}
!37 = !{i64 406}
!38 = !{i64 415}
!39 = !{i64 420}
!40 = !{i64 271}
!41 = !{i64 381}
!42 = !{i64 385}
!43 = !{i64 393}
!44 = !{i64 440}
!45 = !{i64 457}
!46 = !{i64 460}
!47 = !{i64 491}
!48 = !{i64 503}
!49 = !{i64 507}
!50 = !{i64 520}
!51 = !{i64 530}
!52 = !{i64 539}
!53 = !{i64 541}
!54 = !{i64 547}
!55 = !{i64 548}
!56 = !{i64 559}
!57 = !{i64 678}
!58 = !{i64 684}
!59 = !{i64 687}
!60 = !{i64 552}
!61 = !{i64 662}
!62 = !{i64 666}
!63 = !{i64 674}
!64 = !{i64 707}
!65 = !{i64 724}
!66 = !{i64 727}
!67 = !{i64 758}
!68 = !{i64 770}
!69 = !{i64 774}
!70 = !{i64 787}
!71 = !{i64 797}
!72 = !{i64 806}
!73 = !{i64 808}
!74 = !{i64 814}
!75 = !{i64 824}
!76 = !{i64 834}
!77 = !{i64 841}
### Assistant: @staticFive = internal global i32 5, align 4
@.str = private unnamed_addr constant [21 x i8] c"Benign, fixed string\00", align 1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_ncpy_07_bad() #0 {
entry:
%data = alloca i8*, align 8
%dataBadBuffer = alloca i8*, align 8
%dataGoodBuffer = alloca i8*, align 8
%source = alloca [100 x i8], align 16
%0 = alloca i8, i64 50, align 16
store i8* %0, i8** %dataBadBuffer, align 8
%1 = alloca i8, i64 100, align 16
store i8* %1, i8** %dataGoodBuffer, align 8
%2 = load i32, i32* @staticFive, align 4
%cmp = icmp eq i32 %2, 5
br i1 %cmp, label %if.then, label %if.end
if.then: ; preds = %entry
%3 = load i8*, i8** %dataBadBuffer, align 8
store i8* %3, i8** %data, align 8
%4 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %4, i64 0
store i8 0, i8* %arrayidx, align 1
br label %if.end
if.end: ; preds = %if.then, %entry
%arraydecay = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
call void @llvm.memset.p0i8.i64(i8* align 16 %arraydecay, i8 67, i64 99, i1 false)
%arrayidx1 = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 99
store i8 0, i8* %arrayidx1, align 1
%5 = load i8*, i8** %data, align 8
%arraydecay2 = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
%call = call i8* @strncpy(i8* %5, i8* %arraydecay2, i64 99) #4
%6 = load i8*, i8** %data, align 8
%arrayidx3 = getelementptr inbounds i8, i8* %6, i64 99
store i8 0, i8* %arrayidx3, align 1
%7 = load i8*, i8** %data, align 8
call void @printLine(i8* %7)
ret void
}
; Function Attrs: argmemonly nounwind willreturn writeonly
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #1
; Function Attrs: nounwind
declare dso_local i8* @strncpy(i8*, i8*, i64) #2
declare dso_local void @printLine(i8*) #3
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_ncpy_07_good() #0 {
entry:
call void @goodG2B1()
call void @goodG2B2()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B1() #0 {
entry:
%data = alloca i8*, align 8
%dataBadBuffer = alloca i8*, align 8
%dataGoodBuffer = alloca i8*, align 8
%source = alloca [100 x i8], align 16
%0 = alloca i8, i64 50, align 16
store i8* %0, i8** %dataBadBuffer, align 8
%1 = alloca i8, i64 100, align 16
store i8* %1, i8** %dataGoodBuffer, align 8
%2 = load i32, i32* @staticFive, align 4
%cmp = icmp ne i32 %2, 5
br i1 %cmp, label %if.then, label %if.else
if.then: ; preds = %entry
call void @printLine(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
br label %if.end
if.else: ; preds = %entry
%3 = load i8*, i8** %dataGoodBuffer, align 8
store i8* %3, i8** %data, align 8
%4 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %4, i64 0
store i8 0, i8* %arrayidx, align 1
br label %if.end
if.end: ; preds = %if.else, %if.then
%arraydecay = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
call void @llvm.memset.p0i8.i64(i8* align 16 %arraydecay, i8 67, i64 99, i1 false)
%arrayidx1 = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 99
store i8 0, i8* %arrayidx1, align 1
%5 = load i8*, i8** %data, align 8
%arraydecay2 = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
%call = call i8* @strncpy(i8* %5, i8* %arraydecay2, i64 99) #4
%6 = load i8*, i8** %data, align 8
%arrayidx3 = getelementptr inbounds i8, i8* %6, i64 99
store i8 0, i8* %arrayidx3, align 1
%7 = load i8*, i8** %data, align 8
call void @printLine(i8* %7)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B2() #0 {
entry:
%data = alloca i8*, align 8
%dataBadBuffer = alloca i8*, align 8
%dataGoodBuffer = alloca i8*, align 8
%source = alloca [100 x i8], align 16
%0 = alloca i8, i64 50, align 16
store i8* %0, i8** %dataBadBuffer, align 8
%1 = alloca i8, i64 100, align 16
store i8* %1, i8** %dataGoodBuffer, align 8
%2 = load i32, i32* @staticFive, align 4
%cmp = icmp eq i32 %2, 5
br i1 %cmp, label %if.then, label %if.end
if.then: ; preds = %entry
%3 = load i8*, i8** %dataGoodBuffer, align 8
store i8* %3, i8** %data, align 8
%4 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %4, i64 0
store i8 0, i8* %arrayidx, align 1
br label %if.end
if.end: ; preds = %if.then, %entry
%arraydecay = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
call void @llvm.memset.p0i8.i64(i8* align 16 %arraydecay, i8 67, i64 99, i1 false)
%arrayidx1 = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 99
store i8 0, i8* %arrayidx1, align 1
%5 = load i8*, i8** %data, align 8
%arraydecay2 = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
%call = call i8* @strncpy(i8* %5, i8* %arraydecay2, i64 99) #4
%6 = load i8*, i8** %data, align 8
%arrayidx3 = getelementptr inbounds i8, i8* %6, i64 99
store i8 0, i8* %arrayidx3, align 1
%7 = load i8*, i8** %data, align 8
call void @printLine(i8* %7)
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" }
attributes #1 = { argmemonly nounwind willreturn writeonly }
attributes #2 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #3 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
define i64 @_GLOBAL_OFFSET_TABLE_.1(i64 %arg1) local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
ret i64 %arg1, !insn.addr !1
}
define i64 @function_30() local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !2
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = trunc i64 %2 to i32, !insn.addr !2
%4 = add i64 %1, -32, !insn.addr !2
%5 = inttoptr i64 %4 to i32*, !insn.addr !2
store i32 %3, i32* %5, align 4, !insn.addr !2
%6 = add i64 %1, -19, !insn.addr !3
%7 = inttoptr i64 %6 to i64*, !insn.addr !3
store i64 4702111234474983745, i64* %7, align 8, !insn.addr !3
%8 = add i64 %1, -11, !insn.addr !4
%9 = inttoptr i64 %8 to i16*, !insn.addr !4
store i16 16705, i16* %9, align 2, !insn.addr !4
%10 = add i64 %1, -9, !insn.addr !5
%11 = inttoptr i64 %10 to i8*, !insn.addr !5
store i8 0, i8* %11, align 1, !insn.addr !5
%12 = call i64 @strlen(i64 %6), !insn.addr !6
%13 = add i64 %12, 1, !insn.addr !7
%14 = inttoptr i64 %4 to i64*, !insn.addr !8
%15 = load i64, i64* %14, align 8, !insn.addr !8
%16 = call i64 @memcpy(i64 %15, i64 %6, i64 %13, i64 %6), !insn.addr !9
%17 = load i64, i64* %14, align 8, !insn.addr !10
%18 = call i64 @printLine(i64 %17), !insn.addr !11
%19 = add i64 %1, -8, !insn.addr !12
%20 = inttoptr i64 %19 to i64*, !insn.addr !12
%21 = load i64, i64* %20, align 8, !insn.addr !12
%22 = call i64 @__readfsqword(i64 40), !insn.addr !13
%23 = icmp eq i64 %21, %22, !insn.addr !13
store i64 0, i64* %rax.0.reg2mem, !insn.addr !14
br i1 %23, label %dec_label_pc_8f, label %dec_label_pc_8a, !insn.addr !14
dec_label_pc_8a: ; preds = %dec_label_pc_30
%24 = call i64 @__stack_chk_fail(), !insn.addr !15
store i64 %24, i64* %rax.0.reg2mem, !insn.addr !15
br label %dec_label_pc_8f, !insn.addr !15
dec_label_pc_8f: ; preds = %dec_label_pc_8a, %dec_label_pc_30
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !16
}
define i64 @_ZN64CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memcpy_7211goodG2BSinkESt6vectorIPcSaIS1_EE(i64 %arg1) local_unnamed_addr {
dec_label_pc_91:
%rax.0.reg2mem = alloca i64, !insn.addr !17
%stack_var_-27 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !18
%1 = inttoptr i64 %arg1 to i64*, !insn.addr !19
%2 = call i64 @_ZNSt6vectorIPcSaIS0_EEixEm(i64* %1, i64 2), !insn.addr !19
%3 = inttoptr i64 %2 to i64*, !insn.addr !20
%4 = load i64, i64* %3, align 8, !insn.addr !20
store i64 4702111234474983745, i64* %stack_var_-27, align 8, !insn.addr !21
%5 = ptrtoint i64* %stack_var_-27 to i64, !insn.addr !22
%6 = call i64 @strlen(i64 %5), !insn.addr !23
%7 = add i64 %6, 1, !insn.addr !24
%8 = call i64 @memcpy(i64 %4, i64 %5, i64 %7, i64 %5), !insn.addr !25
%9 = call i64 @printLine(i64 %4), !insn.addr !26
%10 = call i64 @__readfsqword(i64 40), !insn.addr !27
%11 = icmp eq i64 %0, %10, !insn.addr !27
store i64 0, i64* %rax.0.reg2mem, !insn.addr !28
br i1 %11, label %dec_label_pc_120, label %dec_label_pc_11b, !insn.addr !28
dec_label_pc_11b: ; preds = %dec_label_pc_91
%12 = call i64 @__stack_chk_fail(), !insn.addr !29
store i64 %12, i64* %rax.0.reg2mem, !insn.addr !29
br label %dec_label_pc_120, !insn.addr !29
dec_label_pc_120: ; preds = %dec_label_pc_11b, %dec_label_pc_91
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !30
}
define i64 @_ZNSt6vectorIPcSaIS0_EEixEm(i64* %result, i64 %arg2) local_unnamed_addr {
dec_label_pc_124:
%0 = ptrtoint i64* %result to i64
%1 = mul i64 %arg2, 8, !insn.addr !31
%2 = add i64 %1, %0, !insn.addr !32
ret i64 %2, !insn.addr !33
}
declare i64 @strlen(i64) local_unnamed_addr
declare i64 @memcpy(i64, i64, i64, i64) local_unnamed_addr
declare i64 @printLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 12}
!1 = !{i64 36}
!2 = !{i64 48}
!3 = !{i64 61}
!4 = !{i64 65}
!5 = !{i64 71}
!6 = !{i64 82}
!7 = !{i64 87}
!8 = !{i64 95}
!9 = !{i64 105}
!10 = !{i64 110}
!11 = !{i64 117}
!12 = !{i64 123}
!13 = !{i64 127}
!14 = !{i64 136}
!15 = !{i64 138}
!16 = !{i64 144}
!17 = !{i64 145}
!18 = !{i64 157}
!19 = !{i64 184}
!20 = !{i64 189}
!21 = !{i64 206}
!22 = !{i64 224}
!23 = !{i64 227}
!24 = !{i64 232}
!25 = !{i64 250}
!26 = !{i64 262}
!27 = !{i64 272}
!28 = !{i64 281}
!29 = !{i64 283}
!30 = !{i64 289}
!31 = !{i64 315}
!32 = !{i64 319}
!33 = !{i64 323}
### Assistant: %"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<char *, std::allocator<char *>>::_Vector_impl" }
%"struct.std::_Vector_base<char *, std::allocator<char *>>::_Vector_impl" = type { %"struct.std::_Vector_base<char *, std::allocator<char *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<char *, std::allocator<char *>>::_Vector_impl_data" = type { i8**, i8**, i8** }
$_ZNSt6vectorIPcSaIS0_EEixEm = comdat any
@__const._ZN64CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memcpy_727badSinkESt6vectorIPcSaIS1_EE.source = private unnamed_addr constant [11 x i8] c"AAAAAAAAAA\00", align 1
@__const._ZN64CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memcpy_7211goodG2BSinkESt6vectorIPcSaIS1_EE.source = private unnamed_addr constant [11 x i8] c"AAAAAAAAAA\00", align 1
; Function Attrs: noinline optnone uwtable
define dso_local void @_ZN64CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memcpy_727badSinkESt6vectorIPcSaIS1_EE(%"class.std::vector"* %dataVector) #0 {
entry:
%data = alloca i8*, align 8
%source = alloca [11 x i8], align 1
%call = call nonnull align 8 dereferenceable(8) i8** @_ZNSt6vectorIPcSaIS0_EEixEm(%"class.std::vector"* %dataVector, i64 2) #5
%0 = load i8*, i8** %call, align 8
store i8* %0, i8** %data, align 8
%1 = bitcast [11 x i8]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %1, i8* align 1 getelementptr inbounds ([11 x i8], [11 x i8]* @__const._ZN64CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memcpy_727badSinkESt6vectorIPcSaIS1_EE.source, i32 0, i32 0), i64 11, i1 false)
%2 = load i8*, i8** %data, align 8
%arraydecay = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%arraydecay1 = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%call2 = call i64 @strlen(i8* %arraydecay1) #6
%add = add i64 %call2, 1
%mul = mul i64 %add, 1
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %2, i8* align 1 %arraydecay, i64 %mul, i1 false)
%3 = load i8*, i8** %data, align 8
call void @printLine(i8* %3)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) i8** @_ZNSt6vectorIPcSaIS0_EEixEm(%"class.std::vector"* %this, i64 %__n) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::vector"*, align 8
%__n.addr = alloca i64, align 8
store %"class.std::vector"* %this, %"class.std::vector"** %this.addr, align 8
store i64 %__n, i64* %__n.addr, align 8
%this1 = load %"class.std::vector"*, %"class.std::vector"** %this.addr, align 8
%0 = bitcast %"class.std::vector"* %this1 to %"struct.std::_Vector_base"*
%_M_impl = getelementptr inbounds %"struct.std::_Vector_base", %"struct.std::_Vector_base"* %0, i32 0, i32 0
%1 = bitcast %"struct.std::_Vector_base<char *, std::allocator<char *>>::_Vector_impl"* %_M_impl to %"struct.std::_Vector_base<char *, std::allocator<char *>>::_Vector_impl_data"*
%_M_start = getelementptr inbounds %"struct.std::_Vector_base<char *, std::allocator<char *>>::_Vector_impl_data", %"struct.std::_Vector_base<char *, std::allocator<char *>>::_Vector_impl_data"* %1, i32 0, i32 0
%2 = load i8**, i8*** %_M_start, align 8
%3 = load i64, i64* %__n.addr, align 8
%add.ptr = getelementptr inbounds i8*, i8** %2, i64 %3
ret i8** %add.ptr
}
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #2
; Function Attrs: nounwind readonly
declare dso_local i64 @strlen(i8*) #3
declare dso_local void @printLine(i8*) #4
; Function Attrs: noinline optnone uwtable
define dso_local void @_ZN64CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memcpy_7211goodG2BSinkESt6vectorIPcSaIS1_EE(%"class.std::vector"* %dataVector) #0 {
entry:
%data = alloca i8*, align 8
%source = alloca [11 x i8], align 1
%call = call nonnull align 8 dereferenceable(8) i8** @_ZNSt6vectorIPcSaIS0_EEixEm(%"class.std::vector"* %dataVector, i64 2) #5
%0 = load i8*, i8** %call, align 8
store i8* %0, i8** %data, align 8
%1 = bitcast [11 x i8]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %1, i8* align 1 getelementptr inbounds ([11 x i8], [11 x i8]* @__const._ZN64CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memcpy_7211goodG2BSinkESt6vectorIPcSaIS1_EE.source, i32 0, i32 0), i64 11, i1 false)
%2 = load i8*, i8** %data, align 8
%arraydecay = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%arraydecay1 = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%call2 = call i64 @strlen(i8* %arraydecay1) #6
%add = add i64 %call2, 1
%mul = mul i64 %add, 1
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %2, i8* align 1 %arraydecay, i64 %mul, i1 false)
%3 = load i8*, i8** %data, align 8
call void @printLine(i8* %3)
ret void
}
attributes #0 = { noinline 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" }
attributes #1 = { 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" }
attributes #2 = { argmemonly nounwind willreturn }
attributes #3 = { nounwind readonly "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #4 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #5 = { nounwind }
attributes #6 = { nounwind readonly }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_30b = constant [21 x i8] c"Benign, fixed string\00"
@global_var_3e0 = local_unnamed_addr global i32 0
@global_var_410 = local_unnamed_addr global i32 0
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
ret i64 40, !insn.addr !1
}
define i64 @function_31() local_unnamed_addr {
dec_label_pc_31:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !2
%.pre-phi2.reg2mem = alloca i64*, !insn.addr !2
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = load i64, i64* %0
%4 = load i64, i64* %0
%5 = mul i64 %4, 16, !insn.addr !2
%6 = sub i64 %3, %5, !insn.addr !3
%7 = add i64 %6, 15, !insn.addr !4
%8 = and i64 %7, -16, !insn.addr !5
%9 = add i64 %2, -40, !insn.addr !6
%10 = inttoptr i64 %9 to i64*, !insn.addr !6
store i64 %8, i64* %10, align 8, !insn.addr !6
%11 = add i64 %6, -17, !insn.addr !7
%12 = and i64 %11, -16, !insn.addr !8
%13 = add i64 %2, -32, !insn.addr !9
%14 = inttoptr i64 %13 to i64*, !insn.addr !9
store i64 %12, i64* %14, align 8, !insn.addr !9
%15 = load i32, i32* @global_var_3e0, align 4, !insn.addr !10
%16 = icmp eq i32 %15, 0, !insn.addr !11
br i1 %16, label %dec_label_pc_31.dec_label_pc_98_crit_edge, label %dec_label_pc_89, !insn.addr !12
dec_label_pc_31.dec_label_pc_98_crit_edge: ; preds = %dec_label_pc_31
%.pre = add i64 %2, -48, !insn.addr !13
%.pre1 = inttoptr i64 %.pre to i64*, !insn.addr !13
store i64* %.pre1, i64** %.pre-phi2.reg2mem
br label %dec_label_pc_98
dec_label_pc_89: ; preds = %dec_label_pc_31
%17 = load i64, i64* %10, align 8, !insn.addr !14
%18 = add i64 %2, -48
%19 = inttoptr i64 %18 to i64*
store i64 %17, i64* %19, align 8, !insn.addr !15
%20 = inttoptr i64 %17 to i8*, !insn.addr !16
store i8 0, i8* %20, align 1, !insn.addr !16
store i64* %19, i64** %.pre-phi2.reg2mem, !insn.addr !16
br label %dec_label_pc_98, !insn.addr !16
dec_label_pc_98: ; preds = %dec_label_pc_31.dec_label_pc_98_crit_edge, %dec_label_pc_89
%.pre-phi2.reload = load i64*, i64** %.pre-phi2.reg2mem
%21 = add i64 %2, -19, !insn.addr !17
%22 = inttoptr i64 %21 to i64*, !insn.addr !17
store i64 4702111234474983745, i64* %22, align 8, !insn.addr !17
%23 = add i64 %2, -11, !insn.addr !18
%24 = inttoptr i64 %23 to i16*, !insn.addr !18
store i16 16705, i16* %24, align 2, !insn.addr !18
%25 = add i64 %2, -9, !insn.addr !19
%26 = inttoptr i64 %25 to i8*, !insn.addr !19
store i8 0, i8* %26, align 1, !insn.addr !19
%27 = call i64 @strlen(i64 %21, i64 %1, i128 9, i64 16), !insn.addr !20
%28 = add i64 %27, 1, !insn.addr !21
%29 = load i64, i64* %.pre-phi2.reload, align 8, !insn.addr !13
%30 = call i64 @memmove(i64 %29, i64 %21, i64 %28, i64 %21), !insn.addr !22
%31 = load i64, i64* %.pre-phi2.reload, align 8, !insn.addr !23
%32 = call i64 @printLine(i64 %31, i64 %21, i64 %28, i64 %21), !insn.addr !24
%33 = add i64 %2, -8, !insn.addr !25
%34 = inttoptr i64 %33 to i64*, !insn.addr !25
%35 = load i64, i64* %34, align 8, !insn.addr !25
%36 = call i64 @__readfsqword(i64 40), !insn.addr !26
%37 = icmp eq i64 %35, %36, !insn.addr !26
store i64 0, i64* %rax.0.reg2mem, !insn.addr !27
br i1 %37, label %dec_label_pc_f4, label %dec_label_pc_ef, !insn.addr !27
dec_label_pc_ef: ; preds = %dec_label_pc_98
%38 = call i64 @__stack_chk_fail(), !insn.addr !28
store i64 %38, i64* %rax.0.reg2mem, !insn.addr !28
br label %dec_label_pc_f4, !insn.addr !28
dec_label_pc_f4: ; preds = %dec_label_pc_ef, %dec_label_pc_98
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !29
}
define i64 @goodG2B1() local_unnamed_addr {
dec_label_pc_f6:
%rax.0.reg2mem = alloca i64, !insn.addr !30
%stack_var_-27 = alloca i64, align 8
%stack_var_-56 = alloca i8*, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !31
%1 = load i32, i32* @global_var_410, align 4, !insn.addr !32
%2 = icmp eq i32 %1, 0, !insn.addr !33
br i1 %2, label %dec_label_pc_18d, label %dec_label_pc_17f, !insn.addr !34
dec_label_pc_17f: ; preds = %dec_label_pc_f6
%3 = call i64 @printLine(i64 ptrtoint ([21 x i8]* @global_var_30b to i64), i64 16, i64 9, i64 16), !insn.addr !35
br label %dec_label_pc_19c, !insn.addr !36
dec_label_pc_18d: ; preds = %dec_label_pc_f6
%4 = ptrtoint i8** %stack_var_-56 to i64, !insn.addr !37
%5 = add i64 %4, -49, !insn.addr !38
%6 = and i64 %5, -16, !insn.addr !39
%7 = inttoptr i64 %6 to i8*, !insn.addr !40
%8 = bitcast i8** %stack_var_-56 to i64*
store i64 %6, i64* %8, align 8
store i8 0, i8* %7, align 16, !insn.addr !41
br label %dec_label_pc_19c, !insn.addr !41
dec_label_pc_19c: ; preds = %dec_label_pc_18d, %dec_label_pc_17f
store i64 4702111234474983745, i64* %stack_var_-27, align 8, !insn.addr !42
%9 = ptrtoint i64* %stack_var_-27 to i64, !insn.addr !43
%10 = call i64 @strlen(i64 %9, i64 16, i128 9, i64 16), !insn.addr !44
%11 = add i64 %10, 1, !insn.addr !45
%12 = load i8*, i8** %stack_var_-56, align 8, !insn.addr !46
%13 = ptrtoint i8* %12 to i64, !insn.addr !46
%14 = call i64 @memmove(i64 %13, i64 %9, i64 %11, i64 %9), !insn.addr !47
%15 = load i8*, i8** %stack_var_-56, align 8, !insn.addr !48
%16 = ptrtoint i8* %15 to i64, !insn.addr !48
%17 = call i64 @printLine(i64 %16, i64 %9, i64 %11, i64 %9), !insn.addr !49
%18 = call i64 @__readfsqword(i64 40), !insn.addr !50
%19 = icmp eq i64 %0, %18, !insn.addr !50
store i64 0, i64* %rax.0.reg2mem, !insn.addr !51
br i1 %19, label %dec_label_pc_1f8, label %dec_label_pc_1f3, !insn.addr !51
dec_label_pc_1f3: ; preds = %dec_label_pc_19c
%20 = call i64 @__stack_chk_fail(), !insn.addr !52
store i64 %20, i64* %rax.0.reg2mem, !insn.addr !52
br label %dec_label_pc_1f8, !insn.addr !52
dec_label_pc_1f8: ; preds = %dec_label_pc_1f3, %dec_label_pc_19c
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !53
}
define i64 @goodG2B2() local_unnamed_addr {
dec_label_pc_1fa:
%rax.0.reg2mem = alloca i64, !insn.addr !54
%stack_var_-27 = alloca i64, align 8
%stack_var_-56 = alloca i8*, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !55
%1 = load i32, i32* @global_var_3e0, align 4, !insn.addr !56
%2 = icmp eq i32 %1, 0, !insn.addr !57
br i1 %2, label %dec_label_pc_292, label %dec_label_pc_283, !insn.addr !58
dec_label_pc_283: ; preds = %dec_label_pc_1fa
%3 = ptrtoint i8** %stack_var_-56 to i64, !insn.addr !59
%4 = add i64 %3, -49, !insn.addr !60
%5 = and i64 %4, -16, !insn.addr !61
%6 = inttoptr i64 %5 to i8*, !insn.addr !62
%7 = bitcast i8** %stack_var_-56 to i64*
store i64 %5, i64* %7, align 8
store i8 0, i8* %6, align 16, !insn.addr !63
br label %dec_label_pc_292, !insn.addr !63
dec_label_pc_292: ; preds = %dec_label_pc_283, %dec_label_pc_1fa
store i64 4702111234474983745, i64* %stack_var_-27, align 8, !insn.addr !64
%8 = ptrtoint i64* %stack_var_-27 to i64, !insn.addr !65
%9 = call i64 @strlen(i64 %8, i64 16, i128 9, i64 16), !insn.addr !66
%10 = add i64 %9, 1, !insn.addr !67
%11 = load i8*, i8** %stack_var_-56, align 8, !insn.addr !68
%12 = ptrtoint i8* %11 to i64, !insn.addr !68
%13 = call i64 @memmove(i64 %12, i64 %8, i64 %10, i64 %8), !insn.addr !69
%14 = load i8*, i8** %stack_var_-56, align 8, !insn.addr !70
%15 = ptrtoint i8* %14 to i64, !insn.addr !70
%16 = call i64 @printLine(i64 %15, i64 %8, i64 %10, i64 %8), !insn.addr !71
%17 = call i64 @__readfsqword(i64 40), !insn.addr !72
%18 = icmp eq i64 %0, %17, !insn.addr !72
store i64 0, i64* %rax.0.reg2mem, !insn.addr !73
br i1 %18, label %dec_label_pc_2ee, label %dec_label_pc_2e9, !insn.addr !73
dec_label_pc_2e9: ; preds = %dec_label_pc_292
%19 = call i64 @__stack_chk_fail(), !insn.addr !74
store i64 %19, i64* %rax.0.reg2mem, !insn.addr !74
br label %dec_label_pc_2ee, !insn.addr !74
dec_label_pc_2ee: ; preds = %dec_label_pc_2e9, %dec_label_pc_292
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !75
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memmove_10_good() local_unnamed_addr {
dec_label_pc_2f0:
%0 = call i64 @goodG2B1(), !insn.addr !76
%1 = call i64 @goodG2B2(), !insn.addr !77
ret i64 %1, !insn.addr !78
}
declare i64 @strlen(i64, i64, i128, i64) local_unnamed_addr
declare i64 @memmove(i64, i64, i64, i64) local_unnamed_addr
declare i64 @printLine(i64, i64, i64, i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 8}
!1 = !{i64 32}
!2 = !{i64 49}
!3 = !{i64 53}
!4 = !{i64 59}
!5 = !{i64 63}
!6 = !{i64 71}
!7 = !{i64 111}
!8 = !{i64 115}
!9 = !{i64 123}
!10 = !{i64 127}
!11 = !{i64 133}
!12 = !{i64 135}
!13 = !{i64 196}
!14 = !{i64 137}
!15 = !{i64 141}
!16 = !{i64 149}
!17 = !{i64 162}
!18 = !{i64 166}
!19 = !{i64 172}
!20 = !{i64 183}
!21 = !{i64 188}
!22 = !{i64 206}
!23 = !{i64 211}
!24 = !{i64 218}
!25 = !{i64 224}
!26 = !{i64 228}
!27 = !{i64 237}
!28 = !{i64 239}
!29 = !{i64 245}
!30 = !{i64 246}
!31 = !{i64 254}
!32 = !{i64 373}
!33 = !{i64 379}
!34 = !{i64 381}
!35 = !{i64 390}
!36 = !{i64 395}
!37 = !{i64 250}
!38 = !{i64 357}
!39 = !{i64 361}
!40 = !{i64 369}
!41 = !{i64 409}
!42 = !{i64 422}
!43 = !{i64 440}
!44 = !{i64 443}
!45 = !{i64 448}
!46 = !{i64 456}
!47 = !{i64 466}
!48 = !{i64 471}
!49 = !{i64 478}
!50 = !{i64 488}
!51 = !{i64 497}
!52 = !{i64 499}
!53 = !{i64 505}
!54 = !{i64 506}
!55 = !{i64 514}
!56 = !{i64 633}
!57 = !{i64 639}
!58 = !{i64 641}
!59 = !{i64 510}
!60 = !{i64 617}
!61 = !{i64 621}
!62 = !{i64 629}
!63 = !{i64 655}
!64 = !{i64 668}
!65 = !{i64 686}
!66 = !{i64 689}
!67 = !{i64 694}
!68 = !{i64 702}
!69 = !{i64 712}
!70 = !{i64 717}
!71 = !{i64 724}
!72 = !{i64 734}
!73 = !{i64 743}
!74 = !{i64 745}
!75 = !{i64 751}
!76 = !{i64 761}
!77 = !{i64 771}
!78 = !{i64 778}
### Assistant: @globalTrue = external dso_local global i32, align 4
@__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memmove_10_bad.source = private unnamed_addr constant [11 x i8] c"AAAAAAAAAA\00", align 1
@globalFalse = external dso_local global i32, align 4
@.str = private unnamed_addr constant [21 x i8] c"Benign, fixed string\00", align 1
@__const.goodG2B1.source = private unnamed_addr constant [11 x i8] c"AAAAAAAAAA\00", align 1
@__const.goodG2B2.source = private unnamed_addr constant [11 x i8] c"AAAAAAAAAA\00", align 1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memmove_10_bad() #0 {
entry:
%data = alloca i8*, align 8
%dataBadBuffer = alloca i8*, align 8
%dataGoodBuffer = alloca i8*, align 8
%source = alloca [11 x i8], align 1
%0 = alloca i8, i64 10, align 16
store i8* %0, i8** %dataBadBuffer, align 8
%1 = alloca i8, i64 11, align 16
store i8* %1, i8** %dataGoodBuffer, align 8
%2 = load i32, i32* @globalTrue, align 4
%tobool = icmp ne i32 %2, 0
br i1 %tobool, label %if.then, label %if.end
if.then: ; preds = %entry
%3 = load i8*, i8** %dataBadBuffer, align 8
store i8* %3, i8** %data, align 8
%4 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %4, i64 0
store i8 0, i8* %arrayidx, align 1
br label %if.end
if.end: ; preds = %if.then, %entry
%5 = bitcast [11 x i8]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %5, i8* align 1 getelementptr inbounds ([11 x i8], [11 x i8]* @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memmove_10_bad.source, i32 0, i32 0), i64 11, i1 false)
%6 = load i8*, i8** %data, align 8
%arraydecay = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%arraydecay1 = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%call = call i64 @strlen(i8* %arraydecay1) #4
%add = add i64 %call, 1
%mul = mul i64 %add, 1
call void @llvm.memmove.p0i8.p0i8.i64(i8* align 1 %6, i8* align 1 %arraydecay, i64 %mul, i1 false)
%7 = load i8*, i8** %data, align 8
call void @printLine(i8* %7)
ret void
}
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #1
; Function Attrs: nounwind readonly
declare dso_local i64 @strlen(i8*) #2
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memmove.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i1 immarg) #1
declare dso_local void @printLine(i8*) #3
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_char_alloca_memmove_10_good() #0 {
entry:
call void @goodG2B1()
call void @goodG2B2()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B1() #0 {
entry:
%data = alloca i8*, align 8
%dataBadBuffer = alloca i8*, align 8
%dataGoodBuffer = alloca i8*, align 8
%source = alloca [11 x i8], align 1
%0 = alloca i8, i64 10, align 16
store i8* %0, i8** %dataBadBuffer, align 8
%1 = alloca i8, i64 11, align 16
store i8* %1, i8** %dataGoodBuffer, align 8
%2 = load i32, i32* @globalFalse, align 4
%tobool = icmp ne i32 %2, 0
br i1 %tobool, label %if.then, label %if.else
if.then: ; preds = %entry
call void @printLine(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
br label %if.end
if.else: ; preds = %entry
%3 = load i8*, i8** %dataGoodBuffer, align 8
store i8* %3, i8** %data, align 8
%4 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %4, i64 0
store i8 0, i8* %arrayidx, align 1
br label %if.end
if.end: ; preds = %if.else, %if.then
%5 = bitcast [11 x i8]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %5, i8* align 1 getelementptr inbounds ([11 x i8], [11 x i8]* @__const.goodG2B1.source, i32 0, i32 0), i64 11, i1 false)
%6 = load i8*, i8** %data, align 8
%arraydecay = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%arraydecay1 = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%call = call i64 @strlen(i8* %arraydecay1) #4
%add = add i64 %call, 1
%mul = mul i64 %add, 1
call void @llvm.memmove.p0i8.p0i8.i64(i8* align 1 %6, i8* align 1 %arraydecay, i64 %mul, i1 false)
%7 = load i8*, i8** %data, align 8
call void @printLine(i8* %7)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B2() #0 {
entry:
%data = alloca i8*, align 8
%dataBadBuffer = alloca i8*, align 8
%dataGoodBuffer = alloca i8*, align 8
%source = alloca [11 x i8], align 1
%0 = alloca i8, i64 10, align 16
store i8* %0, i8** %dataBadBuffer, align 8
%1 = alloca i8, i64 11, align 16
store i8* %1, i8** %dataGoodBuffer, align 8
%2 = load i32, i32* @globalTrue, align 4
%tobool = icmp ne i32 %2, 0
br i1 %tobool, label %if.then, label %if.end
if.then: ; preds = %entry
%3 = load i8*, i8** %dataGoodBuffer, align 8
store i8* %3, i8** %data, align 8
%4 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %4, i64 0
store i8 0, i8* %arrayidx, align 1
br label %if.end
if.end: ; preds = %if.then, %entry
%5 = bitcast [11 x i8]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %5, i8* align 1 getelementptr inbounds ([11 x i8], [11 x i8]* @__const.goodG2B2.source, i32 0, i32 0), i64 11, i1 false)
%6 = load i8*, i8** %data, align 8
%arraydecay = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%arraydecay1 = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%call = call i64 @strlen(i8* %arraydecay1) #4
%add = add i64 %call, 1
%mul = mul i64 %add, 1
call void @llvm.memmove.p0i8.p0i8.i64(i8* align 1 %6, i8* align 1 %arraydecay, i64 %mul, i1 false)
%7 = load i8*, i8** %data, align 8
call void @printLine(i8* %7)
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" }
attributes #1 = { argmemonly nounwind willreturn }
attributes #2 = { nounwind readonly "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #3 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #4 = { nounwind readonly }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
define i64 @_GLOBAL_OFFSET_TABLE_.1(i64 %arg1) local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memmove_53c_badSink(i64 %arg1), !insn.addr !0
ret i64 %0, !insn.addr !1
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memmove_53b_goodG2BSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_1b:
%0 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memmove_53c_goodG2BSink(i64 %arg1), !insn.addr !2
ret i64 %0, !insn.addr !3
}
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memmove_53c_badSink(i64) local_unnamed_addr
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memmove_53c_goodG2BSink(i64) local_unnamed_addr
!0 = !{i64 19}
!1 = !{i64 26}
!2 = !{i64 46}
!3 = !{i64 53}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memmove_53b_badSink(i32* %data) #0 {
entry:
%data.addr = alloca i32*, align 8
store i32* %data, i32** %data.addr, align 8
%0 = load i32*, i32** %data.addr, align 8
call void @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memmove_53c_badSink(i32* %0)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memmove_53c_badSink(i32*) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memmove_53b_goodG2BSink(i32* %data) #0 {
entry:
%data.addr = alloca i32*, align 8
store i32* %data, i32** %data.addr, align 8
%0 = load i32*, i32** %data.addr, align 8
call void @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memmove_53c_goodG2BSink(i32* %0)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memmove_53c_goodG2BSink(i32*) #1
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" }
attributes #1 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_200 = constant [21 x i8] c"Benign, fixed string\00"
@global_var_1e0 = constant [32 x i8] c"0123456789abcdef0123456789abcde\00"
@global_var_2d8 = local_unnamed_addr global i32 0
define i64 @_GLOBAL_OFFSET_TABLE_.1(i64 %arg1, i64 %arg2, i64 %arg3, i64 %arg4, i64 %arg5) local_unnamed_addr {
dec_label_pc_0:
%rax.0.reg2mem = alloca i64, !insn.addr !0
%0 = call i64 @__readfsqword(i64 40), !insn.addr !1
%1 = load i32, i32* @global_var_2d8, align 4, !insn.addr !2
%2 = icmp eq i32 %1, 5, !insn.addr !3
%3 = icmp eq i1 %2, false, !insn.addr !4
br i1 %3, label %dec_label_pc_90, label %dec_label_pc_22, !insn.addr !4
dec_label_pc_22: ; preds = %dec_label_pc_0
%4 = zext i32 %1 to i64, !insn.addr !2
ret i64 %4, !insn.addr !4
dec_label_pc_90: ; preds = %dec_label_pc_0
%5 = call i64 @__readfsqword(i64 40), !insn.addr !5
%6 = icmp eq i64 %0, %5, !insn.addr !5
store i64 0, i64* %rax.0.reg2mem, !insn.addr !6
br i1 %6, label %dec_label_pc_a5, label %dec_label_pc_a0, !insn.addr !6
dec_label_pc_a0: ; preds = %dec_label_pc_90
%7 = call i64 @__stack_chk_fail(), !insn.addr !7
store i64 %7, i64* %rax.0.reg2mem, !insn.addr !7
br label %dec_label_pc_a5, !insn.addr !7
dec_label_pc_a5: ; preds = %dec_label_pc_a0, %dec_label_pc_90
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !8
}
define i64 @good1() local_unnamed_addr {
dec_label_pc_a7:
%rax.0.reg2mem = alloca i64, !insn.addr !9
%stack_var_-56 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !10
%1 = load i32, i32* @global_var_2d8, align 4, !insn.addr !11
%2 = icmp eq i32 %1, 5, !insn.addr !12
br i1 %2, label %dec_label_pc_d7, label %dec_label_pc_c9, !insn.addr !13
dec_label_pc_c9: ; preds = %dec_label_pc_a7
%3 = call i64 @printLine(i64 ptrtoint ([21 x i8]* @global_var_200 to i64)), !insn.addr !14
br label %dec_label_pc_126, !insn.addr !15
dec_label_pc_d7: ; preds = %dec_label_pc_a7
%4 = call i64 @printLine(i64 ptrtoint ([32 x i8]* @global_var_1e0 to i64)), !insn.addr !16
store i64 3978425819141910832, i64* %stack_var_-56, align 8, !insn.addr !17
%5 = ptrtoint i64* %stack_var_-56 to i64, !insn.addr !18
%6 = call i64 @printLine(i64 %5), !insn.addr !19
%7 = call i64 @printLine(i64 ptrtoint ([32 x i8]* @global_var_1e0 to i64)), !insn.addr !20
br label %dec_label_pc_126, !insn.addr !20
dec_label_pc_126: ; preds = %dec_label_pc_d7, %dec_label_pc_c9
%8 = call i64 @__readfsqword(i64 40), !insn.addr !21
%9 = icmp eq i64 %0, %8, !insn.addr !21
store i64 0, i64* %rax.0.reg2mem, !insn.addr !22
br i1 %9, label %dec_label_pc_13b, label %dec_label_pc_136, !insn.addr !22
dec_label_pc_136: ; preds = %dec_label_pc_126
%10 = call i64 @__stack_chk_fail(), !insn.addr !23
store i64 %10, i64* %rax.0.reg2mem, !insn.addr !23
br label %dec_label_pc_13b, !insn.addr !23
dec_label_pc_13b: ; preds = %dec_label_pc_136, %dec_label_pc_126
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !24
}
define i64 @good2() local_unnamed_addr {
dec_label_pc_13d:
%rax.0.reg2mem = alloca i64, !insn.addr !25
%stack_var_-56 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !26
%1 = load i32, i32* @global_var_2d8, align 4, !insn.addr !27
%2 = icmp eq i32 %1, 5, !insn.addr !28
%3 = icmp eq i1 %2, false, !insn.addr !29
br i1 %3, label %dec_label_pc_1ae, label %dec_label_pc_15f, !insn.addr !29
dec_label_pc_15f: ; preds = %dec_label_pc_13d
%4 = call i64 @printLine(i64 ptrtoint ([32 x i8]* @global_var_1e0 to i64)), !insn.addr !30
store i64 3978425819141910832, i64* %stack_var_-56, align 8, !insn.addr !31
%5 = ptrtoint i64* %stack_var_-56 to i64, !insn.addr !32
%6 = call i64 @printLine(i64 %5), !insn.addr !33
%7 = call i64 @printLine(i64 ptrtoint ([32 x i8]* @global_var_1e0 to i64)), !insn.addr !34
br label %dec_label_pc_1ae, !insn.addr !34
dec_label_pc_1ae: ; preds = %dec_label_pc_15f, %dec_label_pc_13d
%8 = call i64 @__readfsqword(i64 40), !insn.addr !35
%9 = icmp eq i64 %0, %8, !insn.addr !35
store i64 0, i64* %rax.0.reg2mem, !insn.addr !36
br i1 %9, label %dec_label_pc_1c3, label %dec_label_pc_1be, !insn.addr !36
dec_label_pc_1be: ; preds = %dec_label_pc_1ae
%10 = call i64 @__stack_chk_fail(), !insn.addr !37
store i64 %10, i64* %rax.0.reg2mem, !insn.addr !37
br label %dec_label_pc_1c3, !insn.addr !37
dec_label_pc_1c3: ; preds = %dec_label_pc_1be, %dec_label_pc_1ae
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !38
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__char_type_overrun_memmove_13_good() local_unnamed_addr {
dec_label_pc_1c5:
%0 = call i64 @good1(), !insn.addr !39
%1 = call i64 @good2(), !insn.addr !40
ret i64 %1, !insn.addr !41
}
declare i64 @printLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 0}
!1 = !{i64 8}
!2 = !{i64 23}
!3 = !{i64 29}
!4 = !{i64 32}
!5 = !{i64 149}
!6 = !{i64 158}
!7 = !{i64 160}
!8 = !{i64 166}
!9 = !{i64 167}
!10 = !{i64 175}
!11 = !{i64 190}
!12 = !{i64 196}
!13 = !{i64 199}
!14 = !{i64 208}
!15 = !{i64 213}
!16 = !{i64 233}
!17 = !{i64 258}
!18 = !{i64 274}
!19 = !{i64 277}
!20 = !{i64 289}
!21 = !{i64 299}
!22 = !{i64 308}
!23 = !{i64 310}
!24 = !{i64 316}
!25 = !{i64 317}
!26 = !{i64 325}
!27 = !{i64 340}
!28 = !{i64 346}
!29 = !{i64 349}
!30 = !{i64 369}
!31 = !{i64 394}
!32 = !{i64 410}
!33 = !{i64 413}
!34 = !{i64 425}
!35 = !{i64 435}
!36 = !{i64 444}
!37 = !{i64 446}
!38 = !{i64 452}
!39 = !{i64 462}
!40 = !{i64 472}
!41 = !{i64 479}
### Assistant: %struct._charVoid = type { [16 x i8], i8*, i8* }
@GLOBAL_CONST_FIVE = external dso_local constant i32, align 4
@.str = private unnamed_addr constant [32 x i8] c"0123456789abcdef0123456789abcde\00", align 1
@.str.1 = private unnamed_addr constant [21 x i8] c"Benign, fixed string\00", align 1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__char_type_overrun_memmove_13_bad() #0 {
entry:
%structCharVoid = alloca %struct._charVoid, align 8
%0 = load i32, i32* @GLOBAL_CONST_FIVE, align 4
%cmp = icmp eq i32 %0, 5
br i1 %cmp, label %if.then, label %if.end
if.then: ; preds = %entry
%voidSecond = getelementptr inbounds %struct._charVoid, %struct._charVoid* %structCharVoid, i32 0, i32 1
store i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8** %voidSecond, align 8
%voidSecond1 = getelementptr inbounds %struct._charVoid, %struct._charVoid* %structCharVoid, i32 0, i32 1
%1 = load i8*, i8** %voidSecond1, align 8
call void @printLine(i8* %1)
%charFirst = getelementptr inbounds %struct._charVoid, %struct._charVoid* %structCharVoid, i32 0, i32 0
%arraydecay = getelementptr inbounds [16 x i8], [16 x i8]* %charFirst, i64 0, i64 0
call void @llvm.memmove.p0i8.p0i8.i64(i8* align 8 %arraydecay, i8* align 1 getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i64 32, i1 false)
%charFirst2 = getelementptr inbounds %struct._charVoid, %struct._charVoid* %structCharVoid, i32 0, i32 0
%arrayidx = getelementptr inbounds [16 x i8], [16 x i8]* %charFirst2, i64 0, i64 15
store i8 0, i8* %arrayidx, align 1
%charFirst3 = getelementptr inbounds %struct._charVoid, %struct._charVoid* %structCharVoid, i32 0, i32 0
%arraydecay4 = getelementptr inbounds [16 x i8], [16 x i8]* %charFirst3, i64 0, i64 0
call void @printLine(i8* %arraydecay4)
%voidSecond5 = getelementptr inbounds %struct._charVoid, %struct._charVoid* %structCharVoid, i32 0, i32 1
%2 = load i8*, i8** %voidSecond5, align 8
call void @printLine(i8* %2)
br label %if.end
if.end: ; preds = %if.then, %entry
ret void
}
declare dso_local void @printLine(i8*) #1
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memmove.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i1 immarg) #2
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__char_type_overrun_memmove_13_good() #0 {
entry:
call void @good1()
call void @good2()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @good1() #0 {
entry:
%structCharVoid = alloca %struct._charVoid, align 8
%0 = load i32, i32* @GLOBAL_CONST_FIVE, align 4
%cmp = icmp ne i32 %0, 5
br i1 %cmp, label %if.then, label %if.else
if.then: ; preds = %entry
call void @printLine(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
br label %if.end
if.else: ; preds = %entry
%voidSecond = getelementptr inbounds %struct._charVoid, %struct._charVoid* %structCharVoid, i32 0, i32 1
store i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8** %voidSecond, align 8
%voidSecond1 = getelementptr inbounds %struct._charVoid, %struct._charVoid* %structCharVoid, i32 0, i32 1
%1 = load i8*, i8** %voidSecond1, align 8
call void @printLine(i8* %1)
%charFirst = getelementptr inbounds %struct._charVoid, %struct._charVoid* %structCharVoid, i32 0, i32 0
%arraydecay = getelementptr inbounds [16 x i8], [16 x i8]* %charFirst, i64 0, i64 0
call void @llvm.memmove.p0i8.p0i8.i64(i8* align 8 %arraydecay, i8* align 1 getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i64 16, i1 false)
%charFirst2 = getelementptr inbounds %struct._charVoid, %struct._charVoid* %structCharVoid, i32 0, i32 0
%arrayidx = getelementptr inbounds [16 x i8], [16 x i8]* %charFirst2, i64 0, i64 15
store i8 0, i8* %arrayidx, align 1
%charFirst3 = getelementptr inbounds %struct._charVoid, %struct._charVoid* %structCharVoid, i32 0, i32 0
%arraydecay4 = getelementptr inbounds [16 x i8], [16 x i8]* %charFirst3, i64 0, i64 0
call void @printLine(i8* %arraydecay4)
%voidSecond5 = getelementptr inbounds %struct._charVoid, %struct._charVoid* %structCharVoid, i32 0, i32 1
%2 = load i8*, i8** %voidSecond5, align 8
call void @printLine(i8* %2)
br label %if.end
if.end: ; preds = %if.else, %if.then
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @good2() #0 {
entry:
%structCharVoid = alloca %struct._charVoid, align 8
%0 = load i32, i32* @GLOBAL_CONST_FIVE, align 4
%cmp = icmp eq i32 %0, 5
br i1 %cmp, label %if.then, label %if.end
if.then: ; preds = %entry
%voidSecond = getelementptr inbounds %struct._charVoid, %struct._charVoid* %structCharVoid, i32 0, i32 1
store i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8** %voidSecond, align 8
%voidSecond1 = getelementptr inbounds %struct._charVoid, %struct._charVoid* %structCharVoid, i32 0, i32 1
%1 = load i8*, i8** %voidSecond1, align 8
call void @printLine(i8* %1)
%charFirst = getelementptr inbounds %struct._charVoid, %struct._charVoid* %structCharVoid, i32 0, i32 0
%arraydecay = getelementptr inbounds [16 x i8], [16 x i8]* %charFirst, i64 0, i64 0
call void @llvm.memmove.p0i8.p0i8.i64(i8* align 8 %arraydecay, i8* align 1 getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i64 16, i1 false)
%charFirst2 = getelementptr inbounds %struct._charVoid, %struct._charVoid* %structCharVoid, i32 0, i32 0
%arrayidx = getelementptr inbounds [16 x i8], [16 x i8]* %charFirst2, i64 0, i64 15
store i8 0, i8* %arrayidx, align 1
%charFirst3 = getelementptr inbounds %struct._charVoid, %struct._charVoid* %structCharVoid, i32 0, i32 0
%arraydecay4 = getelementptr inbounds [16 x i8], [16 x i8]* %charFirst3, i64 0, i64 0
call void @printLine(i8* %arraydecay4)
%voidSecond5 = getelementptr inbounds %struct._charVoid, %struct._charVoid* %structCharVoid, i32 0, i32 1
%2 = load i8*, i8** %voidSecond5, align 8
call void @printLine(i8* %2)
br label %if.end
if.end: ; preds = %if.then, %entry
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" }
attributes #1 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #2 = { argmemonly nounwind willreturn }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
ret i64 15, !insn.addr !1
}
define i64 @function_30(i64 %arg1, i64 %arg2, i64 %arg3, i64 %arg4) local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !2
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = load i64, i64* %0
%4 = load i64, i64* %0
%5 = load i64, i64* %0
%6 = trunc i64 %4 to i8
%7 = udiv i64 %3, 256, !insn.addr !2
%8 = trunc i64 %7 to i8, !insn.addr !2
%9 = add i8 %6, %8, !insn.addr !2
%10 = inttoptr i64 %arg3 to i8*, !insn.addr !2
store i8 %9, i8* %10, align 1, !insn.addr !2
%11 = udiv i64 %5, %arg4
%12 = mul i64 %11, 16, !insn.addr !3
%13 = add i64 %2, 15, !insn.addr !4
%14 = sub i64 %13, %12, !insn.addr !5
%15 = and i64 %14, -16, !insn.addr !6
%16 = add i64 %1, -16, !insn.addr !7
%17 = inttoptr i64 %16 to i64*, !insn.addr !7
store i64 %15, i64* %17, align 8, !insn.addr !7
%18 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE131_loop_53b_badSink(i64 %15), !insn.addr !8
%19 = add i64 %1, -8, !insn.addr !9
%20 = inttoptr i64 %19 to i64*, !insn.addr !9
%21 = load i64, i64* %20, align 8, !insn.addr !9
%22 = call i64 @__readfsqword(i64 40), !insn.addr !10
%23 = icmp eq i64 %21, %22, !insn.addr !10
store i64 0, i64* %rax.0.reg2mem, !insn.addr !11
br i1 %23, label %dec_label_pc_74, label %dec_label_pc_6f, !insn.addr !11
dec_label_pc_6f: ; preds = %dec_label_pc_30
%24 = call i64 @__stack_chk_fail(), !insn.addr !12
store i64 %24, i64* %rax.0.reg2mem, !insn.addr !12
br label %dec_label_pc_74, !insn.addr !12
dec_label_pc_74: ; preds = %dec_label_pc_6f, %dec_label_pc_30
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !13
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_76:
%rax.0.reg2mem = alloca i64, !insn.addr !14
%stack_var_-24 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-24 to i64, !insn.addr !15
%1 = call i64 @__readfsqword(i64 40), !insn.addr !16
%2 = add i64 %0, -49, !insn.addr !17
%3 = and i64 %2, -16, !insn.addr !18
store i64 %3, i64* %stack_var_-24, align 8, !insn.addr !19
%4 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE131_loop_53b_goodG2BSink(i64 %3), !insn.addr !20
%5 = call i64 @__readfsqword(i64 40), !insn.addr !21
%6 = icmp eq i64 %1, %5, !insn.addr !21
store i64 0, i64* %rax.0.reg2mem, !insn.addr !22
br i1 %6, label %dec_label_pc_ea, label %dec_label_pc_e5, !insn.addr !22
dec_label_pc_e5: ; preds = %dec_label_pc_76
%7 = call i64 @__stack_chk_fail(), !insn.addr !23
store i64 %7, i64* %rax.0.reg2mem, !insn.addr !23
br label %dec_label_pc_ea, !insn.addr !23
dec_label_pc_ea: ; preds = %dec_label_pc_e5, %dec_label_pc_76
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !24
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE131_loop_53_good() local_unnamed_addr {
dec_label_pc_ec:
%0 = call i64 @goodG2B(), !insn.addr !25
ret i64 %0, !insn.addr !26
}
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE131_loop_53b_badSink(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE131_loop_53b_goodG2BSink(i64) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 8}
!1 = !{i64 36}
!2 = !{i64 48}
!3 = !{i64 57}
!4 = !{i64 61}
!5 = !{i64 67}
!6 = !{i64 71}
!7 = !{i64 79}
!8 = !{i64 90}
!9 = !{i64 96}
!10 = !{i64 100}
!11 = !{i64 109}
!12 = !{i64 111}
!13 = !{i64 117}
!14 = !{i64 118}
!15 = !{i64 122}
!16 = !{i64 126}
!17 = !{i64 185}
!18 = !{i64 189}
!19 = !{i64 197}
!20 = !{i64 208}
!21 = !{i64 218}
!22 = !{i64 227}
!23 = !{i64 229}
!24 = !{i64 235}
!25 = !{i64 245}
!26 = !{i64 252}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE131_loop_53_bad() #0 {
entry:
%data = alloca i32*, align 8
store i32* null, i32** %data, align 8
%0 = alloca i8, i64 10, align 16
%1 = bitcast i8* %0 to i32*
store i32* %1, i32** %data, align 8
%2 = load i32*, i32** %data, align 8
call void @CWE121_Stack_Based_Buffer_Overflow__CWE131_loop_53b_badSink(i32* %2)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE131_loop_53b_badSink(i32*) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE131_loop_53_good() #0 {
entry:
call void @goodG2B()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B() #0 {
entry:
%data = alloca i32*, align 8
store i32* null, i32** %data, align 8
%0 = alloca i8, i64 40, align 16
%1 = bitcast i8* %0 to i32*
store i32* %1, i32** %data, align 8
%2 = load i32*, i32** %data, align 8
call void @CWE121_Stack_Based_Buffer_Overflow__CWE131_loop_53b_goodG2BSink(i32* %2)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE131_loop_53b_goodG2BSink(i32*) #1
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" }
attributes #1 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_270 = local_unnamed_addr constant [11 x i32] %wide-string
@global_var_278 = local_unnamed_addr constant [9 x i32] %wide-string
@global_var_280 = local_unnamed_addr constant [7 x i32] %wide-string
@global_var_288 = local_unnamed_addr constant [5 x i32] %wide-string
@global_var_290 = local_unnamed_addr constant [3 x i32] %wide-string
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
ret i64 70, !insn.addr !1
}
define i64 @function_31() local_unnamed_addr {
dec_label_pc_31:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !2
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = load i64, i64* %0
%4 = load i64, i64* %0
%5 = mul i64 %4, 16, !insn.addr !2
%6 = sub i64 %3, %5, !insn.addr !3
%7 = add i64 %6, 15, !insn.addr !4
%8 = and i64 %7, -16, !insn.addr !5
%9 = add i64 %2, -96, !insn.addr !6
%10 = inttoptr i64 %9 to i64*, !insn.addr !6
store i64 %8, i64* %10, align 8, !insn.addr !6
%11 = add i64 %6, -49, !insn.addr !7
%12 = and i64 %11, -16, !insn.addr !8
%13 = add i64 %2, -88, !insn.addr !9
%14 = inttoptr i64 %13 to i64*, !insn.addr !9
store i64 %12, i64* %14, align 8, !insn.addr !9
%15 = load i64, i64* %10, align 8, !insn.addr !10
%16 = add i64 %2, -80, !insn.addr !11
%17 = inttoptr i64 %16 to i64*, !insn.addr !11
store i64 %15, i64* %17, align 8, !insn.addr !11
%18 = inttoptr i64 %15 to i32*, !insn.addr !12
store i32 0, i32* %18, align 4, !insn.addr !12
%19 = load i64, i64* %17, align 8, !insn.addr !13
%20 = add i64 %2, -104, !insn.addr !14
%21 = inttoptr i64 %20 to i64*, !insn.addr !14
store i64 %19, i64* %21, align 8, !insn.addr !14
%22 = add i64 %2, -72, !insn.addr !15
%23 = inttoptr i64 %22 to i64*, !insn.addr !15
store i64 %19, i64* %23, align 8, !insn.addr !15
%24 = add i64 %2, -64, !insn.addr !16
%25 = inttoptr i64 %24 to i64*, !insn.addr !16
store i64 279172874305, i64* %25, align 8, !insn.addr !16
%26 = add i64 %2, -56, !insn.addr !17
%27 = inttoptr i64 %26 to i64*, !insn.addr !17
store i64 279172874305, i64* %27, align 8, !insn.addr !17
%28 = add i64 %2, -48, !insn.addr !18
%29 = inttoptr i64 %28 to i64*, !insn.addr !18
store i64 279172874305, i64* %29, align 8, !insn.addr !18
%30 = add i64 %2, -40, !insn.addr !19
%31 = inttoptr i64 %30 to i64*, !insn.addr !19
store i64 279172874305, i64* %31, align 8, !insn.addr !19
%32 = add i64 %2, -32, !insn.addr !20
%33 = inttoptr i64 %32 to i64*, !insn.addr !20
store i64 279172874305, i64* %33, align 8, !insn.addr !20
%34 = load i32, i32* inttoptr (i64 664 to i32*), align 8, !insn.addr !21
%35 = add i64 %2, -24, !insn.addr !22
%36 = inttoptr i64 %35 to i32*, !insn.addr !22
store i32 %34, i32* %36, align 4, !insn.addr !22
%37 = call i64 @wcslen(i64 %24, i64 %1), !insn.addr !23
%38 = mul i64 %37, 4, !insn.addr !24
%39 = add i64 %38, 4, !insn.addr !25
%40 = load i64, i64* %23, align 8, !insn.addr !26
%41 = call i64 @memcpy(i64 %40, i64 %24, i64 %39, i64 %24), !insn.addr !27
%42 = load i64, i64* %23, align 8, !insn.addr !28
%43 = call i64 @printWLine(i64 %42), !insn.addr !29
%44 = add i64 %2, -8, !insn.addr !30
%45 = inttoptr i64 %44 to i64*, !insn.addr !30
%46 = load i64, i64* %45, align 8, !insn.addr !30
%47 = call i64 @__readfsqword(i64 40), !insn.addr !31
%48 = icmp eq i64 %46, %47, !insn.addr !31
store i64 0, i64* %rax.0.reg2mem, !insn.addr !32
br i1 %48, label %dec_label_pc_12d, label %dec_label_pc_128, !insn.addr !32
dec_label_pc_128: ; preds = %dec_label_pc_31
%49 = call i64 @__stack_chk_fail(), !insn.addr !33
store i64 %49, i64* %rax.0.reg2mem, !insn.addr !33
br label %dec_label_pc_12d, !insn.addr !33
dec_label_pc_12d: ; preds = %dec_label_pc_128, %dec_label_pc_31
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !34
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_12f:
%rax.0.reg2mem = alloca i64, !insn.addr !35
%stack_var_-72 = alloca i32*, align 8
%stack_var_-120 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-120 to i64, !insn.addr !36
%1 = call i64 @__readfsqword(i64 40), !insn.addr !37
%2 = add i64 %0, -113, !insn.addr !38
%3 = and i64 %2, -16, !insn.addr !39
%4 = inttoptr i64 %3 to i32*, !insn.addr !40
store i32 0, i32* %4, align 16, !insn.addr !40
store i32* inttoptr (i64 279172874305 to i32*), i32** %stack_var_-72, align 8, !insn.addr !41
%5 = ptrtoint i32** %stack_var_-72 to i64, !insn.addr !42
%6 = call i64 @wcslen(i64 %5, i64 16), !insn.addr !43
%7 = mul i64 %6, 4, !insn.addr !44
%8 = add i64 %7, 4, !insn.addr !45
%9 = call i64 @memcpy(i64 %3, i64 %5, i64 %8, i64 %5), !insn.addr !46
%10 = call i64 @printWLine(i64 %3), !insn.addr !47
%11 = call i64 @__readfsqword(i64 40), !insn.addr !48
%12 = icmp eq i64 %1, %11, !insn.addr !48
store i64 0, i64* %rax.0.reg2mem, !insn.addr !49
br i1 %12, label %dec_label_pc_25c, label %dec_label_pc_257, !insn.addr !49
dec_label_pc_257: ; preds = %dec_label_pc_12f
%13 = call i64 @__stack_chk_fail(), !insn.addr !50
store i64 %13, i64* %rax.0.reg2mem, !insn.addr !50
br label %dec_label_pc_25c, !insn.addr !50
dec_label_pc_25c: ; preds = %dec_label_pc_257, %dec_label_pc_12f
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !51
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memcpy_34_good() local_unnamed_addr {
dec_label_pc_25e:
%0 = call i64 @goodG2B(), !insn.addr !52
ret i64 %0, !insn.addr !53
}
declare i64 @wcslen(i64, i64) local_unnamed_addr
declare i64 @memcpy(i64, i64, i64, i64) local_unnamed_addr
declare i64 @printWLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 8}
!1 = !{i64 32}
!2 = !{i64 49}
!3 = !{i64 53}
!4 = !{i64 59}
!5 = !{i64 63}
!6 = !{i64 71}
!7 = !{i64 111}
!8 = !{i64 115}
!9 = !{i64 123}
!10 = !{i64 127}
!11 = !{i64 131}
!12 = !{i64 139}
!13 = !{i64 145}
!14 = !{i64 149}
!15 = !{i64 157}
!16 = !{i64 175}
!17 = !{i64 179}
!18 = !{i64 197}
!19 = !{i64 201}
!20 = !{i64 212}
!21 = !{i64 216}
!22 = !{i64 222}
!23 = !{i64 232}
!24 = !{i64 237}
!25 = !{i64 241}
!26 = !{i64 253}
!27 = !{i64 263}
!28 = !{i64 268}
!29 = !{i64 275}
!30 = !{i64 281}
!31 = !{i64 285}
!32 = !{i64 294}
!33 = !{i64 296}
!34 = !{i64 302}
!35 = !{i64 303}
!36 = !{i64 307}
!37 = !{i64 311}
!38 = !{i64 414}
!39 = !{i64 418}
!40 = !{i64 442}
!41 = !{i64 478}
!42 = !{i64 532}
!43 = !{i64 535}
!44 = !{i64 540}
!45 = !{i64 544}
!46 = !{i64 566}
!47 = !{i64 578}
!48 = !{i64 588}
!49 = !{i64 597}
!50 = !{i64 599}
!51 = !{i64 605}
!52 = !{i64 615}
!53 = !{i64 622}
### Assistant: %union.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memcpy_34_unionType = type { i32* }
@__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memcpy_34_bad.source = private unnamed_addr constant [11 x i32] [i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 0], align 16
@__const.goodG2B.source = private unnamed_addr constant [11 x i32] [i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 0], align 16
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memcpy_34_bad() #0 {
entry:
%data = alloca i32*, align 8
%myUnion = alloca %union.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memcpy_34_unionType, align 8
%dataBadBuffer = alloca i32*, align 8
%dataGoodBuffer = alloca i32*, align 8
%data1 = alloca i32*, align 8
%source = alloca [11 x i32], align 16
%0 = alloca i8, i64 40, align 16
%1 = bitcast i8* %0 to i32*
store i32* %1, i32** %dataBadBuffer, align 8
%2 = alloca i8, i64 44, align 16
%3 = bitcast i8* %2 to i32*
store i32* %3, i32** %dataGoodBuffer, align 8
%4 = load i32*, i32** %dataBadBuffer, align 8
store i32* %4, i32** %data, align 8
%5 = load i32*, i32** %data, align 8
%arrayidx = getelementptr inbounds i32, i32* %5, i64 0
store i32 0, i32* %arrayidx, align 4
%6 = load i32*, i32** %data, align 8
%unionFirst = bitcast %union.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memcpy_34_unionType* %myUnion to i32**
store i32* %6, i32** %unionFirst, align 8
%unionSecond = bitcast %union.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memcpy_34_unionType* %myUnion to i32**
%7 = load i32*, i32** %unionSecond, align 8
store i32* %7, i32** %data1, align 8
%8 = bitcast [11 x i32]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 %8, i8* align 16 bitcast ([11 x i32]* @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memcpy_34_bad.source to i8*), i64 44, i1 false)
%9 = load i32*, i32** %data1, align 8
%10 = bitcast i32* %9 to i8*
%arraydecay = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%11 = bitcast i32* %arraydecay to i8*
%arraydecay2 = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%call = call i64 @wcslen(i32* %arraydecay2) #4
%add = add i64 %call, 1
%mul = mul i64 %add, 4
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 %10, i8* align 16 %11, i64 %mul, i1 false)
%12 = load i32*, i32** %data1, align 8
call void @printWLine(i32* %12)
ret void
}
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #1
; Function Attrs: nounwind readonly
declare dso_local i64 @wcslen(i32*) #2
declare dso_local void @printWLine(i32*) #3
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memcpy_34_good() #0 {
entry:
call void @goodG2B()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B() #0 {
entry:
%data = alloca i32*, align 8
%myUnion = alloca %union.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memcpy_34_unionType, align 8
%dataBadBuffer = alloca i32*, align 8
%dataGoodBuffer = alloca i32*, align 8
%data1 = alloca i32*, align 8
%source = alloca [11 x i32], align 16
%0 = alloca i8, i64 40, align 16
%1 = bitcast i8* %0 to i32*
store i32* %1, i32** %dataBadBuffer, align 8
%2 = alloca i8, i64 44, align 16
%3 = bitcast i8* %2 to i32*
store i32* %3, i32** %dataGoodBuffer, align 8
%4 = load i32*, i32** %dataGoodBuffer, align 8
store i32* %4, i32** %data, align 8
%5 = load i32*, i32** %data, align 8
%arrayidx = getelementptr inbounds i32, i32* %5, i64 0
store i32 0, i32* %arrayidx, align 4
%6 = load i32*, i32** %data, align 8
%unionFirst = bitcast %union.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memcpy_34_unionType* %myUnion to i32**
store i32* %6, i32** %unionFirst, align 8
%unionSecond = bitcast %union.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memcpy_34_unionType* %myUnion to i32**
%7 = load i32*, i32** %unionSecond, align 8
store i32* %7, i32** %data1, align 8
%8 = bitcast [11 x i32]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 %8, i8* align 16 bitcast ([11 x i32]* @__const.goodG2B.source to i8*), i64 44, i1 false)
%9 = load i32*, i32** %data1, align 8
%10 = bitcast i32* %9 to i8*
%arraydecay = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%11 = bitcast i32* %arraydecay to i8*
%arraydecay2 = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%call = call i64 @wcslen(i32* %arraydecay2) #4
%add = add i64 %call, 1
%mul = mul i64 %add, 4
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 %10, i8* align 16 %11, i64 %mul, i1 false)
%12 = load i32*, i32** %data1, align 8
call void @printWLine(i32* %12)
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" }
attributes #1 = { argmemonly nounwind willreturn }
attributes #2 = { nounwind readonly "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #3 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #4 = { nounwind readonly }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_378 = local_unnamed_addr constant [11 x i32] %wide-string
@global_var_380 = local_unnamed_addr constant [9 x i32] %wide-string
@global_var_388 = local_unnamed_addr constant [7 x i32] %wide-string
@global_var_390 = local_unnamed_addr constant [5 x i32] %wide-string
@global_var_398 = local_unnamed_addr constant [3 x i32] %wide-string
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
ret i64 70, !insn.addr !1
}
define i64 @function_31() local_unnamed_addr {
dec_label_pc_31:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !2
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = load i64, i64* %0
%4 = load i64, i64* %0
%5 = mul i64 %4, 16, !insn.addr !2
%6 = sub i64 %3, %5, !insn.addr !3
%7 = add i64 %6, 15, !insn.addr !4
%8 = and i64 %7, -16, !insn.addr !5
%9 = add i64 %2, -88, !insn.addr !6
%10 = inttoptr i64 %9 to i64*, !insn.addr !6
store i64 %8, i64* %10, align 8, !insn.addr !6
%11 = add i64 %6, -49, !insn.addr !7
%12 = and i64 %11, -16, !insn.addr !8
%13 = add i64 %2, -80, !insn.addr !9
%14 = inttoptr i64 %13 to i64*, !insn.addr !9
store i64 %12, i64* %14, align 8, !insn.addr !9
%15 = load i64, i64* %10, align 8, !insn.addr !10
%16 = add i64 %2, -72, !insn.addr !11
%17 = inttoptr i64 %16 to i64*, !insn.addr !11
store i64 %15, i64* %17, align 8, !insn.addr !11
%18 = inttoptr i64 %15 to i32*, !insn.addr !12
store i32 0, i32* %18, align 4, !insn.addr !12
%19 = add i64 %2, -64, !insn.addr !13
%20 = inttoptr i64 %19 to i64*, !insn.addr !13
store i64 279172874305, i64* %20, align 8, !insn.addr !13
%21 = add i64 %2, -56, !insn.addr !14
%22 = inttoptr i64 %21 to i64*, !insn.addr !14
store i64 279172874305, i64* %22, align 8, !insn.addr !14
%23 = add i64 %2, -48, !insn.addr !15
%24 = inttoptr i64 %23 to i64*, !insn.addr !15
store i64 279172874305, i64* %24, align 8, !insn.addr !15
%25 = add i64 %2, -40, !insn.addr !16
%26 = inttoptr i64 %25 to i64*, !insn.addr !16
store i64 279172874305, i64* %26, align 8, !insn.addr !16
%27 = add i64 %2, -32, !insn.addr !17
%28 = inttoptr i64 %27 to i64*, !insn.addr !17
store i64 279172874305, i64* %28, align 8, !insn.addr !17
%29 = load i32, i32* inttoptr (i64 928 to i32*), align 32, !insn.addr !18
%30 = add i64 %2, -24, !insn.addr !19
%31 = inttoptr i64 %30 to i32*, !insn.addr !19
store i32 %29, i32* %31, align 4, !insn.addr !19
%32 = call i64 @wcslen(i64 %19, i64 %1), !insn.addr !20
%33 = mul i64 %32, 4, !insn.addr !21
%34 = add i64 %33, 4, !insn.addr !22
%35 = load i64, i64* %17, align 8, !insn.addr !23
%36 = call i64 @memcpy(i64 %35, i64 %19, i64 %34, i64 %19), !insn.addr !24
%37 = load i64, i64* %17, align 8, !insn.addr !25
%38 = call i64 @printWLine(i64 %37), !insn.addr !26
%39 = add i64 %2, -8, !insn.addr !27
%40 = inttoptr i64 %39 to i64*, !insn.addr !27
%41 = load i64, i64* %40, align 8, !insn.addr !27
%42 = call i64 @__readfsqword(i64 40), !insn.addr !28
%43 = icmp eq i64 %41, %42, !insn.addr !28
store i64 0, i64* %rax.0.reg2mem, !insn.addr !29
br i1 %43, label %dec_label_pc_11d, label %dec_label_pc_118, !insn.addr !29
dec_label_pc_118: ; preds = %dec_label_pc_31
%44 = call i64 @__stack_chk_fail(), !insn.addr !30
store i64 %44, i64* %rax.0.reg2mem, !insn.addr !30
br label %dec_label_pc_11d, !insn.addr !30
dec_label_pc_11d: ; preds = %dec_label_pc_118, %dec_label_pc_31
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !31
}
define i64 @goodG2B1() local_unnamed_addr {
dec_label_pc_11f:
%rax.0.reg2mem = alloca i64, !insn.addr !32
%stack_var_-72 = alloca i32*, align 8
%stack_var_-104 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-104 to i64, !insn.addr !33
%1 = call i64 @__readfsqword(i64 40), !insn.addr !34
%2 = add i64 %0, -113, !insn.addr !35
%3 = and i64 %2, -16, !insn.addr !36
%4 = inttoptr i64 %3 to i32*, !insn.addr !37
store i32 0, i32* %4, align 16, !insn.addr !37
store i32* inttoptr (i64 279172874305 to i32*), i32** %stack_var_-72, align 8, !insn.addr !38
%5 = ptrtoint i32** %stack_var_-72 to i64, !insn.addr !39
%6 = call i64 @wcslen(i64 %5, i64 16), !insn.addr !40
%7 = mul i64 %6, 4, !insn.addr !41
%8 = add i64 %7, 4, !insn.addr !42
%9 = call i64 @memcpy(i64 %3, i64 %5, i64 %8, i64 %5), !insn.addr !43
%10 = call i64 @printWLine(i64 %3), !insn.addr !44
%11 = call i64 @__readfsqword(i64 40), !insn.addr !45
%12 = icmp eq i64 %1, %11, !insn.addr !45
store i64 0, i64* %rax.0.reg2mem, !insn.addr !46
br i1 %12, label %dec_label_pc_23c, label %dec_label_pc_237, !insn.addr !46
dec_label_pc_237: ; preds = %dec_label_pc_11f
%13 = call i64 @__stack_chk_fail(), !insn.addr !47
store i64 %13, i64* %rax.0.reg2mem, !insn.addr !47
br label %dec_label_pc_23c, !insn.addr !47
dec_label_pc_23c: ; preds = %dec_label_pc_237, %dec_label_pc_11f
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !48
}
define i64 @goodG2B2() local_unnamed_addr {
dec_label_pc_23e:
%rax.0.reg2mem = alloca i64, !insn.addr !49
%stack_var_-72 = alloca i32*, align 8
%stack_var_-104 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-104 to i64, !insn.addr !50
%1 = call i64 @__readfsqword(i64 40), !insn.addr !51
%2 = add i64 %0, -113, !insn.addr !52
%3 = and i64 %2, -16, !insn.addr !53
%4 = inttoptr i64 %3 to i32*, !insn.addr !54
store i32 0, i32* %4, align 16, !insn.addr !54
store i32* inttoptr (i64 279172874305 to i32*), i32** %stack_var_-72, align 8, !insn.addr !55
%5 = ptrtoint i32** %stack_var_-72 to i64, !insn.addr !56
%6 = call i64 @wcslen(i64 %5, i64 16), !insn.addr !57
%7 = mul i64 %6, 4, !insn.addr !58
%8 = add i64 %7, 4, !insn.addr !59
%9 = call i64 @memcpy(i64 %3, i64 %5, i64 %8, i64 %5), !insn.addr !60
%10 = call i64 @printWLine(i64 %3), !insn.addr !61
%11 = call i64 @__readfsqword(i64 40), !insn.addr !62
%12 = icmp eq i64 %1, %11, !insn.addr !62
store i64 0, i64* %rax.0.reg2mem, !insn.addr !63
br i1 %12, label %dec_label_pc_35b, label %dec_label_pc_356, !insn.addr !63
dec_label_pc_356: ; preds = %dec_label_pc_23e
%13 = call i64 @__stack_chk_fail(), !insn.addr !64
store i64 %13, i64* %rax.0.reg2mem, !insn.addr !64
br label %dec_label_pc_35b, !insn.addr !64
dec_label_pc_35b: ; preds = %dec_label_pc_356, %dec_label_pc_23e
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !65
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memcpy_02_good() local_unnamed_addr {
dec_label_pc_35d:
%0 = call i64 @goodG2B1(), !insn.addr !66
%1 = call i64 @goodG2B2(), !insn.addr !67
ret i64 %1, !insn.addr !68
}
declare i64 @wcslen(i64, i64) local_unnamed_addr
declare i64 @memcpy(i64, i64, i64, i64) local_unnamed_addr
declare i64 @printWLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 8}
!1 = !{i64 32}
!2 = !{i64 49}
!3 = !{i64 53}
!4 = !{i64 59}
!5 = !{i64 63}
!6 = !{i64 71}
!7 = !{i64 111}
!8 = !{i64 115}
!9 = !{i64 123}
!10 = !{i64 127}
!11 = !{i64 131}
!12 = !{i64 139}
!13 = !{i64 159}
!14 = !{i64 163}
!15 = !{i64 181}
!16 = !{i64 185}
!17 = !{i64 196}
!18 = !{i64 200}
!19 = !{i64 206}
!20 = !{i64 216}
!21 = !{i64 221}
!22 = !{i64 225}
!23 = !{i64 237}
!24 = !{i64 247}
!25 = !{i64 252}
!26 = !{i64 259}
!27 = !{i64 265}
!28 = !{i64 269}
!29 = !{i64 278}
!30 = !{i64 280}
!31 = !{i64 286}
!32 = !{i64 287}
!33 = !{i64 291}
!34 = !{i64 295}
!35 = !{i64 398}
!36 = !{i64 402}
!37 = !{i64 426}
!38 = !{i64 446}
!39 = !{i64 500}
!40 = !{i64 503}
!41 = !{i64 508}
!42 = !{i64 512}
!43 = !{i64 534}
!44 = !{i64 546}
!45 = !{i64 556}
!46 = !{i64 565}
!47 = !{i64 567}
!48 = !{i64 573}
!49 = !{i64 574}
!50 = !{i64 578}
!51 = !{i64 582}
!52 = !{i64 685}
!53 = !{i64 689}
!54 = !{i64 713}
!55 = !{i64 733}
!56 = !{i64 787}
!57 = !{i64 790}
!58 = !{i64 795}
!59 = !{i64 799}
!60 = !{i64 821}
!61 = !{i64 833}
!62 = !{i64 843}
!63 = !{i64 852}
!64 = !{i64 854}
!65 = !{i64 860}
!66 = !{i64 870}
!67 = !{i64 880}
!68 = !{i64 887}
### Assistant: @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memcpy_02_bad.source = private unnamed_addr constant [11 x i32] [i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 0], align 16
@__const.goodG2B1.source = private unnamed_addr constant [11 x i32] [i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 0], align 16
@__const.goodG2B2.source = private unnamed_addr constant [11 x i32] [i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 0], align 16
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memcpy_02_bad() #0 {
entry:
%data = alloca i32*, align 8
%dataBadBuffer = alloca i32*, align 8
%dataGoodBuffer = alloca i32*, align 8
%source = alloca [11 x i32], align 16
%0 = alloca i8, i64 40, align 16
%1 = bitcast i8* %0 to i32*
store i32* %1, i32** %dataBadBuffer, align 8
%2 = alloca i8, i64 44, align 16
%3 = bitcast i8* %2 to i32*
store i32* %3, i32** %dataGoodBuffer, align 8
%4 = load i32*, i32** %dataBadBuffer, align 8
store i32* %4, i32** %data, align 8
%5 = load i32*, i32** %data, align 8
%arrayidx = getelementptr inbounds i32, i32* %5, i64 0
store i32 0, i32* %arrayidx, align 4
%6 = bitcast [11 x i32]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 %6, i8* align 16 bitcast ([11 x i32]* @__const.CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memcpy_02_bad.source to i8*), i64 44, i1 false)
%7 = load i32*, i32** %data, align 8
%8 = bitcast i32* %7 to i8*
%arraydecay = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%9 = bitcast i32* %arraydecay to i8*
%arraydecay1 = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%call = call i64 @wcslen(i32* %arraydecay1) #4
%add = add i64 %call, 1
%mul = mul i64 %add, 4
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 %8, i8* align 16 %9, i64 %mul, i1 false)
%10 = load i32*, i32** %data, align 8
call void @printWLine(i32* %10)
ret void
}
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #1
; Function Attrs: nounwind readonly
declare dso_local i64 @wcslen(i32*) #2
declare dso_local void @printWLine(i32*) #3
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_alloca_memcpy_02_good() #0 {
entry:
call void @goodG2B1()
call void @goodG2B2()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B1() #0 {
entry:
%data = alloca i32*, align 8
%dataBadBuffer = alloca i32*, align 8
%dataGoodBuffer = alloca i32*, align 8
%source = alloca [11 x i32], align 16
%0 = alloca i8, i64 40, align 16
%1 = bitcast i8* %0 to i32*
store i32* %1, i32** %dataBadBuffer, align 8
%2 = alloca i8, i64 44, align 16
%3 = bitcast i8* %2 to i32*
store i32* %3, i32** %dataGoodBuffer, align 8
%4 = load i32*, i32** %dataGoodBuffer, align 8
store i32* %4, i32** %data, align 8
%5 = load i32*, i32** %data, align 8
%arrayidx = getelementptr inbounds i32, i32* %5, i64 0
store i32 0, i32* %arrayidx, align 4
%6 = bitcast [11 x i32]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 %6, i8* align 16 bitcast ([11 x i32]* @__const.goodG2B1.source to i8*), i64 44, i1 false)
%7 = load i32*, i32** %data, align 8
%8 = bitcast i32* %7 to i8*
%arraydecay = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%9 = bitcast i32* %arraydecay to i8*
%arraydecay1 = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%call = call i64 @wcslen(i32* %arraydecay1) #4
%add = add i64 %call, 1
%mul = mul i64 %add, 4
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 %8, i8* align 16 %9, i64 %mul, i1 false)
%10 = load i32*, i32** %data, align 8
call void @printWLine(i32* %10)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B2() #0 {
entry:
%data = alloca i32*, align 8
%dataBadBuffer = alloca i32*, align 8
%dataGoodBuffer = alloca i32*, align 8
%source = alloca [11 x i32], align 16
%0 = alloca i8, i64 40, align 16
%1 = bitcast i8* %0 to i32*
store i32* %1, i32** %dataBadBuffer, align 8
%2 = alloca i8, i64 44, align 16
%3 = bitcast i8* %2 to i32*
store i32* %3, i32** %dataGoodBuffer, align 8
%4 = load i32*, i32** %dataGoodBuffer, align 8
store i32* %4, i32** %data, align 8
%5 = load i32*, i32** %data, align 8
%arrayidx = getelementptr inbounds i32, i32* %5, i64 0
store i32 0, i32* %arrayidx, align 4
%6 = bitcast [11 x i32]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 %6, i8* align 16 bitcast ([11 x i32]* @__const.goodG2B2.source to i8*), i64 44, i1 false)
%7 = load i32*, i32** %data, align 8
%8 = bitcast i32* %7 to i8*
%arraydecay = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%9 = bitcast i32* %arraydecay to i8*
%arraydecay1 = getelementptr inbounds [11 x i32], [11 x i32]* %source, i64 0, i64 0
%call = call i64 @wcslen(i32* %arraydecay1) #4
%add = add i64 %call, 1
%mul = mul i64 %add, 4
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 %8, i8* align 16 %9, i64 %mul, i1 false)
%10 = load i32*, i32** %data, align 8
call void @printWLine(i32* %10)
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" }
attributes #1 = { argmemonly nounwind willreturn }
attributes #2 = { nounwind readonly "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #3 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #4 = { nounwind readonly }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_230 = constant [43 x i32] %wide-string
@global_var_2e0 = constant [43 x i8] c"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\00"
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
ret i64 ptrtoint ([43 x i32]* @global_var_230 to i64), !insn.addr !1
}
define i64 @function_31() local_unnamed_addr {
dec_label_pc_31:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !2
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = load i64, i64* %0
%4 = call i64 @strlen(i64 %1), !insn.addr !2
%5 = add i64 %2, -24, !insn.addr !3
%6 = inttoptr i64 %5 to i64*, !insn.addr !3
store i64 %4, i64* %6, align 8, !insn.addr !3
%7 = mul i64 %4, 4, !insn.addr !4
%8 = add i64 %7, 34, !insn.addr !5
%9 = udiv i64 %8, 16
%10 = mul i64 %9, 16
%11 = add i64 %3, 15, !insn.addr !6
%12 = sub i64 %11, %10, !insn.addr !7
%13 = and i64 %12, -16, !insn.addr !8
%14 = add i64 %2, -16, !insn.addr !9
%15 = inttoptr i64 %14 to i64*, !insn.addr !9
store i64 %13, i64* %15, align 8, !insn.addr !9
%16 = add i64 %2, -32, !insn.addr !10
%17 = inttoptr i64 %16 to i64*, !insn.addr !10
%18 = load i64, i64* %17, align 8, !insn.addr !10
%19 = call i64 @wcscpy(i64 %13, i64 %18), !insn.addr !11
%20 = load i64, i64* %15, align 8, !insn.addr !12
%21 = call i64 @printLine(i64 %20), !insn.addr !13
%22 = add i64 %2, -8, !insn.addr !14
%23 = inttoptr i64 %22 to i64*, !insn.addr !14
%24 = load i64, i64* %23, align 8, !insn.addr !14
%25 = call i64 @__readfsqword(i64 40), !insn.addr !15
%26 = icmp eq i64 %24, %25, !insn.addr !15
store i64 0, i64* %rax.0.reg2mem, !insn.addr !16
br i1 %26, label %dec_label_pc_b1, label %dec_label_pc_ac, !insn.addr !16
dec_label_pc_ac: ; preds = %dec_label_pc_31
%27 = call i64 @__stack_chk_fail(), !insn.addr !17
store i64 %27, i64* %rax.0.reg2mem, !insn.addr !17
br label %dec_label_pc_b1, !insn.addr !17
dec_label_pc_b1: ; preds = %dec_label_pc_ac, %dec_label_pc_31
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !18
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_b3:
%rax.0.reg2mem = alloca i64, !insn.addr !19
%stack_var_-40 = alloca i8*, align 8
%0 = ptrtoint i8** %stack_var_-40 to i64, !insn.addr !20
%1 = call i64 @__readfsqword(i64 40), !insn.addr !21
store i8* getelementptr inbounds ([43 x i8], [43 x i8]* @global_var_2e0, i64 0, i64 0), i8** %stack_var_-40, align 8, !insn.addr !22
%2 = call i64 @strlen(i64 ptrtoint ([43 x i8]* @global_var_2e0 to i64)), !insn.addr !23
%3 = add i64 %2, 31, !insn.addr !24
%4 = udiv i64 %3, 16
%5 = mul i64 %4, 16
%6 = add i64 %0, 15, !insn.addr !25
%7 = sub i64 %6, %5, !insn.addr !26
%8 = and i64 %7, -16, !insn.addr !27
%9 = load i8*, i8** %stack_var_-40, align 8, !insn.addr !28
%10 = ptrtoint i8* %9 to i64, !insn.addr !28
%11 = call i64 @strcpy(i64 %8, i64 %10), !insn.addr !29
%12 = call i64 @printLine(i64 %8), !insn.addr !30
%13 = call i64 @__readfsqword(i64 40), !insn.addr !31
%14 = icmp eq i64 %1, %13, !insn.addr !31
store i64 0, i64* %rax.0.reg2mem, !insn.addr !32
br i1 %14, label %dec_label_pc_160, label %dec_label_pc_15b, !insn.addr !32
dec_label_pc_15b: ; preds = %dec_label_pc_b3
%15 = call i64 @__stack_chk_fail(), !insn.addr !33
store i64 %15, i64* %rax.0.reg2mem, !insn.addr !33
br label %dec_label_pc_160, !insn.addr !33
dec_label_pc_160: ; preds = %dec_label_pc_15b, %dec_label_pc_b3
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !34
}
define i64 @goodB2G() local_unnamed_addr {
dec_label_pc_162:
%rax.0.reg2mem = alloca i64, !insn.addr !35
%stack_var_-40 = alloca i32*, align 8
%0 = ptrtoint i32** %stack_var_-40 to i64, !insn.addr !36
%1 = call i64 @__readfsqword(i64 40), !insn.addr !37
store i32* getelementptr inbounds ([43 x i32], [43 x i32]* @global_var_230, i64 0, i64 0), i32** %stack_var_-40, align 8, !insn.addr !38
%2 = call i64 @wcslen(i64 ptrtoint ([43 x i32]* @global_var_230 to i64)), !insn.addr !39
%3 = mul i64 %2, 4, !insn.addr !40
%4 = add i64 %3, 34, !insn.addr !41
%5 = udiv i64 %4, 16
%6 = mul i64 %5, 16
%7 = add i64 %0, 15, !insn.addr !42
%8 = sub i64 %7, %6, !insn.addr !43
%9 = and i64 %8, -16, !insn.addr !44
%10 = load i32*, i32** %stack_var_-40, align 8, !insn.addr !45
%11 = ptrtoint i32* %10 to i64, !insn.addr !45
%12 = call i64 @wcscpy(i64 %9, i64 %11), !insn.addr !46
%13 = call i64 @printWLine(i64 %9), !insn.addr !47
%14 = call i64 @__readfsqword(i64 40), !insn.addr !48
%15 = icmp eq i64 %1, %14, !insn.addr !48
store i64 0, i64* %rax.0.reg2mem, !insn.addr !49
br i1 %15, label %dec_label_pc_213, label %dec_label_pc_20e, !insn.addr !49
dec_label_pc_20e: ; preds = %dec_label_pc_162
%16 = call i64 @__stack_chk_fail(), !insn.addr !50
store i64 %16, i64* %rax.0.reg2mem, !insn.addr !50
br label %dec_label_pc_213, !insn.addr !50
dec_label_pc_213: ; preds = %dec_label_pc_20e, %dec_label_pc_162
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !51
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE135_01_good() local_unnamed_addr {
dec_label_pc_215:
%0 = call i64 @goodG2B(), !insn.addr !52
%1 = call i64 @goodB2G(), !insn.addr !53
ret i64 %1, !insn.addr !54
}
declare i64 @strlen(i64) local_unnamed_addr
declare i64 @wcscpy(i64, i64) local_unnamed_addr
declare i64 @printLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @strcpy(i64, i64) local_unnamed_addr
declare i64 @wcslen(i64) local_unnamed_addr
declare i64 @printWLine(i64) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 8}
!1 = !{i64 31}
!2 = !{i64 49}
!3 = !{i64 54}
!4 = !{i64 62}
!5 = !{i64 83}
!6 = !{i64 103}
!7 = !{i64 109}
!8 = !{i64 113}
!9 = !{i64 121}
!10 = !{i64 125}
!11 = !{i64 139}
!12 = !{i64 144}
!13 = !{i64 151}
!14 = !{i64 157}
!15 = !{i64 161}
!16 = !{i64 170}
!17 = !{i64 172}
!18 = !{i64 178}
!19 = !{i64 179}
!20 = !{i64 183}
!21 = !{i64 187}
!22 = !{i64 217}
!23 = !{i64 228}
!24 = !{i64 258}
!25 = !{i64 278}
!26 = !{i64 284}
!27 = !{i64 288}
!28 = !{i64 300}
!29 = !{i64 314}
!30 = !{i64 326}
!31 = !{i64 336}
!32 = !{i64 345}
!33 = !{i64 347}
!34 = !{i64 353}
!35 = !{i64 354}
!36 = !{i64 358}
!37 = !{i64 362}
!38 = !{i64 392}
!39 = !{i64 403}
!40 = !{i64 416}
!41 = !{i64 437}
!42 = !{i64 457}
!43 = !{i64 463}
!44 = !{i64 467}
!45 = !{i64 479}
!46 = !{i64 493}
!47 = !{i64 505}
!48 = !{i64 515}
!49 = !{i64 524}
!50 = !{i64 526}
!51 = !{i64 532}
!52 = !{i64 542}
!53 = !{i64 552}
!54 = !{i64 559}
### Assistant: @.str = private unnamed_addr constant [43 x i32] [i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 65, i32 0], align 4
@.str.1 = private unnamed_addr constant [43 x i8] c"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\00", align 1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE135_01_bad() #0 {
entry:
%data = alloca i8*, align 8
%dataLen = alloca i64, align 8
%dest = alloca i8*, align 8
store i8* null, i8** %data, align 8
store i8* bitcast ([43 x i32]* @.str to i8*), i8** %data, align 8
%0 = load i8*, i8** %data, align 8
%call = call i64 @strlen(i8* %0) #4
store i64 %call, i64* %dataLen, align 8
%1 = load i64, i64* %dataLen, align 8
%add = add i64 %1, 1
%mul = mul i64 %add, 4
%2 = alloca i8, i64 %mul, align 16
store i8* %2, i8** %dest, align 8
%3 = load i8*, i8** %dest, align 8
%4 = bitcast i8* %3 to i32*
%5 = load i8*, i8** %data, align 8
%6 = bitcast i8* %5 to i32*
%call1 = call i32* @wcscpy(i32* %4, i32* %6) #5
%7 = load i8*, i8** %dest, align 8
call void @printLine(i8* %7)
ret void
}
; Function Attrs: nounwind readonly
declare dso_local i64 @strlen(i8*) #1
; Function Attrs: nounwind
declare dso_local i32* @wcscpy(i32*, i32*) #2
declare dso_local void @printLine(i8*) #3
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE135_01_good() #0 {
entry:
call void @goodG2B()
call void @goodB2G()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B() #0 {
entry:
%data = alloca i8*, align 8
%dataLen = alloca i64, align 8
%dest = alloca i8*, align 8
store i8* null, i8** %data, align 8
store i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i8** %data, align 8
%0 = load i8*, i8** %data, align 8
%call = call i64 @strlen(i8* %0) #4
store i64 %call, i64* %dataLen, align 8
%1 = load i64, i64* %dataLen, align 8
%add = add i64 %1, 1
%mul = mul i64 %add, 1
%2 = alloca i8, i64 %mul, align 16
store i8* %2, i8** %dest, align 8
%3 = load i8*, i8** %dest, align 8
%4 = load i8*, i8** %data, align 8
%call1 = call i8* @strcpy(i8* %3, i8* %4) #5
%5 = load i8*, i8** %dest, align 8
call void @printLine(i8* %5)
ret void
}
; Function Attrs: nounwind
declare dso_local i8* @strcpy(i8*, i8*) #2
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodB2G() #0 {
entry:
%data = alloca i8*, align 8
%dataLen = alloca i64, align 8
%dest = alloca i8*, align 8
store i8* null, i8** %data, align 8
store i8* bitcast ([43 x i32]* @.str to i8*), i8** %data, align 8
%0 = load i8*, i8** %data, align 8
%1 = bitcast i8* %0 to i32*
%call = call i64 @wcslen(i32* %1) #4
store i64 %call, i64* %dataLen, align 8
%2 = load i64, i64* %dataLen, align 8
%add = add i64 %2, 1
%mul = mul i64 %add, 4
%3 = alloca i8, i64 %mul, align 16
store i8* %3, i8** %dest, align 8
%4 = load i8*, i8** %dest, align 8
%5 = bitcast i8* %4 to i32*
%6 = load i8*, i8** %data, align 8
%7 = bitcast i8* %6 to i32*
%call1 = call i32* @wcscpy(i32* %5, i32* %7) #5
%8 = load i8*, i8** %dest, align 8
%9 = bitcast i8* %8 to i32*
call void @printWLine(i32* %9)
ret void
}
; Function Attrs: nounwind readonly
declare dso_local i64 @wcslen(i32*) #1
declare dso_local void @printWLine(i32*) #3
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" }
attributes #1 = { nounwind readonly "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #2 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #3 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #4 = { nounwind readonly }
attributes #5 = { nounwind }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_58 = constant i64 5188414251730993187
@0 = external global i32
define i64 @_GLOBAL_OFFSET_TABLE_.1(i64 %arg1) local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
ret i64 0, !insn.addr !1
}
define i64 @function_33(i64 %arg1, i64 %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_33:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !2
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = inttoptr i64 %2 to i64*, !insn.addr !3
%4 = inttoptr i64 %arg3 to i32*, !insn.addr !3
%5 = call i64 @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEEixEOi(i64* %3, i32* %4), !insn.addr !3
%6 = inttoptr i64 %5 to i64*, !insn.addr !4
%7 = load i64, i64* %6, align 8, !insn.addr !4
%8 = add i64 %1, -120, !insn.addr !5
%9 = inttoptr i64 %8 to i64*, !insn.addr !5
store i64 %7, i64* %9, align 8, !insn.addr !5
%10 = add i64 %1, -112, !insn.addr !6
%11 = call i64 @memset(i64 %10, i64 67, i64 99), !insn.addr !7
%12 = add i64 %1, -13, !insn.addr !8
%13 = inttoptr i64 %12 to i8*, !insn.addr !8
store i8 0, i8* %13, align 1, !insn.addr !8
%14 = load i64, i64* %9, align 8, !insn.addr !9
%15 = inttoptr i64 %10 to i64*, !insn.addr !10
%16 = load i64, i64* %15, align 8, !insn.addr !10
%17 = add i64 %1, -104, !insn.addr !11
%18 = inttoptr i64 %17 to i64*, !insn.addr !11
%19 = load i64, i64* %18, align 8, !insn.addr !11
%20 = inttoptr i64 %14 to i64*, !insn.addr !12
store i64 %16, i64* %20, align 8, !insn.addr !12
%21 = add i64 %14, 8, !insn.addr !13
%22 = inttoptr i64 %21 to i64*, !insn.addr !13
store i64 %19, i64* %22, align 8, !insn.addr !13
%23 = add i64 %1, -96, !insn.addr !14
%24 = inttoptr i64 %23 to i64*, !insn.addr !14
%25 = load i64, i64* %24, align 8, !insn.addr !14
%26 = add i64 %1, -88, !insn.addr !15
%27 = inttoptr i64 %26 to i64*, !insn.addr !15
%28 = load i64, i64* %27, align 8, !insn.addr !15
%29 = add i64 %14, 16, !insn.addr !16
%30 = inttoptr i64 %29 to i64*, !insn.addr !16
store i64 %25, i64* %30, align 8, !insn.addr !16
%31 = add i64 %14, 24, !insn.addr !17
%32 = inttoptr i64 %31 to i64*, !insn.addr !17
store i64 %28, i64* %32, align 8, !insn.addr !17
%33 = add i64 %1, -80, !insn.addr !18
%34 = inttoptr i64 %33 to i64*, !insn.addr !18
%35 = load i64, i64* %34, align 8, !insn.addr !18
%36 = add i64 %1, -72, !insn.addr !19
%37 = inttoptr i64 %36 to i64*, !insn.addr !19
%38 = load i64, i64* %37, align 8, !insn.addr !19
%39 = add i64 %14, 32, !insn.addr !20
%40 = inttoptr i64 %39 to i64*, !insn.addr !20
store i64 %35, i64* %40, align 8, !insn.addr !20
%41 = add i64 %14, 40, !insn.addr !21
%42 = inttoptr i64 %41 to i64*, !insn.addr !21
store i64 %38, i64* %42, align 8, !insn.addr !21
%43 = add i64 %1, -64, !insn.addr !22
%44 = inttoptr i64 %43 to i64*, !insn.addr !22
%45 = load i64, i64* %44, align 8, !insn.addr !22
%46 = add i64 %1, -56, !insn.addr !23
%47 = inttoptr i64 %46 to i64*, !insn.addr !23
%48 = load i64, i64* %47, align 8, !insn.addr !23
%49 = add i64 %14, 48, !insn.addr !24
%50 = inttoptr i64 %49 to i64*, !insn.addr !24
store i64 %45, i64* %50, align 8, !insn.addr !24
%51 = add i64 %14, 56, !insn.addr !25
%52 = inttoptr i64 %51 to i64*, !insn.addr !25
store i64 %48, i64* %52, align 8, !insn.addr !25
%53 = add i64 %1, -48, !insn.addr !26
%54 = inttoptr i64 %53 to i64*, !insn.addr !26
%55 = load i64, i64* %54, align 8, !insn.addr !26
%56 = add i64 %1, -40, !insn.addr !27
%57 = inttoptr i64 %56 to i64*, !insn.addr !27
%58 = load i64, i64* %57, align 8, !insn.addr !27
%59 = add i64 %14, 64, !insn.addr !28
%60 = inttoptr i64 %59 to i64*, !insn.addr !28
store i64 %55, i64* %60, align 8, !insn.addr !28
%61 = add i64 %14, 72, !insn.addr !29
%62 = inttoptr i64 %61 to i64*, !insn.addr !29
store i64 %58, i64* %62, align 8, !insn.addr !29
%63 = add i64 %1, -32, !insn.addr !30
%64 = inttoptr i64 %63 to i64*, !insn.addr !30
%65 = load i64, i64* %64, align 8, !insn.addr !30
%66 = add i64 %1, -24, !insn.addr !31
%67 = inttoptr i64 %66 to i64*, !insn.addr !31
%68 = load i64, i64* %67, align 8, !insn.addr !31
%69 = add i64 %14, 80, !insn.addr !32
%70 = inttoptr i64 %69 to i64*, !insn.addr !32
store i64 %65, i64* %70, align 8, !insn.addr !32
%71 = add i64 %14, ptrtoint (i64* @global_var_58 to i64), !insn.addr !33
%72 = inttoptr i64 %71 to i64*, !insn.addr !33
store i64 %68, i64* %72, align 8, !insn.addr !33
%73 = add i64 %1, -16, !insn.addr !34
%74 = inttoptr i64 %73 to i32*, !insn.addr !34
%75 = load i32, i32* %74, align 4, !insn.addr !34
%76 = add i64 %14, 96, !insn.addr !35
%77 = inttoptr i64 %76 to i32*, !insn.addr !35
store i32 %75, i32* %77, align 4, !insn.addr !35
%78 = load i64, i64* %9, align 8, !insn.addr !36
%79 = add i64 %78, 99, !insn.addr !37
%80 = inttoptr i64 %79 to i8*, !insn.addr !38
store i8 0, i8* %80, align 1, !insn.addr !38
%81 = load i64, i64* %9, align 8, !insn.addr !39
%82 = call i64 @printLine(i64 %81), !insn.addr !40
%83 = add i64 %1, -8, !insn.addr !41
%84 = inttoptr i64 %83 to i64*, !insn.addr !41
%85 = load i64, i64* %84, align 8, !insn.addr !41
%86 = call i64 @__readfsqword(i64 40), !insn.addr !42
%87 = icmp eq i64 %85, %86, !insn.addr !42
store i64 0, i64* %rax.0.reg2mem, !insn.addr !43
br i1 %87, label %dec_label_pc_f4, label %dec_label_pc_ef, !insn.addr !43
dec_label_pc_ef: ; preds = %dec_label_pc_33
%88 = call i64 @__stack_chk_fail(), !insn.addr !44
store i64 %88, i64* %rax.0.reg2mem, !insn.addr !44
br label %dec_label_pc_f4, !insn.addr !44
dec_label_pc_f4: ; preds = %dec_label_pc_ef, %dec_label_pc_33
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !45
}
define i64 @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memcpy_7411goodG2BSinkESt3mapIiPcSt4lessIiESaISt4pairIKiS1_EEE(i64 %arg1) local_unnamed_addr {
dec_label_pc_f6:
%rax.0.reg2mem = alloca i64, !insn.addr !46
%stack_var_-120 = alloca i64, align 8
%stack_var_-132 = alloca i32, align 4
%0 = call i64 @__readfsqword(i64 40), !insn.addr !47
store i32 2, i32* %stack_var_-132, align 4, !insn.addr !48
%1 = inttoptr i64 %arg1 to i64*, !insn.addr !49
%2 = call i64 @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEEixEOi(i64* %1, i32* nonnull %stack_var_-132), !insn.addr !49
%3 = inttoptr i64 %2 to i64*, !insn.addr !50
%4 = load i64, i64* %3, align 8, !insn.addr !50
%5 = ptrtoint i64* %stack_var_-120 to i64, !insn.addr !51
%6 = call i64 @memset(i64 %5, i64 67, i64 99), !insn.addr !52
%7 = load i64, i64* %stack_var_-120, align 8, !insn.addr !53
%8 = inttoptr i64 %4 to i64*, !insn.addr !54
store i64 %7, i64* %8, align 8, !insn.addr !54
%9 = add i64 %4, 8, !insn.addr !55
%10 = inttoptr i64 %9 to i64*, !insn.addr !55
%11 = add i64 %4, 16, !insn.addr !56
%12 = inttoptr i64 %11 to i64*, !insn.addr !56
%13 = add i64 %4, 24, !insn.addr !57
%14 = inttoptr i64 %13 to i64*, !insn.addr !57
%15 = add i64 %4, 32, !insn.addr !58
%16 = inttoptr i64 %15 to i64*, !insn.addr !58
%17 = add i64 %4, 40, !insn.addr !59
%18 = inttoptr i64 %17 to i64*, !insn.addr !59
%19 = add i64 %4, 48, !insn.addr !60
%20 = inttoptr i64 %19 to i64*, !insn.addr !60
%21 = add i64 %4, 56, !insn.addr !61
%22 = inttoptr i64 %21 to i64*, !insn.addr !61
%23 = add i64 %4, 64, !insn.addr !62
%24 = inttoptr i64 %23 to i64*, !insn.addr !62
%25 = add i64 %4, 72, !insn.addr !63
%26 = inttoptr i64 %25 to i64*, !insn.addr !63
%27 = add i64 %4, 80, !insn.addr !64
%28 = inttoptr i64 %27 to i64*, !insn.addr !64
%29 = add i64 %4, ptrtoint (i64* @global_var_58 to i64), !insn.addr !65
%30 = inttoptr i64 %29 to i64*, !insn.addr !65
%31 = add i64 %4, 96, !insn.addr !66
%32 = inttoptr i64 %31 to i32*, !insn.addr !66
%33 = add i64 %4, 99, !insn.addr !67
%34 = inttoptr i64 %33 to i8*, !insn.addr !68
store i8 0, i8* %34, align 1, !insn.addr !68
%35 = call i64 @printLine(i64 %4), !insn.addr !69
%36 = call i64 @__readfsqword(i64 40), !insn.addr !70
%37 = icmp eq i64 %0, %36, !insn.addr !70
store i64 0, i64* %rax.0.reg2mem, !insn.addr !71
br i1 %37, label %dec_label_pc_1ea, label %dec_label_pc_1e5, !insn.addr !71
dec_label_pc_1e5: ; preds = %dec_label_pc_f6
%38 = call i64 @__stack_chk_fail(), !insn.addr !72
store i64 %38, i64* %rax.0.reg2mem, !insn.addr !72
br label %dec_label_pc_1ea, !insn.addr !72
dec_label_pc_1ea: ; preds = %dec_label_pc_1e5, %dec_label_pc_f6
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !73
}
define i64 @_ZnwmPv(i64 %arg1, i64* %arg2) local_unnamed_addr {
dec_label_pc_1ec:
%0 = ptrtoint i64* %arg2 to i64
ret i64 %0, !insn.addr !74
}
define i64 @_ZdlPvS_(i64* %arg1, i64* %arg2) local_unnamed_addr {
dec_label_pc_1fe:
%0 = alloca i64
%1 = load i64, i64* %0
ret i64 %1, !insn.addr !75
}
define i64* @_ZSt4moveIRiEONSt16remove_referenceIT_E4typeEOS2_(i32** %arg1) local_unnamed_addr {
dec_label_pc_210:
%0 = bitcast i32** %arg1 to i64*, !insn.addr !76
ret i64* %0, !insn.addr !76
}
define i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_21e:
%0 = bitcast i64* %arg1 to i32*, !insn.addr !77
ret i32* %0, !insn.addr !77
}
define i64 @_ZNSt5tupleIJOiEEC1IJiELb1EEEDpOT_(i64* %result, i64 %arg2) local_unnamed_addr {
dec_label_pc_22c:
%0 = inttoptr i64 %arg2 to i64*, !insn.addr !78
%1 = call i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i64* %0), !insn.addr !78
%2 = call i64 @_ZNSt11_Tuple_implILm0EJOiEEC1IiEEOT_(i64* %result, i32* %1), !insn.addr !79
ret i64 %2, !insn.addr !80
}
define i64 @_ZNSt11_Tuple_implILm0EJOiEEC1IiEEOT_(i64* %result, i32* %arg2) local_unnamed_addr {
dec_label_pc_260:
%0 = bitcast i32* %arg2 to i64*
%1 = call i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i64* %0), !insn.addr !81
%2 = call i64 @_ZNSt10_Head_baseILm0EOiLb0EEC1IiEEOT_(i64* %result, i32* %1), !insn.addr !82
ret i64 %2, !insn.addr !83
}
define i64 @_ZNSt10_Head_baseILm0EOiLb0EEC1IiEEOT_(i64* %result, i32* %arg2) local_unnamed_addr {
dec_label_pc_294:
%0 = ptrtoint i64* %result to i64
%1 = bitcast i32* %arg2 to i64*
%2 = call i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i64* %1), !insn.addr !84
%3 = ptrtoint i32* %2 to i64, !insn.addr !84
store i64 %3, i64* %result, align 8, !insn.addr !85
ret i64 %0, !insn.addr !86
}
define i64 @_ZNSt5tupleIJOiEEC1EOS1_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_2be:
%0 = call i64 @_ZNSt11_Tuple_implILm0EJOiEEC1EOS1_(i64* %result, i64* %arg2), !insn.addr !87
ret i64 %0, !insn.addr !88
}
define i64 @_ZSt16forward_as_tupleIJiEESt5tupleIJDpOT_EES3_(i64* %result, i64 %arg2) local_unnamed_addr {
dec_label_pc_2e4:
%0 = ptrtoint i64* %result to i64
%1 = inttoptr i64 %arg2 to i64*, !insn.addr !89
%2 = call i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i64* %1), !insn.addr !89
%3 = ptrtoint i32* %2 to i64, !insn.addr !89
%4 = call i64 @_ZNSt5tupleIJOiEEC1IJiELb1EEEDpOT_(i64* %result, i64 %3), !insn.addr !90
ret i64 %0, !insn.addr !91
}
define i64 @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEEixEOi(i64* %result, i32* %arg2) local_unnamed_addr {
dec_label_pc_31c:
%rax.0.reg2mem = alloca i64, !insn.addr !92
%stack_var_-57 = alloca i64, align 8
%stack_var_-48 = alloca i64, align 8
%stack_var_-40 = alloca i64, align 8
%stack_var_-56 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !93
%1 = call i64 @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE11lower_boundERS4_(i64* %result, i32* %arg2), !insn.addr !94
store i64 %1, i64* %stack_var_-56, align 8, !insn.addr !95
%2 = call i64 @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE3endEv(i64* %result), !insn.addr !96
store i64 %2, i64* %stack_var_-40, align 8, !insn.addr !97
%3 = call i64 @_ZNKSt17_Rb_tree_iteratorISt4pairIKiPcEEeqERKS4_(i64* nonnull %stack_var_-56, i64* nonnull %stack_var_-40), !insn.addr !98
%4 = trunc i64 %3 to i8, !insn.addr !99
%5 = icmp eq i8 %4, 0, !insn.addr !99
%6 = icmp eq i1 %5, false, !insn.addr !100
br i1 %6, label %dec_label_pc_3bc, label %dec_label_pc_37a, !insn.addr !100
dec_label_pc_37a: ; preds = %dec_label_pc_31c
%7 = call i64 @_ZNKSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE8key_compEv(i64* %result), !insn.addr !101
%8 = call i64 @_ZNKSt17_Rb_tree_iteratorISt4pairIKiPcEEdeEv(i64* nonnull %stack_var_-56), !insn.addr !102
%9 = inttoptr i64 %8 to i32*, !insn.addr !103
%10 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* nonnull %stack_var_-48, i32* %arg2, i32* %9), !insn.addr !103
%11 = trunc i64 %10 to i8, !insn.addr !104
%12 = icmp ne i8 %11, 0, !insn.addr !104
%phitmp = icmp eq i1 %12, false
br i1 %phitmp, label %dec_label_pc_419, label %dec_label_pc_3bc, !insn.addr !105
dec_label_pc_3bc: ; preds = %dec_label_pc_31c, %dec_label_pc_37a
%13 = ptrtoint i64* %result to i64
%14 = bitcast i32* %arg2 to i32**
%15 = call i64* @_ZSt4moveIRiEONSt16remove_referenceIT_E4typeEOS2_(i32** %14), !insn.addr !106
%16 = ptrtoint i64* %15 to i64, !insn.addr !106
%17 = call i64 @_ZSt16forward_as_tupleIJiEESt5tupleIJDpOT_EES3_(i64* nonnull %stack_var_-48, i64 %16), !insn.addr !107
%18 = call i64 @_ZNSt23_Rb_tree_const_iteratorISt4pairIKiPcEEC1ERKSt17_Rb_tree_iteratorIS3_E(i64* nonnull %stack_var_-40, i64* nonnull %stack_var_-56), !insn.addr !108
%19 = load i64, i64* %stack_var_-40, align 8, !insn.addr !109
%20 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJOiEESE_IJEEEEESt17_Rb_tree_iteratorIS3_ESt23_Rb_tree_const_iteratorIS3_EDpOT_(i64 %13, i64 %19, i64 525, i64* nonnull %stack_var_-48, i64* nonnull %stack_var_-57), !insn.addr !110
store i64 %20, i64* %stack_var_-56, align 8, !insn.addr !111
br label %dec_label_pc_419, !insn.addr !111
dec_label_pc_419: ; preds = %dec_label_pc_3bc, %dec_label_pc_37a
%21 = call i64 @_ZNKSt17_Rb_tree_iteratorISt4pairIKiPcEEdeEv(i64* nonnull %stack_var_-56), !insn.addr !112
%22 = add i64 %21, 8, !insn.addr !113
%23 = call i64 @__readfsqword(i64 40), !insn.addr !114
%24 = icmp eq i64 %0, %23, !insn.addr !114
store i64 %22, i64* %rax.0.reg2mem, !insn.addr !115
br i1 %24, label %dec_label_pc_43d, label %dec_label_pc_438, !insn.addr !115
dec_label_pc_438: ; preds = %dec_label_pc_419
%25 = call i64 @__stack_chk_fail(), !insn.addr !116
store i64 %25, i64* %rax.0.reg2mem, !insn.addr !116
br label %dec_label_pc_43d, !insn.addr !116
dec_label_pc_43d: ; preds = %dec_label_pc_438, %dec_label_pc_419
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !117
}
define i64 @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE11lower_boundERS4_(i64* %result, i32* %arg2) local_unnamed_addr {
dec_label_pc_444:
%0 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11lower_boundERS1_(i64* %result, i32* %arg2), !insn.addr !118
ret i64 %0, !insn.addr !119
}
define i64 @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE3endEv(i64* %result) local_unnamed_addr {
dec_label_pc_46a:
%0 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE3endEv(i64* %result), !insn.addr !120
ret i64 %0, !insn.addr !121
}
define i64 @_ZNKSt17_Rb_tree_iteratorISt4pairIKiPcEEeqERKS4_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_484:
%0 = ptrtoint i64* %arg2 to i64
%1 = icmp eq i64* %result, %arg2, !insn.addr !122
%2 = zext i1 %1 to i64, !insn.addr !123
%3 = and i64 %0, -256, !insn.addr !123
%4 = or i64 %3, %2, !insn.addr !123
ret i64 %4, !insn.addr !124
}
define i64 @_ZNKSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE8key_compEv(i64* %result) local_unnamed_addr {
dec_label_pc_4a6:
%0 = alloca i64
%1 = load i64, i64* %0
%2 = call i64 @_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8key_compEv(i64* %result), !insn.addr !125
%3 = and i64 %1, 4294967295, !insn.addr !126
ret i64 %3, !insn.addr !127
}
define i64 @_ZNKSt17_Rb_tree_iteratorISt4pairIKiPcEEdeEv(i64* %result) local_unnamed_addr {
dec_label_pc_4c8:
%0 = call i64 @_ZNSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(i64* %result), !insn.addr !128
ret i64 %0, !insn.addr !129
}
define i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %arg2, i32* %arg3) local_unnamed_addr {
dec_label_pc_4e6:
%0 = alloca i64
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = trunc i64 %1 to i32
%4 = trunc i64 %2 to i32
%5 = sub i32 %3, %4, !insn.addr !130
%6 = xor i64 %2, %1
%7 = trunc i64 %6 to i32, !insn.addr !130
%8 = xor i32 %5, %3, !insn.addr !130
%9 = and i32 %8, %7, !insn.addr !130
%10 = icmp slt i32 %9, 0, !insn.addr !130
%11 = icmp slt i32 %5, 0, !insn.addr !130
%12 = icmp ne i1 %11, %10, !insn.addr !131
%13 = zext i1 %12 to i64, !insn.addr !131
%14 = and i64 %2, 4294967040
%15 = or i64 %14, %13, !insn.addr !131
ret i64 %15, !insn.addr !132
}
define i64 @_ZNSt23_Rb_tree_const_iteratorISt4pairIKiPcEEC1ERKSt17_Rb_tree_iteratorIS3_E(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_50a:
%0 = ptrtoint i64* %arg2 to i64
%1 = ptrtoint i64* %result to i64
store i64 %0, i64* %result, align 8, !insn.addr !133
ret i64 %1, !insn.addr !134
}
define i64 @_ZNSt11_Tuple_implILm0EJOiEE7_M_headERS1_(i64* %arg1) local_unnamed_addr {
dec_label_pc_527:
%0 = call i64 @_ZNSt10_Head_baseILm0EOiLb0EE7_M_headERS1_(i64* %arg1), !insn.addr !135
ret i64 %0, !insn.addr !136
}
define i64 @_ZNSt10_Head_baseILm0EOiLb0EE7_M_headERS1_(i64* %arg1) local_unnamed_addr {
dec_label_pc_541:
%0 = ptrtoint i64* %arg1 to i64
ret i64 %0, !insn.addr !137
}
define i32** @_ZSt7forwardIOiEOT_RNSt16remove_referenceIS1_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_552:
%0 = bitcast i64* %arg1 to i32**, !insn.addr !138
ret i32** %0, !insn.addr !138
}
define i64 @_ZNSt11_Tuple_implILm0EJOiEEC1EOS1_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_560:
%0 = call i64 @_ZNSt11_Tuple_implILm0EJOiEE7_M_headERS1_(i64* %arg2), !insn.addr !139
%1 = inttoptr i64 %0 to i64*, !insn.addr !140
%2 = call i32** @_ZSt7forwardIOiEOT_RNSt16remove_referenceIS1_E4typeE(i64* %1), !insn.addr !140
%3 = bitcast i32** %2 to i32*, !insn.addr !141
%4 = call i64 @_ZNSt10_Head_baseILm0EOiLb0EEC1IiEEOT_(i64* %result, i32* %3), !insn.addr !141
ret i64 %4, !insn.addr !142
}
define i64** @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_59c:
%0 = bitcast i64* %arg1 to i64**, !insn.addr !143
ret i64** %0, !insn.addr !143
}
define i64* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_5aa:
ret i64* %arg1, !insn.addr !144
}
define i64* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_5b8:
ret i64* %arg1, !insn.addr !145
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJOiEESE_IJEEEEESt17_Rb_tree_iteratorIS3_ESt23_Rb_tree_const_iteratorIS3_EDpOT_(i64 %arg1, i64 %arg2, i64 %arg3, i64* %arg4, i64* %arg5) local_unnamed_addr {
dec_label_pc_5c6:
%rax.0.reg2mem = alloca i64, !insn.addr !146
%storemerge.reg2mem = alloca i64, !insn.addr !146
%stack_var_-72 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !147
%1 = call i64* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(i64* %arg5), !insn.addr !148
%2 = ptrtoint i64* %1 to i64, !insn.addr !148
%3 = call i64* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(i64* %arg4), !insn.addr !149
%4 = ptrtoint i64* %3 to i64, !insn.addr !149
%5 = inttoptr i64 %arg3 to i64*, !insn.addr !150
%6 = call i64** @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(i64* %5), !insn.addr !150
%7 = ptrtoint i64** %6 to i64, !insn.addr !150
%8 = call i64* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_create_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESE_IJEEEEEPSt13_Rb_tree_nodeIS3_EDpOT_(i64 %arg1, i64 %7, i64 %4, i64 %2), !insn.addr !151
%9 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt13_Rb_tree_nodeIS3_E(i64* %8), !insn.addr !152
%10 = inttoptr i64 %arg1 to i64*, !insn.addr !153
%11 = inttoptr i64 %9 to i32*, !insn.addr !153
%12 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS3_ERS1_(i64* %10, i64 %arg2, i32* %11), !insn.addr !153
%13 = icmp eq i64 %9, 0, !insn.addr !154
br i1 %13, label %dec_label_pc_684, label %dec_label_pc_66a, !insn.addr !155
dec_label_pc_66a: ; preds = %dec_label_pc_5c6
%14 = inttoptr i64 %12 to i64*, !insn.addr !156
%15 = inttoptr i64 %9 to i64*, !insn.addr !156
%16 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_insert_nodeEPSt18_Rb_tree_node_baseSB_PSt13_Rb_tree_nodeIS3_E(i64* %10, i64* %14, i64* %15, i64* %8), !insn.addr !156
store i64 %16, i64* %storemerge.reg2mem, !insn.addr !157
br label %dec_label_pc_6ae, !insn.addr !157
dec_label_pc_684: ; preds = %dec_label_pc_5c6
%17 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_drop_nodeEPSt13_Rb_tree_nodeIS3_E(i64* %10, i64* %8), !insn.addr !158
%18 = inttoptr i64 %12 to i64*, !insn.addr !159
%19 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-72, i64* %18), !insn.addr !159
%20 = load i64, i64* %stack_var_-72, align 8, !insn.addr !160
store i64 %20, i64* %storemerge.reg2mem, !insn.addr !160
br label %dec_label_pc_6ae, !insn.addr !160
dec_label_pc_6ae: ; preds = %dec_label_pc_684, %dec_label_pc_66a
%storemerge.reload = load i64, i64* %storemerge.reg2mem
%21 = call i64 @__readfsqword(i64 40), !insn.addr !161
%22 = icmp eq i64 %0, %21, !insn.addr !161
store i64 %storemerge.reload, i64* %rax.0.reg2mem, !insn.addr !162
br i1 %22, label %dec_label_pc_6f7, label %dec_label_pc_6f2, !insn.addr !162
dec_label_pc_6f2: ; preds = %dec_label_pc_6ae
%23 = call i64 @__stack_chk_fail(), !insn.addr !163
store i64 %23, i64* %rax.0.reg2mem, !insn.addr !163
br label %dec_label_pc_6f7, !insn.addr !163
dec_label_pc_6f7: ; preds = %dec_label_pc_6f2, %dec_label_pc_6ae
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !164
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11lower_boundERS1_(i64* %result, i32* %arg2) local_unnamed_addr {
dec_label_pc_720:
%0 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_M_endEv(i64* %result), !insn.addr !165
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_M_beginEv(i64* %result), !insn.addr !166
%2 = inttoptr i64 %1 to i64*, !insn.addr !167
%3 = inttoptr i64 %0 to i64*, !insn.addr !167
%4 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_lower_boundEPSt13_Rb_tree_nodeIS3_EPSt18_Rb_tree_node_baseRS1_(i64* %result, i64* %2, i64* %3, i32* %arg2), !insn.addr !167
ret i64 %4, !insn.addr !168
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE3endEv(i64* %result) local_unnamed_addr {
dec_label_pc_76c:
%rax.0.reg2mem = alloca i64, !insn.addr !169
%0 = ptrtoint i64* %result to i64
%stack_var_-24 = alloca i64, align 8
%1 = call i64 @__readfsqword(i64 40), !insn.addr !170
%2 = add i64 %0, 8, !insn.addr !171
%3 = inttoptr i64 %2 to i64*, !insn.addr !172
%4 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-24, i64* %3), !insn.addr !172
%5 = load i64, i64* %stack_var_-24, align 8, !insn.addr !173
%6 = call i64 @__readfsqword(i64 40), !insn.addr !174
%7 = icmp eq i64 %1, %6, !insn.addr !174
store i64 %5, i64* %rax.0.reg2mem, !insn.addr !175
br i1 %7, label %dec_label_pc_7b6, label %dec_label_pc_7b1, !insn.addr !175
dec_label_pc_7b1: ; preds = %dec_label_pc_76c
%8 = call i64 @__stack_chk_fail(), !insn.addr !176
store i64 %8, i64* %rax.0.reg2mem, !insn.addr !176
br label %dec_label_pc_7b6, !insn.addr !176
dec_label_pc_7b6: ; preds = %dec_label_pc_7b1, %dec_label_pc_76c
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !177
}
define i64 @_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8key_compEv(i64* %result) local_unnamed_addr {
dec_label_pc_7b8:
%0 = alloca i64
%1 = load i64, i64* %0
ret i64 %1, !insn.addr !178
}
define i64 @_ZNSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_7c2:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 32, !insn.addr !179
%2 = inttoptr i64 %1 to i64*, !insn.addr !180
%3 = call i64 @_ZN9__gnu_cxx16__aligned_membufISt4pairIKiPcEE6_M_ptrEv(i64* %2), !insn.addr !180
ret i64 %3, !insn.addr !181
}
define i64* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_create_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESE_IJEEEEEPSt13_Rb_tree_nodeIS3_EDpOT_(i64 %arg1, i64 %arg2, i64 %arg3, i64 %arg4) local_unnamed_addr {
dec_label_pc_7e0:
%0 = inttoptr i64 %arg1 to i64*, !insn.addr !182
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_get_nodeEv(i64* %0), !insn.addr !182
%2 = inttoptr i64 %arg4 to i64*, !insn.addr !183
%3 = call i64* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(i64* %2), !insn.addr !183
%4 = ptrtoint i64* %3 to i64, !insn.addr !183
%5 = inttoptr i64 %arg3 to i64*, !insn.addr !184
%6 = call i64* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(i64* %5), !insn.addr !184
%7 = ptrtoint i64* %6 to i64, !insn.addr !184
%8 = inttoptr i64 %arg2 to i64*, !insn.addr !185
%9 = call i64** @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(i64* %8), !insn.addr !185
%10 = ptrtoint i64** %9 to i64, !insn.addr !185
call void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE17_M_construct_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESE_IJEEEEEvPSt13_Rb_tree_nodeIS3_EDpOT_(i64 %arg1, i64 %1, i64 %10, i64 %7, i64 %4), !insn.addr !186
%11 = inttoptr i64 %1 to i64*, !insn.addr !187
ret i64* %11, !insn.addr !187
}
define i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEERKS1_OT_(i64* %result, i64** %arg2, i64*** %arg3) local_unnamed_addr {
dec_label_pc_85c:
%0 = ptrtoint i64** %arg2 to i64
%1 = ptrtoint i64* %result to i64
store i64 %0, i64* %result, align 8, !insn.addr !188
%2 = bitcast i64*** %arg3 to i64*, !insn.addr !189
%3 = call i64*** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(i64* %2), !insn.addr !189
%4 = load i64**, i64*** %3, align 8, !insn.addr !190
%5 = ptrtoint i64** %4 to i64, !insn.addr !190
%6 = add i64 %1, 8, !insn.addr !191
%7 = inttoptr i64 %6 to i64*, !insn.addr !191
store i64 %5, i64* %7, align 8, !insn.addr !191
ret i64 %1, !insn.addr !192
}
define i64*** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_898:
%0 = bitcast i64* %arg1 to i64***, !insn.addr !193
ret i64*** %0, !insn.addr !193
}
define i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_S4_Lb1EEEOT_OT0_(i64* %result, i64*** %arg2, i64*** %arg3) local_unnamed_addr {
dec_label_pc_8a6:
%0 = ptrtoint i64* %result to i64
%1 = bitcast i64*** %arg2 to i64*, !insn.addr !194
%2 = call i64*** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(i64* %1), !insn.addr !194
%3 = load i64**, i64*** %2, align 8, !insn.addr !195
%4 = ptrtoint i64** %3 to i64, !insn.addr !195
store i64 %4, i64* %result, align 8, !insn.addr !196
%5 = bitcast i64*** %arg3 to i64*, !insn.addr !197
%6 = call i64*** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(i64* %5), !insn.addr !197
%7 = load i64**, i64*** %6, align 8, !insn.addr !198
%8 = ptrtoint i64** %7 to i64, !insn.addr !198
%9 = add i64 %0, 8, !insn.addr !199
%10 = inttoptr i64 %9 to i64*, !insn.addr !199
store i64 %8, i64* %10, align 8, !insn.addr !199
ret i64 %0, !insn.addr !200
}
define i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEEOT_RKS1_(i64* %result, i64*** %arg2, i64** %arg3) local_unnamed_addr {
dec_label_pc_8ea:
%0 = ptrtoint i64* %result to i64
%1 = bitcast i64*** %arg2 to i64*, !insn.addr !201
%2 = call i64*** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(i64* %1), !insn.addr !201
%3 = load i64**, i64*** %2, align 8, !insn.addr !202
%4 = ptrtoint i64** %3 to i64, !insn.addr !202
store i64 %4, i64* %result, align 8, !insn.addr !203
%5 = add i64 %0, 8, !insn.addr !204
%6 = inttoptr i64 %5 to i64*, !insn.addr !204
store i64 %4, i64* %6, align 8, !insn.addr !204
ret i64 %0, !insn.addr !205
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS3_ERS1_(i64* %result, i64 %arg2, i32* %arg3) local_unnamed_addr {
dec_label_pc_926:
%rax.1.reg2mem = alloca i64, !insn.addr !206
%rax.0.reg2mem = alloca i64, !insn.addr !206
%stack_var_-72 = alloca i64, align 8
%stack_var_-56 = alloca i64, align 8
%stack_var_-64 = alloca i64, align 8
%stack_var_-80 = alloca i64, align 8
%stack_var_-104 = alloca i64, align 8
store i64 %arg2, i64* %stack_var_-104, align 8, !insn.addr !207
%0 = call i64 @__readfsqword(i64 40), !insn.addr !208
%1 = call i64 @_ZNKSt23_Rb_tree_const_iteratorISt4pairIKiPcEE13_M_const_castEv(i64* nonnull %stack_var_-104), !insn.addr !209
store i64 %1, i64* %stack_var_-80, align 8, !insn.addr !210
%2 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_M_endEv(i64* %result), !insn.addr !211
%3 = icmp eq i64 %1, %2, !insn.addr !212
%4 = icmp eq i1 %3, false, !insn.addr !213
br i1 %4, label %dec_label_pc_a1c, label %dec_label_pc_978, !insn.addr !214
dec_label_pc_978: ; preds = %dec_label_pc_926
%5 = call i64 @_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE4sizeEv(i64* %result), !insn.addr !215
%6 = icmp eq i64 %5, 0, !insn.addr !216
br i1 %6, label %dec_label_pc_9c4, label %dec_label_pc_989, !insn.addr !217
dec_label_pc_989: ; preds = %dec_label_pc_978
%7 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_rightmostEv(i64* %result), !insn.addr !218
%8 = inttoptr i64 %7 to i64*, !insn.addr !219
%9 = load i64, i64* %8, align 8, !insn.addr !219
%10 = inttoptr i64 %9 to i64*, !insn.addr !220
%11 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %10), !insn.addr !220
%12 = inttoptr i64 %11 to i32*, !insn.addr !221
%13 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %12, i32* %arg3), !insn.addr !221
%14 = trunc i64 %13 to i8, !insn.addr !222
%15 = icmp eq i8 %14, 0, !insn.addr !222
br i1 %15, label %dec_label_pc_9c4, label %dec_label_pc_9cd, !insn.addr !223
dec_label_pc_9c4: ; preds = %dec_label_pc_989, %dec_label_pc_978
%16 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE24_M_get_insert_unique_posERS1_(i64* %result, i32* %arg3), !insn.addr !224
store i64 %16, i64* %rax.0.reg2mem, !insn.addr !225
br label %dec_label_pc_cb0, !insn.addr !225
dec_label_pc_9cd: ; preds = %dec_label_pc_989
%17 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_rightmostEv(i64* %result), !insn.addr !226
store i64 0, i64* %stack_var_-64, align 8, !insn.addr !227
%18 = bitcast i64* %stack_var_-64 to i64**, !insn.addr !228
%19 = inttoptr i64 %17 to i64***, !insn.addr !228
%20 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEERKS1_OT_(i64* nonnull %stack_var_-56, i64** nonnull %18, i64*** %19), !insn.addr !228
%21 = load i64, i64* %stack_var_-56, align 8, !insn.addr !229
store i64 %21, i64* %rax.0.reg2mem, !insn.addr !230
br label %dec_label_pc_cb0, !insn.addr !230
dec_label_pc_a1c: ; preds = %dec_label_pc_926
%22 = inttoptr i64 %1 to i64*
%23 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %22), !insn.addr !231
%24 = inttoptr i64 %23 to i32*, !insn.addr !232
%25 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %arg3, i32* %24), !insn.addr !232
%26 = trunc i64 %25 to i8, !insn.addr !233
%27 = icmp eq i8 %26, 0, !insn.addr !233
br i1 %27, label %dec_label_pc_b5a, label %dec_label_pc_a46, !insn.addr !234
dec_label_pc_a46: ; preds = %dec_label_pc_a1c
store i64 %1, i64* %stack_var_-72, align 8, !insn.addr !235
%28 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_leftmostEv(i64* %result), !insn.addr !236
%29 = inttoptr i64 %28 to i64*, !insn.addr !237
%30 = load i64, i64* %29, align 8, !insn.addr !237
%31 = icmp eq i64 %1, %30, !insn.addr !238
%32 = icmp eq i1 %31, false, !insn.addr !239
br i1 %32, label %dec_label_pc_aa8, label %dec_label_pc_a6b, !insn.addr !240
dec_label_pc_a6b: ; preds = %dec_label_pc_a46
%33 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_leftmostEv(i64* %result), !insn.addr !241
%34 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_leftmostEv(i64* %result), !insn.addr !242
%35 = inttoptr i64 %34 to i64***, !insn.addr !243
%36 = inttoptr i64 %33 to i64***, !insn.addr !243
%37 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_S4_Lb1EEEOT_OT0_(i64* nonnull %stack_var_-56, i64*** %35, i64*** %36), !insn.addr !243
%38 = load i64, i64* %stack_var_-56, align 8, !insn.addr !244
store i64 %38, i64* %rax.0.reg2mem, !insn.addr !245
br label %dec_label_pc_cb0, !insn.addr !245
dec_label_pc_aa8: ; preds = %dec_label_pc_a46
%39 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEmmEv(i64* nonnull %stack_var_-72), !insn.addr !246
%40 = inttoptr i64 %39 to i64*, !insn.addr !247
%41 = load i64, i64* %40, align 8, !insn.addr !247
%42 = inttoptr i64 %41 to i64*, !insn.addr !248
%43 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %42), !insn.addr !248
%44 = inttoptr i64 %43 to i32*, !insn.addr !249
%45 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %44, i32* %arg3), !insn.addr !249
%46 = trunc i64 %45 to i8, !insn.addr !250
%47 = icmp eq i8 %46, 0, !insn.addr !250
br i1 %47, label %dec_label_pc_b42, label %dec_label_pc_adc, !insn.addr !251
dec_label_pc_adc: ; preds = %dec_label_pc_aa8
%48 = load i64, i64* %stack_var_-72, align 8, !insn.addr !252
%49 = inttoptr i64 %48 to i64*, !insn.addr !253
%50 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPSt18_Rb_tree_node_base(i64* %49), !insn.addr !253
%51 = icmp eq i64 %50, 0, !insn.addr !254
%52 = icmp eq i1 %51, false, !insn.addr !255
br i1 %52, label %dec_label_pc_b1e, label %dec_label_pc_af2, !insn.addr !256
dec_label_pc_af2: ; preds = %dec_label_pc_adc
store i64 0, i64* %stack_var_-64, align 8, !insn.addr !257
%53 = bitcast i64* %stack_var_-64 to i64**, !insn.addr !258
%54 = bitcast i64* %stack_var_-72 to i64***, !insn.addr !258
%55 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEERKS1_OT_(i64* nonnull %stack_var_-56, i64** nonnull %53, i64*** nonnull %54), !insn.addr !258
%56 = load i64, i64* %stack_var_-56, align 8, !insn.addr !259
store i64 %56, i64* %rax.0.reg2mem, !insn.addr !260
br label %dec_label_pc_cb0, !insn.addr !260
dec_label_pc_b1e: ; preds = %dec_label_pc_adc
%57 = bitcast i64* %stack_var_-80 to i64***, !insn.addr !261
%58 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_S4_Lb1EEEOT_OT0_(i64* nonnull %stack_var_-56, i64*** nonnull %57, i64*** nonnull %57), !insn.addr !261
%59 = load i64, i64* %stack_var_-56, align 8, !insn.addr !262
store i64 %59, i64* %rax.0.reg2mem, !insn.addr !263
br label %dec_label_pc_cb0, !insn.addr !263
dec_label_pc_b42: ; preds = %dec_label_pc_aa8
%60 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE24_M_get_insert_unique_posERS1_(i64* %result, i32* %arg3), !insn.addr !264
store i64 %60, i64* %rax.0.reg2mem, !insn.addr !265
br label %dec_label_pc_cb0, !insn.addr !265
dec_label_pc_b5a: ; preds = %dec_label_pc_a1c
%61 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %22), !insn.addr !266
%62 = inttoptr i64 %61 to i32*, !insn.addr !267
%63 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %62, i32* %arg3), !insn.addr !267
%64 = trunc i64 %63 to i8, !insn.addr !268
%65 = icmp eq i8 %64, 0, !insn.addr !268
br i1 %65, label %dec_label_pc_c89, label %dec_label_pc_b87, !insn.addr !269
dec_label_pc_b87: ; preds = %dec_label_pc_b5a
%66 = load i64, i64* %stack_var_-80, align 8
store i64 %66, i64* %stack_var_-72, align 8, !insn.addr !270
%67 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_rightmostEv(i64* %result), !insn.addr !271
%68 = inttoptr i64 %67 to i64*, !insn.addr !272
%69 = load i64, i64* %68, align 8, !insn.addr !272
%70 = icmp eq i64 %66, %69, !insn.addr !273
%71 = icmp eq i1 %70, false, !insn.addr !274
br i1 %71, label %dec_label_pc_be3, label %dec_label_pc_bac, !insn.addr !275
dec_label_pc_bac: ; preds = %dec_label_pc_b87
%72 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_rightmostEv(i64* %result), !insn.addr !276
store i64 0, i64* %stack_var_-64, align 8, !insn.addr !277
%73 = bitcast i64* %stack_var_-64 to i64**, !insn.addr !278
%74 = inttoptr i64 %72 to i64***, !insn.addr !278
%75 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEERKS1_OT_(i64* nonnull %stack_var_-56, i64** nonnull %73, i64*** %74), !insn.addr !278
%76 = load i64, i64* %stack_var_-56, align 8, !insn.addr !279
store i64 %76, i64* %rax.0.reg2mem, !insn.addr !280
br label %dec_label_pc_cb0, !insn.addr !280
dec_label_pc_be3: ; preds = %dec_label_pc_b87
%77 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEppEv(i64* nonnull %stack_var_-72), !insn.addr !281
%78 = inttoptr i64 %77 to i64*, !insn.addr !282
%79 = load i64, i64* %78, align 8, !insn.addr !282
%80 = inttoptr i64 %79 to i64*, !insn.addr !283
%81 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %80), !insn.addr !283
%82 = inttoptr i64 %81 to i32*, !insn.addr !284
%83 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %arg3, i32* %82), !insn.addr !284
%84 = trunc i64 %83 to i8, !insn.addr !285
%85 = icmp eq i8 %84, 0, !insn.addr !285
br i1 %85, label %dec_label_pc_c74, label %dec_label_pc_c14, !insn.addr !286
dec_label_pc_c14: ; preds = %dec_label_pc_be3
%86 = load i64, i64* %stack_var_-80, align 8, !insn.addr !287
%87 = inttoptr i64 %86 to i64*, !insn.addr !288
%88 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPSt18_Rb_tree_node_base(i64* %87), !insn.addr !288
%89 = icmp eq i64 %88, 0, !insn.addr !289
%90 = icmp eq i1 %89, false, !insn.addr !290
br i1 %90, label %dec_label_pc_c53, label %dec_label_pc_c2a, !insn.addr !291
dec_label_pc_c2a: ; preds = %dec_label_pc_c14
store i64 0, i64* %stack_var_-64, align 8, !insn.addr !292
%91 = bitcast i64* %stack_var_-64 to i64**, !insn.addr !293
%92 = bitcast i64* %stack_var_-80 to i64***, !insn.addr !293
%93 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEERKS1_OT_(i64* nonnull %stack_var_-56, i64** nonnull %91, i64*** nonnull %92), !insn.addr !293
%94 = load i64, i64* %stack_var_-56, align 8, !insn.addr !294
store i64 %94, i64* %rax.0.reg2mem, !insn.addr !295
br label %dec_label_pc_cb0, !insn.addr !295
dec_label_pc_c53: ; preds = %dec_label_pc_c14
%95 = bitcast i64* %stack_var_-72 to i64***, !insn.addr !296
%96 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_S4_Lb1EEEOT_OT0_(i64* nonnull %stack_var_-56, i64*** nonnull %95, i64*** nonnull %95), !insn.addr !296
%97 = load i64, i64* %stack_var_-56, align 8, !insn.addr !297
store i64 %97, i64* %rax.0.reg2mem, !insn.addr !298
br label %dec_label_pc_cb0, !insn.addr !298
dec_label_pc_c74: ; preds = %dec_label_pc_be3
%98 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE24_M_get_insert_unique_posERS1_(i64* %result, i32* %arg3), !insn.addr !299
store i64 %98, i64* %rax.0.reg2mem, !insn.addr !300
br label %dec_label_pc_cb0, !insn.addr !300
dec_label_pc_c89: ; preds = %dec_label_pc_b5a
store i64 0, i64* %stack_var_-64, align 8, !insn.addr !301
%99 = bitcast i64* %stack_var_-80 to i64***, !insn.addr !302
%100 = bitcast i64* %stack_var_-64 to i64**, !insn.addr !302
%101 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEEOT_RKS1_(i64* nonnull %stack_var_-56, i64*** nonnull %99, i64** nonnull %100), !insn.addr !302
%102 = load i64, i64* %stack_var_-56, align 8, !insn.addr !303
store i64 %102, i64* %rax.0.reg2mem, !insn.addr !304
br label %dec_label_pc_cb0, !insn.addr !304
dec_label_pc_cb0: ; preds = %dec_label_pc_c89, %dec_label_pc_c74, %dec_label_pc_c53, %dec_label_pc_c2a, %dec_label_pc_bac, %dec_label_pc_b42, %dec_label_pc_b1e, %dec_label_pc_af2, %dec_label_pc_a6b, %dec_label_pc_9c4, %dec_label_pc_9cd
%rax.0.reload = load i64, i64* %rax.0.reg2mem
%103 = call i64 @__readfsqword(i64 40), !insn.addr !305
%104 = icmp eq i64 %0, %103, !insn.addr !305
store i64 %rax.0.reload, i64* %rax.1.reg2mem, !insn.addr !306
br i1 %104, label %dec_label_pc_cc4, label %dec_label_pc_cbf, !insn.addr !306
dec_label_pc_cbf: ; preds = %dec_label_pc_cb0
%105 = call i64 @__stack_chk_fail(), !insn.addr !307
store i64 %105, i64* %rax.1.reg2mem, !insn.addr !307
br label %dec_label_pc_cc4, !insn.addr !307
dec_label_pc_cc4: ; preds = %dec_label_pc_cbf, %dec_label_pc_cb0
%rax.1.reload = load i64, i64* %rax.1.reg2mem
ret i64 %rax.1.reload, !insn.addr !308
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt13_Rb_tree_nodeIS3_E(i64* %arg1) local_unnamed_addr {
dec_label_pc_ccb:
%rax.0.reg2mem = alloca i64, !insn.addr !309
%stack_var_-17 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !310
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_valueEPKSt13_Rb_tree_nodeIS3_E(i64* %arg1), !insn.addr !311
%2 = inttoptr i64 %1 to i64*, !insn.addr !312
%3 = call i64 @_ZNKSt10_Select1stISt4pairIKiPcEEclERKS3_(i64* nonnull %stack_var_-17, i64* %2), !insn.addr !312
%4 = call i64 @__readfsqword(i64 40), !insn.addr !313
%5 = icmp eq i64 %0, %4, !insn.addr !313
store i64 %3, i64* %rax.0.reg2mem, !insn.addr !314
br i1 %5, label %dec_label_pc_d18, label %dec_label_pc_d13, !insn.addr !314
dec_label_pc_d13: ; preds = %dec_label_pc_ccb
%6 = call i64 @__stack_chk_fail(), !insn.addr !315
store i64 %6, i64* %rax.0.reg2mem, !insn.addr !315
br label %dec_label_pc_d18, !insn.addr !315
dec_label_pc_d18: ; preds = %dec_label_pc_d13, %dec_label_pc_ccb
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !316
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_insert_nodeEPSt18_Rb_tree_node_baseSB_PSt13_Rb_tree_nodeIS3_E(i64* %result, i64* %arg2, i64* %arg3, i64* %arg4) local_unnamed_addr {
dec_label_pc_d1a:
%rax.0.reg2mem = alloca i64, !insn.addr !317
%storemerge.reg2mem = alloca i1, !insn.addr !317
%stack_var_-40 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !318
%1 = icmp eq i64* %arg2, null, !insn.addr !319
%2 = icmp eq i1 %1, false, !insn.addr !320
store i1 true, i1* %storemerge.reg2mem, !insn.addr !320
br i1 %2, label %dec_label_pc_d9a, label %dec_label_pc_d4b, !insn.addr !320
dec_label_pc_d4b: ; preds = %dec_label_pc_d1a
%3 = ptrtoint i64* %arg3 to i64
%4 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_M_endEv(i64* %result), !insn.addr !321
%5 = icmp eq i64 %4, %3, !insn.addr !322
store i1 true, i1* %storemerge.reg2mem, !insn.addr !323
br i1 %5, label %dec_label_pc_d9a, label %dec_label_pc_d5d, !insn.addr !323
dec_label_pc_d5d: ; preds = %dec_label_pc_d4b
%6 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %arg3), !insn.addr !324
%7 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt13_Rb_tree_nodeIS3_E(i64* %arg4), !insn.addr !325
%8 = inttoptr i64 %7 to i32*, !insn.addr !326
%9 = inttoptr i64 %6 to i32*, !insn.addr !326
%10 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %8, i32* %9), !insn.addr !326
%11 = trunc i64 %10 to i8, !insn.addr !327
%12 = icmp ne i8 %11, 0, !insn.addr !327
store i1 %12, i1* %storemerge.reg2mem
br label %dec_label_pc_d9a
dec_label_pc_d9a: ; preds = %dec_label_pc_d5d, %dec_label_pc_d1a, %dec_label_pc_d4b
%13 = ptrtoint i64* %result to i64
%storemerge.reload = load i1, i1* %storemerge.reg2mem
%14 = add i64 %13, 8, !insn.addr !328
%15 = inttoptr i64 %14 to i64*, !insn.addr !329
%16 = call i64 @_ZSt29_Rb_tree_insert_and_rebalancebPSt18_Rb_tree_node_baseS0_RS_(i1 %storemerge.reload, i64* %arg4, i64* %arg3, i64* %15), !insn.addr !329
%17 = add i64 %13, 40, !insn.addr !330
%18 = inttoptr i64 %17 to i64*, !insn.addr !330
%19 = load i64, i64* %18, align 8, !insn.addr !330
%20 = add i64 %19, 1, !insn.addr !331
store i64 %20, i64* %18, align 8, !insn.addr !332
%21 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-40, i64* %arg4), !insn.addr !333
%22 = load i64, i64* %stack_var_-40, align 8, !insn.addr !334
%23 = call i64 @__readfsqword(i64 40), !insn.addr !335
%24 = icmp eq i64 %0, %23, !insn.addr !335
store i64 %22, i64* %rax.0.reg2mem, !insn.addr !336
br i1 %24, label %dec_label_pc_df7, label %dec_label_pc_df2, !insn.addr !336
dec_label_pc_df2: ; preds = %dec_label_pc_d9a
%25 = call i64 @__stack_chk_fail(), !insn.addr !337
store i64 %25, i64* %rax.0.reg2mem, !insn.addr !337
br label %dec_label_pc_df7, !insn.addr !337
dec_label_pc_df7: ; preds = %dec_label_pc_df2, %dec_label_pc_d9a
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !338
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_drop_nodeEPSt13_Rb_tree_nodeIS3_E(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_e00:
%0 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE15_M_destroy_nodeEPSt13_Rb_tree_nodeIS3_E(i64* %result, i64* %arg2), !insn.addr !339
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_put_nodeEPSt13_Rb_tree_nodeIS3_E(i64* %result, i64* %arg2), !insn.addr !340
ret i64 %1, !insn.addr !341
}
define i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC1EPSt18_Rb_tree_node_base(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_e3a:
%0 = ptrtoint i64* %arg2 to i64
%1 = ptrtoint i64* %result to i64
store i64 %0, i64* %result, align 8, !insn.addr !342
ret i64 %1, !insn.addr !343
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_M_beginEv(i64* %result) local_unnamed_addr {
dec_label_pc_e54:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 16, !insn.addr !344
%2 = inttoptr i64 %1 to i64*, !insn.addr !344
%3 = load i64, i64* %2, align 8, !insn.addr !344
ret i64 %3, !insn.addr !345
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_M_endEv(i64* %result) local_unnamed_addr {
dec_label_pc_e66:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 8, !insn.addr !346
ret i64 %1, !insn.addr !347
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_lower_boundEPSt13_Rb_tree_nodeIS3_EPSt18_Rb_tree_node_baseRS1_(i64* %result, i64* %arg2, i64* %arg3, i32* %arg4) local_unnamed_addr {
dec_label_pc_e78:
%rax.0.reg2mem = alloca i64, !insn.addr !348
%stack_var_-64.0.ph.lcssa.reg2mem = alloca i64, !insn.addr !348
%stack_var_-56.03.reg2mem = alloca i64, !insn.addr !348
%stack_var_-56.0.ph5.reg2mem = alloca i64, !insn.addr !348
%stack_var_-64.0.ph6.reg2mem = alloca i64, !insn.addr !348
%0 = ptrtoint i64* %arg3 to i64
%stack_var_-40 = alloca i64, align 8
%1 = call i64 @__readfsqword(i64 40), !insn.addr !349
%2 = icmp eq i64* %arg2, null, !insn.addr !350
store i64 %0, i64* %stack_var_-64.0.ph.lcssa.reg2mem, !insn.addr !351
br i1 %2, label %dec_label_pc_eff, label %dec_label_pc_ea7.lr.ph.lr.ph, !insn.addr !351
dec_label_pc_ea7.lr.ph.lr.ph: ; preds = %dec_label_pc_e78
%3 = ptrtoint i64* %arg2 to i64
store i64 %0, i64* %stack_var_-64.0.ph6.reg2mem
store i64 %3, i64* %stack_var_-56.0.ph5.reg2mem
br label %dec_label_pc_ea7.lr.ph
dec_label_pc_ea7.lr.ph: ; preds = %dec_label_pc_ea7.lr.ph.lr.ph, %dec_label_pc_ed3
%stack_var_-56.0.ph5.reload = load i64, i64* %stack_var_-56.0.ph5.reg2mem
%stack_var_-64.0.ph6.reload = load i64, i64* %stack_var_-64.0.ph6.reg2mem
store i64 %stack_var_-56.0.ph5.reload, i64* %stack_var_-56.03.reg2mem
br label %dec_label_pc_ea7
dec_label_pc_ea7: ; preds = %dec_label_pc_ea7.lr.ph, %dec_label_pc_eed
%stack_var_-56.03.reload = load i64, i64* %stack_var_-56.03.reg2mem
%4 = inttoptr i64 %stack_var_-56.03.reload to i64*
%5 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt13_Rb_tree_nodeIS3_E(i64* %4), !insn.addr !352
%6 = inttoptr i64 %5 to i32*, !insn.addr !353
%7 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %6, i32* %arg4), !insn.addr !353
%8 = trunc i64 %7 to i8
%9 = icmp eq i8 %8, 1, !insn.addr !354
br i1 %9, label %dec_label_pc_eed, label %dec_label_pc_ed3, !insn.addr !355
dec_label_pc_ed3: ; preds = %dec_label_pc_ea7
%10 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_S_leftEPSt18_Rb_tree_node_base(i64* %4), !insn.addr !356
%11 = icmp eq i64 %10, 0, !insn.addr !350
store i64 %stack_var_-56.03.reload, i64* %stack_var_-64.0.ph6.reg2mem, !insn.addr !351
store i64 %10, i64* %stack_var_-56.0.ph5.reg2mem, !insn.addr !351
store i64 %stack_var_-56.03.reload, i64* %stack_var_-64.0.ph.lcssa.reg2mem, !insn.addr !351
br i1 %11, label %dec_label_pc_eff, label %dec_label_pc_ea7.lr.ph, !insn.addr !351
dec_label_pc_eed: ; preds = %dec_label_pc_ea7
%12 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPSt18_Rb_tree_node_base(i64* %4), !insn.addr !357
%13 = icmp eq i64 %12, 0, !insn.addr !350
store i64 %12, i64* %stack_var_-56.03.reg2mem, !insn.addr !351
store i64 %stack_var_-64.0.ph6.reload, i64* %stack_var_-64.0.ph.lcssa.reg2mem, !insn.addr !351
br i1 %13, label %dec_label_pc_eff, label %dec_label_pc_ea7, !insn.addr !351
dec_label_pc_eff: ; preds = %dec_label_pc_ed3, %dec_label_pc_eed, %dec_label_pc_e78
%stack_var_-64.0.ph.lcssa.reload = load i64, i64* %stack_var_-64.0.ph.lcssa.reg2mem
%14 = inttoptr i64 %stack_var_-64.0.ph.lcssa.reload to i64*, !insn.addr !358
%15 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-40, i64* %14), !insn.addr !358
%16 = load i64, i64* %stack_var_-40, align 8, !insn.addr !359
%17 = call i64 @__readfsqword(i64 40), !insn.addr !360
%18 = icmp eq i64 %1, %17, !insn.addr !360
store i64 %16, i64* %rax.0.reg2mem, !insn.addr !361
br i1 %18, label %dec_label_pc_f2a, label %dec_label_pc_f25, !insn.addr !361
dec_label_pc_f25: ; preds = %dec_label_pc_eff
%19 = call i64 @__stack_chk_fail(), !insn.addr !362
store i64 %19, i64* %rax.0.reg2mem, !insn.addr !362
br label %dec_label_pc_f2a, !insn.addr !362
dec_label_pc_f2a: ; preds = %dec_label_pc_f25, %dec_label_pc_eff
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !363
}
define i64 @_ZN9__gnu_cxx16__aligned_membufISt4pairIKiPcEE6_M_ptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_f32:
%0 = call i64 @_ZN9__gnu_cxx16__aligned_membufISt4pairIKiPcEE7_M_addrEv(i64* %result), !insn.addr !364
ret i64 %0, !insn.addr !365
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_get_nodeEv(i64* %result) local_unnamed_addr {
dec_label_pc_f4c:
%0 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE21_M_get_Node_allocatorEv(i64* %result), !insn.addr !366
%1 = inttoptr i64 %0 to i64*, !insn.addr !367
%2 = call i64 @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE8allocateERS6_m(i64* %1, i64 1), !insn.addr !367
ret i64 %2, !insn.addr !368
}
define void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE17_M_construct_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESE_IJEEEEEvPSt13_Rb_tree_nodeIS3_EDpOT_(i64 %arg1, i64 %arg2, i64 %arg3, i64 %arg4, i64 %arg5) local_unnamed_addr {
dec_label_pc_f74:
%0 = inttoptr i64 %arg2 to i64*, !insn.addr !369
%1 = call i64 @_ZnwmPv(i64 48, i64* %0), !insn.addr !369
%2 = inttoptr i64 %arg5 to i64*, !insn.addr !370
%3 = call i64* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(i64* %2), !insn.addr !370
%4 = ptrtoint i64* %3 to i64, !insn.addr !370
%5 = inttoptr i64 %arg4 to i64*, !insn.addr !371
%6 = call i64* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(i64* %5), !insn.addr !371
%7 = inttoptr i64 %arg3 to i64*, !insn.addr !372
%8 = call i64** @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(i64* %7), !insn.addr !372
%9 = call i64 @_ZNSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(i64* %0), !insn.addr !373
%10 = inttoptr i64 %arg1 to i64*, !insn.addr !374
%11 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE21_M_get_Node_allocatorEv(i64* %10), !insn.addr !374
%12 = inttoptr i64 %11 to i64*, !insn.addr !375
%13 = inttoptr i64 %9 to i64*, !insn.addr !375
%14 = bitcast i64** %8 to i64*, !insn.addr !375
call void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE9constructIS4_JRKSt21piecewise_construct_tSt5tupleIJOiEESC_IJEEEEEvRS6_PT_DpOT0_(i64* %12, i64* %13, i64* %14, i64* %6, i64 %4), !insn.addr !375
ret void, !insn.addr !376
}
define i64 @_ZNKSt23_Rb_tree_const_iteratorISt4pairIKiPcEE13_M_const_castEv(i64* %result) local_unnamed_addr {
dec_label_pc_1068:
%rax.0.reg2mem = alloca i64, !insn.addr !377
%stack_var_-24 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !378
%1 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-24, i64* %result), !insn.addr !379
%2 = load i64, i64* %stack_var_-24, align 8, !insn.addr !380
%3 = call i64 @__readfsqword(i64 40), !insn.addr !381
%4 = icmp eq i64 %0, %3, !insn.addr !381
store i64 %2, i64* %rax.0.reg2mem, !insn.addr !382
br i1 %4, label %dec_label_pc_10b1, label %dec_label_pc_10ac, !insn.addr !382
dec_label_pc_10ac: ; preds = %dec_label_pc_1068
%5 = call i64 @__stack_chk_fail(), !insn.addr !383
store i64 %5, i64* %rax.0.reg2mem, !insn.addr !383
br label %dec_label_pc_10b1, !insn.addr !383
dec_label_pc_10b1: ; preds = %dec_label_pc_10ac, %dec_label_pc_1068
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !384
}
define i64 @_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE4sizeEv(i64* %result) local_unnamed_addr {
dec_label_pc_10b4:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 40, !insn.addr !385
%2 = inttoptr i64 %1 to i64*, !insn.addr !385
%3 = load i64, i64* %2, align 8, !insn.addr !385
ret i64 %3, !insn.addr !386
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_rightmostEv(i64* %result) local_unnamed_addr {
dec_label_pc_10c6:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 32, !insn.addr !387
ret i64 %1, !insn.addr !388
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %arg1) local_unnamed_addr {
dec_label_pc_10d8:
%rax.0.reg2mem = alloca i64, !insn.addr !389
%stack_var_-17 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !390
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_valueEPKSt18_Rb_tree_node_base(i64* %arg1), !insn.addr !391
%2 = inttoptr i64 %1 to i64*, !insn.addr !392
%3 = call i64 @_ZNKSt10_Select1stISt4pairIKiPcEEclERKS3_(i64* nonnull %stack_var_-17, i64* %2), !insn.addr !392
%4 = call i64 @__readfsqword(i64 40), !insn.addr !393
%5 = icmp eq i64 %0, %4, !insn.addr !393
store i64 %3, i64* %rax.0.reg2mem, !insn.addr !394
br i1 %5, label %dec_label_pc_1125, label %dec_label_pc_1120, !insn.addr !394
dec_label_pc_1120: ; preds = %dec_label_pc_10d8
%6 = call i64 @__stack_chk_fail(), !insn.addr !395
store i64 %6, i64* %rax.0.reg2mem, !insn.addr !395
br label %dec_label_pc_1125, !insn.addr !395
dec_label_pc_1125: ; preds = %dec_label_pc_1120, %dec_label_pc_10d8
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !396
}
define i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRPSt13_Rb_tree_nodeIS_IKiPcEERS1_Lb1EEEOT_OT0_(i64* %result, i64*** %arg2, i64*** %arg3) local_unnamed_addr {
dec_label_pc_1128:
%0 = ptrtoint i64* %result to i64
%1 = bitcast i64*** %arg2 to i64*, !insn.addr !397
%2 = call i64*** @_ZSt7forwardIRPSt13_Rb_tree_nodeISt4pairIKiPcEEEOT_RNSt16remove_referenceIS8_E4typeE(i64* %1), !insn.addr !397
%3 = load i64**, i64*** %2, align 8, !insn.addr !398
%4 = ptrtoint i64** %3 to i64, !insn.addr !398
store i64 %4, i64* %result, align 8, !insn.addr !399
%5 = bitcast i64*** %arg3 to i64*, !insn.addr !400
%6 = call i64*** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(i64* %5), !insn.addr !400
%7 = load i64**, i64*** %6, align 8, !insn.addr !401
%8 = ptrtoint i64** %7 to i64, !insn.addr !401
%9 = add i64 %0, 8, !insn.addr !402
%10 = inttoptr i64 %9 to i64*, !insn.addr !402
store i64 %8, i64* %10, align 8, !insn.addr !402
ret i64 %0, !insn.addr !403
}
define i64*** @_ZSt7forwardIRPSt13_Rb_tree_nodeISt4pairIKiPcEEEOT_RNSt16remove_referenceIS8_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_116c:
%0 = bitcast i64* %arg1 to i64***, !insn.addr !404
ret i64*** %0, !insn.addr !404
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE24_M_get_insert_unique_posERS1_(i64* %result, i32* %arg2) local_unnamed_addr {
dec_label_pc_117a:
%rax.1.reg2mem = alloca i64, !insn.addr !405
%storemerge.reg2mem = alloca i64, !insn.addr !405
%.reg2mem = alloca i64, !insn.addr !405
%stack_var_-64 = alloca i64, align 8
%stack_var_-56 = alloca i64, align 8
%stack_var_-72 = alloca i64, align 8
%stack_var_-80 = alloca i64, align 8
%stack_var_-88 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !406
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_M_beginEv(i64* %result)
store i64 %1, i64* %stack_var_-88, align 8, !insn.addr !407
%2 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_M_endEv(i64* %result), !insn.addr !408
store i64 %2, i64* %stack_var_-80, align 8, !insn.addr !409
%3 = icmp eq i64 %1, 0, !insn.addr !410
store i64 %1, i64* %.reg2mem, !insn.addr !411
br i1 %3, label %dec_label_pc_121a.thread, label %dec_label_pc_11c7, !insn.addr !411
dec_label_pc_121a.thread: ; preds = %dec_label_pc_117a
%4 = inttoptr i64 %2 to i64*, !insn.addr !412
%5 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-72, i64* %4), !insn.addr !412
br label %dec_label_pc_1233
dec_label_pc_11c7: ; preds = %dec_label_pc_117a, %dec_label_pc_1214
%.reload = load i64, i64* %.reg2mem
store i64 %.reload, i64* %stack_var_-80, align 8, !insn.addr !413
%6 = inttoptr i64 %.reload to i64*, !insn.addr !414
%7 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt13_Rb_tree_nodeIS3_E(i64* %6), !insn.addr !414
%8 = inttoptr i64 %7 to i32*, !insn.addr !415
%9 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %arg2, i32* %8), !insn.addr !415
%10 = trunc i64 %9 to i8
%11 = icmp eq i8 %10, 0
%12 = load i64, i64* %stack_var_-88, align 8
%13 = inttoptr i64 %12 to i64*
br i1 %11, label %dec_label_pc_1208, label %dec_label_pc_11fa, !insn.addr !416
dec_label_pc_11fa: ; preds = %dec_label_pc_11c7
%14 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_S_leftEPSt18_Rb_tree_node_base(i64* %13), !insn.addr !417
store i64 %14, i64* %storemerge.reg2mem, !insn.addr !418
br label %dec_label_pc_1214, !insn.addr !418
dec_label_pc_1208: ; preds = %dec_label_pc_11c7
%15 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPSt18_Rb_tree_node_base(i64* %13), !insn.addr !419
store i64 %15, i64* %storemerge.reg2mem, !insn.addr !419
br label %dec_label_pc_1214, !insn.addr !419
dec_label_pc_1214: ; preds = %dec_label_pc_1208, %dec_label_pc_11fa
%storemerge.reload = load i64, i64* %storemerge.reg2mem
store i64 %storemerge.reload, i64* %stack_var_-88, align 8, !insn.addr !420
%16 = icmp eq i64 %storemerge.reload, 0, !insn.addr !410
store i64 %storemerge.reload, i64* %.reg2mem, !insn.addr !411
br i1 %16, label %dec_label_pc_121a, label %dec_label_pc_11c7, !insn.addr !411
dec_label_pc_121a: ; preds = %dec_label_pc_1214
%.pre = load i64, i64* %stack_var_-80, align 8
%17 = inttoptr i64 %.pre to i64*, !insn.addr !412
%18 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-72, i64* %17), !insn.addr !412
br i1 %11, label %dec_label_pc_1287, label %dec_label_pc_1233, !insn.addr !421
dec_label_pc_1233: ; preds = %dec_label_pc_121a.thread, %dec_label_pc_121a
%19 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE5beginEv(i64* %result), !insn.addr !422
store i64 %19, i64* %stack_var_-56, align 8, !insn.addr !423
%20 = call i64 @_ZNKSt17_Rb_tree_iteratorISt4pairIKiPcEEeqERKS4_(i64* nonnull %stack_var_-72, i64* nonnull %stack_var_-56), !insn.addr !424
%21 = trunc i64 %20 to i8, !insn.addr !425
%22 = icmp eq i8 %21, 0, !insn.addr !425
br i1 %22, label %dec_label_pc_127b, label %dec_label_pc_125a, !insn.addr !426
dec_label_pc_125a: ; preds = %dec_label_pc_1233
%23 = bitcast i64* %stack_var_-88 to i64***, !insn.addr !427
%24 = bitcast i64* %stack_var_-80 to i64***, !insn.addr !427
%25 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRPSt13_Rb_tree_nodeIS_IKiPcEERS1_Lb1EEEOT_OT0_(i64* nonnull %stack_var_-56, i64*** nonnull %23, i64*** nonnull %24), !insn.addr !427
br label %dec_label_pc_12f8, !insn.addr !428
dec_label_pc_127b: ; preds = %dec_label_pc_1233
%26 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEmmEv(i64* nonnull %stack_var_-72), !insn.addr !429
br label %dec_label_pc_1287, !insn.addr !429
dec_label_pc_1287: ; preds = %dec_label_pc_127b, %dec_label_pc_121a
%27 = load i64, i64* %stack_var_-72, align 8, !insn.addr !430
%28 = inttoptr i64 %27 to i64*, !insn.addr !431
%29 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(i64* %28), !insn.addr !431
%30 = inttoptr i64 %29 to i32*, !insn.addr !432
%31 = call i64 @_ZNKSt4lessIiEclERKiS2_(i64* %result, i32* %30, i32* %arg2), !insn.addr !432
%32 = trunc i64 %31 to i8, !insn.addr !433
%33 = icmp eq i8 %32, 0, !insn.addr !433
br i1 %33, label %dec_label_pc_12d1, label %dec_label_pc_12b0, !insn.addr !434
dec_label_pc_12b0: ; preds = %dec_label_pc_1287
%34 = bitcast i64* %stack_var_-88 to i64***, !insn.addr !435
%35 = bitcast i64* %stack_var_-80 to i64***, !insn.addr !435
%36 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRPSt13_Rb_tree_nodeIS_IKiPcEERS1_Lb1EEEOT_OT0_(i64* nonnull %stack_var_-56, i64*** nonnull %34, i64*** nonnull %35), !insn.addr !435
br label %dec_label_pc_12f8, !insn.addr !436
dec_label_pc_12d1: ; preds = %dec_label_pc_1287
store i64 0, i64* %stack_var_-64, align 8, !insn.addr !437
%37 = bitcast i64* %stack_var_-72 to i64***, !insn.addr !438
%38 = bitcast i64* %stack_var_-64 to i64**, !insn.addr !438
%39 = call i64 @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC1IRS1_Lb1EEEOT_RKS1_(i64* nonnull %stack_var_-56, i64*** nonnull %37, i64** nonnull %38), !insn.addr !438
br label %dec_label_pc_12f8, !insn.addr !439
dec_label_pc_12f8: ; preds = %dec_label_pc_12d1, %dec_label_pc_12b0, %dec_label_pc_125a
%rax.0 = load i64, i64* %stack_var_-56, align 8
%40 = call i64 @__readfsqword(i64 40), !insn.addr !440
%41 = icmp eq i64 %0, %40, !insn.addr !440
store i64 %rax.0, i64* %rax.1.reg2mem, !insn.addr !441
br i1 %41, label %dec_label_pc_130c, label %dec_label_pc_1307, !insn.addr !441
dec_label_pc_1307: ; preds = %dec_label_pc_12f8
%42 = call i64 @__stack_chk_fail(), !insn.addr !442
store i64 %42, i64* %rax.1.reg2mem, !insn.addr !442
br label %dec_label_pc_130c, !insn.addr !442
dec_label_pc_130c: ; preds = %dec_label_pc_1307, %dec_label_pc_12f8
%rax.1.reload = load i64, i64* %rax.1.reg2mem
ret i64 %rax.1.reload, !insn.addr !443
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_leftmostEv(i64* %result) local_unnamed_addr {
dec_label_pc_1314:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 24, !insn.addr !444
ret i64 %1, !insn.addr !445
}
define i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEmmEv(i64* %result) local_unnamed_addr {
dec_label_pc_1326:
%0 = ptrtoint i64* %result to i64
%1 = call i64 @_ZSt18_Rb_tree_decrementPSt18_Rb_tree_node_base(i64* %result), !insn.addr !446
store i64 %1, i64* %result, align 8, !insn.addr !447
ret i64 %0, !insn.addr !448
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPSt18_Rb_tree_node_base(i64* %arg1) local_unnamed_addr {
dec_label_pc_1351:
%0 = ptrtoint i64* %arg1 to i64
%1 = add i64 %0, 24, !insn.addr !449
%2 = inttoptr i64 %1 to i64*, !insn.addr !449
%3 = load i64, i64* %2, align 8, !insn.addr !449
ret i64 %3, !insn.addr !450
}
define i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEppEv(i64* %result) local_unnamed_addr {
dec_label_pc_1364:
%0 = ptrtoint i64* %result to i64
%1 = call i64 @_ZSt18_Rb_tree_incrementPSt18_Rb_tree_node_base(i64* %result), !insn.addr !451
store i64 %1, i64* %result, align 8, !insn.addr !452
ret i64 %0, !insn.addr !453
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_valueEPKSt13_Rb_tree_nodeIS3_E(i64* %arg1) local_unnamed_addr {
dec_label_pc_138f:
%0 = call i64 @_ZNKSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(i64* %arg1), !insn.addr !454
ret i64 %0, !insn.addr !455
}
define i64 @_ZNKSt10_Select1stISt4pairIKiPcEEclERKS3_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_13aa:
%0 = ptrtoint i64* %arg2 to i64
ret i64 %0, !insn.addr !456
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE15_M_destroy_nodeEPSt13_Rb_tree_nodeIS3_E(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_13bc:
%0 = call i64 @_ZNSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(i64* %arg2), !insn.addr !457
%1 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE21_M_get_Node_allocatorEv(i64* %result), !insn.addr !458
%2 = inttoptr i64 %1 to i64*, !insn.addr !459
%3 = inttoptr i64 %0 to i64*, !insn.addr !459
call void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE7destroyIS4_EEvRS6_PT_(i64* %2, i64* %3), !insn.addr !459
ret i64 ptrtoint (i32* @0 to i64), !insn.addr !460
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_put_nodeEPSt13_Rb_tree_nodeIS3_E(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_1400:
%0 = call i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE21_M_get_Node_allocatorEv(i64* %result), !insn.addr !461
%1 = inttoptr i64 %0 to i64*, !insn.addr !462
%2 = call i64 @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE10deallocateERS6_PS5_m(i64* %1, i64* %arg2, i64 1), !insn.addr !462
ret i64 %2, !insn.addr !463
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_S_leftEPSt18_Rb_tree_node_base(i64* %arg1) local_unnamed_addr {
dec_label_pc_143a:
%0 = ptrtoint i64* %arg1 to i64
%1 = add i64 %0, 16, !insn.addr !464
%2 = inttoptr i64 %1 to i64*, !insn.addr !464
%3 = load i64, i64* %2, align 8, !insn.addr !464
ret i64 %3, !insn.addr !465
}
define i64 @_ZN9__gnu_cxx16__aligned_membufISt4pairIKiPcEE7_M_addrEv(i64* %result) local_unnamed_addr {
dec_label_pc_144c:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !466
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE21_M_get_Node_allocatorEv(i64* %result) local_unnamed_addr {
dec_label_pc_145a:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !467
}
define i64 @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE8allocateERS6_m(i64* %arg1, i64 %arg2) local_unnamed_addr {
dec_label_pc_1468:
%0 = call i64 @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE8allocateEmPKv(i64* %arg1, i64 %arg2, i64* null), !insn.addr !468
ret i64 %0, !insn.addr !469
}
define void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE9constructIS4_JRKSt21piecewise_construct_tSt5tupleIJOiEESC_IJEEEEEvRS6_PT_DpOT0_(i64* %this, i64* %result, i64* %arg3, i64* %arg4, i64 %arg5) local_unnamed_addr {
dec_label_pc_1492:
%0 = ptrtoint i64* %result to i64
%1 = ptrtoint i64* %this to i64
%2 = inttoptr i64 %arg5 to i64*, !insn.addr !470
%3 = call i64* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(i64* %2), !insn.addr !470
%4 = ptrtoint i64* %3 to i64, !insn.addr !470
%5 = call i64* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(i64* %arg4), !insn.addr !471
%6 = ptrtoint i64* %5 to i64, !insn.addr !471
%7 = call i64** @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(i64* %arg3), !insn.addr !472
%8 = ptrtoint i64** %7 to i64, !insn.addr !472
call void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE9constructIS5_JRKSt21piecewise_construct_tSt5tupleIJOiEESC_IJEEEEEvPT_DpOT0_(i64 %1, i64 %0, i64 %8, i64 %6, i64 %4), !insn.addr !473
ret void, !insn.addr !474
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_valueEPKSt18_Rb_tree_node_base(i64* %arg1) local_unnamed_addr {
dec_label_pc_14fe:
%0 = call i64 @_ZNKSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(i64* %arg1), !insn.addr !475
ret i64 %0, !insn.addr !476
}
define i64 @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE5beginEv(i64* %result) local_unnamed_addr {
dec_label_pc_1518:
%rax.0.reg2mem = alloca i64, !insn.addr !477
%0 = ptrtoint i64* %result to i64
%stack_var_-24 = alloca i64, align 8
%1 = call i64 @__readfsqword(i64 40), !insn.addr !478
%2 = add i64 %0, 24, !insn.addr !479
%3 = inttoptr i64 %2 to i64*, !insn.addr !479
%4 = load i64, i64* %3, align 8, !insn.addr !479
%5 = inttoptr i64 %4 to i64*, !insn.addr !480
%6 = call i64 @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC1EPSt18_Rb_tree_node_base(i64* nonnull %stack_var_-24, i64* %5), !insn.addr !480
%7 = load i64, i64* %stack_var_-24, align 8, !insn.addr !481
%8 = call i64 @__readfsqword(i64 40), !insn.addr !482
%9 = icmp eq i64 %1, %8, !insn.addr !482
store i64 %7, i64* %rax.0.reg2mem, !insn.addr !483
br i1 %9, label %dec_label_pc_1562, label %dec_label_pc_155d, !insn.addr !483
dec_label_pc_155d: ; preds = %dec_label_pc_1518
%10 = call i64 @__stack_chk_fail(), !insn.addr !484
store i64 %10, i64* %rax.0.reg2mem, !insn.addr !484
br label %dec_label_pc_1562, !insn.addr !484
dec_label_pc_1562: ; preds = %dec_label_pc_155d, %dec_label_pc_1518
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !485
}
define i64 @_ZNKSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_1564:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 32, !insn.addr !486
%2 = inttoptr i64 %1 to i64*, !insn.addr !487
%3 = call i64 @_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiPcEE6_M_ptrEv(i64* %2), !insn.addr !487
ret i64 %3, !insn.addr !488
}
define void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE7destroyIS4_EEvRS6_PT_(i64* %arg1, i64* %arg2) local_unnamed_addr {
dec_label_pc_1582:
call void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE7destroyIS5_EEvPT_(i64* %arg1, i64* %arg2), !insn.addr !489
ret void, !insn.addr !490
}
define i64 @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE10deallocateERS6_PS5_m(i64* %arg1, i64* %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_15a8:
%0 = call i64 @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE10deallocateEPS6_m(i64* %arg1, i64* %arg2, i64 %arg3), !insn.addr !491
ret i64 %0, !insn.addr !492
}
define i64 @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE8allocateEmPKv(i64* %result, i64 %arg2, i64* %arg3) local_unnamed_addr {
dec_label_pc_15d6:
%0 = call i64 @_ZNK9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE8max_sizeEv(i64* %result), !insn.addr !493
%1 = icmp uge i64 %0, %arg2
%2 = icmp ne i1 %1, true, !insn.addr !494
%3 = icmp eq i1 %2, false, !insn.addr !495
br i1 %3, label %dec_label_pc_1606, label %dec_label_pc_1601, !insn.addr !496
dec_label_pc_1601: ; preds = %dec_label_pc_15d6
%4 = call i64 @_ZSt17__throw_bad_allocv(), !insn.addr !497
br label %dec_label_pc_1606, !insn.addr !497
dec_label_pc_1606: ; preds = %dec_label_pc_1601, %dec_label_pc_15d6
%5 = mul i64 %arg2, 48, !insn.addr !498
%6 = call i64 @_Znwm(i64 %5), !insn.addr !499
ret i64 %6, !insn.addr !500
}
define void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE9constructIS5_JRKSt21piecewise_construct_tSt5tupleIJOiEESC_IJEEEEEvPT_DpOT0_(i64 %arg1, i64 %arg2, i64 %arg3, i64 %arg4, i64 %arg5) local_unnamed_addr {
dec_label_pc_1622:
%0 = alloca i64
%1 = load i64, i64* %0
%stack_var_-56 = alloca i64, align 8
%2 = call i64 @__readfsqword(i64 40), !insn.addr !501
%3 = inttoptr i64 %arg3 to i64*, !insn.addr !502
%4 = call i64** @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(i64* %3), !insn.addr !502
%5 = inttoptr i64 %arg4 to i64*, !insn.addr !503
%6 = call i64* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(i64* %5), !insn.addr !503
%7 = call i64 @_ZNSt5tupleIJOiEEC1EOS1_(i64* nonnull %stack_var_-56, i64* %6), !insn.addr !504
%8 = inttoptr i64 %arg5 to i64*, !insn.addr !505
%9 = call i64* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(i64* %8), !insn.addr !505
%10 = inttoptr i64 %arg2 to i64*, !insn.addr !506
%11 = call i64 @_ZnwmPv(i64 16, i64* %10), !insn.addr !506
%12 = icmp eq i64 %11, 0, !insn.addr !507
br i1 %12, label %dec_label_pc_16d9, label %dec_label_pc_16a5, !insn.addr !508
dec_label_pc_16a5: ; preds = %dec_label_pc_1622
%13 = ptrtoint i64* %6 to i64, !insn.addr !503
%14 = call i64 @_ZNSt4pairIKiPcEC1IJOiEJEEESt21piecewise_construct_tSt5tupleIJDpT_EES6_IJDpT0_EE(i64 %11, i64* nonnull %stack_var_-56, i64 %13, i64 %arg4, i64 %arg5, i64 %1), !insn.addr !509
br label %dec_label_pc_16d9, !insn.addr !510
dec_label_pc_16d9: ; preds = %dec_label_pc_16a5, %dec_label_pc_1622
%15 = call i64 @__readfsqword(i64 40), !insn.addr !511
%16 = icmp eq i64 %2, %15, !insn.addr !511
br i1 %16, label %dec_label_pc_16ee, label %dec_label_pc_16e9, !insn.addr !512
dec_label_pc_16e9: ; preds = %dec_label_pc_16d9
%17 = call i64 @__stack_chk_fail(), !insn.addr !513
br label %dec_label_pc_16ee, !insn.addr !513
dec_label_pc_16ee: ; preds = %dec_label_pc_16e9, %dec_label_pc_16d9
ret void, !insn.addr !514
}
define i64 @_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiPcEE6_M_ptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_1708:
%0 = call i64 @_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiPcEE7_M_addrEv(i64* %result), !insn.addr !515
ret i64 %0, !insn.addr !516
}
define void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE7destroyIS5_EEvPT_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_1722:
ret void, !insn.addr !517
}
define i64 @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE10deallocateEPS6_m(i64* %result, i64* %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_1732:
%0 = call i64 @_ZdlPv(i64* %arg2), !insn.addr !518
ret i64 %0, !insn.addr !519
}
define i64 @_ZNK9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE8max_sizeEv(i64* %result) local_unnamed_addr {
dec_label_pc_1756:
ret i64 384307168202282325, !insn.addr !520
}
define i64 @_ZNSt4pairIKiPcEC1IJOiEJEEESt21piecewise_construct_tSt5tupleIJDpT_EES6_IJDpT0_EE(i64 %arg1, i64* %arg2, i64 %arg3, i64 %arg4, i64 %arg5, i64 %arg6) local_unnamed_addr {
dec_label_pc_176a:
%rax.0.reg2mem = alloca i64, !insn.addr !521
%stack_var_16 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !522
%1 = ptrtoint i64* %stack_var_16 to i64, !insn.addr !523
%2 = inttoptr i64 %arg1 to i64*, !insn.addr !524
%3 = call i64 @_ZNSt4pairIKiPcEC1IJOiEJLm0EEJEJEEERSt5tupleIJDpT_EERS5_IJDpT1_EESt12_Index_tupleIJXspT0_EEESE_IJXspT2_EEE(i64* %2, i64* %arg2, i64 %1, i64 ptrtoint (i32* @0 to i64)), !insn.addr !524
%4 = call i64 @__readfsqword(i64 40), !insn.addr !525
%5 = icmp eq i64 %0, %4, !insn.addr !525
store i64 0, i64* %rax.0.reg2mem, !insn.addr !526
br i1 %5, label %dec_label_pc_17bd, label %dec_label_pc_17b8, !insn.addr !526
dec_label_pc_17b8: ; preds = %dec_label_pc_176a
%6 = call i64 @__stack_chk_fail(), !insn.addr !527
store i64 %6, i64* %rax.0.reg2mem, !insn.addr !527
br label %dec_label_pc_17bd, !insn.addr !527
dec_label_pc_17bd: ; preds = %dec_label_pc_17b8, %dec_label_pc_176a
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !528
}
define i64 @_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiPcEE7_M_addrEv(i64* %result) local_unnamed_addr {
dec_label_pc_17c0:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !529
}
define i64* @_ZSt3getILm0EJOiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS5_(i64* %arg1) local_unnamed_addr {
dec_label_pc_17ce:
%0 = call i32** @_ZSt12__get_helperILm0EOiJEERT0_RSt11_Tuple_implIXT_EJS1_DpT1_EE(i64* %arg1), !insn.addr !530
%1 = bitcast i32** %0 to i64*, !insn.addr !531
ret i64* %1, !insn.addr !531
}
define i32** @_ZSt12__get_helperILm0EOiJEERT0_RSt11_Tuple_implIXT_EJS1_DpT1_EE(i64* %arg1) local_unnamed_addr {
dec_label_pc_17e8:
%0 = call i64 @_ZNSt11_Tuple_implILm0EJOiEE7_M_headERS1_(i64* %arg1), !insn.addr !532
%1 = inttoptr i64 %0 to i32**, !insn.addr !533
ret i32** %1, !insn.addr !533
}
define i64 @_ZNSt4pairIKiPcEC1IJOiEJLm0EEJEJEEERSt5tupleIJDpT_EERS5_IJDpT1_EESt12_Index_tupleIJXspT0_EEESE_IJXspT2_EEE(i64* %arg1, i64* %arg2, i64 %arg3, i64 %arg4) local_unnamed_addr {
dec_label_pc_1802:
%0 = ptrtoint i64* %arg1 to i64
%1 = call i64* @_ZSt3getILm0EJOiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS5_(i64* %arg2), !insn.addr !534
%2 = call i32** @_ZSt7forwardIOiEOT_RNSt16remove_referenceIS1_E4typeE(i64* %1), !insn.addr !535
%3 = bitcast i32** %2 to i32*, !insn.addr !536
%4 = load i32, i32* %3, align 4, !insn.addr !536
%5 = bitcast i64* %arg1 to i32*, !insn.addr !537
store i32 %4, i32* %5, align 4, !insn.addr !537
%6 = add i64 %0, 8, !insn.addr !538
%7 = inttoptr i64 %6 to i64*, !insn.addr !538
store i64 0, i64* %7, align 8, !insn.addr !538
ret i64 %0, !insn.addr !539
}
declare i64 @memset(i64, i64, i64) local_unnamed_addr
declare i64 @printLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @_ZSt29_Rb_tree_insert_and_rebalancebPSt18_Rb_tree_node_baseS0_RS_(i1, i64*, i64*, i64*) local_unnamed_addr
declare i64 @_ZSt18_Rb_tree_decrementPSt18_Rb_tree_node_base(i64*) local_unnamed_addr
declare i64 @_ZSt18_Rb_tree_incrementPSt18_Rb_tree_node_base(i64*) local_unnamed_addr
declare i64 @_ZSt17__throw_bad_allocv() local_unnamed_addr
declare i64 @_Znwm(i64) local_unnamed_addr
declare i64 @_ZdlPv(i64*) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 18}
!1 = !{i64 33}
!2 = !{i64 51}
!3 = !{i64 57}
!4 = !{i64 62}
!5 = !{i64 65}
!6 = !{i64 69}
!7 = !{i64 86}
!8 = !{i64 91}
!9 = !{i64 95}
!10 = !{i64 99}
!11 = !{i64 103}
!12 = !{i64 107}
!13 = !{i64 110}
!14 = !{i64 114}
!15 = !{i64 118}
!16 = !{i64 122}
!17 = !{i64 126}
!18 = !{i64 130}
!19 = !{i64 134}
!20 = !{i64 138}
!21 = !{i64 142}
!22 = !{i64 146}
!23 = !{i64 150}
!24 = !{i64 154}
!25 = !{i64 158}
!26 = !{i64 162}
!27 = !{i64 166}
!28 = !{i64 170}
!29 = !{i64 174}
!30 = !{i64 178}
!31 = !{i64 182}
!32 = !{i64 186}
!33 = !{i64 190}
!34 = !{i64 194}
!35 = !{i64 197}
!36 = !{i64 200}
!37 = !{i64 204}
!38 = !{i64 208}
!39 = !{i64 211}
!40 = !{i64 218}
!41 = !{i64 224}
!42 = !{i64 228}
!43 = !{i64 237}
!44 = !{i64 239}
!45 = !{i64 245}
!46 = !{i64 246}
!47 = !{i64 264}
!48 = !{i64 279}
!49 = !{i64 303}
!50 = !{i64 308}
!51 = !{i64 329}
!52 = !{i64 332}
!53 = !{i64 345}
!54 = !{i64 353}
!55 = !{i64 356}
!56 = !{i64 368}
!57 = !{i64 372}
!58 = !{i64 384}
!59 = !{i64 388}
!60 = !{i64 400}
!61 = !{i64 404}
!62 = !{i64 416}
!63 = !{i64 420}
!64 = !{i64 432}
!65 = !{i64 436}
!66 = !{i64 443}
!67 = !{i64 450}
!68 = !{i64 454}
!69 = !{i64 464}
!70 = !{i64 474}
!71 = !{i64 483}
!72 = !{i64 485}
!73 = !{i64 491}
!74 = !{i64 509}
!75 = !{i64 524}
!76 = !{i64 541}
!77 = !{i64 555}
!78 = !{i64 584}
!79 = !{i64 595}
!80 = !{i64 607}
!81 = !{i64 636}
!82 = !{i64 647}
!83 = !{i64 659}
!84 = !{i64 683}
!85 = !{i64 695}
!86 = !{i64 700}
!87 = !{i64 732}
!88 = !{i64 739}
!89 = !{i64 763}
!90 = !{i64 781}
!91 = !{i64 791}
!92 = !{i64 796}
!93 = !{i64 813}
!94 = !{i64 842}
!95 = !{i64 847}
!96 = !{i64 858}
!97 = !{i64 863}
!98 = !{i64 881}
!99 = !{i64 886}
!100 = !{i64 888}
!101 = !{i64 897}
!102 = !{i64 909}
!103 = !{i64 931}
!104 = !{i64 936}
!105 = !{i64 954}
!106 = !{i64 967}
!107 = !{i64 985}
!108 = !{i64 1004}
!109 = !{i64 1017}
!110 = !{i64 1040}
!111 = !{i64 1045}
!112 = !{i64 1056}
!113 = !{i64 1061}
!114 = !{i64 1069}
!115 = !{i64 1078}
!116 = !{i64 1080}
!117 = !{i64 1091}
!118 = !{i64 1122}
!119 = !{i64 1128}
!120 = !{i64 1149}
!121 = !{i64 1155}
!122 = !{i64 1182}
!123 = !{i64 1185}
!124 = !{i64 1189}
!125 = !{i64 1210}
!126 = !{i64 1215}
!127 = !{i64 1223}
!128 = !{i64 1246}
!129 = !{i64 1252}
!130 = !{i64 1282}
!131 = !{i64 1284}
!132 = !{i64 1288}
!133 = !{i64 1313}
!134 = !{i64 1318}
!135 = !{i64 1338}
!136 = !{i64 1344}
!137 = !{i64 1361}
!138 = !{i64 1375}
!139 = !{i64 1404}
!140 = !{i64 1412}
!141 = !{i64 1423}
!142 = !{i64 1435}
!143 = !{i64 1449}
!144 = !{i64 1463}
!145 = !{i64 1477}
!146 = !{i64 1478}
!147 = !{i64 1509}
!148 = !{i64 1531}
!149 = !{i64 1546}
!150 = !{i64 1561}
!151 = !{i64 1582}
!152 = !{i64 1598}
!153 = !{i64 1620}
!154 = !{i64 1637}
!155 = !{i64 1640}
!156 = !{i64 1661}
!157 = !{i64 1666}
!158 = !{i64 1682}
!159 = !{i64 1701}
!160 = !{i64 1706}
!161 = !{i64 1714}
!162 = !{i64 1723}
!163 = !{i64 1778}
!164 = !{i64 1791}
!165 = !{i64 1848}
!166 = !{i64 1863}
!167 = !{i64 1888}
!168 = !{i64 1899}
!169 = !{i64 1900}
!170 = !{i64 1912}
!171 = !{i64 1931}
!172 = !{i64 1945}
!173 = !{i64 1950}
!174 = !{i64 1958}
!175 = !{i64 1967}
!176 = !{i64 1969}
!177 = !{i64 1975}
!178 = !{i64 1985}
!179 = !{i64 2002}
!180 = !{i64 2009}
!181 = !{i64 2015}
!182 = !{i64 2050}
!183 = !{i64 2066}
!184 = !{i64 2081}
!185 = !{i64 2096}
!186 = !{i64 2121}
!187 = !{i64 2138}
!188 = !{i64 2171}
!189 = !{i64 2181}
!190 = !{i64 2186}
!191 = !{i64 2193}
!192 = !{i64 2199}
!193 = !{i64 2213}
!194 = !{i64 2241}
!195 = !{i64 2246}
!196 = !{i64 2253}
!197 = !{i64 2263}
!198 = !{i64 2268}
!199 = !{i64 2275}
!200 = !{i64 2281}
!201 = !{i64 2309}
!202 = !{i64 2314}
!203 = !{i64 2321}
!204 = !{i64 2335}
!205 = !{i64 2341}
!206 = !{i64 2342}
!207 = !{i64 2355}
!208 = !{i64 2363}
!209 = !{i64 2385}
!210 = !{i64 2390}
!211 = !{i64 2405}
!212 = !{i64 2410}
!213 = !{i64 2416}
!214 = !{i64 2418}
!215 = !{i64 2431}
!216 = !{i64 2436}
!217 = !{i64 2439}
!218 = !{i64 2452}
!219 = !{i64 2457}
!220 = !{i64 2463}
!221 = !{i64 2484}
!222 = !{i64 2489}
!223 = !{i64 2491}
!224 = !{i64 2578}
!225 = !{i64 2583}
!226 = !{i64 2516}
!227 = !{i64 2524}
!228 = !{i64 2546}
!229 = !{i64 2551}
!230 = !{i64 2559}
!231 = !{i64 2599}
!232 = !{i64 2617}
!233 = !{i64 2622}
!234 = !{i64 2624}
!235 = !{i64 2634}
!236 = !{i64 2649}
!237 = !{i64 2654}
!238 = !{i64 2657}
!239 = !{i64 2663}
!240 = !{i64 2665}
!241 = !{i64 2674}
!242 = !{i64 2689}
!243 = !{i64 2710}
!244 = !{i64 2715}
!245 = !{i64 2723}
!246 = !{i64 2739}
!247 = !{i64 2744}
!248 = !{i64 2750}
!249 = !{i64 2771}
!250 = !{i64 2776}
!251 = !{i64 2778}
!252 = !{i64 2780}
!253 = !{i64 2787}
!254 = !{i64 2792}
!255 = !{i64 2798}
!256 = !{i64 2800}
!257 = !{i64 2802}
!258 = !{i64 2828}
!259 = !{i64 2833}
!260 = !{i64 2841}
!261 = !{i64 2864}
!262 = !{i64 2869}
!263 = !{i64 2877}
!264 = !{i64 2896}
!265 = !{i64 2901}
!266 = !{i64 2917}
!267 = !{i64 2938}
!268 = !{i64 2943}
!269 = !{i64 2945}
!270 = !{i64 2955}
!271 = !{i64 2970}
!272 = !{i64 2975}
!273 = !{i64 2978}
!274 = !{i64 2984}
!275 = !{i64 2986}
!276 = !{i64 2995}
!277 = !{i64 3003}
!278 = !{i64 3025}
!279 = !{i64 3030}
!280 = !{i64 3038}
!281 = !{i64 3054}
!282 = !{i64 3059}
!283 = !{i64 3065}
!284 = !{i64 3083}
!285 = !{i64 3088}
!286 = !{i64 3090}
!287 = !{i64 3092}
!288 = !{i64 3099}
!289 = !{i64 3104}
!290 = !{i64 3110}
!291 = !{i64 3112}
!292 = !{i64 3114}
!293 = !{i64 3140}
!294 = !{i64 3145}
!295 = !{i64 3153}
!296 = !{i64 3173}
!297 = !{i64 3178}
!298 = !{i64 3186}
!299 = !{i64 3202}
!300 = !{i64 3207}
!301 = !{i64 3209}
!302 = !{i64 3235}
!303 = !{i64 3240}
!304 = !{i64 3244}
!305 = !{i64 3252}
!306 = !{i64 3261}
!307 = !{i64 3263}
!308 = !{i64 3274}
!309 = !{i64 3275}
!310 = !{i64 3287}
!311 = !{i64 3309}
!312 = !{i64 3327}
!313 = !{i64 3336}
!314 = !{i64 3345}
!315 = !{i64 3347}
!316 = !{i64 3353}
!317 = !{i64 3354}
!318 = !{i64 3381}
!319 = !{i64 3396}
!320 = !{i64 3401}
!321 = !{i64 3410}
!322 = !{i64 3415}
!323 = !{i64 3419}
!324 = !{i64 3432}
!325 = !{i64 3447}
!326 = !{i64 3461}
!327 = !{i64 3466}
!328 = !{i64 3489}
!329 = !{i64 3507}
!330 = !{i64 3516}
!331 = !{i64 3520}
!332 = !{i64 3528}
!333 = !{i64 3546}
!334 = !{i64 3551}
!335 = !{i64 3559}
!336 = !{i64 3568}
!337 = !{i64 3570}
!338 = !{i64 3583}
!339 = !{i64 3614}
!340 = !{i64 3633}
!341 = !{i64 3640}
!342 = !{i64 3662}
!343 = !{i64 3667}
!344 = !{i64 3680}
!345 = !{i64 3685}
!346 = !{i64 3698}
!347 = !{i64 3703}
!348 = !{i64 3704}
!349 = !{i64 3729}
!350 = !{i64 3744}
!351 = !{i64 3749}
!352 = !{i64 3762}
!353 = !{i64 3783}
!354 = !{i64 3791}
!355 = !{i64 3793}
!356 = !{i64 3810}
!357 = !{i64 3828}
!358 = !{i64 3853}
!359 = !{i64 3858}
!360 = !{i64 3866}
!361 = !{i64 3875}
!362 = !{i64 3877}
!363 = !{i64 3888}
!364 = !{i64 3909}
!365 = !{i64 3915}
!366 = !{i64 3935}
!367 = !{i64 3948}
!368 = !{i64 3954}
!369 = !{i64 4003}
!370 = !{i64 4018}
!371 = !{i64 4033}
!372 = !{i64 4048}
!373 = !{i64 4063}
!374 = !{i64 4078}
!375 = !{i64 4098}
!376 = !{i64 4168}
!377 = !{i64 4200}
!378 = !{i64 4212}
!379 = !{i64 4244}
!380 = !{i64 4249}
!381 = !{i64 4257}
!382 = !{i64 4266}
!383 = !{i64 4268}
!384 = !{i64 4274}
!385 = !{i64 4288}
!386 = !{i64 4293}
!387 = !{i64 4306}
!388 = !{i64 4311}
!389 = !{i64 4312}
!390 = !{i64 4324}
!391 = !{i64 4346}
!392 = !{i64 4364}
!393 = !{i64 4373}
!394 = !{i64 4382}
!395 = !{i64 4384}
!396 = !{i64 4390}
!397 = !{i64 4419}
!398 = !{i64 4424}
!399 = !{i64 4431}
!400 = !{i64 4441}
!401 = !{i64 4446}
!402 = !{i64 4453}
!403 = !{i64 4459}
!404 = !{i64 4473}
!405 = !{i64 4474}
!406 = !{i64 4491}
!407 = !{i64 4518}
!408 = !{i64 4529}
!409 = !{i64 4534}
!410 = !{i64 4546}
!411 = !{i64 4549}
!412 = !{i64 4648}
!413 = !{i64 4555}
!414 = !{i64 4570}
!415 = !{i64 4588}
!416 = !{i64 4600}
!417 = !{i64 4609}
!418 = !{i64 4614}
!419 = !{i64 4623}
!420 = !{i64 4628}
!421 = !{i64 4657}
!422 = !{i64 4666}
!423 = !{i64 4671}
!424 = !{i64 4689}
!425 = !{i64 4694}
!426 = !{i64 4696}
!427 = !{i64 4716}
!428 = !{i64 4729}
!429 = !{i64 4738}
!430 = !{i64 4747}
!431 = !{i64 4754}
!432 = !{i64 4775}
!433 = !{i64 4780}
!434 = !{i64 4782}
!435 = !{i64 4802}
!436 = !{i64 4815}
!437 = !{i64 4817}
!438 = !{i64 4843}
!439 = !{i64 4852}
!440 = !{i64 4860}
!441 = !{i64 4869}
!442 = !{i64 4871}
!443 = !{i64 4882}
!444 = !{i64 4896}
!445 = !{i64 4901}
!446 = !{i64 4924}
!447 = !{i64 4936}
!448 = !{i64 4944}
!449 = !{i64 4957}
!450 = !{i64 4962}
!451 = !{i64 4986}
!452 = !{i64 4998}
!453 = !{i64 5006}
!454 = !{i64 5026}
!455 = !{i64 5032}
!456 = !{i64 5051}
!457 = !{i64 5076}
!458 = !{i64 5091}
!459 = !{i64 5102}
!460 = !{i64 5114}
!461 = !{i64 5143}
!462 = !{i64 5166}
!463 = !{i64 5173}
!464 = !{i64 5190}
!465 = !{i64 5195}
!466 = !{i64 5209}
!467 = !{i64 5223}
!468 = !{i64 5259}
!469 = !{i64 5265}
!470 = !{i64 5304}
!471 = !{i64 5319}
!472 = !{i64 5334}
!473 = !{i64 5359}
!474 = !{i64 5373}
!475 = !{i64 5393}
!476 = !{i64 5399}
!477 = !{i64 5400}
!478 = !{i64 5412}
!479 = !{i64 5431}
!480 = !{i64 5445}
!481 = !{i64 5450}
!482 = !{i64 5458}
!483 = !{i64 5467}
!484 = !{i64 5469}
!485 = !{i64 5475}
!486 = !{i64 5492}
!487 = !{i64 5499}
!488 = !{i64 5505}
!489 = !{i64 5536}
!490 = !{i64 5543}
!491 = !{i64 5582}
!492 = !{i64 5589}
!493 = !{i64 5617}
!494 = !{i64 5626}
!495 = !{i64 5629}
!496 = !{i64 5631}
!497 = !{i64 5633}
!498 = !{i64 5651}
!499 = !{i64 5658}
!500 = !{i64 5664}
!501 = !{i64 5699}
!502 = !{i64 5721}
!503 = !{i64 5733}
!504 = !{i64 5751}
!505 = !{i64 5767}
!506 = !{i64 5784}
!507 = !{i64 5792}
!508 = !{i64 5795}
!509 = !{i64 5813}
!510 = !{i64 5822}
!511 = !{i64 5854}
!512 = !{i64 5863}
!513 = !{i64 5865}
!514 = !{i64 5880}
!515 = !{i64 5915}
!516 = !{i64 5921}
!517 = !{i64 5936}
!518 = !{i64 5965}
!519 = !{i64 5972}
!520 = !{i64 5993}
!521 = !{i64 5994}
!522 = !{i64 6010}
!523 = !{i64 6025}
!524 = !{i64 6047}
!525 = !{i64 6061}
!526 = !{i64 6070}
!527 = !{i64 6072}
!528 = !{i64 6078}
!529 = !{i64 6093}
!530 = !{i64 6113}
!531 = !{i64 6119}
!532 = !{i64 6139}
!533 = !{i64 6145}
!534 = !{i64 6173}
!535 = !{i64 6181}
!536 = !{i64 6186}
!537 = !{i64 6192}
!538 = !{i64 6198}
!539 = !{i64 6208}
### Assistant: %"struct.std::piecewise_construct_t" = type { i8 }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl" = type { %"struct.std::_Rb_tree_key_compare", %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_key_compare" = type { %"struct.std::less" }
%"struct.std::less" = type { i8 }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }
%"struct.std::_Rb_tree_iterator" = type { %"struct.std::_Rb_tree_node_base"* }
%"struct.std::_Rb_tree_const_iterator" = type { %"struct.std::_Rb_tree_node_base"* }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base" }
%"struct.std::_Head_base" = type { i32* }
%"class.std::tuple.0" = type { i8 }
%"struct.std::pair" = type { i32, i8* }
%"struct.std::_Rb_tree_node" = type { %"struct.std::_Rb_tree_node_base", %"struct.__gnu_cxx::__aligned_membuf" }
%"struct.__gnu_cxx::__aligned_membuf" = type { [16 x i8] }
%"struct.std::pair.1" = type { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }
%"struct.std::_Select1st" = type { i8 }
%"class.std::allocator" = type { i8 }
%"class.__gnu_cxx::new_allocator" = type { i8 }
%"struct.std::_Index_tuple" = type { i8 }
%"struct.std::_Index_tuple.4" = type { i8 }
%"class.std::__pair_base" = type { i8 }
%"class.std::__pair_base.2" = type { i8 }
$_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEEixEOi = comdat any
$_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE11lower_boundERS4_ = comdat any
$_ZSteqRKSt17_Rb_tree_iteratorISt4pairIKiPcEES6_ = comdat any
$_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE3endEv = comdat any
$_ZNKSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE8key_compEv = comdat any
$_ZNKSt4lessIiEclERKiS2_ = comdat any
$_ZNKSt17_Rb_tree_iteratorISt4pairIKiPcEEdeEv = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJOiEESE_IJEEEEESt17_Rb_tree_iteratorIS3_ESt23_Rb_tree_const_iteratorIS3_EDpOT_ = comdat any
$_ZNSt23_Rb_tree_const_iteratorISt4pairIKiPcEEC2ERKSt17_Rb_tree_iteratorIS3_E = comdat any
$_ZSt16forward_as_tupleIJiEESt5tupleIJDpOT_EES3_ = comdat any
$_ZSt4moveIRiEONSt16remove_referenceIT_E4typeEOS2_ = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11lower_boundERS1_ = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_lower_boundEPSt13_Rb_tree_nodeIS3_EPSt18_Rb_tree_node_baseRS1_ = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_M_beginEv = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_M_endEv = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt13_Rb_tree_nodeIS3_E = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_S_leftEPSt18_Rb_tree_node_base = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPSt18_Rb_tree_node_base = comdat any
$_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC2EPSt18_Rb_tree_node_base = comdat any
$_ZNKSt10_Select1stISt4pairIKiPcEEclERKS3_ = comdat any
$_ZNKSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv = comdat any
$_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiPcEE6_M_ptrEv = comdat any
$_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiPcEE7_M_addrEv = comdat any
$_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE9_M_mbeginEv = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE3endEv = comdat any
$_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8key_compEv = comdat any
$_ZNSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv = comdat any
$__clang_call_terminate = comdat any
$_ZN9__gnu_cxx16__aligned_membufISt4pairIKiPcEE6_M_ptrEv = comdat any
$_ZN9__gnu_cxx16__aligned_membufISt4pairIKiPcEE7_M_addrEv = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_create_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESE_IJEEEEEPSt13_Rb_tree_nodeIS3_EDpOT_ = comdat any
$_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE = comdat any
$_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE = comdat any
$_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS3_ERS1_ = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_insert_nodeEPSt18_Rb_tree_node_baseSB_PSt13_Rb_tree_nodeIS3_E = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_drop_nodeEPSt13_Rb_tree_nodeIS3_E = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_get_nodeEv = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE17_M_construct_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESE_IJEEEEEvPSt13_Rb_tree_nodeIS3_EDpOT_ = comdat any
$_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE8allocateERS6_m = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE21_M_get_Node_allocatorEv = comdat any
$_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE8allocateEmPKv = comdat any
$_ZNK9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE11_M_max_sizeEv = comdat any
$_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE9constructIS4_JRKSt21piecewise_construct_tSt5tupleIJOiEESC_IJEEEEEvRS6_PT_DpOT0_ = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_put_nodeEPSt13_Rb_tree_nodeIS3_E = comdat any
$_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE9constructIS5_JRKSt21piecewise_construct_tSt5tupleIJOiEESC_IJEEEEEvPT_DpOT0_ = comdat any
$_ZNSt5tupleIJOiEEC2EOS1_ = comdat any
$_ZNSt4pairIKiPcEC2IJOiEJEEESt21piecewise_construct_tSt5tupleIJDpT_EES6_IJDpT0_EE = comdat any
$_ZNSt11_Tuple_implILm0EJOiEEC2EOS1_ = comdat any
$_ZNSt4pairIKiPcEC2IJOiEJLm0EEJEJEEERSt5tupleIJDpT_EERS5_IJDpT1_EESt12_Index_tupleIJXspT0_EEESE_IJXspT2_EEE = comdat any
$_ZSt7forwardIOiEOT_RNSt16remove_referenceIS1_E4typeE = comdat any
$_ZSt3getILm0EJOiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS5_ = comdat any
$_ZSt12__get_helperILm0EOiJEERT0_RSt11_Tuple_implIXT_EJS1_DpT1_EE = comdat any
$_ZNSt11_Tuple_implILm0EJOiEE7_M_headERS1_ = comdat any
$_ZNSt10_Head_baseILm0EOiLb0EE7_M_headERS1_ = comdat any
$_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE10deallocateERS6_PS5_m = comdat any
$_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE10deallocateEPS6_m = comdat any
$_ZNKSt23_Rb_tree_const_iteratorISt4pairIKiPcEE13_M_const_castEv = comdat any
$_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE4sizeEv = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_rightmostEv = comdat any
$_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_Lb1EEERKS1_OT_ = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE24_M_get_insert_unique_posERS1_ = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_leftmostEv = comdat any
$_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_S4_Lb1EEEOT_OT0_ = comdat any
$_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEmmEv = comdat any
$_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEppEv = comdat any
$_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_Lb1EEEOT_RKS1_ = comdat any
$_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE5beginEv = comdat any
$_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRPSt13_Rb_tree_nodeIS_IKiPcEERS1_Lb1EEEOT_OT0_ = comdat any
$_ZSt7forwardIRPSt13_Rb_tree_nodeISt4pairIKiPcEEEOT_RNSt16remove_referenceIS8_E4typeE = comdat any
$_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE15_M_destroy_nodeEPSt13_Rb_tree_nodeIS3_E = comdat any
$_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE7destroyIS4_EEvRS6_PT_ = comdat any
$_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE7destroyIS5_EEvPT_ = comdat any
$_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE = comdat any
$_ZNSt5tupleIJOiEEC2IJiELb1ELb1EEEDpOT_ = comdat any
$_ZNSt11_Tuple_implILm0EJOiEEC2IiEEOT_ = comdat any
$_ZNSt10_Head_baseILm0EOiLb0EEC2IiEEOT_ = comdat any
@_ZStL19piecewise_construct = internal constant %"struct.std::piecewise_construct_t" undef, align 1
; Function Attrs: noinline optnone uwtable
define dso_local void @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memcpy_747badSinkESt3mapIiPcSt4lessIiESaISt4pairIKiS1_EEE(%"class.std::map"* %dataMap) #0 {
entry:
%data = alloca i8*, align 8
%ref.tmp = alloca i32, align 4
%source = alloca [100 x i8], align 16
store i32 2, i32* %ref.tmp, align 4
%call = call nonnull align 8 dereferenceable(8) i8** @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEEixEOi(%"class.std::map"* %dataMap, i32* nonnull align 4 dereferenceable(4) %ref.tmp)
%0 = load i8*, i8** %call, align 8
store i8* %0, i8** %data, align 8
%arraydecay = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
call void @llvm.memset.p0i8.i64(i8* align 16 %arraydecay, i8 67, i64 99, i1 false)
%arrayidx = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 99
store i8 0, i8* %arrayidx, align 1
%1 = load i8*, i8** %data, align 8
%arraydecay1 = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %1, i8* align 16 %arraydecay1, i64 100, i1 false)
%2 = load i8*, i8** %data, align 8
%arrayidx2 = getelementptr inbounds i8, i8* %2, i64 99
store i8 0, i8* %arrayidx2, align 1
%3 = load i8*, i8** %data, align 8
call void @printLine(i8* %3)
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) i8** @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEEixEOi(%"class.std::map"* %this, i32* nonnull align 4 dereferenceable(4) %__k) #0 comdat align 2 {
entry:
%this.addr = alloca %"class.std::map"*, align 8
%__k.addr = alloca i32*, align 8
%__i = alloca %"struct.std::_Rb_tree_iterator", align 8
%ref.tmp = alloca %"struct.std::_Rb_tree_iterator", align 8
%ref.tmp5 = alloca %"struct.std::less", align 1
%undef.agg.tmp = alloca %"struct.std::less", align 1
%ref.tmp8 = alloca %"struct.std::_Rb_tree_iterator", align 8
%agg.tmp = alloca %"struct.std::_Rb_tree_const_iterator", align 8
%ref.tmp9 = alloca %"class.std::tuple", align 8
%ref.tmp11 = alloca %"class.std::tuple.0", align 1
store %"class.std::map"* %this, %"class.std::map"** %this.addr, align 8
store i32* %__k, i32** %__k.addr, align 8
%this1 = load %"class.std::map"*, %"class.std::map"** %this.addr, align 8
%0 = load i32*, i32** %__k.addr, align 8
%call = call %"struct.std::_Rb_tree_node_base"* @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE11lower_boundERS4_(%"class.std::map"* %this1, i32* nonnull align 4 dereferenceable(4) %0)
%coerce.dive = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__i, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %call, %"struct.std::_Rb_tree_node_base"** %coerce.dive, align 8
%call2 = call %"struct.std::_Rb_tree_node_base"* @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE3endEv(%"class.std::map"* %this1) #12
%coerce.dive3 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %ref.tmp, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %call2, %"struct.std::_Rb_tree_node_base"** %coerce.dive3, align 8
%call4 = call zeroext i1 @_ZSteqRKSt17_Rb_tree_iteratorISt4pairIKiPcEES6_(%"struct.std::_Rb_tree_iterator"* nonnull align 8 dereferenceable(8) %__i, %"struct.std::_Rb_tree_iterator"* nonnull align 8 dereferenceable(8) %ref.tmp) #12
br i1 %call4, label %lor.end, label %lor.rhs
lor.rhs: ; preds = %entry
call void @_ZNKSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE8key_compEv(%"class.std::map"* %this1)
%1 = load i32*, i32** %__k.addr, align 8
%call6 = call nonnull align 8 dereferenceable(16) %"struct.std::pair"* @_ZNKSt17_Rb_tree_iteratorISt4pairIKiPcEEdeEv(%"struct.std::_Rb_tree_iterator"* %__i) #12
%first = getelementptr inbounds %"struct.std::pair", %"struct.std::pair"* %call6, i32 0, i32 0
%call7 = call zeroext i1 @_ZNKSt4lessIiEclERKiS2_(%"struct.std::less"* %ref.tmp5, i32* nonnull align 4 dereferenceable(4) %1, i32* nonnull align 4 dereferenceable(4) %first)
br label %lor.end
lor.end: ; preds = %lor.rhs, %entry
%2 = phi i1 [ true, %entry ], [ %call7, %lor.rhs ]
br i1 %2, label %if.then, label %if.end
if.then: ; preds = %lor.end
%_M_t = getelementptr inbounds %"class.std::map", %"class.std::map"* %this1, i32 0, i32 0
call void @_ZNSt23_Rb_tree_const_iteratorISt4pairIKiPcEEC2ERKSt17_Rb_tree_iteratorIS3_E(%"struct.std::_Rb_tree_const_iterator"* %agg.tmp, %"struct.std::_Rb_tree_iterator"* nonnull align 8 dereferenceable(8) %__i) #12
%3 = load i32*, i32** %__k.addr, align 8
%call10 = call nonnull align 4 dereferenceable(4) i32* @_ZSt4moveIRiEONSt16remove_referenceIT_E4typeEOS2_(i32* nonnull align 4 dereferenceable(4) %3) #12
call void @_ZSt16forward_as_tupleIJiEESt5tupleIJDpOT_EES3_(%"class.std::tuple"* sret align 8 %ref.tmp9, i32* nonnull align 4 dereferenceable(4) %call10) #12
%coerce.dive12 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", %"struct.std::_Rb_tree_const_iterator"* %agg.tmp, i32 0, i32 0
%4 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %coerce.dive12, align 8
%call13 = call %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJOiEESE_IJEEEEESt17_Rb_tree_iteratorIS3_ESt23_Rb_tree_const_iteratorIS3_EDpOT_(%"class.std::_Rb_tree"* %_M_t, %"struct.std::_Rb_tree_node_base"* %4, %"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) @_ZStL19piecewise_construct, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %ref.tmp9, %"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %ref.tmp11)
%coerce.dive14 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %ref.tmp8, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %call13, %"struct.std::_Rb_tree_node_base"** %coerce.dive14, align 8
%5 = bitcast %"struct.std::_Rb_tree_iterator"* %__i to i8*
%6 = bitcast %"struct.std::_Rb_tree_iterator"* %ref.tmp8 to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %5, i8* align 8 %6, i64 8, i1 false)
br label %if.end
if.end: ; preds = %if.then, %lor.end
%call15 = call nonnull align 8 dereferenceable(16) %"struct.std::pair"* @_ZNKSt17_Rb_tree_iteratorISt4pairIKiPcEEdeEv(%"struct.std::_Rb_tree_iterator"* %__i) #12
%second = getelementptr inbounds %"struct.std::pair", %"struct.std::pair"* %call15, i32 0, i32 1
ret i8** %second
}
; Function Attrs: argmemonly nounwind willreturn writeonly
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #1
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #2
declare dso_local void @printLine(i8*) #3
; Function Attrs: noinline optnone uwtable
define dso_local void @_ZN65CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memcpy_7411goodG2BSinkESt3mapIiPcSt4lessIiESaISt4pairIKiS1_EEE(%"class.std::map"* %dataMap) #0 {
entry:
%data = alloca i8*, align 8
%ref.tmp = alloca i32, align 4
%source = alloca [100 x i8], align 16
store i32 2, i32* %ref.tmp, align 4
%call = call nonnull align 8 dereferenceable(8) i8** @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEEixEOi(%"class.std::map"* %dataMap, i32* nonnull align 4 dereferenceable(4) %ref.tmp)
%0 = load i8*, i8** %call, align 8
store i8* %0, i8** %data, align 8
%arraydecay = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
call void @llvm.memset.p0i8.i64(i8* align 16 %arraydecay, i8 67, i64 99, i1 false)
%arrayidx = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 99
store i8 0, i8* %arrayidx, align 1
%1 = load i8*, i8** %data, align 8
%arraydecay1 = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %1, i8* align 16 %arraydecay1, i64 100, i1 false)
%2 = load i8*, i8** %data, align 8
%arrayidx2 = getelementptr inbounds i8, i8* %2, i64 99
store i8 0, i8* %arrayidx2, align 1
%3 = load i8*, i8** %data, align 8
call void @printLine(i8* %3)
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node_base"* @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE11lower_boundERS4_(%"class.std::map"* %this, i32* nonnull align 4 dereferenceable(4) %__x) #0 comdat align 2 {
entry:
%retval = alloca %"struct.std::_Rb_tree_iterator", align 8
%this.addr = alloca %"class.std::map"*, align 8
%__x.addr = alloca i32*, align 8
store %"class.std::map"* %this, %"class.std::map"** %this.addr, align 8
store i32* %__x, i32** %__x.addr, align 8
%this1 = load %"class.std::map"*, %"class.std::map"** %this.addr, align 8
%_M_t = getelementptr inbounds %"class.std::map", %"class.std::map"* %this1, i32 0, i32 0
%0 = load i32*, i32** %__x.addr, align 8
%call = call %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11lower_boundERS1_(%"class.std::_Rb_tree"* %_M_t, i32* nonnull align 4 dereferenceable(4) %0)
%coerce.dive = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %call, %"struct.std::_Rb_tree_node_base"** %coerce.dive, align 8
%coerce.dive2 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
%1 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %coerce.dive2, align 8
ret %"struct.std::_Rb_tree_node_base"* %1
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local zeroext i1 @_ZSteqRKSt17_Rb_tree_iteratorISt4pairIKiPcEES6_(%"struct.std::_Rb_tree_iterator"* nonnull align 8 dereferenceable(8) %__x, %"struct.std::_Rb_tree_iterator"* nonnull align 8 dereferenceable(8) %__y) #4 comdat {
entry:
%__x.addr = alloca %"struct.std::_Rb_tree_iterator"*, align 8
%__y.addr = alloca %"struct.std::_Rb_tree_iterator"*, align 8
store %"struct.std::_Rb_tree_iterator"* %__x, %"struct.std::_Rb_tree_iterator"** %__x.addr, align 8
store %"struct.std::_Rb_tree_iterator"* %__y, %"struct.std::_Rb_tree_iterator"** %__y.addr, align 8
%0 = load %"struct.std::_Rb_tree_iterator"*, %"struct.std::_Rb_tree_iterator"** %__x.addr, align 8
%_M_node = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %0, i32 0, i32 0
%1 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node, align 8
%2 = load %"struct.std::_Rb_tree_iterator"*, %"struct.std::_Rb_tree_iterator"** %__y.addr, align 8
%_M_node1 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %2, i32 0, i32 0
%3 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node1, align 8
%cmp = icmp eq %"struct.std::_Rb_tree_node_base"* %1, %3
ret i1 %cmp
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node_base"* @_ZNSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE3endEv(%"class.std::map"* %this) #4 comdat align 2 {
entry:
%retval = alloca %"struct.std::_Rb_tree_iterator", align 8
%this.addr = alloca %"class.std::map"*, align 8
store %"class.std::map"* %this, %"class.std::map"** %this.addr, align 8
%this1 = load %"class.std::map"*, %"class.std::map"** %this.addr, align 8
%_M_t = getelementptr inbounds %"class.std::map", %"class.std::map"* %this1, i32 0, i32 0
%call = call %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE3endEv(%"class.std::_Rb_tree"* %_M_t) #12
%coerce.dive = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %call, %"struct.std::_Rb_tree_node_base"** %coerce.dive, align 8
%coerce.dive2 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
%0 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %coerce.dive2, align 8
ret %"struct.std::_Rb_tree_node_base"* %0
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNKSt3mapIiPcSt4lessIiESaISt4pairIKiS0_EEE8key_compEv(%"class.std::map"* %this) #0 comdat align 2 {
entry:
%this.addr = alloca %"class.std::map"*, align 8
%undef.agg.tmp = alloca %"struct.std::less", align 1
store %"class.std::map"* %this, %"class.std::map"** %this.addr, align 8
%this1 = load %"class.std::map"*, %"class.std::map"** %this.addr, align 8
%_M_t = getelementptr inbounds %"class.std::map", %"class.std::map"* %this1, i32 0, i32 0
call void @_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8key_compEv(%"class.std::_Rb_tree"* %_M_t)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local zeroext i1 @_ZNKSt4lessIiEclERKiS2_(%"struct.std::less"* %this, i32* nonnull align 4 dereferenceable(4) %__x, i32* nonnull align 4 dereferenceable(4) %__y) #4 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::less"*, align 8
%__x.addr = alloca i32*, align 8
%__y.addr = alloca i32*, align 8
store %"struct.std::less"* %this, %"struct.std::less"** %this.addr, align 8
store i32* %__x, i32** %__x.addr, align 8
store i32* %__y, i32** %__y.addr, align 8
%this1 = load %"struct.std::less"*, %"struct.std::less"** %this.addr, align 8
%0 = load i32*, i32** %__x.addr, align 8
%1 = load i32, i32* %0, align 4
%2 = load i32*, i32** %__y.addr, align 8
%3 = load i32, i32* %2, align 4
%cmp = icmp slt i32 %1, %3
ret i1 %cmp
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(16) %"struct.std::pair"* @_ZNKSt17_Rb_tree_iteratorISt4pairIKiPcEEdeEv(%"struct.std::_Rb_tree_iterator"* %this) #4 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%this.addr = alloca %"struct.std::_Rb_tree_iterator"*, align 8
store %"struct.std::_Rb_tree_iterator"* %this, %"struct.std::_Rb_tree_iterator"** %this.addr, align 8
%this1 = load %"struct.std::_Rb_tree_iterator"*, %"struct.std::_Rb_tree_iterator"** %this.addr, align 8
%_M_node = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %this1, i32 0, i32 0
%0 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node, align 8
%1 = bitcast %"struct.std::_Rb_tree_node_base"* %0 to %"struct.std::_Rb_tree_node"*
%call = invoke %"struct.std::pair"* @_ZNSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(%"struct.std::_Rb_tree_node"* %1)
to label %invoke.cont unwind label %terminate.lpad
invoke.cont: ; preds = %entry
ret %"struct.std::pair"* %call
terminate.lpad: ; preds = %entry
%2 = landingpad { i8*, i32 }
catch i8* null
%3 = extractvalue { i8*, i32 } %2, 0
call void @__clang_call_terminate(i8* %3) #13
unreachable
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE22_M_emplace_hint_uniqueIJRKSt21piecewise_construct_tSt5tupleIJOiEESE_IJEEEEESt17_Rb_tree_iteratorIS3_ESt23_Rb_tree_const_iteratorIS3_EDpOT_(%"class.std::_Rb_tree"* %this, %"struct.std::_Rb_tree_node_base"* %__pos.coerce, %"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %__args, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %__args1, %"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %__args3) #0 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%retval = alloca %"struct.std::_Rb_tree_iterator", align 8
%__pos = alloca %"struct.std::_Rb_tree_const_iterator", align 8
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__args.addr = alloca %"struct.std::piecewise_construct_t"*, align 8
%__args.addr2 = alloca %"class.std::tuple"*, align 8
%__args.addr4 = alloca %"class.std::tuple.0"*, align 8
%__z = alloca %"struct.std::_Rb_tree_node"*, align 8
%__res = alloca %"struct.std::pair.1", align 8
%agg.tmp = alloca %"struct.std::_Rb_tree_const_iterator", align 8
%exn.slot = alloca i8*, align 8
%ehselector.slot = alloca i32, align 4
%coerce.dive = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", %"struct.std::_Rb_tree_const_iterator"* %__pos, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %__pos.coerce, %"struct.std::_Rb_tree_node_base"** %coerce.dive, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store %"struct.std::piecewise_construct_t"* %__args, %"struct.std::piecewise_construct_t"** %__args.addr, align 8
store %"class.std::tuple"* %__args1, %"class.std::tuple"** %__args.addr2, align 8
store %"class.std::tuple.0"* %__args3, %"class.std::tuple.0"** %__args.addr4, align 8
%this5 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%0 = load %"struct.std::piecewise_construct_t"*, %"struct.std::piecewise_construct_t"** %__args.addr, align 8
%call = call nonnull align 1 dereferenceable(1) %"struct.std::piecewise_construct_t"* @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(%"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %0) #12
%1 = load %"class.std::tuple"*, %"class.std::tuple"** %__args.addr2, align 8
%call6 = call nonnull align 8 dereferenceable(8) %"class.std::tuple"* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(%"class.std::tuple"* nonnull align 8 dereferenceable(8) %1) #12
%2 = load %"class.std::tuple.0"*, %"class.std::tuple.0"** %__args.addr4, align 8
%call7 = call nonnull align 1 dereferenceable(1) %"class.std::tuple.0"* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(%"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %2) #12
%call8 = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_create_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESE_IJEEEEEPSt13_Rb_tree_nodeIS3_EDpOT_(%"class.std::_Rb_tree"* %this5, %"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %call, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %call6, %"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %call7)
store %"struct.std::_Rb_tree_node"* %call8, %"struct.std::_Rb_tree_node"** %__z, align 8
%3 = bitcast %"struct.std::_Rb_tree_const_iterator"* %agg.tmp to i8*
%4 = bitcast %"struct.std::_Rb_tree_const_iterator"* %__pos to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %3, i8* align 8 %4, i64 8, i1 false)
%5 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__z, align 8
%call9 = invoke nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt13_Rb_tree_nodeIS3_E(%"struct.std::_Rb_tree_node"* %5)
to label %invoke.cont unwind label %lpad
invoke.cont: ; preds = %entry
%coerce.dive10 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", %"struct.std::_Rb_tree_const_iterator"* %agg.tmp, i32 0, i32 0
%6 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %coerce.dive10, align 8
%call12 = invoke { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS3_ERS1_(%"class.std::_Rb_tree"* %this5, %"struct.std::_Rb_tree_node_base"* %6, i32* nonnull align 4 dereferenceable(4) %call9)
to label %invoke.cont11 unwind label %lpad
invoke.cont11: ; preds = %invoke.cont
%7 = bitcast %"struct.std::pair.1"* %__res to { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }*
%8 = getelementptr inbounds { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }, { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }* %7, i32 0, i32 0
%9 = extractvalue { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } %call12, 0
store %"struct.std::_Rb_tree_node_base"* %9, %"struct.std::_Rb_tree_node_base"** %8, align 8
%10 = getelementptr inbounds { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }, { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }* %7, i32 0, i32 1
%11 = extractvalue { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } %call12, 1
store %"struct.std::_Rb_tree_node_base"* %11, %"struct.std::_Rb_tree_node_base"** %10, align 8
%second = getelementptr inbounds %"struct.std::pair.1", %"struct.std::pair.1"* %__res, i32 0, i32 1
%12 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %second, align 8
%tobool = icmp ne %"struct.std::_Rb_tree_node_base"* %12, null
br i1 %tobool, label %if.then, label %if.end
if.then: ; preds = %invoke.cont11
%first = getelementptr inbounds %"struct.std::pair.1", %"struct.std::pair.1"* %__res, i32 0, i32 0
%13 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %first, align 8
%second13 = getelementptr inbounds %"struct.std::pair.1", %"struct.std::pair.1"* %__res, i32 0, i32 1
%14 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %second13, align 8
%15 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__z, align 8
%call15 = invoke %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_insert_nodeEPSt18_Rb_tree_node_baseSB_PSt13_Rb_tree_nodeIS3_E(%"class.std::_Rb_tree"* %this5, %"struct.std::_Rb_tree_node_base"* %13, %"struct.std::_Rb_tree_node_base"* %14, %"struct.std::_Rb_tree_node"* %15)
to label %invoke.cont14 unwind label %lpad
invoke.cont14: ; preds = %if.then
%coerce.dive16 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %call15, %"struct.std::_Rb_tree_node_base"** %coerce.dive16, align 8
br label %return
lpad: ; preds = %if.then, %invoke.cont, %entry
%16 = landingpad { i8*, i32 }
catch i8* null
%17 = extractvalue { i8*, i32 } %16, 0
store i8* %17, i8** %exn.slot, align 8
%18 = extractvalue { i8*, i32 } %16, 1
store i32 %18, i32* %ehselector.slot, align 4
br label %catch
catch: ; preds = %lpad
%exn = load i8*, i8** %exn.slot, align 8
%19 = call i8* @__cxa_begin_catch(i8* %exn) #12
%20 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__z, align 8
call void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_drop_nodeEPSt13_Rb_tree_nodeIS3_E(%"class.std::_Rb_tree"* %this5, %"struct.std::_Rb_tree_node"* %20) #12
invoke void @__cxa_rethrow() #14
to label %unreachable unwind label %lpad18
if.end: ; preds = %invoke.cont11
%21 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__z, align 8
call void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_drop_nodeEPSt13_Rb_tree_nodeIS3_E(%"class.std::_Rb_tree"* %this5, %"struct.std::_Rb_tree_node"* %21) #12
%first17 = getelementptr inbounds %"struct.std::pair.1", %"struct.std::pair.1"* %__res, i32 0, i32 0
%22 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %first17, align 8
call void @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC2EPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_iterator"* %retval, %"struct.std::_Rb_tree_node_base"* %22) #12
br label %return
lpad18: ; preds = %catch
%23 = landingpad { i8*, i32 }
cleanup
%24 = extractvalue { i8*, i32 } %23, 0
store i8* %24, i8** %exn.slot, align 8
%25 = extractvalue { i8*, i32 } %23, 1
store i32 %25, i32* %ehselector.slot, align 4
invoke void @__cxa_end_catch()
to label %invoke.cont19 unwind label %terminate.lpad
invoke.cont19: ; preds = %lpad18
br label %eh.resume
try.cont: ; No predecessors!
call void @llvm.trap()
unreachable
return: ; preds = %if.end, %invoke.cont14
%coerce.dive20 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
%26 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %coerce.dive20, align 8
ret %"struct.std::_Rb_tree_node_base"* %26
eh.resume: ; preds = %invoke.cont19
%exn21 = load i8*, i8** %exn.slot, align 8
%sel = load i32, i32* %ehselector.slot, align 4
%lpad.val = insertvalue { i8*, i32 } undef, i8* %exn21, 0
%lpad.val22 = insertvalue { i8*, i32 } %lpad.val, i32 %sel, 1
resume { i8*, i32 } %lpad.val22
terminate.lpad: ; preds = %lpad18
%27 = landingpad { i8*, i32 }
catch i8* null
%28 = extractvalue { i8*, i32 } %27, 0
call void @__clang_call_terminate(i8* %28) #13
unreachable
unreachable: ; preds = %catch
unreachable
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt23_Rb_tree_const_iteratorISt4pairIKiPcEEC2ERKSt17_Rb_tree_iteratorIS3_E(%"struct.std::_Rb_tree_const_iterator"* %this, %"struct.std::_Rb_tree_iterator"* nonnull align 8 dereferenceable(8) %__it) unnamed_addr #4 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Rb_tree_const_iterator"*, align 8
%__it.addr = alloca %"struct.std::_Rb_tree_iterator"*, align 8
store %"struct.std::_Rb_tree_const_iterator"* %this, %"struct.std::_Rb_tree_const_iterator"** %this.addr, align 8
store %"struct.std::_Rb_tree_iterator"* %__it, %"struct.std::_Rb_tree_iterator"** %__it.addr, align 8
%this1 = load %"struct.std::_Rb_tree_const_iterator"*, %"struct.std::_Rb_tree_const_iterator"** %this.addr, align 8
%_M_node = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", %"struct.std::_Rb_tree_const_iterator"* %this1, i32 0, i32 0
%0 = load %"struct.std::_Rb_tree_iterator"*, %"struct.std::_Rb_tree_iterator"** %__it.addr, align 8
%_M_node2 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %0, i32 0, i32 0
%1 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node2, align 8
store %"struct.std::_Rb_tree_node_base"* %1, %"struct.std::_Rb_tree_node_base"** %_M_node, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZSt16forward_as_tupleIJiEESt5tupleIJDpOT_EES3_(%"class.std::tuple"* noalias sret align 8 %agg.result, i32* nonnull align 4 dereferenceable(4) %__args) #4 comdat {
entry:
%result.ptr = alloca i8*, align 8
%__args.addr = alloca i32*, align 8
%0 = bitcast %"class.std::tuple"* %agg.result to i8*
store i8* %0, i8** %result.ptr, align 8
store i32* %__args, i32** %__args.addr, align 8
%1 = load i32*, i32** %__args.addr, align 8
%call = call nonnull align 4 dereferenceable(4) i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i32* nonnull align 4 dereferenceable(4) %1) #12
call void @_ZNSt5tupleIJOiEEC2IJiELb1ELb1EEEDpOT_(%"class.std::tuple"* %agg.result, i32* nonnull align 4 dereferenceable(4) %call) #12
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 4 dereferenceable(4) i32* @_ZSt4moveIRiEONSt16remove_referenceIT_E4typeEOS2_(i32* nonnull align 4 dereferenceable(4) %__t) #4 comdat {
entry:
%__t.addr = alloca i32*, align 8
store i32* %__t, i32** %__t.addr, align 8
%0 = load i32*, i32** %__t.addr, align 8
ret i32* %0
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11lower_boundERS1_(%"class.std::_Rb_tree"* %this, i32* nonnull align 4 dereferenceable(4) %__k) #0 comdat align 2 {
entry:
%retval = alloca %"struct.std::_Rb_tree_iterator", align 8
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__k.addr = alloca i32*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store i32* %__k, i32** %__k.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%call = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_M_beginEv(%"class.std::_Rb_tree"* %this1) #12
%call2 = call %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_M_endEv(%"class.std::_Rb_tree"* %this1) #12
%0 = load i32*, i32** %__k.addr, align 8
%call3 = call %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_lower_boundEPSt13_Rb_tree_nodeIS3_EPSt18_Rb_tree_node_baseRS1_(%"class.std::_Rb_tree"* %this1, %"struct.std::_Rb_tree_node"* %call, %"struct.std::_Rb_tree_node_base"* %call2, i32* nonnull align 4 dereferenceable(4) %0)
%coerce.dive = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %call3, %"struct.std::_Rb_tree_node_base"** %coerce.dive, align 8
%coerce.dive4 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
%1 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %coerce.dive4, align 8
ret %"struct.std::_Rb_tree_node_base"* %1
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_lower_boundEPSt13_Rb_tree_nodeIS3_EPSt18_Rb_tree_node_baseRS1_(%"class.std::_Rb_tree"* %this, %"struct.std::_Rb_tree_node"* %__x, %"struct.std::_Rb_tree_node_base"* %__y, i32* nonnull align 4 dereferenceable(4) %__k) #0 comdat align 2 {
entry:
%retval = alloca %"struct.std::_Rb_tree_iterator", align 8
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__x.addr = alloca %"struct.std::_Rb_tree_node"*, align 8
%__y.addr = alloca %"struct.std::_Rb_tree_node_base"*, align 8
%__k.addr = alloca i32*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store %"struct.std::_Rb_tree_node"* %__x, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
store %"struct.std::_Rb_tree_node_base"* %__y, %"struct.std::_Rb_tree_node_base"** %__y.addr, align 8
store i32* %__k, i32** %__k.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
br label %while.cond
while.cond: ; preds = %if.end, %entry
%0 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
%cmp = icmp ne %"struct.std::_Rb_tree_node"* %0, null
br i1 %cmp, label %while.body, label %while.end
while.body: ; preds = %while.cond
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%1 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl to %"struct.std::_Rb_tree_key_compare"*
%_M_key_compare = getelementptr inbounds %"struct.std::_Rb_tree_key_compare", %"struct.std::_Rb_tree_key_compare"* %1, i32 0, i32 0
%2 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
%call = call nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt13_Rb_tree_nodeIS3_E(%"struct.std::_Rb_tree_node"* %2)
%3 = load i32*, i32** %__k.addr, align 8
%call2 = call zeroext i1 @_ZNKSt4lessIiEclERKiS2_(%"struct.std::less"* %_M_key_compare, i32* nonnull align 4 dereferenceable(4) %call, i32* nonnull align 4 dereferenceable(4) %3)
br i1 %call2, label %if.else, label %if.then
if.then: ; preds = %while.body
%4 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
%5 = bitcast %"struct.std::_Rb_tree_node"* %4 to %"struct.std::_Rb_tree_node_base"*
store %"struct.std::_Rb_tree_node_base"* %5, %"struct.std::_Rb_tree_node_base"** %__y.addr, align 8
%6 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
%7 = bitcast %"struct.std::_Rb_tree_node"* %6 to %"struct.std::_Rb_tree_node_base"*
%call3 = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_S_leftEPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %7) #12
store %"struct.std::_Rb_tree_node"* %call3, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
br label %if.end
if.else: ; preds = %while.body
%8 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
%9 = bitcast %"struct.std::_Rb_tree_node"* %8 to %"struct.std::_Rb_tree_node_base"*
%call4 = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %9) #12
store %"struct.std::_Rb_tree_node"* %call4, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
br label %if.end
if.end: ; preds = %if.else, %if.then
br label %while.cond
while.end: ; preds = %while.cond
%10 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__y.addr, align 8
call void @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC2EPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_iterator"* %retval, %"struct.std::_Rb_tree_node_base"* %10) #12
%coerce.dive = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
%11 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %coerce.dive, align 8
ret %"struct.std::_Rb_tree_node_base"* %11
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_M_beginEv(%"class.std::_Rb_tree"* %this) #4 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%call = call %"struct.std::_Rb_tree_node"* @_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE9_M_mbeginEv(%"class.std::_Rb_tree"* %this1) #12
ret %"struct.std::_Rb_tree_node"* %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_M_endEv(%"class.std::_Rb_tree"* %this) #4 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%0 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl to i8*
%add.ptr = getelementptr inbounds i8, i8* %0, i64 8
%1 = bitcast i8* %add.ptr to %"struct.std::_Rb_tree_header"*
%_M_header = getelementptr inbounds %"struct.std::_Rb_tree_header", %"struct.std::_Rb_tree_header"* %1, i32 0, i32 0
ret %"struct.std::_Rb_tree_node_base"* %_M_header
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt13_Rb_tree_nodeIS3_E(%"struct.std::_Rb_tree_node"* %__x) #0 comdat align 2 {
entry:
%__x.addr = alloca %"struct.std::_Rb_tree_node"*, align 8
%ref.tmp = alloca %"struct.std::_Select1st", align 1
store %"struct.std::_Rb_tree_node"* %__x, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
%0 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x.addr, align 8
%call = call %"struct.std::pair"* @_ZNKSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(%"struct.std::_Rb_tree_node"* %0)
%call1 = call nonnull align 4 dereferenceable(4) i32* @_ZNKSt10_Select1stISt4pairIKiPcEEclERKS3_(%"struct.std::_Select1st"* %ref.tmp, %"struct.std::pair"* nonnull align 8 dereferenceable(16) %call)
ret i32* %call1
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_S_leftEPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %__x) #4 comdat align 2 {
entry:
%__x.addr = alloca %"struct.std::_Rb_tree_node_base"*, align 8
store %"struct.std::_Rb_tree_node_base"* %__x, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
%0 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
%_M_left = getelementptr inbounds %"struct.std::_Rb_tree_node_base", %"struct.std::_Rb_tree_node_base"* %0, i32 0, i32 2
%1 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_left, align 8
%2 = bitcast %"struct.std::_Rb_tree_node_base"* %1 to %"struct.std::_Rb_tree_node"*
ret %"struct.std::_Rb_tree_node"* %2
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %__x) #4 comdat align 2 {
entry:
%__x.addr = alloca %"struct.std::_Rb_tree_node_base"*, align 8
store %"struct.std::_Rb_tree_node_base"* %__x, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
%0 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
%_M_right = getelementptr inbounds %"struct.std::_Rb_tree_node_base", %"struct.std::_Rb_tree_node_base"* %0, i32 0, i32 3
%1 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_right, align 8
%2 = bitcast %"struct.std::_Rb_tree_node_base"* %1 to %"struct.std::_Rb_tree_node"*
ret %"struct.std::_Rb_tree_node"* %2
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC2EPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_iterator"* %this, %"struct.std::_Rb_tree_node_base"* %__x) unnamed_addr #4 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Rb_tree_iterator"*, align 8
%__x.addr = alloca %"struct.std::_Rb_tree_node_base"*, align 8
store %"struct.std::_Rb_tree_iterator"* %this, %"struct.std::_Rb_tree_iterator"** %this.addr, align 8
store %"struct.std::_Rb_tree_node_base"* %__x, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
%this1 = load %"struct.std::_Rb_tree_iterator"*, %"struct.std::_Rb_tree_iterator"** %this.addr, align 8
%_M_node = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %this1, i32 0, i32 0
%0 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
store %"struct.std::_Rb_tree_node_base"* %0, %"struct.std::_Rb_tree_node_base"** %_M_node, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 4 dereferenceable(4) i32* @_ZNKSt10_Select1stISt4pairIKiPcEEclERKS3_(%"struct.std::_Select1st"* %this, %"struct.std::pair"* nonnull align 8 dereferenceable(16) %__x) #4 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Select1st"*, align 8
%__x.addr = alloca %"struct.std::pair"*, align 8
store %"struct.std::_Select1st"* %this, %"struct.std::_Select1st"** %this.addr, align 8
store %"struct.std::pair"* %__x, %"struct.std::pair"** %__x.addr, align 8
%this1 = load %"struct.std::_Select1st"*, %"struct.std::_Select1st"** %this.addr, align 8
%0 = load %"struct.std::pair"*, %"struct.std::pair"** %__x.addr, align 8
%first = getelementptr inbounds %"struct.std::pair", %"struct.std::pair"* %0, i32 0, i32 0
ret i32* %first
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::pair"* @_ZNKSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(%"struct.std::_Rb_tree_node"* %this) #4 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Rb_tree_node"*, align 8
store %"struct.std::_Rb_tree_node"* %this, %"struct.std::_Rb_tree_node"** %this.addr, align 8
%this1 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %this.addr, align 8
%_M_storage = getelementptr inbounds %"struct.std::_Rb_tree_node", %"struct.std::_Rb_tree_node"* %this1, i32 0, i32 1
%call = call %"struct.std::pair"* @_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiPcEE6_M_ptrEv(%"struct.__gnu_cxx::__aligned_membuf"* %_M_storage) #12
ret %"struct.std::pair"* %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::pair"* @_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiPcEE6_M_ptrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this) #4 comdat align 2 {
entry:
%this.addr = alloca %"struct.__gnu_cxx::__aligned_membuf"*, align 8
store %"struct.__gnu_cxx::__aligned_membuf"* %this, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%this1 = load %"struct.__gnu_cxx::__aligned_membuf"*, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%call = call i8* @_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiPcEE7_M_addrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this1) #12
%0 = bitcast i8* %call to %"struct.std::pair"*
ret %"struct.std::pair"* %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i8* @_ZNK9__gnu_cxx16__aligned_membufISt4pairIKiPcEE7_M_addrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this) #4 comdat align 2 {
entry:
%this.addr = alloca %"struct.__gnu_cxx::__aligned_membuf"*, align 8
store %"struct.__gnu_cxx::__aligned_membuf"* %this, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%this1 = load %"struct.__gnu_cxx::__aligned_membuf"*, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%_M_storage = getelementptr inbounds %"struct.__gnu_cxx::__aligned_membuf", %"struct.__gnu_cxx::__aligned_membuf"* %this1, i32 0, i32 0
%0 = bitcast [16 x i8]* %_M_storage to i8*
ret i8* %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node"* @_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE9_M_mbeginEv(%"class.std::_Rb_tree"* %this) #4 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%0 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl to i8*
%add.ptr = getelementptr inbounds i8, i8* %0, i64 8
%1 = bitcast i8* %add.ptr to %"struct.std::_Rb_tree_header"*
%_M_header = getelementptr inbounds %"struct.std::_Rb_tree_header", %"struct.std::_Rb_tree_header"* %1, i32 0, i32 0
%_M_parent = getelementptr inbounds %"struct.std::_Rb_tree_node_base", %"struct.std::_Rb_tree_node_base"* %_M_header, i32 0, i32 1
%2 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_parent, align 8
%3 = bitcast %"struct.std::_Rb_tree_node_base"* %2 to %"struct.std::_Rb_tree_node"*
ret %"struct.std::_Rb_tree_node"* %3
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE3endEv(%"class.std::_Rb_tree"* %this) #4 comdat align 2 {
entry:
%retval = alloca %"struct.std::_Rb_tree_iterator", align 8
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%0 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl to i8*
%add.ptr = getelementptr inbounds i8, i8* %0, i64 8
%1 = bitcast i8* %add.ptr to %"struct.std::_Rb_tree_header"*
%_M_header = getelementptr inbounds %"struct.std::_Rb_tree_header", %"struct.std::_Rb_tree_header"* %1, i32 0, i32 0
call void @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC2EPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_iterator"* %retval, %"struct.std::_Rb_tree_node_base"* %_M_header) #12
%coerce.dive = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
%2 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %coerce.dive, align 8
ret %"struct.std::_Rb_tree_node_base"* %2
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8key_compEv(%"class.std::_Rb_tree"* %this) #4 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%0 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl to %"struct.std::_Rb_tree_key_compare"*
%_M_key_compare = getelementptr inbounds %"struct.std::_Rb_tree_key_compare", %"struct.std::_Rb_tree_key_compare"* %0, i32 0, i32 0
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::pair"* @_ZNSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(%"struct.std::_Rb_tree_node"* %this) #4 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Rb_tree_node"*, align 8
store %"struct.std::_Rb_tree_node"* %this, %"struct.std::_Rb_tree_node"** %this.addr, align 8
%this1 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %this.addr, align 8
%_M_storage = getelementptr inbounds %"struct.std::_Rb_tree_node", %"struct.std::_Rb_tree_node"* %this1, i32 0, i32 1
%call = call %"struct.std::pair"* @_ZN9__gnu_cxx16__aligned_membufISt4pairIKiPcEE6_M_ptrEv(%"struct.__gnu_cxx::__aligned_membuf"* %_M_storage) #12
ret %"struct.std::pair"* %call
}
declare dso_local i32 @__gxx_personality_v0(...)
; Function Attrs: noinline noreturn nounwind
define linkonce_odr hidden void @__clang_call_terminate(i8* %0) #5 comdat {
%2 = call i8* @__cxa_begin_catch(i8* %0) #12
call void @_ZSt9terminatev() #13
unreachable
}
declare dso_local i8* @__cxa_begin_catch(i8*)
declare dso_local void @_ZSt9terminatev()
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::pair"* @_ZN9__gnu_cxx16__aligned_membufISt4pairIKiPcEE6_M_ptrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this) #4 comdat align 2 {
entry:
%this.addr = alloca %"struct.__gnu_cxx::__aligned_membuf"*, align 8
store %"struct.__gnu_cxx::__aligned_membuf"* %this, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%this1 = load %"struct.__gnu_cxx::__aligned_membuf"*, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%call = call i8* @_ZN9__gnu_cxx16__aligned_membufISt4pairIKiPcEE7_M_addrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this1) #12
%0 = bitcast i8* %call to %"struct.std::pair"*
ret %"struct.std::pair"* %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i8* @_ZN9__gnu_cxx16__aligned_membufISt4pairIKiPcEE7_M_addrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this) #4 comdat align 2 {
entry:
%this.addr = alloca %"struct.__gnu_cxx::__aligned_membuf"*, align 8
store %"struct.__gnu_cxx::__aligned_membuf"* %this, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%this1 = load %"struct.__gnu_cxx::__aligned_membuf"*, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%_M_storage = getelementptr inbounds %"struct.__gnu_cxx::__aligned_membuf", %"struct.__gnu_cxx::__aligned_membuf"* %this1, i32 0, i32 0
%0 = bitcast [16 x i8]* %_M_storage to i8*
ret i8* %0
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_create_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESE_IJEEEEEPSt13_Rb_tree_nodeIS3_EDpOT_(%"class.std::_Rb_tree"* %this, %"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %__args, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %__args1, %"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %__args3) #0 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__args.addr = alloca %"struct.std::piecewise_construct_t"*, align 8
%__args.addr2 = alloca %"class.std::tuple"*, align 8
%__args.addr4 = alloca %"class.std::tuple.0"*, align 8
%__tmp = alloca %"struct.std::_Rb_tree_node"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store %"struct.std::piecewise_construct_t"* %__args, %"struct.std::piecewise_construct_t"** %__args.addr, align 8
store %"class.std::tuple"* %__args1, %"class.std::tuple"** %__args.addr2, align 8
store %"class.std::tuple.0"* %__args3, %"class.std::tuple.0"** %__args.addr4, align 8
%this5 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%call = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_get_nodeEv(%"class.std::_Rb_tree"* %this5)
store %"struct.std::_Rb_tree_node"* %call, %"struct.std::_Rb_tree_node"** %__tmp, align 8
%0 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__tmp, align 8
%1 = load %"struct.std::piecewise_construct_t"*, %"struct.std::piecewise_construct_t"** %__args.addr, align 8
%call6 = call nonnull align 1 dereferenceable(1) %"struct.std::piecewise_construct_t"* @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(%"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %1) #12
%2 = load %"class.std::tuple"*, %"class.std::tuple"** %__args.addr2, align 8
%call7 = call nonnull align 8 dereferenceable(8) %"class.std::tuple"* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(%"class.std::tuple"* nonnull align 8 dereferenceable(8) %2) #12
%3 = load %"class.std::tuple.0"*, %"class.std::tuple.0"** %__args.addr4, align 8
%call8 = call nonnull align 1 dereferenceable(1) %"class.std::tuple.0"* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(%"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %3) #12
call void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE17_M_construct_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESE_IJEEEEEvPSt13_Rb_tree_nodeIS3_EDpOT_(%"class.std::_Rb_tree"* %this5, %"struct.std::_Rb_tree_node"* %0, %"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %call6, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %call7, %"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %call8)
%4 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__tmp, align 8
ret %"struct.std::_Rb_tree_node"* %4
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 1 dereferenceable(1) %"struct.std::piecewise_construct_t"* @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(%"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %__t) #4 comdat {
entry:
%__t.addr = alloca %"struct.std::piecewise_construct_t"*, align 8
store %"struct.std::piecewise_construct_t"* %__t, %"struct.std::piecewise_construct_t"** %__t.addr, align 8
%0 = load %"struct.std::piecewise_construct_t"*, %"struct.std::piecewise_construct_t"** %__t.addr, align 8
ret %"struct.std::piecewise_construct_t"* %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) %"class.std::tuple"* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(%"class.std::tuple"* nonnull align 8 dereferenceable(8) %__t) #4 comdat {
entry:
%__t.addr = alloca %"class.std::tuple"*, align 8
store %"class.std::tuple"* %__t, %"class.std::tuple"** %__t.addr, align 8
%0 = load %"class.std::tuple"*, %"class.std::tuple"** %__t.addr, align 8
ret %"class.std::tuple"* %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 1 dereferenceable(1) %"class.std::tuple.0"* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(%"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %__t) #4 comdat {
entry:
%__t.addr = alloca %"class.std::tuple.0"*, align 8
store %"class.std::tuple.0"* %__t, %"class.std::tuple.0"** %__t.addr, align 8
%0 = load %"class.std::tuple.0"*, %"class.std::tuple.0"** %__t.addr, align 8
ret %"class.std::tuple.0"* %0
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE29_M_get_insert_hint_unique_posESt23_Rb_tree_const_iteratorIS3_ERS1_(%"class.std::_Rb_tree"* %this, %"struct.std::_Rb_tree_node_base"* %__position.coerce, i32* nonnull align 4 dereferenceable(4) %__k) #0 comdat align 2 {
entry:
%retval = alloca %"struct.std::pair.1", align 8
%__position = alloca %"struct.std::_Rb_tree_const_iterator", align 8
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__k.addr = alloca i32*, align 8
%__pos = alloca %"struct.std::_Rb_tree_iterator", align 8
%ref.tmp = alloca %"struct.std::_Rb_tree_node_base"*, align 8
%__before = alloca %"struct.std::_Rb_tree_iterator", align 8
%ref.tmp37 = alloca %"struct.std::_Rb_tree_node_base"*, align 8
%__after = alloca %"struct.std::_Rb_tree_iterator", align 8
%ref.tmp55 = alloca %"struct.std::_Rb_tree_node_base"*, align 8
%ref.tmp69 = alloca %"struct.std::_Rb_tree_node_base"*, align 8
%ref.tmp78 = alloca %"struct.std::_Rb_tree_node_base"*, align 8
%coerce.dive = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", %"struct.std::_Rb_tree_const_iterator"* %__position, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %__position.coerce, %"struct.std::_Rb_tree_node_base"** %coerce.dive, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store i32* %__k, i32** %__k.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%call = call %"struct.std::_Rb_tree_node_base"* @_ZNKSt23_Rb_tree_const_iteratorISt4pairIKiPcEE13_M_const_castEv(%"struct.std::_Rb_tree_const_iterator"* %__position) #12
%coerce.dive2 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__pos, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %call, %"struct.std::_Rb_tree_node_base"** %coerce.dive2, align 8
%_M_node = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__pos, i32 0, i32 0
%0 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node, align 8
%call3 = call %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_M_endEv(%"class.std::_Rb_tree"* %this1) #12
%cmp = icmp eq %"struct.std::_Rb_tree_node_base"* %0, %call3
br i1 %cmp, label %if.then, label %if.else12
if.then: ; preds = %entry
%call4 = call i64 @_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE4sizeEv(%"class.std::_Rb_tree"* %this1) #12
%cmp5 = icmp ugt i64 %call4, 0
br i1 %cmp5, label %land.lhs.true, label %if.else
land.lhs.true: ; preds = %if.then
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%1 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl to %"struct.std::_Rb_tree_key_compare"*
%_M_key_compare = getelementptr inbounds %"struct.std::_Rb_tree_key_compare", %"struct.std::_Rb_tree_key_compare"* %1, i32 0, i32 0
%call6 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_rightmostEv(%"class.std::_Rb_tree"* %this1) #12
%2 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %call6, align 8
%call7 = call nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %2)
%3 = load i32*, i32** %__k.addr, align 8
%call8 = call zeroext i1 @_ZNKSt4lessIiEclERKiS2_(%"struct.std::less"* %_M_key_compare, i32* nonnull align 4 dereferenceable(4) %call7, i32* nonnull align 4 dereferenceable(4) %3)
br i1 %call8, label %if.then9, label %if.else
if.then9: ; preds = %land.lhs.true
store %"struct.std::_Rb_tree_node_base"* null, %"struct.std::_Rb_tree_node_base"** %ref.tmp, align 8
%call10 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_rightmostEv(%"class.std::_Rb_tree"* %this1) #12
call void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_Lb1EEERKS1_OT_(%"struct.std::pair.1"* %retval, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %ref.tmp, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %call10)
br label %return
if.else: ; preds = %land.lhs.true, %if.then
%4 = load i32*, i32** %__k.addr, align 8
%call11 = call { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE24_M_get_insert_unique_posERS1_(%"class.std::_Rb_tree"* %this1, i32* nonnull align 4 dereferenceable(4) %4)
%5 = bitcast %"struct.std::pair.1"* %retval to { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }*
%6 = getelementptr inbounds { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }, { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }* %5, i32 0, i32 0
%7 = extractvalue { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } %call11, 0
store %"struct.std::_Rb_tree_node_base"* %7, %"struct.std::_Rb_tree_node_base"** %6, align 8
%8 = getelementptr inbounds { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }, { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }* %5, i32 0, i32 1
%9 = extractvalue { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } %call11, 1
store %"struct.std::_Rb_tree_node_base"* %9, %"struct.std::_Rb_tree_node_base"** %8, align 8
br label %return
if.else12: ; preds = %entry
%_M_impl13 = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%10 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl13 to %"struct.std::_Rb_tree_key_compare"*
%_M_key_compare14 = getelementptr inbounds %"struct.std::_Rb_tree_key_compare", %"struct.std::_Rb_tree_key_compare"* %10, i32 0, i32 0
%11 = load i32*, i32** %__k.addr, align 8
%_M_node15 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__pos, i32 0, i32 0
%12 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node15, align 8
%call16 = call nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %12)
%call17 = call zeroext i1 @_ZNKSt4lessIiEclERKiS2_(%"struct.std::less"* %_M_key_compare14, i32* nonnull align 4 dereferenceable(4) %11, i32* nonnull align 4 dereferenceable(4) %call16)
br i1 %call17, label %if.then18, label %if.else44
if.then18: ; preds = %if.else12
%13 = bitcast %"struct.std::_Rb_tree_iterator"* %__before to i8*
%14 = bitcast %"struct.std::_Rb_tree_iterator"* %__pos to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %13, i8* align 8 %14, i64 8, i1 false)
%_M_node19 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__pos, i32 0, i32 0
%15 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node19, align 8
%call20 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_leftmostEv(%"class.std::_Rb_tree"* %this1) #12
%16 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %call20, align 8
%cmp21 = icmp eq %"struct.std::_Rb_tree_node_base"* %15, %16
br i1 %cmp21, label %if.then22, label %if.else25
if.then22: ; preds = %if.then18
%call23 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_leftmostEv(%"class.std::_Rb_tree"* %this1) #12
%call24 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_leftmostEv(%"class.std::_Rb_tree"* %this1) #12
call void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_S4_Lb1EEEOT_OT0_(%"struct.std::pair.1"* %retval, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %call23, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %call24)
br label %return
if.else25: ; preds = %if.then18
%_M_impl26 = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%17 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl26 to %"struct.std::_Rb_tree_key_compare"*
%_M_key_compare27 = getelementptr inbounds %"struct.std::_Rb_tree_key_compare", %"struct.std::_Rb_tree_key_compare"* %17, i32 0, i32 0
%call28 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_iterator"* @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEmmEv(%"struct.std::_Rb_tree_iterator"* %__before) #12
%_M_node29 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %call28, i32 0, i32 0
%18 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node29, align 8
%call30 = call nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %18)
%19 = load i32*, i32** %__k.addr, align 8
%call31 = call zeroext i1 @_ZNKSt4lessIiEclERKiS2_(%"struct.std::less"* %_M_key_compare27, i32* nonnull align 4 dereferenceable(4) %call30, i32* nonnull align 4 dereferenceable(4) %19)
br i1 %call31, label %if.then32, label %if.else42
if.then32: ; preds = %if.else25
%_M_node33 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__before, i32 0, i32 0
%20 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node33, align 8
%call34 = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %20) #12
%cmp35 = icmp eq %"struct.std::_Rb_tree_node"* %call34, null
br i1 %cmp35, label %if.then36, label %if.else39
if.then36: ; preds = %if.then32
store %"struct.std::_Rb_tree_node_base"* null, %"struct.std::_Rb_tree_node_base"** %ref.tmp37, align 8
%_M_node38 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__before, i32 0, i32 0
call void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_Lb1EEERKS1_OT_(%"struct.std::pair.1"* %retval, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %ref.tmp37, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %_M_node38)
br label %return
if.else39: ; preds = %if.then32
%_M_node40 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__pos, i32 0, i32 0
%_M_node41 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__pos, i32 0, i32 0
call void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_S4_Lb1EEEOT_OT0_(%"struct.std::pair.1"* %retval, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %_M_node40, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %_M_node41)
br label %return
if.else42: ; preds = %if.else25
%21 = load i32*, i32** %__k.addr, align 8
%call43 = call { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE24_M_get_insert_unique_posERS1_(%"class.std::_Rb_tree"* %this1, i32* nonnull align 4 dereferenceable(4) %21)
%22 = bitcast %"struct.std::pair.1"* %retval to { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }*
%23 = getelementptr inbounds { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }, { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }* %22, i32 0, i32 0
%24 = extractvalue { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } %call43, 0
store %"struct.std::_Rb_tree_node_base"* %24, %"struct.std::_Rb_tree_node_base"** %23, align 8
%25 = getelementptr inbounds { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }, { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }* %22, i32 0, i32 1
%26 = extractvalue { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } %call43, 1
store %"struct.std::_Rb_tree_node_base"* %26, %"struct.std::_Rb_tree_node_base"** %25, align 8
br label %return
if.else44: ; preds = %if.else12
%_M_impl45 = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%27 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl45 to %"struct.std::_Rb_tree_key_compare"*
%_M_key_compare46 = getelementptr inbounds %"struct.std::_Rb_tree_key_compare", %"struct.std::_Rb_tree_key_compare"* %27, i32 0, i32 0
%_M_node47 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__pos, i32 0, i32 0
%28 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node47, align 8
%call48 = call nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %28)
%29 = load i32*, i32** %__k.addr, align 8
%call49 = call zeroext i1 @_ZNKSt4lessIiEclERKiS2_(%"struct.std::less"* %_M_key_compare46, i32* nonnull align 4 dereferenceable(4) %call48, i32* nonnull align 4 dereferenceable(4) %29)
br i1 %call49, label %if.then50, label %if.else76
if.then50: ; preds = %if.else44
%30 = bitcast %"struct.std::_Rb_tree_iterator"* %__after to i8*
%31 = bitcast %"struct.std::_Rb_tree_iterator"* %__pos to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %30, i8* align 8 %31, i64 8, i1 false)
%_M_node51 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__pos, i32 0, i32 0
%32 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node51, align 8
%call52 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_rightmostEv(%"class.std::_Rb_tree"* %this1) #12
%33 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %call52, align 8
%cmp53 = icmp eq %"struct.std::_Rb_tree_node_base"* %32, %33
br i1 %cmp53, label %if.then54, label %if.else57
if.then54: ; preds = %if.then50
store %"struct.std::_Rb_tree_node_base"* null, %"struct.std::_Rb_tree_node_base"** %ref.tmp55, align 8
%call56 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_rightmostEv(%"class.std::_Rb_tree"* %this1) #12
call void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_Lb1EEERKS1_OT_(%"struct.std::pair.1"* %retval, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %ref.tmp55, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %call56)
br label %return
if.else57: ; preds = %if.then50
%_M_impl58 = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%34 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl58 to %"struct.std::_Rb_tree_key_compare"*
%_M_key_compare59 = getelementptr inbounds %"struct.std::_Rb_tree_key_compare", %"struct.std::_Rb_tree_key_compare"* %34, i32 0, i32 0
%35 = load i32*, i32** %__k.addr, align 8
%call60 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_iterator"* @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEppEv(%"struct.std::_Rb_tree_iterator"* %__after) #12
%_M_node61 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %call60, i32 0, i32 0
%36 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node61, align 8
%call62 = call nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %36)
%call63 = call zeroext i1 @_ZNKSt4lessIiEclERKiS2_(%"struct.std::less"* %_M_key_compare59, i32* nonnull align 4 dereferenceable(4) %35, i32* nonnull align 4 dereferenceable(4) %call62)
br i1 %call63, label %if.then64, label %if.else74
if.then64: ; preds = %if.else57
%_M_node65 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__pos, i32 0, i32 0
%37 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node65, align 8
%call66 = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %37) #12
%cmp67 = icmp eq %"struct.std::_Rb_tree_node"* %call66, null
br i1 %cmp67, label %if.then68, label %if.else71
if.then68: ; preds = %if.then64
store %"struct.std::_Rb_tree_node_base"* null, %"struct.std::_Rb_tree_node_base"** %ref.tmp69, align 8
%_M_node70 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__pos, i32 0, i32 0
call void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_Lb1EEERKS1_OT_(%"struct.std::pair.1"* %retval, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %ref.tmp69, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %_M_node70)
br label %return
if.else71: ; preds = %if.then64
%_M_node72 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__after, i32 0, i32 0
%_M_node73 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__after, i32 0, i32 0
call void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_S4_Lb1EEEOT_OT0_(%"struct.std::pair.1"* %retval, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %_M_node72, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %_M_node73)
br label %return
if.else74: ; preds = %if.else57
%38 = load i32*, i32** %__k.addr, align 8
%call75 = call { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE24_M_get_insert_unique_posERS1_(%"class.std::_Rb_tree"* %this1, i32* nonnull align 4 dereferenceable(4) %38)
%39 = bitcast %"struct.std::pair.1"* %retval to { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }*
%40 = getelementptr inbounds { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }, { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }* %39, i32 0, i32 0
%41 = extractvalue { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } %call75, 0
store %"struct.std::_Rb_tree_node_base"* %41, %"struct.std::_Rb_tree_node_base"** %40, align 8
%42 = getelementptr inbounds { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }, { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }* %39, i32 0, i32 1
%43 = extractvalue { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } %call75, 1
store %"struct.std::_Rb_tree_node_base"* %43, %"struct.std::_Rb_tree_node_base"** %42, align 8
br label %return
if.else76: ; preds = %if.else44
%_M_node77 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__pos, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* null, %"struct.std::_Rb_tree_node_base"** %ref.tmp78, align 8
call void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_Lb1EEEOT_RKS1_(%"struct.std::pair.1"* %retval, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %_M_node77, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %ref.tmp78)
br label %return
return: ; preds = %if.else76, %if.else74, %if.else71, %if.then68, %if.then54, %if.else42, %if.else39, %if.then36, %if.then22, %if.else, %if.then9
%44 = bitcast %"struct.std::pair.1"* %retval to { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }*
%45 = load { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }, { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }* %44, align 8
ret { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } %45
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE14_M_insert_nodeEPSt18_Rb_tree_node_baseSB_PSt13_Rb_tree_nodeIS3_E(%"class.std::_Rb_tree"* %this, %"struct.std::_Rb_tree_node_base"* %__x, %"struct.std::_Rb_tree_node_base"* %__p, %"struct.std::_Rb_tree_node"* %__z) #0 comdat align 2 {
entry:
%retval = alloca %"struct.std::_Rb_tree_iterator", align 8
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__x.addr = alloca %"struct.std::_Rb_tree_node_base"*, align 8
%__p.addr = alloca %"struct.std::_Rb_tree_node_base"*, align 8
%__z.addr = alloca %"struct.std::_Rb_tree_node"*, align 8
%__insert_left = alloca i8, align 1
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store %"struct.std::_Rb_tree_node_base"* %__x, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
store %"struct.std::_Rb_tree_node_base"* %__p, %"struct.std::_Rb_tree_node_base"** %__p.addr, align 8
store %"struct.std::_Rb_tree_node"* %__z, %"struct.std::_Rb_tree_node"** %__z.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%0 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
%cmp = icmp ne %"struct.std::_Rb_tree_node_base"* %0, null
br i1 %cmp, label %lor.end, label %lor.lhs.false
lor.lhs.false: ; preds = %entry
%1 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__p.addr, align 8
%call = call %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_M_endEv(%"class.std::_Rb_tree"* %this1) #12
%cmp2 = icmp eq %"struct.std::_Rb_tree_node_base"* %1, %call
br i1 %cmp2, label %lor.end, label %lor.rhs
lor.rhs: ; preds = %lor.lhs.false
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%2 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl to %"struct.std::_Rb_tree_key_compare"*
%_M_key_compare = getelementptr inbounds %"struct.std::_Rb_tree_key_compare", %"struct.std::_Rb_tree_key_compare"* %2, i32 0, i32 0
%3 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__z.addr, align 8
%call3 = call nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt13_Rb_tree_nodeIS3_E(%"struct.std::_Rb_tree_node"* %3)
%4 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__p.addr, align 8
%call4 = call nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %4)
%call5 = call zeroext i1 @_ZNKSt4lessIiEclERKiS2_(%"struct.std::less"* %_M_key_compare, i32* nonnull align 4 dereferenceable(4) %call3, i32* nonnull align 4 dereferenceable(4) %call4)
br label %lor.end
lor.end: ; preds = %lor.rhs, %lor.lhs.false, %entry
%5 = phi i1 [ true, %lor.lhs.false ], [ true, %entry ], [ %call5, %lor.rhs ]
%frombool = zext i1 %5 to i8
store i8 %frombool, i8* %__insert_left, align 1
%6 = load i8, i8* %__insert_left, align 1
%tobool = trunc i8 %6 to i1
%7 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__z.addr, align 8
%8 = bitcast %"struct.std::_Rb_tree_node"* %7 to %"struct.std::_Rb_tree_node_base"*
%9 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__p.addr, align 8
%_M_impl6 = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%10 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl6 to i8*
%add.ptr = getelementptr inbounds i8, i8* %10, i64 8
%11 = bitcast i8* %add.ptr to %"struct.std::_Rb_tree_header"*
%_M_header = getelementptr inbounds %"struct.std::_Rb_tree_header", %"struct.std::_Rb_tree_header"* %11, i32 0, i32 0
call void @_ZSt29_Rb_tree_insert_and_rebalancebPSt18_Rb_tree_node_baseS0_RS_(i1 zeroext %tobool, %"struct.std::_Rb_tree_node_base"* %8, %"struct.std::_Rb_tree_node_base"* %9, %"struct.std::_Rb_tree_node_base"* nonnull align 8 dereferenceable(32) %_M_header) #12
%_M_impl7 = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%12 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl7 to i8*
%add.ptr8 = getelementptr inbounds i8, i8* %12, i64 8
%13 = bitcast i8* %add.ptr8 to %"struct.std::_Rb_tree_header"*
%_M_node_count = getelementptr inbounds %"struct.std::_Rb_tree_header", %"struct.std::_Rb_tree_header"* %13, i32 0, i32 1
%14 = load i64, i64* %_M_node_count, align 8
%inc = add i64 %14, 1
store i64 %inc, i64* %_M_node_count, align 8
%15 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__z.addr, align 8
%16 = bitcast %"struct.std::_Rb_tree_node"* %15 to %"struct.std::_Rb_tree_node_base"*
call void @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC2EPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_iterator"* %retval, %"struct.std::_Rb_tree_node_base"* %16) #12
%coerce.dive = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
%17 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %coerce.dive, align 8
ret %"struct.std::_Rb_tree_node_base"* %17
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_drop_nodeEPSt13_Rb_tree_nodeIS3_E(%"class.std::_Rb_tree"* %this, %"struct.std::_Rb_tree_node"* %__p) #4 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__p.addr = alloca %"struct.std::_Rb_tree_node"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store %"struct.std::_Rb_tree_node"* %__p, %"struct.std::_Rb_tree_node"** %__p.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%0 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__p.addr, align 8
call void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE15_M_destroy_nodeEPSt13_Rb_tree_nodeIS3_E(%"class.std::_Rb_tree"* %this1, %"struct.std::_Rb_tree_node"* %0) #12
%1 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__p.addr, align 8
call void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_put_nodeEPSt13_Rb_tree_nodeIS3_E(%"class.std::_Rb_tree"* %this1, %"struct.std::_Rb_tree_node"* %1) #12
ret void
}
declare dso_local void @__cxa_rethrow()
declare dso_local void @__cxa_end_catch()
; Function Attrs: cold noreturn nounwind
declare void @llvm.trap() #6
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_get_nodeEv(%"class.std::_Rb_tree"* %this) #0 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%call = call nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE21_M_get_Node_allocatorEv(%"class.std::_Rb_tree"* %this1) #12
%call2 = call %"struct.std::_Rb_tree_node"* @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE8allocateERS6_m(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %call, i64 1)
ret %"struct.std::_Rb_tree_node"* %call2
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE17_M_construct_nodeIJRKSt21piecewise_construct_tSt5tupleIJOiEESE_IJEEEEEvPSt13_Rb_tree_nodeIS3_EDpOT_(%"class.std::_Rb_tree"* %this, %"struct.std::_Rb_tree_node"* %__node, %"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %__args, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %__args1, %"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %__args3) #0 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__node.addr = alloca %"struct.std::_Rb_tree_node"*, align 8
%__args.addr = alloca %"struct.std::piecewise_construct_t"*, align 8
%__args.addr2 = alloca %"class.std::tuple"*, align 8
%__args.addr4 = alloca %"class.std::tuple.0"*, align 8
%exn.slot = alloca i8*, align 8
%ehselector.slot = alloca i32, align 4
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store %"struct.std::_Rb_tree_node"* %__node, %"struct.std::_Rb_tree_node"** %__node.addr, align 8
store %"struct.std::piecewise_construct_t"* %__args, %"struct.std::piecewise_construct_t"** %__args.addr, align 8
store %"class.std::tuple"* %__args1, %"class.std::tuple"** %__args.addr2, align 8
store %"class.std::tuple.0"* %__args3, %"class.std::tuple.0"** %__args.addr4, align 8
%this5 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%0 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__node.addr, align 8
%1 = bitcast %"struct.std::_Rb_tree_node"* %0 to i8*
%2 = bitcast i8* %1 to %"struct.std::_Rb_tree_node"*
%call = call nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE21_M_get_Node_allocatorEv(%"class.std::_Rb_tree"* %this5) #12
%3 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__node.addr, align 8
%call6 = invoke %"struct.std::pair"* @_ZNSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(%"struct.std::_Rb_tree_node"* %3)
to label %invoke.cont unwind label %lpad
invoke.cont: ; preds = %entry
%4 = load %"struct.std::piecewise_construct_t"*, %"struct.std::piecewise_construct_t"** %__args.addr, align 8
%call7 = call nonnull align 1 dereferenceable(1) %"struct.std::piecewise_construct_t"* @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(%"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %4) #12
%5 = load %"class.std::tuple"*, %"class.std::tuple"** %__args.addr2, align 8
%call8 = call nonnull align 8 dereferenceable(8) %"class.std::tuple"* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(%"class.std::tuple"* nonnull align 8 dereferenceable(8) %5) #12
%6 = load %"class.std::tuple.0"*, %"class.std::tuple.0"** %__args.addr4, align 8
%call9 = call nonnull align 1 dereferenceable(1) %"class.std::tuple.0"* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(%"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %6) #12
invoke void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE9constructIS4_JRKSt21piecewise_construct_tSt5tupleIJOiEESC_IJEEEEEvRS6_PT_DpOT0_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %call, %"struct.std::pair"* %call6, %"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %call7, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %call8, %"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %call9)
to label %invoke.cont10 unwind label %lpad
invoke.cont10: ; preds = %invoke.cont
br label %try.cont
lpad: ; preds = %invoke.cont, %entry
%7 = landingpad { i8*, i32 }
catch i8* null
%8 = extractvalue { i8*, i32 } %7, 0
store i8* %8, i8** %exn.slot, align 8
%9 = extractvalue { i8*, i32 } %7, 1
store i32 %9, i32* %ehselector.slot, align 4
br label %catch
catch: ; preds = %lpad
%exn = load i8*, i8** %exn.slot, align 8
%10 = call i8* @__cxa_begin_catch(i8* %exn) #12
%11 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__node.addr, align 8
%12 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__node.addr, align 8
call void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_put_nodeEPSt13_Rb_tree_nodeIS3_E(%"class.std::_Rb_tree"* %this5, %"struct.std::_Rb_tree_node"* %12) #12
invoke void @__cxa_rethrow() #14
to label %unreachable unwind label %lpad11
lpad11: ; preds = %catch
%13 = landingpad { i8*, i32 }
cleanup
%14 = extractvalue { i8*, i32 } %13, 0
store i8* %14, i8** %exn.slot, align 8
%15 = extractvalue { i8*, i32 } %13, 1
store i32 %15, i32* %ehselector.slot, align 4
invoke void @__cxa_end_catch()
to label %invoke.cont12 unwind label %terminate.lpad
invoke.cont12: ; preds = %lpad11
br label %eh.resume
try.cont: ; preds = %invoke.cont10
ret void
eh.resume: ; preds = %invoke.cont12
%exn13 = load i8*, i8** %exn.slot, align 8
%sel = load i32, i32* %ehselector.slot, align 4
%lpad.val = insertvalue { i8*, i32 } undef, i8* %exn13, 0
%lpad.val14 = insertvalue { i8*, i32 } %lpad.val, i32 %sel, 1
resume { i8*, i32 } %lpad.val14
terminate.lpad: ; preds = %lpad11
%16 = landingpad { i8*, i32 }
catch i8* null
%17 = extractvalue { i8*, i32 } %16, 0
call void @__clang_call_terminate(i8* %17) #13
unreachable
unreachable: ; preds = %catch
unreachable
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node"* @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE8allocateERS6_m(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a, i64 %__n) #0 comdat align 2 {
entry:
%__a.addr = alloca %"class.std::allocator"*, align 8
%__n.addr = alloca i64, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
store i64 %__n, i64* %__n.addr, align 8
%0 = load %"class.std::allocator"*, %"class.std::allocator"** %__a.addr, align 8
%1 = bitcast %"class.std::allocator"* %0 to %"class.__gnu_cxx::new_allocator"*
%2 = load i64, i64* %__n.addr, align 8
%call = call %"struct.std::_Rb_tree_node"* @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE8allocateEmPKv(%"class.__gnu_cxx::new_allocator"* %1, i64 %2, i8* null)
ret %"struct.std::_Rb_tree_node"* %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE21_M_get_Node_allocatorEv(%"class.std::_Rb_tree"* %this) #4 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%0 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl to %"class.std::allocator"*
ret %"class.std::allocator"* %0
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node"* @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE8allocateEmPKv(%"class.__gnu_cxx::new_allocator"* %this, i64 %__n, i8* %0) #0 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
%__n.addr = alloca i64, align 8
%.addr = alloca i8*, align 8
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
store i64 %__n, i64* %__n.addr, align 8
store i8* %0, i8** %.addr, align 8
%this1 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
%1 = load i64, i64* %__n.addr, align 8
%call = call i64 @_ZNK9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE11_M_max_sizeEv(%"class.__gnu_cxx::new_allocator"* %this1) #12
%cmp = icmp ugt i64 %1, %call
br i1 %cmp, label %if.then, label %if.end4
if.then: ; preds = %entry
%2 = load i64, i64* %__n.addr, align 8
%cmp2 = icmp ugt i64 %2, 384307168202282325
br i1 %cmp2, label %if.then3, label %if.end
if.then3: ; preds = %if.then
call void @_ZSt28__throw_bad_array_new_lengthv() #14
unreachable
if.end: ; preds = %if.then
call void @_ZSt17__throw_bad_allocv() #14
unreachable
if.end4: ; preds = %entry
%3 = load i64, i64* %__n.addr, align 8
%mul = mul i64 %3, 48
%call5 = call noalias nonnull i8* @_Znwm(i64 %mul) #15
%4 = bitcast i8* %call5 to %"struct.std::_Rb_tree_node"*
ret %"struct.std::_Rb_tree_node"* %4
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i64 @_ZNK9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE11_M_max_sizeEv(%"class.__gnu_cxx::new_allocator"* %this) #4 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
%this1 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
ret i64 192153584101141162
}
; Function Attrs: noreturn
declare dso_local void @_ZSt28__throw_bad_array_new_lengthv() #7
; Function Attrs: noreturn
declare dso_local void @_ZSt17__throw_bad_allocv() #7
; Function Attrs: nobuiltin allocsize(0)
declare dso_local nonnull i8* @_Znwm(i64) #8
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE9constructIS4_JRKSt21piecewise_construct_tSt5tupleIJOiEESC_IJEEEEEvRS6_PT_DpOT0_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a, %"struct.std::pair"* %__p, %"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %__args, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %__args1, %"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %__args3) #0 comdat align 2 {
entry:
%__a.addr = alloca %"class.std::allocator"*, align 8
%__p.addr = alloca %"struct.std::pair"*, align 8
%__args.addr = alloca %"struct.std::piecewise_construct_t"*, align 8
%__args.addr2 = alloca %"class.std::tuple"*, align 8
%__args.addr4 = alloca %"class.std::tuple.0"*, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
store %"struct.std::pair"* %__p, %"struct.std::pair"** %__p.addr, align 8
store %"struct.std::piecewise_construct_t"* %__args, %"struct.std::piecewise_construct_t"** %__args.addr, align 8
store %"class.std::tuple"* %__args1, %"class.std::tuple"** %__args.addr2, align 8
store %"class.std::tuple.0"* %__args3, %"class.std::tuple.0"** %__args.addr4, align 8
%0 = load %"class.std::allocator"*, %"class.std::allocator"** %__a.addr, align 8
%1 = bitcast %"class.std::allocator"* %0 to %"class.__gnu_cxx::new_allocator"*
%2 = load %"struct.std::pair"*, %"struct.std::pair"** %__p.addr, align 8
%3 = load %"struct.std::piecewise_construct_t"*, %"struct.std::piecewise_construct_t"** %__args.addr, align 8
%call = call nonnull align 1 dereferenceable(1) %"struct.std::piecewise_construct_t"* @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(%"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %3) #12
%4 = load %"class.std::tuple"*, %"class.std::tuple"** %__args.addr2, align 8
%call5 = call nonnull align 8 dereferenceable(8) %"class.std::tuple"* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(%"class.std::tuple"* nonnull align 8 dereferenceable(8) %4) #12
%5 = load %"class.std::tuple.0"*, %"class.std::tuple.0"** %__args.addr4, align 8
%call6 = call nonnull align 1 dereferenceable(1) %"class.std::tuple.0"* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(%"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %5) #12
call void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE9constructIS5_JRKSt21piecewise_construct_tSt5tupleIJOiEESC_IJEEEEEvPT_DpOT0_(%"class.__gnu_cxx::new_allocator"* %1, %"struct.std::pair"* %2, %"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %call, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %call5, %"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %call6)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_put_nodeEPSt13_Rb_tree_nodeIS3_E(%"class.std::_Rb_tree"* %this, %"struct.std::_Rb_tree_node"* %__p) #4 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__p.addr = alloca %"struct.std::_Rb_tree_node"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store %"struct.std::_Rb_tree_node"* %__p, %"struct.std::_Rb_tree_node"** %__p.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%call = call nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE21_M_get_Node_allocatorEv(%"class.std::_Rb_tree"* %this1) #12
%0 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__p.addr, align 8
invoke void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE10deallocateERS6_PS5_m(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %call, %"struct.std::_Rb_tree_node"* %0, i64 1)
to label %invoke.cont unwind label %terminate.lpad
invoke.cont: ; preds = %entry
ret void
terminate.lpad: ; preds = %entry
%1 = landingpad { i8*, i32 }
catch i8* null
%2 = extractvalue { i8*, i32 } %1, 0
call void @__clang_call_terminate(i8* %2) #13
unreachable
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE9constructIS5_JRKSt21piecewise_construct_tSt5tupleIJOiEESC_IJEEEEEvPT_DpOT0_(%"class.__gnu_cxx::new_allocator"* %this, %"struct.std::pair"* %__p, %"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %__args, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %__args1, %"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %__args3) #0 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
%__p.addr = alloca %"struct.std::pair"*, align 8
%__args.addr = alloca %"struct.std::piecewise_construct_t"*, align 8
%__args.addr2 = alloca %"class.std::tuple"*, align 8
%__args.addr4 = alloca %"class.std::tuple.0"*, align 8
%agg.tmp = alloca %"struct.std::piecewise_construct_t", align 1
%agg.tmp6 = alloca %"class.std::tuple", align 8
%agg.tmp8 = alloca %"class.std::tuple.0", align 1
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
store %"struct.std::pair"* %__p, %"struct.std::pair"** %__p.addr, align 8
store %"struct.std::piecewise_construct_t"* %__args, %"struct.std::piecewise_construct_t"** %__args.addr, align 8
store %"class.std::tuple"* %__args1, %"class.std::tuple"** %__args.addr2, align 8
store %"class.std::tuple.0"* %__args3, %"class.std::tuple.0"** %__args.addr4, align 8
%this5 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
%0 = load %"struct.std::pair"*, %"struct.std::pair"** %__p.addr, align 8
%1 = bitcast %"struct.std::pair"* %0 to i8*
%2 = bitcast i8* %1 to %"struct.std::pair"*
%3 = load %"struct.std::piecewise_construct_t"*, %"struct.std::piecewise_construct_t"** %__args.addr, align 8
%call = call nonnull align 1 dereferenceable(1) %"struct.std::piecewise_construct_t"* @_ZSt7forwardIRKSt21piecewise_construct_tEOT_RNSt16remove_referenceIS3_E4typeE(%"struct.std::piecewise_construct_t"* nonnull align 1 dereferenceable(1) %3) #12
%4 = load %"class.std::tuple"*, %"class.std::tuple"** %__args.addr2, align 8
%call7 = call nonnull align 8 dereferenceable(8) %"class.std::tuple"* @_ZSt7forwardISt5tupleIJOiEEEOT_RNSt16remove_referenceIS3_E4typeE(%"class.std::tuple"* nonnull align 8 dereferenceable(8) %4) #12
call void @_ZNSt5tupleIJOiEEC2EOS1_(%"class.std::tuple"* %agg.tmp6, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %call7) #12
%5 = load %"class.std::tuple.0"*, %"class.std::tuple.0"** %__args.addr4, align 8
%call9 = call nonnull align 1 dereferenceable(1) %"class.std::tuple.0"* @_ZSt7forwardISt5tupleIJEEEOT_RNSt16remove_referenceIS2_E4typeE(%"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %5) #12
call void @_ZNSt4pairIKiPcEC2IJOiEJEEESt21piecewise_construct_tSt5tupleIJDpT_EES6_IJDpT0_EE(%"struct.std::pair"* %2, %"class.std::tuple"* %agg.tmp6)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt5tupleIJOiEEC2EOS1_(%"class.std::tuple"* %this, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %0) unnamed_addr #4 comdat align 2 {
entry:
%this.addr = alloca %"class.std::tuple"*, align 8
%.addr = alloca %"class.std::tuple"*, align 8
store %"class.std::tuple"* %this, %"class.std::tuple"** %this.addr, align 8
store %"class.std::tuple"* %0, %"class.std::tuple"** %.addr, align 8
%this1 = load %"class.std::tuple"*, %"class.std::tuple"** %this.addr, align 8
%1 = bitcast %"class.std::tuple"* %this1 to %"struct.std::_Tuple_impl"*
%2 = load %"class.std::tuple"*, %"class.std::tuple"** %.addr, align 8
%3 = bitcast %"class.std::tuple"* %2 to %"struct.std::_Tuple_impl"*
call void @_ZNSt11_Tuple_implILm0EJOiEEC2EOS1_(%"struct.std::_Tuple_impl"* %1, %"struct.std::_Tuple_impl"* nonnull align 8 dereferenceable(8) %3) #12
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt4pairIKiPcEC2IJOiEJEEESt21piecewise_construct_tSt5tupleIJDpT_EES6_IJDpT0_EE(%"struct.std::pair"* %this, %"class.std::tuple"* %__first) unnamed_addr #0 comdat align 2 {
entry:
%0 = alloca %"struct.std::piecewise_construct_t", align 1
%__second = alloca %"class.std::tuple.0", align 1
%this.addr = alloca %"struct.std::pair"*, align 8
%agg.tmp = alloca %"struct.std::_Index_tuple", align 1
%agg.tmp3 = alloca %"struct.std::_Index_tuple.4", align 1
store %"struct.std::pair"* %this, %"struct.std::pair"** %this.addr, align 8
%this2 = load %"struct.std::pair"*, %"struct.std::pair"** %this.addr, align 8
call void @_ZNSt4pairIKiPcEC2IJOiEJLm0EEJEJEEERSt5tupleIJDpT_EERS5_IJDpT1_EESt12_Index_tupleIJXspT0_EEESE_IJXspT2_EEE(%"struct.std::pair"* %this2, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %__first, %"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %__second)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt11_Tuple_implILm0EJOiEEC2EOS1_(%"struct.std::_Tuple_impl"* %this, %"struct.std::_Tuple_impl"* nonnull align 8 dereferenceable(8) %__in) unnamed_addr #4 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Tuple_impl"*, align 8
%__in.addr = alloca %"struct.std::_Tuple_impl"*, align 8
store %"struct.std::_Tuple_impl"* %this, %"struct.std::_Tuple_impl"** %this.addr, align 8
store %"struct.std::_Tuple_impl"* %__in, %"struct.std::_Tuple_impl"** %__in.addr, align 8
%this1 = load %"struct.std::_Tuple_impl"*, %"struct.std::_Tuple_impl"** %this.addr, align 8
%0 = bitcast %"struct.std::_Tuple_impl"* %this1 to %"struct.std::_Head_base"*
%1 = load %"struct.std::_Tuple_impl"*, %"struct.std::_Tuple_impl"** %__in.addr, align 8
%2 = bitcast %"struct.std::_Tuple_impl"* %1 to %"struct.std::_Head_base"*
%3 = bitcast %"struct.std::_Head_base"* %0 to i8*
%4 = bitcast %"struct.std::_Head_base"* %2 to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %3, i8* align 8 %4, i64 8, i1 false)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt4pairIKiPcEC2IJOiEJLm0EEJEJEEERSt5tupleIJDpT_EERS5_IJDpT1_EESt12_Index_tupleIJXspT0_EEESE_IJXspT2_EEE(%"struct.std::pair"* %this, %"class.std::tuple"* nonnull align 8 dereferenceable(8) %__tuple1, %"class.std::tuple.0"* nonnull align 1 dereferenceable(1) %__tuple2) unnamed_addr #4 comdat align 2 {
entry:
%0 = alloca %"struct.std::_Index_tuple", align 1
%1 = alloca %"struct.std::_Index_tuple.4", align 1
%this.addr = alloca %"struct.std::pair"*, align 8
%__tuple1.addr = alloca %"class.std::tuple"*, align 8
%__tuple2.addr = alloca %"class.std::tuple.0"*, align 8
store %"struct.std::pair"* %this, %"struct.std::pair"** %this.addr, align 8
store %"class.std::tuple"* %__tuple1, %"class.std::tuple"** %__tuple1.addr, align 8
store %"class.std::tuple.0"* %__tuple2, %"class.std::tuple.0"** %__tuple2.addr, align 8
%this2 = load %"struct.std::pair"*, %"struct.std::pair"** %this.addr, align 8
%2 = bitcast %"struct.std::pair"* %this2 to %"class.std::__pair_base"*
%first = getelementptr inbounds %"struct.std::pair", %"struct.std::pair"* %this2, i32 0, i32 0
%3 = load %"class.std::tuple"*, %"class.std::tuple"** %__tuple1.addr, align 8
%call = call nonnull align 4 dereferenceable(4) i32* @_ZSt3getILm0EJOiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS5_(%"class.std::tuple"* nonnull align 8 dereferenceable(8) %3) #12
%call3 = call nonnull align 4 dereferenceable(4) i32* @_ZSt7forwardIOiEOT_RNSt16remove_referenceIS1_E4typeE(i32* nonnull align 4 dereferenceable(4) %call) #12
%4 = load i32, i32* %call3, align 4
store i32 %4, i32* %first, align 8
%second = getelementptr inbounds %"struct.std::pair", %"struct.std::pair"* %this2, i32 0, i32 1
store i8* null, i8** %second, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 4 dereferenceable(4) i32* @_ZSt7forwardIOiEOT_RNSt16remove_referenceIS1_E4typeE(i32* nonnull align 4 dereferenceable(4) %__t) #4 comdat {
entry:
%__t.addr = alloca i32*, align 8
store i32* %__t, i32** %__t.addr, align 8
%0 = load i32*, i32** %__t.addr, align 8
ret i32* %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 4 dereferenceable(4) i32* @_ZSt3getILm0EJOiEERNSt13tuple_elementIXT_ESt5tupleIJDpT0_EEE4typeERS5_(%"class.std::tuple"* nonnull align 8 dereferenceable(8) %__t) #4 comdat {
entry:
%__t.addr = alloca %"class.std::tuple"*, align 8
store %"class.std::tuple"* %__t, %"class.std::tuple"** %__t.addr, align 8
%0 = load %"class.std::tuple"*, %"class.std::tuple"** %__t.addr, align 8
%1 = bitcast %"class.std::tuple"* %0 to %"struct.std::_Tuple_impl"*
%call = call nonnull align 4 dereferenceable(4) i32* @_ZSt12__get_helperILm0EOiJEERT0_RSt11_Tuple_implIXT_EJS1_DpT1_EE(%"struct.std::_Tuple_impl"* nonnull align 8 dereferenceable(8) %1) #12
ret i32* %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 4 dereferenceable(4) i32* @_ZSt12__get_helperILm0EOiJEERT0_RSt11_Tuple_implIXT_EJS1_DpT1_EE(%"struct.std::_Tuple_impl"* nonnull align 8 dereferenceable(8) %__t) #4 comdat {
entry:
%__t.addr = alloca %"struct.std::_Tuple_impl"*, align 8
store %"struct.std::_Tuple_impl"* %__t, %"struct.std::_Tuple_impl"** %__t.addr, align 8
%0 = load %"struct.std::_Tuple_impl"*, %"struct.std::_Tuple_impl"** %__t.addr, align 8
%call = call nonnull align 4 dereferenceable(4) i32* @_ZNSt11_Tuple_implILm0EJOiEE7_M_headERS1_(%"struct.std::_Tuple_impl"* nonnull align 8 dereferenceable(8) %0) #12
ret i32* %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 4 dereferenceable(4) i32* @_ZNSt11_Tuple_implILm0EJOiEE7_M_headERS1_(%"struct.std::_Tuple_impl"* nonnull align 8 dereferenceable(8) %__t) #4 comdat align 2 {
entry:
%__t.addr = alloca %"struct.std::_Tuple_impl"*, align 8
store %"struct.std::_Tuple_impl"* %__t, %"struct.std::_Tuple_impl"** %__t.addr, align 8
%0 = load %"struct.std::_Tuple_impl"*, %"struct.std::_Tuple_impl"** %__t.addr, align 8
%1 = bitcast %"struct.std::_Tuple_impl"* %0 to %"struct.std::_Head_base"*
%call = call nonnull align 4 dereferenceable(4) i32* @_ZNSt10_Head_baseILm0EOiLb0EE7_M_headERS1_(%"struct.std::_Head_base"* nonnull align 8 dereferenceable(8) %1) #12
ret i32* %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 4 dereferenceable(4) i32* @_ZNSt10_Head_baseILm0EOiLb0EE7_M_headERS1_(%"struct.std::_Head_base"* nonnull align 8 dereferenceable(8) %__b) #4 comdat align 2 {
entry:
%__b.addr = alloca %"struct.std::_Head_base"*, align 8
store %"struct.std::_Head_base"* %__b, %"struct.std::_Head_base"** %__b.addr, align 8
%0 = load %"struct.std::_Head_base"*, %"struct.std::_Head_base"** %__b.addr, align 8
%_M_head_impl = getelementptr inbounds %"struct.std::_Head_base", %"struct.std::_Head_base"* %0, i32 0, i32 0
%1 = load i32*, i32** %_M_head_impl, align 8
ret i32* %1
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE10deallocateERS6_PS5_m(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a, %"struct.std::_Rb_tree_node"* %__p, i64 %__n) #0 comdat align 2 {
entry:
%__a.addr = alloca %"class.std::allocator"*, align 8
%__p.addr = alloca %"struct.std::_Rb_tree_node"*, align 8
%__n.addr = alloca i64, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
store %"struct.std::_Rb_tree_node"* %__p, %"struct.std::_Rb_tree_node"** %__p.addr, align 8
store i64 %__n, i64* %__n.addr, align 8
%0 = load %"class.std::allocator"*, %"class.std::allocator"** %__a.addr, align 8
%1 = bitcast %"class.std::allocator"* %0 to %"class.__gnu_cxx::new_allocator"*
%2 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__p.addr, align 8
%3 = load i64, i64* %__n.addr, align 8
call void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE10deallocateEPS6_m(%"class.__gnu_cxx::new_allocator"* %1, %"struct.std::_Rb_tree_node"* %2, i64 %3)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE10deallocateEPS6_m(%"class.__gnu_cxx::new_allocator"* %this, %"struct.std::_Rb_tree_node"* %__p, i64 %__t) #4 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
%__p.addr = alloca %"struct.std::_Rb_tree_node"*, align 8
%__t.addr = alloca i64, align 8
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
store %"struct.std::_Rb_tree_node"* %__p, %"struct.std::_Rb_tree_node"** %__p.addr, align 8
store i64 %__t, i64* %__t.addr, align 8
%this1 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
%0 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__p.addr, align 8
%1 = bitcast %"struct.std::_Rb_tree_node"* %0 to i8*
call void @_ZdlPv(i8* %1) #12
ret void
}
; Function Attrs: nobuiltin nounwind
declare dso_local void @_ZdlPv(i8*) #9
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node_base"* @_ZNKSt23_Rb_tree_const_iteratorISt4pairIKiPcEE13_M_const_castEv(%"struct.std::_Rb_tree_const_iterator"* %this) #4 comdat align 2 {
entry:
%retval = alloca %"struct.std::_Rb_tree_iterator", align 8
%this.addr = alloca %"struct.std::_Rb_tree_const_iterator"*, align 8
store %"struct.std::_Rb_tree_const_iterator"* %this, %"struct.std::_Rb_tree_const_iterator"** %this.addr, align 8
%this1 = load %"struct.std::_Rb_tree_const_iterator"*, %"struct.std::_Rb_tree_const_iterator"** %this.addr, align 8
%_M_node = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", %"struct.std::_Rb_tree_const_iterator"* %this1, i32 0, i32 0
%0 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node, align 8
call void @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC2EPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_iterator"* %retval, %"struct.std::_Rb_tree_node_base"* %0) #12
%coerce.dive = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
%1 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %coerce.dive, align 8
ret %"struct.std::_Rb_tree_node_base"* %1
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i64 @_ZNKSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE4sizeEv(%"class.std::_Rb_tree"* %this) #4 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%0 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl to i8*
%add.ptr = getelementptr inbounds i8, i8* %0, i64 8
%1 = bitcast i8* %add.ptr to %"struct.std::_Rb_tree_header"*
%_M_node_count = getelementptr inbounds %"struct.std::_Rb_tree_header", %"struct.std::_Rb_tree_header"* %1, i32 0, i32 1
%2 = load i64, i64* %_M_node_count, align 8
ret i64 %2
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %__x) #0 comdat align 2 {
entry:
%__x.addr = alloca %"struct.std::_Rb_tree_node_base"*, align 8
store %"struct.std::_Rb_tree_node_base"* %__x, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
%0 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__x.addr, align 8
%1 = bitcast %"struct.std::_Rb_tree_node_base"* %0 to %"struct.std::_Rb_tree_node"*
%call = call nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt13_Rb_tree_nodeIS3_E(%"struct.std::_Rb_tree_node"* %1)
ret i32* %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE12_M_rightmostEv(%"class.std::_Rb_tree"* %this) #4 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%0 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl to i8*
%add.ptr = getelementptr inbounds i8, i8* %0, i64 8
%1 = bitcast i8* %add.ptr to %"struct.std::_Rb_tree_header"*
%_M_header = getelementptr inbounds %"struct.std::_Rb_tree_header", %"struct.std::_Rb_tree_header"* %1, i32 0, i32 0
%_M_right = getelementptr inbounds %"struct.std::_Rb_tree_node_base", %"struct.std::_Rb_tree_node_base"* %_M_header, i32 0, i32 3
ret %"struct.std::_Rb_tree_node_base"** %_M_right
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_Lb1EEERKS1_OT_(%"struct.std::pair.1"* %this, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %__x, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %__y) unnamed_addr #4 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::pair.1"*, align 8
%__x.addr = alloca %"struct.std::_Rb_tree_node_base"**, align 8
%__y.addr = alloca %"struct.std::_Rb_tree_node_base"**, align 8
store %"struct.std::pair.1"* %this, %"struct.std::pair.1"** %this.addr, align 8
store %"struct.std::_Rb_tree_node_base"** %__x, %"struct.std::_Rb_tree_node_base"*** %__x.addr, align 8
store %"struct.std::_Rb_tree_node_base"** %__y, %"struct.std::_Rb_tree_node_base"*** %__y.addr, align 8
%this1 = load %"struct.std::pair.1"*, %"struct.std::pair.1"** %this.addr, align 8
%0 = bitcast %"struct.std::pair.1"* %this1 to %"class.std::__pair_base.2"*
%first = getelementptr inbounds %"struct.std::pair.1", %"struct.std::pair.1"* %this1, i32 0, i32 0
%1 = load %"struct.std::_Rb_tree_node_base"**, %"struct.std::_Rb_tree_node_base"*** %__x.addr, align 8
%2 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %1, align 8
store %"struct.std::_Rb_tree_node_base"* %2, %"struct.std::_Rb_tree_node_base"** %first, align 8
%second = getelementptr inbounds %"struct.std::pair.1", %"struct.std::pair.1"* %this1, i32 0, i32 1
%3 = load %"struct.std::_Rb_tree_node_base"**, %"struct.std::_Rb_tree_node_base"*** %__y.addr, align 8
%call = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(%"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %3) #12
%4 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %call, align 8
store %"struct.std::_Rb_tree_node_base"* %4, %"struct.std::_Rb_tree_node_base"** %second, align 8
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE24_M_get_insert_unique_posERS1_(%"class.std::_Rb_tree"* %this, i32* nonnull align 4 dereferenceable(4) %__k) #0 comdat align 2 {
entry:
%retval = alloca %"struct.std::pair.1", align 8
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__k.addr = alloca i32*, align 8
%__x = alloca %"struct.std::_Rb_tree_node"*, align 8
%__y = alloca %"struct.std::_Rb_tree_node_base"*, align 8
%__comp = alloca i8, align 1
%__j = alloca %"struct.std::_Rb_tree_iterator", align 8
%ref.tmp = alloca %"struct.std::_Rb_tree_iterator", align 8
%ref.tmp20 = alloca %"struct.std::_Rb_tree_node_base"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store i32* %__k, i32** %__k.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%call = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_M_beginEv(%"class.std::_Rb_tree"* %this1) #12
store %"struct.std::_Rb_tree_node"* %call, %"struct.std::_Rb_tree_node"** %__x, align 8
%call2 = call %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_M_endEv(%"class.std::_Rb_tree"* %this1) #12
store %"struct.std::_Rb_tree_node_base"* %call2, %"struct.std::_Rb_tree_node_base"** %__y, align 8
store i8 1, i8* %__comp, align 1
br label %while.cond
while.cond: ; preds = %cond.end, %entry
%0 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x, align 8
%cmp = icmp ne %"struct.std::_Rb_tree_node"* %0, null
br i1 %cmp, label %while.body, label %while.end
while.body: ; preds = %while.cond
%1 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x, align 8
%2 = bitcast %"struct.std::_Rb_tree_node"* %1 to %"struct.std::_Rb_tree_node_base"*
store %"struct.std::_Rb_tree_node_base"* %2, %"struct.std::_Rb_tree_node_base"** %__y, align 8
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%3 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl to %"struct.std::_Rb_tree_key_compare"*
%_M_key_compare = getelementptr inbounds %"struct.std::_Rb_tree_key_compare", %"struct.std::_Rb_tree_key_compare"* %3, i32 0, i32 0
%4 = load i32*, i32** %__k.addr, align 8
%5 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x, align 8
%call3 = call nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt13_Rb_tree_nodeIS3_E(%"struct.std::_Rb_tree_node"* %5)
%call4 = call zeroext i1 @_ZNKSt4lessIiEclERKiS2_(%"struct.std::less"* %_M_key_compare, i32* nonnull align 4 dereferenceable(4) %4, i32* nonnull align 4 dereferenceable(4) %call3)
%frombool = zext i1 %call4 to i8
store i8 %frombool, i8* %__comp, align 1
%6 = load i8, i8* %__comp, align 1
%tobool = trunc i8 %6 to i1
br i1 %tobool, label %cond.true, label %cond.false
cond.true: ; preds = %while.body
%7 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x, align 8
%8 = bitcast %"struct.std::_Rb_tree_node"* %7 to %"struct.std::_Rb_tree_node_base"*
%call5 = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE7_S_leftEPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %8) #12
br label %cond.end
cond.false: ; preds = %while.body
%9 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__x, align 8
%10 = bitcast %"struct.std::_Rb_tree_node"* %9 to %"struct.std::_Rb_tree_node_base"*
%call6 = call %"struct.std::_Rb_tree_node"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE8_S_rightEPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %10) #12
br label %cond.end
cond.end: ; preds = %cond.false, %cond.true
%cond = phi %"struct.std::_Rb_tree_node"* [ %call5, %cond.true ], [ %call6, %cond.false ]
store %"struct.std::_Rb_tree_node"* %cond, %"struct.std::_Rb_tree_node"** %__x, align 8
br label %while.cond
while.end: ; preds = %while.cond
%11 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %__y, align 8
call void @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC2EPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_iterator"* %__j, %"struct.std::_Rb_tree_node_base"* %11) #12
%12 = load i8, i8* %__comp, align 1
%tobool7 = trunc i8 %12 to i1
br i1 %tobool7, label %if.then, label %if.end12
if.then: ; preds = %while.end
%call8 = call %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE5beginEv(%"class.std::_Rb_tree"* %this1) #12
%coerce.dive = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %ref.tmp, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %call8, %"struct.std::_Rb_tree_node_base"** %coerce.dive, align 8
%call9 = call zeroext i1 @_ZSteqRKSt17_Rb_tree_iteratorISt4pairIKiPcEES6_(%"struct.std::_Rb_tree_iterator"* nonnull align 8 dereferenceable(8) %__j, %"struct.std::_Rb_tree_iterator"* nonnull align 8 dereferenceable(8) %ref.tmp) #12
br i1 %call9, label %if.then10, label %if.else
if.then10: ; preds = %if.then
call void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRPSt13_Rb_tree_nodeIS_IKiPcEERS1_Lb1EEEOT_OT0_(%"struct.std::pair.1"* %retval, %"struct.std::_Rb_tree_node"** nonnull align 8 dereferenceable(8) %__x, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %__y)
br label %return
if.else: ; preds = %if.then
%call11 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_iterator"* @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEmmEv(%"struct.std::_Rb_tree_iterator"* %__j) #12
br label %if.end
if.end: ; preds = %if.else
br label %if.end12
if.end12: ; preds = %if.end, %while.end
%_M_impl13 = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%13 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl13 to %"struct.std::_Rb_tree_key_compare"*
%_M_key_compare14 = getelementptr inbounds %"struct.std::_Rb_tree_key_compare", %"struct.std::_Rb_tree_key_compare"* %13, i32 0, i32 0
%_M_node = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__j, i32 0, i32 0
%14 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node, align 8
%call15 = call nonnull align 4 dereferenceable(4) i32* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE6_S_keyEPKSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %14)
%15 = load i32*, i32** %__k.addr, align 8
%call16 = call zeroext i1 @_ZNKSt4lessIiEclERKiS2_(%"struct.std::less"* %_M_key_compare14, i32* nonnull align 4 dereferenceable(4) %call15, i32* nonnull align 4 dereferenceable(4) %15)
br i1 %call16, label %if.then17, label %if.end18
if.then17: ; preds = %if.end12
call void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRPSt13_Rb_tree_nodeIS_IKiPcEERS1_Lb1EEEOT_OT0_(%"struct.std::pair.1"* %retval, %"struct.std::_Rb_tree_node"** nonnull align 8 dereferenceable(8) %__x, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %__y)
br label %return
if.end18: ; preds = %if.end12
%_M_node19 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %__j, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* null, %"struct.std::_Rb_tree_node_base"** %ref.tmp20, align 8
call void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_Lb1EEEOT_RKS1_(%"struct.std::pair.1"* %retval, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %_M_node19, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %ref.tmp20)
br label %return
return: ; preds = %if.end18, %if.then17, %if.then10
%16 = bitcast %"struct.std::pair.1"* %retval to { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }*
%17 = load { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }, { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }* %16, align 8
ret { %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* } %17
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE11_M_leftmostEv(%"class.std::_Rb_tree"* %this) #4 comdat align 2 {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%0 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl to i8*
%add.ptr = getelementptr inbounds i8, i8* %0, i64 8
%1 = bitcast i8* %add.ptr to %"struct.std::_Rb_tree_header"*
%_M_header = getelementptr inbounds %"struct.std::_Rb_tree_header", %"struct.std::_Rb_tree_header"* %1, i32 0, i32 0
%_M_left = getelementptr inbounds %"struct.std::_Rb_tree_node_base", %"struct.std::_Rb_tree_node_base"* %_M_header, i32 0, i32 2
ret %"struct.std::_Rb_tree_node_base"** %_M_left
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_S4_Lb1EEEOT_OT0_(%"struct.std::pair.1"* %this, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %__x, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %__y) unnamed_addr #4 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::pair.1"*, align 8
%__x.addr = alloca %"struct.std::_Rb_tree_node_base"**, align 8
%__y.addr = alloca %"struct.std::_Rb_tree_node_base"**, align 8
store %"struct.std::pair.1"* %this, %"struct.std::pair.1"** %this.addr, align 8
store %"struct.std::_Rb_tree_node_base"** %__x, %"struct.std::_Rb_tree_node_base"*** %__x.addr, align 8
store %"struct.std::_Rb_tree_node_base"** %__y, %"struct.std::_Rb_tree_node_base"*** %__y.addr, align 8
%this1 = load %"struct.std::pair.1"*, %"struct.std::pair.1"** %this.addr, align 8
%0 = bitcast %"struct.std::pair.1"* %this1 to %"class.std::__pair_base.2"*
%first = getelementptr inbounds %"struct.std::pair.1", %"struct.std::pair.1"* %this1, i32 0, i32 0
%1 = load %"struct.std::_Rb_tree_node_base"**, %"struct.std::_Rb_tree_node_base"*** %__x.addr, align 8
%call = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(%"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %1) #12
%2 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %call, align 8
store %"struct.std::_Rb_tree_node_base"* %2, %"struct.std::_Rb_tree_node_base"** %first, align 8
%second = getelementptr inbounds %"struct.std::pair.1", %"struct.std::pair.1"* %this1, i32 0, i32 1
%3 = load %"struct.std::_Rb_tree_node_base"**, %"struct.std::_Rb_tree_node_base"*** %__y.addr, align 8
%call2 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(%"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %3) #12
%4 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %call2, align 8
store %"struct.std::_Rb_tree_node_base"* %4, %"struct.std::_Rb_tree_node_base"** %second, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_iterator"* @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEmmEv(%"struct.std::_Rb_tree_iterator"* %this) #4 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Rb_tree_iterator"*, align 8
store %"struct.std::_Rb_tree_iterator"* %this, %"struct.std::_Rb_tree_iterator"** %this.addr, align 8
%this1 = load %"struct.std::_Rb_tree_iterator"*, %"struct.std::_Rb_tree_iterator"** %this.addr, align 8
%_M_node = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %this1, i32 0, i32 0
%0 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node, align 8
%call = call %"struct.std::_Rb_tree_node_base"* @_ZSt18_Rb_tree_decrementPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %0) #16
%_M_node2 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %this1, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %call, %"struct.std::_Rb_tree_node_base"** %_M_node2, align 8
ret %"struct.std::_Rb_tree_iterator"* %this1
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_iterator"* @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEppEv(%"struct.std::_Rb_tree_iterator"* %this) #4 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Rb_tree_iterator"*, align 8
store %"struct.std::_Rb_tree_iterator"* %this, %"struct.std::_Rb_tree_iterator"** %this.addr, align 8
%this1 = load %"struct.std::_Rb_tree_iterator"*, %"struct.std::_Rb_tree_iterator"** %this.addr, align 8
%_M_node = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %this1, i32 0, i32 0
%0 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_node, align 8
%call = call %"struct.std::_Rb_tree_node_base"* @_ZSt18_Rb_tree_incrementPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"* %0) #16
%_M_node2 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %this1, i32 0, i32 0
store %"struct.std::_Rb_tree_node_base"* %call, %"struct.std::_Rb_tree_node_base"** %_M_node2, align 8
ret %"struct.std::_Rb_tree_iterator"* %this1
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRS1_Lb1EEEOT_RKS1_(%"struct.std::pair.1"* %this, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %__x, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %__y) unnamed_addr #4 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::pair.1"*, align 8
%__x.addr = alloca %"struct.std::_Rb_tree_node_base"**, align 8
%__y.addr = alloca %"struct.std::_Rb_tree_node_base"**, align 8
store %"struct.std::pair.1"* %this, %"struct.std::pair.1"** %this.addr, align 8
store %"struct.std::_Rb_tree_node_base"** %__x, %"struct.std::_Rb_tree_node_base"*** %__x.addr, align 8
store %"struct.std::_Rb_tree_node_base"** %__y, %"struct.std::_Rb_tree_node_base"*** %__y.addr, align 8
%this1 = load %"struct.std::pair.1"*, %"struct.std::pair.1"** %this.addr, align 8
%0 = bitcast %"struct.std::pair.1"* %this1 to %"class.std::__pair_base.2"*
%first = getelementptr inbounds %"struct.std::pair.1", %"struct.std::pair.1"* %this1, i32 0, i32 0
%1 = load %"struct.std::_Rb_tree_node_base"**, %"struct.std::_Rb_tree_node_base"*** %__x.addr, align 8
%call = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(%"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %1) #12
%2 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %call, align 8
store %"struct.std::_Rb_tree_node_base"* %2, %"struct.std::_Rb_tree_node_base"** %first, align 8
%second = getelementptr inbounds %"struct.std::pair.1", %"struct.std::pair.1"* %this1, i32 0, i32 1
%3 = load %"struct.std::_Rb_tree_node_base"**, %"struct.std::_Rb_tree_node_base"*** %__y.addr, align 8
%4 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %3, align 8
store %"struct.std::_Rb_tree_node_base"* %4, %"struct.std::_Rb_tree_node_base"** %second, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(%"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %__t) #4 comdat {
entry:
%__t.addr = alloca %"struct.std::_Rb_tree_node_base"**, align 8
store %"struct.std::_Rb_tree_node_base"** %__t, %"struct.std::_Rb_tree_node_base"*** %__t.addr, align 8
%0 = load %"struct.std::_Rb_tree_node_base"**, %"struct.std::_Rb_tree_node_base"*** %__t.addr, align 8
ret %"struct.std::_Rb_tree_node_base"** %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::_Rb_tree_node_base"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE5beginEv(%"class.std::_Rb_tree"* %this) #4 comdat align 2 {
entry:
%retval = alloca %"struct.std::_Rb_tree_iterator", align 8
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::_Rb_tree", %"class.std::_Rb_tree"* %this1, i32 0, i32 0
%0 = bitcast %"struct.std::_Rb_tree<int, std::pair<const int, char *>, std::_Select1st<std::pair<const int, char *>>, std::less<int>, std::allocator<std::pair<const int, char *>>>::_Rb_tree_impl"* %_M_impl to i8*
%add.ptr = getelementptr inbounds i8, i8* %0, i64 8
%1 = bitcast i8* %add.ptr to %"struct.std::_Rb_tree_header"*
%_M_header = getelementptr inbounds %"struct.std::_Rb_tree_header", %"struct.std::_Rb_tree_header"* %1, i32 0, i32 0
%_M_left = getelementptr inbounds %"struct.std::_Rb_tree_node_base", %"struct.std::_Rb_tree_node_base"* %_M_header, i32 0, i32 2
%2 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %_M_left, align 8
call void @_ZNSt17_Rb_tree_iteratorISt4pairIKiPcEEC2EPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_iterator"* %retval, %"struct.std::_Rb_tree_node_base"* %2) #12
%coerce.dive = getelementptr inbounds %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator"* %retval, i32 0, i32 0
%3 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %coerce.dive, align 8
ret %"struct.std::_Rb_tree_node_base"* %3
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt4pairIPSt18_Rb_tree_node_baseS1_EC2IRPSt13_Rb_tree_nodeIS_IKiPcEERS1_Lb1EEEOT_OT0_(%"struct.std::pair.1"* %this, %"struct.std::_Rb_tree_node"** nonnull align 8 dereferenceable(8) %__x, %"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %__y) unnamed_addr #4 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::pair.1"*, align 8
%__x.addr = alloca %"struct.std::_Rb_tree_node"**, align 8
%__y.addr = alloca %"struct.std::_Rb_tree_node_base"**, align 8
store %"struct.std::pair.1"* %this, %"struct.std::pair.1"** %this.addr, align 8
store %"struct.std::_Rb_tree_node"** %__x, %"struct.std::_Rb_tree_node"*** %__x.addr, align 8
store %"struct.std::_Rb_tree_node_base"** %__y, %"struct.std::_Rb_tree_node_base"*** %__y.addr, align 8
%this1 = load %"struct.std::pair.1"*, %"struct.std::pair.1"** %this.addr, align 8
%0 = bitcast %"struct.std::pair.1"* %this1 to %"class.std::__pair_base.2"*
%first = getelementptr inbounds %"struct.std::pair.1", %"struct.std::pair.1"* %this1, i32 0, i32 0
%1 = load %"struct.std::_Rb_tree_node"**, %"struct.std::_Rb_tree_node"*** %__x.addr, align 8
%call = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node"** @_ZSt7forwardIRPSt13_Rb_tree_nodeISt4pairIKiPcEEEOT_RNSt16remove_referenceIS8_E4typeE(%"struct.std::_Rb_tree_node"** nonnull align 8 dereferenceable(8) %1) #12
%2 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %call, align 8
%3 = bitcast %"struct.std::_Rb_tree_node"* %2 to %"struct.std::_Rb_tree_node_base"*
store %"struct.std::_Rb_tree_node_base"* %3, %"struct.std::_Rb_tree_node_base"** %first, align 8
%second = getelementptr inbounds %"struct.std::pair.1", %"struct.std::pair.1"* %this1, i32 0, i32 1
%4 = load %"struct.std::_Rb_tree_node_base"**, %"struct.std::_Rb_tree_node_base"*** %__y.addr, align 8
%call2 = call nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node_base"** @_ZSt7forwardIRPSt18_Rb_tree_node_baseEOT_RNSt16remove_referenceIS3_E4typeE(%"struct.std::_Rb_tree_node_base"** nonnull align 8 dereferenceable(8) %4) #12
%5 = load %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"** %call2, align 8
store %"struct.std::_Rb_tree_node_base"* %5, %"struct.std::_Rb_tree_node_base"** %second, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) %"struct.std::_Rb_tree_node"** @_ZSt7forwardIRPSt13_Rb_tree_nodeISt4pairIKiPcEEEOT_RNSt16remove_referenceIS8_E4typeE(%"struct.std::_Rb_tree_node"** nonnull align 8 dereferenceable(8) %__t) #4 comdat {
entry:
%__t.addr = alloca %"struct.std::_Rb_tree_node"**, align 8
store %"struct.std::_Rb_tree_node"** %__t, %"struct.std::_Rb_tree_node"*** %__t.addr, align 8
%0 = load %"struct.std::_Rb_tree_node"**, %"struct.std::_Rb_tree_node"*** %__t.addr, align 8
ret %"struct.std::_Rb_tree_node"** %0
}
; Function Attrs: nounwind readonly
declare dso_local %"struct.std::_Rb_tree_node_base"* @_ZSt18_Rb_tree_decrementPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"*) #10
; Function Attrs: nounwind readonly
declare dso_local %"struct.std::_Rb_tree_node_base"* @_ZSt18_Rb_tree_incrementPSt18_Rb_tree_node_base(%"struct.std::_Rb_tree_node_base"*) #10
; Function Attrs: nounwind
declare dso_local void @_ZSt29_Rb_tree_insert_and_rebalancebPSt18_Rb_tree_node_baseS0_RS_(i1 zeroext, %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* nonnull align 8 dereferenceable(32)) #11
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE15_M_destroy_nodeEPSt13_Rb_tree_nodeIS3_E(%"class.std::_Rb_tree"* %this, %"struct.std::_Rb_tree_node"* %__p) #4 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%this.addr = alloca %"class.std::_Rb_tree"*, align 8
%__p.addr = alloca %"struct.std::_Rb_tree_node"*, align 8
store %"class.std::_Rb_tree"* %this, %"class.std::_Rb_tree"** %this.addr, align 8
store %"struct.std::_Rb_tree_node"* %__p, %"struct.std::_Rb_tree_node"** %__p.addr, align 8
%this1 = load %"class.std::_Rb_tree"*, %"class.std::_Rb_tree"** %this.addr, align 8
%call = call nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZNSt8_Rb_treeIiSt4pairIKiPcESt10_Select1stIS3_ESt4lessIiESaIS3_EE21_M_get_Node_allocatorEv(%"class.std::_Rb_tree"* %this1) #12
%0 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__p.addr, align 8
%call2 = invoke %"struct.std::pair"* @_ZNSt13_Rb_tree_nodeISt4pairIKiPcEE9_M_valptrEv(%"struct.std::_Rb_tree_node"* %0)
to label %invoke.cont unwind label %terminate.lpad
invoke.cont: ; preds = %entry
call void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE7destroyIS4_EEvRS6_PT_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %call, %"struct.std::pair"* %call2) #12
%1 = load %"struct.std::_Rb_tree_node"*, %"struct.std::_Rb_tree_node"** %__p.addr, align 8
ret void
terminate.lpad: ; preds = %entry
%2 = landingpad { i8*, i32 }
catch i8* null
%3 = extractvalue { i8*, i32 } %2, 0
call void @__clang_call_terminate(i8* %3) #13
unreachable
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt16allocator_traitsISaISt13_Rb_tree_nodeISt4pairIKiPcEEEE7destroyIS4_EEvRS6_PT_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a, %"struct.std::pair"* %__p) #4 comdat align 2 {
entry:
%__a.addr = alloca %"class.std::allocator"*, align 8
%__p.addr = alloca %"struct.std::pair"*, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
store %"struct.std::pair"* %__p, %"struct.std::pair"** %__p.addr, align 8
%0 = load %"class.std::allocator"*, %"class.std::allocator"** %__a.addr, align 8
%1 = bitcast %"class.std::allocator"* %0 to %"class.__gnu_cxx::new_allocator"*
%2 = load %"struct.std::pair"*, %"struct.std::pair"** %__p.addr, align 8
call void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE7destroyIS5_EEvPT_(%"class.__gnu_cxx::new_allocator"* %1, %"struct.std::pair"* %2) #12
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx13new_allocatorISt13_Rb_tree_nodeISt4pairIKiPcEEE7destroyIS5_EEvPT_(%"class.__gnu_cxx::new_allocator"* %this, %"struct.std::pair"* %__p) #4 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
%__p.addr = alloca %"struct.std::pair"*, align 8
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
store %"struct.std::pair"* %__p, %"struct.std::pair"** %__p.addr, align 8
%this1 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
%0 = load %"struct.std::pair"*, %"struct.std::pair"** %__p.addr, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 4 dereferenceable(4) i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i32* nonnull align 4 dereferenceable(4) %__t) #4 comdat {
entry:
%__t.addr = alloca i32*, align 8
store i32* %__t, i32** %__t.addr, align 8
%0 = load i32*, i32** %__t.addr, align 8
ret i32* %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt5tupleIJOiEEC2IJiELb1ELb1EEEDpOT_(%"class.std::tuple"* %this, i32* nonnull align 4 dereferenceable(4) %__elements) unnamed_addr #4 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%this.addr = alloca %"class.std::tuple"*, align 8
%__elements.addr = alloca i32*, align 8
store %"class.std::tuple"* %this, %"class.std::tuple"** %this.addr, align 8
store i32* %__elements, i32** %__elements.addr, align 8
%this1 = load %"class.std::tuple"*, %"class.std::tuple"** %this.addr, align 8
%0 = bitcast %"class.std::tuple"* %this1 to %"struct.std::_Tuple_impl"*
%1 = load i32*, i32** %__elements.addr, align 8
%call = call nonnull align 4 dereferenceable(4) i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i32* nonnull align 4 dereferenceable(4) %1) #12
invoke void @_ZNSt11_Tuple_implILm0EJOiEEC2IiEEOT_(%"struct.std::_Tuple_impl"* %0, i32* nonnull align 4 dereferenceable(4) %call)
to label %invoke.cont unwind label %terminate.lpad
invoke.cont: ; preds = %entry
ret void
terminate.lpad: ; preds = %entry
%2 = landingpad { i8*, i32 }
catch i8* null
%3 = extractvalue { i8*, i32 } %2, 0
call void @__clang_call_terminate(i8* %3) #13
unreachable
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt11_Tuple_implILm0EJOiEEC2IiEEOT_(%"struct.std::_Tuple_impl"* %this, i32* nonnull align 4 dereferenceable(4) %__head) unnamed_addr #0 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Tuple_impl"*, align 8
%__head.addr = alloca i32*, align 8
store %"struct.std::_Tuple_impl"* %this, %"struct.std::_Tuple_impl"** %this.addr, align 8
store i32* %__head, i32** %__head.addr, align 8
%this1 = load %"struct.std::_Tuple_impl"*, %"struct.std::_Tuple_impl"** %this.addr, align 8
%0 = bitcast %"struct.std::_Tuple_impl"* %this1 to %"struct.std::_Head_base"*
%1 = load i32*, i32** %__head.addr, align 8
%call = call nonnull align 4 dereferenceable(4) i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i32* nonnull align 4 dereferenceable(4) %1) #12
call void @_ZNSt10_Head_baseILm0EOiLb0EEC2IiEEOT_(%"struct.std::_Head_base"* %0, i32* nonnull align 4 dereferenceable(4) %call)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt10_Head_baseILm0EOiLb0EEC2IiEEOT_(%"struct.std::_Head_base"* %this, i32* nonnull align 4 dereferenceable(4) %__h) unnamed_addr #4 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_Head_base"*, align 8
%__h.addr = alloca i32*, align 8
store %"struct.std::_Head_base"* %this, %"struct.std::_Head_base"** %this.addr, align 8
store i32* %__h, i32** %__h.addr, align 8
%this1 = load %"struct.std::_Head_base"*, %"struct.std::_Head_base"** %this.addr, align 8
%_M_head_impl = getelementptr inbounds %"struct.std::_Head_base", %"struct.std::_Head_base"* %this1, i32 0, i32 0
%0 = load i32*, i32** %__h.addr, align 8
%call = call nonnull align 4 dereferenceable(4) i32* @_ZSt7forwardIiEOT_RNSt16remove_referenceIS0_E4typeE(i32* nonnull align 4 dereferenceable(4) %0) #12
store i32* %call, i32** %_M_head_impl, align 8
ret void
}
attributes #0 = { noinline 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" }
attributes #1 = { argmemonly nounwind willreturn writeonly }
attributes #2 = { argmemonly nounwind willreturn }
attributes #3 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #4 = { 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" }
attributes #5 = { noinline noreturn nounwind }
attributes #6 = { cold noreturn nounwind }
attributes #7 = { noreturn "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #8 = { nobuiltin allocsize(0) "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #9 = { nobuiltin nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #10 = { nounwind readonly "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #11 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #12 = { nounwind }
attributes #13 = { noreturn nounwind }
attributes #14 = { noreturn }
attributes #15 = { allocsize(0) }
attributes #16 = { nounwind readonly }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
define i64 @_GLOBAL_OFFSET_TABLE_.1(i64 %arg1) local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
ret i64 0, !insn.addr !1
}
define i64 @function_31() local_unnamed_addr {
dec_label_pc_31:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !2
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = load i64, i64* %0
%stack_var_-824 = alloca i64, align 8
%4 = load i64, i64* %0
%stack_var_-8 = alloca i64, align 8
%5 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !2
%6 = mul i64 %1, 8, !insn.addr !3
%7 = add i64 %6, -816, !insn.addr !3
%8 = add i64 %7, %5, !insn.addr !3
%9 = inttoptr i64 %8 to i32*, !insn.addr !3
store i32 0, i32* %9, align 8, !insn.addr !3
%10 = mul i64 %4, 8, !insn.addr !4
%11 = add i64 %10, -812, !insn.addr !4
%12 = add i64 %11, %5, !insn.addr !4
%13 = inttoptr i64 %12 to i32*, !insn.addr !4
store i32 0, i32* %13, align 4, !insn.addr !4
%14 = call i64 @memmove(i64 %3, i64* nonnull %stack_var_-824, i64 800, i64* nonnull %stack_var_-824), !insn.addr !5
%15 = call i64 @printStructLine(i64 %3), !insn.addr !6
%16 = call i64 @__readfsqword(i64 40), !insn.addr !7
%17 = icmp eq i64 %2, %16, !insn.addr !7
store i64 0, i64* %rax.0.reg2mem, !insn.addr !8
br i1 %17, label %dec_label_pc_a6, label %dec_label_pc_a1, !insn.addr !8
dec_label_pc_a1: ; preds = %dec_label_pc_31
%18 = call i64 @__stack_chk_fail(), !insn.addr !9
store i64 %18, i64* %rax.0.reg2mem, !insn.addr !9
br label %dec_label_pc_a6, !insn.addr !9
dec_label_pc_a6: ; preds = %dec_label_pc_a1, %dec_label_pc_31
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !10
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_alloca_memmove_53d_goodG2BSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_a8:
%rax.0.reg2mem = alloca i64, !insn.addr !11
%storemerge1.reg2mem = alloca i64, !insn.addr !11
%stack_var_-824 = alloca i64, align 8
%stack_var_-8 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !12
%1 = call i64 @__readfsqword(i64 40), !insn.addr !13
store i64 0, i64* %storemerge1.reg2mem
br label %dec_label_pc_d6
dec_label_pc_d6: ; preds = %dec_label_pc_d6, %dec_label_pc_a8
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%2 = mul i64 %storemerge1.reload, 8, !insn.addr !14
%3 = add i64 %2, %0
%4 = add i64 %3, -816, !insn.addr !14
%5 = inttoptr i64 %4 to i32*, !insn.addr !14
store i32 0, i32* %5, align 8, !insn.addr !14
%6 = add i64 %3, -812, !insn.addr !15
%7 = inttoptr i64 %6 to i32*, !insn.addr !15
store i32 0, i32* %7, align 4, !insn.addr !15
%8 = add nuw nsw i64 %storemerge1.reload, 1, !insn.addr !16
%exitcond = icmp eq i64 %8, 100
store i64 %8, i64* %storemerge1.reg2mem, !insn.addr !17
br i1 %exitcond, label %dec_label_pc_10c, label %dec_label_pc_d6, !insn.addr !17
dec_label_pc_10c: ; preds = %dec_label_pc_d6
%9 = call i64 @memmove(i64 %arg1, i64* nonnull %stack_var_-824, i64 800, i64* nonnull %stack_var_-824), !insn.addr !18
%10 = call i64 @printStructLine(i64 %arg1), !insn.addr !19
%11 = call i64 @__readfsqword(i64 40), !insn.addr !20
%12 = icmp eq i64 %1, %11, !insn.addr !20
store i64 0, i64* %rax.0.reg2mem, !insn.addr !21
br i1 %12, label %dec_label_pc_14e, label %dec_label_pc_149, !insn.addr !21
dec_label_pc_149: ; preds = %dec_label_pc_10c
%13 = call i64 @__stack_chk_fail(), !insn.addr !22
store i64 %13, i64* %rax.0.reg2mem, !insn.addr !22
br label %dec_label_pc_14e, !insn.addr !22
dec_label_pc_14e: ; preds = %dec_label_pc_149, %dec_label_pc_10c
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !23
}
declare i64 @memmove(i64, i64*, i64, i64*) local_unnamed_addr
declare i64 @printStructLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 18}
!1 = !{i64 31}
!2 = !{i64 49}
!3 = !{i64 53}
!4 = !{i64 71}
!5 = !{i64 125}
!6 = !{i64 140}
!7 = !{i64 150}
!8 = !{i64 159}
!9 = !{i64 161}
!10 = !{i64 167}
!11 = !{i64 168}
!12 = !{i64 169}
!13 = !{i64 186}
!14 = !{i64 221}
!15 = !{i64 239}
!16 = !{i64 250}
!17 = !{i64 266}
!18 = !{i64 293}
!19 = !{i64 308}
!20 = !{i64 318}
!21 = !{i64 327}
!22 = !{i64 329}
!23 = !{i64 335}
### Assistant: %struct._twoIntsStruct = type { i32, i32 }
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_alloca_memmove_53d_badSink(%struct._twoIntsStruct* %data) #0 {
entry:
%data.addr = alloca %struct._twoIntsStruct*, align 8
%source = alloca [100 x %struct._twoIntsStruct], align 16
%i = alloca i64, align 8
store %struct._twoIntsStruct* %data, %struct._twoIntsStruct** %data.addr, align 8
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %entry
%0 = load i64, i64* %i, align 8
%cmp = icmp ult i64 %0, 100
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%1 = load i64, i64* %i, align 8
%arrayidx = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %1
%intOne = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %arrayidx, i32 0, i32 0
store i32 0, i32* %intOne, align 8
%2 = load i64, i64* %i, align 8
%arrayidx1 = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %2
%intTwo = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %arrayidx1, i32 0, i32 1
store i32 0, i32* %intTwo, align 4
br label %for.inc
for.inc: ; preds = %for.body
%3 = load i64, i64* %i, align 8
%inc = add i64 %3, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%4 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data.addr, align 8
%5 = bitcast %struct._twoIntsStruct* %4 to i8*
%arraydecay = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 0
%6 = bitcast %struct._twoIntsStruct* %arraydecay to i8*
call void @llvm.memmove.p0i8.p0i8.i64(i8* align 4 %5, i8* align 16 %6, i64 800, i1 false)
%7 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data.addr, align 8
%arrayidx2 = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %7, i64 0
call void @printStructLine(%struct._twoIntsStruct* %arrayidx2)
ret void
}
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memmove.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i1 immarg) #1
declare dso_local void @printStructLine(%struct._twoIntsStruct*) #2
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_struct_alloca_memmove_53d_goodG2BSink(%struct._twoIntsStruct* %data) #0 {
entry:
%data.addr = alloca %struct._twoIntsStruct*, align 8
%source = alloca [100 x %struct._twoIntsStruct], align 16
%i = alloca i64, align 8
store %struct._twoIntsStruct* %data, %struct._twoIntsStruct** %data.addr, align 8
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %entry
%0 = load i64, i64* %i, align 8
%cmp = icmp ult i64 %0, 100
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%1 = load i64, i64* %i, align 8
%arrayidx = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %1
%intOne = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %arrayidx, i32 0, i32 0
store i32 0, i32* %intOne, align 8
%2 = load i64, i64* %i, align 8
%arrayidx1 = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 %2
%intTwo = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %arrayidx1, i32 0, i32 1
store i32 0, i32* %intTwo, align 4
br label %for.inc
for.inc: ; preds = %for.body
%3 = load i64, i64* %i, align 8
%inc = add i64 %3, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%4 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data.addr, align 8
%5 = bitcast %struct._twoIntsStruct* %4 to i8*
%arraydecay = getelementptr inbounds [100 x %struct._twoIntsStruct], [100 x %struct._twoIntsStruct]* %source, i64 0, i64 0
%6 = bitcast %struct._twoIntsStruct* %arraydecay to i8*
call void @llvm.memmove.p0i8.p0i8.i64(i8* align 4 %5, i8* align 16 %6, i64 800, i1 false)
%7 = load %struct._twoIntsStruct*, %struct._twoIntsStruct** %data.addr, align 8
%arrayidx2 = getelementptr inbounds %struct._twoIntsStruct, %struct._twoIntsStruct* %7, i64 0
call void @printStructLine(%struct._twoIntsStruct* %arrayidx2)
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" }
attributes #1 = { argmemonly nounwind willreturn }
attributes #2 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_1ae = external constant i128
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
ret i64 ptrtoint (i128* @global_var_1ae to i64), !insn.addr !1
}
define i64 @function_30(i64 %arg1, i64 %arg2, i64 %arg3, i64 %arg4) local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !2
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = load i64, i64* %0
%4 = udiv i64 %3, %arg4
%5 = mul i64 %4, 16, !insn.addr !3
%6 = sub i64 %2, %5, !insn.addr !4
%7 = add i64 %6, 15, !insn.addr !5
%8 = and i64 %7, -16, !insn.addr !6
%9 = add i64 %1, -32, !insn.addr !7
%10 = inttoptr i64 %9 to i64*, !insn.addr !7
store i64 %8, i64* %10, align 8, !insn.addr !7
%11 = add i64 %6, -801, !insn.addr !8
%12 = and i64 %11, -16, !insn.addr !9
%13 = add i64 %1, -24, !insn.addr !10
%14 = inttoptr i64 %13 to i64*, !insn.addr !10
store i64 %12, i64* %14, align 8, !insn.addr !10
%15 = load i64, i64* %10, align 8, !insn.addr !11
%16 = add i64 %1, -16, !insn.addr !12
%17 = inttoptr i64 %16 to i64*, !insn.addr !12
store i64 %15, i64* %17, align 8, !insn.addr !12
%18 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_53b_badSink(i64 %15, i64 16, i128 14), !insn.addr !13
%19 = add i64 %1, -8, !insn.addr !14
%20 = inttoptr i64 %19 to i64*, !insn.addr !14
%21 = load i64, i64* %20, align 8, !insn.addr !14
%22 = call i64 @__readfsqword(i64 40), !insn.addr !15
%23 = icmp eq i64 %21, %22, !insn.addr !15
store i64 0, i64* %rax.0.reg2mem, !insn.addr !16
br i1 %23, label %dec_label_pc_ac, label %dec_label_pc_a7, !insn.addr !16
dec_label_pc_a7: ; preds = %dec_label_pc_30
%24 = call i64 @__stack_chk_fail(), !insn.addr !17
store i64 %24, i64* %rax.0.reg2mem, !insn.addr !17
br label %dec_label_pc_ac, !insn.addr !17
dec_label_pc_ac: ; preds = %dec_label_pc_a7, %dec_label_pc_30
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !18
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_ae:
%rax.0.reg2mem = alloca i64, !insn.addr !19
%stack_var_-40 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-40 to i64, !insn.addr !20
%1 = call i64 @__readfsqword(i64 40), !insn.addr !21
%2 = sub i64 %0, trunc (i128 mul (i128 sext (i64 trunc (i128 udiv (i128 zext (i64 ptrtoint (i128* @global_var_1ae to i64) to i128), i128 16) to i64) to i128), i128 16) to i64), !insn.addr !22
%3 = add i64 %2, 15, !insn.addr !23
%4 = and i64 %3, -16, !insn.addr !24
store i64 %4, i64* %stack_var_-40, align 8, !insn.addr !25
%5 = add i64 %2, -801, !insn.addr !26
%6 = and i64 %5, -16, !insn.addr !27
%7 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_53b_goodG2BSink(i64 %6, i64 16, i128 14, i64 16), !insn.addr !28
%8 = call i64 @__readfsqword(i64 40), !insn.addr !29
%9 = icmp eq i64 %1, %8, !insn.addr !29
store i64 0, i64* %rax.0.reg2mem, !insn.addr !30
br i1 %9, label %dec_label_pc_15a, label %dec_label_pc_155, !insn.addr !30
dec_label_pc_155: ; preds = %dec_label_pc_ae
%10 = call i64 @__stack_chk_fail(), !insn.addr !31
store i64 %10, i64* %rax.0.reg2mem, !insn.addr !31
br label %dec_label_pc_15a, !insn.addr !31
dec_label_pc_15a: ; preds = %dec_label_pc_155, %dec_label_pc_ae
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !32
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_53_good() local_unnamed_addr {
dec_label_pc_15c:
%0 = call i64 @goodG2B(), !insn.addr !33
ret i64 %0, !insn.addr !34
}
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_53b_badSink(i64, i64, i128) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_53b_goodG2BSink(i64, i64, i128, i64) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 8}
!1 = !{i64 32}
!2 = !{i64 48}
!3 = !{i64 51}
!4 = !{i64 55}
!5 = !{i64 61}
!6 = !{i64 65}
!7 = !{i64 73}
!8 = !{i64 115}
!9 = !{i64 119}
!10 = !{i64 127}
!11 = !{i64 131}
!12 = !{i64 135}
!13 = !{i64 146}
!14 = !{i64 152}
!15 = !{i64 156}
!16 = !{i64 165}
!17 = !{i64 167}
!18 = !{i64 173}
!19 = !{i64 174}
!20 = !{i64 178}
!21 = !{i64 182}
!22 = !{i64 229}
!23 = !{i64 235}
!24 = !{i64 239}
!25 = !{i64 247}
!26 = !{i64 289}
!27 = !{i64 293}
!28 = !{i64 320}
!29 = !{i64 330}
!30 = !{i64 339}
!31 = !{i64 341}
!32 = !{i64 347}
!33 = !{i64 357}
!34 = !{i64 364}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_53_bad() #0 {
entry:
%data = alloca i64*, align 8
%dataBadBuffer = alloca i64*, align 8
%dataGoodBuffer = alloca i64*, align 8
%0 = alloca i8, i64 400, align 16
%1 = bitcast i8* %0 to i64*
store i64* %1, i64** %dataBadBuffer, align 8
%2 = alloca i8, i64 800, align 16
%3 = bitcast i8* %2 to i64*
store i64* %3, i64** %dataGoodBuffer, align 8
%4 = load i64*, i64** %dataBadBuffer, align 8
store i64* %4, i64** %data, align 8
%5 = load i64*, i64** %data, align 8
call void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_53b_badSink(i64* %5)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_53b_badSink(i64*) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_53_good() #0 {
entry:
call void @goodG2B()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B() #0 {
entry:
%data = alloca i64*, align 8
%dataBadBuffer = alloca i64*, align 8
%dataGoodBuffer = alloca i64*, align 8
%0 = alloca i8, i64 400, align 16
%1 = bitcast i8* %0 to i64*
store i64* %1, i64** %dataBadBuffer, align 8
%2 = alloca i8, i64 800, align 16
%3 = bitcast i8* %2 to i64*
store i64* %3, i64** %dataGoodBuffer, align 8
%4 = load i64*, i64** %dataGoodBuffer, align 8
store i64* %4, i64** %data, align 8
%5 = load i64*, i64** %data, align 8
call void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_53b_goodG2BSink(i64* %5)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_53b_goodG2BSink(i64*) #1
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" }
attributes #1 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_d = constant i64 -556888036579737560
@global_var_460 = constant [32 x i8] c"ERROR: Array index is negative.\00"
@global_var_480 = constant [36 x i8] c"ERROR: Array index is out-of-bounds\00"
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
ret i64 0, !insn.addr !1
}
define i64 @function_30(i64 %arg1, i64 %arg2) local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !2
%storemerge1.reg2mem = alloca i32, !insn.addr !2
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = load i64, i64* %0
%4 = add i64 %arg2, 1, !insn.addr !2
%5 = inttoptr i64 %4 to i8*, !insn.addr !2
%6 = load i8, i8* %5, align 1, !insn.addr !2
%7 = udiv i64 %2, 256, !insn.addr !2
%8 = trunc i64 %7 to i8, !insn.addr !2
%9 = add i8 %6, %8, !insn.addr !2
store i8 %9, i8* %5, align 1, !insn.addr !2
%10 = call i64 @socket(i64 2, i64 %arg2, i64 %3), !insn.addr !3
%11 = trunc i64 %10 to i32, !insn.addr !4
%12 = add i64 %1, -76, !insn.addr !4
%13 = inttoptr i64 %12 to i32*, !insn.addr !4
store i32 %11, i32* %13, align 4, !insn.addr !4
%14 = icmp eq i32 %11, -1, !insn.addr !5
br i1 %14, label %dec_label_pc_126, label %dec_label_pc_4d, !insn.addr !6
dec_label_pc_4d: ; preds = %dec_label_pc_30
%15 = add i64 %1, -64, !insn.addr !7
%16 = call i64 @memset(i64 %15, i64 0, i64 16), !insn.addr !8
%17 = inttoptr i64 %15 to i16*, !insn.addr !9
store i16 2, i16* %17, align 2, !insn.addr !9
%18 = add i64 %1, -60, !insn.addr !10
%19 = inttoptr i64 %18 to i32*, !insn.addr !10
store i32 0, i32* %19, align 4, !insn.addr !10
%20 = call i64 @htons(i64 27015), !insn.addr !11
%21 = trunc i64 %20 to i16, !insn.addr !12
%22 = add i64 %1, -62, !insn.addr !12
%23 = inttoptr i64 %22 to i16*, !insn.addr !12
store i16 %21, i16* %23, align 2, !insn.addr !12
%24 = load i32, i32* %13, align 4, !insn.addr !13
%25 = zext i32 %24 to i64, !insn.addr !14
%26 = call i64 @bind(i64 %25, i64 %15, i64 16, i64 %15), !insn.addr !15
%27 = trunc i64 %26 to i32, !insn.addr !16
%28 = icmp eq i32 %27, -1, !insn.addr !16
br i1 %28, label %dec_label_pc_116, label %dec_label_pc_99, !insn.addr !17
dec_label_pc_99: ; preds = %dec_label_pc_4d
%29 = load i32, i32* %13, align 4, !insn.addr !18
%30 = zext i32 %29 to i64, !insn.addr !19
%31 = call i64 @listen(i64 %30, i64 5), !insn.addr !20
%32 = trunc i64 %31 to i32, !insn.addr !21
%33 = icmp eq i32 %32, -1, !insn.addr !21
br i1 %33, label %dec_label_pc_116, label %dec_label_pc_ad, !insn.addr !22
dec_label_pc_ad: ; preds = %dec_label_pc_99
%34 = load i32, i32* %13, align 4, !insn.addr !23
%35 = zext i32 %34 to i64, !insn.addr !24
%36 = call i64 @accept(i64 %35, i64 0, i64 0), !insn.addr !25
%37 = trunc i64 %36 to i32, !insn.addr !26
%38 = add i64 %1, -84, !insn.addr !26
%39 = inttoptr i64 %38 to i32*, !insn.addr !26
store i32 %37, i32* %39, align 4, !insn.addr !26
%40 = icmp eq i32 %37, -1, !insn.addr !27
br i1 %40, label %dec_label_pc_116, label %dec_label_pc_ca, !insn.addr !28
dec_label_pc_ca: ; preds = %dec_label_pc_ad
%41 = add i64 %1, -22, !insn.addr !29
%42 = and i64 %36, 4294967295, !insn.addr !30
%43 = call i64 @recv(i64 %42, i64 %41, i64* nonnull @global_var_d, i64 0), !insn.addr !31
%44 = trunc i64 %43 to i32, !insn.addr !32
%45 = add i64 %1, -72, !insn.addr !32
%46 = inttoptr i64 %45 to i32*, !insn.addr !32
store i32 %44, i32* %46, align 4, !insn.addr !32
switch i32 %44, label %dec_label_pc_f1 [
i32 -1, label %dec_label_pc_116
i32 0, label %dec_label_pc_116
]
dec_label_pc_f1: ; preds = %dec_label_pc_ca
%sext = mul i64 %43, 4294967296
%47 = ashr exact i64 %sext, 32, !insn.addr !33
%48 = add i64 %47, %41, !insn.addr !34
%49 = inttoptr i64 %48 to i8*, !insn.addr !34
store i8 0, i8* %49, align 1, !insn.addr !34
%50 = call i64 @atoi(i64 %41), !insn.addr !35
%51 = trunc i64 %50 to i32, !insn.addr !36
%52 = add i64 %1, -88, !insn.addr !36
%53 = inttoptr i64 %52 to i32*, !insn.addr !36
store i32 %51, i32* %53, align 4, !insn.addr !36
br label %dec_label_pc_116, !insn.addr !37
dec_label_pc_116: ; preds = %dec_label_pc_ca, %dec_label_pc_ca, %dec_label_pc_ad, %dec_label_pc_99, %dec_label_pc_4d, %dec_label_pc_f1
%.pr = load i32, i32* %13, align 4
%54 = icmp eq i32 %.pr, -1, !insn.addr !38
br i1 %54, label %dec_label_pc_126, label %dec_label_pc_11c, !insn.addr !39
dec_label_pc_11c: ; preds = %dec_label_pc_116
%55 = zext i32 %.pr to i64, !insn.addr !40
%56 = call i64 @close(i64 %55), !insn.addr !41
br label %dec_label_pc_126, !insn.addr !41
dec_label_pc_126: ; preds = %dec_label_pc_30, %dec_label_pc_11c, %dec_label_pc_116
%57 = add i64 %1, -84, !insn.addr !42
%58 = inttoptr i64 %57 to i32*, !insn.addr !42
%59 = load i32, i32* %58, align 4, !insn.addr !42
%60 = icmp eq i32 %59, -1, !insn.addr !42
br i1 %60, label %dec_label_pc_136, label %dec_label_pc_12c, !insn.addr !43
dec_label_pc_12c: ; preds = %dec_label_pc_126
%61 = zext i32 %59 to i64, !insn.addr !44
%62 = call i64 @close(i64 %61), !insn.addr !45
br label %dec_label_pc_136, !insn.addr !45
dec_label_pc_136: ; preds = %dec_label_pc_12c, %dec_label_pc_126
%63 = add i64 %1, -88, !insn.addr !46
%64 = inttoptr i64 %63 to i32*, !insn.addr !46
%65 = load i32, i32* %64, align 4, !insn.addr !46
%66 = add i64 %1, -92, !insn.addr !47
%67 = inttoptr i64 %66 to i32*, !insn.addr !47
store i32 %65, i32* %67, align 4, !insn.addr !47
%68 = add i64 %1, -68, !insn.addr !48
%69 = inttoptr i64 %68 to i32*, !insn.addr !48
store i32 %65, i32* %69, align 4, !insn.addr !48
%70 = add i64 %1, -64, !insn.addr !49
%71 = inttoptr i64 %70 to i64*, !insn.addr !49
store i64 0, i64* %71, align 8, !insn.addr !49
%72 = add i64 %1, -56, !insn.addr !50
%73 = inttoptr i64 %72 to i64*, !insn.addr !50
store i64 0, i64* %73, align 8, !insn.addr !50
%74 = add i64 %1, -48, !insn.addr !51
%75 = inttoptr i64 %74 to i64*, !insn.addr !51
store i64 0, i64* %75, align 8, !insn.addr !51
%76 = add i64 %1, -40, !insn.addr !52
%77 = inttoptr i64 %76 to i64*, !insn.addr !52
store i64 0, i64* %77, align 8, !insn.addr !52
%78 = add i64 %1, -32, !insn.addr !53
%79 = inttoptr i64 %78 to i64*, !insn.addr !53
store i64 0, i64* %79, align 8, !insn.addr !53
%80 = load i32, i32* %69, align 4, !insn.addr !54
%81 = icmp slt i32 %80, 0, !insn.addr !54
br i1 %81, label %dec_label_pc_1a2, label %dec_label_pc_170, !insn.addr !55
dec_label_pc_170: ; preds = %dec_label_pc_136
%82 = sext i32 %80 to i64, !insn.addr !56
%83 = mul i64 %82, 4, !insn.addr !57
%84 = add i64 %83, %70, !insn.addr !57
%85 = inttoptr i64 %84 to i32*, !insn.addr !57
store i32 1, i32* %85, align 4, !insn.addr !57
%86 = add i64 %1, -80, !insn.addr !58
%87 = inttoptr i64 %86 to i32*, !insn.addr !58
store i32 0, i32* %87, align 4
store i32 0, i32* %storemerge1.reg2mem
br label %dec_label_pc_186
dec_label_pc_186: ; preds = %dec_label_pc_170, %dec_label_pc_186
%storemerge1.reload = load i32, i32* %storemerge1.reg2mem
%88 = sext i32 %storemerge1.reload to i64, !insn.addr !59
%89 = mul i64 %88, 4, !insn.addr !60
%90 = add i64 %89, %70, !insn.addr !60
%91 = inttoptr i64 %90 to i32*, !insn.addr !60
%92 = load i32, i32* %91, align 4, !insn.addr !60
%93 = zext i32 %92 to i64, !insn.addr !61
%94 = call i64 @printIntLine(i64 %93), !insn.addr !62
%95 = load i32, i32* %87, align 4, !insn.addr !63
%96 = add i32 %95, 1, !insn.addr !63
store i32 %96, i32* %87, align 4
%97 = icmp slt i32 %96, 10, !insn.addr !64
store i32 %96, i32* %storemerge1.reg2mem, !insn.addr !64
br i1 %97, label %dec_label_pc_186, label %dec_label_pc_1ae, !insn.addr !64
dec_label_pc_1a2: ; preds = %dec_label_pc_136
%98 = call i64 @printLine(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @global_var_460, i64 0, i64 0)), !insn.addr !65
br label %dec_label_pc_1ae, !insn.addr !65
dec_label_pc_1ae: ; preds = %dec_label_pc_186, %dec_label_pc_1a2
%99 = add i64 %1, -8, !insn.addr !66
%100 = inttoptr i64 %99 to i64*, !insn.addr !66
%101 = load i64, i64* %100, align 8, !insn.addr !66
%102 = call i64 @__readfsqword(i64 40), !insn.addr !67
%103 = icmp eq i64 %101, %102, !insn.addr !67
store i64 0, i64* %rax.0.reg2mem, !insn.addr !68
br i1 %103, label %dec_label_pc_1c3, label %dec_label_pc_1be, !insn.addr !68
dec_label_pc_1be: ; preds = %dec_label_pc_1ae
%104 = call i64 @__stack_chk_fail(), !insn.addr !69
store i64 %104, i64* %rax.0.reg2mem, !insn.addr !69
br label %dec_label_pc_1c3, !insn.addr !69
dec_label_pc_1c3: ; preds = %dec_label_pc_1be, %dec_label_pc_1ae
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !70
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_1c5:
%rax.0.reg2mem = alloca i64, !insn.addr !71
%indvars.iv.reg2mem = alloca i64, !insn.addr !71
%stack_var_-8 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !72
%1 = call i64 @__readfsqword(i64 40), !insn.addr !73
%2 = add i64 %0, -20, !insn.addr !74
%3 = inttoptr i64 %2 to i32*, !insn.addr !74
store i32 1, i32* %3, align 4, !insn.addr !74
%4 = add i64 %0, -48, !insn.addr !75
store i64 0, i64* %indvars.iv.reg2mem
br label %dec_label_pc_23a
dec_label_pc_23a: ; preds = %dec_label_pc_23a, %dec_label_pc_1c5
%indvars.iv.reload = load i64, i64* %indvars.iv.reg2mem
%5 = mul i64 %indvars.iv.reload, 4, !insn.addr !75
%6 = add i64 %4, %5, !insn.addr !75
%7 = inttoptr i64 %6 to i32*, !insn.addr !75
%8 = load i32, i32* %7, align 4, !insn.addr !75
%9 = zext i32 %8 to i64, !insn.addr !76
%10 = call i64 @printIntLine(i64 %9), !insn.addr !77
%indvars.iv.next = add nuw nsw i64 %indvars.iv.reload, 1
%exitcond = icmp eq i64 %indvars.iv.next, 10
store i64 %indvars.iv.next, i64* %indvars.iv.reg2mem, !insn.addr !78
br i1 %exitcond, label %dec_label_pc_262, label %dec_label_pc_23a, !insn.addr !78
dec_label_pc_262: ; preds = %dec_label_pc_23a
%11 = call i64 @__readfsqword(i64 40), !insn.addr !79
%12 = icmp eq i64 %1, %11, !insn.addr !79
store i64 0, i64* %rax.0.reg2mem, !insn.addr !80
br i1 %12, label %dec_label_pc_277, label %dec_label_pc_272, !insn.addr !80
dec_label_pc_272: ; preds = %dec_label_pc_262
%13 = call i64 @__stack_chk_fail(), !insn.addr !81
store i64 %13, i64* %rax.0.reg2mem, !insn.addr !81
br label %dec_label_pc_277, !insn.addr !81
dec_label_pc_277: ; preds = %dec_label_pc_272, %dec_label_pc_262
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !82
}
define i64 @goodB2G() local_unnamed_addr {
dec_label_pc_279:
%rax.0.reg2mem = alloca i64, !insn.addr !83
%indvars.iv.reg2mem = alloca i64, !insn.addr !83
%stack_var_-96.0.ph.reg2mem = alloca i32, !insn.addr !83
%stack_var_-30 = alloca i64, align 8
%stack_var_-72 = alloca i64, align 8
%stack_var_-8 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !84
%1 = call i64 @socket(i64 2, i64 1, i64 6), !insn.addr !85
%2 = trunc i64 %1 to i32, !insn.addr !86
%3 = icmp eq i32 %2, -1, !insn.addr !87
br i1 %3, label %dec_label_pc_3af.thread, label %dec_label_pc_2c6, !insn.addr !88
dec_label_pc_2c6: ; preds = %dec_label_pc_279
%4 = ptrtoint i64* %stack_var_-72 to i64, !insn.addr !89
%5 = call i64 @memset(i64 %4, i64 0, i64 16), !insn.addr !90
store i64 2, i64* %stack_var_-72, align 8, !insn.addr !91
%6 = call i64 @htons(i64 27015), !insn.addr !92
%7 = and i64 %1, 4294967295
%8 = call i64 @bind(i64 %7, i64 %4, i64 16, i64 %4), !insn.addr !93
%9 = trunc i64 %8 to i32, !insn.addr !94
%10 = icmp eq i32 %9, -1, !insn.addr !94
br i1 %10, label %dec_label_pc_39f.thread9, label %dec_label_pc_312, !insn.addr !95
dec_label_pc_312: ; preds = %dec_label_pc_2c6
%11 = call i64 @listen(i64 %7, i64 5), !insn.addr !96
%12 = trunc i64 %11 to i32, !insn.addr !97
%13 = icmp eq i32 %12, -1, !insn.addr !97
br i1 %13, label %dec_label_pc_39f.thread9, label %dec_label_pc_326, !insn.addr !98
dec_label_pc_326: ; preds = %dec_label_pc_312
%14 = call i64 @accept(i64 %7, i64 0, i64 0), !insn.addr !99
%15 = trunc i64 %14 to i32, !insn.addr !100
%16 = icmp eq i32 %15, -1, !insn.addr !101
br i1 %16, label %dec_label_pc_39f.thread9, label %dec_label_pc_343, !insn.addr !102
dec_label_pc_343: ; preds = %dec_label_pc_326
%17 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !103
%18 = ptrtoint i64* %stack_var_-30 to i64, !insn.addr !104
%19 = and i64 %14, 4294967295
%20 = call i64 @recv(i64 %19, i64 %18, i64* nonnull @global_var_d, i64 0), !insn.addr !105
%21 = trunc i64 %20 to i32, !insn.addr !106
%22 = add i32 %21, 1
%23 = icmp ult i32 %22, 2
store i32 -1, i32* %stack_var_-96.0.ph.reg2mem, !insn.addr !107
br i1 %23, label %dec_label_pc_3af, label %dec_label_pc_36a, !insn.addr !107
dec_label_pc_36a: ; preds = %dec_label_pc_343
%sext = mul i64 %20, 4294967296
%24 = ashr exact i64 %sext, 32, !insn.addr !108
%25 = add i64 %17, -22, !insn.addr !109
%26 = add i64 %25, %24, !insn.addr !109
%27 = inttoptr i64 %26 to i8*, !insn.addr !109
store i8 0, i8* %27, align 1, !insn.addr !109
%28 = call i64 @atoi(i64 %18), !insn.addr !110
%29 = trunc i64 %28 to i32, !insn.addr !111
store i32 %29, i32* %stack_var_-96.0.ph.reg2mem, !insn.addr !112
br label %dec_label_pc_3af, !insn.addr !112
dec_label_pc_39f.thread9: ; preds = %dec_label_pc_326, %dec_label_pc_312, %dec_label_pc_2c6
%30 = call i64 @close(i64 %7), !insn.addr !113
br label %dec_label_pc_3af.thread
dec_label_pc_3af.thread: ; preds = %dec_label_pc_39f.thread9, %dec_label_pc_279
store i64 0, i64* %stack_var_-72, align 8, !insn.addr !114
br label %dec_label_pc_421
dec_label_pc_3af: ; preds = %dec_label_pc_343, %dec_label_pc_36a
%stack_var_-96.0.ph.reload = load i32, i32* %stack_var_-96.0.ph.reg2mem
%31 = call i64 @close(i64 %7), !insn.addr !113
%32 = call i64 @close(i64 %19), !insn.addr !115
store i64 0, i64* %stack_var_-72, align 8, !insn.addr !114
%33 = icmp ugt i32 %stack_var_-96.0.ph.reload, 9
br i1 %33, label %dec_label_pc_421, label %dec_label_pc_3ef, !insn.addr !116
dec_label_pc_3ef: ; preds = %dec_label_pc_3af
%34 = sext i32 %stack_var_-96.0.ph.reload to i64, !insn.addr !117
%35 = mul i64 %34, 4, !insn.addr !118
%36 = add i64 %17, -64, !insn.addr !118
%37 = add i64 %35, %36, !insn.addr !118
%38 = inttoptr i64 %37 to i32*, !insn.addr !118
store i32 1, i32* %38, align 4, !insn.addr !118
store i64 0, i64* %indvars.iv.reg2mem
br label %dec_label_pc_405
dec_label_pc_405: ; preds = %dec_label_pc_405, %dec_label_pc_3ef
%indvars.iv.reload = load i64, i64* %indvars.iv.reg2mem
%39 = mul i64 %indvars.iv.reload, 4, !insn.addr !119
%40 = add i64 %39, %36, !insn.addr !119
%41 = inttoptr i64 %40 to i32*, !insn.addr !119
%42 = load i32, i32* %41, align 4, !insn.addr !119
%43 = zext i32 %42 to i64, !insn.addr !120
%44 = call i64 @printIntLine(i64 %43), !insn.addr !121
%indvars.iv.next = add nuw nsw i64 %indvars.iv.reload, 1
%exitcond = icmp eq i64 %indvars.iv.next, 10
store i64 %indvars.iv.next, i64* %indvars.iv.reg2mem, !insn.addr !122
br i1 %exitcond, label %dec_label_pc_42d, label %dec_label_pc_405, !insn.addr !122
dec_label_pc_421: ; preds = %dec_label_pc_3af.thread, %dec_label_pc_3af
%45 = call i64 @printLine(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @global_var_480, i64 0, i64 0)), !insn.addr !123
br label %dec_label_pc_42d, !insn.addr !123
dec_label_pc_42d: ; preds = %dec_label_pc_405, %dec_label_pc_421
%46 = call i64 @__readfsqword(i64 40), !insn.addr !124
%47 = icmp eq i64 %0, %46, !insn.addr !124
store i64 0, i64* %rax.0.reg2mem, !insn.addr !125
br i1 %47, label %dec_label_pc_442, label %dec_label_pc_43d, !insn.addr !125
dec_label_pc_43d: ; preds = %dec_label_pc_42d
%48 = call i64 @__stack_chk_fail(), !insn.addr !126
store i64 %48, i64* %rax.0.reg2mem, !insn.addr !126
br label %dec_label_pc_442, !insn.addr !126
dec_label_pc_442: ; preds = %dec_label_pc_43d, %dec_label_pc_42d
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !127
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_34_good() local_unnamed_addr {
dec_label_pc_444:
%0 = call i64 @goodG2B(), !insn.addr !128
%1 = call i64 @goodB2G(), !insn.addr !129
ret i64 %1, !insn.addr !130
}
declare i64 @socket(i64, i64, i64) local_unnamed_addr
declare i64 @memset(i64, i64, i64) local_unnamed_addr
declare i64 @htons(i64) local_unnamed_addr
declare i64 @bind(i64, i64, i64, i64) local_unnamed_addr
declare i64 @listen(i64, i64) local_unnamed_addr
declare i64 @accept(i64, i64, i64) local_unnamed_addr
declare i64 @recv(i64, i64, i64*, i64) local_unnamed_addr
declare i64 @atoi(i64) local_unnamed_addr
declare i64 @close(i64) local_unnamed_addr
declare i64 @printIntLine(i64) local_unnamed_addr
declare i64 @printLine(i8*) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 8}
!1 = !{i64 30}
!2 = !{i64 48}
!3 = !{i64 59}
!4 = !{i64 64}
!5 = !{i64 67}
!6 = !{i64 71}
!7 = !{i64 77}
!8 = !{i64 94}
!9 = !{i64 99}
!10 = !{i64 105}
!11 = !{i64 117}
!12 = !{i64 122}
!13 = !{i64 130}
!14 = !{i64 141}
!15 = !{i64 143}
!16 = !{i64 148}
!17 = !{i64 151}
!18 = !{i64 153}
!19 = !{i64 161}
!20 = !{i64 163}
!21 = !{i64 168}
!22 = !{i64 171}
!23 = !{i64 173}
!24 = !{i64 186}
!25 = !{i64 188}
!26 = !{i64 193}
!27 = !{i64 196}
!28 = !{i64 200}
!29 = !{i64 202}
!30 = !{i64 219}
!31 = !{i64 221}
!32 = !{i64 226}
!33 = !{i64 244}
!34 = !{i64 246}
!35 = !{i64 258}
!36 = !{i64 263}
!37 = !{i64 266}
!38 = !{i64 278}
!39 = !{i64 282}
!40 = !{i64 287}
!41 = !{i64 289}
!42 = !{i64 294}
!43 = !{i64 298}
!44 = !{i64 303}
!45 = !{i64 305}
!46 = !{i64 310}
!47 = !{i64 313}
!48 = !{i64 319}
!49 = !{i64 322}
!50 = !{i64 330}
!51 = !{i64 338}
!52 = !{i64 346}
!53 = !{i64 354}
!54 = !{i64 362}
!55 = !{i64 366}
!56 = !{i64 371}
!57 = !{i64 373}
!58 = !{i64 381}
!59 = !{i64 393}
!60 = !{i64 395}
!61 = !{i64 399}
!62 = !{i64 401}
!63 = !{i64 406}
!64 = !{i64 414}
!65 = !{i64 425}
!66 = !{i64 431}
!67 = !{i64 435}
!68 = !{i64 444}
!69 = !{i64 446}
!70 = !{i64 452}
!71 = !{i64 453}
!72 = !{i64 454}
!73 = !{i64 461}
!74 = !{i64 553}
!75 = !{i64 575}
!76 = !{i64 579}
!77 = !{i64 581}
!78 = !{i64 594}
!79 = !{i64 615}
!80 = !{i64 624}
!81 = !{i64 626}
!82 = !{i64 632}
!83 = !{i64 633}
!84 = !{i64 641}
!85 = !{i64 692}
!86 = !{i64 697}
!87 = !{i64 700}
!88 = !{i64 704}
!89 = !{i64 724}
!90 = !{i64 727}
!91 = !{i64 732}
!92 = !{i64 750}
!93 = !{i64 776}
!94 = !{i64 781}
!95 = !{i64 784}
!96 = !{i64 796}
!97 = !{i64 801}
!98 = !{i64 804}
!99 = !{i64 821}
!100 = !{i64 826}
!101 = !{i64 829}
!102 = !{i64 833}
!103 = !{i64 634}
!104 = !{i64 835}
!105 = !{i64 854}
!106 = !{i64 859}
!107 = !{i64 866}
!108 = !{i64 877}
!109 = !{i64 879}
!110 = !{i64 891}
!111 = !{i64 896}
!112 = !{i64 899}
!113 = !{i64 922}
!114 = !{i64 955}
!115 = !{i64 938}
!116 = !{i64 999}
!117 = !{i64 1010}
!118 = !{i64 1012}
!119 = !{i64 1034}
!120 = !{i64 1038}
!121 = !{i64 1040}
!122 = !{i64 1053}
!123 = !{i64 1064}
!124 = !{i64 1074}
!125 = !{i64 1083}
!126 = !{i64 1085}
!127 = !{i64 1091}
!128 = !{i64 1101}
!129 = !{i64 1111}
!130 = !{i64 1118}
### Assistant: %union.CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_34_unionType = type { i32 }
%struct.sockaddr_in = type { i16, i16, %struct.in_addr, [8 x i8] }
%struct.in_addr = type { i32 }
%struct.sockaddr = type { i16, [14 x i8] }
@.str = private unnamed_addr constant [32 x i8] c"ERROR: Array index is negative.\00", align 1
@.str.1 = private unnamed_addr constant [36 x i8] c"ERROR: Array index is out-of-bounds\00", align 1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_34_bad() #0 {
entry:
%data = alloca i32, align 4
%myUnion = alloca %union.CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_34_unionType, align 4
%recvResult = alloca i32, align 4
%service = alloca %struct.sockaddr_in, align 4
%listenSocket = alloca i32, align 4
%acceptSocket = alloca i32, align 4
%inputBuffer = alloca [14 x i8], align 1
%data33 = alloca i32, align 4
%i = alloca i32, align 4
%buffer = alloca [10 x i32], align 16
store i32 -1, i32* %data, align 4
store i32 -1, i32* %listenSocket, align 4
store i32 -1, i32* %acceptSocket, align 4
br label %do.body
do.body: ; preds = %entry
%call = call i32 @socket(i32 2, i32 1, i32 6) #6
store i32 %call, i32* %listenSocket, align 4
%0 = load i32, i32* %listenSocket, align 4
%cmp = icmp eq i32 %0, -1
br i1 %cmp, label %if.then, label %if.end
if.then: ; preds = %do.body
br label %do.end
if.end: ; preds = %do.body
%1 = bitcast %struct.sockaddr_in* %service to i8*
call void @llvm.memset.p0i8.i64(i8* align 4 %1, i8 0, i64 16, i1 false)
%sin_family = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %service, i32 0, i32 0
store i16 2, i16* %sin_family, align 4
%sin_addr = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %service, i32 0, i32 2
%s_addr = getelementptr inbounds %struct.in_addr, %struct.in_addr* %sin_addr, i32 0, i32 0
store i32 0, i32* %s_addr, align 4
%call1 = call zeroext i16 @htons(i16 zeroext 27015) #7
%sin_port = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %service, i32 0, i32 1
store i16 %call1, i16* %sin_port, align 2
%2 = load i32, i32* %listenSocket, align 4
%3 = bitcast %struct.sockaddr_in* %service to %struct.sockaddr*
%call2 = call i32 @bind(i32 %2, %struct.sockaddr* %3, i32 16) #6
%cmp3 = icmp eq i32 %call2, -1
br i1 %cmp3, label %if.then4, label %if.end5
if.then4: ; preds = %if.end
br label %do.end
if.end5: ; preds = %if.end
%4 = load i32, i32* %listenSocket, align 4
%call6 = call i32 @listen(i32 %4, i32 5) #6
%cmp7 = icmp eq i32 %call6, -1
br i1 %cmp7, label %if.then8, label %if.end9
if.then8: ; preds = %if.end5
br label %do.end
if.end9: ; preds = %if.end5
%5 = load i32, i32* %listenSocket, align 4
%call10 = call i32 @accept(i32 %5, %struct.sockaddr* null, i32* null)
store i32 %call10, i32* %acceptSocket, align 4
%6 = load i32, i32* %acceptSocket, align 4
%cmp11 = icmp eq i32 %6, -1
br i1 %cmp11, label %if.then12, label %if.end13
if.then12: ; preds = %if.end9
br label %do.end
if.end13: ; preds = %if.end9
%7 = load i32, i32* %acceptSocket, align 4
%arraydecay = getelementptr inbounds [14 x i8], [14 x i8]* %inputBuffer, i64 0, i64 0
%call14 = call i64 @recv(i32 %7, i8* %arraydecay, i64 13, i32 0)
%conv = trunc i64 %call14 to i32
store i32 %conv, i32* %recvResult, align 4
%8 = load i32, i32* %recvResult, align 4
%cmp15 = icmp eq i32 %8, -1
br i1 %cmp15, label %if.then19, label %lor.lhs.false
lor.lhs.false: ; preds = %if.end13
%9 = load i32, i32* %recvResult, align 4
%cmp17 = icmp eq i32 %9, 0
br i1 %cmp17, label %if.then19, label %if.end20
if.then19: ; preds = %lor.lhs.false, %if.end13
br label %do.end
if.end20: ; preds = %lor.lhs.false
%10 = load i32, i32* %recvResult, align 4
%idxprom = sext i32 %10 to i64
%arrayidx = getelementptr inbounds [14 x i8], [14 x i8]* %inputBuffer, i64 0, i64 %idxprom
store i8 0, i8* %arrayidx, align 1
%arraydecay21 = getelementptr inbounds [14 x i8], [14 x i8]* %inputBuffer, i64 0, i64 0
%call22 = call i32 @atoi(i8* %arraydecay21) #8
store i32 %call22, i32* %data, align 4
br label %do.end
do.end: ; preds = %if.end20, %if.then19, %if.then12, %if.then8, %if.then4, %if.then
%11 = load i32, i32* %listenSocket, align 4
%cmp23 = icmp ne i32 %11, -1
br i1 %cmp23, label %if.then25, label %if.end27
if.then25: ; preds = %do.end
%12 = load i32, i32* %listenSocket, align 4
%call26 = call i32 @close(i32 %12)
br label %if.end27
if.end27: ; preds = %if.then25, %do.end
%13 = load i32, i32* %acceptSocket, align 4
%cmp28 = icmp ne i32 %13, -1
br i1 %cmp28, label %if.then30, label %if.end32
if.then30: ; preds = %if.end27
%14 = load i32, i32* %acceptSocket, align 4
%call31 = call i32 @close(i32 %14)
br label %if.end32
if.end32: ; preds = %if.then30, %if.end27
%15 = load i32, i32* %data, align 4
%unionFirst = bitcast %union.CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_34_unionType* %myUnion to i32*
store i32 %15, i32* %unionFirst, align 4
%unionSecond = bitcast %union.CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_34_unionType* %myUnion to i32*
%16 = load i32, i32* %unionSecond, align 4
store i32 %16, i32* %data33, align 4
%17 = bitcast [10 x i32]* %buffer to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %17, i8 0, i64 40, i1 false)
%18 = load i32, i32* %data33, align 4
%cmp34 = icmp sge i32 %18, 0
br i1 %cmp34, label %if.then36, label %if.else
if.then36: ; preds = %if.end32
%19 = load i32, i32* %data33, align 4
%idxprom37 = sext i32 %19 to i64
%arrayidx38 = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom37
store i32 1, i32* %arrayidx38, align 4
store i32 0, i32* %i, align 4
br label %for.cond
for.cond: ; preds = %for.inc, %if.then36
%20 = load i32, i32* %i, align 4
%cmp39 = icmp slt i32 %20, 10
br i1 %cmp39, label %for.body, label %for.end
for.body: ; preds = %for.cond
%21 = load i32, i32* %i, align 4
%idxprom41 = sext i32 %21 to i64
%arrayidx42 = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom41
%22 = load i32, i32* %arrayidx42, align 4
call void @printIntLine(i32 %22)
br label %for.inc
for.inc: ; preds = %for.body
%23 = load i32, i32* %i, align 4
%inc = add nsw i32 %23, 1
store i32 %inc, i32* %i, align 4
br label %for.cond
for.end: ; preds = %for.cond
br label %if.end43
if.else: ; preds = %if.end32
call void @printLine(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %if.end43
if.end43: ; preds = %if.else, %for.end
ret void
}
; Function Attrs: nounwind
declare dso_local i32 @socket(i32, i32, i32) #1
; Function Attrs: argmemonly nounwind willreturn writeonly
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #2
; Function Attrs: nounwind readnone
declare dso_local zeroext i16 @htons(i16 zeroext) #3
; Function Attrs: nounwind
declare dso_local i32 @bind(i32, %struct.sockaddr*, i32) #1
; Function Attrs: nounwind
declare dso_local i32 @listen(i32, i32) #1
declare dso_local i32 @accept(i32, %struct.sockaddr*, i32*) #4
declare dso_local i64 @recv(i32, i8*, i64, i32) #4
; Function Attrs: nounwind readonly
declare dso_local i32 @atoi(i8*) #5
declare dso_local i32 @close(i32) #4
declare dso_local void @printIntLine(i32) #4
declare dso_local void @printLine(i8*) #4
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_34_good() #0 {
entry:
call void @goodG2B()
call void @goodB2G()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B() #0 {
entry:
%data = alloca i32, align 4
%myUnion = alloca %union.CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_34_unionType, align 4
%data1 = alloca i32, align 4
%i = alloca i32, align 4
%buffer = alloca [10 x i32], align 16
store i32 -1, i32* %data, align 4
store i32 7, i32* %data, align 4
%0 = load i32, i32* %data, align 4
%unionFirst = bitcast %union.CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_34_unionType* %myUnion to i32*
store i32 %0, i32* %unionFirst, align 4
%unionSecond = bitcast %union.CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_34_unionType* %myUnion to i32*
%1 = load i32, i32* %unionSecond, align 4
store i32 %1, i32* %data1, align 4
%2 = bitcast [10 x i32]* %buffer to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %2, i8 0, i64 40, i1 false)
%3 = load i32, i32* %data1, align 4
%cmp = icmp sge i32 %3, 0
br i1 %cmp, label %if.then, label %if.else
if.then: ; preds = %entry
%4 = load i32, i32* %data1, align 4
%idxprom = sext i32 %4 to i64
%arrayidx = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom
store i32 1, i32* %arrayidx, align 4
store i32 0, i32* %i, align 4
br label %for.cond
for.cond: ; preds = %for.inc, %if.then
%5 = load i32, i32* %i, align 4
%cmp2 = icmp slt i32 %5, 10
br i1 %cmp2, label %for.body, label %for.end
for.body: ; preds = %for.cond
%6 = load i32, i32* %i, align 4
%idxprom3 = sext i32 %6 to i64
%arrayidx4 = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom3
%7 = load i32, i32* %arrayidx4, align 4
call void @printIntLine(i32 %7)
br label %for.inc
for.inc: ; preds = %for.body
%8 = load i32, i32* %i, align 4
%inc = add nsw i32 %8, 1
store i32 %inc, i32* %i, align 4
br label %for.cond
for.end: ; preds = %for.cond
br label %if.end
if.else: ; preds = %entry
call void @printLine(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %if.end
if.end: ; preds = %if.else, %for.end
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodB2G() #0 {
entry:
%data = alloca i32, align 4
%myUnion = alloca %union.CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_34_unionType, align 4
%recvResult = alloca i32, align 4
%service = alloca %struct.sockaddr_in, align 4
%listenSocket = alloca i32, align 4
%acceptSocket = alloca i32, align 4
%inputBuffer = alloca [14 x i8], align 1
%data33 = alloca i32, align 4
%i = alloca i32, align 4
%buffer = alloca [10 x i32], align 16
store i32 -1, i32* %data, align 4
store i32 -1, i32* %listenSocket, align 4
store i32 -1, i32* %acceptSocket, align 4
br label %do.body
do.body: ; preds = %entry
%call = call i32 @socket(i32 2, i32 1, i32 6) #6
store i32 %call, i32* %listenSocket, align 4
%0 = load i32, i32* %listenSocket, align 4
%cmp = icmp eq i32 %0, -1
br i1 %cmp, label %if.then, label %if.end
if.then: ; preds = %do.body
br label %do.end
if.end: ; preds = %do.body
%1 = bitcast %struct.sockaddr_in* %service to i8*
call void @llvm.memset.p0i8.i64(i8* align 4 %1, i8 0, i64 16, i1 false)
%sin_family = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %service, i32 0, i32 0
store i16 2, i16* %sin_family, align 4
%sin_addr = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %service, i32 0, i32 2
%s_addr = getelementptr inbounds %struct.in_addr, %struct.in_addr* %sin_addr, i32 0, i32 0
store i32 0, i32* %s_addr, align 4
%call1 = call zeroext i16 @htons(i16 zeroext 27015) #7
%sin_port = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %service, i32 0, i32 1
store i16 %call1, i16* %sin_port, align 2
%2 = load i32, i32* %listenSocket, align 4
%3 = bitcast %struct.sockaddr_in* %service to %struct.sockaddr*
%call2 = call i32 @bind(i32 %2, %struct.sockaddr* %3, i32 16) #6
%cmp3 = icmp eq i32 %call2, -1
br i1 %cmp3, label %if.then4, label %if.end5
if.then4: ; preds = %if.end
br label %do.end
if.end5: ; preds = %if.end
%4 = load i32, i32* %listenSocket, align 4
%call6 = call i32 @listen(i32 %4, i32 5) #6
%cmp7 = icmp eq i32 %call6, -1
br i1 %cmp7, label %if.then8, label %if.end9
if.then8: ; preds = %if.end5
br label %do.end
if.end9: ; preds = %if.end5
%5 = load i32, i32* %listenSocket, align 4
%call10 = call i32 @accept(i32 %5, %struct.sockaddr* null, i32* null)
store i32 %call10, i32* %acceptSocket, align 4
%6 = load i32, i32* %acceptSocket, align 4
%cmp11 = icmp eq i32 %6, -1
br i1 %cmp11, label %if.then12, label %if.end13
if.then12: ; preds = %if.end9
br label %do.end
if.end13: ; preds = %if.end9
%7 = load i32, i32* %acceptSocket, align 4
%arraydecay = getelementptr inbounds [14 x i8], [14 x i8]* %inputBuffer, i64 0, i64 0
%call14 = call i64 @recv(i32 %7, i8* %arraydecay, i64 13, i32 0)
%conv = trunc i64 %call14 to i32
store i32 %conv, i32* %recvResult, align 4
%8 = load i32, i32* %recvResult, align 4
%cmp15 = icmp eq i32 %8, -1
br i1 %cmp15, label %if.then19, label %lor.lhs.false
lor.lhs.false: ; preds = %if.end13
%9 = load i32, i32* %recvResult, align 4
%cmp17 = icmp eq i32 %9, 0
br i1 %cmp17, label %if.then19, label %if.end20
if.then19: ; preds = %lor.lhs.false, %if.end13
br label %do.end
if.end20: ; preds = %lor.lhs.false
%10 = load i32, i32* %recvResult, align 4
%idxprom = sext i32 %10 to i64
%arrayidx = getelementptr inbounds [14 x i8], [14 x i8]* %inputBuffer, i64 0, i64 %idxprom
store i8 0, i8* %arrayidx, align 1
%arraydecay21 = getelementptr inbounds [14 x i8], [14 x i8]* %inputBuffer, i64 0, i64 0
%call22 = call i32 @atoi(i8* %arraydecay21) #8
store i32 %call22, i32* %data, align 4
br label %do.end
do.end: ; preds = %if.end20, %if.then19, %if.then12, %if.then8, %if.then4, %if.then
%11 = load i32, i32* %listenSocket, align 4
%cmp23 = icmp ne i32 %11, -1
br i1 %cmp23, label %if.then25, label %if.end27
if.then25: ; preds = %do.end
%12 = load i32, i32* %listenSocket, align 4
%call26 = call i32 @close(i32 %12)
br label %if.end27
if.end27: ; preds = %if.then25, %do.end
%13 = load i32, i32* %acceptSocket, align 4
%cmp28 = icmp ne i32 %13, -1
br i1 %cmp28, label %if.then30, label %if.end32
if.then30: ; preds = %if.end27
%14 = load i32, i32* %acceptSocket, align 4
%call31 = call i32 @close(i32 %14)
br label %if.end32
if.end32: ; preds = %if.then30, %if.end27
%15 = load i32, i32* %data, align 4
%unionFirst = bitcast %union.CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_34_unionType* %myUnion to i32*
store i32 %15, i32* %unionFirst, align 4
%unionSecond = bitcast %union.CWE121_Stack_Based_Buffer_Overflow__CWE129_listen_socket_34_unionType* %myUnion to i32*
%16 = load i32, i32* %unionSecond, align 4
store i32 %16, i32* %data33, align 4
%17 = bitcast [10 x i32]* %buffer to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %17, i8 0, i64 40, i1 false)
%18 = load i32, i32* %data33, align 4
%cmp34 = icmp sge i32 %18, 0
br i1 %cmp34, label %land.lhs.true, label %if.else
land.lhs.true: ; preds = %if.end32
%19 = load i32, i32* %data33, align 4
%cmp36 = icmp slt i32 %19, 10
br i1 %cmp36, label %if.then38, label %if.else
if.then38: ; preds = %land.lhs.true
%20 = load i32, i32* %data33, align 4
%idxprom39 = sext i32 %20 to i64
%arrayidx40 = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom39
store i32 1, i32* %arrayidx40, align 4
store i32 0, i32* %i, align 4
br label %for.cond
for.cond: ; preds = %for.inc, %if.then38
%21 = load i32, i32* %i, align 4
%cmp41 = icmp slt i32 %21, 10
br i1 %cmp41, label %for.body, label %for.end
for.body: ; preds = %for.cond
%22 = load i32, i32* %i, align 4
%idxprom43 = sext i32 %22 to i64
%arrayidx44 = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom43
%23 = load i32, i32* %arrayidx44, align 4
call void @printIntLine(i32 %23)
br label %for.inc
for.inc: ; preds = %for.body
%24 = load i32, i32* %i, align 4
%inc = add nsw i32 %24, 1
store i32 %inc, i32* %i, align 4
br label %for.cond
for.end: ; preds = %for.cond
br label %if.end45
if.else: ; preds = %land.lhs.true, %if.end32
call void @printLine(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
br label %if.end45
if.end45: ; preds = %if.else, %for.end
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" }
attributes #1 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #2 = { argmemonly nounwind willreturn writeonly }
attributes #3 = { nounwind readnone "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #4 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #5 = { nounwind readonly "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #6 = { nounwind }
attributes #7 = { nounwind readnone }
attributes #8 = { nounwind readonly }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_283 = constant [3 x i8] c"%s\00"
@global_var_10 = constant [3 x i8] c"%(\00"
define i64 @_GLOBAL_OFFSET_TABLE_.1(i64 %arg1) local_unnamed_addr {
dec_label_pc_0:
%stack_var_-120 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
%1 = ptrtoint i64* %stack_var_-120 to i64, !insn.addr !1
ret i64 %1, !insn.addr !2
}
define i64 @function_30(i64 %arg1, i64 %arg2, i64 %arg3, i64 %arg4) local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !3
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = mul i64 %2, 256
%4 = add i64 %3, %arg3
%5 = and i64 %4, 65280, !insn.addr !3
%6 = and i64 %arg3, -65281, !insn.addr !3
%7 = or i64 %5, %6, !insn.addr !3
%8 = add i64 %2, -115, !insn.addr !4
%9 = inttoptr i64 %8 to i8*, !insn.addr !4
%10 = load i8, i8* %9, align 1, !insn.addr !4
%11 = trunc i64 %arg4 to i8, !insn.addr !4
%12 = add i8 %10, %11, !insn.addr !4
store i8 %12, i8* %9, align 1, !insn.addr !4
%13 = add i64 %1, -120, !insn.addr !5
%14 = inttoptr i64 %13 to i64*, !insn.addr !5
%15 = load i64, i64* %14, align 8, !insn.addr !5
%16 = call i64 @snprintf(i64 %15, i64 100, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @global_var_283, i64 0, i64 0), i64 %7), !insn.addr !6
%17 = load i64, i64* %14, align 8, !insn.addr !7
%18 = call i64 @printLine(i64 %17), !insn.addr !8
%19 = add i64 %1, -8, !insn.addr !9
%20 = inttoptr i64 %19 to i64*, !insn.addr !9
%21 = load i64, i64* %20, align 8, !insn.addr !9
%22 = call i64 @__readfsqword(i64 40), !insn.addr !10
%23 = icmp eq i64 %21, %22, !insn.addr !10
store i64 0, i64* %rax.0.reg2mem, !insn.addr !11
br i1 %23, label %dec_label_pc_7a, label %dec_label_pc_75, !insn.addr !11
dec_label_pc_75: ; preds = %dec_label_pc_30
%24 = call i64 @__stack_chk_fail(), !insn.addr !12
store i64 %24, i64* %rax.0.reg2mem, !insn.addr !12
br label %dec_label_pc_7a, !insn.addr !12
dec_label_pc_7a: ; preds = %dec_label_pc_75, %dec_label_pc_30
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !13
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_snprintf_44_bad() local_unnamed_addr {
dec_label_pc_7c:
%rax.0.reg2mem = alloca i64, !insn.addr !14
%stack_var_-56 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-56 to i64, !insn.addr !15
%1 = call i64 @__readfsqword(i64 40), !insn.addr !16
%2 = add i64 %0, add (i64 sub (i64 0, i64 trunc (i128 mul (i128 sext (i64 trunc (i128 udiv (i128 zext (i64 add (i64 sub (i64 ptrtoint ([3 x i8]* @global_var_10 to i64), i64 1), i64 65) to i128), i128 zext (i64 ptrtoint ([3 x i8]* @global_var_10 to i64) to i128)) to i64) to i128), i128 ptrtoint ([3 x i8]* @global_var_10 to i128)) to i64)), i64 15), !insn.addr !17
%3 = and i64 %2, -16, !insn.addr !18
%4 = inttoptr i64 %3 to i8*, !insn.addr !19
store i8 0, i8* %4, align 16, !insn.addr !19
%5 = call i64 @__readfsqword(i64 40), !insn.addr !20
%6 = icmp eq i64 %1, %5, !insn.addr !20
store i64 0, i64* %rax.0.reg2mem, !insn.addr !21
br i1 %6, label %dec_label_pc_137, label %dec_label_pc_132, !insn.addr !21
dec_label_pc_132: ; preds = %dec_label_pc_7c
%7 = call i64 @__stack_chk_fail(), !insn.addr !22
store i64 %7, i64* %rax.0.reg2mem, !insn.addr !22
br label %dec_label_pc_137, !insn.addr !22
dec_label_pc_137: ; preds = %dec_label_pc_132, %dec_label_pc_7c
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !23
}
define i64 @goodG2BSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_139:
%rax.0.reg2mem = alloca i64, !insn.addr !24
%stack_var_-120 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !25
%1 = call i64 @memset(i64* nonnull %stack_var_-120, i64 67, i64 99), !insn.addr !26
%2 = ptrtoint i64* %stack_var_-120 to i64, !insn.addr !27
%3 = call i64 @snprintf(i64 %arg1, i64 100, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @global_var_283, i64 0, i64 0), i64 %2), !insn.addr !28
%4 = call i64 @printLine(i64 %arg1), !insn.addr !29
%5 = call i64 @__readfsqword(i64 40), !insn.addr !30
%6 = icmp eq i64 %0, %5, !insn.addr !30
store i64 0, i64* %rax.0.reg2mem, !insn.addr !31
br i1 %6, label %dec_label_pc_1b3, label %dec_label_pc_1ae, !insn.addr !31
dec_label_pc_1ae: ; preds = %dec_label_pc_139
%7 = call i64 @__stack_chk_fail(), !insn.addr !32
store i64 %7, i64* %rax.0.reg2mem, !insn.addr !32
br label %dec_label_pc_1b3, !insn.addr !32
dec_label_pc_1b3: ; preds = %dec_label_pc_1ae, %dec_label_pc_139
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !33
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_1b5:
%rax.0.reg2mem = alloca i64, !insn.addr !34
%stack_var_-56 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-56 to i64, !insn.addr !35
%1 = call i64 @__readfsqword(i64 40), !insn.addr !36
%2 = add i64 %0, add (i64 add (i64 sub (i64 0, i64 trunc (i128 mul (i128 sext (i64 trunc (i128 udiv (i128 zext (i64 add (i64 sub (i64 ptrtoint ([3 x i8]* @global_var_10 to i64), i64 1), i64 115) to i128), i128 zext (i64 ptrtoint ([3 x i8]* @global_var_10 to i64) to i128)) to i64) to i128), i128 ptrtoint ([3 x i8]* @global_var_10 to i128)) to i64)), i64 sub (i64 0, i64 trunc (i128 mul (i128 sext (i64 trunc (i128 udiv (i128 zext (i64 add (i64 sub (i64 ptrtoint ([3 x i8]* @global_var_10 to i64), i64 1), i64 65) to i128), i128 zext (i64 ptrtoint ([3 x i8]* @global_var_10 to i64) to i128)) to i64) to i128), i128 ptrtoint ([3 x i8]* @global_var_10 to i128)) to i64))), i64 15), !insn.addr !37
%3 = and i64 %2, -16, !insn.addr !38
%4 = inttoptr i64 %3 to i8*, !insn.addr !39
store i8 0, i8* %4, align 16, !insn.addr !39
%5 = call i64 @__readfsqword(i64 40), !insn.addr !40
%6 = icmp eq i64 %1, %5, !insn.addr !40
store i64 0, i64* %rax.0.reg2mem, !insn.addr !41
br i1 %6, label %dec_label_pc_270, label %dec_label_pc_26b, !insn.addr !41
dec_label_pc_26b: ; preds = %dec_label_pc_1b5
%7 = call i64 @__stack_chk_fail(), !insn.addr !42
store i64 %7, i64* %rax.0.reg2mem, !insn.addr !42
br label %dec_label_pc_270, !insn.addr !42
dec_label_pc_270: ; preds = %dec_label_pc_26b, %dec_label_pc_1b5
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !43
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_snprintf_44_good() local_unnamed_addr {
dec_label_pc_272:
%0 = call i64 @goodG2B(), !insn.addr !44
ret i64 %0, !insn.addr !45
}
declare i64 @memset(i64*, i64, i64) local_unnamed_addr
declare i64 @snprintf(i64, i64, i8*, i64) local_unnamed_addr
declare i64 @printLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 12}
!1 = !{i64 27}
!2 = !{i64 31}
!3 = !{i64 48}
!4 = !{i64 50}
!5 = !{i64 57}
!6 = !{i64 84}
!7 = !{i64 89}
!8 = !{i64 96}
!9 = !{i64 102}
!10 = !{i64 106}
!11 = !{i64 115}
!12 = !{i64 117}
!13 = !{i64 123}
!14 = !{i64 124}
!15 = !{i64 128}
!16 = !{i64 132}
!17 = !{i64 194}
!18 = !{i64 198}
!19 = !{i64 274}
!20 = !{i64 295}
!21 = !{i64 304}
!22 = !{i64 306}
!23 = !{i64 312}
!24 = !{i64 313}
!25 = !{i64 325}
!26 = !{i64 357}
!27 = !{i64 374}
!28 = !{i64 397}
!29 = !{i64 409}
!30 = !{i64 419}
!31 = !{i64 428}
!32 = !{i64 430}
!33 = !{i64 436}
!34 = !{i64 437}
!35 = !{i64 441}
!36 = !{i64 445}
!37 = !{i64 559}
!38 = !{i64 563}
!39 = !{i64 587}
!40 = !{i64 608}
!41 = !{i64 617}
!42 = !{i64 619}
!43 = !{i64 625}
!44 = !{i64 635}
!45 = !{i64 642}
### Assistant: @.str = private unnamed_addr constant [3 x i8] c"%s\00", align 1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_snprintf_44_bad() #0 {
entry:
%data = alloca i8*, align 8
%funcPtr = alloca void (i8*)*, align 8
%dataBadBuffer = alloca i8*, align 8
%dataGoodBuffer = alloca i8*, align 8
store void (i8*)* @badSink, void (i8*)** %funcPtr, align 8
%0 = alloca i8, i64 50, align 16
store i8* %0, i8** %dataBadBuffer, align 8
%1 = alloca i8, i64 100, align 16
store i8* %1, i8** %dataGoodBuffer, align 8
%2 = load i8*, i8** %dataBadBuffer, align 8
store i8* %2, i8** %data, align 8
%3 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %3, i64 0
store i8 0, i8* %arrayidx, align 1
%4 = load void (i8*)*, void (i8*)** %funcPtr, align 8
%5 = load i8*, i8** %data, align 8
call void %4(i8* %5)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @badSink(i8* %data) #0 {
entry:
%data.addr = alloca i8*, align 8
%source = alloca [100 x i8], align 16
store i8* %data, i8** %data.addr, align 8
%arraydecay = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
call void @llvm.memset.p0i8.i64(i8* align 16 %arraydecay, i8 67, i64 99, i1 false)
%arrayidx = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 99
store i8 0, i8* %arrayidx, align 1
%0 = load i8*, i8** %data.addr, align 8
%arraydecay1 = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
%call = call i32 (i8*, i64, i8*, ...) @snprintf(i8* %0, i64 100, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %arraydecay1) #4
%1 = load i8*, i8** %data.addr, align 8
call void @printLine(i8* %1)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_alloca_snprintf_44_good() #0 {
entry:
call void @goodG2B()
ret void
}
; Function Attrs: argmemonly nounwind willreturn writeonly
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #1
; Function Attrs: nounwind
declare dso_local i32 @snprintf(i8*, i64, i8*, ...) #2
declare dso_local void @printLine(i8*) #3
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B() #0 {
entry:
%data = alloca i8*, align 8
%funcPtr = alloca void (i8*)*, align 8
%dataBadBuffer = alloca i8*, align 8
%dataGoodBuffer = alloca i8*, align 8
store void (i8*)* @goodG2BSink, void (i8*)** %funcPtr, align 8
%0 = alloca i8, i64 50, align 16
store i8* %0, i8** %dataBadBuffer, align 8
%1 = alloca i8, i64 100, align 16
store i8* %1, i8** %dataGoodBuffer, align 8
%2 = load i8*, i8** %dataGoodBuffer, align 8
store i8* %2, i8** %data, align 8
%3 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %3, i64 0
store i8 0, i8* %arrayidx, align 1
%4 = load void (i8*)*, void (i8*)** %funcPtr, align 8
%5 = load i8*, i8** %data, align 8
call void %4(i8* %5)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2BSink(i8* %data) #0 {
entry:
%data.addr = alloca i8*, align 8
%source = alloca [100 x i8], align 16
store i8* %data, i8** %data.addr, align 8
%arraydecay = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
call void @llvm.memset.p0i8.i64(i8* align 16 %arraydecay, i8 67, i64 99, i1 false)
%arrayidx = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 99
store i8 0, i8* %arrayidx, align 1
%0 = load i8*, i8** %data.addr, align 8
%arraydecay1 = getelementptr inbounds [100 x i8], [100 x i8]* %source, i64 0, i64 0
%call = call i32 (i8*, i64, i8*, ...) @snprintf(i8* %0, i64 100, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %arraydecay1) #4
%1 = load i8*, i8** %data.addr, align 8
call void @printLine(i8* %1)
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" }
attributes #1 = { argmemonly nounwind willreturn writeonly }
attributes #2 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #3 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #4 = { nounwind }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_f = constant [3 x i8] c"%(\00"
@global_var_370 = local_unnamed_addr constant i64 2259547958674182
@global_var_10 = external constant i128
@global_var_32f = external constant i128
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%stack_var_-888 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
%1 = ptrtoint i64* %stack_var_-888 to i64, !insn.addr !1
ret i64 %1, !insn.addr !2
}
define i64 @function_30() local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !3
%storemerge1.reg2mem = alloca i64, !insn.addr !3
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = load i64, i64* %0
%4 = trunc i64 %3 to i32, !insn.addr !3
%5 = add i64 %1, -856, !insn.addr !3
%6 = inttoptr i64 %5 to i32*, !insn.addr !3
store i32 %4, i32* %6, align 4, !insn.addr !3
%7 = sub i64 %2, trunc (i128 mul (i128 sext (i64 trunc (i128 udiv (i128 zext (i64 add (i64 sub (i64 ptrtoint (i128* @global_var_10 to i64), i64 1), i64 415) to i128), i128 zext (i64 ptrtoint (i128* @global_var_10 to i64) to i128)) to i64) to i128), i128 ptrtoint (i128* @global_var_10 to i128)) to i64), !insn.addr !4
%8 = add i64 %7, ptrtoint ([3 x i8]* @global_var_f to i64), !insn.addr !5
%9 = and i64 %8, -16, !insn.addr !6
%10 = add i64 %1, -848, !insn.addr !7
%11 = inttoptr i64 %10 to i64*, !insn.addr !7
store i64 %9, i64* %11, align 8, !insn.addr !7
%12 = add i64 %7, add (i64 ptrtoint ([3 x i8]* @global_var_f to i64), i64 sub (i64 0, i64 trunc (i128 mul (i128 sext (i64 trunc (i128 udiv (i128 zext (i64 add (i64 sub (i64 ptrtoint (i128* @global_var_10 to i64), i64 1), i64 ptrtoint (i128* @global_var_32f to i64)) to i128), i128 zext (i64 ptrtoint (i128* @global_var_10 to i64) to i128)) to i64) to i128), i128 ptrtoint (i128* @global_var_10 to i128)) to i64))), !insn.addr !8
%13 = and i64 %12, -16, !insn.addr !9
%14 = add i64 %1, -840, !insn.addr !10
%15 = inttoptr i64 %14 to i64*, !insn.addr !10
store i64 %13, i64* %15, align 8, !insn.addr !10
%16 = add i64 %1, -864, !insn.addr !11
%17 = inttoptr i64 %16 to i64*, !insn.addr !11
%18 = load i64, i64* %17, align 8, !insn.addr !11
%19 = inttoptr i64 %18 to i64*, !insn.addr !12
%20 = load i64, i64* %19, align 8, !insn.addr !12
%21 = add i64 %1, -832, !insn.addr !13
%22 = inttoptr i64 %21 to i64*, !insn.addr !13
store i64 %20, i64* %22, align 8, !insn.addr !13
%23 = load i64, i64* %11, align 8, !insn.addr !14
store i64 %23, i64* %22, align 8, !insn.addr !15
%24 = load i64, i64* %17, align 8, !insn.addr !16
%25 = inttoptr i64 %24 to i64*, !insn.addr !17
store i64 %23, i64* %25, align 8, !insn.addr !17
%26 = inttoptr i64 %5 to i64*, !insn.addr !18
%27 = load i64, i64* %26, align 8, !insn.addr !18
%28 = inttoptr i64 %27 to i64*, !insn.addr !19
%29 = load i64, i64* %28, align 8, !insn.addr !19
%30 = add i64 %1, -824, !insn.addr !20
%31 = inttoptr i64 %30 to i64*, !insn.addr !20
store i64 %29, i64* %31, align 8, !insn.addr !20
%32 = add i64 %1, -816, !insn.addr !21
%33 = inttoptr i64 %32 to i8*, !insn.addr !22
call void @__asm_rep_stosq_memset(i8* %33, i64 0, i64 100), !insn.addr !22
%34 = add i64 %1, -872, !insn.addr !23
%35 = inttoptr i64 %34 to i64*, !insn.addr !23
store i64 0, i64* %35, align 8
store i64 0, i64* %storemerge1.reg2mem
br label %dec_label_pc_10d
dec_label_pc_10d: ; preds = %dec_label_pc_30, %dec_label_pc_10d
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%36 = mul i64 %storemerge1.reload, 8, !insn.addr !24
%37 = load i64, i64* %31, align 8, !insn.addr !25
%38 = add i64 %37, %36, !insn.addr !26
%39 = add i64 %36, %32, !insn.addr !27
%40 = inttoptr i64 %39 to i64*, !insn.addr !27
%41 = load i64, i64* %40, align 8, !insn.addr !27
%42 = inttoptr i64 %38 to i64*, !insn.addr !28
store i64 %41, i64* %42, align 8, !insn.addr !28
%43 = load i64, i64* %35, align 8, !insn.addr !29
%44 = add i64 %43, 1, !insn.addr !29
store i64 %44, i64* %35, align 8
%45 = icmp ult i64 %44, 100
store i64 %44, i64* %storemerge1.reg2mem, !insn.addr !30
br i1 %45, label %dec_label_pc_10d, label %dec_label_pc_14a, !insn.addr !30
dec_label_pc_14a: ; preds = %dec_label_pc_10d
%46 = load i64, i64* %31, align 8, !insn.addr !31
%47 = inttoptr i64 %46 to i64*, !insn.addr !32
%48 = load i64, i64* %47, align 8, !insn.addr !32
%49 = call i64 @printLongLongLine(i64 %48), !insn.addr !33
%50 = add i64 %1, -8, !insn.addr !34
%51 = inttoptr i64 %50 to i64*, !insn.addr !34
%52 = load i64, i64* %51, align 8, !insn.addr !34
%53 = call i64 @__readfsqword(i64 40), !insn.addr !35
%54 = icmp eq i64 %52, %53, !insn.addr !35
store i64 0, i64* %rax.0.reg2mem, !insn.addr !36
br i1 %54, label %dec_label_pc_171, label %dec_label_pc_16c, !insn.addr !36
dec_label_pc_16c: ; preds = %dec_label_pc_14a
%55 = call i64 @__stack_chk_fail(), !insn.addr !37
store i64 %55, i64* %rax.0.reg2mem, !insn.addr !37
br label %dec_label_pc_171, !insn.addr !37
dec_label_pc_171: ; preds = %dec_label_pc_16c, %dec_label_pc_14a
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !38
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_173:
%rax.0.reg2mem = alloca i64, !insn.addr !39
%storemerge1.reg2mem = alloca i64, !insn.addr !39
%stack_var_-824 = alloca i64, align 8
%stack_var_-888 = alloca i64, align 8
%stack_var_-8 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !40
%1 = ptrtoint i64* %stack_var_-888 to i64, !insn.addr !41
%2 = call i64 @__readfsqword(i64 40), !insn.addr !42
%3 = add i64 %1, add (i64 ptrtoint ([3 x i8]* @global_var_f to i64), i64 add (i64 sub (i64 0, i64 trunc (i128 mul (i128 sext (i64 trunc (i128 udiv (i128 zext (i64 add (i64 sub (i64 ptrtoint (i128* @global_var_10 to i64), i64 1), i64 ptrtoint (i128* @global_var_32f to i64)) to i128), i128 zext (i64 ptrtoint (i128* @global_var_10 to i64) to i128)) to i64) to i128), i128 ptrtoint (i128* @global_var_10 to i128)) to i64)), i64 sub (i64 0, i64 trunc (i128 mul (i128 sext (i64 trunc (i128 udiv (i128 zext (i64 add (i64 sub (i64 ptrtoint (i128* @global_var_10 to i64), i64 1), i64 415) to i128), i128 zext (i64 ptrtoint (i128* @global_var_10 to i64) to i128)) to i64) to i128), i128 ptrtoint (i128* @global_var_10 to i128)) to i64)))), !insn.addr !43
%4 = and i64 %3, -16, !insn.addr !44
store i64 %4, i64* %stack_var_-888, align 8, !insn.addr !45
%5 = bitcast i64* %stack_var_-824 to i8*, !insn.addr !46
call void @__asm_rep_stosq_memset(i8* nonnull %5, i64 0, i64 100), !insn.addr !46
%6 = add i64 %0, -816, !insn.addr !47
store i64 0, i64* %storemerge1.reg2mem
br label %dec_label_pc_280
dec_label_pc_280: ; preds = %dec_label_pc_280, %dec_label_pc_173
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%7 = mul i64 %storemerge1.reload, 8, !insn.addr !48
%8 = add i64 %7, %4, !insn.addr !49
%9 = add i64 %6, %7, !insn.addr !47
%10 = inttoptr i64 %9 to i64*, !insn.addr !47
%11 = load i64, i64* %10, align 8, !insn.addr !47
%12 = inttoptr i64 %8 to i64*, !insn.addr !50
store i64 %11, i64* %12, align 8, !insn.addr !50
%13 = add nuw nsw i64 %storemerge1.reload, 1, !insn.addr !51
%exitcond = icmp eq i64 %13, 100
store i64 %13, i64* %storemerge1.reg2mem, !insn.addr !52
br i1 %exitcond, label %dec_label_pc_2bd, label %dec_label_pc_280, !insn.addr !52
dec_label_pc_2bd: ; preds = %dec_label_pc_280
%14 = inttoptr i64 %4 to i64*, !insn.addr !53
%15 = load i64, i64* %14, align 16, !insn.addr !53
%16 = call i64 @printLongLongLine(i64 %15), !insn.addr !54
%17 = call i64 @__readfsqword(i64 40), !insn.addr !55
%18 = icmp eq i64 %2, %17, !insn.addr !55
store i64 0, i64* %rax.0.reg2mem, !insn.addr !56
br i1 %18, label %dec_label_pc_2e4, label %dec_label_pc_2df, !insn.addr !56
dec_label_pc_2df: ; preds = %dec_label_pc_2bd
%19 = call i64 @__stack_chk_fail(), !insn.addr !57
store i64 %19, i64* %rax.0.reg2mem, !insn.addr !57
br label %dec_label_pc_2e4, !insn.addr !57
dec_label_pc_2e4: ; preds = %dec_label_pc_2df, %dec_label_pc_2bd
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !58
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_32_good() local_unnamed_addr {
dec_label_pc_2e6:
%0 = call i64 @goodG2B(), !insn.addr !59
ret i64 %0, !insn.addr !60
}
declare i64 @printLongLongLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare void @__asm_rep_stosq_memset(i8*, i64, i64) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 11}
!1 = !{i64 26}
!2 = !{i64 33}
!3 = !{i64 48}
!4 = !{i64 86}
!5 = !{i64 92}
!6 = !{i64 96}
!7 = !{i64 104}
!8 = !{i64 149}
!9 = !{i64 153}
!10 = !{i64 161}
!11 = !{i64 168}
!12 = !{i64 175}
!13 = !{i64 178}
!14 = !{i64 185}
!15 = !{i64 192}
!16 = !{i64 199}
!17 = !{i64 213}
!18 = !{i64 216}
!19 = !{i64 223}
!20 = !{i64 226}
!21 = !{i64 233}
!22 = !{i64 253}
!23 = !{i64 256}
!24 = !{i64 276}
!25 = !{i64 284}
!26 = !{i64 291}
!27 = !{i64 301}
!28 = !{i64 309}
!29 = !{i64 312}
!30 = !{i64 328}
!31 = !{i64 330}
!32 = !{i64 337}
!33 = !{i64 343}
!34 = !{i64 349}
!35 = !{i64 353}
!36 = !{i64 362}
!37 = !{i64 364}
!38 = !{i64 370}
!39 = !{i64 371}
!40 = !{i64 372}
!41 = !{i64 375}
!42 = !{i64 382}
!43 = !{i64 520}
!44 = !{i64 524}
!45 = !{i64 584}
!46 = !{i64 624}
!47 = !{i64 672}
!48 = !{i64 647}
!49 = !{i64 662}
!50 = !{i64 680}
!51 = !{i64 683}
!52 = !{i64 699}
!53 = !{i64 708}
!54 = !{i64 714}
!55 = !{i64 724}
!56 = !{i64 733}
!57 = !{i64 735}
!58 = !{i64 741}
!59 = !{i64 751}
!60 = !{i64 758}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_32_bad() #0 {
entry:
%data = alloca i64*, align 8
%dataPtr1 = alloca i64**, align 8
%dataPtr2 = alloca i64**, align 8
%dataBadBuffer = alloca i64*, align 8
%dataGoodBuffer = alloca i64*, align 8
%data1 = alloca i64*, align 8
%data2 = alloca i64*, align 8
%source = alloca [100 x i64], align 16
%i = alloca i64, align 8
store i64** %data, i64*** %dataPtr1, align 8
store i64** %data, i64*** %dataPtr2, align 8
%0 = alloca i8, i64 400, align 16
%1 = bitcast i8* %0 to i64*
store i64* %1, i64** %dataBadBuffer, align 8
%2 = alloca i8, i64 800, align 16
%3 = bitcast i8* %2 to i64*
store i64* %3, i64** %dataGoodBuffer, align 8
%4 = load i64**, i64*** %dataPtr1, align 8
%5 = load i64*, i64** %4, align 8
store i64* %5, i64** %data1, align 8
%6 = load i64*, i64** %dataBadBuffer, align 8
store i64* %6, i64** %data1, align 8
%7 = load i64*, i64** %data1, align 8
%8 = load i64**, i64*** %dataPtr1, align 8
store i64* %7, i64** %8, align 8
%9 = load i64**, i64*** %dataPtr2, align 8
%10 = load i64*, i64** %9, align 8
store i64* %10, i64** %data2, align 8
%11 = bitcast [100 x i64]* %source to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %11, i8 0, i64 800, i1 false)
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %entry
%12 = load i64, i64* %i, align 8
%cmp = icmp ult i64 %12, 100
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%13 = load i64, i64* %i, align 8
%arrayidx = getelementptr inbounds [100 x i64], [100 x i64]* %source, i64 0, i64 %13
%14 = load i64, i64* %arrayidx, align 8
%15 = load i64*, i64** %data2, align 8
%16 = load i64, i64* %i, align 8
%arrayidx3 = getelementptr inbounds i64, i64* %15, i64 %16
store i64 %14, i64* %arrayidx3, align 8
br label %for.inc
for.inc: ; preds = %for.body
%17 = load i64, i64* %i, align 8
%inc = add i64 %17, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%18 = load i64*, i64** %data2, align 8
%arrayidx4 = getelementptr inbounds i64, i64* %18, i64 0
%19 = load i64, i64* %arrayidx4, align 8
call void @printLongLongLine(i64 %19)
ret void
}
; Function Attrs: argmemonly nounwind willreturn writeonly
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #1
declare dso_local void @printLongLongLine(i64) #2
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_alloca_loop_32_good() #0 {
entry:
call void @goodG2B()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B() #0 {
entry:
%data = alloca i64*, align 8
%dataPtr1 = alloca i64**, align 8
%dataPtr2 = alloca i64**, align 8
%dataBadBuffer = alloca i64*, align 8
%dataGoodBuffer = alloca i64*, align 8
%data1 = alloca i64*, align 8
%data2 = alloca i64*, align 8
%source = alloca [100 x i64], align 16
%i = alloca i64, align 8
store i64** %data, i64*** %dataPtr1, align 8
store i64** %data, i64*** %dataPtr2, align 8
%0 = alloca i8, i64 400, align 16
%1 = bitcast i8* %0 to i64*
store i64* %1, i64** %dataBadBuffer, align 8
%2 = alloca i8, i64 800, align 16
%3 = bitcast i8* %2 to i64*
store i64* %3, i64** %dataGoodBuffer, align 8
%4 = load i64**, i64*** %dataPtr1, align 8
%5 = load i64*, i64** %4, align 8
store i64* %5, i64** %data1, align 8
%6 = load i64*, i64** %dataGoodBuffer, align 8
store i64* %6, i64** %data1, align 8
%7 = load i64*, i64** %data1, align 8
%8 = load i64**, i64*** %dataPtr1, align 8
store i64* %7, i64** %8, align 8
%9 = load i64**, i64*** %dataPtr2, align 8
%10 = load i64*, i64** %9, align 8
store i64* %10, i64** %data2, align 8
%11 = bitcast [100 x i64]* %source to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %11, i8 0, i64 800, i1 false)
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %entry
%12 = load i64, i64* %i, align 8
%cmp = icmp ult i64 %12, 100
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%13 = load i64, i64* %i, align 8
%arrayidx = getelementptr inbounds [100 x i64], [100 x i64]* %source, i64 0, i64 %13
%14 = load i64, i64* %arrayidx, align 8
%15 = load i64*, i64** %data2, align 8
%16 = load i64, i64* %i, align 8
%arrayidx3 = getelementptr inbounds i64, i64* %15, i64 %16
store i64 %14, i64* %arrayidx3, align 8
br label %for.inc
for.inc: ; preds = %for.body
%17 = load i64, i64* %i, align 8
%inc = add i64 %17, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%18 = load i64*, i64** %data2, align 8
%arrayidx4 = getelementptr inbounds i64, i64* %18, i64 0
%19 = load i64, i64* %arrayidx4, align 8
call void @printLongLongLine(i64 %19)
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" }
attributes #1 = { argmemonly nounwind willreturn writeonly }
attributes #2 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_514 = local_unnamed_addr global i64 0
@global_var_35c = constant [16 x i8] c"fgets() failed.\00"
@global_var_36c = constant [32 x i8] c"ERROR: Array index is negative.\00"
@global_var_38c = constant [36 x i8] c"ERROR: Array index is out-of-bounds\00"
define i64 @_GLOBAL_OFFSET_TABLE_.1(i32* %arg1) local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
ret i64 0, !insn.addr !1
}
define i64 @function_30() local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !2
%1 = load i64, i64* %0
%2 = load i64, i64* @global_var_514, align 8, !insn.addr !2
%3 = add i64 %1, -22, !insn.addr !3
%4 = call i64 @fgets(i64 %3, i64 14, i64 %2), !insn.addr !4
%5 = icmp eq i64 %4, 0, !insn.addr !5
%6 = icmp eq i1 %5, false, !insn.addr !6
%7 = icmp eq i1 %6, false, !insn.addr !7
br i1 %7, label %dec_label_pc_68, label %dec_label_pc_52, !insn.addr !8
dec_label_pc_52: ; preds = %dec_label_pc_30
%8 = call i64 @atoi(i64 %3), !insn.addr !9
%9 = trunc i64 %8 to i32, !insn.addr !10
%10 = add i64 %1, -40, !insn.addr !11
%11 = inttoptr i64 %10 to i64*, !insn.addr !11
%12 = load i64, i64* %11, align 8, !insn.addr !11
%13 = inttoptr i64 %12 to i32*, !insn.addr !12
store i32 %9, i32* %13, align 4, !insn.addr !12
br label %dec_label_pc_74, !insn.addr !13
dec_label_pc_68: ; preds = %dec_label_pc_30
%14 = call i64 @printLine(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @global_var_35c, i64 0, i64 0)), !insn.addr !14
br label %dec_label_pc_74, !insn.addr !14
dec_label_pc_74: ; preds = %dec_label_pc_68, %dec_label_pc_52
%15 = add i64 %1, -8, !insn.addr !15
%16 = inttoptr i64 %15 to i64*, !insn.addr !15
%17 = load i64, i64* %16, align 8, !insn.addr !15
%18 = call i64 @__readfsqword(i64 40), !insn.addr !16
%19 = icmp eq i64 %17, %18, !insn.addr !16
store i64 0, i64* %rax.0.reg2mem, !insn.addr !17
br i1 %19, label %dec_label_pc_89, label %dec_label_pc_84, !insn.addr !17
dec_label_pc_84: ; preds = %dec_label_pc_74
%20 = call i64 @__stack_chk_fail(), !insn.addr !18
store i64 %20, i64* %rax.0.reg2mem, !insn.addr !18
br label %dec_label_pc_89, !insn.addr !18
dec_label_pc_89: ; preds = %dec_label_pc_84, %dec_label_pc_74
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !19
}
define i64 @_ZN51CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_433badEv() local_unnamed_addr {
dec_label_pc_8b:
%rax.0.reg2mem = alloca i64, !insn.addr !20
%indvars.iv.reg2mem = alloca i64, !insn.addr !20
%stack_var_-64 = alloca i32, align 4
%stack_var_-8 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !21
store i32 -1, i32* %stack_var_-64, align 4, !insn.addr !22
%1 = call i64 @_GLOBAL_OFFSET_TABLE_.1(i32* nonnull %stack_var_-64), !insn.addr !23
%2 = load i32, i32* %stack_var_-64, align 4, !insn.addr !24
%3 = icmp slt i32 %2, 0, !insn.addr !25
br i1 %3, label %dec_label_pc_114, label %dec_label_pc_e4, !insn.addr !26
dec_label_pc_e4: ; preds = %dec_label_pc_8b
%4 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !27
%5 = sext i32 %2 to i64, !insn.addr !28
%6 = mul i64 %5, 4, !insn.addr !29
%7 = add i64 %4, -48, !insn.addr !29
%8 = add i64 %6, %7, !insn.addr !29
%9 = inttoptr i64 %8 to i32*, !insn.addr !29
store i32 1, i32* %9, align 4, !insn.addr !29
store i64 0, i64* %indvars.iv.reg2mem
br label %dec_label_pc_fe
dec_label_pc_fe: ; preds = %dec_label_pc_e4, %dec_label_pc_fe
%indvars.iv.reload = load i64, i64* %indvars.iv.reg2mem
%10 = mul i64 %indvars.iv.reload, 4, !insn.addr !30
%11 = add i64 %10, %7, !insn.addr !30
%12 = inttoptr i64 %11 to i32*, !insn.addr !30
%13 = load i32, i32* %12, align 4, !insn.addr !30
%14 = zext i32 %13 to i64, !insn.addr !31
%15 = call i64 @printIntLine(i64 %14), !insn.addr !32
%indvars.iv.next = add nuw nsw i64 %indvars.iv.reload, 1
%exitcond = icmp eq i64 %indvars.iv.next, 10
store i64 %indvars.iv.next, i64* %indvars.iv.reg2mem, !insn.addr !33
br i1 %exitcond, label %dec_label_pc_120, label %dec_label_pc_fe, !insn.addr !33
dec_label_pc_114: ; preds = %dec_label_pc_8b
%16 = call i64 @printLine(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @global_var_36c, i64 0, i64 0)), !insn.addr !34
br label %dec_label_pc_120, !insn.addr !34
dec_label_pc_120: ; preds = %dec_label_pc_fe, %dec_label_pc_114
%17 = call i64 @__readfsqword(i64 40), !insn.addr !35
%18 = icmp eq i64 %0, %17, !insn.addr !35
store i64 0, i64* %rax.0.reg2mem, !insn.addr !36
br i1 %18, label %dec_label_pc_135, label %dec_label_pc_130, !insn.addr !36
dec_label_pc_130: ; preds = %dec_label_pc_120
%19 = call i64 @__stack_chk_fail(), !insn.addr !37
store i64 %19, i64* %rax.0.reg2mem, !insn.addr !37
br label %dec_label_pc_135, !insn.addr !37
dec_label_pc_135: ; preds = %dec_label_pc_130, %dec_label_pc_120
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !38
}
define i64 @_ZN51CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_43L13goodG2BSourceERi(i32* %arg1) local_unnamed_addr {
dec_label_pc_137:
%0 = ptrtoint i32* %arg1 to i64
store i32 7, i32* %arg1, align 4, !insn.addr !39
ret i64 %0, !insn.addr !40
}
define i64 @_ZN51CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_43L7goodG2BEv() local_unnamed_addr {
dec_label_pc_14c:
%rax.0.reg2mem = alloca i64, !insn.addr !41
%indvars.iv.reg2mem = alloca i64, !insn.addr !41
%stack_var_-64 = alloca i32, align 4
%stack_var_-8 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !42
store i32 -1, i32* %stack_var_-64, align 4, !insn.addr !43
%1 = call i64 @_ZN51CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_43L13goodG2BSourceERi(i32* nonnull %stack_var_-64), !insn.addr !44
%2 = load i32, i32* %stack_var_-64, align 4, !insn.addr !45
%3 = icmp slt i32 %2, 0, !insn.addr !46
br i1 %3, label %dec_label_pc_1d5, label %dec_label_pc_1a5, !insn.addr !47
dec_label_pc_1a5: ; preds = %dec_label_pc_14c
%4 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !48
%5 = sext i32 %2 to i64, !insn.addr !49
%6 = mul i64 %5, 4, !insn.addr !50
%7 = add i64 %4, -48, !insn.addr !50
%8 = add i64 %6, %7, !insn.addr !50
%9 = inttoptr i64 %8 to i32*, !insn.addr !50
store i32 1, i32* %9, align 4, !insn.addr !50
store i64 0, i64* %indvars.iv.reg2mem
br label %dec_label_pc_1bf
dec_label_pc_1bf: ; preds = %dec_label_pc_1a5, %dec_label_pc_1bf
%indvars.iv.reload = load i64, i64* %indvars.iv.reg2mem
%10 = mul i64 %indvars.iv.reload, 4, !insn.addr !51
%11 = add i64 %10, %7, !insn.addr !51
%12 = inttoptr i64 %11 to i32*, !insn.addr !51
%13 = load i32, i32* %12, align 4, !insn.addr !51
%14 = zext i32 %13 to i64, !insn.addr !52
%15 = call i64 @printIntLine(i64 %14), !insn.addr !53
%indvars.iv.next = add nuw nsw i64 %indvars.iv.reload, 1
%exitcond = icmp eq i64 %indvars.iv.next, 10
store i64 %indvars.iv.next, i64* %indvars.iv.reg2mem, !insn.addr !54
br i1 %exitcond, label %dec_label_pc_1eb, label %dec_label_pc_1bf, !insn.addr !54
dec_label_pc_1d5: ; preds = %dec_label_pc_14c
%16 = call i64 @printLine(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @global_var_36c, i64 0, i64 0)), !insn.addr !55
br label %dec_label_pc_1eb, !insn.addr !56
dec_label_pc_1eb: ; preds = %dec_label_pc_1bf, %dec_label_pc_1d5
%17 = call i64 @__readfsqword(i64 40), !insn.addr !57
%18 = icmp eq i64 %0, %17, !insn.addr !57
store i64 0, i64* %rax.0.reg2mem, !insn.addr !58
br i1 %18, label %dec_label_pc_200, label %dec_label_pc_1fb, !insn.addr !58
dec_label_pc_1fb: ; preds = %dec_label_pc_1eb
%19 = call i64 @__stack_chk_fail(), !insn.addr !59
store i64 %19, i64* %rax.0.reg2mem, !insn.addr !59
br label %dec_label_pc_200, !insn.addr !59
dec_label_pc_200: ; preds = %dec_label_pc_1fb, %dec_label_pc_1eb
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !60
}
define i64 @_ZN51CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_43L13goodB2GSourceERi(i32* %arg1) local_unnamed_addr {
dec_label_pc_202:
%rax.0.reg2mem = alloca i64, !insn.addr !61
%stack_var_-30 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !62
store i64 0, i64* %stack_var_-30, align 8, !insn.addr !63
%1 = load i64, i64* @global_var_514, align 8, !insn.addr !64
%2 = ptrtoint i64* %stack_var_-30 to i64, !insn.addr !65
%3 = call i64 @fgets(i64 %2, i64 14, i64 %1), !insn.addr !66
%4 = icmp eq i64 %3, 0, !insn.addr !67
%5 = icmp eq i1 %4, false, !insn.addr !68
%6 = icmp eq i1 %5, false, !insn.addr !69
br i1 %6, label %dec_label_pc_26a, label %dec_label_pc_254, !insn.addr !70
dec_label_pc_254: ; preds = %dec_label_pc_202
%7 = call i64 @atoi(i64 %2), !insn.addr !71
%8 = trunc i64 %7 to i32, !insn.addr !72
store i32 %8, i32* %arg1, align 4, !insn.addr !73
br label %dec_label_pc_276, !insn.addr !74
dec_label_pc_26a: ; preds = %dec_label_pc_202
%9 = call i64 @printLine(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @global_var_35c, i64 0, i64 0)), !insn.addr !75
br label %dec_label_pc_276, !insn.addr !75
dec_label_pc_276: ; preds = %dec_label_pc_26a, %dec_label_pc_254
%10 = call i64 @__readfsqword(i64 40), !insn.addr !76
%11 = icmp eq i64 %0, %10, !insn.addr !76
store i64 0, i64* %rax.0.reg2mem, !insn.addr !77
br i1 %11, label %dec_label_pc_28b, label %dec_label_pc_286, !insn.addr !77
dec_label_pc_286: ; preds = %dec_label_pc_276
%12 = call i64 @__stack_chk_fail(), !insn.addr !78
store i64 %12, i64* %rax.0.reg2mem, !insn.addr !78
br label %dec_label_pc_28b, !insn.addr !78
dec_label_pc_28b: ; preds = %dec_label_pc_286, %dec_label_pc_276
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !79
}
define i64 @_ZN51CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_43L7goodB2GEv() local_unnamed_addr {
dec_label_pc_28d:
%rax.0.reg2mem = alloca i64, !insn.addr !80
%indvars.iv.reg2mem = alloca i64, !insn.addr !80
%stack_var_-64 = alloca i32, align 4
%stack_var_-8 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !81
store i32 -1, i32* %stack_var_-64, align 4, !insn.addr !82
%1 = call i64 @_ZN51CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_43L13goodB2GSourceERi(i32* nonnull %stack_var_-64), !insn.addr !83
%2 = load i32, i32* %stack_var_-64, align 4, !insn.addr !84
%3 = icmp ugt i32 %2, 9
br i1 %3, label %dec_label_pc_31e, label %dec_label_pc_2ee, !insn.addr !85
dec_label_pc_2ee: ; preds = %dec_label_pc_28d
%4 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !86
%5 = sext i32 %2 to i64, !insn.addr !87
%6 = mul i64 %5, 4, !insn.addr !88
%7 = add i64 %4, -48, !insn.addr !88
%8 = add i64 %6, %7, !insn.addr !88
%9 = inttoptr i64 %8 to i32*, !insn.addr !88
store i32 1, i32* %9, align 4, !insn.addr !88
store i64 0, i64* %indvars.iv.reg2mem
br label %dec_label_pc_308
dec_label_pc_308: ; preds = %dec_label_pc_2ee, %dec_label_pc_308
%indvars.iv.reload = load i64, i64* %indvars.iv.reg2mem
%10 = mul i64 %indvars.iv.reload, 4, !insn.addr !89
%11 = add i64 %10, %7, !insn.addr !89
%12 = inttoptr i64 %11 to i32*, !insn.addr !89
%13 = load i32, i32* %12, align 4, !insn.addr !89
%14 = zext i32 %13 to i64, !insn.addr !90
%15 = call i64 @printIntLine(i64 %14), !insn.addr !91
%indvars.iv.next = add nuw nsw i64 %indvars.iv.reload, 1
%exitcond = icmp eq i64 %indvars.iv.next, 10
store i64 %indvars.iv.next, i64* %indvars.iv.reg2mem, !insn.addr !92
br i1 %exitcond, label %dec_label_pc_32d, label %dec_label_pc_308, !insn.addr !92
dec_label_pc_31e: ; preds = %dec_label_pc_28d
%16 = call i64 @printLine(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @global_var_38c, i64 0, i64 0)), !insn.addr !93
br label %dec_label_pc_32d, !insn.addr !94
dec_label_pc_32d: ; preds = %dec_label_pc_308, %dec_label_pc_31e
%17 = call i64 @__readfsqword(i64 40), !insn.addr !95
%18 = icmp eq i64 %0, %17, !insn.addr !95
store i64 0, i64* %rax.0.reg2mem, !insn.addr !96
br i1 %18, label %dec_label_pc_342, label %dec_label_pc_33d, !insn.addr !96
dec_label_pc_33d: ; preds = %dec_label_pc_32d
%19 = call i64 @__stack_chk_fail(), !insn.addr !97
store i64 %19, i64* %rax.0.reg2mem, !insn.addr !97
br label %dec_label_pc_342, !insn.addr !97
dec_label_pc_342: ; preds = %dec_label_pc_33d, %dec_label_pc_32d
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !98
}
define i64 @_ZN51CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_434goodEv() local_unnamed_addr {
dec_label_pc_344:
%0 = call i64 @_ZN51CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_43L7goodG2BEv(), !insn.addr !99
%1 = call i64 @_ZN51CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_43L7goodB2GEv(), !insn.addr !100
ret i64 %1, !insn.addr !101
}
declare i64 @fgets(i64, i64, i64) local_unnamed_addr
declare i64 @atoi(i64) local_unnamed_addr
declare i64 @printLine(i8*) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @printIntLine(i64) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 12}
!1 = !{i64 27}
!2 = !{i64 48}
!3 = !{i64 55}
!4 = !{i64 67}
!5 = !{i64 72}
!6 = !{i64 75}
!7 = !{i64 78}
!8 = !{i64 80}
!9 = !{i64 89}
!10 = !{i64 94}
!11 = !{i64 96}
!12 = !{i64 100}
!13 = !{i64 102}
!14 = !{i64 111}
!15 = !{i64 117}
!16 = !{i64 121}
!17 = !{i64 130}
!18 = !{i64 132}
!19 = !{i64 138}
!20 = !{i64 139}
!21 = !{i64 147}
!22 = !{i64 162}
!23 = !{i64 176}
!24 = !{i64 221}
!25 = !{i64 224}
!26 = !{i64 226}
!27 = !{i64 140}
!28 = !{i64 231}
!29 = !{i64 233}
!30 = !{i64 259}
!31 = !{i64 263}
!32 = !{i64 265}
!33 = !{i64 252}
!34 = !{i64 283}
!35 = !{i64 293}
!36 = !{i64 302}
!37 = !{i64 304}
!38 = !{i64 310}
!39 = !{i64 323}
!40 = !{i64 331}
!41 = !{i64 332}
!42 = !{i64 340}
!43 = !{i64 355}
!44 = !{i64 369}
!45 = !{i64 414}
!46 = !{i64 417}
!47 = !{i64 419}
!48 = !{i64 333}
!49 = !{i64 424}
!50 = !{i64 426}
!51 = !{i64 452}
!52 = !{i64 456}
!53 = !{i64 458}
!54 = !{i64 445}
!55 = !{i64 476}
!56 = !{i64 481}
!57 = !{i64 496}
!58 = !{i64 505}
!59 = !{i64 507}
!60 = !{i64 513}
!61 = !{i64 514}
!62 = !{i64 526}
!63 = !{i64 541}
!64 = !{i64 562}
!65 = !{i64 578}
!66 = !{i64 581}
!67 = !{i64 586}
!68 = !{i64 589}
!69 = !{i64 592}
!70 = !{i64 594}
!71 = !{i64 603}
!72 = !{i64 608}
!73 = !{i64 614}
!74 = !{i64 616}
!75 = !{i64 625}
!76 = !{i64 635}
!77 = !{i64 644}
!78 = !{i64 646}
!79 = !{i64 652}
!80 = !{i64 653}
!81 = !{i64 661}
!82 = !{i64 676}
!83 = !{i64 690}
!84 = !{i64 735}
!85 = !{i64 740}
!86 = !{i64 654}
!87 = !{i64 753}
!88 = !{i64 755}
!89 = !{i64 781}
!90 = !{i64 785}
!91 = !{i64 787}
!92 = !{i64 774}
!93 = !{i64 805}
!94 = !{i64 810}
!95 = !{i64 818}
!96 = !{i64 827}
!97 = !{i64 829}
!98 = !{i64 835}
!99 = !{i64 840}
!100 = !{i64 845}
!101 = !{i64 852}
### Assistant: %struct._IO_FILE = type { i32, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, %struct._IO_marker*, %struct._IO_FILE*, i32, i32, i64, i16, i8, [1 x i8], i8*, i64, %struct._IO_codecvt*, %struct._IO_wide_data*, %struct._IO_FILE*, i8*, i64, i32, [20 x i8] }
%struct._IO_marker = type opaque
%struct._IO_codecvt = type opaque
%struct._IO_wide_data = type opaque
@.str = private unnamed_addr constant [32 x i8] c"ERROR: Array index is negative.\00", align 1
@stdin = external dso_local global %struct._IO_FILE*, align 8
@.str.1 = private unnamed_addr constant [16 x i8] c"fgets() failed.\00", align 1
@.str.2 = private unnamed_addr constant [36 x i8] c"ERROR: Array index is out-of-bounds\00", align 1
; Function Attrs: noinline optnone uwtable
define dso_local void @_ZN51CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_433badEv() #0 {
entry:
%data = alloca i32, align 4
%i = alloca i32, align 4
%buffer = alloca [10 x i32], align 16
store i32 -1, i32* %data, align 4
call void @_ZN51CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_43L9badSourceERi(i32* nonnull align 4 dereferenceable(4) %data)
%0 = bitcast [10 x i32]* %buffer to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %0, i8 0, i64 40, i1 false)
%1 = load i32, i32* %data, align 4
%cmp = icmp sge i32 %1, 0
br i1 %cmp, label %if.then, label %if.else
if.then: ; preds = %entry
%2 = load i32, i32* %data, align 4
%idxprom = sext i32 %2 to i64
%arrayidx = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom
store i32 1, i32* %arrayidx, align 4
store i32 0, i32* %i, align 4
br label %for.cond
for.cond: ; preds = %for.inc, %if.then
%3 = load i32, i32* %i, align 4
%cmp1 = icmp slt i32 %3, 10
br i1 %cmp1, label %for.body, label %for.end
for.body: ; preds = %for.cond
%4 = load i32, i32* %i, align 4
%idxprom2 = sext i32 %4 to i64
%arrayidx3 = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom2
%5 = load i32, i32* %arrayidx3, align 4
call void @printIntLine(i32 %5)
br label %for.inc
for.inc: ; preds = %for.body
%6 = load i32, i32* %i, align 4
%inc = add nsw i32 %6, 1
store i32 %inc, i32* %i, align 4
br label %for.cond
for.end: ; preds = %for.cond
br label %if.end
if.else: ; preds = %entry
call void @printLine(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %if.end
if.end: ; preds = %if.else, %for.end
ret void
}
; Function Attrs: noinline optnone uwtable
define internal void @_ZN51CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_43L9badSourceERi(i32* nonnull align 4 dereferenceable(4) %data) #0 {
entry:
%data.addr = alloca i32*, align 8
%inputBuffer = alloca [14 x i8], align 1
store i32* %data, i32** %data.addr, align 8
%0 = bitcast [14 x i8]* %inputBuffer to i8*
call void @llvm.memset.p0i8.i64(i8* align 1 %0, i8 0, i64 14, i1 false)
%arraydecay = getelementptr inbounds [14 x i8], [14 x i8]* %inputBuffer, i64 0, i64 0
%1 = load %struct._IO_FILE*, %struct._IO_FILE** @stdin, align 8
%call = call i8* @fgets(i8* %arraydecay, i32 14, %struct._IO_FILE* %1)
%cmp = icmp ne i8* %call, null
br i1 %cmp, label %if.then, label %if.else
if.then: ; preds = %entry
%arraydecay1 = getelementptr inbounds [14 x i8], [14 x i8]* %inputBuffer, i64 0, i64 0
%call2 = call i32 @atoi(i8* %arraydecay1) #5
%2 = load i32*, i32** %data.addr, align 8
store i32 %call2, i32* %2, align 4
br label %if.end
if.else: ; preds = %entry
call void @printLine(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
br label %if.end
if.end: ; preds = %if.else, %if.then
ret void
}
; Function Attrs: argmemonly nounwind willreturn writeonly
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #1
declare dso_local void @printIntLine(i32) #2
declare dso_local void @printLine(i8*) #2
; Function Attrs: noinline optnone uwtable
define dso_local void @_ZN51CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_434goodEv() #0 {
entry:
call void @_ZN51CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_43L7goodG2BEv()
call void @_ZN51CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_43L7goodB2GEv()
ret void
}
; Function Attrs: noinline optnone uwtable
define internal void @_ZN51CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_43L7goodG2BEv() #0 {
entry:
%data = alloca i32, align 4
%i = alloca i32, align 4
%buffer = alloca [10 x i32], align 16
store i32 -1, i32* %data, align 4
call void @_ZN51CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_43L13goodG2BSourceERi(i32* nonnull align 4 dereferenceable(4) %data)
%0 = bitcast [10 x i32]* %buffer to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %0, i8 0, i64 40, i1 false)
%1 = load i32, i32* %data, align 4
%cmp = icmp sge i32 %1, 0
br i1 %cmp, label %if.then, label %if.else
if.then: ; preds = %entry
%2 = load i32, i32* %data, align 4
%idxprom = sext i32 %2 to i64
%arrayidx = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom
store i32 1, i32* %arrayidx, align 4
store i32 0, i32* %i, align 4
br label %for.cond
for.cond: ; preds = %for.inc, %if.then
%3 = load i32, i32* %i, align 4
%cmp1 = icmp slt i32 %3, 10
br i1 %cmp1, label %for.body, label %for.end
for.body: ; preds = %for.cond
%4 = load i32, i32* %i, align 4
%idxprom2 = sext i32 %4 to i64
%arrayidx3 = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom2
%5 = load i32, i32* %arrayidx3, align 4
call void @printIntLine(i32 %5)
br label %for.inc
for.inc: ; preds = %for.body
%6 = load i32, i32* %i, align 4
%inc = add nsw i32 %6, 1
store i32 %inc, i32* %i, align 4
br label %for.cond
for.end: ; preds = %for.cond
br label %if.end
if.else: ; preds = %entry
call void @printLine(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %if.end
if.end: ; preds = %if.else, %for.end
ret void
}
; Function Attrs: noinline optnone uwtable
define internal void @_ZN51CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_43L7goodB2GEv() #0 {
entry:
%data = alloca i32, align 4
%i = alloca i32, align 4
%buffer = alloca [10 x i32], align 16
store i32 -1, i32* %data, align 4
call void @_ZN51CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_43L13goodB2GSourceERi(i32* nonnull align 4 dereferenceable(4) %data)
%0 = bitcast [10 x i32]* %buffer to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %0, i8 0, i64 40, i1 false)
%1 = load i32, i32* %data, align 4
%cmp = icmp sge i32 %1, 0
br i1 %cmp, label %land.lhs.true, label %if.else
land.lhs.true: ; preds = %entry
%2 = load i32, i32* %data, align 4
%cmp1 = icmp slt i32 %2, 10
br i1 %cmp1, label %if.then, label %if.else
if.then: ; preds = %land.lhs.true
%3 = load i32, i32* %data, align 4
%idxprom = sext i32 %3 to i64
%arrayidx = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom
store i32 1, i32* %arrayidx, align 4
store i32 0, i32* %i, align 4
br label %for.cond
for.cond: ; preds = %for.inc, %if.then
%4 = load i32, i32* %i, align 4
%cmp2 = icmp slt i32 %4, 10
br i1 %cmp2, label %for.body, label %for.end
for.body: ; preds = %for.cond
%5 = load i32, i32* %i, align 4
%idxprom3 = sext i32 %5 to i64
%arrayidx4 = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom3
%6 = load i32, i32* %arrayidx4, align 4
call void @printIntLine(i32 %6)
br label %for.inc
for.inc: ; preds = %for.body
%7 = load i32, i32* %i, align 4
%inc = add nsw i32 %7, 1
store i32 %inc, i32* %i, align 4
br label %for.cond
for.end: ; preds = %for.cond
br label %if.end
if.else: ; preds = %land.lhs.true, %entry
call void @printLine(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
br label %if.end
if.end: ; preds = %if.else, %for.end
ret void
}
declare dso_local i8* @fgets(i8*, i32, %struct._IO_FILE*) #2
; Function Attrs: nounwind readonly
declare dso_local i32 @atoi(i8*) #3
; Function Attrs: noinline nounwind optnone uwtable
define internal void @_ZN51CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_43L13goodG2BSourceERi(i32* nonnull align 4 dereferenceable(4) %data) #4 {
entry:
%data.addr = alloca i32*, align 8
store i32* %data, i32** %data.addr, align 8
%0 = load i32*, i32** %data.addr, align 8
store i32 7, i32* %0, align 4
ret void
}
; Function Attrs: noinline optnone uwtable
define internal void @_ZN51CWE121_Stack_Based_Buffer_Overflow__CWE129_fgets_43L13goodB2GSourceERi(i32* nonnull align 4 dereferenceable(4) %data) #0 {
entry:
%data.addr = alloca i32*, align 8
%inputBuffer = alloca [14 x i8], align 1
store i32* %data, i32** %data.addr, align 8
%0 = bitcast [14 x i8]* %inputBuffer to i8*
call void @llvm.memset.p0i8.i64(i8* align 1 %0, i8 0, i64 14, i1 false)
%arraydecay = getelementptr inbounds [14 x i8], [14 x i8]* %inputBuffer, i64 0, i64 0
%1 = load %struct._IO_FILE*, %struct._IO_FILE** @stdin, align 8
%call = call i8* @fgets(i8* %arraydecay, i32 14, %struct._IO_FILE* %1)
%cmp = icmp ne i8* %call, null
br i1 %cmp, label %if.then, label %if.else
if.then: ; preds = %entry
%arraydecay1 = getelementptr inbounds [14 x i8], [14 x i8]* %inputBuffer, i64 0, i64 0
%call2 = call i32 @atoi(i8* %arraydecay1) #5
%2 = load i32*, i32** %data.addr, align 8
store i32 %call2, i32* %2, align 4
br label %if.end
if.else: ; preds = %entry
call void @printLine(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
br label %if.end
if.end: ; preds = %if.else, %if.then
ret void
}
attributes #0 = { noinline 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" }
attributes #1 = { argmemonly nounwind willreturn writeonly }
attributes #2 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #3 = { nounwind readonly "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #4 = { 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" }
attributes #5 = { nounwind readonly }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
define i64 @_GLOBAL_OFFSET_TABLE_.1(i64 %arg1) local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_memcpy_52c_badSink(i64 %arg1), !insn.addr !0
ret i64 %0, !insn.addr !1
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_memcpy_52b_goodG2BSink(i64 %arg1) local_unnamed_addr {
dec_label_pc_1b:
%0 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_memcpy_52c_goodG2BSink(i64 %arg1), !insn.addr !2
ret i64 %0, !insn.addr !3
}
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_memcpy_52c_badSink(i64) local_unnamed_addr
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_memcpy_52c_goodG2BSink(i64) local_unnamed_addr
!0 = !{i64 19}
!1 = !{i64 26}
!2 = !{i64 46}
!3 = !{i64 53}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_memcpy_52b_badSink(i32* %data) #0 {
entry:
%data.addr = alloca i32*, align 8
store i32* %data, i32** %data.addr, align 8
%0 = load i32*, i32** %data.addr, align 8
call void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_memcpy_52c_badSink(i32* %0)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_memcpy_52c_badSink(i32*) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_memcpy_52b_goodG2BSink(i32* %data) #0 {
entry:
%data.addr = alloca i32*, align 8
store i32* %data, i32** %data.addr, align 8
%0 = load i32*, i32** %data.addr, align 8
call void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_memcpy_52c_goodG2BSink(i32* %0)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_memcpy_52c_goodG2BSink(i32*) #1
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" }
attributes #1 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_10 = constant [3 x i8] c"%(\00"
define i64 @_GLOBAL_OFFSET_TABLE_.1(i64 %arg1) local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
%1 = inttoptr i64 %arg1 to i64*, !insn.addr !1
%2 = call i64 @_ZNSt7__cxx114listIPcSaIS1_EE4backEv(i64* %1), !insn.addr !1
ret i64 %2, !insn.addr !1
}
define i64 @function_30() local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !2
%1 = load i64, i64* %0
%2 = add i64 %1, -19, !insn.addr !2
%3 = inttoptr i64 %2 to i64*, !insn.addr !2
%4 = add i64 %1, -11, !insn.addr !3
%5 = inttoptr i64 %4 to i16*, !insn.addr !3
store i16 16705, i16* %5, align 2, !insn.addr !3
%6 = add i64 %1, -9, !insn.addr !4
%7 = inttoptr i64 %6 to i8*, !insn.addr !4
store i8 0, i8* %7, align 1, !insn.addr !4
%8 = add i64 %1, -32, !insn.addr !5
%9 = inttoptr i64 %8 to i64*, !insn.addr !5
%10 = load i64, i64* %9, align 8, !insn.addr !5
%11 = call i64 @strcpy(i64 %10, i64 %2, i64 %2), !insn.addr !6
%12 = load i64, i64* %9, align 8, !insn.addr !7
%13 = call i64 @printLine(i64 %12), !insn.addr !8
%14 = add i64 %1, -8, !insn.addr !9
%15 = inttoptr i64 %14 to i64*, !insn.addr !9
%16 = load i64, i64* %15, align 8, !insn.addr !9
%17 = call i64 @__readfsqword(i64 40), !insn.addr !10
%18 = icmp eq i64 %16, %17, !insn.addr !10
store i64 0, i64* %rax.0.reg2mem, !insn.addr !11
br i1 %18, label %dec_label_pc_7a, label %dec_label_pc_75, !insn.addr !11
dec_label_pc_75: ; preds = %dec_label_pc_30
%19 = call i64 @__stack_chk_fail(), !insn.addr !12
store i64 %19, i64* %rax.0.reg2mem, !insn.addr !12
br label %dec_label_pc_7a, !insn.addr !12
dec_label_pc_7a: ; preds = %dec_label_pc_75, %dec_label_pc_30
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !13
}
define i64 @_ZN62CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_cpy_7311goodG2BSinkENSt7__cxx114listIPcSaIS2_EEE(i64 %arg1) local_unnamed_addr {
dec_label_pc_7c:
%rax.0.reg2mem = alloca i64, !insn.addr !14
%stack_var_-27 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !15
%1 = inttoptr i64 %arg1 to i64*, !insn.addr !16
%2 = call i64 @_ZNSt7__cxx114listIPcSaIS1_EE4backEv(i64* %1), !insn.addr !16
%3 = inttoptr i64 %2 to i64*, !insn.addr !17
%4 = load i64, i64* %3, align 8, !insn.addr !17
store i64 4702111234474983745, i64* %stack_var_-27, align 8, !insn.addr !18
%5 = ptrtoint i64* %stack_var_-27 to i64, !insn.addr !19
%6 = call i64 @strcpy(i64 %4, i64 %5, i64 %5), !insn.addr !20
%7 = call i64 @printLine(i64 %4), !insn.addr !21
%8 = call i64 @__readfsqword(i64 40), !insn.addr !22
%9 = icmp eq i64 %0, %8, !insn.addr !22
store i64 0, i64* %rax.0.reg2mem, !insn.addr !23
br i1 %9, label %dec_label_pc_f6, label %dec_label_pc_f1, !insn.addr !23
dec_label_pc_f1: ; preds = %dec_label_pc_7c
%10 = call i64 @__stack_chk_fail(), !insn.addr !24
store i64 %10, i64* %rax.0.reg2mem, !insn.addr !24
br label %dec_label_pc_f6, !insn.addr !24
dec_label_pc_f6: ; preds = %dec_label_pc_f1, %dec_label_pc_7c
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !25
}
define i64 @_ZNSt7__cxx114listIPcSaIS1_EE4backEv(i64* %result) local_unnamed_addr {
dec_label_pc_fa:
%rax.0.reg2mem = alloca i64, !insn.addr !26
%stack_var_-24 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !27
%1 = call i64 @_ZNSt7__cxx114listIPcSaIS1_EE3endEv(i64* %result), !insn.addr !28
store i64 %1, i64* %stack_var_-24, align 8, !insn.addr !29
%2 = call i64 @_ZNSt14_List_iteratorIPcEmmEv(i64* nonnull %stack_var_-24), !insn.addr !30
%3 = call i64 @_ZNKSt14_List_iteratorIPcEdeEv(i64* nonnull %stack_var_-24), !insn.addr !31
%4 = call i64 @__readfsqword(i64 40), !insn.addr !32
%5 = icmp eq i64 %0, %4, !insn.addr !32
store i64 %3, i64* %rax.0.reg2mem, !insn.addr !33
br i1 %5, label %dec_label_pc_151, label %dec_label_pc_14c, !insn.addr !33
dec_label_pc_14c: ; preds = %dec_label_pc_fa
%6 = call i64 @__stack_chk_fail(), !insn.addr !34
store i64 %6, i64* %rax.0.reg2mem, !insn.addr !34
br label %dec_label_pc_151, !insn.addr !34
dec_label_pc_151: ; preds = %dec_label_pc_14c, %dec_label_pc_fa
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !35
}
define i64 @_ZNSt7__cxx114listIPcSaIS1_EE3endEv(i64* %result) local_unnamed_addr {
dec_label_pc_154:
%rax.0.reg2mem = alloca i64, !insn.addr !36
%stack_var_-24 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !37
%1 = call i64 @_ZNSt14_List_iteratorIPcEC1EPNSt8__detail15_List_node_baseE(i64* nonnull %stack_var_-24, i64* %result), !insn.addr !38
%2 = load i64, i64* %stack_var_-24, align 8, !insn.addr !39
%3 = call i64 @__readfsqword(i64 40), !insn.addr !40
%4 = icmp eq i64 %0, %3, !insn.addr !40
store i64 %2, i64* %rax.0.reg2mem, !insn.addr !41
br i1 %4, label %dec_label_pc_19a, label %dec_label_pc_195, !insn.addr !41
dec_label_pc_195: ; preds = %dec_label_pc_154
%5 = call i64 @__stack_chk_fail(), !insn.addr !42
store i64 %5, i64* %rax.0.reg2mem, !insn.addr !42
br label %dec_label_pc_19a, !insn.addr !42
dec_label_pc_19a: ; preds = %dec_label_pc_195, %dec_label_pc_154
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !43
}
define i64 @_ZNSt14_List_iteratorIPcEmmEv(i64* %result) local_unnamed_addr {
dec_label_pc_19c:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 8, !insn.addr !44
%2 = inttoptr i64 %1 to i64*, !insn.addr !44
%3 = load i64, i64* %2, align 8, !insn.addr !44
store i64 %3, i64* %result, align 8, !insn.addr !45
ret i64 %0, !insn.addr !46
}
define i64 @_ZNKSt14_List_iteratorIPcEdeEv(i64* %result) local_unnamed_addr {
dec_label_pc_1bc:
%0 = call i64 @_ZNSt10_List_nodeIPcE9_M_valptrEv(i64* %result), !insn.addr !47
ret i64 %0, !insn.addr !48
}
define i64 @_ZNSt14_List_iteratorIPcEC1EPNSt8__detail15_List_node_baseE(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_1da:
%0 = ptrtoint i64* %arg2 to i64
%1 = ptrtoint i64* %result to i64
store i64 %0, i64* %result, align 8, !insn.addr !49
ret i64 %1, !insn.addr !50
}
define i64 @_ZNSt10_List_nodeIPcE9_M_valptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_1f4:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, ptrtoint ([3 x i8]* @global_var_10 to i64), !insn.addr !51
%2 = inttoptr i64 %1 to i64*, !insn.addr !52
%3 = call i64 @_ZN9__gnu_cxx16__aligned_membufIPcE6_M_ptrEv(i64* %2), !insn.addr !52
ret i64 %3, !insn.addr !53
}
define i64 @_ZN9__gnu_cxx16__aligned_membufIPcE6_M_ptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_212:
%0 = call i64 @_ZN9__gnu_cxx16__aligned_membufIPcE7_M_addrEv(i64* %result), !insn.addr !54
ret i64 %0, !insn.addr !55
}
define i64 @_ZN9__gnu_cxx16__aligned_membufIPcE7_M_addrEv(i64* %result) local_unnamed_addr {
dec_label_pc_22c:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !56
}
declare i64 @strcpy(i64, i64, i64) local_unnamed_addr
declare i64 @printLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 12}
!1 = !{i64 34}
!2 = !{i64 48}
!3 = !{i64 60}
!4 = !{i64 66}
!5 = !{i64 74}
!6 = !{i64 84}
!7 = !{i64 89}
!8 = !{i64 96}
!9 = !{i64 102}
!10 = !{i64 106}
!11 = !{i64 115}
!12 = !{i64 117}
!13 = !{i64 123}
!14 = !{i64 124}
!15 = !{i64 136}
!16 = !{i64 158}
!17 = !{i64 163}
!18 = !{i64 180}
!19 = !{i64 194}
!20 = !{i64 208}
!21 = !{i64 220}
!22 = !{i64 230}
!23 = !{i64 239}
!24 = !{i64 241}
!25 = !{i64 247}
!26 = !{i64 250}
!27 = !{i64 262}
!28 = !{i64 284}
!29 = !{i64 289}
!30 = !{i64 300}
!31 = !{i64 312}
!32 = !{i64 321}
!33 = !{i64 330}
!34 = !{i64 332}
!35 = !{i64 338}
!36 = !{i64 340}
!37 = !{i64 352}
!38 = !{i64 381}
!39 = !{i64 386}
!40 = !{i64 394}
!41 = !{i64 403}
!42 = !{i64 405}
!43 = !{i64 411}
!44 = !{i64 427}
!45 = !{i64 435}
!46 = !{i64 443}
!47 = !{i64 466}
!48 = !{i64 472}
!49 = !{i64 494}
!50 = !{i64 499}
!51 = !{i64 516}
!52 = !{i64 523}
!53 = !{i64 529}
!54 = !{i64 549}
!55 = !{i64 555}
!56 = !{i64 569}
### Assistant: %"class.std::__cxx11::list" = type { %"class.std::__cxx11::_List_base" }
%"class.std::__cxx11::_List_base" = type { %"struct.std::__cxx11::_List_base<char *, std::allocator<char *>>::_List_impl" }
%"struct.std::__cxx11::_List_base<char *, std::allocator<char *>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"* }
%"struct.std::_List_iterator" = type { %"struct.std::__detail::_List_node_base"* }
%"struct.std::_List_node" = type { %"struct.std::__detail::_List_node_base", %"struct.__gnu_cxx::__aligned_membuf" }
%"struct.__gnu_cxx::__aligned_membuf" = type { [8 x i8] }
$_ZNSt7__cxx114listIPcSaIS1_EE4backEv = comdat any
$_ZNSt7__cxx114listIPcSaIS1_EE3endEv = comdat any
$_ZNSt14_List_iteratorIPcEmmEv = comdat any
$_ZNKSt14_List_iteratorIPcEdeEv = comdat any
$_ZNSt14_List_iteratorIPcEC2EPNSt8__detail15_List_node_baseE = comdat any
$_ZNSt10_List_nodeIPcE9_M_valptrEv = comdat any
$__clang_call_terminate = comdat any
$_ZN9__gnu_cxx16__aligned_membufIPcE6_M_ptrEv = comdat any
$_ZN9__gnu_cxx16__aligned_membufIPcE7_M_addrEv = comdat any
@__const._ZN62CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_cpy_737badSinkENSt7__cxx114listIPcSaIS2_EEE.source = private unnamed_addr constant [11 x i8] c"AAAAAAAAAA\00", align 1
@__const._ZN62CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_cpy_7311goodG2BSinkENSt7__cxx114listIPcSaIS2_EEE.source = private unnamed_addr constant [11 x i8] c"AAAAAAAAAA\00", align 1
; Function Attrs: noinline optnone uwtable
define dso_local void @_ZN62CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_cpy_737badSinkENSt7__cxx114listIPcSaIS2_EEE(%"class.std::__cxx11::list"* %dataList) #0 {
entry:
%data = alloca i8*, align 8
%source = alloca [11 x i8], align 1
%call = call nonnull align 8 dereferenceable(8) i8** @_ZNSt7__cxx114listIPcSaIS1_EE4backEv(%"class.std::__cxx11::list"* %dataList) #6
%0 = load i8*, i8** %call, align 8
store i8* %0, i8** %data, align 8
%1 = bitcast [11 x i8]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %1, i8* align 1 getelementptr inbounds ([11 x i8], [11 x i8]* @__const._ZN62CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_cpy_737badSinkENSt7__cxx114listIPcSaIS2_EEE.source, i32 0, i32 0), i64 11, i1 false)
%2 = load i8*, i8** %data, align 8
%arraydecay = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%call1 = call i8* @strcpy(i8* %2, i8* %arraydecay) #6
%3 = load i8*, i8** %data, align 8
call void @printLine(i8* %3)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) i8** @_ZNSt7__cxx114listIPcSaIS1_EE4backEv(%"class.std::__cxx11::list"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::__cxx11::list"*, align 8
%__tmp = alloca %"struct.std::_List_iterator", align 8
store %"class.std::__cxx11::list"* %this, %"class.std::__cxx11::list"** %this.addr, align 8
%this1 = load %"class.std::__cxx11::list"*, %"class.std::__cxx11::list"** %this.addr, align 8
%call = call %"struct.std::__detail::_List_node_base"* @_ZNSt7__cxx114listIPcSaIS1_EE3endEv(%"class.std::__cxx11::list"* %this1) #6
%coerce.dive = getelementptr inbounds %"struct.std::_List_iterator", %"struct.std::_List_iterator"* %__tmp, i32 0, i32 0
store %"struct.std::__detail::_List_node_base"* %call, %"struct.std::__detail::_List_node_base"** %coerce.dive, align 8
%call2 = call nonnull align 8 dereferenceable(8) %"struct.std::_List_iterator"* @_ZNSt14_List_iteratorIPcEmmEv(%"struct.std::_List_iterator"* %__tmp) #6
%call3 = call nonnull align 8 dereferenceable(8) i8** @_ZNKSt14_List_iteratorIPcEdeEv(%"struct.std::_List_iterator"* %__tmp) #6
ret i8** %call3
}
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #2
; Function Attrs: nounwind
declare dso_local i8* @strcpy(i8*, i8*) #3
declare dso_local void @printLine(i8*) #4
; Function Attrs: noinline optnone uwtable
define dso_local void @_ZN62CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_cpy_7311goodG2BSinkENSt7__cxx114listIPcSaIS2_EEE(%"class.std::__cxx11::list"* %dataList) #0 {
entry:
%data = alloca i8*, align 8
%source = alloca [11 x i8], align 1
%call = call nonnull align 8 dereferenceable(8) i8** @_ZNSt7__cxx114listIPcSaIS1_EE4backEv(%"class.std::__cxx11::list"* %dataList) #6
%0 = load i8*, i8** %call, align 8
store i8* %0, i8** %data, align 8
%1 = bitcast [11 x i8]* %source to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %1, i8* align 1 getelementptr inbounds ([11 x i8], [11 x i8]* @__const._ZN62CWE121_Stack_Based_Buffer_Overflow__CWE193_char_declare_cpy_7311goodG2BSinkENSt7__cxx114listIPcSaIS2_EEE.source, i32 0, i32 0), i64 11, i1 false)
%2 = load i8*, i8** %data, align 8
%arraydecay = getelementptr inbounds [11 x i8], [11 x i8]* %source, i64 0, i64 0
%call1 = call i8* @strcpy(i8* %2, i8* %arraydecay) #6
%3 = load i8*, i8** %data, align 8
call void @printLine(i8* %3)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::__detail::_List_node_base"* @_ZNSt7__cxx114listIPcSaIS1_EE3endEv(%"class.std::__cxx11::list"* %this) #1 comdat align 2 {
entry:
%retval = alloca %"struct.std::_List_iterator", align 8
%this.addr = alloca %"class.std::__cxx11::list"*, align 8
store %"class.std::__cxx11::list"* %this, %"class.std::__cxx11::list"** %this.addr, align 8
%this1 = load %"class.std::__cxx11::list"*, %"class.std::__cxx11::list"** %this.addr, align 8
%0 = bitcast %"class.std::__cxx11::list"* %this1 to %"class.std::__cxx11::_List_base"*
%_M_impl = getelementptr inbounds %"class.std::__cxx11::_List_base", %"class.std::__cxx11::_List_base"* %0, i32 0, i32 0
%_M_node = getelementptr inbounds %"struct.std::__cxx11::_List_base<char *, std::allocator<char *>>::_List_impl", %"struct.std::__cxx11::_List_base<char *, std::allocator<char *>>::_List_impl"* %_M_impl, i32 0, i32 0
%1 = bitcast %"struct.std::__detail::_List_node_header"* %_M_node to %"struct.std::__detail::_List_node_base"*
call void @_ZNSt14_List_iteratorIPcEC2EPNSt8__detail15_List_node_baseE(%"struct.std::_List_iterator"* %retval, %"struct.std::__detail::_List_node_base"* %1) #6
%coerce.dive = getelementptr inbounds %"struct.std::_List_iterator", %"struct.std::_List_iterator"* %retval, i32 0, i32 0
%2 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %coerce.dive, align 8
ret %"struct.std::__detail::_List_node_base"* %2
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) %"struct.std::_List_iterator"* @_ZNSt14_List_iteratorIPcEmmEv(%"struct.std::_List_iterator"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_List_iterator"*, align 8
store %"struct.std::_List_iterator"* %this, %"struct.std::_List_iterator"** %this.addr, align 8
%this1 = load %"struct.std::_List_iterator"*, %"struct.std::_List_iterator"** %this.addr, align 8
%_M_node = getelementptr inbounds %"struct.std::_List_iterator", %"struct.std::_List_iterator"* %this1, i32 0, i32 0
%0 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %_M_node, align 8
%_M_prev = getelementptr inbounds %"struct.std::__detail::_List_node_base", %"struct.std::__detail::_List_node_base"* %0, i32 0, i32 1
%1 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %_M_prev, align 8
%_M_node2 = getelementptr inbounds %"struct.std::_List_iterator", %"struct.std::_List_iterator"* %this1, i32 0, i32 0
store %"struct.std::__detail::_List_node_base"* %1, %"struct.std::__detail::_List_node_base"** %_M_node2, align 8
ret %"struct.std::_List_iterator"* %this1
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) i8** @_ZNKSt14_List_iteratorIPcEdeEv(%"struct.std::_List_iterator"* %this) #1 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%this.addr = alloca %"struct.std::_List_iterator"*, align 8
store %"struct.std::_List_iterator"* %this, %"struct.std::_List_iterator"** %this.addr, align 8
%this1 = load %"struct.std::_List_iterator"*, %"struct.std::_List_iterator"** %this.addr, align 8
%_M_node = getelementptr inbounds %"struct.std::_List_iterator", %"struct.std::_List_iterator"* %this1, i32 0, i32 0
%0 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %_M_node, align 8
%1 = bitcast %"struct.std::__detail::_List_node_base"* %0 to %"struct.std::_List_node"*
%call = invoke i8** @_ZNSt10_List_nodeIPcE9_M_valptrEv(%"struct.std::_List_node"* %1)
to label %invoke.cont unwind label %terminate.lpad
invoke.cont: ; preds = %entry
ret i8** %call
terminate.lpad: ; preds = %entry
%2 = landingpad { i8*, i32 }
catch i8* null
%3 = extractvalue { i8*, i32 } %2, 0
call void @__clang_call_terminate(i8* %3) #7
unreachable
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt14_List_iteratorIPcEC2EPNSt8__detail15_List_node_baseE(%"struct.std::_List_iterator"* %this, %"struct.std::__detail::_List_node_base"* %__x) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_List_iterator"*, align 8
%__x.addr = alloca %"struct.std::__detail::_List_node_base"*, align 8
store %"struct.std::_List_iterator"* %this, %"struct.std::_List_iterator"** %this.addr, align 8
store %"struct.std::__detail::_List_node_base"* %__x, %"struct.std::__detail::_List_node_base"** %__x.addr, align 8
%this1 = load %"struct.std::_List_iterator"*, %"struct.std::_List_iterator"** %this.addr, align 8
%_M_node = getelementptr inbounds %"struct.std::_List_iterator", %"struct.std::_List_iterator"* %this1, i32 0, i32 0
%0 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %__x.addr, align 8
store %"struct.std::__detail::_List_node_base"* %0, %"struct.std::__detail::_List_node_base"** %_M_node, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i8** @_ZNSt10_List_nodeIPcE9_M_valptrEv(%"struct.std::_List_node"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_List_node"*, align 8
store %"struct.std::_List_node"* %this, %"struct.std::_List_node"** %this.addr, align 8
%this1 = load %"struct.std::_List_node"*, %"struct.std::_List_node"** %this.addr, align 8
%_M_storage = getelementptr inbounds %"struct.std::_List_node", %"struct.std::_List_node"* %this1, i32 0, i32 1
%call = call i8** @_ZN9__gnu_cxx16__aligned_membufIPcE6_M_ptrEv(%"struct.__gnu_cxx::__aligned_membuf"* %_M_storage) #6
ret i8** %call
}
declare dso_local i32 @__gxx_personality_v0(...)
; Function Attrs: noinline noreturn nounwind
define linkonce_odr hidden void @__clang_call_terminate(i8* %0) #5 comdat {
%2 = call i8* @__cxa_begin_catch(i8* %0) #6
call void @_ZSt9terminatev() #7
unreachable
}
declare dso_local i8* @__cxa_begin_catch(i8*)
declare dso_local void @_ZSt9terminatev()
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i8** @_ZN9__gnu_cxx16__aligned_membufIPcE6_M_ptrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.__gnu_cxx::__aligned_membuf"*, align 8
store %"struct.__gnu_cxx::__aligned_membuf"* %this, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%this1 = load %"struct.__gnu_cxx::__aligned_membuf"*, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%call = call i8* @_ZN9__gnu_cxx16__aligned_membufIPcE7_M_addrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this1) #6
%0 = bitcast i8* %call to i8**
ret i8** %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i8* @_ZN9__gnu_cxx16__aligned_membufIPcE7_M_addrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.__gnu_cxx::__aligned_membuf"*, align 8
store %"struct.__gnu_cxx::__aligned_membuf"* %this, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%this1 = load %"struct.__gnu_cxx::__aligned_membuf"*, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%_M_storage = getelementptr inbounds %"struct.__gnu_cxx::__aligned_membuf", %"struct.__gnu_cxx::__aligned_membuf"* %this1, i32 0, i32 0
%0 = bitcast [8 x i8]* %_M_storage to i8*
ret i8* %0
}
attributes #0 = { noinline 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" }
attributes #1 = { 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" }
attributes #2 = { argmemonly nounwind willreturn }
attributes #3 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #4 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #5 = { noinline noreturn nounwind }
attributes #6 = { nounwind }
attributes #7 = { noreturn nounwind }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@0 = external global i32
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%stack_var_-88 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
%1 = call i64 @_ZNSt7__cxx114listIPiSaIS1_EEC1Ev(i64* nonnull %stack_var_-88), !insn.addr !1
ret i64 %1, !insn.addr !1
}
define i64 @function_30(i64 %arg1, i64 %arg2, i64 %arg3, i64 %arg4) local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%.reg2mem = alloca i64, !insn.addr !2
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = load i64, i64* %0
%4 = load i64, i64* %0
%5 = trunc i64 %4 to i8
%6 = mul i8 %5, 2, !insn.addr !2
%7 = inttoptr i64 %4 to i8*, !insn.addr !2
store i8 %6, i8* %7, align 1, !insn.addr !2
%8 = add i64 %arg4, 16, !insn.addr !3
%9 = inttoptr i64 %8 to i8*, !insn.addr !3
%10 = load i8, i8* %9, align 1, !insn.addr !3
%11 = udiv i64 %3, 256, !insn.addr !3
%12 = trunc i64 %11 to i8, !insn.addr !3
%13 = add i8 %10, %12, !insn.addr !3
store i8 %13, i8* %9, align 1, !insn.addr !3
%14 = udiv i64 %4, %arg4
%15 = mul i64 %14, 16, !insn.addr !4
%16 = sub i64 %2, %15, !insn.addr !5
%17 = add i64 %16, 15, !insn.addr !6
%18 = and i64 %17, -16, !insn.addr !7
%19 = add i64 %1, -96, !insn.addr !8
%20 = inttoptr i64 %19 to i64*, !insn.addr !8
store i64 %18, i64* %20, align 8, !insn.addr !8
%21 = add i64 %16, -401, !insn.addr !9
%22 = and i64 %21, -16, !insn.addr !10
%23 = add i64 %1, -88, !insn.addr !11
%24 = inttoptr i64 %23 to i64*, !insn.addr !11
store i64 %22, i64* %24, align 8, !insn.addr !11
%25 = load i64, i64* %20, align 8, !insn.addr !12
%26 = add i64 %1, -104, !insn.addr !13
%27 = inttoptr i64 %26 to i64*, !insn.addr !13
store i64 %25, i64* %27, align 8, !insn.addr !13
%28 = add i64 %1, -80, !insn.addr !14
%29 = inttoptr i64 %28 to i64*, !insn.addr !15
%30 = inttoptr i64 %26 to i32**, !insn.addr !15
%31 = call i64 @_ZNSt7__cxx114listIPiSaIS1_EE9push_backERKS1_(i64* %29, i32** %30), !insn.addr !15
%32 = call i64 @_ZNSt7__cxx114listIPiSaIS1_EE9push_backERKS1_(i64* %29, i32** %30), !insn.addr !16
%33 = call i64 @_ZNSt7__cxx114listIPiSaIS1_EE9push_backERKS1_(i64* %29, i32** %30), !insn.addr !17
%34 = add i64 %1, -48, !insn.addr !18
%35 = inttoptr i64 %34 to i64*, !insn.addr !19
%36 = call i64 @_ZNSt7__cxx114listIPiSaIS1_EEC1ERKS3_(i64* %35, i64* %29), !insn.addr !19
%37 = call i64 @_ZN61CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_loop_737badSinkENSt7__cxx114listIPiSaIS2_EEE(i64 %34), !insn.addr !20
%38 = call i64 @_ZNSt7__cxx114listIPiSaIS1_EED1Ev(i64* %35), !insn.addr !21
%39 = call i64 @_ZNSt7__cxx114listIPiSaIS1_EED1Ev(i64* %29), !insn.addr !22
%40 = add i64 %1, -24, !insn.addr !23
%41 = inttoptr i64 %40 to i64*, !insn.addr !23
%42 = load i64, i64* %41, align 8, !insn.addr !23
%43 = call i64 @__readfsqword(i64 40), !insn.addr !24
%44 = icmp eq i64 %43, %42, !insn.addr !24
store i64 0, i64* %.reg2mem, !insn.addr !25
br i1 %44, label %dec_label_pc_14a, label %dec_label_pc_145, !insn.addr !25
dec_label_pc_145: ; preds = %dec_label_pc_30
%45 = call i64 @__stack_chk_fail(), !insn.addr !26
store i64 %45, i64* %.reg2mem, !insn.addr !26
br label %dec_label_pc_14a, !insn.addr !26
dec_label_pc_14a: ; preds = %dec_label_pc_145, %dec_label_pc_30
%.reload = load i64, i64* %.reg2mem, !insn.addr !27
ret i64 %.reload, !insn.addr !27
}
define i64 @_ZN61CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_loop_73L7goodG2BEv() local_unnamed_addr {
dec_label_pc_150:
%rax.0.reg2mem = alloca i64, !insn.addr !28
%stack_var_-56 = alloca i64, align 8
%stack_var_-112 = alloca i64, align 8
%stack_var_-88 = alloca i64, align 8
%stack_var_-120 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-120 to i64, !insn.addr !29
%1 = call i64 @__readfsqword(i64 40), !insn.addr !30
%2 = call i64 @_ZNSt7__cxx114listIPiSaIS1_EEC1Ev(i64* nonnull %stack_var_-88), !insn.addr !31
%3 = add i64 %0, -625, !insn.addr !32
%4 = and i64 %3, -16, !insn.addr !33
store i64 %4, i64* %stack_var_-112, align 8, !insn.addr !34
%5 = bitcast i64* %stack_var_-112 to i32**, !insn.addr !35
%6 = call i64 @_ZNSt7__cxx114listIPiSaIS1_EE9push_backERKS1_(i64* nonnull %stack_var_-88, i32** nonnull %5), !insn.addr !35
%7 = call i64 @_ZNSt7__cxx114listIPiSaIS1_EE9push_backERKS1_(i64* nonnull %stack_var_-88, i32** nonnull %5), !insn.addr !36
%8 = call i64 @_ZNSt7__cxx114listIPiSaIS1_EE9push_backERKS1_(i64* nonnull %stack_var_-88, i32** nonnull %5), !insn.addr !37
%9 = call i64 @_ZNSt7__cxx114listIPiSaIS1_EEC1ERKS3_(i64* nonnull %stack_var_-56, i64* nonnull %stack_var_-88), !insn.addr !38
%10 = ptrtoint i64* %stack_var_-56 to i64, !insn.addr !39
%11 = call i64 @_ZN61CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_loop_7311goodG2BSinkENSt7__cxx114listIPiSaIS2_EEE(i64 %10), !insn.addr !40
%12 = call i64 @_ZNSt7__cxx114listIPiSaIS1_EED1Ev(i64* nonnull %stack_var_-56), !insn.addr !41
%13 = call i64 @_ZNSt7__cxx114listIPiSaIS1_EED1Ev(i64* nonnull %stack_var_-88), !insn.addr !42
%14 = call i64 @__readfsqword(i64 40), !insn.addr !43
%15 = icmp eq i64 %1, %14, !insn.addr !43
store i64 0, i64* %rax.0.reg2mem, !insn.addr !44
br i1 %15, label %dec_label_pc_29a, label %dec_label_pc_295, !insn.addr !44
dec_label_pc_295: ; preds = %dec_label_pc_150
%16 = call i64 @__stack_chk_fail(), !insn.addr !45
store i64 %16, i64* %rax.0.reg2mem, !insn.addr !45
br label %dec_label_pc_29a, !insn.addr !45
dec_label_pc_29a: ; preds = %dec_label_pc_295, %dec_label_pc_150
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !46
}
define i64 @_ZN61CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_loop_734goodEv() local_unnamed_addr {
dec_label_pc_2a0:
%0 = call i64 @_ZN61CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_loop_73L7goodG2BEv(), !insn.addr !47
ret i64 %0, !insn.addr !48
}
define i64 @_ZnwmPv(i64 %arg1, i64* %arg2) local_unnamed_addr {
dec_label_pc_2ac:
%0 = ptrtoint i64* %arg2 to i64
ret i64 %0, !insn.addr !49
}
define i64 @_ZNSt7__cxx114listIPiSaIS1_EED1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_2c0:
%0 = call i64 @_ZNSt7__cxx1110_List_baseIPiSaIS1_EED1Ev(i64* %result), !insn.addr !50
ret i64 %0, !insn.addr !51
}
define i64 @_ZNSt7__cxx114listIPiSaIS1_EEC1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_338:
%0 = call i64 @_ZNSt7__cxx1110_List_baseIPiSaIS1_EEC1Ev(i64* %result), !insn.addr !52
ret i64 %0, !insn.addr !53
}
define i64 @_ZNSt7__cxx1110_List_baseIPiSaIS1_EE10_List_implD1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_354:
%0 = call i64 @_ZNSaISt10_List_nodeIPiEED1Ev(i64* %result), !insn.addr !54
ret i64 %0, !insn.addr !55
}
define i64 @_ZNSt7__cxx1110_List_baseIPiSaIS1_EED1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_370:
%0 = call i64 @_ZNSt7__cxx1110_List_baseIPiSaIS1_EE8_M_clearEv(i64* %result), !insn.addr !56
%1 = call i64 @_ZNSt7__cxx1110_List_baseIPiSaIS1_EE10_List_implD1Ev(i64* %result), !insn.addr !57
ret i64 %1, !insn.addr !58
}
define i64 @_ZNSt7__cxx114listIPiSaIS1_EE9push_backERKS1_(i64* %result, i32** %arg2) local_unnamed_addr {
dec_label_pc_398:
%0 = call i64 @_ZNSt7__cxx114listIPiSaIS1_EE3endEv(i64* %result), !insn.addr !59
%1 = ptrtoint i32** %arg2 to i64, !insn.addr !60
call void @_ZNSt7__cxx114listIPiSaIS1_EE9_M_insertIJRKS1_EEEvSt14_List_iteratorIS1_EDpOT_(i64* %result, i64 %0, i64 %1), !insn.addr !61
ret i64 ptrtoint (i32* @0 to i64), !insn.addr !62
}
define i64 @_ZNSt7__cxx114listIPiSaIS1_EEC1ERKS3_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_3ce:
%rax.0.reg2mem = alloca i64, !insn.addr !63
%0 = ptrtoint i64* %result to i64
%stack_var_-33 = alloca i64, align 8
%1 = call i64 @__readfsqword(i64 40), !insn.addr !64
%2 = call i64 @_ZNKSt7__cxx1110_List_baseIPiSaIS1_EE21_M_get_Node_allocatorEv(i64* %arg2), !insn.addr !65
%3 = inttoptr i64 %2 to i64*, !insn.addr !66
%4 = call i64 @_ZN9__gnu_cxx14__alloc_traitsISaISt10_List_nodeIPiEEE17_S_select_on_copyERKS4_(i64* nonnull %stack_var_-33, i64* %3), !insn.addr !66
%5 = call i64 @_ZNSt7__cxx1110_List_baseIPiSaIS1_EEC1ERKSaISt10_List_nodeIS1_EE(i64* %result, i64* nonnull %stack_var_-33), !insn.addr !67
%6 = call i64 @_ZNSaISt10_List_nodeIPiEED1Ev(i64* nonnull %stack_var_-33), !insn.addr !68
%7 = call i64 @_ZNKSt7__cxx114listIPiSaIS1_EE3endEv(i64* %arg2), !insn.addr !69
%8 = call i64 @_ZNKSt7__cxx114listIPiSaIS1_EE5beginEv(i64* %arg2), !insn.addr !70
call void @_ZNSt7__cxx114listIPiSaIS1_EE22_M_initialize_dispatchISt20_List_const_iteratorIS1_EEEvT_S7_St12__false_type(i64 %0, i64 %8, i64 %7), !insn.addr !71
%9 = call i64 @__readfsqword(i64 40), !insn.addr !72
%10 = icmp eq i64 %1, %9, !insn.addr !72
store i64 0, i64* %rax.0.reg2mem, !insn.addr !73
br i1 %10, label %dec_label_pc_498, label %dec_label_pc_493, !insn.addr !73
dec_label_pc_493: ; preds = %dec_label_pc_3ce
%11 = call i64 @__stack_chk_fail(), !insn.addr !74
store i64 %11, i64* %rax.0.reg2mem, !insn.addr !74
br label %dec_label_pc_498, !insn.addr !74
dec_label_pc_498: ; preds = %dec_label_pc_493, %dec_label_pc_3ce
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !75
}
define i64 @_ZNSt7__cxx1110_List_baseIPiSaIS1_EEC1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_4a2:
%0 = call i64 @_ZNSt7__cxx1110_List_baseIPiSaIS1_EE10_List_implC1Ev(i64* %result), !insn.addr !76
%1 = call i64 @_ZNSt7__cxx1110_List_baseIPiSaIS1_EE7_M_initEv(i64* %result), !insn.addr !77
ret i64 %1, !insn.addr !78
}
define i64 @_ZNSaISt10_List_nodeIPiEED1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_4ca:
%0 = call i64 @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPiEED1Ev(i64* %result), !insn.addr !79
ret i64 %0, !insn.addr !80
}
define i64 @_ZNSt7__cxx1110_List_baseIPiSaIS1_EE8_M_clearEv(i64* %result) local_unnamed_addr {
dec_label_pc_55d:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !81
}
define i64 @_ZNSt7__cxx114listIPiSaIS1_EE3endEv(i64* %result) local_unnamed_addr {
dec_label_pc_560:
%rax.0.reg2mem = alloca i64, !insn.addr !82
%stack_var_-24 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !83
%1 = call i64 @_ZNSt14_List_iteratorIPiEC1EPNSt8__detail15_List_node_baseE(i64* nonnull %stack_var_-24, i64* %result), !insn.addr !84
%2 = load i64, i64* %stack_var_-24, align 8, !insn.addr !85
%3 = call i64 @__readfsqword(i64 40), !insn.addr !86
%4 = icmp eq i64 %0, %3, !insn.addr !86
store i64 %2, i64* %rax.0.reg2mem, !insn.addr !87
br i1 %4, label %dec_label_pc_5a6, label %dec_label_pc_5a1, !insn.addr !87
dec_label_pc_5a1: ; preds = %dec_label_pc_560
%5 = call i64 @__stack_chk_fail(), !insn.addr !88
store i64 %5, i64* %rax.0.reg2mem, !insn.addr !88
br label %dec_label_pc_5a6, !insn.addr !88
dec_label_pc_5a6: ; preds = %dec_label_pc_5a1, %dec_label_pc_560
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !89
}
define i32*** @_ZSt7forwardIRKPiEOT_RNSt16remove_referenceIS3_E4typeE(i64* %arg1) local_unnamed_addr {
dec_label_pc_5a8:
%0 = bitcast i64* %arg1 to i32***, !insn.addr !90
ret i32*** %0, !insn.addr !90
}
define void @_ZNSt7__cxx114listIPiSaIS1_EE9_M_insertIJRKS1_EEEvSt14_List_iteratorIS1_EDpOT_(i64* %result, i64 %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_5b6:
%0 = inttoptr i64 %arg3 to i64*, !insn.addr !91
%1 = call i32*** @_ZSt7forwardIRKPiEOT_RNSt16remove_referenceIS3_E4typeE(i64* %0), !insn.addr !91
%2 = ptrtoint i32*** %1 to i64, !insn.addr !91
%3 = call i64* @_ZNSt7__cxx114listIPiSaIS1_EE14_M_create_nodeIJRKS1_EEEPSt10_List_nodeIS1_EDpOT_(i64* %result, i64 %2), !insn.addr !92
%4 = inttoptr i64 %arg2 to i64*, !insn.addr !93
%5 = call i64 @_ZNSt8__detail15_List_node_base7_M_hookEPS0_(i64* %3, i64* %4), !insn.addr !93
%6 = call i64 @_ZNSt7__cxx1110_List_baseIPiSaIS1_EE11_M_inc_sizeEm(i64* %result, i64 1), !insn.addr !94
ret void, !insn.addr !95
}
define i64 @_ZN9__gnu_cxx14__alloc_traitsISaISt10_List_nodeIPiEEE17_S_select_on_copyERKS4_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_613:
%rax.0.reg2mem = alloca i64, !insn.addr !96
%0 = ptrtoint i64* %result to i64
%1 = call i64 @__readfsqword(i64 40), !insn.addr !97
%2 = call i64 @_ZNSt16allocator_traitsISaISt10_List_nodeIPiEEE37select_on_container_copy_constructionERKS3_(i64* %result, i64* %arg2), !insn.addr !98
%3 = call i64 @__readfsqword(i64 40), !insn.addr !99
%4 = icmp eq i64 %1, %3, !insn.addr !99
store i64 %0, i64* %rax.0.reg2mem, !insn.addr !100
br i1 %4, label %dec_label_pc_65d, label %dec_label_pc_658, !insn.addr !100
dec_label_pc_658: ; preds = %dec_label_pc_613
%5 = call i64 @__stack_chk_fail(), !insn.addr !101
store i64 %5, i64* %rax.0.reg2mem, !insn.addr !101
br label %dec_label_pc_65d, !insn.addr !101
dec_label_pc_65d: ; preds = %dec_label_pc_658, %dec_label_pc_613
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !102
}
define i64 @_ZNKSt7__cxx1110_List_baseIPiSaIS1_EE21_M_get_Node_allocatorEv(i64* %result) local_unnamed_addr {
dec_label_pc_660:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !103
}
define i64 @_ZNSt7__cxx1110_List_baseIPiSaIS1_EEC1ERKSaISt10_List_nodeIS1_EE(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_66e:
%0 = call i64 @_ZNSt7__cxx1110_List_baseIPiSaIS1_EE10_List_implC1ERKSaISt10_List_nodeIS1_EE(i64* %result, i64* %arg2), !insn.addr !104
%1 = call i64 @_ZNSt7__cxx1110_List_baseIPiSaIS1_EE7_M_initEv(i64* %result), !insn.addr !105
ret i64 %1, !insn.addr !106
}
define i64 @_ZNKSt7__cxx114listIPiSaIS1_EE5beginEv(i64* %result) local_unnamed_addr {
dec_label_pc_6a0:
%rax.0.reg2mem = alloca i64, !insn.addr !107
%stack_var_-24 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !108
%1 = call i64 @_ZNSt20_List_const_iteratorIPiEC1EPKNSt8__detail15_List_node_baseE(i64* nonnull %stack_var_-24, i64* %result), !insn.addr !109
%2 = load i64, i64* %stack_var_-24, align 8, !insn.addr !110
%3 = call i64 @__readfsqword(i64 40), !insn.addr !111
%4 = icmp eq i64 %0, %3, !insn.addr !111
store i64 %2, i64* %rax.0.reg2mem, !insn.addr !112
br i1 %4, label %dec_label_pc_6e9, label %dec_label_pc_6e4, !insn.addr !112
dec_label_pc_6e4: ; preds = %dec_label_pc_6a0
%5 = call i64 @__stack_chk_fail(), !insn.addr !113
store i64 %5, i64* %rax.0.reg2mem, !insn.addr !113
br label %dec_label_pc_6e9, !insn.addr !113
dec_label_pc_6e9: ; preds = %dec_label_pc_6e4, %dec_label_pc_6a0
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !114
}
define i64 @_ZNKSt7__cxx114listIPiSaIS1_EE3endEv(i64* %result) local_unnamed_addr {
dec_label_pc_6ec:
%rax.0.reg2mem = alloca i64, !insn.addr !115
%stack_var_-24 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !116
%1 = call i64 @_ZNSt20_List_const_iteratorIPiEC1EPKNSt8__detail15_List_node_baseE(i64* nonnull %stack_var_-24, i64* %result), !insn.addr !117
%2 = load i64, i64* %stack_var_-24, align 8, !insn.addr !118
%3 = call i64 @__readfsqword(i64 40), !insn.addr !119
%4 = icmp eq i64 %0, %3, !insn.addr !119
store i64 %2, i64* %rax.0.reg2mem, !insn.addr !120
br i1 %4, label %dec_label_pc_732, label %dec_label_pc_72d, !insn.addr !120
dec_label_pc_72d: ; preds = %dec_label_pc_6ec
%5 = call i64 @__stack_chk_fail(), !insn.addr !121
store i64 %5, i64* %rax.0.reg2mem, !insn.addr !121
br label %dec_label_pc_732, !insn.addr !121
dec_label_pc_732: ; preds = %dec_label_pc_72d, %dec_label_pc_6ec
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !122
}
define void @_ZNSt7__cxx114listIPiSaIS1_EE22_M_initialize_dispatchISt20_List_const_iteratorIS1_EEEvT_S7_St12__false_type(i64 %arg1, i64 %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_734:
%stack_var_-32 = alloca i64, align 8
%stack_var_-24 = alloca i64, align 8
store i64 %arg2, i64* %stack_var_-24, align 8, !insn.addr !123
store i64 %arg3, i64* %stack_var_-32, align 8, !insn.addr !124
%0 = call i64 @_ZNKSt20_List_const_iteratorIPiEneERKS1_(i64* nonnull %stack_var_-24, i64* nonnull %stack_var_-32), !insn.addr !125
%1 = trunc i64 %0 to i8, !insn.addr !126
%2 = icmp eq i8 %1, 0, !insn.addr !126
br i1 %2, label %dec_label_pc_78b, label %dec_label_pc_75f.lr.ph, !insn.addr !127
dec_label_pc_75f.lr.ph: ; preds = %dec_label_pc_734
%3 = inttoptr i64 %arg1 to i64*
br label %dec_label_pc_75f
dec_label_pc_75f: ; preds = %dec_label_pc_75f.lr.ph, %dec_label_pc_75f
%4 = call i64 @_ZNKSt20_List_const_iteratorIPiEdeEv(i64* nonnull %stack_var_-24), !insn.addr !128
call void @_ZNSt7__cxx114listIPiSaIS1_EE12emplace_backIJRKS1_EEEvDpOT_(i64* %3, i64 %4), !insn.addr !129
%5 = call i64 @_ZNSt20_List_const_iteratorIPiEppEv(i64* nonnull %stack_var_-24), !insn.addr !130
%6 = call i64 @_ZNKSt20_List_const_iteratorIPiEneERKS1_(i64* nonnull %stack_var_-24, i64* nonnull %stack_var_-32), !insn.addr !125
%7 = trunc i64 %6 to i8, !insn.addr !126
%8 = icmp eq i8 %7, 0, !insn.addr !126
br i1 %8, label %dec_label_pc_78b, label %dec_label_pc_75f, !insn.addr !127
dec_label_pc_78b: ; preds = %dec_label_pc_75f, %dec_label_pc_734
ret void, !insn.addr !131
}
define i64 @_ZNSt7__cxx1110_List_baseIPiSaIS1_EE10_List_implC1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_78e:
%0 = ptrtoint i64* %result to i64
%1 = call i64 @_ZNSaISt10_List_nodeIPiEEC1Ev(i64* %result), !insn.addr !132
store i64 0, i64* %result, align 8, !insn.addr !133
%2 = add i64 %0, 8, !insn.addr !134
%3 = inttoptr i64 %2 to i64*, !insn.addr !134
store i64 0, i64* %3, align 8, !insn.addr !134
%4 = add i64 %0, 16, !insn.addr !135
%5 = inttoptr i64 %4 to i64*, !insn.addr !135
store i64 0, i64* %5, align 8, !insn.addr !135
ret i64 %0, !insn.addr !136
}
define i64 @_ZNSt7__cxx1110_List_baseIPiSaIS1_EE7_M_initEv(i64* %result) local_unnamed_addr {
dec_label_pc_7c4:
%0 = ptrtoint i64* %result to i64
store i64 %0, i64* %result, align 8, !insn.addr !137
%1 = add i64 %0, 8, !insn.addr !138
%2 = inttoptr i64 %1 to i64*, !insn.addr !138
store i64 %0, i64* %2, align 8, !insn.addr !138
%3 = call i64 @_ZNSt7__cxx1110_List_baseIPiSaIS1_EE11_M_set_sizeEm(i64* %result, i64 0), !insn.addr !139
ret i64 %3, !insn.addr !140
}
define i64 @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPiEED1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_7fc:
%0 = alloca i64
%1 = load i64, i64* %0
ret i64 %1, !insn.addr !141
}
define i64 @_ZNSt10_List_nodeIPiE9_M_valptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_808:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 16, !insn.addr !142
%2 = inttoptr i64 %1 to i64*, !insn.addr !143
%3 = call i64 @_ZN9__gnu_cxx16__aligned_membufIPiE6_M_ptrEv(i64* %2), !insn.addr !143
ret i64 %3, !insn.addr !144
}
define i64 @_ZNSt7__cxx1110_List_baseIPiSaIS1_EE21_M_get_Node_allocatorEv(i64* %result) local_unnamed_addr {
dec_label_pc_826:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !145
}
define void @_ZNSt16allocator_traitsISaISt10_List_nodeIPiEEE7destroyIS1_EEvRS3_PT_(i64* %arg1, i32** %arg2) local_unnamed_addr {
dec_label_pc_834:
call void @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPiEE7destroyIS2_EEvPT_(i64* %arg1, i32** %arg2), !insn.addr !146
ret void, !insn.addr !147
}
define i64 @_ZNSt7__cxx1110_List_baseIPiSaIS1_EE11_M_put_nodeEPSt10_List_nodeIS1_E(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_85a:
%0 = call i64 @_ZNSt16allocator_traitsISaISt10_List_nodeIPiEEE10deallocateERS3_PS2_m(i64* %result, i64* %arg2, i64 1), !insn.addr !148
ret i64 %0, !insn.addr !149
}
define i64 @_ZNSt14_List_iteratorIPiEC1EPNSt8__detail15_List_node_baseE(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_886:
%0 = ptrtoint i64* %arg2 to i64
%1 = ptrtoint i64* %result to i64
store i64 %0, i64* %result, align 8, !insn.addr !150
ret i64 %1, !insn.addr !151
}
define i64* @_ZNSt7__cxx114listIPiSaIS1_EE14_M_create_nodeIJRKS1_EEEPSt10_List_nodeIS1_EDpOT_(i64* %result, i64 %arg2) local_unnamed_addr {
dec_label_pc_8a0:
%.pre-phi.reg2mem = alloca i64*, !insn.addr !152
%stack_var_-56 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !153
%1 = call i64 @_ZNSt7__cxx1110_List_baseIPiSaIS1_EE11_M_get_nodeEv(i64* %result), !insn.addr !154
%2 = call i64 @_ZNSt7__cxx1110_List_baseIPiSaIS1_EE21_M_get_Node_allocatorEv(i64* %result), !insn.addr !155
%3 = inttoptr i64 %2 to i64*, !insn.addr !156
%4 = inttoptr i64 %1 to i64*
%5 = call i64 @_ZNSt15__allocated_ptrISaISt10_List_nodeIPiEEEC1ERS3_PS2_(i64* nonnull %stack_var_-56, i64* %3, i64* %4), !insn.addr !156
%6 = inttoptr i64 %arg2 to i64*, !insn.addr !157
%7 = call i32*** @_ZSt7forwardIRKPiEOT_RNSt16remove_referenceIS3_E4typeE(i64* %6), !insn.addr !157
%8 = ptrtoint i32*** %7 to i64, !insn.addr !157
%9 = call i64 @_ZNSt10_List_nodeIPiE9_M_valptrEv(i64* %4), !insn.addr !158
%10 = inttoptr i64 %9 to i32**, !insn.addr !159
call void @_ZNSt16allocator_traitsISaISt10_List_nodeIPiEEE9constructIS1_JRKS1_EEEvRS3_PT_DpOT0_(i64* %3, i32** %10, i64 %8), !insn.addr !159
%11 = call i64 @_ZNSt15__allocated_ptrISaISt10_List_nodeIPiEEEaSEDn(i64* nonnull %stack_var_-56, i64 0), !insn.addr !160
%12 = call i64 @_ZNSt15__allocated_ptrISaISt10_List_nodeIPiEEED1Ev(i64* nonnull %stack_var_-56), !insn.addr !161
%13 = call i64 @__readfsqword(i64 40), !insn.addr !162
%14 = icmp eq i64 %0, %13, !insn.addr !162
store i64* %4, i64** %.pre-phi.reg2mem, !insn.addr !163
br i1 %14, label %dec_label_pc_97b, label %dec_label_pc_976, !insn.addr !163
dec_label_pc_976: ; preds = %dec_label_pc_8a0
%15 = call i64 @__stack_chk_fail(), !insn.addr !164
%.pre = inttoptr i64 %15 to i64*, !insn.addr !165
store i64* %.pre, i64** %.pre-phi.reg2mem, !insn.addr !164
br label %dec_label_pc_97b, !insn.addr !164
dec_label_pc_97b: ; preds = %dec_label_pc_976, %dec_label_pc_8a0
%.pre-phi.reload = load i64*, i64** %.pre-phi.reg2mem
ret i64* %.pre-phi.reload, !insn.addr !165
}
define i64 @_ZNSt7__cxx1110_List_baseIPiSaIS1_EE11_M_inc_sizeEm(i64* %result, i64 %arg2) local_unnamed_addr {
dec_label_pc_982:
%0 = call i64 @_ZNSt10_List_nodeImE9_M_valptrEv(i64* %result), !insn.addr !166
%1 = inttoptr i64 %0 to i64*, !insn.addr !167
%2 = load i64, i64* %1, align 8, !insn.addr !167
%3 = add i64 %2, %arg2, !insn.addr !168
store i64 %3, i64* %1, align 8, !insn.addr !169
ret i64 %0, !insn.addr !170
}
define i64 @_ZNSt16allocator_traitsISaISt10_List_nodeIPiEEE37select_on_container_copy_constructionERKS3_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_9ae:
%0 = ptrtoint i64* %result to i64
%1 = call i64 @_ZNSaISt10_List_nodeIPiEEC1ERKS2_(i64* %result, i64* %arg2), !insn.addr !171
ret i64 %0, !insn.addr !172
}
define i64 @_ZNSaISt10_List_nodeIPiEEC1ERKS2_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_9d8:
%0 = call i64 @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPiEEC1ERKS4_(i64* %result, i64* %arg2), !insn.addr !173
ret i64 %0, !insn.addr !174
}
define i64 @_ZNSt7__cxx1110_List_baseIPiSaIS1_EE10_List_implC1ERKSaISt10_List_nodeIS1_EE(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_9fe:
%0 = ptrtoint i64* %result to i64
%1 = call i64 @_ZNSaISt10_List_nodeIPiEEC1ERKS2_(i64* %result, i64* %arg2), !insn.addr !175
store i64 0, i64* %result, align 8, !insn.addr !176
%2 = add i64 %0, 8, !insn.addr !177
%3 = inttoptr i64 %2 to i64*, !insn.addr !177
store i64 0, i64* %3, align 8, !insn.addr !177
%4 = add i64 %0, 16, !insn.addr !178
%5 = inttoptr i64 %4 to i64*, !insn.addr !178
store i64 0, i64* %5, align 8, !insn.addr !178
ret i64 %0, !insn.addr !179
}
define i64 @_ZNSt20_List_const_iteratorIPiEC1EPKNSt8__detail15_List_node_baseE(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_a40:
%0 = ptrtoint i64* %arg2 to i64
%1 = ptrtoint i64* %result to i64
store i64 %0, i64* %result, align 8, !insn.addr !180
ret i64 %1, !insn.addr !181
}
define i64 @_ZNKSt20_List_const_iteratorIPiEneERKS1_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_a5a:
%0 = ptrtoint i64* %arg2 to i64
%1 = icmp eq i64* %result, %arg2, !insn.addr !182
%2 = icmp eq i1 %1, false, !insn.addr !183
%3 = zext i1 %2 to i64, !insn.addr !183
%4 = and i64 %0, -256, !insn.addr !183
%5 = or i64 %4, %3, !insn.addr !183
ret i64 %5, !insn.addr !184
}
define i64 @_ZNSt20_List_const_iteratorIPiEppEv(i64* %result) local_unnamed_addr {
dec_label_pc_a7c:
%0 = ptrtoint i64* %result to i64
store i64 %0, i64* %result, align 8, !insn.addr !185
ret i64 %0, !insn.addr !186
}
define i64 @_ZNKSt20_List_const_iteratorIPiEdeEv(i64* %result) local_unnamed_addr {
dec_label_pc_a9c:
%0 = call i64 @_ZNKSt10_List_nodeIPiE9_M_valptrEv(i64* %result), !insn.addr !187
ret i64 %0, !insn.addr !188
}
define void @_ZNSt7__cxx114listIPiSaIS1_EE12emplace_backIJRKS1_EEEvDpOT_(i64* %result, i64 %arg2) local_unnamed_addr {
dec_label_pc_aba:
%0 = inttoptr i64 %arg2 to i64*, !insn.addr !189
%1 = call i32*** @_ZSt7forwardIRKPiEOT_RNSt16remove_referenceIS3_E4typeE(i64* %0), !insn.addr !189
%2 = ptrtoint i32*** %1 to i64, !insn.addr !189
%3 = call i64 @_ZNSt7__cxx114listIPiSaIS1_EE3endEv(i64* %result), !insn.addr !190
call void @_ZNSt7__cxx114listIPiSaIS1_EE9_M_insertIJRKS1_EEEvSt14_List_iteratorIS1_EDpOT_(i64* %result, i64 %3, i64 %2), !insn.addr !191
ret void, !insn.addr !192
}
define i64 @_ZNSaISt10_List_nodeIPiEEC1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_b04:
%0 = call i64 @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPiEEC1Ev(i64* %result), !insn.addr !193
ret i64 %0, !insn.addr !194
}
define i64 @_ZNSt7__cxx1110_List_baseIPiSaIS1_EE11_M_set_sizeEm(i64* %result, i64 %arg2) local_unnamed_addr {
dec_label_pc_b20:
%0 = call i64 @_ZNSt10_List_nodeImE9_M_valptrEv(i64* %result), !insn.addr !195
%1 = inttoptr i64 %0 to i64*, !insn.addr !196
store i64 %arg2, i64* %1, align 8, !insn.addr !196
ret i64 %arg2, !insn.addr !197
}
define i64 @_ZN9__gnu_cxx16__aligned_membufIPiE6_M_ptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_b4a:
%0 = call i64 @_ZN9__gnu_cxx16__aligned_membufIPiE7_M_addrEv(i64* %result), !insn.addr !198
ret i64 %0, !insn.addr !199
}
define void @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPiEE7destroyIS2_EEvPT_(i64* %result, i32** %arg2) local_unnamed_addr {
dec_label_pc_b64:
ret void, !insn.addr !200
}
define i64 @_ZNSt16allocator_traitsISaISt10_List_nodeIPiEEE10deallocateERS3_PS2_m(i64* %arg1, i64* %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_b73:
%0 = call i64 @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPiEE10deallocateEPS3_m(i64* %arg1, i64* %arg2, i64 %arg3), !insn.addr !201
ret i64 %0, !insn.addr !202
}
define i64 @_ZNSt7__cxx1110_List_baseIPiSaIS1_EE11_M_get_nodeEv(i64* %result) local_unnamed_addr {
dec_label_pc_ba2:
%0 = call i64 @_ZNSt16allocator_traitsISaISt10_List_nodeIPiEEE8allocateERS3_m(i64* %result, i64 1), !insn.addr !203
ret i64 %0, !insn.addr !204
}
define i64 @_ZNSt15__allocated_ptrISaISt10_List_nodeIPiEEEC1ERS3_PS2_(i64* %result, i64* %arg2, i64* %arg3) local_unnamed_addr {
dec_label_pc_bc2:
%0 = ptrtoint i64* %arg3 to i64
%1 = ptrtoint i64* %result to i64
%2 = call i64* @_ZSt11__addressofISaISt10_List_nodeIPiEEEPT_RS4_(i64* %arg2), !insn.addr !205
%3 = ptrtoint i64* %2 to i64, !insn.addr !205
store i64 %3, i64* %result, align 8, !insn.addr !206
%4 = add i64 %1, 8, !insn.addr !207
%5 = inttoptr i64 %4 to i64*, !insn.addr !207
store i64 %0, i64* %5, align 8, !insn.addr !207
ret i64 %1, !insn.addr !208
}
define i64 @_ZNSt15__allocated_ptrISaISt10_List_nodeIPiEEED1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_bfc:
%rax.0.reg2mem = alloca i64, !insn.addr !209
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 8, !insn.addr !210
%2 = inttoptr i64 %1 to i64*, !insn.addr !210
%3 = load i64, i64* %2, align 8, !insn.addr !210
%4 = icmp eq i64 %3, 0, !insn.addr !211
store i64 0, i64* %rax.0.reg2mem, !insn.addr !212
br i1 %4, label %dec_label_pc_c34, label %dec_label_pc_c15, !insn.addr !212
dec_label_pc_c15: ; preds = %dec_label_pc_bfc
%5 = inttoptr i64 %3 to i64*, !insn.addr !213
%6 = call i64 @_ZNSt16allocator_traitsISaISt10_List_nodeIPiEEE10deallocateERS3_PS2_m(i64* %result, i64* %5, i64 1), !insn.addr !213
store i64 %6, i64* %rax.0.reg2mem, !insn.addr !213
br label %dec_label_pc_c34, !insn.addr !213
dec_label_pc_c34: ; preds = %dec_label_pc_c15, %dec_label_pc_bfc
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !214
}
define void @_ZNSt16allocator_traitsISaISt10_List_nodeIPiEEE9constructIS1_JRKS1_EEEvRS3_PT_DpOT0_(i64* %arg1, i32** %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_c37:
%0 = inttoptr i64 %arg3 to i64*, !insn.addr !215
%1 = call i32*** @_ZSt7forwardIRKPiEOT_RNSt16remove_referenceIS3_E4typeE(i64* %0), !insn.addr !215
%2 = ptrtoint i32*** %1 to i64, !insn.addr !215
call void @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPiEE9constructIS2_JRKS2_EEEvPT_DpOT0_(i64* %arg1, i32** %arg2, i64 %2), !insn.addr !216
ret void, !insn.addr !217
}
define i64 @_ZNSt15__allocated_ptrISaISt10_List_nodeIPiEEEaSEDn(i64* %result, i64 %arg2) local_unnamed_addr {
dec_label_pc_c70:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 8, !insn.addr !218
%2 = inttoptr i64 %1 to i64*, !insn.addr !218
store i64 0, i64* %2, align 8, !insn.addr !218
ret i64 %0, !insn.addr !219
}
define i64 @_ZNSt10_List_nodeImE9_M_valptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_c8e:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 16, !insn.addr !220
%2 = inttoptr i64 %1 to i64*, !insn.addr !221
%3 = call i64 @_ZN9__gnu_cxx16__aligned_membufImE6_M_ptrEv(i64* %2), !insn.addr !221
ret i64 %3, !insn.addr !222
}
define i64 @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPiEEC1ERKS4_(i64* %result, i64* %arg2) local_unnamed_addr {
dec_label_pc_cac:
%0 = alloca i64
%1 = load i64, i64* %0
ret i64 %1, !insn.addr !223
}
define i64 @_ZNKSt10_List_nodeIPiE9_M_valptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_cbc:
%0 = ptrtoint i64* %result to i64
%1 = add i64 %0, 16, !insn.addr !224
%2 = inttoptr i64 %1 to i64*, !insn.addr !225
%3 = call i64 @_ZNK9__gnu_cxx16__aligned_membufIPiE6_M_ptrEv(i64* %2), !insn.addr !225
ret i64 %3, !insn.addr !226
}
define i64 @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPiEEC1Ev(i64* %result) local_unnamed_addr {
dec_label_pc_cda:
%0 = alloca i64
%1 = load i64, i64* %0
ret i64 %1, !insn.addr !227
}
define i64 @_ZN9__gnu_cxx16__aligned_membufIPiE7_M_addrEv(i64* %result) local_unnamed_addr {
dec_label_pc_ce6:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !228
}
define i64 @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPiEE10deallocateEPS3_m(i64* %result, i64* %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_cf4:
%0 = call i64 @_ZdlPv(i64* %arg2), !insn.addr !229
ret i64 %0, !insn.addr !230
}
define i64 @_ZNSt16allocator_traitsISaISt10_List_nodeIPiEEE8allocateERS3_m(i64* %arg1, i64 %arg2) local_unnamed_addr {
dec_label_pc_d17:
%0 = call i64 @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPiEE8allocateEmPKv(i64* %arg1, i64 %arg2, i64* null), !insn.addr !231
ret i64 %0, !insn.addr !232
}
define i64* @_ZSt11__addressofISaISt10_List_nodeIPiEEEPT_RS4_(i64* %arg1) local_unnamed_addr {
dec_label_pc_d41:
ret i64* %arg1, !insn.addr !233
}
define void @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPiEE9constructIS2_JRKS2_EEEvPT_DpOT0_(i64* %result, i32** %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_d50:
%0 = inttoptr i64 %arg3 to i64*, !insn.addr !234
%1 = call i32*** @_ZSt7forwardIRKPiEOT_RNSt16remove_referenceIS3_E4typeE(i64* %0), !insn.addr !234
%2 = load i32**, i32*** %1, align 8, !insn.addr !235
%3 = bitcast i32** %arg2 to i64*, !insn.addr !236
%4 = call i64 @_ZnwmPv(i64 8, i64* %3), !insn.addr !236
%5 = icmp eq i64 %4, 0, !insn.addr !237
br i1 %5, label %dec_label_pc_d8d, label %dec_label_pc_d8a, !insn.addr !238
dec_label_pc_d8a: ; preds = %dec_label_pc_d50
%6 = ptrtoint i32** %2 to i64, !insn.addr !235
%7 = inttoptr i64 %4 to i64*, !insn.addr !239
store i64 %6, i64* %7, align 8, !insn.addr !239
br label %dec_label_pc_d8d, !insn.addr !239
dec_label_pc_d8d: ; preds = %dec_label_pc_d8a, %dec_label_pc_d50
ret void, !insn.addr !240
}
define i64 @_ZN9__gnu_cxx16__aligned_membufImE6_M_ptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_d96:
%0 = call i64 @_ZN9__gnu_cxx16__aligned_membufImE7_M_addrEv(i64* %result), !insn.addr !241
ret i64 %0, !insn.addr !242
}
define i64 @_ZNK9__gnu_cxx16__aligned_membufIPiE6_M_ptrEv(i64* %result) local_unnamed_addr {
dec_label_pc_db0:
%0 = call i64 @_ZNK9__gnu_cxx16__aligned_membufIPiE7_M_addrEv(i64* %result), !insn.addr !243
ret i64 %0, !insn.addr !244
}
define i64 @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPiEE8allocateEmPKv(i64* %result, i64 %arg2, i64* %arg3) local_unnamed_addr {
dec_label_pc_dca:
%0 = call i64 @_ZNK9__gnu_cxx13new_allocatorISt10_List_nodeIPiEE8max_sizeEv(i64* %result), !insn.addr !245
%1 = icmp uge i64 %0, %arg2
%2 = icmp ne i1 %1, true, !insn.addr !246
%3 = icmp eq i1 %2, false, !insn.addr !247
br i1 %3, label %dec_label_pc_dfa, label %dec_label_pc_df5, !insn.addr !248
dec_label_pc_df5: ; preds = %dec_label_pc_dca
%4 = call i64 @_ZSt17__throw_bad_allocv(), !insn.addr !249
br label %dec_label_pc_dfa, !insn.addr !249
dec_label_pc_dfa: ; preds = %dec_label_pc_df5, %dec_label_pc_dca
%5 = mul i64 %arg2, 24, !insn.addr !250
%6 = call i64 @_Znwm(i64 %5), !insn.addr !251
ret i64 %6, !insn.addr !252
}
define i64 @_ZN9__gnu_cxx16__aligned_membufImE7_M_addrEv(i64* %result) local_unnamed_addr {
dec_label_pc_e16:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !253
}
define i64 @_ZNK9__gnu_cxx16__aligned_membufIPiE7_M_addrEv(i64* %result) local_unnamed_addr {
dec_label_pc_e24:
%0 = ptrtoint i64* %result to i64
ret i64 %0, !insn.addr !254
}
define i64 @_ZNK9__gnu_cxx13new_allocatorISt10_List_nodeIPiEE8max_sizeEv(i64* %result) local_unnamed_addr {
dec_label_pc_e32:
ret i64 768614336404564650, !insn.addr !255
}
declare i64 @_ZN61CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_loop_737badSinkENSt7__cxx114listIPiSaIS2_EEE(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @_ZN61CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_loop_7311goodG2BSinkENSt7__cxx114listIPiSaIS2_EEE(i64) local_unnamed_addr
declare i64 @_ZNSt8__detail15_List_node_base7_M_hookEPS0_(i64*, i64*) local_unnamed_addr
declare i64 @_ZdlPv(i64*) local_unnamed_addr
declare i64 @_ZSt17__throw_bad_allocv() local_unnamed_addr
declare i64 @_Znwm(i64) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 9}
!1 = !{i64 31}
!2 = !{i64 48}
!3 = !{i64 50}
!4 = !{i64 64}
!5 = !{i64 68}
!6 = !{i64 74}
!7 = !{i64 78}
!8 = !{i64 86}
!9 = !{i64 128}
!10 = !{i64 132}
!11 = !{i64 140}
!12 = !{i64 144}
!13 = !{i64 148}
!14 = !{i64 156}
!15 = !{i64 166}
!16 = !{i64 185}
!17 = !{i64 204}
!18 = !{i64 213}
!19 = !{i64 223}
!20 = !{i64 235}
!21 = !{i64 247}
!22 = !{i64 259}
!23 = !{i64 265}
!24 = !{i64 269}
!25 = !{i64 278}
!26 = !{i64 325}
!27 = !{i64 335}
!28 = !{i64 336}
!29 = !{i64 341}
!30 = !{i64 345}
!31 = !{i64 367}
!32 = !{i64 464}
!33 = !{i64 468}
!34 = !{i64 484}
!35 = !{i64 502}
!36 = !{i64 521}
!37 = !{i64 540}
!38 = !{i64 559}
!39 = !{i64 568}
!40 = !{i64 571}
!41 = !{i64 583}
!42 = !{i64 595}
!43 = !{i64 605}
!44 = !{i64 614}
!45 = !{i64 661}
!46 = !{i64 671}
!47 = !{i64 676}
!48 = !{i64 683}
!49 = !{i64 701}
!50 = !{i64 723}
!51 = !{i64 730}
!52 = !{i64 843}
!53 = !{i64 850}
!54 = !{i64 871}
!55 = !{i64 878}
!56 = !{i64 899}
!57 = !{i64 911}
!58 = !{i64 918}
!59 = !{i64 943}
!60 = !{i64 951}
!61 = !{i64 965}
!62 = !{i64 972}
!63 = !{i64 974}
!64 = !{i64 993}
!65 = !{i64 1019}
!66 = !{i64 1037}
!67 = !{i64 1052}
!68 = !{i64 1064}
!69 = !{i64 1076}
!70 = !{i64 1091}
!71 = !{i64 1118}
!72 = !{i64 1132}
!73 = !{i64 1141}
!74 = !{i64 1171}
!75 = !{i64 1184}
!76 = !{i64 1205}
!77 = !{i64 1217}
!78 = !{i64 1224}
!79 = !{i64 1245}
!80 = !{i64 1252}
!81 = !{i64 1375}
!82 = !{i64 1376}
!83 = !{i64 1388}
!84 = !{i64 1417}
!85 = !{i64 1422}
!86 = !{i64 1430}
!87 = !{i64 1439}
!88 = !{i64 1441}
!89 = !{i64 1447}
!90 = !{i64 1461}
!91 = !{i64 1489}
!92 = !{i64 1507}
!93 = !{i64 1530}
!94 = !{i64 1547}
!95 = !{i64 1554}
!96 = !{i64 1555}
!97 = !{i64 1571}
!98 = !{i64 1600}
!99 = !{i64 1613}
!100 = !{i64 1622}
!101 = !{i64 1624}
!102 = !{i64 1630}
!103 = !{i64 1645}
!104 = !{i64 1676}
!105 = !{i64 1688}
!106 = !{i64 1695}
!107 = !{i64 1696}
!108 = !{i64 1708}
!109 = !{i64 1740}
!110 = !{i64 1745}
!111 = !{i64 1753}
!112 = !{i64 1762}
!113 = !{i64 1764}
!114 = !{i64 1770}
!115 = !{i64 1772}
!116 = !{i64 1784}
!117 = !{i64 1813}
!118 = !{i64 1818}
!119 = !{i64 1826}
!120 = !{i64 1835}
!121 = !{i64 1837}
!122 = !{i64 1843}
!123 = !{i64 1856}
!124 = !{i64 1860}
!125 = !{i64 1878}
!126 = !{i64 1883}
!127 = !{i64 1885}
!128 = !{i64 1894}
!129 = !{i64 1912}
!130 = !{i64 1924}
!131 = !{i64 1933}
!132 = !{i64 1953}
!133 = !{i64 1962}
!134 = !{i64 1969}
!135 = !{i64 1977}
!136 = !{i64 1987}
!137 = !{i64 2008}
!138 = !{i64 2019}
!139 = !{i64 2035}
!140 = !{i64 2042}
!141 = !{i64 2054}
!142 = !{i64 2072}
!143 = !{i64 2079}
!144 = !{i64 2085}
!145 = !{i64 2099}
!146 = !{i64 2130}
!147 = !{i64 2137}
!148 = !{i64 2173}
!149 = !{i64 2180}
!150 = !{i64 2202}
!151 = !{i64 2207}
!152 = !{i64 2208}
!153 = !{i64 2225}
!154 = !{i64 2247}
!155 = !{i64 2263}
!156 = !{i64 2290}
!157 = !{i64 2302}
!158 = !{i64 2317}
!159 = !{i64 2338}
!160 = !{i64 2355}
!161 = !{i64 2371}
!162 = !{i64 2383}
!163 = !{i64 2392}
!164 = !{i64 2422}
!165 = !{i64 2433}
!166 = !{i64 2457}
!167 = !{i64 2462}
!168 = !{i64 2469}
!169 = !{i64 2472}
!170 = !{i64 2477}
!171 = !{i64 2508}
!172 = !{i64 2518}
!173 = !{i64 2550}
!174 = !{i64 2557}
!175 = !{i64 2588}
!176 = !{i64 2597}
!177 = !{i64 2604}
!178 = !{i64 2612}
!179 = !{i64 2622}
!180 = !{i64 2644}
!181 = !{i64 2649}
!182 = !{i64 2676}
!183 = !{i64 2679}
!184 = !{i64 2683}
!185 = !{i64 2706}
!186 = !{i64 2714}
!187 = !{i64 2738}
!188 = !{i64 2744}
!189 = !{i64 2770}
!190 = !{i64 2785}
!191 = !{i64 2806}
!192 = !{i64 2818}
!193 = !{i64 2839}
!194 = !{i64 2846}
!195 = !{i64 2871}
!196 = !{i64 2883}
!197 = !{i64 2888}
!198 = !{i64 2909}
!199 = !{i64 2915}
!200 = !{i64 2930}
!201 = !{i64 2969}
!202 = !{i64 2976}
!203 = !{i64 3002}
!204 = !{i64 3008}
!205 = !{i64 3037}
!206 = !{i64 3049}
!207 = !{i64 3060}
!208 = !{i64 3066}
!209 = !{i64 3068}
!210 = !{i64 3084}
!211 = !{i64 3088}
!212 = !{i64 3091}
!213 = !{i64 3119}
!214 = !{i64 3126}
!215 = !{i64 3154}
!216 = !{i64 3176}
!217 = !{i64 3183}
!218 = !{i64 3200}
!219 = !{i64 3213}
!220 = !{i64 3230}
!221 = !{i64 3237}
!222 = !{i64 3243}
!223 = !{i64 3258}
!224 = !{i64 3276}
!225 = !{i64 3283}
!226 = !{i64 3289}
!227 = !{i64 3300}
!228 = !{i64 3315}
!229 = !{i64 3343}
!230 = !{i64 3350}
!231 = !{i64 3386}
!232 = !{i64 3392}
!233 = !{i64 3406}
!234 = !{i64 3436}
!235 = !{i64 3441}
!236 = !{i64 3456}
!237 = !{i64 3461}
!238 = !{i64 3464}
!239 = !{i64 3466}
!240 = !{i64 3476}
!241 = !{i64 3497}
!242 = !{i64 3503}
!243 = !{i64 3523}
!244 = !{i64 3529}
!245 = !{i64 3557}
!246 = !{i64 3566}
!247 = !{i64 3569}
!248 = !{i64 3571}
!249 = !{i64 3573}
!250 = !{i64 3591}
!251 = !{i64 3598}
!252 = !{i64 3604}
!253 = !{i64 3619}
!254 = !{i64 3633}
!255 = !{i64 3653}
### Assistant: %"class.std::__cxx11::list" = type { %"class.std::__cxx11::_List_base" }
%"class.std::__cxx11::_List_base" = type { %"struct.std::__cxx11::_List_base<int *, std::allocator<int *>>::_List_impl" }
%"struct.std::__cxx11::_List_base<int *, std::allocator<int *>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"* }
%"struct.std::_List_iterator" = type { %"struct.std::__detail::_List_node_base"* }
%"class.std::allocator" = type { i8 }
%"struct.std::_List_const_iterator" = type { %"struct.std::__detail::_List_node_base"* }
%"struct.std::__false_type" = type { i8 }
%"class.__gnu_cxx::new_allocator" = type { i8 }
%"struct.std::_List_node" = type { %"struct.std::__detail::_List_node_base", %"struct.__gnu_cxx::__aligned_membuf" }
%"struct.__gnu_cxx::__aligned_membuf" = type { [8 x i8] }
%"struct.std::__allocated_ptr" = type { %"class.std::allocator"*, %"struct.std::_List_node"* }
$_ZNSt7__cxx114listIPiSaIS1_EEC2Ev = comdat any
$_ZNSt7__cxx114listIPiSaIS1_EE9push_backERKS1_ = comdat any
$_ZNSt7__cxx114listIPiSaIS1_EEC2ERKS3_ = comdat any
$_ZNSt7__cxx114listIPiSaIS1_EED2Ev = comdat any
$_ZNSt7__cxx1110_List_baseIPiSaIS1_EEC2Ev = comdat any
$_ZNSt7__cxx1110_List_baseIPiSaIS1_EE10_List_implC2Ev = comdat any
$_ZNSaISt10_List_nodeIPiEEC2Ev = comdat any
$_ZNSt8__detail17_List_node_headerC2Ev = comdat any
$_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPiEEC2Ev = comdat any
$_ZNSt8__detail17_List_node_header7_M_initEv = comdat any
$_ZNSt7__cxx1110_List_baseIPiSaIS1_EED2Ev = comdat any
$_ZNSt7__cxx1110_List_baseIPiSaIS1_EE8_M_clearEv = comdat any
$_ZNSt7__cxx1110_List_baseIPiSaIS1_EE10_List_implD2Ev = comdat any
$_ZNSt10_List_nodeIPiE9_M_valptrEv = comdat any
$__clang_call_terminate = comdat any
$_ZNSt16allocator_traitsISaISt10_List_nodeIPiEEE7destroyIS1_EEvRS3_PT_ = comdat any
$_ZNSt7__cxx1110_List_baseIPiSaIS1_EE21_M_get_Node_allocatorEv = comdat any
$_ZNSt7__cxx1110_List_baseIPiSaIS1_EE11_M_put_nodeEPSt10_List_nodeIS1_E = comdat any
$_ZN9__gnu_cxx16__aligned_membufIPiE6_M_ptrEv = comdat any
$_ZN9__gnu_cxx16__aligned_membufIPiE7_M_addrEv = comdat any
$_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPiEE7destroyIS2_EEvPT_ = comdat any
$_ZNSt16allocator_traitsISaISt10_List_nodeIPiEEE10deallocateERS3_PS2_m = comdat any
$_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPiEE10deallocateEPS3_m = comdat any
$_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPiEED2Ev = comdat any
$_ZNSt7__cxx114listIPiSaIS1_EE9_M_insertIJRKS1_EEEvSt14_List_iteratorIS1_EDpOT_ = comdat any
$_ZNSt7__cxx114listIPiSaIS1_EE3endEv = comdat any
$_ZNSt7__cxx114listIPiSaIS1_EE14_M_create_nodeIJRKS1_EEEPSt10_List_nodeIS1_EDpOT_ = comdat any
$_ZSt7forwardIRKPiEOT_RNSt16remove_referenceIS3_E4typeE = comdat any
$_ZNSt7__cxx1110_List_baseIPiSaIS1_EE11_M_inc_sizeEm = comdat any
$_ZNSt7__cxx1110_List_baseIPiSaIS1_EE11_M_get_nodeEv = comdat any
$_ZNSt15__allocated_ptrISaISt10_List_nodeIPiEEEC2ERS3_PS2_ = comdat any
$_ZNSt16allocator_traitsISaISt10_List_nodeIPiEEE9constructIS1_JRKS1_EEEvRS3_PT_DpOT0_ = comdat any
$_ZNSt15__allocated_ptrISaISt10_List_nodeIPiEEEaSEDn = comdat any
$_ZNSt15__allocated_ptrISaISt10_List_nodeIPiEEED2Ev = comdat any
$_ZNSt16allocator_traitsISaISt10_List_nodeIPiEEE8allocateERS3_m = comdat any
$_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPiEE8allocateEmPKv = comdat any
$_ZNK9__gnu_cxx13new_allocatorISt10_List_nodeIPiEE11_M_max_sizeEv = comdat any
$_ZSt11__addressofISaISt10_List_nodeIPiEEEPT_RS4_ = comdat any
$_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPiEE9constructIS2_JRKS2_EEEvPT_DpOT0_ = comdat any
$_ZNSt14_List_iteratorIPiEC2EPNSt8__detail15_List_node_baseE = comdat any
$_ZN9__gnu_cxx14__alloc_traitsISaISt10_List_nodeIPiEES3_E17_S_select_on_copyERKS4_ = comdat any
$_ZNKSt7__cxx1110_List_baseIPiSaIS1_EE21_M_get_Node_allocatorEv = comdat any
$_ZNSt7__cxx1110_List_baseIPiSaIS1_EEC2EOSaISt10_List_nodeIS1_EE = comdat any
$_ZNSaISt10_List_nodeIPiEED2Ev = comdat any
$_ZNSt7__cxx114listIPiSaIS1_EE22_M_initialize_dispatchISt20_List_const_iteratorIS1_EEEvT_S7_St12__false_type = comdat any
$_ZNKSt7__cxx114listIPiSaIS1_EE5beginEv = comdat any
$_ZNKSt7__cxx114listIPiSaIS1_EE3endEv = comdat any
$_ZNSt16allocator_traitsISaISt10_List_nodeIPiEEE37select_on_container_copy_constructionERKS3_ = comdat any
$_ZNSaISt10_List_nodeIPiEEC2ERKS2_ = comdat any
$_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPiEEC2ERKS4_ = comdat any
$_ZSt4moveIRSaISt10_List_nodeIPiEEEONSt16remove_referenceIT_E4typeEOS6_ = comdat any
$_ZNSt7__cxx1110_List_baseIPiSaIS1_EE10_List_implC2EOSaISt10_List_nodeIS1_EE = comdat any
$_ZStneRKSt20_List_const_iteratorIPiES3_ = comdat any
$_ZNSt7__cxx114listIPiSaIS1_EE12emplace_backIJRKS1_EEEvDpOT_ = comdat any
$_ZNKSt20_List_const_iteratorIPiEdeEv = comdat any
$_ZNSt20_List_const_iteratorIPiEppEv = comdat any
$_ZNKSt10_List_nodeIPiE9_M_valptrEv = comdat any
$_ZNK9__gnu_cxx16__aligned_membufIPiE6_M_ptrEv = comdat any
$_ZNK9__gnu_cxx16__aligned_membufIPiE7_M_addrEv = comdat any
$_ZNSt20_List_const_iteratorIPiEC2EPKNSt8__detail15_List_node_baseE = comdat any
; Function Attrs: noinline optnone uwtable
define dso_local void @_ZN61CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_loop_733badEv() #0 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%data = alloca i32*, align 8
%dataList = alloca %"class.std::__cxx11::list", align 8
%dataBadBuffer = alloca i32*, align 8
%dataGoodBuffer = alloca i32*, align 8
%exn.slot = alloca i8*, align 8
%ehselector.slot = alloca i32, align 4
%agg.tmp = alloca %"class.std::__cxx11::list", align 8
call void @_ZNSt7__cxx114listIPiSaIS1_EEC2Ev(%"class.std::__cxx11::list"* %dataList) #8
%0 = alloca i8, i64 200, align 16
%1 = bitcast i8* %0 to i32*
store i32* %1, i32** %dataBadBuffer, align 8
%2 = alloca i8, i64 400, align 16
%3 = bitcast i8* %2 to i32*
store i32* %3, i32** %dataGoodBuffer, align 8
%4 = load i32*, i32** %dataBadBuffer, align 8
store i32* %4, i32** %data, align 8
invoke void @_ZNSt7__cxx114listIPiSaIS1_EE9push_backERKS1_(%"class.std::__cxx11::list"* %dataList, i32** nonnull align 8 dereferenceable(8) %data)
to label %invoke.cont unwind label %lpad
invoke.cont: ; preds = %entry
invoke void @_ZNSt7__cxx114listIPiSaIS1_EE9push_backERKS1_(%"class.std::__cxx11::list"* %dataList, i32** nonnull align 8 dereferenceable(8) %data)
to label %invoke.cont1 unwind label %lpad
invoke.cont1: ; preds = %invoke.cont
invoke void @_ZNSt7__cxx114listIPiSaIS1_EE9push_backERKS1_(%"class.std::__cxx11::list"* %dataList, i32** nonnull align 8 dereferenceable(8) %data)
to label %invoke.cont2 unwind label %lpad
invoke.cont2: ; preds = %invoke.cont1
invoke void @_ZNSt7__cxx114listIPiSaIS1_EEC2ERKS3_(%"class.std::__cxx11::list"* %agg.tmp, %"class.std::__cxx11::list"* nonnull align 8 dereferenceable(24) %dataList)
to label %invoke.cont3 unwind label %lpad
invoke.cont3: ; preds = %invoke.cont2
invoke void @_ZN61CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_loop_737badSinkENSt7__cxx114listIPiSaIS2_EEE(%"class.std::__cxx11::list"* %agg.tmp)
to label %invoke.cont5 unwind label %lpad4
invoke.cont5: ; preds = %invoke.cont3
call void @_ZNSt7__cxx114listIPiSaIS1_EED2Ev(%"class.std::__cxx11::list"* %agg.tmp) #8
call void @_ZNSt7__cxx114listIPiSaIS1_EED2Ev(%"class.std::__cxx11::list"* %dataList) #8
ret void
lpad: ; preds = %invoke.cont2, %invoke.cont1, %invoke.cont, %entry
%5 = landingpad { i8*, i32 }
cleanup
%6 = extractvalue { i8*, i32 } %5, 0
store i8* %6, i8** %exn.slot, align 8
%7 = extractvalue { i8*, i32 } %5, 1
store i32 %7, i32* %ehselector.slot, align 4
br label %ehcleanup
lpad4: ; preds = %invoke.cont3
%8 = landingpad { i8*, i32 }
cleanup
%9 = extractvalue { i8*, i32 } %8, 0
store i8* %9, i8** %exn.slot, align 8
%10 = extractvalue { i8*, i32 } %8, 1
store i32 %10, i32* %ehselector.slot, align 4
call void @_ZNSt7__cxx114listIPiSaIS1_EED2Ev(%"class.std::__cxx11::list"* %agg.tmp) #8
br label %ehcleanup
ehcleanup: ; preds = %lpad4, %lpad
call void @_ZNSt7__cxx114listIPiSaIS1_EED2Ev(%"class.std::__cxx11::list"* %dataList) #8
br label %eh.resume
eh.resume: ; preds = %ehcleanup
%exn = load i8*, i8** %exn.slot, align 8
%sel = load i32, i32* %ehselector.slot, align 4
%lpad.val = insertvalue { i8*, i32 } undef, i8* %exn, 0
%lpad.val6 = insertvalue { i8*, i32 } %lpad.val, i32 %sel, 1
resume { i8*, i32 } %lpad.val6
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt7__cxx114listIPiSaIS1_EEC2Ev(%"class.std::__cxx11::list"* %this) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::__cxx11::list"*, align 8
store %"class.std::__cxx11::list"* %this, %"class.std::__cxx11::list"** %this.addr, align 8
%this1 = load %"class.std::__cxx11::list"*, %"class.std::__cxx11::list"** %this.addr, align 8
%0 = bitcast %"class.std::__cxx11::list"* %this1 to %"class.std::__cxx11::_List_base"*
call void @_ZNSt7__cxx1110_List_baseIPiSaIS1_EEC2Ev(%"class.std::__cxx11::_List_base"* %0) #8
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt7__cxx114listIPiSaIS1_EE9push_backERKS1_(%"class.std::__cxx11::list"* %this, i32** nonnull align 8 dereferenceable(8) %__x) #0 comdat align 2 {
entry:
%this.addr = alloca %"class.std::__cxx11::list"*, align 8
%__x.addr = alloca i32**, align 8
%agg.tmp = alloca %"struct.std::_List_iterator", align 8
store %"class.std::__cxx11::list"* %this, %"class.std::__cxx11::list"** %this.addr, align 8
store i32** %__x, i32*** %__x.addr, align 8
%this1 = load %"class.std::__cxx11::list"*, %"class.std::__cxx11::list"** %this.addr, align 8
%call = call %"struct.std::__detail::_List_node_base"* @_ZNSt7__cxx114listIPiSaIS1_EE3endEv(%"class.std::__cxx11::list"* %this1) #8
%coerce.dive = getelementptr inbounds %"struct.std::_List_iterator", %"struct.std::_List_iterator"* %agg.tmp, i32 0, i32 0
store %"struct.std::__detail::_List_node_base"* %call, %"struct.std::__detail::_List_node_base"** %coerce.dive, align 8
%0 = load i32**, i32*** %__x.addr, align 8
%coerce.dive2 = getelementptr inbounds %"struct.std::_List_iterator", %"struct.std::_List_iterator"* %agg.tmp, i32 0, i32 0
%1 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %coerce.dive2, align 8
call void @_ZNSt7__cxx114listIPiSaIS1_EE9_M_insertIJRKS1_EEEvSt14_List_iteratorIS1_EDpOT_(%"class.std::__cxx11::list"* %this1, %"struct.std::__detail::_List_node_base"* %1, i32** nonnull align 8 dereferenceable(8) %0)
ret void
}
declare dso_local i32 @__gxx_personality_v0(...)
declare dso_local void @_ZN61CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_loop_737badSinkENSt7__cxx114listIPiSaIS2_EEE(%"class.std::__cxx11::list"*) #2
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt7__cxx114listIPiSaIS1_EEC2ERKS3_(%"class.std::__cxx11::list"* %this, %"class.std::__cxx11::list"* nonnull align 8 dereferenceable(24) %__x) unnamed_addr #0 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%this.addr = alloca %"class.std::__cxx11::list"*, align 8
%__x.addr = alloca %"class.std::__cxx11::list"*, align 8
%ref.tmp = alloca %"class.std::allocator", align 1
%exn.slot = alloca i8*, align 8
%ehselector.slot = alloca i32, align 4
%agg.tmp = alloca %"struct.std::_List_const_iterator", align 8
%agg.tmp3 = alloca %"struct.std::_List_const_iterator", align 8
%agg.tmp6 = alloca %"struct.std::__false_type", align 1
store %"class.std::__cxx11::list"* %this, %"class.std::__cxx11::list"** %this.addr, align 8
store %"class.std::__cxx11::list"* %__x, %"class.std::__cxx11::list"** %__x.addr, align 8
%this1 = load %"class.std::__cxx11::list"*, %"class.std::__cxx11::list"** %this.addr, align 8
%0 = bitcast %"class.std::__cxx11::list"* %this1 to %"class.std::__cxx11::_List_base"*
%1 = load %"class.std::__cxx11::list"*, %"class.std::__cxx11::list"** %__x.addr, align 8
%2 = bitcast %"class.std::__cxx11::list"* %1 to %"class.std::__cxx11::_List_base"*
%call = call nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZNKSt7__cxx1110_List_baseIPiSaIS1_EE21_M_get_Node_allocatorEv(%"class.std::__cxx11::_List_base"* %2) #8
call void @_ZN9__gnu_cxx14__alloc_traitsISaISt10_List_nodeIPiEES3_E17_S_select_on_copyERKS4_(%"class.std::allocator"* sret align 1 %ref.tmp, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %call)
invoke void @_ZNSt7__cxx1110_List_baseIPiSaIS1_EEC2EOSaISt10_List_nodeIS1_EE(%"class.std::__cxx11::_List_base"* %0, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %ref.tmp)
to label %invoke.cont unwind label %lpad
invoke.cont: ; preds = %entry
call void @_ZNSaISt10_List_nodeIPiEED2Ev(%"class.std::allocator"* %ref.tmp) #8
%3 = load %"class.std::__cxx11::list"*, %"class.std::__cxx11::list"** %__x.addr, align 8
%call2 = call %"struct.std::__detail::_List_node_base"* @_ZNKSt7__cxx114listIPiSaIS1_EE5beginEv(%"class.std::__cxx11::list"* %3) #8
%coerce.dive = getelementptr inbounds %"struct.std::_List_const_iterator", %"struct.std::_List_const_iterator"* %agg.tmp, i32 0, i32 0
store %"struct.std::__detail::_List_node_base"* %call2, %"struct.std::__detail::_List_node_base"** %coerce.dive, align 8
%4 = load %"class.std::__cxx11::list"*, %"class.std::__cxx11::list"** %__x.addr, align 8
%call4 = call %"struct.std::__detail::_List_node_base"* @_ZNKSt7__cxx114listIPiSaIS1_EE3endEv(%"class.std::__cxx11::list"* %4) #8
%coerce.dive5 = getelementptr inbounds %"struct.std::_List_const_iterator", %"struct.std::_List_const_iterator"* %agg.tmp3, i32 0, i32 0
store %"struct.std::__detail::_List_node_base"* %call4, %"struct.std::__detail::_List_node_base"** %coerce.dive5, align 8
%coerce.dive7 = getelementptr inbounds %"struct.std::_List_const_iterator", %"struct.std::_List_const_iterator"* %agg.tmp, i32 0, i32 0
%5 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %coerce.dive7, align 8
%coerce.dive8 = getelementptr inbounds %"struct.std::_List_const_iterator", %"struct.std::_List_const_iterator"* %agg.tmp3, i32 0, i32 0
%6 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %coerce.dive8, align 8
invoke void @_ZNSt7__cxx114listIPiSaIS1_EE22_M_initialize_dispatchISt20_List_const_iteratorIS1_EEEvT_S7_St12__false_type(%"class.std::__cxx11::list"* %this1, %"struct.std::__detail::_List_node_base"* %5, %"struct.std::__detail::_List_node_base"* %6)
to label %invoke.cont10 unwind label %lpad9
invoke.cont10: ; preds = %invoke.cont
ret void
lpad: ; preds = %entry
%7 = landingpad { i8*, i32 }
cleanup
%8 = extractvalue { i8*, i32 } %7, 0
store i8* %8, i8** %exn.slot, align 8
%9 = extractvalue { i8*, i32 } %7, 1
store i32 %9, i32* %ehselector.slot, align 4
call void @_ZNSaISt10_List_nodeIPiEED2Ev(%"class.std::allocator"* %ref.tmp) #8
br label %eh.resume
lpad9: ; preds = %invoke.cont
%10 = landingpad { i8*, i32 }
cleanup
%11 = extractvalue { i8*, i32 } %10, 0
store i8* %11, i8** %exn.slot, align 8
%12 = extractvalue { i8*, i32 } %10, 1
store i32 %12, i32* %ehselector.slot, align 4
%13 = bitcast %"class.std::__cxx11::list"* %this1 to %"class.std::__cxx11::_List_base"*
call void @_ZNSt7__cxx1110_List_baseIPiSaIS1_EED2Ev(%"class.std::__cxx11::_List_base"* %13) #8
br label %eh.resume
eh.resume: ; preds = %lpad9, %lpad
%exn = load i8*, i8** %exn.slot, align 8
%sel = load i32, i32* %ehselector.slot, align 4
%lpad.val = insertvalue { i8*, i32 } undef, i8* %exn, 0
%lpad.val11 = insertvalue { i8*, i32 } %lpad.val, i32 %sel, 1
resume { i8*, i32 } %lpad.val11
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt7__cxx114listIPiSaIS1_EED2Ev(%"class.std::__cxx11::list"* %this) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::__cxx11::list"*, align 8
store %"class.std::__cxx11::list"* %this, %"class.std::__cxx11::list"** %this.addr, align 8
%this1 = load %"class.std::__cxx11::list"*, %"class.std::__cxx11::list"** %this.addr, align 8
%0 = bitcast %"class.std::__cxx11::list"* %this1 to %"class.std::__cxx11::_List_base"*
call void @_ZNSt7__cxx1110_List_baseIPiSaIS1_EED2Ev(%"class.std::__cxx11::_List_base"* %0) #8
ret void
}
; Function Attrs: noinline optnone uwtable
define dso_local void @_ZN61CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_loop_734goodEv() #0 {
entry:
call void @_ZN61CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_loop_73L7goodG2BEv()
ret void
}
; Function Attrs: noinline optnone uwtable
define internal void @_ZN61CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_loop_73L7goodG2BEv() #0 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%data = alloca i32*, align 8
%dataList = alloca %"class.std::__cxx11::list", align 8
%dataBadBuffer = alloca i32*, align 8
%dataGoodBuffer = alloca i32*, align 8
%exn.slot = alloca i8*, align 8
%ehselector.slot = alloca i32, align 4
%agg.tmp = alloca %"class.std::__cxx11::list", align 8
call void @_ZNSt7__cxx114listIPiSaIS1_EEC2Ev(%"class.std::__cxx11::list"* %dataList) #8
%0 = alloca i8, i64 200, align 16
%1 = bitcast i8* %0 to i32*
store i32* %1, i32** %dataBadBuffer, align 8
%2 = alloca i8, i64 400, align 16
%3 = bitcast i8* %2 to i32*
store i32* %3, i32** %dataGoodBuffer, align 8
%4 = load i32*, i32** %dataGoodBuffer, align 8
store i32* %4, i32** %data, align 8
invoke void @_ZNSt7__cxx114listIPiSaIS1_EE9push_backERKS1_(%"class.std::__cxx11::list"* %dataList, i32** nonnull align 8 dereferenceable(8) %data)
to label %invoke.cont unwind label %lpad
invoke.cont: ; preds = %entry
invoke void @_ZNSt7__cxx114listIPiSaIS1_EE9push_backERKS1_(%"class.std::__cxx11::list"* %dataList, i32** nonnull align 8 dereferenceable(8) %data)
to label %invoke.cont1 unwind label %lpad
invoke.cont1: ; preds = %invoke.cont
invoke void @_ZNSt7__cxx114listIPiSaIS1_EE9push_backERKS1_(%"class.std::__cxx11::list"* %dataList, i32** nonnull align 8 dereferenceable(8) %data)
to label %invoke.cont2 unwind label %lpad
invoke.cont2: ; preds = %invoke.cont1
invoke void @_ZNSt7__cxx114listIPiSaIS1_EEC2ERKS3_(%"class.std::__cxx11::list"* %agg.tmp, %"class.std::__cxx11::list"* nonnull align 8 dereferenceable(24) %dataList)
to label %invoke.cont3 unwind label %lpad
invoke.cont3: ; preds = %invoke.cont2
invoke void @_ZN61CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_loop_7311goodG2BSinkENSt7__cxx114listIPiSaIS2_EEE(%"class.std::__cxx11::list"* %agg.tmp)
to label %invoke.cont5 unwind label %lpad4
invoke.cont5: ; preds = %invoke.cont3
call void @_ZNSt7__cxx114listIPiSaIS1_EED2Ev(%"class.std::__cxx11::list"* %agg.tmp) #8
call void @_ZNSt7__cxx114listIPiSaIS1_EED2Ev(%"class.std::__cxx11::list"* %dataList) #8
ret void
lpad: ; preds = %invoke.cont2, %invoke.cont1, %invoke.cont, %entry
%5 = landingpad { i8*, i32 }
cleanup
%6 = extractvalue { i8*, i32 } %5, 0
store i8* %6, i8** %exn.slot, align 8
%7 = extractvalue { i8*, i32 } %5, 1
store i32 %7, i32* %ehselector.slot, align 4
br label %ehcleanup
lpad4: ; preds = %invoke.cont3
%8 = landingpad { i8*, i32 }
cleanup
%9 = extractvalue { i8*, i32 } %8, 0
store i8* %9, i8** %exn.slot, align 8
%10 = extractvalue { i8*, i32 } %8, 1
store i32 %10, i32* %ehselector.slot, align 4
call void @_ZNSt7__cxx114listIPiSaIS1_EED2Ev(%"class.std::__cxx11::list"* %agg.tmp) #8
br label %ehcleanup
ehcleanup: ; preds = %lpad4, %lpad
call void @_ZNSt7__cxx114listIPiSaIS1_EED2Ev(%"class.std::__cxx11::list"* %dataList) #8
br label %eh.resume
eh.resume: ; preds = %ehcleanup
%exn = load i8*, i8** %exn.slot, align 8
%sel = load i32, i32* %ehselector.slot, align 4
%lpad.val = insertvalue { i8*, i32 } undef, i8* %exn, 0
%lpad.val6 = insertvalue { i8*, i32 } %lpad.val, i32 %sel, 1
resume { i8*, i32 } %lpad.val6
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt7__cxx1110_List_baseIPiSaIS1_EEC2Ev(%"class.std::__cxx11::_List_base"* %this) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::__cxx11::_List_base"*, align 8
store %"class.std::__cxx11::_List_base"* %this, %"class.std::__cxx11::_List_base"** %this.addr, align 8
%this1 = load %"class.std::__cxx11::_List_base"*, %"class.std::__cxx11::_List_base"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::__cxx11::_List_base", %"class.std::__cxx11::_List_base"* %this1, i32 0, i32 0
call void @_ZNSt7__cxx1110_List_baseIPiSaIS1_EE10_List_implC2Ev(%"struct.std::__cxx11::_List_base<int *, std::allocator<int *>>::_List_impl"* %_M_impl) #8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt7__cxx1110_List_baseIPiSaIS1_EE10_List_implC2Ev(%"struct.std::__cxx11::_List_base<int *, std::allocator<int *>>::_List_impl"* %this) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::__cxx11::_List_base<int *, std::allocator<int *>>::_List_impl"*, align 8
store %"struct.std::__cxx11::_List_base<int *, std::allocator<int *>>::_List_impl"* %this, %"struct.std::__cxx11::_List_base<int *, std::allocator<int *>>::_List_impl"** %this.addr, align 8
%this1 = load %"struct.std::__cxx11::_List_base<int *, std::allocator<int *>>::_List_impl"*, %"struct.std::__cxx11::_List_base<int *, std::allocator<int *>>::_List_impl"** %this.addr, align 8
%0 = bitcast %"struct.std::__cxx11::_List_base<int *, std::allocator<int *>>::_List_impl"* %this1 to %"class.std::allocator"*
call void @_ZNSaISt10_List_nodeIPiEEC2Ev(%"class.std::allocator"* %0) #8
%_M_node = getelementptr inbounds %"struct.std::__cxx11::_List_base<int *, std::allocator<int *>>::_List_impl", %"struct.std::__cxx11::_List_base<int *, std::allocator<int *>>::_List_impl"* %this1, i32 0, i32 0
call void @_ZNSt8__detail17_List_node_headerC2Ev(%"struct.std::__detail::_List_node_header"* %_M_node) #8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSaISt10_List_nodeIPiEEC2Ev(%"class.std::allocator"* %this) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::allocator"*, align 8
store %"class.std::allocator"* %this, %"class.std::allocator"** %this.addr, align 8
%this1 = load %"class.std::allocator"*, %"class.std::allocator"** %this.addr, align 8
%0 = bitcast %"class.std::allocator"* %this1 to %"class.__gnu_cxx::new_allocator"*
call void @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPiEEC2Ev(%"class.__gnu_cxx::new_allocator"* %0) #8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt8__detail17_List_node_headerC2Ev(%"struct.std::__detail::_List_node_header"* %this) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::__detail::_List_node_header"*, align 8
store %"struct.std::__detail::_List_node_header"* %this, %"struct.std::__detail::_List_node_header"** %this.addr, align 8
%this1 = load %"struct.std::__detail::_List_node_header"*, %"struct.std::__detail::_List_node_header"** %this.addr, align 8
%0 = bitcast %"struct.std::__detail::_List_node_header"* %this1 to %"struct.std::__detail::_List_node_base"*
call void @_ZNSt8__detail17_List_node_header7_M_initEv(%"struct.std::__detail::_List_node_header"* %this1) #8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPiEEC2Ev(%"class.__gnu_cxx::new_allocator"* %this) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
%this1 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt8__detail17_List_node_header7_M_initEv(%"struct.std::__detail::_List_node_header"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::__detail::_List_node_header"*, align 8
store %"struct.std::__detail::_List_node_header"* %this, %"struct.std::__detail::_List_node_header"** %this.addr, align 8
%this1 = load %"struct.std::__detail::_List_node_header"*, %"struct.std::__detail::_List_node_header"** %this.addr, align 8
%0 = bitcast %"struct.std::__detail::_List_node_header"* %this1 to %"struct.std::__detail::_List_node_base"*
%1 = bitcast %"struct.std::__detail::_List_node_header"* %this1 to %"struct.std::__detail::_List_node_base"*
%_M_prev = getelementptr inbounds %"struct.std::__detail::_List_node_base", %"struct.std::__detail::_List_node_base"* %1, i32 0, i32 1
store %"struct.std::__detail::_List_node_base"* %0, %"struct.std::__detail::_List_node_base"** %_M_prev, align 8
%2 = bitcast %"struct.std::__detail::_List_node_header"* %this1 to %"struct.std::__detail::_List_node_base"*
%_M_next = getelementptr inbounds %"struct.std::__detail::_List_node_base", %"struct.std::__detail::_List_node_base"* %2, i32 0, i32 0
store %"struct.std::__detail::_List_node_base"* %0, %"struct.std::__detail::_List_node_base"** %_M_next, align 8
%_M_size = getelementptr inbounds %"struct.std::__detail::_List_node_header", %"struct.std::__detail::_List_node_header"* %this1, i32 0, i32 1
store i64 0, i64* %_M_size, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt7__cxx1110_List_baseIPiSaIS1_EED2Ev(%"class.std::__cxx11::_List_base"* %this) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::__cxx11::_List_base"*, align 8
store %"class.std::__cxx11::_List_base"* %this, %"class.std::__cxx11::_List_base"** %this.addr, align 8
%this1 = load %"class.std::__cxx11::_List_base"*, %"class.std::__cxx11::_List_base"** %this.addr, align 8
call void @_ZNSt7__cxx1110_List_baseIPiSaIS1_EE8_M_clearEv(%"class.std::__cxx11::_List_base"* %this1) #8
%_M_impl = getelementptr inbounds %"class.std::__cxx11::_List_base", %"class.std::__cxx11::_List_base"* %this1, i32 0, i32 0
call void @_ZNSt7__cxx1110_List_baseIPiSaIS1_EE10_List_implD2Ev(%"struct.std::__cxx11::_List_base<int *, std::allocator<int *>>::_List_impl"* %_M_impl) #8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt7__cxx1110_List_baseIPiSaIS1_EE8_M_clearEv(%"class.std::__cxx11::_List_base"* %this) #1 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%this.addr = alloca %"class.std::__cxx11::_List_base"*, align 8
%__cur = alloca %"struct.std::__detail::_List_node_base"*, align 8
%__tmp = alloca %"struct.std::_List_node"*, align 8
%__val = alloca i32**, align 8
store %"class.std::__cxx11::_List_base"* %this, %"class.std::__cxx11::_List_base"** %this.addr, align 8
%this1 = load %"class.std::__cxx11::_List_base"*, %"class.std::__cxx11::_List_base"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::__cxx11::_List_base", %"class.std::__cxx11::_List_base"* %this1, i32 0, i32 0
%_M_node = getelementptr inbounds %"struct.std::__cxx11::_List_base<int *, std::allocator<int *>>::_List_impl", %"struct.std::__cxx11::_List_base<int *, std::allocator<int *>>::_List_impl"* %_M_impl, i32 0, i32 0
%0 = bitcast %"struct.std::__detail::_List_node_header"* %_M_node to %"struct.std::__detail::_List_node_base"*
%_M_next = getelementptr inbounds %"struct.std::__detail::_List_node_base", %"struct.std::__detail::_List_node_base"* %0, i32 0, i32 0
%1 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %_M_next, align 8
store %"struct.std::__detail::_List_node_base"* %1, %"struct.std::__detail::_List_node_base"** %__cur, align 8
br label %while.cond
while.cond: ; preds = %invoke.cont, %entry
%2 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %__cur, align 8
%_M_impl2 = getelementptr inbounds %"class.std::__cxx11::_List_base", %"class.std::__cxx11::_List_base"* %this1, i32 0, i32 0
%_M_node3 = getelementptr inbounds %"struct.std::__cxx11::_List_base<int *, std::allocator<int *>>::_List_impl", %"struct.std::__cxx11::_List_base<int *, std::allocator<int *>>::_List_impl"* %_M_impl2, i32 0, i32 0
%3 = bitcast %"struct.std::__detail::_List_node_header"* %_M_node3 to %"struct.std::__detail::_List_node_base"*
%cmp = icmp ne %"struct.std::__detail::_List_node_base"* %2, %3
br i1 %cmp, label %while.body, label %while.end
while.body: ; preds = %while.cond
%4 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %__cur, align 8
%5 = bitcast %"struct.std::__detail::_List_node_base"* %4 to %"struct.std::_List_node"*
store %"struct.std::_List_node"* %5, %"struct.std::_List_node"** %__tmp, align 8
%6 = load %"struct.std::_List_node"*, %"struct.std::_List_node"** %__tmp, align 8
%7 = bitcast %"struct.std::_List_node"* %6 to %"struct.std::__detail::_List_node_base"*
%_M_next4 = getelementptr inbounds %"struct.std::__detail::_List_node_base", %"struct.std::__detail::_List_node_base"* %7, i32 0, i32 0
%8 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %_M_next4, align 8
store %"struct.std::__detail::_List_node_base"* %8, %"struct.std::__detail::_List_node_base"** %__cur, align 8
%9 = load %"struct.std::_List_node"*, %"struct.std::_List_node"** %__tmp, align 8
%call = invoke i32** @_ZNSt10_List_nodeIPiE9_M_valptrEv(%"struct.std::_List_node"* %9)
to label %invoke.cont unwind label %terminate.lpad
invoke.cont: ; preds = %while.body
store i32** %call, i32*** %__val, align 8
%call5 = call nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZNSt7__cxx1110_List_baseIPiSaIS1_EE21_M_get_Node_allocatorEv(%"class.std::__cxx11::_List_base"* %this1) #8
%10 = load i32**, i32*** %__val, align 8
call void @_ZNSt16allocator_traitsISaISt10_List_nodeIPiEEE7destroyIS1_EEvRS3_PT_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %call5, i32** %10) #8
%11 = load %"struct.std::_List_node"*, %"struct.std::_List_node"** %__tmp, align 8
call void @_ZNSt7__cxx1110_List_baseIPiSaIS1_EE11_M_put_nodeEPSt10_List_nodeIS1_E(%"class.std::__cxx11::_List_base"* %this1, %"struct.std::_List_node"* %11) #8
br label %while.cond
while.end: ; preds = %while.cond
ret void
terminate.lpad: ; preds = %while.body
%12 = landingpad { i8*, i32 }
catch i8* null
%13 = extractvalue { i8*, i32 } %12, 0
call void @__clang_call_terminate(i8* %13) #9
unreachable
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt7__cxx1110_List_baseIPiSaIS1_EE10_List_implD2Ev(%"struct.std::__cxx11::_List_base<int *, std::allocator<int *>>::_List_impl"* %this) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::__cxx11::_List_base<int *, std::allocator<int *>>::_List_impl"*, align 8
store %"struct.std::__cxx11::_List_base<int *, std::allocator<int *>>::_List_impl"* %this, %"struct.std::__cxx11::_List_base<int *, std::allocator<int *>>::_List_impl"** %this.addr, align 8
%this1 = load %"struct.std::__cxx11::_List_base<int *, std::allocator<int *>>::_List_impl"*, %"struct.std::__cxx11::_List_base<int *, std::allocator<int *>>::_List_impl"** %this.addr, align 8
%0 = bitcast %"struct.std::__cxx11::_List_base<int *, std::allocator<int *>>::_List_impl"* %this1 to %"class.std::allocator"*
call void @_ZNSaISt10_List_nodeIPiEED2Ev(%"class.std::allocator"* %0) #8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i32** @_ZNSt10_List_nodeIPiE9_M_valptrEv(%"struct.std::_List_node"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_List_node"*, align 8
store %"struct.std::_List_node"* %this, %"struct.std::_List_node"** %this.addr, align 8
%this1 = load %"struct.std::_List_node"*, %"struct.std::_List_node"** %this.addr, align 8
%_M_storage = getelementptr inbounds %"struct.std::_List_node", %"struct.std::_List_node"* %this1, i32 0, i32 1
%call = call i32** @_ZN9__gnu_cxx16__aligned_membufIPiE6_M_ptrEv(%"struct.__gnu_cxx::__aligned_membuf"* %_M_storage) #8
ret i32** %call
}
; Function Attrs: noinline noreturn nounwind
define linkonce_odr hidden void @__clang_call_terminate(i8* %0) #3 comdat {
%2 = call i8* @__cxa_begin_catch(i8* %0) #8
call void @_ZSt9terminatev() #9
unreachable
}
declare dso_local i8* @__cxa_begin_catch(i8*)
declare dso_local void @_ZSt9terminatev()
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt16allocator_traitsISaISt10_List_nodeIPiEEE7destroyIS1_EEvRS3_PT_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a, i32** %__p) #1 comdat align 2 {
entry:
%__a.addr = alloca %"class.std::allocator"*, align 8
%__p.addr = alloca i32**, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
store i32** %__p, i32*** %__p.addr, align 8
%0 = load %"class.std::allocator"*, %"class.std::allocator"** %__a.addr, align 8
%1 = bitcast %"class.std::allocator"* %0 to %"class.__gnu_cxx::new_allocator"*
%2 = load i32**, i32*** %__p.addr, align 8
call void @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPiEE7destroyIS2_EEvPT_(%"class.__gnu_cxx::new_allocator"* %1, i32** %2) #8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZNSt7__cxx1110_List_baseIPiSaIS1_EE21_M_get_Node_allocatorEv(%"class.std::__cxx11::_List_base"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::__cxx11::_List_base"*, align 8
store %"class.std::__cxx11::_List_base"* %this, %"class.std::__cxx11::_List_base"** %this.addr, align 8
%this1 = load %"class.std::__cxx11::_List_base"*, %"class.std::__cxx11::_List_base"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::__cxx11::_List_base", %"class.std::__cxx11::_List_base"* %this1, i32 0, i32 0
%0 = bitcast %"struct.std::__cxx11::_List_base<int *, std::allocator<int *>>::_List_impl"* %_M_impl to %"class.std::allocator"*
ret %"class.std::allocator"* %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt7__cxx1110_List_baseIPiSaIS1_EE11_M_put_nodeEPSt10_List_nodeIS1_E(%"class.std::__cxx11::_List_base"* %this, %"struct.std::_List_node"* %__p) #1 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%this.addr = alloca %"class.std::__cxx11::_List_base"*, align 8
%__p.addr = alloca %"struct.std::_List_node"*, align 8
store %"class.std::__cxx11::_List_base"* %this, %"class.std::__cxx11::_List_base"** %this.addr, align 8
store %"struct.std::_List_node"* %__p, %"struct.std::_List_node"** %__p.addr, align 8
%this1 = load %"class.std::__cxx11::_List_base"*, %"class.std::__cxx11::_List_base"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::__cxx11::_List_base", %"class.std::__cxx11::_List_base"* %this1, i32 0, i32 0
%0 = bitcast %"struct.std::__cxx11::_List_base<int *, std::allocator<int *>>::_List_impl"* %_M_impl to %"class.std::allocator"*
%1 = load %"struct.std::_List_node"*, %"struct.std::_List_node"** %__p.addr, align 8
invoke void @_ZNSt16allocator_traitsISaISt10_List_nodeIPiEEE10deallocateERS3_PS2_m(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %0, %"struct.std::_List_node"* %1, i64 1)
to label %invoke.cont unwind label %terminate.lpad
invoke.cont: ; preds = %entry
ret void
terminate.lpad: ; preds = %entry
%2 = landingpad { i8*, i32 }
catch i8* null
%3 = extractvalue { i8*, i32 } %2, 0
call void @__clang_call_terminate(i8* %3) #9
unreachable
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i32** @_ZN9__gnu_cxx16__aligned_membufIPiE6_M_ptrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.__gnu_cxx::__aligned_membuf"*, align 8
store %"struct.__gnu_cxx::__aligned_membuf"* %this, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%this1 = load %"struct.__gnu_cxx::__aligned_membuf"*, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%call = call i8* @_ZN9__gnu_cxx16__aligned_membufIPiE7_M_addrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this1) #8
%0 = bitcast i8* %call to i32**
ret i32** %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i8* @_ZN9__gnu_cxx16__aligned_membufIPiE7_M_addrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.__gnu_cxx::__aligned_membuf"*, align 8
store %"struct.__gnu_cxx::__aligned_membuf"* %this, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%this1 = load %"struct.__gnu_cxx::__aligned_membuf"*, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%_M_storage = getelementptr inbounds %"struct.__gnu_cxx::__aligned_membuf", %"struct.__gnu_cxx::__aligned_membuf"* %this1, i32 0, i32 0
%0 = bitcast [8 x i8]* %_M_storage to i8*
ret i8* %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPiEE7destroyIS2_EEvPT_(%"class.__gnu_cxx::new_allocator"* %this, i32** %__p) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
%__p.addr = alloca i32**, align 8
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
store i32** %__p, i32*** %__p.addr, align 8
%this1 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt16allocator_traitsISaISt10_List_nodeIPiEEE10deallocateERS3_PS2_m(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a, %"struct.std::_List_node"* %__p, i64 %__n) #0 comdat align 2 {
entry:
%__a.addr = alloca %"class.std::allocator"*, align 8
%__p.addr = alloca %"struct.std::_List_node"*, align 8
%__n.addr = alloca i64, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
store %"struct.std::_List_node"* %__p, %"struct.std::_List_node"** %__p.addr, align 8
store i64 %__n, i64* %__n.addr, align 8
%0 = load %"class.std::allocator"*, %"class.std::allocator"** %__a.addr, align 8
%1 = bitcast %"class.std::allocator"* %0 to %"class.__gnu_cxx::new_allocator"*
%2 = load %"struct.std::_List_node"*, %"struct.std::_List_node"** %__p.addr, align 8
%3 = load i64, i64* %__n.addr, align 8
call void @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPiEE10deallocateEPS3_m(%"class.__gnu_cxx::new_allocator"* %1, %"struct.std::_List_node"* %2, i64 %3)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPiEE10deallocateEPS3_m(%"class.__gnu_cxx::new_allocator"* %this, %"struct.std::_List_node"* %__p, i64 %__t) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
%__p.addr = alloca %"struct.std::_List_node"*, align 8
%__t.addr = alloca i64, align 8
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
store %"struct.std::_List_node"* %__p, %"struct.std::_List_node"** %__p.addr, align 8
store i64 %__t, i64* %__t.addr, align 8
%this1 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
%0 = load %"struct.std::_List_node"*, %"struct.std::_List_node"** %__p.addr, align 8
%1 = bitcast %"struct.std::_List_node"* %0 to i8*
call void @_ZdlPv(i8* %1) #8
ret void
}
; Function Attrs: nobuiltin nounwind
declare dso_local void @_ZdlPv(i8*) #4
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPiEED2Ev(%"class.__gnu_cxx::new_allocator"* %this) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
%this1 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
ret void
}
declare dso_local void @_ZN61CWE121_Stack_Based_Buffer_Overflow__CWE805_int_alloca_loop_7311goodG2BSinkENSt7__cxx114listIPiSaIS2_EEE(%"class.std::__cxx11::list"*) #2
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt7__cxx114listIPiSaIS1_EE9_M_insertIJRKS1_EEEvSt14_List_iteratorIS1_EDpOT_(%"class.std::__cxx11::list"* %this, %"struct.std::__detail::_List_node_base"* %__position.coerce, i32** nonnull align 8 dereferenceable(8) %__args) #0 comdat align 2 {
entry:
%__position = alloca %"struct.std::_List_iterator", align 8
%this.addr = alloca %"class.std::__cxx11::list"*, align 8
%__args.addr = alloca i32**, align 8
%__tmp = alloca %"struct.std::_List_node"*, align 8
%coerce.dive = getelementptr inbounds %"struct.std::_List_iterator", %"struct.std::_List_iterator"* %__position, i32 0, i32 0
store %"struct.std::__detail::_List_node_base"* %__position.coerce, %"struct.std::__detail::_List_node_base"** %coerce.dive, align 8
store %"class.std::__cxx11::list"* %this, %"class.std::__cxx11::list"** %this.addr, align 8
store i32** %__args, i32*** %__args.addr, align 8
%this1 = load %"class.std::__cxx11::list"*, %"class.std::__cxx11::list"** %this.addr, align 8
%0 = load i32**, i32*** %__args.addr, align 8
%call = call nonnull align 8 dereferenceable(8) i32** @_ZSt7forwardIRKPiEOT_RNSt16remove_referenceIS3_E4typeE(i32** nonnull align 8 dereferenceable(8) %0) #8
%call2 = call %"struct.std::_List_node"* @_ZNSt7__cxx114listIPiSaIS1_EE14_M_create_nodeIJRKS1_EEEPSt10_List_nodeIS1_EDpOT_(%"class.std::__cxx11::list"* %this1, i32** nonnull align 8 dereferenceable(8) %call)
store %"struct.std::_List_node"* %call2, %"struct.std::_List_node"** %__tmp, align 8
%1 = load %"struct.std::_List_node"*, %"struct.std::_List_node"** %__tmp, align 8
%2 = bitcast %"struct.std::_List_node"* %1 to %"struct.std::__detail::_List_node_base"*
%_M_node = getelementptr inbounds %"struct.std::_List_iterator", %"struct.std::_List_iterator"* %__position, i32 0, i32 0
%3 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %_M_node, align 8
call void @_ZNSt8__detail15_List_node_base7_M_hookEPS0_(%"struct.std::__detail::_List_node_base"* %2, %"struct.std::__detail::_List_node_base"* %3) #8
%4 = bitcast %"class.std::__cxx11::list"* %this1 to %"class.std::__cxx11::_List_base"*
call void @_ZNSt7__cxx1110_List_baseIPiSaIS1_EE11_M_inc_sizeEm(%"class.std::__cxx11::_List_base"* %4, i64 1)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::__detail::_List_node_base"* @_ZNSt7__cxx114listIPiSaIS1_EE3endEv(%"class.std::__cxx11::list"* %this) #1 comdat align 2 {
entry:
%retval = alloca %"struct.std::_List_iterator", align 8
%this.addr = alloca %"class.std::__cxx11::list"*, align 8
store %"class.std::__cxx11::list"* %this, %"class.std::__cxx11::list"** %this.addr, align 8
%this1 = load %"class.std::__cxx11::list"*, %"class.std::__cxx11::list"** %this.addr, align 8
%0 = bitcast %"class.std::__cxx11::list"* %this1 to %"class.std::__cxx11::_List_base"*
%_M_impl = getelementptr inbounds %"class.std::__cxx11::_List_base", %"class.std::__cxx11::_List_base"* %0, i32 0, i32 0
%_M_node = getelementptr inbounds %"struct.std::__cxx11::_List_base<int *, std::allocator<int *>>::_List_impl", %"struct.std::__cxx11::_List_base<int *, std::allocator<int *>>::_List_impl"* %_M_impl, i32 0, i32 0
%1 = bitcast %"struct.std::__detail::_List_node_header"* %_M_node to %"struct.std::__detail::_List_node_base"*
call void @_ZNSt14_List_iteratorIPiEC2EPNSt8__detail15_List_node_baseE(%"struct.std::_List_iterator"* %retval, %"struct.std::__detail::_List_node_base"* %1) #8
%coerce.dive = getelementptr inbounds %"struct.std::_List_iterator", %"struct.std::_List_iterator"* %retval, i32 0, i32 0
%2 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %coerce.dive, align 8
ret %"struct.std::__detail::_List_node_base"* %2
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_List_node"* @_ZNSt7__cxx114listIPiSaIS1_EE14_M_create_nodeIJRKS1_EEEPSt10_List_nodeIS1_EDpOT_(%"class.std::__cxx11::list"* %this, i32** nonnull align 8 dereferenceable(8) %__args) #0 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%this.addr = alloca %"class.std::__cxx11::list"*, align 8
%__args.addr = alloca i32**, align 8
%__p = alloca %"struct.std::_List_node"*, align 8
%__alloc = alloca %"class.std::allocator"*, align 8
%__guard = alloca %"struct.std::__allocated_ptr", align 8
%exn.slot = alloca i8*, align 8
%ehselector.slot = alloca i32, align 4
store %"class.std::__cxx11::list"* %this, %"class.std::__cxx11::list"** %this.addr, align 8
store i32** %__args, i32*** %__args.addr, align 8
%this1 = load %"class.std::__cxx11::list"*, %"class.std::__cxx11::list"** %this.addr, align 8
%0 = bitcast %"class.std::__cxx11::list"* %this1 to %"class.std::__cxx11::_List_base"*
%call = call %"struct.std::_List_node"* @_ZNSt7__cxx1110_List_baseIPiSaIS1_EE11_M_get_nodeEv(%"class.std::__cxx11::_List_base"* %0)
store %"struct.std::_List_node"* %call, %"struct.std::_List_node"** %__p, align 8
%1 = bitcast %"class.std::__cxx11::list"* %this1 to %"class.std::__cxx11::_List_base"*
%call2 = call nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZNSt7__cxx1110_List_baseIPiSaIS1_EE21_M_get_Node_allocatorEv(%"class.std::__cxx11::_List_base"* %1) #8
store %"class.std::allocator"* %call2, %"class.std::allocator"** %__alloc, align 8
%2 = load %"class.std::allocator"*, %"class.std::allocator"** %__alloc, align 8
%3 = load %"struct.std::_List_node"*, %"struct.std::_List_node"** %__p, align 8
call void @_ZNSt15__allocated_ptrISaISt10_List_nodeIPiEEEC2ERS3_PS2_(%"struct.std::__allocated_ptr"* %__guard, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %2, %"struct.std::_List_node"* %3) #8
%4 = load %"class.std::allocator"*, %"class.std::allocator"** %__alloc, align 8
%5 = load %"struct.std::_List_node"*, %"struct.std::_List_node"** %__p, align 8
%call3 = invoke i32** @_ZNSt10_List_nodeIPiE9_M_valptrEv(%"struct.std::_List_node"* %5)
to label %invoke.cont unwind label %lpad
invoke.cont: ; preds = %entry
%6 = load i32**, i32*** %__args.addr, align 8
%call4 = call nonnull align 8 dereferenceable(8) i32** @_ZSt7forwardIRKPiEOT_RNSt16remove_referenceIS3_E4typeE(i32** nonnull align 8 dereferenceable(8) %6) #8
call void @_ZNSt16allocator_traitsISaISt10_List_nodeIPiEEE9constructIS1_JRKS1_EEEvRS3_PT_DpOT0_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %4, i32** %call3, i32** nonnull align 8 dereferenceable(8) %call4) #8
%call5 = call nonnull align 8 dereferenceable(16) %"struct.std::__allocated_ptr"* @_ZNSt15__allocated_ptrISaISt10_List_nodeIPiEEEaSEDn(%"struct.std::__allocated_ptr"* %__guard, i8* null) #8
%7 = load %"struct.std::_List_node"*, %"struct.std::_List_node"** %__p, align 8
call void @_ZNSt15__allocated_ptrISaISt10_List_nodeIPiEEED2Ev(%"struct.std::__allocated_ptr"* %__guard) #8
ret %"struct.std::_List_node"* %7
lpad: ; preds = %entry
%8 = landingpad { i8*, i32 }
cleanup
%9 = extractvalue { i8*, i32 } %8, 0
store i8* %9, i8** %exn.slot, align 8
%10 = extractvalue { i8*, i32 } %8, 1
store i32 %10, i32* %ehselector.slot, align 4
call void @_ZNSt15__allocated_ptrISaISt10_List_nodeIPiEEED2Ev(%"struct.std::__allocated_ptr"* %__guard) #8
br label %eh.resume
eh.resume: ; preds = %lpad
%exn = load i8*, i8** %exn.slot, align 8
%sel = load i32, i32* %ehselector.slot, align 4
%lpad.val = insertvalue { i8*, i32 } undef, i8* %exn, 0
%lpad.val6 = insertvalue { i8*, i32 } %lpad.val, i32 %sel, 1
resume { i8*, i32 } %lpad.val6
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) i32** @_ZSt7forwardIRKPiEOT_RNSt16remove_referenceIS3_E4typeE(i32** nonnull align 8 dereferenceable(8) %__t) #1 comdat {
entry:
%__t.addr = alloca i32**, align 8
store i32** %__t, i32*** %__t.addr, align 8
%0 = load i32**, i32*** %__t.addr, align 8
ret i32** %0
}
; Function Attrs: nounwind
declare dso_local void @_ZNSt8__detail15_List_node_base7_M_hookEPS0_(%"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"*) #5
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt7__cxx1110_List_baseIPiSaIS1_EE11_M_inc_sizeEm(%"class.std::__cxx11::_List_base"* %this, i64 %__n) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::__cxx11::_List_base"*, align 8
%__n.addr = alloca i64, align 8
store %"class.std::__cxx11::_List_base"* %this, %"class.std::__cxx11::_List_base"** %this.addr, align 8
store i64 %__n, i64* %__n.addr, align 8
%this1 = load %"class.std::__cxx11::_List_base"*, %"class.std::__cxx11::_List_base"** %this.addr, align 8
%0 = load i64, i64* %__n.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::__cxx11::_List_base", %"class.std::__cxx11::_List_base"* %this1, i32 0, i32 0
%_M_node = getelementptr inbounds %"struct.std::__cxx11::_List_base<int *, std::allocator<int *>>::_List_impl", %"struct.std::__cxx11::_List_base<int *, std::allocator<int *>>::_List_impl"* %_M_impl, i32 0, i32 0
%_M_size = getelementptr inbounds %"struct.std::__detail::_List_node_header", %"struct.std::__detail::_List_node_header"* %_M_node, i32 0, i32 1
%1 = load i64, i64* %_M_size, align 8
%add = add i64 %1, %0
store i64 %add, i64* %_M_size, align 8
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_List_node"* @_ZNSt7__cxx1110_List_baseIPiSaIS1_EE11_M_get_nodeEv(%"class.std::__cxx11::_List_base"* %this) #0 comdat align 2 {
entry:
%this.addr = alloca %"class.std::__cxx11::_List_base"*, align 8
store %"class.std::__cxx11::_List_base"* %this, %"class.std::__cxx11::_List_base"** %this.addr, align 8
%this1 = load %"class.std::__cxx11::_List_base"*, %"class.std::__cxx11::_List_base"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::__cxx11::_List_base", %"class.std::__cxx11::_List_base"* %this1, i32 0, i32 0
%0 = bitcast %"struct.std::__cxx11::_List_base<int *, std::allocator<int *>>::_List_impl"* %_M_impl to %"class.std::allocator"*
%call = call %"struct.std::_List_node"* @_ZNSt16allocator_traitsISaISt10_List_nodeIPiEEE8allocateERS3_m(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %0, i64 1)
ret %"struct.std::_List_node"* %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt15__allocated_ptrISaISt10_List_nodeIPiEEEC2ERS3_PS2_(%"struct.std::__allocated_ptr"* %this, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a, %"struct.std::_List_node"* %__ptr) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::__allocated_ptr"*, align 8
%__a.addr = alloca %"class.std::allocator"*, align 8
%__ptr.addr = alloca %"struct.std::_List_node"*, align 8
store %"struct.std::__allocated_ptr"* %this, %"struct.std::__allocated_ptr"** %this.addr, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
store %"struct.std::_List_node"* %__ptr, %"struct.std::_List_node"** %__ptr.addr, align 8
%this1 = load %"struct.std::__allocated_ptr"*, %"struct.std::__allocated_ptr"** %this.addr, align 8
%_M_alloc = getelementptr inbounds %"struct.std::__allocated_ptr", %"struct.std::__allocated_ptr"* %this1, i32 0, i32 0
%0 = load %"class.std::allocator"*, %"class.std::allocator"** %__a.addr, align 8
%call = call %"class.std::allocator"* @_ZSt11__addressofISaISt10_List_nodeIPiEEEPT_RS4_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %0) #8
store %"class.std::allocator"* %call, %"class.std::allocator"** %_M_alloc, align 8
%_M_ptr = getelementptr inbounds %"struct.std::__allocated_ptr", %"struct.std::__allocated_ptr"* %this1, i32 0, i32 1
%1 = load %"struct.std::_List_node"*, %"struct.std::_List_node"** %__ptr.addr, align 8
store %"struct.std::_List_node"* %1, %"struct.std::_List_node"** %_M_ptr, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt16allocator_traitsISaISt10_List_nodeIPiEEE9constructIS1_JRKS1_EEEvRS3_PT_DpOT0_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a, i32** %__p, i32** nonnull align 8 dereferenceable(8) %__args) #1 comdat align 2 {
entry:
%__a.addr = alloca %"class.std::allocator"*, align 8
%__p.addr = alloca i32**, align 8
%__args.addr = alloca i32**, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
store i32** %__p, i32*** %__p.addr, align 8
store i32** %__args, i32*** %__args.addr, align 8
%0 = load %"class.std::allocator"*, %"class.std::allocator"** %__a.addr, align 8
%1 = bitcast %"class.std::allocator"* %0 to %"class.__gnu_cxx::new_allocator"*
%2 = load i32**, i32*** %__p.addr, align 8
%3 = load i32**, i32*** %__args.addr, align 8
%call = call nonnull align 8 dereferenceable(8) i32** @_ZSt7forwardIRKPiEOT_RNSt16remove_referenceIS3_E4typeE(i32** nonnull align 8 dereferenceable(8) %3) #8
call void @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPiEE9constructIS2_JRKS2_EEEvPT_DpOT0_(%"class.__gnu_cxx::new_allocator"* %1, i32** %2, i32** nonnull align 8 dereferenceable(8) %call) #8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(16) %"struct.std::__allocated_ptr"* @_ZNSt15__allocated_ptrISaISt10_List_nodeIPiEEEaSEDn(%"struct.std::__allocated_ptr"* %this, i8* %0) #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::__allocated_ptr"*, align 8
%.addr = alloca i8*, align 8
store %"struct.std::__allocated_ptr"* %this, %"struct.std::__allocated_ptr"** %this.addr, align 8
store i8* %0, i8** %.addr, align 8
%this1 = load %"struct.std::__allocated_ptr"*, %"struct.std::__allocated_ptr"** %this.addr, align 8
%_M_ptr = getelementptr inbounds %"struct.std::__allocated_ptr", %"struct.std::__allocated_ptr"* %this1, i32 0, i32 1
store %"struct.std::_List_node"* null, %"struct.std::_List_node"** %_M_ptr, align 8
ret %"struct.std::__allocated_ptr"* %this1
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt15__allocated_ptrISaISt10_List_nodeIPiEEED2Ev(%"struct.std::__allocated_ptr"* %this) unnamed_addr #1 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%this.addr = alloca %"struct.std::__allocated_ptr"*, align 8
store %"struct.std::__allocated_ptr"* %this, %"struct.std::__allocated_ptr"** %this.addr, align 8
%this1 = load %"struct.std::__allocated_ptr"*, %"struct.std::__allocated_ptr"** %this.addr, align 8
%_M_ptr = getelementptr inbounds %"struct.std::__allocated_ptr", %"struct.std::__allocated_ptr"* %this1, i32 0, i32 1
%0 = load %"struct.std::_List_node"*, %"struct.std::_List_node"** %_M_ptr, align 8
%cmp = icmp ne %"struct.std::_List_node"* %0, null
br i1 %cmp, label %if.then, label %if.end
if.then: ; preds = %entry
%_M_alloc = getelementptr inbounds %"struct.std::__allocated_ptr", %"struct.std::__allocated_ptr"* %this1, i32 0, i32 0
%1 = load %"class.std::allocator"*, %"class.std::allocator"** %_M_alloc, align 8
%_M_ptr2 = getelementptr inbounds %"struct.std::__allocated_ptr", %"struct.std::__allocated_ptr"* %this1, i32 0, i32 1
%2 = load %"struct.std::_List_node"*, %"struct.std::_List_node"** %_M_ptr2, align 8
invoke void @_ZNSt16allocator_traitsISaISt10_List_nodeIPiEEE10deallocateERS3_PS2_m(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %1, %"struct.std::_List_node"* %2, i64 1)
to label %invoke.cont unwind label %terminate.lpad
invoke.cont: ; preds = %if.then
br label %if.end
if.end: ; preds = %invoke.cont, %entry
ret void
terminate.lpad: ; preds = %if.then
%3 = landingpad { i8*, i32 }
catch i8* null
%4 = extractvalue { i8*, i32 } %3, 0
call void @__clang_call_terminate(i8* %4) #9
unreachable
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_List_node"* @_ZNSt16allocator_traitsISaISt10_List_nodeIPiEEE8allocateERS3_m(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a, i64 %__n) #0 comdat align 2 {
entry:
%__a.addr = alloca %"class.std::allocator"*, align 8
%__n.addr = alloca i64, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
store i64 %__n, i64* %__n.addr, align 8
%0 = load %"class.std::allocator"*, %"class.std::allocator"** %__a.addr, align 8
%1 = bitcast %"class.std::allocator"* %0 to %"class.__gnu_cxx::new_allocator"*
%2 = load i64, i64* %__n.addr, align 8
%call = call %"struct.std::_List_node"* @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPiEE8allocateEmPKv(%"class.__gnu_cxx::new_allocator"* %1, i64 %2, i8* null)
ret %"struct.std::_List_node"* %call
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local %"struct.std::_List_node"* @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPiEE8allocateEmPKv(%"class.__gnu_cxx::new_allocator"* %this, i64 %__n, i8* %0) #0 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
%__n.addr = alloca i64, align 8
%.addr = alloca i8*, align 8
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
store i64 %__n, i64* %__n.addr, align 8
store i8* %0, i8** %.addr, align 8
%this1 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
%1 = load i64, i64* %__n.addr, align 8
%call = call i64 @_ZNK9__gnu_cxx13new_allocatorISt10_List_nodeIPiEE11_M_max_sizeEv(%"class.__gnu_cxx::new_allocator"* %this1) #8
%cmp = icmp ugt i64 %1, %call
br i1 %cmp, label %if.then, label %if.end4
if.then: ; preds = %entry
%2 = load i64, i64* %__n.addr, align 8
%cmp2 = icmp ugt i64 %2, 768614336404564650
br i1 %cmp2, label %if.then3, label %if.end
if.then3: ; preds = %if.then
call void @_ZSt28__throw_bad_array_new_lengthv() #10
unreachable
if.end: ; preds = %if.then
call void @_ZSt17__throw_bad_allocv() #10
unreachable
if.end4: ; preds = %entry
%3 = load i64, i64* %__n.addr, align 8
%mul = mul i64 %3, 24
%call5 = call noalias nonnull i8* @_Znwm(i64 %mul) #11
%4 = bitcast i8* %call5 to %"struct.std::_List_node"*
ret %"struct.std::_List_node"* %4
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i64 @_ZNK9__gnu_cxx13new_allocatorISt10_List_nodeIPiEE11_M_max_sizeEv(%"class.__gnu_cxx::new_allocator"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
%this1 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
ret i64 384307168202282325
}
; Function Attrs: noreturn
declare dso_local void @_ZSt28__throw_bad_array_new_lengthv() #6
; Function Attrs: noreturn
declare dso_local void @_ZSt17__throw_bad_allocv() #6
; Function Attrs: nobuiltin allocsize(0)
declare dso_local nonnull i8* @_Znwm(i64) #7
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"class.std::allocator"* @_ZSt11__addressofISaISt10_List_nodeIPiEEEPT_RS4_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %__r) #1 comdat {
entry:
%__r.addr = alloca %"class.std::allocator"*, align 8
store %"class.std::allocator"* %__r, %"class.std::allocator"** %__r.addr, align 8
%0 = load %"class.std::allocator"*, %"class.std::allocator"** %__r.addr, align 8
ret %"class.std::allocator"* %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPiEE9constructIS2_JRKS2_EEEvPT_DpOT0_(%"class.__gnu_cxx::new_allocator"* %this, i32** %__p, i32** nonnull align 8 dereferenceable(8) %__args) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
%__p.addr = alloca i32**, align 8
%__args.addr = alloca i32**, align 8
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
store i32** %__p, i32*** %__p.addr, align 8
store i32** %__args, i32*** %__args.addr, align 8
%this1 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
%0 = load i32**, i32*** %__p.addr, align 8
%1 = bitcast i32** %0 to i8*
%2 = bitcast i8* %1 to i32**
%3 = load i32**, i32*** %__args.addr, align 8
%call = call nonnull align 8 dereferenceable(8) i32** @_ZSt7forwardIRKPiEOT_RNSt16remove_referenceIS3_E4typeE(i32** nonnull align 8 dereferenceable(8) %3) #8
%4 = load i32*, i32** %call, align 8
store i32* %4, i32** %2, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt14_List_iteratorIPiEC2EPNSt8__detail15_List_node_baseE(%"struct.std::_List_iterator"* %this, %"struct.std::__detail::_List_node_base"* %__x) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_List_iterator"*, align 8
%__x.addr = alloca %"struct.std::__detail::_List_node_base"*, align 8
store %"struct.std::_List_iterator"* %this, %"struct.std::_List_iterator"** %this.addr, align 8
store %"struct.std::__detail::_List_node_base"* %__x, %"struct.std::__detail::_List_node_base"** %__x.addr, align 8
%this1 = load %"struct.std::_List_iterator"*, %"struct.std::_List_iterator"** %this.addr, align 8
%_M_node = getelementptr inbounds %"struct.std::_List_iterator", %"struct.std::_List_iterator"* %this1, i32 0, i32 0
%0 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %__x.addr, align 8
store %"struct.std::__detail::_List_node_base"* %0, %"struct.std::__detail::_List_node_base"** %_M_node, align 8
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx14__alloc_traitsISaISt10_List_nodeIPiEES3_E17_S_select_on_copyERKS4_(%"class.std::allocator"* noalias sret align 1 %agg.result, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a) #0 comdat align 2 {
entry:
%result.ptr = alloca i8*, align 8
%__a.addr = alloca %"class.std::allocator"*, align 8
%0 = bitcast %"class.std::allocator"* %agg.result to i8*
store i8* %0, i8** %result.ptr, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
%1 = load %"class.std::allocator"*, %"class.std::allocator"** %__a.addr, align 8
call void @_ZNSt16allocator_traitsISaISt10_List_nodeIPiEEE37select_on_container_copy_constructionERKS3_(%"class.std::allocator"* sret align 1 %agg.result, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %1)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZNKSt7__cxx1110_List_baseIPiSaIS1_EE21_M_get_Node_allocatorEv(%"class.std::__cxx11::_List_base"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::__cxx11::_List_base"*, align 8
store %"class.std::__cxx11::_List_base"* %this, %"class.std::__cxx11::_List_base"** %this.addr, align 8
%this1 = load %"class.std::__cxx11::_List_base"*, %"class.std::__cxx11::_List_base"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::__cxx11::_List_base", %"class.std::__cxx11::_List_base"* %this1, i32 0, i32 0
%0 = bitcast %"struct.std::__cxx11::_List_base<int *, std::allocator<int *>>::_List_impl"* %_M_impl to %"class.std::allocator"*
ret %"class.std::allocator"* %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt7__cxx1110_List_baseIPiSaIS1_EEC2EOSaISt10_List_nodeIS1_EE(%"class.std::__cxx11::_List_base"* %this, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::__cxx11::_List_base"*, align 8
%__a.addr = alloca %"class.std::allocator"*, align 8
store %"class.std::__cxx11::_List_base"* %this, %"class.std::__cxx11::_List_base"** %this.addr, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
%this1 = load %"class.std::__cxx11::_List_base"*, %"class.std::__cxx11::_List_base"** %this.addr, align 8
%_M_impl = getelementptr inbounds %"class.std::__cxx11::_List_base", %"class.std::__cxx11::_List_base"* %this1, i32 0, i32 0
%0 = load %"class.std::allocator"*, %"class.std::allocator"** %__a.addr, align 8
%call = call nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZSt4moveIRSaISt10_List_nodeIPiEEEONSt16remove_referenceIT_E4typeEOS6_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %0) #8
call void @_ZNSt7__cxx1110_List_baseIPiSaIS1_EE10_List_implC2EOSaISt10_List_nodeIS1_EE(%"struct.std::__cxx11::_List_base<int *, std::allocator<int *>>::_List_impl"* %_M_impl, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %call) #8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSaISt10_List_nodeIPiEED2Ev(%"class.std::allocator"* %this) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::allocator"*, align 8
store %"class.std::allocator"* %this, %"class.std::allocator"** %this.addr, align 8
%this1 = load %"class.std::allocator"*, %"class.std::allocator"** %this.addr, align 8
%0 = bitcast %"class.std::allocator"* %this1 to %"class.__gnu_cxx::new_allocator"*
call void @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPiEED2Ev(%"class.__gnu_cxx::new_allocator"* %0) #8
ret void
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt7__cxx114listIPiSaIS1_EE22_M_initialize_dispatchISt20_List_const_iteratorIS1_EEEvT_S7_St12__false_type(%"class.std::__cxx11::list"* %this, %"struct.std::__detail::_List_node_base"* %__first.coerce, %"struct.std::__detail::_List_node_base"* %__last.coerce) #0 comdat align 2 {
entry:
%__first = alloca %"struct.std::_List_const_iterator", align 8
%__last = alloca %"struct.std::_List_const_iterator", align 8
%0 = alloca %"struct.std::__false_type", align 1
%this.addr = alloca %"class.std::__cxx11::list"*, align 8
%coerce.dive = getelementptr inbounds %"struct.std::_List_const_iterator", %"struct.std::_List_const_iterator"* %__first, i32 0, i32 0
store %"struct.std::__detail::_List_node_base"* %__first.coerce, %"struct.std::__detail::_List_node_base"** %coerce.dive, align 8
%coerce.dive1 = getelementptr inbounds %"struct.std::_List_const_iterator", %"struct.std::_List_const_iterator"* %__last, i32 0, i32 0
store %"struct.std::__detail::_List_node_base"* %__last.coerce, %"struct.std::__detail::_List_node_base"** %coerce.dive1, align 8
store %"class.std::__cxx11::list"* %this, %"class.std::__cxx11::list"** %this.addr, align 8
%this2 = load %"class.std::__cxx11::list"*, %"class.std::__cxx11::list"** %this.addr, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %entry
%call = call zeroext i1 @_ZStneRKSt20_List_const_iteratorIPiES3_(%"struct.std::_List_const_iterator"* nonnull align 8 dereferenceable(8) %__first, %"struct.std::_List_const_iterator"* nonnull align 8 dereferenceable(8) %__last) #8
br i1 %call, label %for.body, label %for.end
for.body: ; preds = %for.cond
%call3 = call nonnull align 8 dereferenceable(8) i32** @_ZNKSt20_List_const_iteratorIPiEdeEv(%"struct.std::_List_const_iterator"* %__first) #8
call void @_ZNSt7__cxx114listIPiSaIS1_EE12emplace_backIJRKS1_EEEvDpOT_(%"class.std::__cxx11::list"* %this2, i32** nonnull align 8 dereferenceable(8) %call3)
br label %for.inc
for.inc: ; preds = %for.body
%call4 = call nonnull align 8 dereferenceable(8) %"struct.std::_List_const_iterator"* @_ZNSt20_List_const_iteratorIPiEppEv(%"struct.std::_List_const_iterator"* %__first) #8
br label %for.cond
for.end: ; preds = %for.cond
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::__detail::_List_node_base"* @_ZNKSt7__cxx114listIPiSaIS1_EE5beginEv(%"class.std::__cxx11::list"* %this) #1 comdat align 2 {
entry:
%retval = alloca %"struct.std::_List_const_iterator", align 8
%this.addr = alloca %"class.std::__cxx11::list"*, align 8
store %"class.std::__cxx11::list"* %this, %"class.std::__cxx11::list"** %this.addr, align 8
%this1 = load %"class.std::__cxx11::list"*, %"class.std::__cxx11::list"** %this.addr, align 8
%0 = bitcast %"class.std::__cxx11::list"* %this1 to %"class.std::__cxx11::_List_base"*
%_M_impl = getelementptr inbounds %"class.std::__cxx11::_List_base", %"class.std::__cxx11::_List_base"* %0, i32 0, i32 0
%_M_node = getelementptr inbounds %"struct.std::__cxx11::_List_base<int *, std::allocator<int *>>::_List_impl", %"struct.std::__cxx11::_List_base<int *, std::allocator<int *>>::_List_impl"* %_M_impl, i32 0, i32 0
%1 = bitcast %"struct.std::__detail::_List_node_header"* %_M_node to %"struct.std::__detail::_List_node_base"*
%_M_next = getelementptr inbounds %"struct.std::__detail::_List_node_base", %"struct.std::__detail::_List_node_base"* %1, i32 0, i32 0
%2 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %_M_next, align 8
call void @_ZNSt20_List_const_iteratorIPiEC2EPKNSt8__detail15_List_node_baseE(%"struct.std::_List_const_iterator"* %retval, %"struct.std::__detail::_List_node_base"* %2) #8
%coerce.dive = getelementptr inbounds %"struct.std::_List_const_iterator", %"struct.std::_List_const_iterator"* %retval, i32 0, i32 0
%3 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %coerce.dive, align 8
ret %"struct.std::__detail::_List_node_base"* %3
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local %"struct.std::__detail::_List_node_base"* @_ZNKSt7__cxx114listIPiSaIS1_EE3endEv(%"class.std::__cxx11::list"* %this) #1 comdat align 2 {
entry:
%retval = alloca %"struct.std::_List_const_iterator", align 8
%this.addr = alloca %"class.std::__cxx11::list"*, align 8
store %"class.std::__cxx11::list"* %this, %"class.std::__cxx11::list"** %this.addr, align 8
%this1 = load %"class.std::__cxx11::list"*, %"class.std::__cxx11::list"** %this.addr, align 8
%0 = bitcast %"class.std::__cxx11::list"* %this1 to %"class.std::__cxx11::_List_base"*
%_M_impl = getelementptr inbounds %"class.std::__cxx11::_List_base", %"class.std::__cxx11::_List_base"* %0, i32 0, i32 0
%_M_node = getelementptr inbounds %"struct.std::__cxx11::_List_base<int *, std::allocator<int *>>::_List_impl", %"struct.std::__cxx11::_List_base<int *, std::allocator<int *>>::_List_impl"* %_M_impl, i32 0, i32 0
%1 = bitcast %"struct.std::__detail::_List_node_header"* %_M_node to %"struct.std::__detail::_List_node_base"*
call void @_ZNSt20_List_const_iteratorIPiEC2EPKNSt8__detail15_List_node_baseE(%"struct.std::_List_const_iterator"* %retval, %"struct.std::__detail::_List_node_base"* %1) #8
%coerce.dive = getelementptr inbounds %"struct.std::_List_const_iterator", %"struct.std::_List_const_iterator"* %retval, i32 0, i32 0
%2 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %coerce.dive, align 8
ret %"struct.std::__detail::_List_node_base"* %2
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt16allocator_traitsISaISt10_List_nodeIPiEEE37select_on_container_copy_constructionERKS3_(%"class.std::allocator"* noalias sret align 1 %agg.result, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %__rhs) #1 comdat align 2 {
entry:
%result.ptr = alloca i8*, align 8
%__rhs.addr = alloca %"class.std::allocator"*, align 8
%0 = bitcast %"class.std::allocator"* %agg.result to i8*
store i8* %0, i8** %result.ptr, align 8
store %"class.std::allocator"* %__rhs, %"class.std::allocator"** %__rhs.addr, align 8
%1 = load %"class.std::allocator"*, %"class.std::allocator"** %__rhs.addr, align 8
call void @_ZNSaISt10_List_nodeIPiEEC2ERKS2_(%"class.std::allocator"* %agg.result, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %1) #8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSaISt10_List_nodeIPiEEC2ERKS2_(%"class.std::allocator"* %this, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"class.std::allocator"*, align 8
%__a.addr = alloca %"class.std::allocator"*, align 8
store %"class.std::allocator"* %this, %"class.std::allocator"** %this.addr, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
%this1 = load %"class.std::allocator"*, %"class.std::allocator"** %this.addr, align 8
%0 = bitcast %"class.std::allocator"* %this1 to %"class.__gnu_cxx::new_allocator"*
%1 = load %"class.std::allocator"*, %"class.std::allocator"** %__a.addr, align 8
%2 = bitcast %"class.std::allocator"* %1 to %"class.__gnu_cxx::new_allocator"*
call void @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPiEEC2ERKS4_(%"class.__gnu_cxx::new_allocator"* %0, %"class.__gnu_cxx::new_allocator"* nonnull align 1 dereferenceable(1) %2) #8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZN9__gnu_cxx13new_allocatorISt10_List_nodeIPiEEC2ERKS4_(%"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"* nonnull align 1 dereferenceable(1) %0) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
%.addr = alloca %"class.__gnu_cxx::new_allocator"*, align 8
store %"class.__gnu_cxx::new_allocator"* %this, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
store %"class.__gnu_cxx::new_allocator"* %0, %"class.__gnu_cxx::new_allocator"** %.addr, align 8
%this1 = load %"class.__gnu_cxx::new_allocator"*, %"class.__gnu_cxx::new_allocator"** %this.addr, align 8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZSt4moveIRSaISt10_List_nodeIPiEEEONSt16remove_referenceIT_E4typeEOS6_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %__t) #1 comdat {
entry:
%__t.addr = alloca %"class.std::allocator"*, align 8
store %"class.std::allocator"* %__t, %"class.std::allocator"** %__t.addr, align 8
%0 = load %"class.std::allocator"*, %"class.std::allocator"** %__t.addr, align 8
ret %"class.std::allocator"* %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt7__cxx1110_List_baseIPiSaIS1_EE10_List_implC2EOSaISt10_List_nodeIS1_EE(%"struct.std::__cxx11::_List_base<int *, std::allocator<int *>>::_List_impl"* %this, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %__a) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::__cxx11::_List_base<int *, std::allocator<int *>>::_List_impl"*, align 8
%__a.addr = alloca %"class.std::allocator"*, align 8
store %"struct.std::__cxx11::_List_base<int *, std::allocator<int *>>::_List_impl"* %this, %"struct.std::__cxx11::_List_base<int *, std::allocator<int *>>::_List_impl"** %this.addr, align 8
store %"class.std::allocator"* %__a, %"class.std::allocator"** %__a.addr, align 8
%this1 = load %"struct.std::__cxx11::_List_base<int *, std::allocator<int *>>::_List_impl"*, %"struct.std::__cxx11::_List_base<int *, std::allocator<int *>>::_List_impl"** %this.addr, align 8
%0 = bitcast %"struct.std::__cxx11::_List_base<int *, std::allocator<int *>>::_List_impl"* %this1 to %"class.std::allocator"*
%1 = load %"class.std::allocator"*, %"class.std::allocator"** %__a.addr, align 8
%call = call nonnull align 1 dereferenceable(1) %"class.std::allocator"* @_ZSt4moveIRSaISt10_List_nodeIPiEEEONSt16remove_referenceIT_E4typeEOS6_(%"class.std::allocator"* nonnull align 1 dereferenceable(1) %1) #8
call void @_ZNSaISt10_List_nodeIPiEEC2ERKS2_(%"class.std::allocator"* %0, %"class.std::allocator"* nonnull align 1 dereferenceable(1) %call) #8
%_M_node = getelementptr inbounds %"struct.std::__cxx11::_List_base<int *, std::allocator<int *>>::_List_impl", %"struct.std::__cxx11::_List_base<int *, std::allocator<int *>>::_List_impl"* %this1, i32 0, i32 0
call void @_ZNSt8__detail17_List_node_headerC2Ev(%"struct.std::__detail::_List_node_header"* %_M_node) #8
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local zeroext i1 @_ZStneRKSt20_List_const_iteratorIPiES3_(%"struct.std::_List_const_iterator"* nonnull align 8 dereferenceable(8) %__x, %"struct.std::_List_const_iterator"* nonnull align 8 dereferenceable(8) %__y) #1 comdat {
entry:
%__x.addr = alloca %"struct.std::_List_const_iterator"*, align 8
%__y.addr = alloca %"struct.std::_List_const_iterator"*, align 8
store %"struct.std::_List_const_iterator"* %__x, %"struct.std::_List_const_iterator"** %__x.addr, align 8
store %"struct.std::_List_const_iterator"* %__y, %"struct.std::_List_const_iterator"** %__y.addr, align 8
%0 = load %"struct.std::_List_const_iterator"*, %"struct.std::_List_const_iterator"** %__x.addr, align 8
%_M_node = getelementptr inbounds %"struct.std::_List_const_iterator", %"struct.std::_List_const_iterator"* %0, i32 0, i32 0
%1 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %_M_node, align 8
%2 = load %"struct.std::_List_const_iterator"*, %"struct.std::_List_const_iterator"** %__y.addr, align 8
%_M_node1 = getelementptr inbounds %"struct.std::_List_const_iterator", %"struct.std::_List_const_iterator"* %2, i32 0, i32 0
%3 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %_M_node1, align 8
%cmp = icmp ne %"struct.std::__detail::_List_node_base"* %1, %3
ret i1 %cmp
}
; Function Attrs: noinline optnone uwtable
define linkonce_odr dso_local void @_ZNSt7__cxx114listIPiSaIS1_EE12emplace_backIJRKS1_EEEvDpOT_(%"class.std::__cxx11::list"* %this, i32** nonnull align 8 dereferenceable(8) %__args) #0 comdat align 2 {
entry:
%this.addr = alloca %"class.std::__cxx11::list"*, align 8
%__args.addr = alloca i32**, align 8
%agg.tmp = alloca %"struct.std::_List_iterator", align 8
store %"class.std::__cxx11::list"* %this, %"class.std::__cxx11::list"** %this.addr, align 8
store i32** %__args, i32*** %__args.addr, align 8
%this1 = load %"class.std::__cxx11::list"*, %"class.std::__cxx11::list"** %this.addr, align 8
%call = call %"struct.std::__detail::_List_node_base"* @_ZNSt7__cxx114listIPiSaIS1_EE3endEv(%"class.std::__cxx11::list"* %this1) #8
%coerce.dive = getelementptr inbounds %"struct.std::_List_iterator", %"struct.std::_List_iterator"* %agg.tmp, i32 0, i32 0
store %"struct.std::__detail::_List_node_base"* %call, %"struct.std::__detail::_List_node_base"** %coerce.dive, align 8
%0 = load i32**, i32*** %__args.addr, align 8
%call2 = call nonnull align 8 dereferenceable(8) i32** @_ZSt7forwardIRKPiEOT_RNSt16remove_referenceIS3_E4typeE(i32** nonnull align 8 dereferenceable(8) %0) #8
%coerce.dive3 = getelementptr inbounds %"struct.std::_List_iterator", %"struct.std::_List_iterator"* %agg.tmp, i32 0, i32 0
%1 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %coerce.dive3, align 8
call void @_ZNSt7__cxx114listIPiSaIS1_EE9_M_insertIJRKS1_EEEvSt14_List_iteratorIS1_EDpOT_(%"class.std::__cxx11::list"* %this1, %"struct.std::__detail::_List_node_base"* %1, i32** nonnull align 8 dereferenceable(8) %call2)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) i32** @_ZNKSt20_List_const_iteratorIPiEdeEv(%"struct.std::_List_const_iterator"* %this) #1 comdat align 2 personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
entry:
%this.addr = alloca %"struct.std::_List_const_iterator"*, align 8
store %"struct.std::_List_const_iterator"* %this, %"struct.std::_List_const_iterator"** %this.addr, align 8
%this1 = load %"struct.std::_List_const_iterator"*, %"struct.std::_List_const_iterator"** %this.addr, align 8
%_M_node = getelementptr inbounds %"struct.std::_List_const_iterator", %"struct.std::_List_const_iterator"* %this1, i32 0, i32 0
%0 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %_M_node, align 8
%1 = bitcast %"struct.std::__detail::_List_node_base"* %0 to %"struct.std::_List_node"*
%call = invoke i32** @_ZNKSt10_List_nodeIPiE9_M_valptrEv(%"struct.std::_List_node"* %1)
to label %invoke.cont unwind label %terminate.lpad
invoke.cont: ; preds = %entry
ret i32** %call
terminate.lpad: ; preds = %entry
%2 = landingpad { i8*, i32 }
catch i8* null
%3 = extractvalue { i8*, i32 } %2, 0
call void @__clang_call_terminate(i8* %3) #9
unreachable
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local nonnull align 8 dereferenceable(8) %"struct.std::_List_const_iterator"* @_ZNSt20_List_const_iteratorIPiEppEv(%"struct.std::_List_const_iterator"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_List_const_iterator"*, align 8
store %"struct.std::_List_const_iterator"* %this, %"struct.std::_List_const_iterator"** %this.addr, align 8
%this1 = load %"struct.std::_List_const_iterator"*, %"struct.std::_List_const_iterator"** %this.addr, align 8
%_M_node = getelementptr inbounds %"struct.std::_List_const_iterator", %"struct.std::_List_const_iterator"* %this1, i32 0, i32 0
%0 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %_M_node, align 8
%_M_next = getelementptr inbounds %"struct.std::__detail::_List_node_base", %"struct.std::__detail::_List_node_base"* %0, i32 0, i32 0
%1 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %_M_next, align 8
%_M_node2 = getelementptr inbounds %"struct.std::_List_const_iterator", %"struct.std::_List_const_iterator"* %this1, i32 0, i32 0
store %"struct.std::__detail::_List_node_base"* %1, %"struct.std::__detail::_List_node_base"** %_M_node2, align 8
ret %"struct.std::_List_const_iterator"* %this1
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i32** @_ZNKSt10_List_nodeIPiE9_M_valptrEv(%"struct.std::_List_node"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_List_node"*, align 8
store %"struct.std::_List_node"* %this, %"struct.std::_List_node"** %this.addr, align 8
%this1 = load %"struct.std::_List_node"*, %"struct.std::_List_node"** %this.addr, align 8
%_M_storage = getelementptr inbounds %"struct.std::_List_node", %"struct.std::_List_node"* %this1, i32 0, i32 1
%call = call i32** @_ZNK9__gnu_cxx16__aligned_membufIPiE6_M_ptrEv(%"struct.__gnu_cxx::__aligned_membuf"* %_M_storage) #8
ret i32** %call
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i32** @_ZNK9__gnu_cxx16__aligned_membufIPiE6_M_ptrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.__gnu_cxx::__aligned_membuf"*, align 8
store %"struct.__gnu_cxx::__aligned_membuf"* %this, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%this1 = load %"struct.__gnu_cxx::__aligned_membuf"*, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%call = call i8* @_ZNK9__gnu_cxx16__aligned_membufIPiE7_M_addrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this1) #8
%0 = bitcast i8* %call to i32**
ret i32** %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local i8* @_ZNK9__gnu_cxx16__aligned_membufIPiE7_M_addrEv(%"struct.__gnu_cxx::__aligned_membuf"* %this) #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.__gnu_cxx::__aligned_membuf"*, align 8
store %"struct.__gnu_cxx::__aligned_membuf"* %this, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%this1 = load %"struct.__gnu_cxx::__aligned_membuf"*, %"struct.__gnu_cxx::__aligned_membuf"** %this.addr, align 8
%_M_storage = getelementptr inbounds %"struct.__gnu_cxx::__aligned_membuf", %"struct.__gnu_cxx::__aligned_membuf"* %this1, i32 0, i32 0
%0 = bitcast [8 x i8]* %_M_storage to i8*
ret i8* %0
}
; Function Attrs: noinline nounwind optnone uwtable
define linkonce_odr dso_local void @_ZNSt20_List_const_iteratorIPiEC2EPKNSt8__detail15_List_node_baseE(%"struct.std::_List_const_iterator"* %this, %"struct.std::__detail::_List_node_base"* %__x) unnamed_addr #1 comdat align 2 {
entry:
%this.addr = alloca %"struct.std::_List_const_iterator"*, align 8
%__x.addr = alloca %"struct.std::__detail::_List_node_base"*, align 8
store %"struct.std::_List_const_iterator"* %this, %"struct.std::_List_const_iterator"** %this.addr, align 8
store %"struct.std::__detail::_List_node_base"* %__x, %"struct.std::__detail::_List_node_base"** %__x.addr, align 8
%this1 = load %"struct.std::_List_const_iterator"*, %"struct.std::_List_const_iterator"** %this.addr, align 8
%_M_node = getelementptr inbounds %"struct.std::_List_const_iterator", %"struct.std::_List_const_iterator"* %this1, i32 0, i32 0
%0 = load %"struct.std::__detail::_List_node_base"*, %"struct.std::__detail::_List_node_base"** %__x.addr, align 8
store %"struct.std::__detail::_List_node_base"* %0, %"struct.std::__detail::_List_node_base"** %_M_node, align 8
ret void
}
attributes #0 = { noinline 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" }
attributes #1 = { 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" }
attributes #2 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #3 = { noinline noreturn nounwind }
attributes #4 = { nobuiltin nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #5 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #6 = { noreturn "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #7 = { nobuiltin allocsize(0) "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #8 = { nounwind }
attributes #9 = { noreturn nounwind }
attributes #10 = { noreturn }
attributes #11 = { allocsize(0) }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%stack_var_-120 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
%1 = ptrtoint i64* %stack_var_-120 to i64, !insn.addr !1
ret i64 %1, !insn.addr !2
}
define i64 @function_30() local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%.reg2mem = alloca i64, !insn.addr !3
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = trunc i64 %2 to i8
%4 = mul i8 %3, 2, !insn.addr !3
%5 = inttoptr i64 %2 to i8*, !insn.addr !3
store i8 %4, i8* %5, align 1, !insn.addr !3
%6 = add i64 %1, -8, !insn.addr !4
%7 = inttoptr i64 %6 to i64*, !insn.addr !4
%8 = load i64, i64* %7, align 8, !insn.addr !4
%9 = call i64 @__readfsqword(i64 40), !insn.addr !5
%10 = icmp eq i64 %9, %8, !insn.addr !5
store i64 0, i64* %.reg2mem, !insn.addr !6
br i1 %10, label %dec_label_pc_47, label %dec_label_pc_42, !insn.addr !6
dec_label_pc_42: ; preds = %dec_label_pc_30
%11 = call i64 @__stack_chk_fail(), !insn.addr !7
store i64 %11, i64* %.reg2mem, !insn.addr !7
br label %dec_label_pc_47, !insn.addr !7
dec_label_pc_47: ; preds = %dec_label_pc_42, %dec_label_pc_30
%.reload = load i64, i64* %.reg2mem, !insn.addr !8
ret i64 %.reload, !insn.addr !8
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_49:
%rax.0.reg2mem = alloca i64, !insn.addr !9
%stack_var_-128 = alloca i8*, align 8
%stack_var_-120 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !10
%1 = bitcast i64* %stack_var_-120 to i8*
store i8* %1, i8** %stack_var_-128, align 8, !insn.addr !11
store i8 0, i8* %1, align 8, !insn.addr !12
%2 = bitcast i8** %stack_var_-128 to i64*, !insn.addr !13
%3 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memcpy_64b_goodG2BSink(i64* nonnull %2), !insn.addr !13
%4 = call i64 @__readfsqword(i64 40), !insn.addr !14
%5 = icmp eq i64 %0, %4, !insn.addr !14
store i64 0, i64* %rax.0.reg2mem, !insn.addr !15
br i1 %5, label %dec_label_pc_90, label %dec_label_pc_8b, !insn.addr !15
dec_label_pc_8b: ; preds = %dec_label_pc_49
%6 = call i64 @__stack_chk_fail(), !insn.addr !16
store i64 %6, i64* %rax.0.reg2mem, !insn.addr !16
br label %dec_label_pc_90, !insn.addr !16
dec_label_pc_90: ; preds = %dec_label_pc_8b, %dec_label_pc_49
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !17
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memcpy_64_good() local_unnamed_addr {
dec_label_pc_92:
%0 = call i64 @goodG2B(), !insn.addr !18
ret i64 %0, !insn.addr !19
}
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memcpy_64b_goodG2BSink(i64*) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 8}
!1 = !{i64 27}
!2 = !{i64 35}
!3 = !{i64 48}
!4 = !{i64 51}
!5 = !{i64 55}
!6 = !{i64 64}
!7 = !{i64 66}
!8 = !{i64 72}
!9 = !{i64 73}
!10 = !{i64 81}
!11 = !{i64 100}
!12 = !{i64 108}
!13 = !{i64 118}
!14 = !{i64 128}
!15 = !{i64 137}
!16 = !{i64 139}
!17 = !{i64 145}
!18 = !{i64 155}
!19 = !{i64 162}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memcpy_64_bad() #0 {
entry:
%data = alloca i8*, align 8
%dataBadBuffer = alloca [50 x i8], align 16
%dataGoodBuffer = alloca [100 x i8], align 16
%arraydecay = getelementptr inbounds [50 x i8], [50 x i8]* %dataBadBuffer, i64 0, i64 0
store i8* %arraydecay, i8** %data, align 8
%0 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %0, i64 0
store i8 0, i8* %arrayidx, align 1
%1 = bitcast i8** %data to i8*
call void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memcpy_64b_badSink(i8* %1)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memcpy_64b_badSink(i8*) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memcpy_64_good() #0 {
entry:
call void @goodG2B()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B() #0 {
entry:
%data = alloca i8*, align 8
%dataBadBuffer = alloca [50 x i8], align 16
%dataGoodBuffer = alloca [100 x i8], align 16
%arraydecay = getelementptr inbounds [100 x i8], [100 x i8]* %dataGoodBuffer, i64 0, i64 0
store i8* %arraydecay, i8** %data, align 8
%0 = load i8*, i8** %data, align 8
%arrayidx = getelementptr inbounds i8, i8* %0, i64 0
store i8 0, i8* %arrayidx, align 1
%1 = bitcast i8** %data to i8*
call void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memcpy_64b_goodG2BSink(i8* %1)
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_char_declare_memcpy_64b_goodG2BSink(i8*) #1
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" }
attributes #1 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_f = local_unnamed_addr constant [3 x i8] c"%(\00"
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%stack_var_-1224 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
%1 = ptrtoint i64* %stack_var_-1224 to i64, !insn.addr !1
ret i64 %1, !insn.addr !2
}
define i64 @function_30(i64 %arg1, i64 %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%.reg2mem = alloca i64, !insn.addr !3
%1 = load i64, i64* %0
%rax = alloca i64, align 8
%2 = load i64, i64* %0
%3 = bitcast i64* %rax to i8*
%4 = trunc i64 %2 to i8
%5 = mul i8 %4, 2, !insn.addr !3
%6 = inttoptr i64 %2 to i8*, !insn.addr !3
store i8 %5, i8* %6, align 1, !insn.addr !3
%7 = load i8, i8* %3, align 8, !insn.addr !4
%8 = load i64, i64* %rax, align 8
%9 = trunc i64 %8 to i8, !insn.addr !4
%10 = add i8 %7, %9, !insn.addr !4
%11 = inttoptr i64 %8 to i8*, !insn.addr !4
store i8 %10, i8* %11, align 1, !insn.addr !4
%12 = inttoptr i64 %arg3 to i8*, !insn.addr !5
%13 = load i64, i64* %rax, align 8, !insn.addr !5
call void @__asm_rep_stosq_memset(i8* %12, i64 %13, i64 100), !insn.addr !5
%14 = add i64 %1, -816, !insn.addr !6
%15 = add i64 %1, -1224, !insn.addr !7
%16 = inttoptr i64 %15 to i64*, !insn.addr !7
%17 = load i64, i64* %16, align 8, !insn.addr !7
%18 = call i64 @memcpy(i64 %17, i64 %14, i64 800, i64 %14), !insn.addr !8
%19 = load i64, i64* %16, align 8, !insn.addr !9
%20 = inttoptr i64 %19 to i64*, !insn.addr !10
%21 = load i64, i64* %20, align 8, !insn.addr !10
%22 = call i64 @printLongLongLine(i64 %21), !insn.addr !11
%23 = add i64 %1, -8, !insn.addr !12
%24 = inttoptr i64 %23 to i64*, !insn.addr !12
%25 = load i64, i64* %24, align 8, !insn.addr !12
%26 = call i64 @__readfsqword(i64 40), !insn.addr !13
%27 = xor i64 %26, %25, !insn.addr !13
%28 = icmp eq i64 %27, 0, !insn.addr !13
store i64 %27, i64* %rax, align 8, !insn.addr !13
store i64 0, i64* %.reg2mem, !insn.addr !14
br i1 %28, label %dec_label_pc_84, label %dec_label_pc_7f, !insn.addr !14
dec_label_pc_7f: ; preds = %dec_label_pc_30
%29 = call i64 @__stack_chk_fail(), !insn.addr !15
store i64 %29, i64* %rax, align 8, !insn.addr !15
store i64 %29, i64* %.reg2mem, !insn.addr !15
br label %dec_label_pc_84, !insn.addr !15
dec_label_pc_84: ; preds = %dec_label_pc_7f, %dec_label_pc_30
%.reload = load i64, i64* %.reg2mem, !insn.addr !16
ret i64 %.reload, !insn.addr !16
}
define i64 @goodG2B1() local_unnamed_addr {
dec_label_pc_86:
%rax.0.reg2mem = alloca i64, !insn.addr !17
%stack_var_-824 = alloca i64, align 8
%stack_var_-1624 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !18
%1 = ptrtoint i64* %stack_var_-1624 to i64, !insn.addr !19
%2 = bitcast i64* %stack_var_-824 to i8*, !insn.addr !20
call void @__asm_rep_stosq_memset(i8* nonnull %2, i64 0, i64 100), !insn.addr !20
%3 = ptrtoint i64* %stack_var_-824 to i64, !insn.addr !21
%4 = call i64 @memcpy(i64 %1, i64 %3, i64 800, i64 %3), !insn.addr !22
%5 = load i64, i64* %stack_var_-1624, align 8, !insn.addr !23
%6 = call i64 @printLongLongLine(i64 %5), !insn.addr !24
%7 = call i64 @__readfsqword(i64 40), !insn.addr !25
%8 = icmp eq i64 %0, %7, !insn.addr !25
store i64 0, i64* %rax.0.reg2mem, !insn.addr !26
br i1 %8, label %dec_label_pc_10a, label %dec_label_pc_105, !insn.addr !26
dec_label_pc_105: ; preds = %dec_label_pc_86
%9 = call i64 @__stack_chk_fail(), !insn.addr !27
store i64 %9, i64* %rax.0.reg2mem, !insn.addr !27
br label %dec_label_pc_10a, !insn.addr !27
dec_label_pc_10a: ; preds = %dec_label_pc_105, %dec_label_pc_86
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !28
}
define i64 @goodG2B2() local_unnamed_addr {
dec_label_pc_10c:
%rax.0.reg2mem = alloca i64, !insn.addr !29
%stack_var_-824 = alloca i64, align 8
%stack_var_-1624 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !30
%1 = ptrtoint i64* %stack_var_-1624 to i64, !insn.addr !31
%2 = bitcast i64* %stack_var_-824 to i8*, !insn.addr !32
call void @__asm_rep_stosq_memset(i8* nonnull %2, i64 0, i64 100), !insn.addr !32
%3 = ptrtoint i64* %stack_var_-824 to i64, !insn.addr !33
%4 = call i64 @memcpy(i64 %1, i64 %3, i64 800, i64 %3), !insn.addr !34
%5 = load i64, i64* %stack_var_-1624, align 8, !insn.addr !35
%6 = call i64 @printLongLongLine(i64 %5), !insn.addr !36
%7 = call i64 @__readfsqword(i64 40), !insn.addr !37
%8 = icmp eq i64 %0, %7, !insn.addr !37
store i64 0, i64* %rax.0.reg2mem, !insn.addr !38
br i1 %8, label %dec_label_pc_190, label %dec_label_pc_18b, !insn.addr !38
dec_label_pc_18b: ; preds = %dec_label_pc_10c
%9 = call i64 @__stack_chk_fail(), !insn.addr !39
store i64 %9, i64* %rax.0.reg2mem, !insn.addr !39
br label %dec_label_pc_190, !insn.addr !39
dec_label_pc_190: ; preds = %dec_label_pc_18b, %dec_label_pc_10c
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !40
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_memcpy_03_good() local_unnamed_addr {
dec_label_pc_192:
%0 = call i64 @goodG2B1(), !insn.addr !41
%1 = call i64 @goodG2B2(), !insn.addr !42
ret i64 %1, !insn.addr !43
}
declare i64 @memcpy(i64, i64, i64, i64) local_unnamed_addr
declare i64 @printLongLongLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare void @__asm_rep_stosq_memset(i8*, i64, i64) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 11}
!1 = !{i64 26}
!2 = !{i64 33}
!3 = !{i64 48}
!4 = !{i64 50}
!5 = !{i64 60}
!6 = !{i64 63}
!7 = !{i64 70}
!8 = !{i64 88}
!9 = !{i64 93}
!10 = !{i64 100}
!11 = !{i64 106}
!12 = !{i64 112}
!13 = !{i64 116}
!14 = !{i64 125}
!15 = !{i64 127}
!16 = !{i64 133}
!17 = !{i64 134}
!18 = !{i64 145}
!19 = !{i64 167}
!20 = !{i64 194}
!21 = !{i64 197}
!22 = !{i64 222}
!23 = !{i64 234}
!24 = !{i64 240}
!25 = !{i64 250}
!26 = !{i64 259}
!27 = !{i64 261}
!28 = !{i64 267}
!29 = !{i64 268}
!30 = !{i64 279}
!31 = !{i64 301}
!32 = !{i64 328}
!33 = !{i64 331}
!34 = !{i64 356}
!35 = !{i64 368}
!36 = !{i64 374}
!37 = !{i64 384}
!38 = !{i64 393}
!39 = !{i64 395}
!40 = !{i64 401}
!41 = !{i64 411}
!42 = !{i64 421}
!43 = !{i64 428}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_memcpy_03_bad() #0 {
entry:
%data = alloca i64*, align 8
%dataBadBuffer = alloca [50 x i64], align 16
%dataGoodBuffer = alloca [100 x i64], align 16
%source = alloca [100 x i64], align 16
%arraydecay = getelementptr inbounds [50 x i64], [50 x i64]* %dataBadBuffer, i64 0, i64 0
store i64* %arraydecay, i64** %data, align 8
%0 = bitcast [100 x i64]* %source to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %0, i8 0, i64 800, i1 false)
%1 = load i64*, i64** %data, align 8
%2 = bitcast i64* %1 to i8*
%arraydecay1 = getelementptr inbounds [100 x i64], [100 x i64]* %source, i64 0, i64 0
%3 = bitcast i64* %arraydecay1 to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %2, i8* align 16 %3, i64 800, i1 false)
%4 = load i64*, i64** %data, align 8
%arrayidx = getelementptr inbounds i64, i64* %4, i64 0
%5 = load i64, i64* %arrayidx, align 8
call void @printLongLongLine(i64 %5)
ret void
}
; Function Attrs: argmemonly nounwind willreturn writeonly
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #1
; Function Attrs: argmemonly nounwind willreturn
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg) #2
declare dso_local void @printLongLongLine(i64) #3
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_memcpy_03_good() #0 {
entry:
call void @goodG2B1()
call void @goodG2B2()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B1() #0 {
entry:
%data = alloca i64*, align 8
%dataBadBuffer = alloca [50 x i64], align 16
%dataGoodBuffer = alloca [100 x i64], align 16
%source = alloca [100 x i64], align 16
%arraydecay = getelementptr inbounds [100 x i64], [100 x i64]* %dataGoodBuffer, i64 0, i64 0
store i64* %arraydecay, i64** %data, align 8
%0 = bitcast [100 x i64]* %source to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %0, i8 0, i64 800, i1 false)
%1 = load i64*, i64** %data, align 8
%2 = bitcast i64* %1 to i8*
%arraydecay1 = getelementptr inbounds [100 x i64], [100 x i64]* %source, i64 0, i64 0
%3 = bitcast i64* %arraydecay1 to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %2, i8* align 16 %3, i64 800, i1 false)
%4 = load i64*, i64** %data, align 8
%arrayidx = getelementptr inbounds i64, i64* %4, i64 0
%5 = load i64, i64* %arrayidx, align 8
call void @printLongLongLine(i64 %5)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B2() #0 {
entry:
%data = alloca i64*, align 8
%dataBadBuffer = alloca [50 x i64], align 16
%dataGoodBuffer = alloca [100 x i64], align 16
%source = alloca [100 x i64], align 16
%arraydecay = getelementptr inbounds [100 x i64], [100 x i64]* %dataGoodBuffer, i64 0, i64 0
store i64* %arraydecay, i64** %data, align 8
%0 = bitcast [100 x i64]* %source to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %0, i8 0, i64 800, i1 false)
%1 = load i64*, i64** %data, align 8
%2 = bitcast i64* %1 to i8*
%arraydecay1 = getelementptr inbounds [100 x i64], [100 x i64]* %source, i64 0, i64 0
%3 = bitcast i64* %arraydecay1 to i8*
call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 %2, i8* align 16 %3, i64 800, i1 false)
%4 = load i64*, i64** %data, align 8
%arrayidx = getelementptr inbounds i64, i64* %4, i64 0
%5 = load i64, i64* %arrayidx, align 8
call void @printLongLongLine(i64 %5)
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" }
attributes #1 = { argmemonly nounwind willreturn writeonly }
attributes #2 = { argmemonly nounwind willreturn }
attributes #3 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_5e8 = constant [10 x i8] c"127.0.0.1\00"
@global_var_d = constant i64 -556888036579737560
@global_var_5f8 = constant [32 x i8] c"ERROR: Array index is negative.\00"
@global_var_618 = constant [36 x i8] c"ERROR: Array index is out-of-bounds\00"
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
ret i64 0, !insn.addr !1
}
define i64 @function_30() local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%.reg2mem = alloca i64, !insn.addr !2
%storemerge1.reg2mem = alloca i32, !insn.addr !2
%1 = load i64, i64* %0
%2 = load i64, i64* %0
%3 = load i64, i64* %0
%4 = load i64, i64* %0
%5 = load i64, i64* %0
%6 = trunc i64 %5 to i8
%7 = mul i8 %6, 2, !insn.addr !2
%8 = zext i8 %7 to i64, !insn.addr !2
%9 = and i64 %5, -256, !insn.addr !2
%10 = or i64 %9, %8, !insn.addr !2
%11 = inttoptr i64 %10 to i8*, !insn.addr !3
%12 = load i8, i8* %11, align 2, !insn.addr !3
%13 = add i8 %7, %12, !insn.addr !3
store i8 %13, i8* %11, align 2, !insn.addr !3
%14 = call i64 @socket(i64 %1, i64 %2, i64 %4), !insn.addr !4
%15 = trunc i64 %14 to i32, !insn.addr !5
%16 = add i64 %3, -72, !insn.addr !5
%17 = inttoptr i64 %16 to i32*, !insn.addr !5
store i32 %15, i32* %17, align 4, !insn.addr !5
%18 = icmp eq i32 %15, -1, !insn.addr !6
%.pre = add i64 %3, -64
br i1 %18, label %dec_label_pc_f0, label %dec_label_pc_46, !insn.addr !7
dec_label_pc_46: ; preds = %dec_label_pc_30
%19 = call i64 @memset(i64 %.pre, i64 0, i64 16), !insn.addr !8
%20 = inttoptr i64 %.pre to i16*, !insn.addr !9
store i16 2, i16* %20, align 2, !insn.addr !9
%21 = call i64 @inet_addr(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @global_var_5e8, i64 0, i64 0)), !insn.addr !10
%22 = trunc i64 %21 to i32, !insn.addr !11
%23 = add i64 %3, -60, !insn.addr !11
%24 = inttoptr i64 %23 to i32*, !insn.addr !11
store i32 %22, i32* %24, align 4, !insn.addr !11
%25 = call i64 @htons(i64 27015), !insn.addr !12
%26 = trunc i64 %25 to i16, !insn.addr !13
%27 = add i64 %3, -62, !insn.addr !13
%28 = inttoptr i64 %27 to i16*, !insn.addr !13
store i16 %26, i16* %28, align 2, !insn.addr !13
%29 = load i32, i32* %17, align 4, !insn.addr !14
%30 = zext i32 %29 to i64, !insn.addr !15
%31 = call i64 @connect(i64 %30, i64 %.pre, i64 16, i64 %.pre), !insn.addr !16
%32 = trunc i64 %31 to i32, !insn.addr !17
%33 = icmp eq i32 %32, -1, !insn.addr !17
br i1 %33, label %dec_label_pc_e0, label %dec_label_pc_9a, !insn.addr !18
dec_label_pc_9a: ; preds = %dec_label_pc_46
%34 = add i64 %3, -22, !insn.addr !19
%35 = load i32, i32* %17, align 4, !insn.addr !20
%36 = zext i32 %35 to i64, !insn.addr !21
%37 = call i64 @recv(i64 %36, i64 %34, i64* nonnull @global_var_d, i64 0), !insn.addr !22
%38 = trunc i64 %37 to i32, !insn.addr !23
%39 = add i64 %3, -68, !insn.addr !23
%40 = inttoptr i64 %39 to i32*, !insn.addr !23
store i32 %38, i32* %40, align 4, !insn.addr !23
switch i32 %38, label %dec_label_pc_c1 [
i32 -1, label %dec_label_pc_e0
i32 0, label %dec_label_pc_e0
]
dec_label_pc_c1: ; preds = %dec_label_pc_9a
%sext = mul i64 %37, 4294967296
%41 = ashr exact i64 %sext, 32, !insn.addr !24
%42 = add i64 %41, %34, !insn.addr !25
%43 = inttoptr i64 %42 to i8*, !insn.addr !25
store i8 0, i8* %43, align 1, !insn.addr !25
%44 = call i64 @atoi(i64 %34), !insn.addr !26
%45 = trunc i64 %44 to i32, !insn.addr !27
%46 = add i64 %3, -80, !insn.addr !27
%47 = inttoptr i64 %46 to i32*, !insn.addr !27
store i32 %45, i32* %47, align 4, !insn.addr !27
br label %dec_label_pc_e0, !insn.addr !28
dec_label_pc_e0: ; preds = %dec_label_pc_9a, %dec_label_pc_9a, %dec_label_pc_46, %dec_label_pc_c1
%.pr = load i32, i32* %17, align 4
%48 = icmp eq i32 %.pr, -1, !insn.addr !29
br i1 %48, label %dec_label_pc_f0, label %dec_label_pc_e6, !insn.addr !30
dec_label_pc_e6: ; preds = %dec_label_pc_e0
%49 = zext i32 %.pr to i64, !insn.addr !31
%50 = call i64 @close(i64 %49), !insn.addr !32
br label %dec_label_pc_f0, !insn.addr !32
dec_label_pc_f0: ; preds = %dec_label_pc_30, %dec_label_pc_e6, %dec_label_pc_e0
%51 = inttoptr i64 %.pre to i64*, !insn.addr !33
store i64 0, i64* %51, align 8, !insn.addr !33
%52 = add i64 %3, -56, !insn.addr !34
%53 = inttoptr i64 %52 to i64*, !insn.addr !34
store i64 0, i64* %53, align 8, !insn.addr !34
%54 = add i64 %3, -48, !insn.addr !35
%55 = inttoptr i64 %54 to i64*, !insn.addr !35
store i64 0, i64* %55, align 8, !insn.addr !35
%56 = add i64 %3, -40, !insn.addr !36
%57 = inttoptr i64 %56 to i64*, !insn.addr !36
store i64 0, i64* %57, align 8, !insn.addr !36
%58 = add i64 %3, -32, !insn.addr !37
%59 = inttoptr i64 %58 to i64*, !insn.addr !37
store i64 0, i64* %59, align 8, !insn.addr !37
%60 = add i64 %3, -80, !insn.addr !38
%61 = inttoptr i64 %60 to i32*, !insn.addr !38
%62 = load i32, i32* %61, align 4, !insn.addr !38
%63 = icmp slt i32 %62, 0, !insn.addr !38
br i1 %63, label %dec_label_pc_150, label %dec_label_pc_11e, !insn.addr !39
dec_label_pc_11e: ; preds = %dec_label_pc_f0
%64 = sext i32 %62 to i64, !insn.addr !40
%65 = mul i64 %64, 4, !insn.addr !41
%66 = add i64 %65, %.pre, !insn.addr !41
%67 = inttoptr i64 %66 to i32*, !insn.addr !41
store i32 1, i32* %67, align 4, !insn.addr !41
%68 = add i64 %3, -76, !insn.addr !42
%69 = inttoptr i64 %68 to i32*, !insn.addr !42
store i32 0, i32* %69, align 4
store i32 0, i32* %storemerge1.reg2mem
br label %dec_label_pc_134
dec_label_pc_134: ; preds = %dec_label_pc_11e, %dec_label_pc_134
%storemerge1.reload = load i32, i32* %storemerge1.reg2mem
%70 = sext i32 %storemerge1.reload to i64, !insn.addr !43
%71 = mul i64 %70, 4, !insn.addr !44
%72 = add i64 %71, %.pre, !insn.addr !44
%73 = inttoptr i64 %72 to i32*, !insn.addr !44
%74 = load i32, i32* %73, align 4, !insn.addr !44
%75 = zext i32 %74 to i64, !insn.addr !45
%76 = call i64 @printIntLine(i64 %75), !insn.addr !46
%77 = load i32, i32* %69, align 4, !insn.addr !47
%78 = add i32 %77, 1, !insn.addr !47
store i32 %78, i32* %69, align 4
%79 = icmp slt i32 %78, 10, !insn.addr !48
store i32 %78, i32* %storemerge1.reg2mem, !insn.addr !48
br i1 %79, label %dec_label_pc_134, label %dec_label_pc_15c, !insn.addr !48
dec_label_pc_150: ; preds = %dec_label_pc_f0
%80 = call i64 @printLine(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @global_var_5f8, i64 0, i64 0)), !insn.addr !49
br label %dec_label_pc_15c, !insn.addr !49
dec_label_pc_15c: ; preds = %dec_label_pc_134, %dec_label_pc_150
%81 = add i64 %3, -8, !insn.addr !50
%82 = inttoptr i64 %81 to i64*, !insn.addr !50
%83 = load i64, i64* %82, align 8, !insn.addr !50
%84 = call i64 @__readfsqword(i64 40), !insn.addr !51
%85 = icmp eq i64 %84, %83, !insn.addr !51
store i64 0, i64* %.reg2mem, !insn.addr !52
br i1 %85, label %dec_label_pc_171, label %dec_label_pc_16c, !insn.addr !52
dec_label_pc_16c: ; preds = %dec_label_pc_15c
%86 = call i64 @__stack_chk_fail(), !insn.addr !53
store i64 %86, i64* %.reg2mem, !insn.addr !53
br label %dec_label_pc_171, !insn.addr !53
dec_label_pc_171: ; preds = %dec_label_pc_16c, %dec_label_pc_15c
%.reload = load i64, i64* %.reg2mem, !insn.addr !54
ret i64 %.reload, !insn.addr !54
}
define i64 @goodB2G1() local_unnamed_addr {
dec_label_pc_173:
%rax.0.reg2mem = alloca i64, !insn.addr !55
%indvars.iv.reg2mem = alloca i64, !insn.addr !55
%stack_var_-30 = alloca i64, align 8
%stack_var_-72 = alloca i64, align 8
%stack_var_-8 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !56
%1 = call i64 @socket(i64 2, i64 1, i64 6), !insn.addr !57
%2 = trunc i64 %1 to i32, !insn.addr !58
%3 = icmp eq i32 %2, -1, !insn.addr !59
br i1 %3, label %dec_label_pc_263.thread, label %dec_label_pc_1b9, !insn.addr !60
dec_label_pc_263.thread: ; preds = %dec_label_pc_173
store i64 0, i64* %stack_var_-72, align 8, !insn.addr !61
br label %dec_label_pc_2c9
dec_label_pc_1b9: ; preds = %dec_label_pc_173
%4 = ptrtoint i64* %stack_var_-72 to i64, !insn.addr !62
%5 = call i64 @memset(i64 %4, i64 0, i64 16), !insn.addr !63
store i64 2, i64* %stack_var_-72, align 8, !insn.addr !64
%6 = call i64 @inet_addr(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @global_var_5e8, i64 0, i64 0)), !insn.addr !65
%7 = call i64 @htons(i64 27015), !insn.addr !66
%8 = and i64 %1, 4294967295
%9 = call i64 @connect(i64 %8, i64 %4, i64 16, i64 %4), !insn.addr !67
%10 = trunc i64 %9 to i32, !insn.addr !68
%11 = icmp eq i32 %10, -1, !insn.addr !68
br i1 %11, label %dec_label_pc_263.thread8, label %dec_label_pc_20d, !insn.addr !69
dec_label_pc_20d: ; preds = %dec_label_pc_1b9
%12 = ptrtoint i64* %stack_var_-30 to i64, !insn.addr !70
%13 = call i64 @recv(i64 %8, i64 %12, i64* nonnull @global_var_d, i64 0), !insn.addr !71
%14 = trunc i64 %13 to i32, !insn.addr !72
%15 = add i32 %14, 1
%16 = icmp ult i32 %15, 2
br i1 %16, label %dec_label_pc_263.thread8, label %dec_label_pc_263, !insn.addr !73
dec_label_pc_263.thread8: ; preds = %dec_label_pc_20d, %dec_label_pc_1b9
%17 = call i64 @close(i64 %8), !insn.addr !74
store i64 0, i64* %stack_var_-72, align 8, !insn.addr !61
br label %dec_label_pc_2c9
dec_label_pc_263: ; preds = %dec_label_pc_20d
%18 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !75
%sext = mul i64 %13, 4294967296
%19 = ashr exact i64 %sext, 32, !insn.addr !76
%20 = add i64 %18, -22, !insn.addr !77
%21 = add i64 %20, %19, !insn.addr !77
%22 = inttoptr i64 %21 to i8*, !insn.addr !77
store i8 0, i8* %22, align 1, !insn.addr !77
%23 = call i64 @atoi(i64 %12), !insn.addr !78
%24 = trunc i64 %23 to i32, !insn.addr !79
%25 = call i64 @close(i64 %8), !insn.addr !74
store i64 0, i64* %stack_var_-72, align 8, !insn.addr !61
%26 = icmp ugt i32 %24, 9
br i1 %26, label %dec_label_pc_2c9, label %dec_label_pc_297, !insn.addr !80
dec_label_pc_297: ; preds = %dec_label_pc_263
%sext9 = mul i64 %23, 4294967296
%27 = ashr exact i64 %sext9, 30, !insn.addr !81
%28 = add i64 %18, -64, !insn.addr !81
%29 = add i64 %27, %28, !insn.addr !81
%30 = inttoptr i64 %29 to i32*, !insn.addr !81
store i32 1, i32* %30, align 4, !insn.addr !81
store i64 0, i64* %indvars.iv.reg2mem
br label %dec_label_pc_2ad
dec_label_pc_2ad: ; preds = %dec_label_pc_2ad, %dec_label_pc_297
%indvars.iv.reload = load i64, i64* %indvars.iv.reg2mem
%31 = mul i64 %indvars.iv.reload, 4, !insn.addr !82
%32 = add i64 %31, %28, !insn.addr !82
%33 = inttoptr i64 %32 to i32*, !insn.addr !82
%34 = load i32, i32* %33, align 4, !insn.addr !82
%35 = zext i32 %34 to i64, !insn.addr !83
%36 = call i64 @printIntLine(i64 %35), !insn.addr !84
%indvars.iv.next = add nuw nsw i64 %indvars.iv.reload, 1
%exitcond = icmp eq i64 %indvars.iv.next, 10
store i64 %indvars.iv.next, i64* %indvars.iv.reg2mem, !insn.addr !85
br i1 %exitcond, label %dec_label_pc_2d5, label %dec_label_pc_2ad, !insn.addr !85
dec_label_pc_2c9: ; preds = %dec_label_pc_263.thread8, %dec_label_pc_263.thread, %dec_label_pc_263
%37 = call i64 @printLine(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @global_var_618, i64 0, i64 0)), !insn.addr !86
br label %dec_label_pc_2d5, !insn.addr !86
dec_label_pc_2d5: ; preds = %dec_label_pc_2ad, %dec_label_pc_2c9
%38 = call i64 @__readfsqword(i64 40), !insn.addr !87
%39 = icmp eq i64 %0, %38, !insn.addr !87
store i64 0, i64* %rax.0.reg2mem, !insn.addr !88
br i1 %39, label %dec_label_pc_2ea, label %dec_label_pc_2e5, !insn.addr !88
dec_label_pc_2e5: ; preds = %dec_label_pc_2d5
%40 = call i64 @__stack_chk_fail(), !insn.addr !89
store i64 %40, i64* %rax.0.reg2mem, !insn.addr !89
br label %dec_label_pc_2ea, !insn.addr !89
dec_label_pc_2ea: ; preds = %dec_label_pc_2e5, %dec_label_pc_2d5
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !90
}
define i64 @goodB2G2() local_unnamed_addr {
dec_label_pc_2ec:
%rax.0.reg2mem = alloca i64, !insn.addr !91
%indvars.iv.reg2mem = alloca i64, !insn.addr !91
%stack_var_-30 = alloca i64, align 8
%stack_var_-72 = alloca i64, align 8
%stack_var_-8 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !92
%1 = call i64 @socket(i64 2, i64 1, i64 6), !insn.addr !93
%2 = trunc i64 %1 to i32, !insn.addr !94
%3 = icmp eq i32 %2, -1, !insn.addr !95
br i1 %3, label %dec_label_pc_3dc.thread, label %dec_label_pc_332, !insn.addr !96
dec_label_pc_3dc.thread: ; preds = %dec_label_pc_2ec
store i64 0, i64* %stack_var_-72, align 8, !insn.addr !97
br label %dec_label_pc_442
dec_label_pc_332: ; preds = %dec_label_pc_2ec
%4 = ptrtoint i64* %stack_var_-72 to i64, !insn.addr !98
%5 = call i64 @memset(i64 %4, i64 0, i64 16), !insn.addr !99
store i64 2, i64* %stack_var_-72, align 8, !insn.addr !100
%6 = call i64 @inet_addr(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @global_var_5e8, i64 0, i64 0)), !insn.addr !101
%7 = call i64 @htons(i64 27015), !insn.addr !102
%8 = and i64 %1, 4294967295
%9 = call i64 @connect(i64 %8, i64 %4, i64 16, i64 %4), !insn.addr !103
%10 = trunc i64 %9 to i32, !insn.addr !104
%11 = icmp eq i32 %10, -1, !insn.addr !104
br i1 %11, label %dec_label_pc_3dc.thread8, label %dec_label_pc_386, !insn.addr !105
dec_label_pc_386: ; preds = %dec_label_pc_332
%12 = ptrtoint i64* %stack_var_-30 to i64, !insn.addr !106
%13 = call i64 @recv(i64 %8, i64 %12, i64* nonnull @global_var_d, i64 0), !insn.addr !107
%14 = trunc i64 %13 to i32, !insn.addr !108
%15 = add i32 %14, 1
%16 = icmp ult i32 %15, 2
br i1 %16, label %dec_label_pc_3dc.thread8, label %dec_label_pc_3dc, !insn.addr !109
dec_label_pc_3dc.thread8: ; preds = %dec_label_pc_386, %dec_label_pc_332
%17 = call i64 @close(i64 %8), !insn.addr !110
store i64 0, i64* %stack_var_-72, align 8, !insn.addr !97
br label %dec_label_pc_442
dec_label_pc_3dc: ; preds = %dec_label_pc_386
%18 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !111
%sext = mul i64 %13, 4294967296
%19 = ashr exact i64 %sext, 32, !insn.addr !112
%20 = add i64 %18, -22, !insn.addr !113
%21 = add i64 %20, %19, !insn.addr !113
%22 = inttoptr i64 %21 to i8*, !insn.addr !113
store i8 0, i8* %22, align 1, !insn.addr !113
%23 = call i64 @atoi(i64 %12), !insn.addr !114
%24 = trunc i64 %23 to i32, !insn.addr !115
%25 = call i64 @close(i64 %8), !insn.addr !110
store i64 0, i64* %stack_var_-72, align 8, !insn.addr !97
%26 = icmp ugt i32 %24, 9
br i1 %26, label %dec_label_pc_442, label %dec_label_pc_410, !insn.addr !116
dec_label_pc_410: ; preds = %dec_label_pc_3dc
%sext9 = mul i64 %23, 4294967296
%27 = ashr exact i64 %sext9, 30, !insn.addr !117
%28 = add i64 %18, -64, !insn.addr !117
%29 = add i64 %27, %28, !insn.addr !117
%30 = inttoptr i64 %29 to i32*, !insn.addr !117
store i32 1, i32* %30, align 4, !insn.addr !117
store i64 0, i64* %indvars.iv.reg2mem
br label %dec_label_pc_426
dec_label_pc_426: ; preds = %dec_label_pc_426, %dec_label_pc_410
%indvars.iv.reload = load i64, i64* %indvars.iv.reg2mem
%31 = mul i64 %indvars.iv.reload, 4, !insn.addr !118
%32 = add i64 %31, %28, !insn.addr !118
%33 = inttoptr i64 %32 to i32*, !insn.addr !118
%34 = load i32, i32* %33, align 4, !insn.addr !118
%35 = zext i32 %34 to i64, !insn.addr !119
%36 = call i64 @printIntLine(i64 %35), !insn.addr !120
%indvars.iv.next = add nuw nsw i64 %indvars.iv.reload, 1
%exitcond = icmp eq i64 %indvars.iv.next, 10
store i64 %indvars.iv.next, i64* %indvars.iv.reg2mem, !insn.addr !121
br i1 %exitcond, label %dec_label_pc_44e, label %dec_label_pc_426, !insn.addr !121
dec_label_pc_442: ; preds = %dec_label_pc_3dc.thread8, %dec_label_pc_3dc.thread, %dec_label_pc_3dc
%37 = call i64 @printLine(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @global_var_618, i64 0, i64 0)), !insn.addr !122
br label %dec_label_pc_44e, !insn.addr !122
dec_label_pc_44e: ; preds = %dec_label_pc_426, %dec_label_pc_442
%38 = call i64 @__readfsqword(i64 40), !insn.addr !123
%39 = icmp eq i64 %0, %38, !insn.addr !123
store i64 0, i64* %rax.0.reg2mem, !insn.addr !124
br i1 %39, label %dec_label_pc_463, label %dec_label_pc_45e, !insn.addr !124
dec_label_pc_45e: ; preds = %dec_label_pc_44e
%40 = call i64 @__stack_chk_fail(), !insn.addr !125
store i64 %40, i64* %rax.0.reg2mem, !insn.addr !125
br label %dec_label_pc_463, !insn.addr !125
dec_label_pc_463: ; preds = %dec_label_pc_45e, %dec_label_pc_44e
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !126
}
define i64 @goodG2B1() local_unnamed_addr {
dec_label_pc_465:
%rax.0.reg2mem = alloca i64, !insn.addr !127
%indvars.iv.reg2mem = alloca i64, !insn.addr !127
%stack_var_-8 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !128
%1 = call i64 @__readfsqword(i64 40), !insn.addr !129
%2 = add i64 %0, -20, !insn.addr !130
%3 = inttoptr i64 %2 to i32*, !insn.addr !130
store i32 1, i32* %3, align 4, !insn.addr !130
%4 = add i64 %0, -48, !insn.addr !131
store i64 0, i64* %indvars.iv.reg2mem
br label %dec_label_pc_4ce
dec_label_pc_4ce: ; preds = %dec_label_pc_4ce, %dec_label_pc_465
%indvars.iv.reload = load i64, i64* %indvars.iv.reg2mem
%5 = mul i64 %indvars.iv.reload, 4, !insn.addr !131
%6 = add i64 %4, %5, !insn.addr !131
%7 = inttoptr i64 %6 to i32*, !insn.addr !131
%8 = load i32, i32* %7, align 4, !insn.addr !131
%9 = zext i32 %8 to i64, !insn.addr !132
%10 = call i64 @printIntLine(i64 %9), !insn.addr !133
%indvars.iv.next = add nuw nsw i64 %indvars.iv.reload, 1
%exitcond = icmp eq i64 %indvars.iv.next, 10
store i64 %indvars.iv.next, i64* %indvars.iv.reg2mem, !insn.addr !134
br i1 %exitcond, label %dec_label_pc_4f6, label %dec_label_pc_4ce, !insn.addr !134
dec_label_pc_4f6: ; preds = %dec_label_pc_4ce
%11 = call i64 @__readfsqword(i64 40), !insn.addr !135
%12 = icmp eq i64 %1, %11, !insn.addr !135
store i64 0, i64* %rax.0.reg2mem, !insn.addr !136
br i1 %12, label %dec_label_pc_50b, label %dec_label_pc_506, !insn.addr !136
dec_label_pc_506: ; preds = %dec_label_pc_4f6
%13 = call i64 @__stack_chk_fail(), !insn.addr !137
store i64 %13, i64* %rax.0.reg2mem, !insn.addr !137
br label %dec_label_pc_50b, !insn.addr !137
dec_label_pc_50b: ; preds = %dec_label_pc_506, %dec_label_pc_4f6
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !138
}
define i64 @goodG2B2() local_unnamed_addr {
dec_label_pc_50d:
%rax.0.reg2mem = alloca i64, !insn.addr !139
%indvars.iv.reg2mem = alloca i64, !insn.addr !139
%stack_var_-8 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !140
%1 = call i64 @__readfsqword(i64 40), !insn.addr !141
%2 = add i64 %0, -20, !insn.addr !142
%3 = inttoptr i64 %2 to i32*, !insn.addr !142
store i32 1, i32* %3, align 4, !insn.addr !142
%4 = add i64 %0, -48, !insn.addr !143
store i64 0, i64* %indvars.iv.reg2mem
br label %dec_label_pc_576
dec_label_pc_576: ; preds = %dec_label_pc_576, %dec_label_pc_50d
%indvars.iv.reload = load i64, i64* %indvars.iv.reg2mem
%5 = mul i64 %indvars.iv.reload, 4, !insn.addr !143
%6 = add i64 %4, %5, !insn.addr !143
%7 = inttoptr i64 %6 to i32*, !insn.addr !143
%8 = load i32, i32* %7, align 4, !insn.addr !143
%9 = zext i32 %8 to i64, !insn.addr !144
%10 = call i64 @printIntLine(i64 %9), !insn.addr !145
%indvars.iv.next = add nuw nsw i64 %indvars.iv.reload, 1
%exitcond = icmp eq i64 %indvars.iv.next, 10
store i64 %indvars.iv.next, i64* %indvars.iv.reg2mem, !insn.addr !146
br i1 %exitcond, label %dec_label_pc_59e, label %dec_label_pc_576, !insn.addr !146
dec_label_pc_59e: ; preds = %dec_label_pc_576
%11 = call i64 @__readfsqword(i64 40), !insn.addr !147
%12 = icmp eq i64 %1, %11, !insn.addr !147
store i64 0, i64* %rax.0.reg2mem, !insn.addr !148
br i1 %12, label %dec_label_pc_5b3, label %dec_label_pc_5ae, !insn.addr !148
dec_label_pc_5ae: ; preds = %dec_label_pc_59e
%13 = call i64 @__stack_chk_fail(), !insn.addr !149
store i64 %13, i64* %rax.0.reg2mem, !insn.addr !149
br label %dec_label_pc_5b3, !insn.addr !149
dec_label_pc_5b3: ; preds = %dec_label_pc_5ae, %dec_label_pc_59e
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !150
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_02_good() local_unnamed_addr {
dec_label_pc_5b5:
%0 = call i64 @goodB2G1(), !insn.addr !151
%1 = call i64 @goodB2G2(), !insn.addr !152
%2 = call i64 @goodG2B1(), !insn.addr !153
%3 = call i64 @goodG2B2(), !insn.addr !154
ret i64 %3, !insn.addr !155
}
declare i64 @socket(i64, i64, i64) local_unnamed_addr
declare i64 @memset(i64, i64, i64) local_unnamed_addr
declare i64 @inet_addr(i8*) local_unnamed_addr
declare i64 @htons(i64) local_unnamed_addr
declare i64 @connect(i64, i64, i64, i64) local_unnamed_addr
declare i64 @recv(i64, i64, i64*, i64) local_unnamed_addr
declare i64 @atoi(i64) local_unnamed_addr
declare i64 @close(i64) local_unnamed_addr
declare i64 @printIntLine(i64) local_unnamed_addr
declare i64 @printLine(i8*) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 8}
!1 = !{i64 30}
!2 = !{i64 48}
!3 = !{i64 50}
!4 = !{i64 52}
!5 = !{i64 57}
!6 = !{i64 60}
!7 = !{i64 64}
!8 = !{i64 87}
!9 = !{i64 92}
!10 = !{i64 105}
!11 = !{i64 110}
!12 = !{i64 118}
!13 = !{i64 123}
!14 = !{i64 131}
!15 = !{i64 142}
!16 = !{i64 144}
!17 = !{i64 149}
!18 = !{i64 152}
!19 = !{i64 154}
!20 = !{i64 158}
!21 = !{i64 171}
!22 = !{i64 173}
!23 = !{i64 178}
!24 = !{i64 196}
!25 = !{i64 198}
!26 = !{i64 210}
!27 = !{i64 215}
!28 = !{i64 218}
!29 = !{i64 224}
!30 = !{i64 228}
!31 = !{i64 233}
!32 = !{i64 235}
!33 = !{i64 240}
!34 = !{i64 248}
!35 = !{i64 256}
!36 = !{i64 264}
!37 = !{i64 272}
!38 = !{i64 280}
!39 = !{i64 284}
!40 = !{i64 289}
!41 = !{i64 291}
!42 = !{i64 299}
!43 = !{i64 311}
!44 = !{i64 313}
!45 = !{i64 317}
!46 = !{i64 319}
!47 = !{i64 324}
!48 = !{i64 332}
!49 = !{i64 343}
!50 = !{i64 349}
!51 = !{i64 353}
!52 = !{i64 362}
!53 = !{i64 364}
!54 = !{i64 370}
!55 = !{i64 371}
!56 = !{i64 379}
!57 = !{i64 423}
!58 = !{i64 428}
!59 = !{i64 431}
!60 = !{i64 435}
!61 = !{i64 611}
!62 = !{i64 455}
!63 = !{i64 458}
!64 = !{i64 463}
!65 = !{i64 476}
!66 = !{i64 489}
!67 = !{i64 515}
!68 = !{i64 520}
!69 = !{i64 523}
!70 = !{i64 525}
!71 = !{i64 544}
!72 = !{i64 549}
!73 = !{i64 556}
!74 = !{i64 606}
!75 = !{i64 372}
!76 = !{i64 567}
!77 = !{i64 569}
!78 = !{i64 581}
!79 = !{i64 586}
!80 = !{i64 655}
!81 = !{i64 668}
!82 = !{i64 690}
!83 = !{i64 694}
!84 = !{i64 696}
!85 = !{i64 709}
!86 = !{i64 720}
!87 = !{i64 730}
!88 = !{i64 739}
!89 = !{i64 741}
!90 = !{i64 747}
!91 = !{i64 748}
!92 = !{i64 756}
!93 = !{i64 800}
!94 = !{i64 805}
!95 = !{i64 808}
!96 = !{i64 812}
!97 = !{i64 988}
!98 = !{i64 832}
!99 = !{i64 835}
!100 = !{i64 840}
!101 = !{i64 853}
!102 = !{i64 866}
!103 = !{i64 892}
!104 = !{i64 897}
!105 = !{i64 900}
!106 = !{i64 902}
!107 = !{i64 921}
!108 = !{i64 926}
!109 = !{i64 933}
!110 = !{i64 983}
!111 = !{i64 749}
!112 = !{i64 944}
!113 = !{i64 946}
!114 = !{i64 958}
!115 = !{i64 963}
!116 = !{i64 1032}
!117 = !{i64 1045}
!118 = !{i64 1067}
!119 = !{i64 1071}
!120 = !{i64 1073}
!121 = !{i64 1086}
!122 = !{i64 1097}
!123 = !{i64 1107}
!124 = !{i64 1116}
!125 = !{i64 1118}
!126 = !{i64 1124}
!127 = !{i64 1125}
!128 = !{i64 1126}
!129 = !{i64 1133}
!130 = !{i64 1213}
!131 = !{i64 1235}
!132 = !{i64 1239}
!133 = !{i64 1241}
!134 = !{i64 1254}
!135 = !{i64 1275}
!136 = !{i64 1284}
!137 = !{i64 1286}
!138 = !{i64 1292}
!139 = !{i64 1293}
!140 = !{i64 1294}
!141 = !{i64 1301}
!142 = !{i64 1381}
!143 = !{i64 1403}
!144 = !{i64 1407}
!145 = !{i64 1409}
!146 = !{i64 1422}
!147 = !{i64 1443}
!148 = !{i64 1452}
!149 = !{i64 1454}
!150 = !{i64 1460}
!151 = !{i64 1470}
!152 = !{i64 1480}
!153 = !{i64 1490}
!154 = !{i64 1500}
!155 = !{i64 1507}
### Assistant: %struct.sockaddr_in = type { i16, i16, %struct.in_addr, [8 x i8] }
%struct.in_addr = type { i32 }
%struct.sockaddr = type { i16, [14 x i8] }
@.str = private unnamed_addr constant [10 x i8] c"127.0.0.1\00", align 1
@.str.1 = private unnamed_addr constant [32 x i8] c"ERROR: Array index is negative.\00", align 1
@.str.2 = private unnamed_addr constant [36 x i8] c"ERROR: Array index is out-of-bounds\00", align 1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_02_bad() #0 {
entry:
%data = alloca i32, align 4
%recvResult = alloca i32, align 4
%service = alloca %struct.sockaddr_in, align 4
%connectSocket = alloca i32, align 4
%inputBuffer = alloca [14 x i8], align 1
%i = alloca i32, align 4
%buffer = alloca [10 x i32], align 16
store i32 -1, i32* %data, align 4
store i32 -1, i32* %connectSocket, align 4
br label %do.body
do.body: ; preds = %entry
%call = call i32 @socket(i32 2, i32 1, i32 6) #6
store i32 %call, i32* %connectSocket, align 4
%0 = load i32, i32* %connectSocket, align 4
%cmp = icmp eq i32 %0, -1
br i1 %cmp, label %if.then, label %if.end
if.then: ; preds = %do.body
br label %do.end
if.end: ; preds = %do.body
%1 = bitcast %struct.sockaddr_in* %service to i8*
call void @llvm.memset.p0i8.i64(i8* align 4 %1, i8 0, i64 16, i1 false)
%sin_family = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %service, i32 0, i32 0
store i16 2, i16* %sin_family, align 4
%call1 = call i32 @inet_addr(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0)) #6
%sin_addr = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %service, i32 0, i32 2
%s_addr = getelementptr inbounds %struct.in_addr, %struct.in_addr* %sin_addr, i32 0, i32 0
store i32 %call1, i32* %s_addr, align 4
%call2 = call zeroext i16 @htons(i16 zeroext 27015) #7
%sin_port = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %service, i32 0, i32 1
store i16 %call2, i16* %sin_port, align 2
%2 = load i32, i32* %connectSocket, align 4
%3 = bitcast %struct.sockaddr_in* %service to %struct.sockaddr*
%call3 = call i32 @connect(i32 %2, %struct.sockaddr* %3, i32 16)
%cmp4 = icmp eq i32 %call3, -1
br i1 %cmp4, label %if.then5, label %if.end6
if.then5: ; preds = %if.end
br label %do.end
if.end6: ; preds = %if.end
%4 = load i32, i32* %connectSocket, align 4
%arraydecay = getelementptr inbounds [14 x i8], [14 x i8]* %inputBuffer, i64 0, i64 0
%call7 = call i64 @recv(i32 %4, i8* %arraydecay, i64 13, i32 0)
%conv = trunc i64 %call7 to i32
store i32 %conv, i32* %recvResult, align 4
%5 = load i32, i32* %recvResult, align 4
%cmp8 = icmp eq i32 %5, -1
br i1 %cmp8, label %if.then12, label %lor.lhs.false
lor.lhs.false: ; preds = %if.end6
%6 = load i32, i32* %recvResult, align 4
%cmp10 = icmp eq i32 %6, 0
br i1 %cmp10, label %if.then12, label %if.end13
if.then12: ; preds = %lor.lhs.false, %if.end6
br label %do.end
if.end13: ; preds = %lor.lhs.false
%7 = load i32, i32* %recvResult, align 4
%idxprom = sext i32 %7 to i64
%arrayidx = getelementptr inbounds [14 x i8], [14 x i8]* %inputBuffer, i64 0, i64 %idxprom
store i8 0, i8* %arrayidx, align 1
%arraydecay14 = getelementptr inbounds [14 x i8], [14 x i8]* %inputBuffer, i64 0, i64 0
%call15 = call i32 @atoi(i8* %arraydecay14) #8
store i32 %call15, i32* %data, align 4
br label %do.end
do.end: ; preds = %if.end13, %if.then12, %if.then5, %if.then
%8 = load i32, i32* %connectSocket, align 4
%cmp16 = icmp ne i32 %8, -1
br i1 %cmp16, label %if.then18, label %if.end20
if.then18: ; preds = %do.end
%9 = load i32, i32* %connectSocket, align 4
%call19 = call i32 @close(i32 %9)
br label %if.end20
if.end20: ; preds = %if.then18, %do.end
%10 = bitcast [10 x i32]* %buffer to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %10, i8 0, i64 40, i1 false)
%11 = load i32, i32* %data, align 4
%cmp21 = icmp sge i32 %11, 0
br i1 %cmp21, label %if.then23, label %if.else
if.then23: ; preds = %if.end20
%12 = load i32, i32* %data, align 4
%idxprom24 = sext i32 %12 to i64
%arrayidx25 = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom24
store i32 1, i32* %arrayidx25, align 4
store i32 0, i32* %i, align 4
br label %for.cond
for.cond: ; preds = %for.inc, %if.then23
%13 = load i32, i32* %i, align 4
%cmp26 = icmp slt i32 %13, 10
br i1 %cmp26, label %for.body, label %for.end
for.body: ; preds = %for.cond
%14 = load i32, i32* %i, align 4
%idxprom28 = sext i32 %14 to i64
%arrayidx29 = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom28
%15 = load i32, i32* %arrayidx29, align 4
call void @printIntLine(i32 %15)
br label %for.inc
for.inc: ; preds = %for.body
%16 = load i32, i32* %i, align 4
%inc = add nsw i32 %16, 1
store i32 %inc, i32* %i, align 4
br label %for.cond
for.end: ; preds = %for.cond
br label %if.end30
if.else: ; preds = %if.end20
call void @printLine(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
br label %if.end30
if.end30: ; preds = %if.else, %for.end
ret void
}
; Function Attrs: nounwind
declare dso_local i32 @socket(i32, i32, i32) #1
; Function Attrs: argmemonly nounwind willreturn writeonly
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #2
; Function Attrs: nounwind
declare dso_local i32 @inet_addr(i8*) #1
; Function Attrs: nounwind readnone
declare dso_local zeroext i16 @htons(i16 zeroext) #3
declare dso_local i32 @connect(i32, %struct.sockaddr*, i32) #4
declare dso_local i64 @recv(i32, i8*, i64, i32) #4
; Function Attrs: nounwind readonly
declare dso_local i32 @atoi(i8*) #5
declare dso_local i32 @close(i32) #4
declare dso_local void @printIntLine(i32) #4
declare dso_local void @printLine(i8*) #4
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE129_connect_socket_02_good() #0 {
entry:
call void @goodB2G1()
call void @goodB2G2()
call void @goodG2B1()
call void @goodG2B2()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodB2G1() #0 {
entry:
%data = alloca i32, align 4
%recvResult = alloca i32, align 4
%service = alloca %struct.sockaddr_in, align 4
%connectSocket = alloca i32, align 4
%inputBuffer = alloca [14 x i8], align 1
%i = alloca i32, align 4
%buffer = alloca [10 x i32], align 16
store i32 -1, i32* %data, align 4
store i32 -1, i32* %connectSocket, align 4
br label %do.body
do.body: ; preds = %entry
%call = call i32 @socket(i32 2, i32 1, i32 6) #6
store i32 %call, i32* %connectSocket, align 4
%0 = load i32, i32* %connectSocket, align 4
%cmp = icmp eq i32 %0, -1
br i1 %cmp, label %if.then, label %if.end
if.then: ; preds = %do.body
br label %do.end
if.end: ; preds = %do.body
%1 = bitcast %struct.sockaddr_in* %service to i8*
call void @llvm.memset.p0i8.i64(i8* align 4 %1, i8 0, i64 16, i1 false)
%sin_family = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %service, i32 0, i32 0
store i16 2, i16* %sin_family, align 4
%call1 = call i32 @inet_addr(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0)) #6
%sin_addr = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %service, i32 0, i32 2
%s_addr = getelementptr inbounds %struct.in_addr, %struct.in_addr* %sin_addr, i32 0, i32 0
store i32 %call1, i32* %s_addr, align 4
%call2 = call zeroext i16 @htons(i16 zeroext 27015) #7
%sin_port = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %service, i32 0, i32 1
store i16 %call2, i16* %sin_port, align 2
%2 = load i32, i32* %connectSocket, align 4
%3 = bitcast %struct.sockaddr_in* %service to %struct.sockaddr*
%call3 = call i32 @connect(i32 %2, %struct.sockaddr* %3, i32 16)
%cmp4 = icmp eq i32 %call3, -1
br i1 %cmp4, label %if.then5, label %if.end6
if.then5: ; preds = %if.end
br label %do.end
if.end6: ; preds = %if.end
%4 = load i32, i32* %connectSocket, align 4
%arraydecay = getelementptr inbounds [14 x i8], [14 x i8]* %inputBuffer, i64 0, i64 0
%call7 = call i64 @recv(i32 %4, i8* %arraydecay, i64 13, i32 0)
%conv = trunc i64 %call7 to i32
store i32 %conv, i32* %recvResult, align 4
%5 = load i32, i32* %recvResult, align 4
%cmp8 = icmp eq i32 %5, -1
br i1 %cmp8, label %if.then12, label %lor.lhs.false
lor.lhs.false: ; preds = %if.end6
%6 = load i32, i32* %recvResult, align 4
%cmp10 = icmp eq i32 %6, 0
br i1 %cmp10, label %if.then12, label %if.end13
if.then12: ; preds = %lor.lhs.false, %if.end6
br label %do.end
if.end13: ; preds = %lor.lhs.false
%7 = load i32, i32* %recvResult, align 4
%idxprom = sext i32 %7 to i64
%arrayidx = getelementptr inbounds [14 x i8], [14 x i8]* %inputBuffer, i64 0, i64 %idxprom
store i8 0, i8* %arrayidx, align 1
%arraydecay14 = getelementptr inbounds [14 x i8], [14 x i8]* %inputBuffer, i64 0, i64 0
%call15 = call i32 @atoi(i8* %arraydecay14) #8
store i32 %call15, i32* %data, align 4
br label %do.end
do.end: ; preds = %if.end13, %if.then12, %if.then5, %if.then
%8 = load i32, i32* %connectSocket, align 4
%cmp16 = icmp ne i32 %8, -1
br i1 %cmp16, label %if.then18, label %if.end20
if.then18: ; preds = %do.end
%9 = load i32, i32* %connectSocket, align 4
%call19 = call i32 @close(i32 %9)
br label %if.end20
if.end20: ; preds = %if.then18, %do.end
%10 = bitcast [10 x i32]* %buffer to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %10, i8 0, i64 40, i1 false)
%11 = load i32, i32* %data, align 4
%cmp21 = icmp sge i32 %11, 0
br i1 %cmp21, label %land.lhs.true, label %if.else
land.lhs.true: ; preds = %if.end20
%12 = load i32, i32* %data, align 4
%cmp23 = icmp slt i32 %12, 10
br i1 %cmp23, label %if.then25, label %if.else
if.then25: ; preds = %land.lhs.true
%13 = load i32, i32* %data, align 4
%idxprom26 = sext i32 %13 to i64
%arrayidx27 = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom26
store i32 1, i32* %arrayidx27, align 4
store i32 0, i32* %i, align 4
br label %for.cond
for.cond: ; preds = %for.inc, %if.then25
%14 = load i32, i32* %i, align 4
%cmp28 = icmp slt i32 %14, 10
br i1 %cmp28, label %for.body, label %for.end
for.body: ; preds = %for.cond
%15 = load i32, i32* %i, align 4
%idxprom30 = sext i32 %15 to i64
%arrayidx31 = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom30
%16 = load i32, i32* %arrayidx31, align 4
call void @printIntLine(i32 %16)
br label %for.inc
for.inc: ; preds = %for.body
%17 = load i32, i32* %i, align 4
%inc = add nsw i32 %17, 1
store i32 %inc, i32* %i, align 4
br label %for.cond
for.end: ; preds = %for.cond
br label %if.end32
if.else: ; preds = %land.lhs.true, %if.end20
call void @printLine(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
br label %if.end32
if.end32: ; preds = %if.else, %for.end
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodB2G2() #0 {
entry:
%data = alloca i32, align 4
%recvResult = alloca i32, align 4
%service = alloca %struct.sockaddr_in, align 4
%connectSocket = alloca i32, align 4
%inputBuffer = alloca [14 x i8], align 1
%i = alloca i32, align 4
%buffer = alloca [10 x i32], align 16
store i32 -1, i32* %data, align 4
store i32 -1, i32* %connectSocket, align 4
br label %do.body
do.body: ; preds = %entry
%call = call i32 @socket(i32 2, i32 1, i32 6) #6
store i32 %call, i32* %connectSocket, align 4
%0 = load i32, i32* %connectSocket, align 4
%cmp = icmp eq i32 %0, -1
br i1 %cmp, label %if.then, label %if.end
if.then: ; preds = %do.body
br label %do.end
if.end: ; preds = %do.body
%1 = bitcast %struct.sockaddr_in* %service to i8*
call void @llvm.memset.p0i8.i64(i8* align 4 %1, i8 0, i64 16, i1 false)
%sin_family = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %service, i32 0, i32 0
store i16 2, i16* %sin_family, align 4
%call1 = call i32 @inet_addr(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0)) #6
%sin_addr = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %service, i32 0, i32 2
%s_addr = getelementptr inbounds %struct.in_addr, %struct.in_addr* %sin_addr, i32 0, i32 0
store i32 %call1, i32* %s_addr, align 4
%call2 = call zeroext i16 @htons(i16 zeroext 27015) #7
%sin_port = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %service, i32 0, i32 1
store i16 %call2, i16* %sin_port, align 2
%2 = load i32, i32* %connectSocket, align 4
%3 = bitcast %struct.sockaddr_in* %service to %struct.sockaddr*
%call3 = call i32 @connect(i32 %2, %struct.sockaddr* %3, i32 16)
%cmp4 = icmp eq i32 %call3, -1
br i1 %cmp4, label %if.then5, label %if.end6
if.then5: ; preds = %if.end
br label %do.end
if.end6: ; preds = %if.end
%4 = load i32, i32* %connectSocket, align 4
%arraydecay = getelementptr inbounds [14 x i8], [14 x i8]* %inputBuffer, i64 0, i64 0
%call7 = call i64 @recv(i32 %4, i8* %arraydecay, i64 13, i32 0)
%conv = trunc i64 %call7 to i32
store i32 %conv, i32* %recvResult, align 4
%5 = load i32, i32* %recvResult, align 4
%cmp8 = icmp eq i32 %5, -1
br i1 %cmp8, label %if.then12, label %lor.lhs.false
lor.lhs.false: ; preds = %if.end6
%6 = load i32, i32* %recvResult, align 4
%cmp10 = icmp eq i32 %6, 0
br i1 %cmp10, label %if.then12, label %if.end13
if.then12: ; preds = %lor.lhs.false, %if.end6
br label %do.end
if.end13: ; preds = %lor.lhs.false
%7 = load i32, i32* %recvResult, align 4
%idxprom = sext i32 %7 to i64
%arrayidx = getelementptr inbounds [14 x i8], [14 x i8]* %inputBuffer, i64 0, i64 %idxprom
store i8 0, i8* %arrayidx, align 1
%arraydecay14 = getelementptr inbounds [14 x i8], [14 x i8]* %inputBuffer, i64 0, i64 0
%call15 = call i32 @atoi(i8* %arraydecay14) #8
store i32 %call15, i32* %data, align 4
br label %do.end
do.end: ; preds = %if.end13, %if.then12, %if.then5, %if.then
%8 = load i32, i32* %connectSocket, align 4
%cmp16 = icmp ne i32 %8, -1
br i1 %cmp16, label %if.then18, label %if.end20
if.then18: ; preds = %do.end
%9 = load i32, i32* %connectSocket, align 4
%call19 = call i32 @close(i32 %9)
br label %if.end20
if.end20: ; preds = %if.then18, %do.end
%10 = bitcast [10 x i32]* %buffer to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %10, i8 0, i64 40, i1 false)
%11 = load i32, i32* %data, align 4
%cmp21 = icmp sge i32 %11, 0
br i1 %cmp21, label %land.lhs.true, label %if.else
land.lhs.true: ; preds = %if.end20
%12 = load i32, i32* %data, align 4
%cmp23 = icmp slt i32 %12, 10
br i1 %cmp23, label %if.then25, label %if.else
if.then25: ; preds = %land.lhs.true
%13 = load i32, i32* %data, align 4
%idxprom26 = sext i32 %13 to i64
%arrayidx27 = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom26
store i32 1, i32* %arrayidx27, align 4
store i32 0, i32* %i, align 4
br label %for.cond
for.cond: ; preds = %for.inc, %if.then25
%14 = load i32, i32* %i, align 4
%cmp28 = icmp slt i32 %14, 10
br i1 %cmp28, label %for.body, label %for.end
for.body: ; preds = %for.cond
%15 = load i32, i32* %i, align 4
%idxprom30 = sext i32 %15 to i64
%arrayidx31 = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom30
%16 = load i32, i32* %arrayidx31, align 4
call void @printIntLine(i32 %16)
br label %for.inc
for.inc: ; preds = %for.body
%17 = load i32, i32* %i, align 4
%inc = add nsw i32 %17, 1
store i32 %inc, i32* %i, align 4
br label %for.cond
for.end: ; preds = %for.cond
br label %if.end32
if.else: ; preds = %land.lhs.true, %if.end20
call void @printLine(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
br label %if.end32
if.end32: ; preds = %if.else, %for.end
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B1() #0 {
entry:
%data = alloca i32, align 4
%i = alloca i32, align 4
%buffer = alloca [10 x i32], align 16
store i32 -1, i32* %data, align 4
store i32 7, i32* %data, align 4
%0 = bitcast [10 x i32]* %buffer to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %0, i8 0, i64 40, i1 false)
%1 = load i32, i32* %data, align 4
%cmp = icmp sge i32 %1, 0
br i1 %cmp, label %if.then, label %if.else
if.then: ; preds = %entry
%2 = load i32, i32* %data, align 4
%idxprom = sext i32 %2 to i64
%arrayidx = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom
store i32 1, i32* %arrayidx, align 4
store i32 0, i32* %i, align 4
br label %for.cond
for.cond: ; preds = %for.inc, %if.then
%3 = load i32, i32* %i, align 4
%cmp1 = icmp slt i32 %3, 10
br i1 %cmp1, label %for.body, label %for.end
for.body: ; preds = %for.cond
%4 = load i32, i32* %i, align 4
%idxprom2 = sext i32 %4 to i64
%arrayidx3 = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom2
%5 = load i32, i32* %arrayidx3, align 4
call void @printIntLine(i32 %5)
br label %for.inc
for.inc: ; preds = %for.body
%6 = load i32, i32* %i, align 4
%inc = add nsw i32 %6, 1
store i32 %inc, i32* %i, align 4
br label %for.cond
for.end: ; preds = %for.cond
br label %if.end
if.else: ; preds = %entry
call void @printLine(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
br label %if.end
if.end: ; preds = %if.else, %for.end
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B2() #0 {
entry:
%data = alloca i32, align 4
%i = alloca i32, align 4
%buffer = alloca [10 x i32], align 16
store i32 -1, i32* %data, align 4
store i32 7, i32* %data, align 4
%0 = bitcast [10 x i32]* %buffer to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %0, i8 0, i64 40, i1 false)
%1 = load i32, i32* %data, align 4
%cmp = icmp sge i32 %1, 0
br i1 %cmp, label %if.then, label %if.else
if.then: ; preds = %entry
%2 = load i32, i32* %data, align 4
%idxprom = sext i32 %2 to i64
%arrayidx = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom
store i32 1, i32* %arrayidx, align 4
store i32 0, i32* %i, align 4
br label %for.cond
for.cond: ; preds = %for.inc, %if.then
%3 = load i32, i32* %i, align 4
%cmp1 = icmp slt i32 %3, 10
br i1 %cmp1, label %for.body, label %for.end
for.body: ; preds = %for.cond
%4 = load i32, i32* %i, align 4
%idxprom2 = sext i32 %4 to i64
%arrayidx3 = getelementptr inbounds [10 x i32], [10 x i32]* %buffer, i64 0, i64 %idxprom2
%5 = load i32, i32* %arrayidx3, align 4
call void @printIntLine(i32 %5)
br label %for.inc
for.inc: ; preds = %for.body
%6 = load i32, i32* %i, align 4
%inc = add nsw i32 %6, 1
store i32 %inc, i32* %i, align 4
br label %for.cond
for.end: ; preds = %for.cond
br label %if.end
if.else: ; preds = %entry
call void @printLine(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
br label %if.end
if.end: ; preds = %if.else, %for.end
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" }
attributes #1 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #2 = { argmemonly nounwind willreturn writeonly }
attributes #3 = { nounwind readnone "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #4 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #5 = { nounwind readonly "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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" }
attributes #6 = { nounwind }
attributes #7 = { nounwind readnone }
attributes #8 = { nounwind readonly }
!llvm.module.flags = !{!0}
!llvm.ident = !{!1}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%stack_var_-72 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
%1 = ptrtoint i64* %stack_var_-72 to i64, !insn.addr !1
ret i64 %1, !insn.addr !2
}
define i64 @function_34() local_unnamed_addr {
dec_label_pc_34:
%0 = alloca i64
%rax.0.reg2mem = alloca i64, !insn.addr !3
%1 = load i64, i64* %0
%2 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_ncpy_68b_badSink(), !insn.addr !4
%3 = add i64 %1, -8, !insn.addr !5
%4 = inttoptr i64 %3 to i64*, !insn.addr !5
%5 = load i64, i64* %4, align 8, !insn.addr !5
%6 = call i64 @__readfsqword(i64 40), !insn.addr !6
%7 = icmp eq i64 %5, %6, !insn.addr !6
store i64 0, i64* %rax.0.reg2mem, !insn.addr !7
br i1 %7, label %dec_label_pc_53, label %dec_label_pc_4e, !insn.addr !7
dec_label_pc_4e: ; preds = %dec_label_pc_34
%8 = call i64 @__stack_chk_fail(), !insn.addr !8
store i64 %8, i64* %rax.0.reg2mem, !insn.addr !8
br label %dec_label_pc_53, !insn.addr !8
dec_label_pc_53: ; preds = %dec_label_pc_4e, %dec_label_pc_34
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !9
}
define i64 @goodG2B() local_unnamed_addr {
dec_label_pc_55:
%rax.0.reg2mem = alloca i64, !insn.addr !10
%stack_var_-72 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !11
%1 = ptrtoint i64* %stack_var_-72 to i64, !insn.addr !12
%2 = bitcast i64* %stack_var_-72 to i32*, !insn.addr !13
store i32 0, i32* %2, align 8, !insn.addr !13
store i64 %1, i64* inttoptr (i64 8 to i64*), align 8, !insn.addr !14
%3 = call i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_ncpy_68b_goodG2BSink(), !insn.addr !15
%4 = call i64 @__readfsqword(i64 40), !insn.addr !16
%5 = icmp eq i64 %0, %4, !insn.addr !16
store i64 0, i64* %rax.0.reg2mem, !insn.addr !17
br i1 %5, label %dec_label_pc_a8, label %dec_label_pc_a3, !insn.addr !17
dec_label_pc_a3: ; preds = %dec_label_pc_55
%6 = call i64 @__stack_chk_fail(), !insn.addr !18
store i64 %6, i64* %rax.0.reg2mem, !insn.addr !18
br label %dec_label_pc_a8, !insn.addr !18
dec_label_pc_a8: ; preds = %dec_label_pc_a3, %dec_label_pc_55
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !19
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_ncpy_68_good() local_unnamed_addr {
dec_label_pc_aa:
%0 = call i64 @goodG2B(), !insn.addr !20
ret i64 %0, !insn.addr !21
}
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_ncpy_68b_badSink() local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare i64 @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_ncpy_68b_goodG2BSink() local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 8}
!1 = !{i64 27}
!2 = !{i64 31}
!3 = !{i64 52}
!4 = !{i64 57}
!5 = !{i64 63}
!6 = !{i64 67}
!7 = !{i64 76}
!8 = !{i64 78}
!9 = !{i64 84}
!10 = !{i64 85}
!11 = !{i64 93}
!12 = !{i64 112}
!13 = !{i64 120}
!14 = !{i64 130}
!15 = !{i64 142}
!16 = !{i64 152}
!17 = !{i64 161}
!18 = !{i64 163}
!19 = !{i64 169}
!20 = !{i64 179}
!21 = !{i64 186}
### Assistant: @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_ncpy_68_badData = dso_local global i32* null, align 8
@CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_ncpy_68_goodG2BData = dso_local global i32* null, align 8
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_ncpy_68_bad() #0 {
entry:
%data = alloca i32*, align 8
%dataBadBuffer = alloca [10 x i32], align 16
%dataGoodBuffer = alloca [11 x i32], align 16
%arraydecay = getelementptr inbounds [10 x i32], [10 x i32]* %dataBadBuffer, i64 0, i64 0
store i32* %arraydecay, i32** %data, align 8
%0 = load i32*, i32** %data, align 8
%arrayidx = getelementptr inbounds i32, i32* %0, i64 0
store i32 0, i32* %arrayidx, align 4
%1 = load i32*, i32** %data, align 8
store i32* %1, i32** @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_ncpy_68_badData, align 8
call void (...) @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_ncpy_68b_badSink()
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_ncpy_68b_badSink(...) #1
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_ncpy_68_good() #0 {
entry:
call void @goodG2B()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B() #0 {
entry:
%data = alloca i32*, align 8
%dataBadBuffer = alloca [10 x i32], align 16
%dataGoodBuffer = alloca [11 x i32], align 16
%arraydecay = getelementptr inbounds [11 x i32], [11 x i32]* %dataGoodBuffer, i64 0, i64 0
store i32* %arraydecay, i32** %data, align 8
%0 = load i32*, i32** %data, align 8
%arrayidx = getelementptr inbounds i32, i32* %0, i64 0
store i32 0, i32* %arrayidx, align 4
%1 = load i32*, i32** %data, align 8
store i32* %1, i32** @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_ncpy_68_goodG2BData, align 8
call void (...) @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_ncpy_68b_goodG2BSink()
ret void
}
declare dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE193_wchar_t_declare_ncpy_68b_goodG2BSink(...) #1
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" }
attributes #1 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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 = !{!"clang version 11.1.0"}
|
### Human: Refine the following lifted llvm ir, target datalayout = "e-m:e-p:64:64-i64:64-f80:128-n8:16:32:64-S128"
@global_var_f = local_unnamed_addr constant [3 x i8] c"%(\00"
define i64 @_GLOBAL_OFFSET_TABLE_.1() local_unnamed_addr {
dec_label_pc_0:
%stack_var_-1224 = alloca i64, align 8
%0 = call i64 @__readfsqword(i64 40), !insn.addr !0
%1 = ptrtoint i64* %stack_var_-1224 to i64, !insn.addr !1
ret i64 %1, !insn.addr !2
}
define i64 @function_30(i64 %arg1, i64 %arg2, i64 %arg3) local_unnamed_addr {
dec_label_pc_30:
%0 = alloca i64
%.reg2mem = alloca i64, !insn.addr !3
%storemerge1.reg2mem = alloca i64, !insn.addr !3
%1 = load i64, i64* %0
%rax = alloca i64, align 8
%2 = load i64, i64* %0
%3 = bitcast i64* %rax to i8*
%4 = trunc i64 %2 to i8
%5 = mul i8 %4, 2, !insn.addr !3
%6 = inttoptr i64 %2 to i8*, !insn.addr !3
store i8 %5, i8* %6, align 1, !insn.addr !3
%7 = load i8, i8* %3, align 8, !insn.addr !4
%8 = load i64, i64* %rax, align 8
%9 = trunc i64 %8 to i8, !insn.addr !4
%10 = add i8 %7, %9, !insn.addr !4
%11 = inttoptr i64 %8 to i8*, !insn.addr !4
store i8 %10, i8* %11, align 1, !insn.addr !4
%12 = inttoptr i64 %arg3 to i8*, !insn.addr !5
%13 = load i64, i64* %rax, align 8, !insn.addr !5
call void @__asm_rep_stosq_memset(i8* %12, i64 %13, i64 100), !insn.addr !5
%14 = add i64 %1, -1232, !insn.addr !6
%15 = inttoptr i64 %14 to i64*, !insn.addr !6
store i64 0, i64* %15, align 8
%16 = add i64 %1, -1224
%17 = inttoptr i64 %16 to i64*
%18 = add i64 %1, -816, !insn.addr !7
store i64 0, i64* %storemerge1.reg2mem
br label %dec_label_pc_4c
dec_label_pc_4c: ; preds = %dec_label_pc_30, %dec_label_pc_4c
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%19 = mul i64 %storemerge1.reload, 8, !insn.addr !8
%20 = load i64, i64* %17, align 8, !insn.addr !9
%21 = add i64 %20, %19, !insn.addr !10
%22 = add i64 %18, %19, !insn.addr !7
%23 = inttoptr i64 %22 to i64*, !insn.addr !7
%24 = load i64, i64* %23, align 8, !insn.addr !7
%25 = inttoptr i64 %21 to i64*, !insn.addr !11
store i64 %24, i64* %25, align 8, !insn.addr !11
%26 = load i64, i64* %15, align 8, !insn.addr !12
%27 = add i64 %26, 1, !insn.addr !12
store i64 %27, i64* %15, align 8
%28 = icmp ult i64 %27, 100
store i64 %27, i64* %storemerge1.reg2mem, !insn.addr !13
br i1 %28, label %dec_label_pc_4c, label %dec_label_pc_89, !insn.addr !13
dec_label_pc_89: ; preds = %dec_label_pc_4c
%29 = load i64, i64* %17, align 8, !insn.addr !14
%30 = inttoptr i64 %29 to i64*, !insn.addr !15
%31 = load i64, i64* %30, align 8, !insn.addr !15
%32 = call i64 @printLongLongLine(i64 %31), !insn.addr !16
%33 = add i64 %1, -8, !insn.addr !17
%34 = inttoptr i64 %33 to i64*, !insn.addr !17
%35 = load i64, i64* %34, align 8, !insn.addr !17
%36 = call i64 @__readfsqword(i64 40), !insn.addr !18
%37 = xor i64 %36, %35, !insn.addr !18
%38 = icmp eq i64 %37, 0, !insn.addr !18
store i64 %37, i64* %rax, align 8, !insn.addr !18
store i64 0, i64* %.reg2mem, !insn.addr !19
br i1 %38, label %dec_label_pc_b0, label %dec_label_pc_ab, !insn.addr !19
dec_label_pc_ab: ; preds = %dec_label_pc_89
%39 = call i64 @__stack_chk_fail(), !insn.addr !20
store i64 %39, i64* %rax, align 8, !insn.addr !20
store i64 %39, i64* %.reg2mem, !insn.addr !20
br label %dec_label_pc_b0, !insn.addr !20
dec_label_pc_b0: ; preds = %dec_label_pc_ab, %dec_label_pc_89
%.reload = load i64, i64* %.reg2mem, !insn.addr !21
ret i64 %.reload, !insn.addr !21
}
define i64 @goodG2B1() local_unnamed_addr {
dec_label_pc_b2:
%rax.0.reg2mem = alloca i64, !insn.addr !22
%storemerge1.reg2mem = alloca i64, !insn.addr !22
%stack_var_-824 = alloca i64, align 8
%stack_var_-1624 = alloca i64, align 8
%stack_var_-8 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !23
%1 = call i64 @__readfsqword(i64 40), !insn.addr !24
%2 = ptrtoint i64* %stack_var_-1624 to i64, !insn.addr !25
%3 = bitcast i64* %stack_var_-824 to i8*, !insn.addr !26
call void @__asm_rep_stosq_memset(i8* nonnull %3, i64 0, i64 100), !insn.addr !26
%4 = add i64 %0, -816, !insn.addr !27
store i64 0, i64* %storemerge1.reg2mem
br label %dec_label_pc_fe
dec_label_pc_fe: ; preds = %dec_label_pc_fe, %dec_label_pc_b2
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%5 = mul i64 %storemerge1.reload, 8, !insn.addr !28
%6 = add i64 %5, %2, !insn.addr !29
%7 = add i64 %4, %5, !insn.addr !27
%8 = inttoptr i64 %7 to i64*, !insn.addr !27
%9 = load i64, i64* %8, align 8, !insn.addr !27
%10 = inttoptr i64 %6 to i64*, !insn.addr !30
store i64 %9, i64* %10, align 8, !insn.addr !30
%11 = add nuw nsw i64 %storemerge1.reload, 1, !insn.addr !31
%exitcond = icmp eq i64 %11, 100
store i64 %11, i64* %storemerge1.reg2mem, !insn.addr !32
br i1 %exitcond, label %dec_label_pc_13b, label %dec_label_pc_fe, !insn.addr !32
dec_label_pc_13b: ; preds = %dec_label_pc_fe
%12 = load i64, i64* %stack_var_-1624, align 8, !insn.addr !33
%13 = call i64 @printLongLongLine(i64 %12), !insn.addr !34
%14 = call i64 @__readfsqword(i64 40), !insn.addr !35
%15 = icmp eq i64 %1, %14, !insn.addr !35
store i64 0, i64* %rax.0.reg2mem, !insn.addr !36
br i1 %15, label %dec_label_pc_162, label %dec_label_pc_15d, !insn.addr !36
dec_label_pc_15d: ; preds = %dec_label_pc_13b
%16 = call i64 @__stack_chk_fail(), !insn.addr !37
store i64 %16, i64* %rax.0.reg2mem, !insn.addr !37
br label %dec_label_pc_162, !insn.addr !37
dec_label_pc_162: ; preds = %dec_label_pc_15d, %dec_label_pc_13b
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !38
}
define i64 @goodG2B2() local_unnamed_addr {
dec_label_pc_164:
%rax.0.reg2mem = alloca i64, !insn.addr !39
%storemerge1.reg2mem = alloca i64, !insn.addr !39
%stack_var_-824 = alloca i64, align 8
%stack_var_-1624 = alloca i64, align 8
%stack_var_-8 = alloca i64, align 8
%0 = ptrtoint i64* %stack_var_-8 to i64, !insn.addr !40
%1 = call i64 @__readfsqword(i64 40), !insn.addr !41
%2 = ptrtoint i64* %stack_var_-1624 to i64, !insn.addr !42
%3 = bitcast i64* %stack_var_-824 to i8*, !insn.addr !43
call void @__asm_rep_stosq_memset(i8* nonnull %3, i64 0, i64 100), !insn.addr !43
%4 = add i64 %0, -816, !insn.addr !44
store i64 0, i64* %storemerge1.reg2mem
br label %dec_label_pc_1b0
dec_label_pc_1b0: ; preds = %dec_label_pc_1b0, %dec_label_pc_164
%storemerge1.reload = load i64, i64* %storemerge1.reg2mem
%5 = mul i64 %storemerge1.reload, 8, !insn.addr !45
%6 = add i64 %5, %2, !insn.addr !46
%7 = add i64 %4, %5, !insn.addr !44
%8 = inttoptr i64 %7 to i64*, !insn.addr !44
%9 = load i64, i64* %8, align 8, !insn.addr !44
%10 = inttoptr i64 %6 to i64*, !insn.addr !47
store i64 %9, i64* %10, align 8, !insn.addr !47
%11 = add nuw nsw i64 %storemerge1.reload, 1, !insn.addr !48
%exitcond = icmp eq i64 %11, 100
store i64 %11, i64* %storemerge1.reg2mem, !insn.addr !49
br i1 %exitcond, label %dec_label_pc_1ed, label %dec_label_pc_1b0, !insn.addr !49
dec_label_pc_1ed: ; preds = %dec_label_pc_1b0
%12 = load i64, i64* %stack_var_-1624, align 8, !insn.addr !50
%13 = call i64 @printLongLongLine(i64 %12), !insn.addr !51
%14 = call i64 @__readfsqword(i64 40), !insn.addr !52
%15 = icmp eq i64 %1, %14, !insn.addr !52
store i64 0, i64* %rax.0.reg2mem, !insn.addr !53
br i1 %15, label %dec_label_pc_214, label %dec_label_pc_20f, !insn.addr !53
dec_label_pc_20f: ; preds = %dec_label_pc_1ed
%16 = call i64 @__stack_chk_fail(), !insn.addr !54
store i64 %16, i64* %rax.0.reg2mem, !insn.addr !54
br label %dec_label_pc_214, !insn.addr !54
dec_label_pc_214: ; preds = %dec_label_pc_20f, %dec_label_pc_1ed
%rax.0.reload = load i64, i64* %rax.0.reg2mem
ret i64 %rax.0.reload, !insn.addr !55
}
define i64 @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_loop_02_good() local_unnamed_addr {
dec_label_pc_216:
%0 = call i64 @goodG2B1(), !insn.addr !56
%1 = call i64 @goodG2B2(), !insn.addr !57
ret i64 %1, !insn.addr !58
}
declare i64 @printLongLongLine(i64) local_unnamed_addr
declare i64 @__stack_chk_fail() local_unnamed_addr
declare void @__asm_rep_stosq_memset(i8*, i64, i64) local_unnamed_addr
declare i64 @__readfsqword(i64) local_unnamed_addr
!0 = !{i64 11}
!1 = !{i64 26}
!2 = !{i64 33}
!3 = !{i64 48}
!4 = !{i64 50}
!5 = !{i64 60}
!6 = !{i64 63}
!7 = !{i64 108}
!8 = !{i64 83}
!9 = !{i64 91}
!10 = !{i64 98}
!11 = !{i64 116}
!12 = !{i64 119}
!13 = !{i64 135}
!14 = !{i64 137}
!15 = !{i64 144}
!16 = !{i64 150}
!17 = !{i64 156}
!18 = !{i64 160}
!19 = !{i64 169}
!20 = !{i64 171}
!21 = !{i64 177}
!22 = !{i64 178}
!23 = !{i64 179}
!24 = !{i64 189}
!25 = !{i64 211}
!26 = !{i64 238}
!27 = !{i64 286}
!28 = !{i64 261}
!29 = !{i64 276}
!30 = !{i64 294}
!31 = !{i64 297}
!32 = !{i64 313}
!33 = !{i64 322}
!34 = !{i64 328}
!35 = !{i64 338}
!36 = !{i64 347}
!37 = !{i64 349}
!38 = !{i64 355}
!39 = !{i64 356}
!40 = !{i64 357}
!41 = !{i64 367}
!42 = !{i64 389}
!43 = !{i64 416}
!44 = !{i64 464}
!45 = !{i64 439}
!46 = !{i64 454}
!47 = !{i64 472}
!48 = !{i64 475}
!49 = !{i64 491}
!50 = !{i64 500}
!51 = !{i64 506}
!52 = !{i64 516}
!53 = !{i64 525}
!54 = !{i64 527}
!55 = !{i64 533}
!56 = !{i64 543}
!57 = !{i64 553}
!58 = !{i64 560}
### Assistant: ; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_loop_02_bad() #0 {
entry:
%data = alloca i64*, align 8
%dataBadBuffer = alloca [50 x i64], align 16
%dataGoodBuffer = alloca [100 x i64], align 16
%source = alloca [100 x i64], align 16
%i = alloca i64, align 8
%arraydecay = getelementptr inbounds [50 x i64], [50 x i64]* %dataBadBuffer, i64 0, i64 0
store i64* %arraydecay, i64** %data, align 8
%0 = bitcast [100 x i64]* %source to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %0, i8 0, i64 800, i1 false)
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %entry
%1 = load i64, i64* %i, align 8
%cmp = icmp ult i64 %1, 100
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%2 = load i64, i64* %i, align 8
%arrayidx = getelementptr inbounds [100 x i64], [100 x i64]* %source, i64 0, i64 %2
%3 = load i64, i64* %arrayidx, align 8
%4 = load i64*, i64** %data, align 8
%5 = load i64, i64* %i, align 8
%arrayidx1 = getelementptr inbounds i64, i64* %4, i64 %5
store i64 %3, i64* %arrayidx1, align 8
br label %for.inc
for.inc: ; preds = %for.body
%6 = load i64, i64* %i, align 8
%inc = add i64 %6, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%7 = load i64*, i64** %data, align 8
%arrayidx2 = getelementptr inbounds i64, i64* %7, i64 0
%8 = load i64, i64* %arrayidx2, align 8
call void @printLongLongLine(i64 %8)
ret void
}
; Function Attrs: argmemonly nounwind willreturn writeonly
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #1
declare dso_local void @printLongLongLine(i64) #2
; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @CWE121_Stack_Based_Buffer_Overflow__CWE805_int64_t_declare_loop_02_good() #0 {
entry:
call void @goodG2B1()
call void @goodG2B2()
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B1() #0 {
entry:
%data = alloca i64*, align 8
%dataBadBuffer = alloca [50 x i64], align 16
%dataGoodBuffer = alloca [100 x i64], align 16
%source = alloca [100 x i64], align 16
%i = alloca i64, align 8
%arraydecay = getelementptr inbounds [100 x i64], [100 x i64]* %dataGoodBuffer, i64 0, i64 0
store i64* %arraydecay, i64** %data, align 8
%0 = bitcast [100 x i64]* %source to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %0, i8 0, i64 800, i1 false)
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %entry
%1 = load i64, i64* %i, align 8
%cmp = icmp ult i64 %1, 100
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%2 = load i64, i64* %i, align 8
%arrayidx = getelementptr inbounds [100 x i64], [100 x i64]* %source, i64 0, i64 %2
%3 = load i64, i64* %arrayidx, align 8
%4 = load i64*, i64** %data, align 8
%5 = load i64, i64* %i, align 8
%arrayidx1 = getelementptr inbounds i64, i64* %4, i64 %5
store i64 %3, i64* %arrayidx1, align 8
br label %for.inc
for.inc: ; preds = %for.body
%6 = load i64, i64* %i, align 8
%inc = add i64 %6, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%7 = load i64*, i64** %data, align 8
%arrayidx2 = getelementptr inbounds i64, i64* %7, i64 0
%8 = load i64, i64* %arrayidx2, align 8
call void @printLongLongLine(i64 %8)
ret void
}
; Function Attrs: noinline nounwind optnone uwtable
define internal void @goodG2B2() #0 {
entry:
%data = alloca i64*, align 8
%dataBadBuffer = alloca [50 x i64], align 16
%dataGoodBuffer = alloca [100 x i64], align 16
%source = alloca [100 x i64], align 16
%i = alloca i64, align 8
%arraydecay = getelementptr inbounds [100 x i64], [100 x i64]* %dataGoodBuffer, i64 0, i64 0
store i64* %arraydecay, i64** %data, align 8
%0 = bitcast [100 x i64]* %source to i8*
call void @llvm.memset.p0i8.i64(i8* align 16 %0, i8 0, i64 800, i1 false)
store i64 0, i64* %i, align 8
br label %for.cond
for.cond: ; preds = %for.inc, %entry
%1 = load i64, i64* %i, align 8
%cmp = icmp ult i64 %1, 100
br i1 %cmp, label %for.body, label %for.end
for.body: ; preds = %for.cond
%2 = load i64, i64* %i, align 8
%arrayidx = getelementptr inbounds [100 x i64], [100 x i64]* %source, i64 0, i64 %2
%3 = load i64, i64* %arrayidx, align 8
%4 = load i64*, i64** %data, align 8
%5 = load i64, i64* %i, align 8
%arrayidx1 = getelementptr inbounds i64, i64* %4, i64 %5
store i64 %3, i64* %arrayidx1, align 8
br label %for.inc
for.inc: ; preds = %for.body
%6 = load i64, i64* %i, align 8
%inc = add i64 %6, 1
store i64 %inc, i64* %i, align 8
br label %for.cond
for.end: ; preds = %for.cond
%7 = load i64*, i64** %data, align 8
%arrayidx2 = getelementptr inbounds i64, i64* %7, i64 0
%8 = load i64, i64* %arrayidx2, align 8
call void @printLongLongLine(i64 %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" }
attributes #1 = { argmemonly nounwind willreturn writeonly }
attributes #2 = { "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "frame-pointer"="all" "less-precise-fpmad"="false" "no-infs-fp-math"="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 = !{!"clang version 11.1.0"}
|